yusheng 6 luni în urmă
părinte
comite
e8130081c8

+ 11 - 8
src/views/inspectionProjectRequest/index.vue

@@ -73,7 +73,7 @@
               pageName == 'inspectionProjectEntrusted' &&
               row.status == 1
             "
-            @click="report(row,'edit')"
+            @click="report(row, 'edit')"
             >报工</el-link
           >
           <el-link
@@ -367,7 +367,7 @@
             minWidth: 110,
             label: '审核人',
             align: 'center',
-            isNone: this.pageName != 'inspectionProjectEntrusted',
+            // isNone: this.pageName != 'inspectionProjectEntrusted',
             showOverflowTooltip: true
           },
           {
@@ -375,7 +375,7 @@
             minWidth: 110,
             label: '审核时间',
             align: 'center',
-            isNone: this.pageName != 'inspectionProjectEntrusted',
+            // isNone: this.pageName != 'inspectionProjectEntrusted',
             showOverflowTooltip: true
           },
           {
@@ -383,14 +383,14 @@
             minWidth: 110,
             label: '收样人',
             align: 'center',
-            isNone: this.pageName != 'inspectionProjectEntrusted',
+            // isNone: this.pageName != 'inspectionProjectEntrusted',
             showOverflowTooltip: true
           },
           {
             prop: 'sampleReceiverTime',
             minWidth: 110,
             label: '收样时间',
-            isNone: this.pageName != 'inspectionProjectEntrusted',
+            // isNone: this.pageName != 'inspectionProjectEntrusted',
             align: 'center',
             showOverflowTooltip: true
           },
@@ -447,10 +447,13 @@
       },
       /* 报工 */
       async report(row, type) {
-        const code = await verificationQualityInspector(row.id);
-        if (code == '-1') {
-          return;
+        if (type != 'detail') {
+          const code = await verificationQualityInspector(row.id);
+          if (code == '-1') {
+            return;
+          }
         }
+
         const res = await getById(row.id);
         this.$refs.inspectionProjectReportRef.open(
           { workData: res, list: res.templateList },

+ 5 - 1
src/views/sample/sampleRecord/components/addSample.vue

@@ -55,7 +55,11 @@
 
         <el-col :span="8">
           <el-form-item label="来源单号:" prop="sourceCode">
-            <el-input disabled v-model="form.sourceCode" placeholder=" " />
+            <el-input
+              disabled
+              :value="form.qualityPlanCode || form.workOrderCode"
+              placeholder=" "
+            />
           </el-form-item>
         </el-col>
         <el-col :span="8">

+ 36 - 18
src/views/sample/sampleRecord/index.vue

@@ -11,8 +11,14 @@
         :cache-key="cacheKeyUrl"
         autoAmendPage
       >
+        <template v-slot:qualityType="{ row }">
+          {{ getDictValue('质检计划类型', row.qualityType) }}
+        </template>
         <template v-slot:toolbar>
-          <el-button type="primary" size="mini" @click="addSampleOpen('add')"
+          <el-button
+            type="primary"
+            size="mini"
+            @click="addSampleOpen('add')"
             v-if="$hasPermission('qms:samplingrecord:save')"
             >新增</el-button
           >
@@ -32,22 +38,31 @@
             :underline="false"
             icon="el-icon-edit"
             @click="addSampleOpen('edit', row)"
-            v-if="[0, 3].includes(row.approvalStatus)&&$hasPermission('qms:samplingrecord:update')"
+            v-if="
+              [0, 3].includes(row.approvalStatus) &&
+              $hasPermission('qms:samplingrecord:update')
+            "
           >
             编辑
           </el-link>
           <el-link
             type="primary"
             :underline="false"
-            v-if="[0, 3].includes(row.approvalStatus)&&$hasPermission('qms:samplingrecord:update')"
+            v-if="
+              [0, 3].includes(row.approvalStatus) &&
+              $hasPermission('qms:samplingrecord:update')
+            "
             @click="approvalSubmit(row)"
             >提交</el-link
           >
-       
         </template>
       </ele-pro-table>
     </el-card>
-    <addSample ref="addSampleRef" @reload="search" :isSampleRecord="true"></addSample>
+    <addSample
+      ref="addSampleRef"
+      @reload="search"
+      :isSampleRecord="true"
+    ></addSample>
     <processSubmitDialog
       :processSubmitDialogFlag.sync="processSubmitDialogFlag"
       v-if="processSubmitDialogFlag"
@@ -115,11 +130,14 @@
 
           {
             prop: 'qualityType',
+            slot: 'qualityType',
             label: '类型',
             align: 'center',
             showOverflowTooltip: true,
-            minWidth: 100,
-            formatter: (row) => {}
+            minWidth: 100
+            // formatter: (row) => {
+            //   return this.getDictValue('质检计划类型', row.qualityType);
+            // }
           },
           {
             prop: 'qualityMode',
@@ -305,29 +323,29 @@
         return [
           {
             label: '质检工单编码:',
-            value: 'workOrderCode',
+            value: 'qualityWorkOrderCode',
             type: 'input',
             placeholder: '请输入'
           },
           {
-            label: '来源单号:',
-            value: 'workOrderCode',
+            label: '取样记录编码:',
+            value: 'code',
             type: 'input',
             placeholder: '请输入'
           },
           {
-            label: '类型:',
-            value: 'type',
-            type: 'select',
-            placeholder: '请输入',
-            planList: [
-              { label: '类型一', value: '1' },
-              { label: '类型二', value: '2' }
-            ]
+            label: '类型:',
+            value: 'qualityType',
+            type: 'DictSelection',
+            dictName: '质检计划类型',
+            placeholder: '请输入'
           }
         ];
       }
     },
+    created() {
+      this.requestDict('质检计划类型');
+    },
     methods: {
       // 刷新表格
       reload(where = {}) {