Просмотр исходного кода

fix: 修复发货批次显示问题,冲差部分发货可选问题

liujt 7 месяцев назад
Родитель
Сommit
a8101d4536

+ 1 - 1
src/BIZComponents/inventoryTableDetails.vue

@@ -255,7 +255,7 @@
             columnKey: 'selection',
             columnKey: 'selection',
             align: 'center',
             align: 'center',
             selectable: (row, index) => {
             selectable: (row, index) => {
-              return row.sendTotalCount && row.sendTotalCount > 0;
+              return !row.sendTotalCount;
             }
             }
           },
           },
           {
           {

+ 23 - 13
src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

@@ -1053,9 +1053,9 @@
           warehouseOutStock || 0
           warehouseOutStock || 0
         );
         );
 
 
-        this.$set(this.form.datasource[index], 'batchStockId', '');
+        // this.$set(this.form.datasource[index], 'batchStockId', '');
 
 
-        this.$set(this.form.datasource[index], 'batchNo', '');
+        // this.$set(this.form.datasource[index], 'batchNo', '');
       },
       },
 
 
       //批次号选择
       //批次号选择
@@ -1442,18 +1442,28 @@
               templist?.list || []
               templist?.list || []
             );
             );
             console.log(this.form.datasource[index]);
             console.log(this.form.datasource[index]);
-            if (item.batchStockId) {
-              // this.$set(
-              //   this.form.datasource[index],
-              //   'warehouseNum',
-              //   await getWarehouseOutStock({
-              //     warehouseId: item.warehouseId,
-              //     code: item.productCode
-              //   })
-              // );
-
-              await this.batchNoChange(index, this.form.datasource[index]);
+            if(item.batchNo) {
+              const batchStockId = templist?.list?.find((n) => n.batchNo == item.batchNo)?.id
+              if(batchStockId) {
+                this.$set(
+                  this.form.datasource[index],
+                  'batchStockId',
+                  batchStockId
+                );
+              }
             }
             }
+            // if (item.batchStockId) {
+            //   // this.$set(
+            //   //   this.form.datasource[index],
+            //   //   'warehouseNum',
+            //   //   await getWarehouseOutStock({
+            //   //     warehouseId: item.warehouseId,
+            //   //     code: item.productCode
+            //   //   })
+            //   // );
+
+            //   await this.batchNoChange(index, this.form.datasource[index]);
+            // }
           }
           }
         });
         });
       },
       },