Ver Fonte

修改bug

695593266@qq.com há 3 meses atrás
pai
commit
f27f7e1ce7

+ 14 - 0
src/api/productionPlan/index.js

@@ -450,3 +450,17 @@ export async function findAssistMaterialInfoByPlanId(params) {
   }
   return Promise.reject(new Error(res.data.message));
 }
+
+// 根据计划id查询制造资源
+export async function findFrockMaterialInfoByPlanId(params) {
+  const res = await request.get(
+    '/aps/productionplan/findFrockMaterialInfoByPlanId',
+    {
+      params
+    }
+  );
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}

+ 10 - 1
src/views/materialPlan/components/pickDetail.vue

@@ -207,6 +207,7 @@
     borrowOrderInfo,
     blankingOrderInfo,
     getOutOrderList,
+    returnOrderInfo,
     saveReturnOrder
   } from '@/api/requirementListPlan';
 
@@ -609,12 +610,20 @@
       },
 
       async loadDetailData(id) {
+        // const URL =
+        //   this.type == 1
+        //     ? pickingOrderInfo
+        //     : this.type == 2
+        //     ? borrowOrderInfo
+        //     : blankingOrderInfo;
         const URL =
           this.type == 1
             ? pickingOrderInfo
             : this.type == 2
+            ? blankingOrderInfo
+            : this.type == 3
             ? borrowOrderInfo
-            : blankingOrderInfo;
+            : returnOrderInfo;
         this.form = (await URL(id)) || {};
       },
 

+ 13 - 5
src/views/productionPlan/components/auxiliaryMaterial.vue

@@ -333,7 +333,8 @@
     bomVersionList,
     listBomType,
     getProductKitting,
-    updatePreRelease
+    updatePreRelease,
+    findFrockMaterialInfoByPlanId
   } from '@/api/productionPlan/index.js';
   import factoryAdd from './factoryAdd';
   import stockDetailDialog from './stockDetailDialog.vue';
@@ -490,7 +491,8 @@
           }
         },
         startTime: [],
-        preData: null
+        preData: null,
+        type: ''
       };
     },
     watch: {
@@ -786,17 +788,23 @@
       success() {
         this.bomVChange(this.formInline.bomId);
       },
-      async open(itemData, preData) {
+      async open(itemData, preData, type) {
         this.visible = true;
         this.planInfo = itemData;
         this.preData = preData;
+        this.type = type;
 
         await this.getFindAssistMaterialInfoByPlanId(itemData);
         await this.getBomData(itemData);
       },
 
       async getFindAssistMaterialInfoByPlanId(itemData) {
-        const res = await findAssistMaterialInfoByPlanId({
+        const URL =
+          itemData.preType == 2
+            ? findAssistMaterialInfoByPlanId
+            : findFrockMaterialInfoByPlanId;
+
+        const res = await URL({
           planId: itemData.productionPlanId
             ? itemData.productionPlanId
             : itemData.id,
@@ -1006,7 +1014,7 @@
 
       updatePreRelease(item) {
         updatePreRelease(item);
-        this.$emit('success');
+        this.$emit('success', this.type);
         this.visible = false;
       }
       // async merge() {

+ 10 - 7
src/views/productionPlan/components/checkProductionPreparations.vue

@@ -526,10 +526,10 @@
         // if (item.preRelease.length) {
         //   this.preReleaseList = item.preRelease;
         // } else {
-          if (item.id && this.type == 'plan') {
-            this.completenessCheck(item.id);
-          } else if (this.type == 'order') {
-            this.completenessCheck(item.productionPlanId, item.id);
+        if (item.id && this.type == 'plan') {
+          this.completenessCheck(item.id);
+        } else if (this.type == 'order') {
+          this.completenessCheck(item.productionPlanId, item.id);
           // }
         }
       },
@@ -620,7 +620,10 @@
           this.$refs.kittingCompleteRef.open(list);
         } else if (item.preType == '2') {
           const data = this.preReleaseList.find((it) => it.preType == 2);
-          this.$refs.auxiliaryMaterialRef.open(this.itemData, data);
+          this.$refs.auxiliaryMaterialRef.open(this.itemData, data, 2);
+        } else if (item.preType == '3') {
+          const data = this.preReleaseList.find((it) => it.preType == 3);
+          this.$refs.auxiliaryMaterialRef.open(this.itemData, data, 3);
         }
       },
 
@@ -716,8 +719,8 @@
         });
       },
 
-      updateStatus() {
-        const index = this.preReleaseList.findIndex((it) => it.preType == 2);
+      updateStatus(type) {
+        const index = this.preReleaseList.findIndex((it) => it.preType == type);
 
         this.$set(this.preReleaseList[index], 'statusStr', '齐套');
       },

+ 2 - 2
vue.config.js

@@ -35,14 +35,14 @@ module.exports = {
         // target: 'http://192.168.1.103:18086',
         // target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.158:18086',
-        // target: 'http://192.168.1.251:18086',
+        target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.211:18086',
         // target: 'http://192.168.1.251:18186',
         // target: 'http://192.168.1.102:18086',
         // target: 'http://aiot.zoomwin.com.cn:51001/api',
-        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.125:18086',
 
         // target: 'http://192.168.1.116:18086',