소스 검색

refactor: 优化工单报表组件结构及验证逻辑

yusheng 1 개월 전
부모
커밋
229b785cea
1개의 변경된 파일22개의 추가작업 그리고 18개의 파일을 삭제
  1. 22 18
      src/views/recordComponents/workOrderReport.vue

+ 22 - 18
src/views/recordComponents/workOrderReport.vue

@@ -254,7 +254,7 @@
             </el-radio-group>
             </el-radio-group>
           </div>
           </div>
         </template>
         </template>
-        <template v-slot:errorMsg="{ row }">
+        <!-- <template v-slot:errorMsg="{ row }">
           <div>
           <div>
             <el-input
             <el-input
               type="text"
               type="text"
@@ -267,16 +267,16 @@
               </template>
               </template>
             </el-input>
             </el-input>
           </div></template
           </div></template
-        >
+        > -->
         <template v-slot:num="{ row }">
         <template v-slot:num="{ row }">
           <div>
           <div>
-            <el-input type="number" placeholder="请输入" v-model="row.num">
+            <el-input type="text" placeholder="请输入" v-model="row.num">
               <template v-if="row.unitName" slot="append">
               <template v-if="row.unitName" slot="append">
                 <div>{{ row.unitName }}</div>
                 <div>{{ row.unitName }}</div>
               </template>
               </template>
             </el-input>
             </el-input>
-          </div></template
-        >
+          </div>
+        </template>
         <template v-slot:checkResult="{ row }">
         <template v-slot:checkResult="{ row }">
           <div>
           <div>
             <el-radio-group v-model="row.checkResult">
             <el-radio-group v-model="row.checkResult">
@@ -521,11 +521,15 @@
             slot: 'paramValue'
             slot: 'paramValue'
           },
           },
           {
           {
-            label: '数量',
+            label: '设备名称',
+            prop: 'substanceName',
+            minWidth: 120
+          },
+          {
+            label: this.pageName == 'qualityTestRecords' ? '描述' : '数量',
             prop: 'num',
             prop: 'num',
             minWidth: 120,
             minWidth: 120,
-            slot: 'num',
-            isNone: this.pageName == 'qualityTestRecords'
+            slot: 'num'
           },
           },
           {
           {
             label: '检查人',
             label: '检查人',
@@ -534,13 +538,13 @@
             slot: 'checkUsersIds',
             slot: 'checkUsersIds',
             isNone: this.pageName != 'qualityTestRecords'
             isNone: this.pageName != 'qualityTestRecords'
           },
           },
-          {
-            label: '描述',
-            prop: 'errorMsg',
-            minWidth: 120,
-            slot: 'errorMsg',
-            isNone: this.pageName != 'qualityTestRecords'
-          },
+          // {
+          //   label: '描述',
+          //   prop: 'errorMsg',
+          //   minWidth: 120,
+          //   slot: 'errorMsg',
+          //   isNone: this.pageName != 'qualityTestRecords'
+          // },
           {
           {
             label: '检查情况',
             label: '检查情况',
             prop: 'checkStatus',
             prop: 'checkStatus',
@@ -710,7 +714,7 @@
             if (this.pageName != 'productionRecords') {
             if (this.pageName != 'productionRecords') {
               // 验证检查项目
               // 验证检查项目
               const detailRequired = this.addForm.detailList.some((i) => {
               const detailRequired = this.addForm.detailList.some((i) => {
-                return i.checkResult == null || !i.checkStatus;
+                return i.checkResult == null || i.checkStatus == null;
               });
               });
 
 
               if (detailRequired) {
               if (detailRequired) {
@@ -721,7 +725,7 @@
             }
             }
 
 
             const body = JSON.parse(JSON.stringify(this.addForm));
             const body = JSON.parse(JSON.stringify(this.addForm));
-            console.log(body)
+            console.log(body);
             // return
             // return
 
 
             this.butLoading = true;
             this.butLoading = true;
@@ -824,7 +828,7 @@
         } else {
         } else {
           this.addForm.executeUsersIds = [];
           this.addForm.executeUsersIds = [];
         }
         }
-        this.changeId()
+        this.changeId();
       },
       },
 
 
       // 批量检查
       // 批量检查