浏览代码

Merge branch 'develop_yh53' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh50

# Conflicts:
#	src/views/salesManagement/salesQueryNew/comps/productList.vue
#	src/views/salesManagement/salesQueryNew/comps/productNormalList.vue
#	src/views/salesManagement/salesQueryNew/list.vue
#	src/views/salesManagement/waitDispatchNew/detailProductList.vue
#	src/views/salesManagement/waitDispatchNew/queryPart.vue
lilei 4 月之前
父节点
当前提交
e77f68396b

二进制
public/templ/产品批量导入模板.xlsx


+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "2.2.514",
+    "version": "2.2.53",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 11 - 1
src/api/dispatch.js

@@ -93,7 +93,17 @@ export const dispatchStockOut = (params) => {
     }
   })
 }
-
+// 修改库存类型
+export const dispatchUpdateStockType = (params) => {
+  return axios({
+    url: '/dispatch/updateStockType',
+    data: params,
+    method: 'post',
+    headers:{
+      'module': encodeURIComponent('下推单修改轮胎库存类型')
+    }
+  })
+}
 // 备货审核
 export const dispatchStockUpAduit = (params) => {
   return axios({

+ 4 - 0
src/views/productManagement/productInfo/chooseImportModal.vue

@@ -108,6 +108,8 @@ export default {
         { title: '颜色', dataIndex: 'color', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品内盒尺寸', dataIndex: 'boxSize', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品说明', dataIndex: 'description', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '出库仓库', dataIndex: 'outWarehouseName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货仓库', dataIndex: 'returnWarehouseName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '其他说明', dataIndex: 'otherDesc', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ],
       loadData: [], // 可导入数据
@@ -132,6 +134,8 @@ export default {
         { title: '产品内盒尺寸', dataIndex: 'boxSize', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '产品说明', dataIndex: 'description', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '其他说明', dataIndex: 'otherDesc', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '出库仓库', dataIndex: 'outWarehouseName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货仓库', dataIndex: 'returnWarehouseName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '备注', dataIndex: 'errorMsg', width: '5%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       unLoadData: [], // 导入错误数据

+ 2 - 0
src/views/productManagement/productInfo/detailModal.vue

@@ -24,6 +24,8 @@
         </a-descriptions-item>
         <a-descriptions-item label="箭冠产品:">{{ detailsData&&detailsData.arrowFalgDictValue || '--' }}</a-descriptions-item>
         <a-descriptions-item label="条形码:" :span="2">{{ detailsData&&detailsData.qrCode || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="出库仓库:">{{ detailsData&&detailsData.outWarehouseName || '--' }}</a-descriptions-item>
+        <a-descriptions-item label="退货仓库:">{{ detailsData&&detailsData.returnWarehouseName || '--' }}</a-descriptions-item>
         <a-descriptions-item label="产品图片:" :span="2">
           <div style="display: flex;">
             <p class="pic-box" v-for="(item,index) in fileList" :key="index">

+ 21 - 2
src/views/productManagement/productInfo/edit.vue

@@ -133,6 +133,16 @@
                   allowClear />
               </a-form-model-item>
             </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="出库仓库" prop="outWarehouseSn">
+                <chooseWarehouse ref="outWarehouse" id="productInfoEdit-outWarehouse" isPermission v-model="form.outWarehouseSn"></chooseWarehouse>
+              </a-form-model-item>
+            </a-col>
+            <a-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
+              <a-form-model-item label="退货仓库" prop="returnWarehouseSn">
+                <chooseWarehouse ref="returnWarehouse" id="productInfoEdit-returnWarehouse" isPermission v-model="form.returnWarehouseSn"></chooseWarehouse>
+              </a-form-model-item>
+            </a-col>
           </a-row>
           <a-row>
             <a-col :xs="24" :sm="24" :md="24" :lg="16" :xl="16">
@@ -221,6 +231,7 @@ import { commonMixin } from '@/utils/mixin'
 // 组件
 import { VSelect, Upload } from '@/components'
 import Editor from '@/components/WEeditor'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 // 接口
 import { productSave, productSnDetail } from '@/api/product'
 import { productTypeQueryAll } from '@/api/productType'
@@ -228,7 +239,7 @@ import { productBrandQuery } from '@/api/productBrand'
 export default {
   name: 'ProductInfoEdit',
   mixins: [commonMixin],
-  components: { VSelect, Upload, Editor },
+  components: { VSelect, Upload, Editor, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -257,7 +268,9 @@ export default {
         color: undefined, // 颜色
         boxSize: '', // 内核尺寸
         description: '', // 产品说明
-        otherDesc: '' // 其他说明
+        otherDesc: '', // 其他说明
+        outWarehouseSn: undefined, // 出库仓库
+        returnWarehouseSn: undefined// 退货仓库
       },
       // 表单验证规则
       rules: {
@@ -287,6 +300,12 @@ export default {
         arrowFalg: [
           { required: true, message: '请选择是否为箭冠产品', trigger: 'change' }
         ],
+        outWarehouseSn: [
+          { required: true, message: '请选择出库仓库', trigger: 'change' }
+        ],
+        returnWarehouseSn: [
+          { required: true, message: '请选择退货仓库', trigger: 'change' }
+        ],
         qrCode: [
           { required: false, message: '请输入条形码', trigger: 'change' },
           { validator: this.validateQrCode }

+ 1 - 1
src/views/productManagement/productInfo/importGuideModal.vue

@@ -17,7 +17,7 @@
           <ul>
             <li>1) 请先下载导入模板,模板中已标示出必填项</li>
             <li>2) 产品编码具有唯一性,{{ guideType=='1'?'系统中已存在的无法导入':'下线导入,必须是系统中已存在的产品编码' }}</li>
-            <li v-if="guideType=='1'">3) 产品品牌、产品分类、单位、包装数单位,必须是系统中已经存在的值,否则无法导入</li>
+            <li v-if="guideType=='1'">3) 产品品牌、产品分类、单位、包装数单位、出库仓库、退货仓库,必须是系统中已经存在的值,否则无法导入</li>
             <li v-if="guideType=='2'"><a :href="filePath" style="margin: 5px 0 0 15px;display: block;">
               <a-icon type="download" style="padding-right: 5px;" />下载导入模板
             </a></li>

+ 33 - 33
src/views/productManagement/productInfo/list.vue

@@ -65,6 +65,16 @@
                   </a-select>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="出库仓库">
+                  <chooseWarehouse ref="outWarehouse" id="productInfoList-outWarehouse" isPermission v-model="queryParam.outWarehouseSn"></chooseWarehouse>
+                </a-form-model-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-model-item label="退货仓库">
+                  <chooseWarehouse ref="returnWarehouse" id="productInfoList-returnWarehouse" isPermission v-model="queryParam.returnWarehouseSn"></chooseWarehouse>
+                </a-form-model-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
@@ -246,12 +256,13 @@ import ProductBrand from '@/views/common/productBrand.js'
 import productTypeAll from '@/views/common/productTypeAll.js'
 import rangeDate from '@/views/common/rangeDate.vue'
 import importGuideModal from './importGuideModal.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
 // 接口
 import { productList, productAudit, productBatchAudit, productDel, productOnline, productBatchOnline, productExport, saveBatchImportProduct, importSaveBatch, updateHaltProdFlag } from '@/api/product'
 export default {
   name: 'ProductInfoList',
   mixins: [commonMixin],
-  components: { STable, VSelect, productInfoDetailModal, productInfoOfflineModal, ProductBrand, productTypeAll, rangeDate, importGuideModal },
+  components: { STable, VSelect, productInfoDetailModal, productInfoOfflineModal, ProductBrand, productTypeAll, rangeDate, importGuideModal, chooseWarehouse },
   data () {
     return {
       spinning: false,
@@ -272,7 +283,9 @@ export default {
         productTypeSn3: '', //  产品三级分类
         state: undefined, //  产品状态
         pricingState: undefined, //  定价状态
-        picFlag: undefined// 产品图片
+        picFlag: undefined, // 产品图片
+        outWarehouseSn: undefined, // 出库仓库
+        returnWarehouseSn: undefined// 退货仓库
       },
       productType: [], // 产品类型
 
@@ -280,7 +293,7 @@ export default {
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品名称', dataIndex: 'name', align: 'left', width: '14%', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '产品名称', dataIndex: 'name', align: 'left', width: '12%', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '产品编码', dataIndex: 'code', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
         { title: '原厂编码', dataIndex: 'origCode', width: '10%', align: 'left', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'productBrandName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -292,6 +305,8 @@ export default {
         { title: '定价状态', dataIndex: 'pricingStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '停产状态', width: '6%', align: 'center', scopedSlots: { customRender: 'stopStatus' } },
         { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '5%', align: 'center' },
+        { title: '出库仓库', dataIndex: 'outWarehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '退货仓库', dataIndex: 'returnWarehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       loadingAudit: false, // 审核按钮加载状态
@@ -351,21 +366,14 @@ export default {
     // 批量导入产品
     hanldeOk (obj) {
       this.spinning = true
-      if (obj && obj.type && obj.type == 'offline') { // 下线导入
-        importSaveBatch(obj).then(res => {
-          if (res.status == 200) {
-            this.resetSearchForm()
-          }
-          this.spinning = false
-        })
-      } else {
-        saveBatchImportProduct(obj).then(res => {
-          if (res.status == 200) {
-            this.resetSearchForm()
-          }
-          this.spinning = false
-        })
-      }
+      // importSaveBatch 下线导入
+      const ajaxName = obj && obj.type && obj.type == 'offline' ? importSaveBatch : saveBatchImportProduct
+      ajaxName(obj).then(res => {
+        if (res.status == 200) {
+          this.resetSearchForm()
+        }
+        this.spinning = false
+      })
     },
     // 审核
     handleAudit (row) {
@@ -380,10 +388,8 @@ export default {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
             }
+            _this.spinning = false
           })
         }
       })
@@ -420,10 +426,8 @@ export default {
               _this.$refs.table.clearSelected() // 清空表格选中项
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
             }
+            _this.spinning = false
           })
         }
       })
@@ -484,10 +488,8 @@ export default {
               _this.$refs.table.clearSelected() // 清空表格选中项
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
             }
+            _this.spinning = false
           })
         }
       })
@@ -525,6 +527,8 @@ export default {
       this.queryParam.pricingState = undefined
       this.queryParam.picFlag = undefined
       this.queryParam.haltProdFlag = undefined
+      this.queryParam.outWarehouseSn = undefined
+      this.queryParam.returnWarehouseSn = undefined
       this.productType = []
       if (this.advanced) {
         this.$refs.rangeDate.resetDate()
@@ -554,10 +558,8 @@ export default {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
             }
+            _this.spinning = false
           })
         }
       })
@@ -580,10 +582,8 @@ export default {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
             }
+            _this.spinning = false
           })
         }
       })