lucw 7 месяцев назад
Родитель
Сommit
76bb820ab6

+ 21 - 5
src/views/batchRecord/components/editModal.vue

@@ -1076,7 +1076,8 @@
           { label: '物料统计', value: '2' },
           { label: '工序统计', value: '3' }
         ],
-        rulesDetailList: []
+        rulesDetailList: [],
+        rulesDetail: null
       };
     },
     computed: {
@@ -1340,6 +1341,7 @@
       // 选择记录规则
       chooseReleaseRules(rules) {
         console.log('rules', rules);
+        this.rulesDetail = rules;
         this.form.ruleId = rules?.id;
         this.form.ruleName = rules?.name;
         this.form.recordRulesClassify = rules?.classify + '';
@@ -1387,10 +1389,24 @@
         this.produceTaskList = data.filter(
           (i) => i.taskId != '-2' && i.taskId != '-1'
         );
-        // 赋值工序实例id
-        this.form.produceTaskInstanceId = data.find(
-          (i) => i.sourceTaskId == this.form.produceTaskId
-        )?.taskId;
+        if (this.form.produceTaskId) {
+          // 赋值工序实例id
+          this.form.produceTaskInstanceId = data.find(
+            (i) => i.sourceTaskId == this.form.produceTaskId
+          )?.taskId;
+        }
+
+        if (this.rulesDetail) {
+          const item = this.produceTaskList.find(
+            (i) => i.sourceTaskId == this.rulesDetail.produceTaskId
+          );
+          if (item) {
+            this.form.produceTaskId = item.sourceTaskId;
+            this.form.produceTaskName = item.taskTypeName;
+            this.form.produceTaskInstanceId = item.taskId;
+          }
+        }
+
       },
       // 选择工序
       produceTaskIdChange() {

+ 16 - 1
src/views/batchRecord/components/list.vue

@@ -417,13 +417,28 @@
       openApproval(row) {
         console.log('row', row);
         this.processSubmitDialogFlag = true;
+
+        // 类型
+        let businessType = '';
+        if (this.reportWorkType == 1) {
+          businessType = '产前准备';
+        } else if (this.reportWorkType == 2) {
+          businessType = '过程监测';
+        } else if (this.reportWorkType == 3) {
+          businessType = '产后检查';
+        } else {
+          businessType = '生产统计';
+        }
+
         this.$nextTick(() => {
           let params = {
             businessId: row.id,
             businessKey: 'mes_produce_task_record_rule_check',
             formCreateUserId: row.createUserId,
             variables: {
-              businessCode: row.code
+              businessCode: row.code,
+              businessName: '批记录',
+              businessType: businessType
             }
           };
           this.$refs.processSubmitDialogRef.init(params);

+ 32 - 1
src/views/batchRecord/components/statistics.vue

@@ -659,7 +659,8 @@
                     item.value = record.totalCount;
                   } else if (
                     item.title === '成品入库时间' ||
-                    item.title === '入库时间'
+                    item.title === '入库时间' ||
+                    item.title === '生产日期'
                   ) {
                     item.value = record.executorTime;
                   }
@@ -739,6 +740,36 @@
               paramType: 7
             });
 
+            // 接收
+            if (!isNaN(pick.formedNum)) {
+              const item = data.find(
+                (i) => i.title === '接收量' || i.title === '接收数量'
+              );
+              if (item) {
+                item.value = pick.formedNum;
+              }
+            }
+
+            // 不合格品
+            if (!isNaN(pick.noQualifiedSum)) {
+              const item = data.find(
+                (i) => i.title == '不合格品量' || i.title == '不合格品数量'
+              );
+              if (item) {
+                item.value = pick.noQualifiedSum;
+              }
+            }
+
+            // 合格品量
+            if (!isNaN(pick.qualified)) {
+              const item = data.find(
+                (i) => i.title == '合格品数' || i.title == '合格品数量'
+              );
+              if (item) {
+                item.value = pick.qualified;
+              }
+            }
+
             return data;
           })
         };

+ 1 - 0
src/views/produce/components/prenatalExamination/material.vue

@@ -533,6 +533,7 @@
             ruleId: this.ruleId,
             produceTaskId: this.produceTaskId
           },
+          // ...this.localPickDetails, ...this.preOutputDetails
           []
         );
       },

+ 3 - 4
src/views/produce/components/prenatalExamination/materialModal.vue

@@ -20,7 +20,7 @@
         :datasource="datasource"
         :selection.sync="selection"
         :need-page="false"
-        row-key="index"
+        row-key="categoryCode"
       >
       </ele-pro-table>
     </el-card>
@@ -62,9 +62,7 @@
             selectable: (row, index) => {
               // 已选物料不可再选
               return !this.pickDetails.some(
-                (item) =>
-                  item.categoryCode === row.categoryCode &&
-                  item.produceTaskInstanceId === row.produceTaskInstanceId
+                (item) => item.categoryCode === row.categoryCode
               );
             }
           },
@@ -165,6 +163,7 @@
       },
       open(params = {}, pickDetails = []) {
         this.params = params;
+        this.pickDetails = pickDetails;
         this.visible = true;
       },
       selected() {

+ 2 - 2
vue.config.js

@@ -37,14 +37,14 @@ module.exports = {
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.125:18086',
-        target: 'http://192.168.1.116:18086', // 赵沙金
+        // target: 'http://192.168.1.116:18086', // 赵沙金
         // target: 'http://192.168.1.251:18086', // 开发环境
         // target: 'http://192.168.1.103:18086',192.168.1.116
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.30:18086',
         // target: 'http://192.168.1.211:18086',
         // target: 'http://192.168.1.33:18086',
-        // target: 'http://192.168.1.251:18186', // 测试环境
+        target: 'http://192.168.1.251:18186', // 测试环境
         // target: 'http://192.168.1.251:18087',
         // target: 'http://116.163.22.90:86/api', // 嘉实生产
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域