Browse Source

fix:5751【采购订单-退货单】采购退货到了采购审批的时候,出库物品清单数据带不出来,没法审批

mlchen 3 days ago
parent
commit
ee1ca6e757
1 changed files with 7 additions and 7 deletions
  1. 7 7
      src/views/bpm/outgoingManagement/components/AssetsDialog.vue

+ 7 - 7
src/views/bpm/outgoingManagement/components/AssetsDialog.vue

@@ -533,8 +533,8 @@
         return String(product.productId) === String(row.categoryId)
           && String(product.receiveProductId) === String(row.sourceReceiveProductId)
           && String(product.warehouseId) === String(row.warehouseId)
-          && String(product.batchNo || '') === String(row.batchNo || '')
-          && String(product.systemBatchNo || '') === String(row.systemBatchNo || '');
+          && (!product.batchNo || String(product.batchNo) === String(row.batchNo || ''))
+          && (!product.systemBatchNo || String(product.systemBatchNo) === String(row.systemBatchNo || ''));
       },
       formatMeasureQuantity(row) {
         return this.dimension == 2
@@ -634,11 +634,11 @@
           if (this.bizType === 10 && receiveProductIds.length !== legacyProducts.length) {
             this.tableData = [];
             this.total = 0;
-            this.$message.error('退货产品缺少采购收货明细,无法查询不良库存');
+            this.$message.error('退货产品缺少采购收货明细,无法查询库存');
             return;
           }
           const params = this.bizType === 10
-            ? { ...this.searchForm, sourceReceiveProductIds: receiveProductIds.join(','), result: 2 }
+            ? { ...this.searchForm, sourceReceiveProductIds: receiveProductIds.join(',') }
             : this.searchForm;
           const data = await storageApi.getBatchList(params);
           for (let i = 0; i < data.list.length; i++) {
@@ -667,7 +667,7 @@
                 ...(packageSources.length ? {
                   packageNos: [...new Set(packageSources.map((source) => source.packageNo))].join(',')
                 } : {}),
-                result: 2 }
+                ...(packageSources.length ? { result: 2 } : {}) }
             : this.searchForm;
           const data = await storageApi.getPackingList(params);
           const rows = this.bizType === 10
@@ -805,7 +805,7 @@
           data = await storageApi.getHierarchyList({
             ids: this.selectionList.map((item) => item.id).join(','),
             type: this.dimension,
-            result: this.bizType === 10 ? 2 : null
+            result: this.bizType === 10 && this.returnPackages().length ? 2 : null
           });
           if (this.bizType === 10) {
             data.forEach((detail) => {
@@ -830,7 +830,7 @@
           const returnProducts = this.returnProductList;
           data = await storageApi.getHierarchyFifo({
             type: this.dimension,
-            result: this.bizType === 10 ? 2 : null,
+            result: null,
             ids: this.selectionList.map((item) => item.id),
             builders: this.selectionList.map((item) => {
               return {