Bladeren bron

销售订单 生产计划 齐套性检查功能优化完善

jingshuyong 10 maanden geleden
bovenliggende
commit
240b51e1bf

+ 11 - 4
src/views/productionPlan/components/homogeneityInspectDialog.vue

@@ -387,7 +387,7 @@
 <script>
   import {
     findMaterialInfoByPlanId,
-    findBomCategoryByCategoryId,
+    findBomCategoryByCategoryId
   } from '@/api/productionPlan/index.js';
   import factoryAdd from './factoryAdd';
   import stockDetailDialog from './stockDetailDialog.vue';
@@ -713,6 +713,9 @@
       },
       // 查询采购价跟外协件两个类型数据
       async dataMerging() {
+        if (!this.formInline.bomId) {
+          return;
+        }
         let params1 = {
           planId: this.planId,
           bomVersionId: this.formInline.bomId,
@@ -842,10 +845,9 @@
         this.bomVChange(this.formInline.bomId);
       },
       async open(dataList, produceType) {
+        this.produceType = produceType;
         this.visible = true;
-
         this.$nextTick(() => {
-          this.produceType = produceType;
           this.$refs.table.reRenderTable();
         });
         // this.$refs.table.reRenderTable();
@@ -870,6 +872,8 @@
           finalState: 0,
           attributeType: 2
         };
+        this.baseCount = '';
+        this.baseUnit = '';
         this.bomListV = [];
         this.bomListType = [];
         this.datasourceList = [];
@@ -880,7 +884,10 @@
         this.loading = true;
         try {
           this.planId = data.id;
-          const res = await findBomCategoryByCategoryId(data.categoryId,this.produceType);
+          const res = await findBomCategoryByCategoryId(
+            data.categoryId,
+            this.produceType
+          );
           this.loading = false;
           if (!res || res.length == 0) {
             this.bomListD = [];

+ 7 - 5
src/views/productionPlan/index.vue

@@ -399,7 +399,7 @@
         factoryObj: {},
         cardSpan: 3,
         columnsVersion: 1,
-        homogeneityDialog: false
+        // homogeneityDialog: false
       };
     },
     computed: {
@@ -827,10 +827,12 @@
           this.$message.warning('请至少选择一条计划!');
           return;
         }
-        this.homogeneityDialog = true;
-        this.$nextTick(() => {
-          this.$refs.homogeneityInspectDialog.open(this.selection, val);
-        });
+        console.log(val,'val')
+        // this.homogeneityDialog = true;
+        this.$refs.homogeneityInspectDialog.open(this.selection, val);
+        // this.$nextTick(() => {
+
+        // });
         // let flag = false;
         // let type = 0;
         // for (let item of this.selection) {

+ 1 - 0
src/views/saleOrder/components/order-search.vue

@@ -767,6 +767,7 @@
       },
       // payBudget() {},
       homogeneityInspect(val) {
+        console.log(val,'val')
         this.$emit('check', val);
       }
     }

+ 4 - 5
src/views/saleOrder/components/orderHomogeneityInspectDialog.vue

@@ -584,11 +584,8 @@
         this.$refs.currentDetailDialog.open({ bomCode: row.code });
       },
       open(dataList, order, source, produceType) {
-        this.$nextTick(() => {
-          this.produceType = produceType;
-          // console.log(this.$refs.table, '11111111111');
-          // this.$refs.treeRef.reRenderTable();
-        });
+        console.log(produceType,'produceType')
+        this.produceType = produceType;
         this.source = source;
         this.visible = true;
         this.cardList = dataList.map((el) => {
@@ -952,6 +949,8 @@
           finalState: 0,
           attributeType: 2
         };
+        this.baseCount = '';
+        this.baseUnit = '';
         this.bomListV = [];
         this.bomListType = [];
         this.datasourceList = [];