Jelajahi Sumber

禅道bug 2635 2633 修复:工厂选择器禁用状态及BOM编码字段调整

yusheng 9 bulan lalu
induk
melakukan
697d6fc233

+ 24 - 4
src/views/productionPlan/components/factoryAdd/index.vue

@@ -332,6 +332,7 @@
                 v-model="row.factoriesId"
                 :key="row.factoriesId"
                 @change="(e) => selectFactory(e, row)"
+                :disabled="factoriesId"
               >
                 <el-option
                   v-for="item of factoryList"
@@ -497,6 +498,7 @@
       //   }
       // }
     },
+
     computed: {
       // 是否必填 字段 ( 首先看计划类型 如果是返工返修)
       // 就不是必填 否则就看配置参数
@@ -534,9 +536,9 @@
         }
         return this.processingRequired == 0;
       },
-      clientEnvironmentId() {
-        return this.$store.state.user.info.clientEnvironmentId;
-      },
+      // clientEnvironmentId() {
+      //   return this.$store.state.user.info.clientEnvironmentId;
+      // },
       columns() {
         return [
           {
@@ -729,6 +731,8 @@
     data() {
       return {
         visible: false,
+        factoriesId: '',
+        clientEnvironmentId: '',
         title: '新增临时生产计划',
         type: 3,
         weightList: [
@@ -887,6 +891,9 @@
       },
       async open(val) {
         await this.getFactoryList();
+        this.clientEnvironmentId =
+          this.$store.state.user.info.clientEnvironmentId;
+        this.factoriesId = this.$store.state.user.info.factoryId;
 
         if (val) {
           if (val.planType == null || val.planType == 'null') {
@@ -945,6 +952,15 @@
               if (listMap[3]) {
                 list.push({ code: 3, name: 'ABOM' });
               }
+
+              if (!this.form.productInfoList[0].factoriesId) {
+                this.form.productInfoList[0].factoriesId = this.factoriesId;
+                this.form.productInfoList[0].factoriesName =
+                  this.factoryList?.find(
+                    (factoryData) => factoryData.id === this.factoriesId
+                  )?.name;
+              }
+
               this.form.productInfoList[0].producedList = list;
             }
           }
@@ -1012,7 +1028,11 @@
                 measuringUnit: item.measuringUnit,
                 produceRoutingId: item.produceRoutingId,
                 produceRoutingName: item.produceRoutingName,
-                produceVersionName: item.produceVersionName
+                produceVersionName: item.produceVersionName,
+                factoriesId: this.factoriesId,
+                factoriesName: this.factoryList?.find(
+                  (factoryData) => factoryData.id === this.factoriesId
+                )?.name
               };
             }
           })

+ 1 - 1
src/views/productionPlan/components/unpackDialog.vue

@@ -354,7 +354,7 @@
           joinPlanCode: this.formData.code,
           batchNo: batchNo,
           requiredFormingNum: '',
-          reqMoldTime: ''
+          reqMoldTime: this.formData.reqMoldTime
         });
         this.custom_code = this.custom_code + 1;
       },

+ 2 - 2
src/views/saleOrder/components/orderHomogeneityInspectDialog.vue

@@ -412,8 +412,8 @@
             showOverflowTooltip: true
           },
           {
-            prop: 'productCode',
-            label: '编码',
+            prop: 'bomCode',
+            label: 'BOM编码',
             align: 'center',
             minWidth: 100,
             showOverflowTooltip: true