Przeglądaj źródła

入库管理列表+入库状态;入库申请优化

yijing 1 rok temu
rodzic
commit
abaaffbcd6

+ 17 - 5
src/views/warehouseManagement/stockManagement/add.vue

@@ -947,9 +947,11 @@ export default {
 
           // let r= {
           // ...productItem,
+          console.log(productItem, 'productItem')
           productItem.weight = productItem.weight ? Number(productItem.weight) : 0;
-
           // productItem.singleWeight = 0;
+          productItem.measureUnit = productItem.measuringUnit; // 计量单位
+
           productItem.index = this.productList.length + productIndex;
           productItem.isSave =
             productItem.outInDetailRecordRequestList?.length > 0
@@ -958,6 +960,8 @@ export default {
           productItem.netWeight =
             productItem.netWeight > 0 ? productItem.netWeight : 0;
           productItem.materielCode = productItem.materielCode;
+          productItem.categoryModel = productItem.modelType; // 物品型号
+          productItem.specification = productItem.specification; // 规格
           productItem.batchNo = batchNo; // 批次号
           productItem.warehouseIds = [productItem.warehouseId]; // 仓库Id
           productItem.warehouseNames = [productItem.warehouseName]; // 仓库名称
@@ -2252,7 +2256,7 @@ export default {
     // 生成包装
     generateWrappers(row, productIndex, packingCodeList) {
       console.log(packingCodeList, 'packingCodeListROW', row.measureType)
-      //计量类型是数量
+      //计量类型是数量
       if (row.measureType != 1) {
         // 计量单位=包装单位,则不生成包装层数据
         if (row.measureUnit == row.packingUnit) {
@@ -2611,7 +2615,6 @@ export default {
             }
           }
           packingList.push(item);
-
         }
       }
 
@@ -2625,6 +2628,15 @@ export default {
         );
         this.packingList.splice(packingIndex + 1, 0, ...packingList);
       }
+
+      const lastIndex = this.packingList.length - 1
+
+      let remainder = row.measureQuantity % row.packingSpecificationOption[1]?.packageCell
+      console.log(remainder, 'remainder')
+      if (remainder > 0) {
+        this.$set(this.packingList[lastIndex], 'measureQuantity', remainder)
+      }
+
     },
     //入库明细删除
     listDel(row, index) {
@@ -2720,7 +2732,7 @@ export default {
                   row.categoryLevelPathIdParent
                 );
               } else {
-                if (row.measureUnit == row.packingUnit) {
+                if (row.measureType != 1 && row.measureUnit == row.packingUnit) {
                   let pNum = 0;
                   let mNum = row.measureQuantity
                   this.$refs.wareHouseDailogRef.open(
@@ -2763,7 +2775,7 @@ export default {
 
         for (let i = 0; i < row.length; i++) {
           //测量单位等于包装单位
-          if (row[i].measureUnit === row[i].packingUnit) {
+          if (row[i].measureType != 1 && row[i].measureUnit === row[i].packingUnit) {
             row[i].packingQuantity2 = 0;
             console.log(row[i].packingQuantity2)
           } else {

+ 10 - 0
src/views/warehouseManagement/stockManagement/index.vue

@@ -385,6 +385,16 @@
             align: 'center',
             showOverflowTooltip: true
           },
+          {
+            prop: 'outInStatus',
+            label: '入库状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            width: 100,
+            formatter: (row, column, cellValue) => {
+              return row.outInStatus == 1 ? '预入库' :row.outInStatus == 2 ? '部分入库' :row.outInStatus == 3 ? '已出库' :'';
+            }
+          },
           {
             prop: 'verifyStatus',
             label: '状态',