huang_an пре 2 година
родитељ
комит
62c44a8907

+ 25 - 8
src/views/warehouseManagement/common.js

@@ -1,7 +1,11 @@
 export const tableHeader = (selectEquiType) => {
   switch (+selectEquiType) {
     case 3:
-      return [{ label: '牌号', prop: 'brandNum' }];
+      return [
+        { label: '型号', prop: 'modelType' },
+        { label: '规格', prop: 'specification' },
+        { label: '牌号', prop: 'brandNum' }
+      ];
     case 8:
       return [
         { label: '型号', prop: 'modelType' },
@@ -10,17 +14,21 @@ export const tableHeader = (selectEquiType) => {
       ];
     case 4:
       return [
-        { label: '牌号', prop: 'brandNum' },
-        { label: '型号', prop: 'modelType' }
+        { label: '型号', prop: 'modelType' },
+        { label: '规格', prop: 'specification' },
+        { label: '牌号', prop: 'brandNum' }
       ];
     case 9:
       return [
-        { label: '牌号', prop: 'brandNum' },
-        { label: '型号', prop: 'modelType' }
+        { label: '型号', prop: 'modelType' },
+        { label: '规格', prop: 'specification' },
+        { label: '牌号', prop: 'brandNum' }
       ];
     case 5: //'周转车'
       return [
+        { label: '型号', prop: 'modelType' },
         { label: '规格', prop: 'specification' },
+        { label: '牌号', prop: 'brandNum' },
         {
           label: '材质',
           prop: 'texture',
@@ -44,8 +52,9 @@ export const tableHeader = (selectEquiType) => {
       ];
     case 2: //'舟皿'
       return [
-        { label: '规格', prop: 'specification' },
         { label: '型号', prop: 'modelType' },
+        { label: '规格', prop: 'specification' },
+        { label: '牌号', prop: 'brandNum' },
         {
           label: '长宽高',
           prop: '',
@@ -66,8 +75,9 @@ export const tableHeader = (selectEquiType) => {
       ];
     case 6: //'模具'
       return [
-        { label: '牌号', prop: 'brandNum' },
         { label: '型号', prop: 'modelType' },
+        { label: '规格', prop: 'specification' },
+        { label: '牌号', prop: 'brandNum' },
         {
           label: '收缩系数',
           prop: '',
@@ -80,8 +90,15 @@ export const tableHeader = (selectEquiType) => {
       ];
     case 7: //'备品备件'
       return [
+        { label: '型号', prop: 'modelType' },
         { label: '规格', prop: 'specification' },
-        { label: '型号', prop: 'modelType' }
+        { label: '牌号', prop: 'brandNum' }
+      ];
+    default:
+      return [
+        { label: '型号', prop: 'modelType' },
+        { label: '规格', prop: 'specification' },
+        { label: '牌号', prop: 'brandNum' }
       ];
   }
 

+ 4 - 3
src/views/warehouseManagement/outgoingManagement/add.vue

@@ -883,6 +883,7 @@
             try {
               const res = await outin.saveNew(obj);
               if (res.code == 0) {
+                await await outin.outApprove({ outInId: res.data });
                 this.$message.success('保存成功!');
               }
               this.$router.push('/warehouseManagement/outgoingManagement');
@@ -910,9 +911,9 @@
       },
       eomSuccess(row) {
         console.log(row);
-        this.formData.extInfo.assetType = row.tableData[0].productId;
-        this.$refs.trees.valueTitle = row.tableData[0].productName;
-        this.title = row.tableData[0].productName;
+        this.formData.extInfo.assetType = 9;
+        this.$refs.trees.valueTitle = '产品';
+        this.title = '产品';
         this.formData.sourceBizNo = row.orderNo;
         this.formData.sid = row.id;
         this.formData.clientName = row.contactName;

+ 3 - 0
src/views/warehouseManagement/outgoingManagement/components/eom.vue

@@ -167,6 +167,7 @@
                     };
                   })
                 };
+                console.log('====', obj);
                 this.$emit('success', obj);
                 this.dialogVisible = false;
               });
@@ -200,6 +201,7 @@
             };
           })
         };
+        console.log('===qq', this.current);
         this.$emit('success', this.current);
         this.dialogVisible = false;
       },
@@ -210,6 +212,7 @@
         const data = saleordersendrecordPage({
           pageNum: page,
           size: limit,
+          reviewStatus: 2,
           ...where
         });
         this.dataSource = data;

+ 49 - 58
src/views/warehouseManagement/stockManagement/add.vue

@@ -1914,41 +1914,8 @@
               return this.$message.error('请保存入库明细!');
             }
 
-            const params = {
-              outInWarehouse: { ...this.formData, type: 1 },
-              warehouseLedgerInfos: this.warehousingMaterialList
-            };
-
-            for (let key in this.warehousingMaterialList) {
-              for (let k in this.warehousingMaterialList[key].houseList) {
-                this.warehousingMaterialList[key].warehouseName =
-                  this.warehousingMaterialList[key].houseList[k].warehouseName;
-
-                this.warehousingMaterialList[key].areaName =
-                  this.warehousingMaterialList[key].houseList[k].areaName;
-
-                this.warehousingMaterialList[key].shelfCode =
-                  this.warehousingMaterialList[key].houseList[k].shelfCode;
-
-                this.warehousingMaterialList[key].cargoSpaceCode =
-                  this.warehousingMaterialList[key].houseList[k].cargoSpaceCode;
-
-                this.warehousingMaterialList[key].warehouseId =
-                  this.warehousingMaterialList[key].houseList[k].warehouseId;
+            this.formatWarehouseMaterialList();
 
-                this.warehousingMaterialList[key].areaId =
-                  this.warehousingMaterialList[key].houseList[k].areaId;
-
-                this.warehousingMaterialList[key].shelfId =
-                  this.warehousingMaterialList[key].houseList[k].shelfId;
-
-                this.warehousingMaterialList[key].cargoSpaceId =
-                  this.warehousingMaterialList[key].houseList[k].cargoSpaceId;
-                this.warehousingMaterialList[key].num =
-                  this.warehousingMaterialList[key].houseList[k].num;
-              }
-            }
-            console.log('1122', this.warehousingMaterialList);
             let arr = this.warehousingMaterialList.map((item) => {
               return {
                 netWeight: item.netWeight,
@@ -1966,7 +1933,6 @@
                 price: item.univalence,
                 outInDetailRecordAddPOList: item.warehouseLedgerDetails,
                 position: `${item.warehouseName}-${item.areaName}-${item.shelfCode}-${item.cargoSpaceCode}`,
-                // pathIds: item.categoryLevelPathId.toString(),
                 remark: '',
                 pathIds: `${item.warehouseId},${item.areaId},${item.shelfId},${item.cargoSpaceId}`,
                 pathName: `${item.warehouseName},${item.areaName},${item.shelfCode},${item.cargoSpaceCode}`,
@@ -1978,29 +1944,11 @@
                 weight: item.weight
               };
             });
+
             arr.forEach((item) => {
               if (item.outInDetailRecordAddPOList.length > 0) {
                 let list = item.outInDetailRecordAddPOList.map((it) => {
-                  return {
-                    code: it.onlyCode,
-                    dateType: this.curDateType === 'manufactureTime' ? 2 : 1,
-                    dateValue: it[this.curDateType],
-                    minUnit: it.minPackingCount,
-                    minPositionId: it.cargoSpaceId,
-                    name: it.assetName,
-                    pathIds: item.pathIds,
-                    unit: it.unit,
-                    packageNo: it.num,
-                    clientCode: it.clientCode,
-                    materielCode: it.materielCode,
-                    weight: it.weight,
-                    weightUtil: it.weightUtil,
-                    engrave: it.engrave,
-                    materialDetails: this.materialDetails(it.onlyCode),
-                    packingCount: it.packingCount,
-                    status: it.status,
-                    result: it.result
-                  };
+                  return this.formatOutInDetailRecordAddPO(it, item);
                 });
                 item.outInDetailRecordAddPOList = list;
               }
@@ -2009,20 +1957,63 @@
             let obj = { ...this.formData, type: 1 };
             obj.outInDetailAddPOList = arr;
 
-            console.log('====>>', obj);
-
             this.saveLoading = true;
             try {
               const res = await outin.save(obj);
               if (res.code == 0) {
+                await outin.outApproves({ outInId: res.data });
                 this.$message.success('保存成功!');
               }
-            } catch (error) {}
+            } catch (error) {
+              console.error('保存失败:', error);
+            }
             this.saveLoading = false;
             this.$router.push('/warehouseManagement/stockManagement');
           }
         });
       },
+
+      formatWarehouseMaterialList() {
+        for (let key in this.warehousingMaterialList) {
+          for (let k in this.warehousingMaterialList[key].houseList) {
+            let house = this.warehousingMaterialList[key].houseList[k];
+            this.warehousingMaterialList[key].warehouseName =
+              house.warehouseName;
+            this.warehousingMaterialList[key].areaName = house.areaName;
+            this.warehousingMaterialList[key].shelfCode = house.shelfCode;
+            this.warehousingMaterialList[key].cargoSpaceCode =
+              house.cargoSpaceCode;
+            this.warehousingMaterialList[key].warehouseId = house.warehouseId;
+            this.warehousingMaterialList[key].areaId = house.areaId;
+            this.warehousingMaterialList[key].shelfId = house.shelfId;
+            this.warehousingMaterialList[key].cargoSpaceId = house.cargoSpaceId;
+            this.warehousingMaterialList[key].num = house.num;
+          }
+        }
+      },
+
+      formatOutInDetailRecordAddPO(it, item) {
+        return {
+          code: it.onlyCode,
+          dateType: this.curDateType === 'manufactureTime' ? 2 : 1,
+          dateValue: it[this.curDateType],
+          minUnit: it.minPackingCount,
+          minPositionId: it.cargoSpaceId,
+          name: it.assetName,
+          pathIds: item.pathIds,
+          unit: it.unit,
+          packageNo: it.num,
+          clientCode: it.clientCode,
+          materielCode: it.materielCode,
+          weight: it.weight,
+          weightUtil: it.weightUtil,
+          engrave: it.engrave,
+          materialDetails: this.materialDetails(it.onlyCode),
+          packingCount: it.packingCount,
+          status: it.status,
+          result: it.result
+        };
+      },
       materialDetails(onlyCode) {
         return this.resultArray.filter((item) => item.onlyCode === onlyCode);
       },

+ 1 - 0
src/views/warehouseManagement/stockManagement/components/picker.vue

@@ -209,6 +209,7 @@
         const data = purchaseorderreceive({
           pageNum: page,
           size: limit,
+          reviewStatus: 2,
           ...where
         });
         this.dataSource = data;