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

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

@@ -802,6 +802,9 @@
         this.form.ruleId = null;
         this.form.ruleId = null;
         this.form.ruleName = '';
         this.form.ruleName = '';
         this.form.details = [];
         this.form.details = [];
+        this.$nextTick(() => {
+          this.$refs.formRef.clearValidate()
+        });
       },
       },
       // 去选择设备
       // 去选择设备
       selectDeviceId() {
       selectDeviceId() {
@@ -885,12 +888,12 @@
           this.form.batchNo = '';
           this.form.batchNo = '';
           this.form.specification = null;
           this.form.specification = null;
           this.form.formingNum = null;
           this.form.formingNum = null;
-          this.form.produceTaskId = null;
-          this.form.produceTaskName = '';
           this.form.brandNo = '';
           this.form.brandNo = '';
 
 
           this.produceTaskList = [];
           this.produceTaskList = [];
         }
         }
+        this.form.produceTaskId = null;
+        this.form.produceTaskName = '';
       },
       },
       // 获取工序列表
       // 获取工序列表
       async getProductTaskList(id) {
       async getProductTaskList(id) {

+ 9 - 4
src/views/checklistManagement/components/checkDetails.vue

@@ -106,7 +106,7 @@
         <template v-slot:isPass="{ row }">
         <template v-slot:isPass="{ row }">
           <el-radio-group v-model="row.isPass">
           <el-radio-group v-model="row.isPass">
             <el-radio :label="1">是</el-radio>
             <el-radio :label="1">是</el-radio>
-            <el-radio :label="2">否</el-radio>
+            <el-radio :label="0">否</el-radio>
           </el-radio-group>
           </el-radio-group>
         </template>
         </template>
         <template v-slot:remark="{ row }">
         <template v-slot:remark="{ row }">
@@ -170,7 +170,7 @@
         <template v-slot:isPass="{ row }">
         <template v-slot:isPass="{ row }">
           <el-radio-group v-model="row.isPass">
           <el-radio-group v-model="row.isPass">
             <el-radio :label="1">是</el-radio>
             <el-radio :label="1">是</el-radio>
-            <el-radio :label="2">否</el-radio>
+            <el-radio :label="0">否</el-radio>
           </el-radio-group>
           </el-radio-group>
         </template>
         </template>
         <template v-slot:remark="{ row }">
         <template v-slot:remark="{ row }">
@@ -722,11 +722,16 @@
           console.log('规则齐套检查', data);
           console.log('规则齐套检查', data);
 
 
           // 把检查结果赋值给对应的明细
           // 把检查结果赋值给对应的明细
-          this.form.details.forEach((item) => {
+          this.form.details = this.form.details.map((item) => {
             const checkItem = data.find((d) => d.id === item.id);
             const checkItem = data.find((d) => d.id === item.id);
+            console.log('checkItem 存在', checkItem);
             if (checkItem && item.isAutoCheck) {
             if (checkItem && item.isAutoCheck) {
-              item.isPass = checkItem.isPass;
+              return {
+                ...item,
+                isPass: checkItem.isPass
+              };
             }
             }
+            return item;
           });
           });
 
 
           console.log('规则齐套检查', this.form.details);
           console.log('规则齐套检查', this.form.details);

+ 1 - 1
src/views/checklistManagement/components/templateAdd.vue

@@ -251,7 +251,7 @@
         type="primary"
         type="primary"
         @click="submit('edit')"
         @click="submit('edit')"
         :loading="buttonLoading"
         :loading="buttonLoading"
-        >编 辑</el-button
+        >保 存</el-button
       >
       >
 
 
       <el-button
       <el-button

+ 7 - 10
src/views/produce/components/prenatalExamination/materialModal.vue

@@ -158,8 +158,7 @@
         // 表格选中数据
         // 表格选中数据
         selection: [],
         selection: [],
         taskPlanList: [],
         taskPlanList: [],
-        workOrderId: '',
-        ruleId: '',
+        params: {},
         // 已选物料
         // 已选物料
         pickDetails: []
         pickDetails: []
       };
       };
@@ -189,8 +188,7 @@
       async datasource({ page, limit, where }) {
       async datasource({ page, limit, where }) {
         const res = await queryPickAndFeedByWorkOrderId({
         const res = await queryPickAndFeedByWorkOrderId({
           ...where,
           ...where,
-          workOrderId: this.workOrderId,
-          ruleId: this.ruleId
+          ...this.params
           // pageNum: page,
           // pageNum: page,
           // size: limit
           // size: limit
         });
         });
@@ -205,13 +203,12 @@
         this.selection = [];
         this.selection = [];
         this.visible = false;
         this.visible = false;
       },
       },
-      open(workOrderId, ruleId, pickDetails = []) {
-        this.workOrderId = workOrderId;
-        this.pickDetails = pickDetails;
-        this.ruleId = ruleId;
+      open(params = {}, pickDetails = []) {
+        this.params = params;
         this.$nextTick(() => {
         this.$nextTick(() => {
-          // this.reload({ workOrderId });
-          this.queryAllProduceTaskList(workOrderId);
+          if (this.params.workOrderId) {
+            this.queryAllProduceTaskList(this.params.workOrderId);
+          }
         });
         });
         this.visible = true;
         this.visible = true;
       },
       },

+ 7 - 2
src/views/produce/components/prenatalExamination/releaseRulesDialog.vue

@@ -1220,8 +1220,13 @@
       // 选择物料
       // 选择物料
       openMaterialModal() {
       openMaterialModal() {
         this.$refs.materialModalRef.open(
         this.$refs.materialModalRef.open(
-          this.addForm.workOrderId,
-          this.addForm.ruleId,
+          {
+            workOrderId: this.addForm.workOrderId,
+            ruleId: this.addForm.ruleId,
+            produceTaskInstanceId:
+              this.workOrderInfo.taskId ||
+              this.workOrderInfo.produceTaskInstanceId
+          },
           []
           []
         );
         );
       },
       },