Parcourir la source

Merge branch 'master' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-wt into dengfei

695593266@qq.com il y a 9 mois
Parent
commit
d6ff9dc245

+ 13 - 2
src/api/warehouseManagement/index.js

@@ -284,12 +284,23 @@ export default {
     }
     return Promise.reject(new Error(res.data.message));
   },
-   // 包装退货
+  // 包装退货
   getHierarchyList: async (params) => {
-    const res = await request.get('/wms/outintwo/getHierarchyList',{ params });
+    const res = await request.get('/wms/outintwo/getHierarchyList', { params });
     if (res.data.code == 0) {
       return res.data.data;
     }
     return Promise.reject(new Error(res.data.message));
   },
+  //验证是否重复入库
+  isVerifyRepeatIsStock: async (data) => {
+    const res = await request.post(
+      '/wms/outindetailtwo/isVerifyRepeatIsStock',
+      data
+    );
+    if (res.data.code == 0) {
+      return res.data.data;
+    }
+    return Promise.reject(new Error(res.data.message));
+  }
 };

+ 3 - 0
src/views/bpm/handleTask/components/productionWarehousing/submit.vue

@@ -73,6 +73,9 @@
       async storeManagerApprove() {
         let res = await this.getTableValue();
         let storageData = res.returnStorageData;
+        if (!storageData) {
+          return;
+        }
         // 入库来源isSkip 0-正常  1-外部(外部跳过内部审核流程)
         storageData.isSkip = 1;
         console.log(storageData);

+ 1 - 1
src/views/bpm/handleTask/components/purchaseOrder/invoice/detailDialog.vue

@@ -201,7 +201,7 @@ export default {
       console.log(this.$refs)
       return {
         form: this.form,
-        returnStorageData: this.$refs.inoutBoundRef?.[0]&&this.$refs.inoutBoundRef[0].getReturnStorage(),
+        returnStorageData: this.$refs.inoutBoundRef?.[0]&& await this.$refs.inoutBoundRef[0].getReturnStorage(),
         isAllChecked:
           this.$refs.inoutBoundEditRef?.[0] &&
           (await this.$refs.inoutBoundEditRef[0].getStatus()),

+ 1 - 1
src/views/bpm/handleTask/components/purchasePlanManage/detailDialog.vue

@@ -500,7 +500,7 @@
         return {
           returnStorageData:
             this.$refs.inoutBoundRef &&
-            this.$refs.inoutBoundRef.getReturnStorage()
+            await this.$refs.inoutBoundRef.getReturnStorage()
         };
       }
     }

+ 3 - 0
src/views/bpm/handleTask/components/purchasePlanManage/submit.vue

@@ -189,6 +189,9 @@
       async storeManagerApprove() {
         let res = await this.getTableValue();
         let storageData = res.returnStorageData;
+        if(!storageData){
+         return
+        }
         storageData.isSkip = 1;
         try {
           this.isSaveLoading = true;

+ 6 - 0
src/views/bpm/handleTask/components/saleOrder/customerReturnGoods/submit.vue

@@ -235,6 +235,9 @@
         let storageData = data.returnStorageData;
         // 入库来源isSkip 0-正常  1-外部(外部跳过内部审核流程)
         console.log(data);
+        if (!storageData) {
+          return;
+        }
         storageData.isSkip = 1;
         // data.detailList.forEach((val,index)=>{
         //     val.weight=storageData._packingList[index].weight
@@ -305,6 +308,9 @@
       async interiorProductionStorage(data, pass) {
         console.log('data.returnStorageData---------', data.returnStorageData);
         let storageData = data.returnStorageData;
+        if (!storageData) {
+          return;
+        }
         // 入库来源isSkip 0-正常  1-外部(外部跳过内部审核流程)
         storageData.isSkip = 1;
         console.log(storageData);

+ 5 - 1
src/views/bpm/handleTask/components/saleOrder/saleReturnGoods/submit.vue

@@ -162,9 +162,13 @@
       async storemanApprove() {
         let res = await this.getTableValue();
         let storageData = res.returnStorageData;
-        console.log(storageData);
+   
+        if (!storageData) {
+          return;
+        }
         // 入库来源isSkip 0-正常  1-外部(外部跳过内部审核流程)
         storageData.isSkip = 1;
+  
         try {
           this.isSaveLoading = true;
           if (storageData?._packingList?.length) {

+ 15 - 5
src/views/bpm/outgoingManagement/details.vue

@@ -231,9 +231,15 @@
               :show-overflow-tooltip="true"
             >
             </el-table-column>
-            <el-table-column label="单价" prop="price" align="center"
-            v-if="isPrice == 1"
-            
+            <el-table-column label="机型" prop="modelKey" width="200">
+            </el-table-column>
+            <el-table-column label="颜色" prop="colorKey" width="200">
+            </el-table-column>
+            <el-table-column
+              label="单价"
+              prop="price"
+              align="center"
+              v-if="isPrice == 1"
             >
               <template slot-scope="{ row }">
                 <template>
@@ -249,7 +255,7 @@
             >
             </el-table-column>
             <el-table-column
-            v-if="isPrice == 1"
+              v-if="isPrice == 1"
               label="金额"
               align="center"
               prop="contentImage"
@@ -363,6 +369,10 @@
               :show-overflow-tooltip="true"
             >
             </el-table-column>
+            <el-table-column label="机型" prop="modelKey" width="200">
+            </el-table-column>
+            <el-table-column label="颜色" prop="colorKey" width="200">
+            </el-table-column>
             <el-table-column
               prop="supplierName"
               label="供应商"
@@ -531,7 +541,7 @@
         stepsTitle: '已完成',
         stepsStatus: 'success',
         active: 0,
-        isPrice:1
+        isPrice: 1
       };
     },
     watch: {

+ 10 - 2
src/views/bpm/outgoingManagement/outbound.vue

@@ -261,6 +261,10 @@
                 :show-overflow-tooltip="true"
               >
               </el-table-column>
+              <el-table-column label="机型" prop="modelKey" width="200">
+              </el-table-column>
+              <el-table-column label="颜色" prop="colorKey" width="200">
+              </el-table-column>
               <el-table-column
                 label="库存"
                 prop="stockNum"
@@ -418,6 +422,10 @@
                 :show-overflow-tooltip="true"
               >
               </el-table-column>
+              <el-table-column label="机型" prop="modelKey" width="200">
+              </el-table-column>
+              <el-table-column label="颜色" prop="colorKey" width="200">
+              </el-table-column>
               <el-table-column
                 label="质检结果"
                 prop="result"
@@ -1042,7 +1050,7 @@
           let pData4 = {
             //受托退货
             type: 3,
-            ids: this.detailList.map((item) => item.packageId)?.toString(),
+            ids: this.detailList.map((item) => item.packageId)?.toString()
           };
           let api = this.bizType == 8 ? 'getHierarchyList' : 'getHierarchyFifo';
 
@@ -1079,7 +1087,7 @@
               return {
                 categoryId: item.productId || item.categoryId,
                 num: item.totalCount,
-                batchNo: item.batchNo || '',
+                batchNo: item.batchNo || ''
                 // warehouseId: this.bizType == 3 ? item.warehouseId : ''
                 // batchNo: item.batchNo || '',
               };

+ 8 - 0
src/views/bpm/stockManagement/details.vue

@@ -245,6 +245,10 @@
               :show-overflow-tooltip="true"
             >
             </el-table-column>
+            <el-table-column label="机型" prop="modelKey" width="200">
+            </el-table-column>
+            <el-table-column label="颜色" prop="colorKey" width="200">
+            </el-table-column>
             <el-table-column
               label="单价"
               prop="unitPrice"
@@ -444,6 +448,10 @@
               :show-overflow-tooltip="true"
             >
             </el-table-column>
+            <el-table-column label="机型" prop="modelKey" width="200">
+            </el-table-column>
+            <el-table-column label="颜色" prop="colorKey" width="200">
+            </el-table-column>
             <el-table-column
               label="供应商"
               prop="supplierName"

+ 129 - 6
src/views/bpm/stockManagement/storage.vue

@@ -397,6 +397,36 @@
                   <template slot="append"> </template>
                 </template>
               </el-table-column>
+              <el-table-column label="机型" prop="modelKey" width="300">
+                <template slot-scope="{ row, $index }">
+                  <DictSelection
+                    dictName="物品机型"
+                    clearable
+                    v-model="row.modelKey"
+                    :isOne="$index == 1"
+                    multiple
+                    filterable
+                    allow-create
+                    default-first-option
+                  >
+                  </DictSelection>
+                </template>
+              </el-table-column>
+              <el-table-column label="颜色" prop="colorKey" width="300">
+                <template slot-scope="{ row, $index }">
+                  <DictSelection
+                    dictName="物品颜色"
+                    clearable
+                    v-model="row.colorKey"
+                    :isOne="$index == 1"
+                    multiple
+                    filterable
+                    allow-create
+                    default-first-option
+                  >
+                  </DictSelection>
+                </template>
+              </el-table-column>
               <!-- <el-table-column label="单价" prop="unitPrice" width="200" align="center">
                 <template slot-scope="{ row, $index }">
                   <template v-if="row.isSave">
@@ -856,6 +886,36 @@
               {{ row.weightUnit }}
             </template>
           </el-table-column>
+          <el-table-column label="机型" prop="modelKey" width="300">
+            <template slot-scope="{ row, $index }">
+              <DictSelection
+                dictName="物品机型"
+                clearable
+                v-model="row.modelKey"
+                :isOne="$index == 1"
+                multiple
+                filterable
+                allow-create
+                default-first-option
+              >
+              </DictSelection>
+            </template>
+          </el-table-column>
+          <el-table-column label="颜色" prop="colorKey" width="300">
+            <template slot-scope="{ row, $index }">
+              <DictSelection
+                dictName="物品颜色"
+                clearable
+                v-model="row.colorKey"
+                :isOne="$index == 1"
+                multiple
+                filterable
+                allow-create
+                default-first-option
+              >
+              </DictSelection>
+            </template>
+          </el-table-column>
           <el-table-column label="序列号" prop="serialNumber">
           </el-table-column>
           <el-table-column label="质检结果" prop="result" width="120">
@@ -1116,10 +1176,9 @@
   } from '@/utils/dict/index';
   import { getTreeByGroup } from '@/api/classifyManage';
   import { deepClone } from '@/utils';
-  import { getDetails } from '@/api/classifyManage/itemInformation';
   import { mapActions, mapGetters } from 'vuex';
   import BigNumber from 'bignumber.js';
-  import { status } from 'nprogress';
+
   // import dictMixins from '@/mixins/dictMixins';
   export default {
     components: {
@@ -1545,6 +1604,12 @@
                 packingUnit: packingUnit, // 单位
                 measureQuantity: measureQuantity, // 计量数量
                 measureUnit: item.measuringUnit, // 计量单位
+                modelKey: filtersItem.modelKey
+                  ? filtersItem.modelKey.split(',')
+                  : '', // 机型
+                colorKey: filtersItem.colorKey
+                  ? filtersItem.colorKey.split(',')
+                  : '', // 颜色
                 measureType: item.measureType, // 计量方式
                 netWeight: item.netWeight > -1 ? item.netWeight : 0, // 净重
                 singleWeight: singleWeight, // 单重重量
@@ -2223,7 +2288,7 @@
         }
       },
       // 入库
-      getReturnStorage() {
+      async getReturnStorage() {
         if (this.productList.length <= 0) {
           this.$message.error('请先添加产品信息');
           return;
@@ -2246,6 +2311,12 @@
             _workOrderId = this.detailProductList[0]?.workOrderId;
             _taskId = this.detailProductList[0]?.taskId;
           }
+          if (packingItem.modelKey) {
+            packingItem.modelKey = packingItem.modelKey.toString();
+          }
+          if (packingItem.colorKey) {
+            packingItem.colorKey = packingItem.colorKey.toString();
+          }
           return {
             ...packingItem,
             workOrderId: _workOrderId,
@@ -2260,6 +2331,12 @@
 
         // 处理产品数据
         this.productList = this.productList.map((productItem) => {
+          if (productItem.modelKey) {
+            productItem.modelKey = productItem.modelKey.toString();
+          }
+          if (productItem.colorKey) {
+            productItem.colorKey = productItem.colorKey.toString();
+          }
           return {
             ...productItem,
             outInDetailRecordRequestList: _packingList.filter(
@@ -2298,8 +2375,51 @@
         // setTimeout(() => {
         //   resolve(obj);
         // }, 1000);
-        console.log(obj, 'obj');
-        return obj;
+
+        // if (productData.length) {
+        //   this.$alert(
+        //     `物料${productData.join(',')}没有维护供应商,${
+        //       productData.length > 1 ? '会合并下发为一个采购订单,' : ''
+        //     }是否继续下发!`,
+        //     {
+        //       confirmButtonText: '确定',
+        //       callback: (action) => {
+        //         if (action == 'confirm') {
+        //           this.issuePurchaseOrderFn();
+        //         }
+        //       }
+        //     }
+        //   );
+        // } else {
+        //   this.issuePurchaseOrderFn();
+        // }
+        const isVerifyData = await storageApi.isVerifyRepeatIsStock({
+          categoryCodes: this.productList.map((item) => item.categoryCode),
+          batchNos: this.productList.map((item) => item.batchNo)
+        });
+
+        return  new Promise((resolve, reject) => {
+          if (isVerifyData?.length) {
+            this.$confirm(
+              `当前批次:${isVerifyData[0].batchNo},物品${isVerifyData
+                .map((item) => item.categoryName)
+                .join(',')}已有入库记录,是否继续入库!`,
+              {
+                confirmButtonText: '是',
+                cancelButtonText: '否'
+              }
+            )
+              .then(() => {
+                resolve(obj);
+              })
+              .catch(() => {
+                resolve(false);
+              });
+          } else {
+            resolve(obj);
+          }
+        });
+
       },
       pickingHandleScroll() {
         if (this.showPackingList.length < this.packingList.length) {
@@ -2627,6 +2747,8 @@
             categoryCode: item.code, // 物品编码
             categoryModel: item.modelType, // 物品型号
             specification: item.specification, // 规格
+            modelKey: item.modelKey ? item.modelKey.split(',') : '', // 机型
+            colorKey: item.colorKey ? item.colorKey.split(',') : '', // 颜色
             brandNum: item.brandNum, // 牌号
             batchNo: batchNo, // 批次号
             supplierListOptions: supplierList[item.id], // 供应商列表
@@ -3456,7 +3578,8 @@
             batchNo: row.batchNo, // 批次号
             packageNo: packingCodeList[index]?.onlyCode, // 包装编码
             packingQuantity: packingQuantity, // 包装数量
-
+            modelKey: row.modelKey, // 机型
+            colorKey: row.colorKey, //颜色
             // packingUnit: row.isUnpack ? packingBoolen ? filterArr[0].conversionUnit : measureBoolen ? row.packingSpecificationOption[1]
             //       ? row.packingSpecificationOption[1].conversionUnit
             //       : row.packingSpecificationOption[0].conversionUnit

+ 1 - 3
vue.config.js

@@ -40,10 +40,8 @@ module.exports = {
         // target: 'http://192.168.1.105:18086',
 
         // target: 'http://192.168.1.251:18186',
-        // target: 'http://192.168.1.144:18086',
-        target: 'http://192.168.1.125:18086',
 
-        // target: 'http://192.168.1.251:18186',
+        target: 'http://192.168.1.251:18086',
 
         changeOrigin: true, // 只有这个值为true的情况下 s才表示开启跨域
         pathRewrite: {