Explorar el Código

修复入库bug

695593266@qq.com hace 9 meses
padre
commit
c9be396637

+ 19 - 2
src/views/bpm/handleTask/components/productionWarehousing/detailDialog.vue

@@ -68,7 +68,7 @@
       <add
       <add
         ref="add"
         ref="add"
         :form="form"
         :form="form"
-        :bizType="1"
+        :bizType="taskDefinitionKey == 'wmsBizType4' ? 4 : 1"
         v-if="form.code"
         v-if="form.code"
         :sourceBizNo="form.code"
         :sourceBizNo="form.code"
         :detailList="form.detailList"
         :detailList="form.detailList"
@@ -146,6 +146,7 @@
         console.log('data-----------', data);
         console.log('data-----------', data);
         this.loading = false;
         this.loading = false;
         if (data) {
         if (data) {
+          this.form = data;
           let categoryLevelTopIds = data.detailList.map(
           let categoryLevelTopIds = data.detailList.map(
             (item) => item.rootCategoryLevelId
             (item) => item.rootCategoryLevelId
           );
           );
@@ -153,7 +154,23 @@
             new Set(categoryLevelTopIds)
             new Set(categoryLevelTopIds)
           );
           );
           data.categoryLevelTopId = filterCategoryLevelTopIds.join(',');
           data.categoryLevelTopId = filterCategoryLevelTopIds.join(',');
-          this.form = data;
+
+          if (this.taskDefinitionKey == 'wmsBizType4') {
+            this.form.totalCount = data.detailList.reduce(
+              (sum, item) => sum + (item.quantity || 0),
+              0
+            );
+
+            this.$set(
+              this.form,
+              'totalCount',
+              data.detailList.reduce(
+                (sum, item) => sum + (item.quantity || 0),
+                0
+              )
+            );
+          }
+
           this.totalPackage =
           this.totalPackage =
             this.form.detailList.length + this.form?.detailList[0]?.packingUnit;
             this.form.detailList.length + this.form?.detailList[0]?.packingUnit;
           this.totalCount =
           this.totalCount =

+ 15 - 5
src/views/bpm/stockManagement/storage.vue

@@ -1058,7 +1058,7 @@
               <span>{{ qualityStatus[row.status] }}</span>
               <span>{{ qualityStatus[row.status] }}</span>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
-         
+
         </el-table> -->
         </el-table> -->
       </div>
       </div>
     </el-card>
     </el-card>
@@ -1624,6 +1624,10 @@
               warehouseIds.push(this.form.warehouseId);
               warehouseIds.push(this.form.warehouseId);
               warehouseNames.push(this.form.warehouseName);
               warehouseNames.push(this.form.warehouseName);
             }
             }
+            if (this.bizType == 4) {
+              warehouseIds.push(this.form.warehouseId);
+              warehouseNames.push(this.form.warehouseName);
+            }
             if (this.isMoreProduct) {
             if (this.isMoreProduct) {
               this.formData.extInfo.assetType = [];
               this.formData.extInfo.assetType = [];
               res.map((item) => {
               res.map((item) => {
@@ -1734,7 +1738,10 @@
                 categoryModel: item.modelType, // 物品型号
                 categoryModel: item.modelType, // 物品型号
                 specification: item.specification, // 规格
                 specification: item.specification, // 规格
                 brandNum: item.brandNum, // 牌号
                 brandNum: item.brandNum, // 牌号
-                batchNo: this.bizType == 1 ? this.detailList[0]?.batchNo || batchNo : batchNo, // 批次号
+                batchNo:
+                  this.bizType == 1
+                    ? this.detailList[0]?.batchNo || batchNo
+                    : batchNo, // 批次号
                 supplierListOptions: supplierList[item.id], // 供应商列表
                 supplierListOptions: supplierList[item.id], // 供应商列表
                 supplierId: '', // 供应商id
                 supplierId: '', // 供应商id
                 supplierCode: item.supplierCode,
                 supplierCode: item.supplierCode,
@@ -3588,10 +3595,13 @@
             (packingItem) => packingItem.packageNo == onlyCode
             (packingItem) => packingItem.packageNo == onlyCode
           );
           );
           this.$set(this.packingList[index], 'measureQuantity', remainder);
           this.$set(this.packingList[index], 'measureQuantity', remainder);
-          if(row.singleWeight){
-                this.$set(this.packingList[index], 'weight', row.singleWeight*remainder);
+          if (row.singleWeight) {
+            this.$set(
+              this.packingList[index],
+              'weight',
+              row.singleWeight * remainder
+            );
           }
           }
-        
         }
         }
 
 
         // 单独点击保存并插入对应位置(物料)
         // 单独点击保存并插入对应位置(物料)

+ 2 - 1
vue.config.js

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