From b32ec53311698aa550848b54cd6ef619471ed39c Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 05 三月 2025 09:49:37 +0800
Subject: [PATCH] 外来文件记录bug修改

---
 src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue |  125 ++++++++++++++---------------------------
 1 files changed, 43 insertions(+), 82 deletions(-)

diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue
index e1a814b..d66ced2 100644
--- a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue
+++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue
@@ -1,9 +1,7 @@
 <template>
   <div>
-    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false"
-               :visible.sync="formDia"
-               title="妫�娴嬪伐浣滅洃鐫h褰曡〃"
-               width="70%" @close="closeRecordsDia">
+    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="妫�娴嬪伐浣滅洃鐫h褰曡〃"
+      width="70%" @close="closeRecordsDia">
       <el-steps :active="currentStep" align-center finish-status="success">
         <el-step title="瀹炴柦"></el-step>
         <el-step title="鎵瑰噯"></el-step>
@@ -15,9 +13,7 @@
               <p><span class="required-span">* </span>妫�娴嬩汉鍛橈細</p>
             </td>
             <td colspan="2">
-              <el-input v-if="currentStep === 0" v-model="form.testMember"
-                        placeholder="璇疯緭鍏ュ唴瀹�"
-                        size="small">
+              <el-input v-if="currentStep === 0" v-model="form.testMember" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
               </el-input>
               <span v-else class="td-info"> {{ form.testMember }}</span>
             </td>
@@ -25,9 +21,7 @@
               <p><span class="required-span">* </span>鐩戠潱鍛橈細</p>
             </td>
             <td colspan="2">
-              <el-input v-if="currentStep === 0" v-model="form.supervisor"
-                        placeholder="璇疯緭鍏ュ唴瀹�"
-                        size="small">
+              <el-input v-if="currentStep === 0" v-model="form.supervisor" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
               </el-input>
               <span v-else class="td-info"> {{ form.supervisor }}</span>
             </td>
@@ -37,9 +31,7 @@
               <p><span class="required-span">* </span>妫�娴嬮」鐩細</p>
             </td>
             <td>
-              <el-input v-if="currentStep === 0" v-model="form.testItem"
-                        placeholder="璇疯緭鍏ュ唴瀹�"
-                        size="small">
+              <el-input v-if="currentStep === 0" v-model="form.testItem" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
               </el-input>
               <span v-else class="td-info"> {{ form.testItem }}</span>
             </td>
@@ -47,9 +39,7 @@
               <p><span class="required-span">* </span>鏍峰搧缂栧彿锛�</p>
             </td>
             <td>
-              <el-input v-if="currentStep === 0" v-model="form.sampleNumber"
-                        placeholder="璇疯緭鍏ュ唴瀹�"
-                        size="small">
+              <el-input v-if="currentStep === 0" v-model="form.sampleNumber" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
               </el-input>
               <span v-else class="td-info"> {{ form.sampleNumber }}</span>
             </td>
@@ -57,9 +47,7 @@
               <p><span class="required-span">* </span>妫�娴嬫棩鏈燂細</p>
             </td>
             <td>
-              <el-input v-if="currentStep === 0" v-model="form.testDate"
-                        placeholder="璇疯緭鍏ュ唴瀹�"
-                        size="small">
+              <el-input v-if="currentStep === 0" v-model="form.testDate" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
               </el-input>
               <span v-else class="td-info"> {{ form.testDate }}</span>
             </td>
@@ -69,9 +57,7 @@
               <p><span class="required-span">* </span>浜哄憳锛�</p>
             </td>
             <td colspan="5">
-              <el-input v-if="currentStep === 0" v-model="form.personnel"
-                        placeholder="璇疯緭鍏ュ唴瀹�"
-                        size="small">
+              <el-input v-if="currentStep === 0" v-model="form.personnel" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
               </el-input>
               <span v-else class="td-info"> {{ form.personnel }}</span>
             </td>
@@ -81,9 +67,7 @@
               <p><span class="required-span">* </span>浠櫒璁惧锛�</p>
             </td>
             <td colspan="5">
-              <el-input v-if="currentStep === 0" v-model="form.device"
-                        placeholder="璇疯緭鍏ュ唴瀹�"
-                        size="small">
+              <el-input v-if="currentStep === 0" v-model="form.device" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
               </el-input>
               <span v-else class="td-info"> {{ form.device }}</span>
             </td>
@@ -93,9 +77,7 @@
               <p><span class="required-span">* </span>宸ヤ綔鐜锛�</p>
             </td>
             <td colspan="5">
-              <el-input v-if="currentStep === 0" v-model="form.environment"
-                        placeholder="璇疯緭鍏ュ唴瀹�"
-                        size="small">
+              <el-input v-if="currentStep === 0" v-model="form.environment" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
               </el-input>
               <span v-else class="td-info"> {{ form.environment }}</span>
             </td>
@@ -105,9 +87,7 @@
               <p><span class="required-span">* </span>鏍峰搧閲囬泦锛�</p>
             </td>
             <td colspan="5">
-              <el-input v-if="currentStep === 0" v-model="form.sampleCollection"
-                        placeholder="璇疯緭鍏ュ唴瀹�"
-                        size="small">
+              <el-input v-if="currentStep === 0" v-model="form.sampleCollection" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
               </el-input>
               <span v-else class="td-info"> {{ form.sampleCollection }}</span>
             </td>
@@ -117,9 +97,7 @@
               <p><span class="required-span">* </span>鏍峰搧鐨勫噯澶囷細</p>
             </td>
             <td colspan="5">
-              <el-input v-if="currentStep === 0" v-model="form.samplePreparation"
-                        placeholder="璇疯緭鍏ュ唴瀹�"
-                        size="small">
+              <el-input v-if="currentStep === 0" v-model="form.samplePreparation" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
               </el-input>
               <span v-else class="td-info"> {{ form.samplePreparation }}</span>
             </td>
@@ -129,9 +107,7 @@
               <p><span class="required-span">* </span>妫�娴嬫柟娉曪細</p>
             </td>
             <td colspan="5">
-              <el-input v-if="currentStep === 0" v-model="form.detectionMethod"
-                        placeholder="璇疯緭鍏ュ唴瀹�"
-                        size="small">
+              <el-input v-if="currentStep === 0" v-model="form.detectionMethod" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
               </el-input>
               <span v-else class="td-info"> {{ form.detectionMethod }}</span>
             </td>
@@ -141,9 +117,7 @@
               <p><span class="required-span">* </span>妫�娴嬭褰曪細</p>
             </td>
             <td colspan="5">
-              <el-input v-if="currentStep === 0" v-model="form.inspectionRecord"
-                        placeholder="璇疯緭鍏ュ唴瀹�"
-                        size="small">
+              <el-input v-if="currentStep === 0" v-model="form.inspectionRecord" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
               </el-input>
               <span v-else class="td-info"> {{ form.inspectionRecord }}</span>
             </td>
@@ -153,9 +127,7 @@
               <p><span class="required-span">* </span>妫�娴嬫姤鍛婏細</p>
             </td>
             <td colspan="5">
-              <el-input v-if="currentStep === 0" v-model="form.examiningReport"
-                        placeholder="璇疯緭鍏ュ唴瀹�"
-                        size="small">
+              <el-input v-if="currentStep === 0" v-model="form.examiningReport" placeholder="璇疯緭鍏ュ唴瀹�" size="small">
               </el-input>
               <span v-else class="td-info"> {{ form.examiningReport }}</span>
             </td>
@@ -165,11 +137,8 @@
               <p><span class="required-span">* </span>鐩戠潱鎯呭喌璇勪环锛�</p>
             </td>
             <td colspan="5">
-              <el-input v-if="currentStep === 0" v-model="form.supervisionEvaluation"
-                        :rows="4"
-                        placeholder="璇疯緭鍏ュ唴瀹�"
-                        size="small"
-                        type="textarea">
+              <el-input v-if="currentStep === 0" v-model="form.supervisionEvaluation" :rows="4" placeholder="璇疯緭鍏ュ唴瀹�"
+                size="small" type="textarea">
               </el-input>
               <span v-else class="td-info"> {{ form.supervisionEvaluation }}</span>
             </td>
@@ -179,11 +148,8 @@
               <p><span class="required-span">* </span>涓嶇鍚堝鐞嗘剰瑙侊細</p>
             </td>
             <td colspan="5">
-              <el-input v-if="currentStep === 0" v-model="form.handlingAdvice"
-                        :rows="4"
-                        placeholder="璇疯緭鍏ュ唴瀹�"
-                        size="small"
-                        type="textarea">
+              <el-input v-if="currentStep === 0" v-model="form.handlingAdvice" :rows="4" placeholder="璇疯緭鍏ュ唴瀹�"
+                size="small" type="textarea">
               </el-input>
               <span v-else class="td-info"> {{ form.handlingAdvice }}</span>
             </td>
@@ -193,9 +159,8 @@
               <p><span class="required-span">* </span>璇烽�夋嫨涓嬩竴姝ユ壒鍑嗕汉锛�</p>
             </td>
             <td v-if="currentStep === 0" colspan="5">
-              <el-select v-model="form.ratifyUserId" clearable filterable
-                         placeholder="璇烽�夋嫨" size="small">
-                <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value">
+              <el-select v-model="form.ratifyUserId" clearable filterable placeholder="璇烽�夋嫨" size="small">
+                <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value">
                 </el-option>
               </el-select>
             </td>
@@ -203,7 +168,7 @@
               <p>鎵瑰噯璐熻矗浜猴細</p>
             </td>
             <td v-if="currentStep === 1" class="td-info" colspan="5">
-              {{form.ratifyUserName}}
+              {{ form.ratifyUserName }}
             </td>
           </tr>
           <tr v-if="currentStep === 1 || currentStep === 2">
@@ -211,12 +176,8 @@
               <p><span class="required-span">* </span>瀹℃壒缁撹锛�</p>
             </td>
             <td colspan="2">
-              <el-input v-if="currentStep === 1"
-                        v-model="form.ratifyOpinion"
-                        :rows="4"
-                        placeholder="璇疯緭鍏ュ唴瀹�"
-                        size="small"
-                        type="textarea">
+              <el-input v-if="currentStep === 1" v-model="form.ratifyOpinion" :rows="4" placeholder="璇疯緭鍏ュ唴瀹�" size="small"
+                type="textarea">
               </el-input>
               <span v-if="currentStep === 2" class="td-info"> {{ form.ratifyOpinion }}</span>
             </td>
@@ -243,6 +204,12 @@
 </template>
 
 <script>
+import {
+  getSuperviseDetailRecord,
+  addSuperviseDetailRecord,
+  addSuperviseRecordOpinion,
+} from '@/api/cnas/process/ensureResults/qualityControlPlan.js'
+import { selectUserCondition } from "@/api/system/user";
 export default {
   name: 'recordsDialog',
   // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -287,8 +254,8 @@
       this.getAuthorizedPerson()
     },
     // 鏌ヨ鐩戠潱璁″垝璇︽儏璁板綍娴佺▼淇℃伅
-    searchInfo (row) {
-      this.$axios.get(this.$api.qualitySupervise.getSuperviseDetailRecord + '?superviseDetailsId=' + row.superviseDetailsId).then(res => {
+    searchInfo(row) {
+      getSuperviseDetailRecord({ superviseDetailsId: row.superviseDetailsId }).then(res => {
         if (res.code === 201) return
         // 鏈塻uperviseDetailsRecordId璇存槑鎻愪氦杩囪褰�
         if (res.data.superviseDetailsRecordId) {
@@ -308,7 +275,7 @@
       })
     },
     // 鎻愪氦娴佺▼
-    handleEdit () {
+    handleEdit() {
       if (!this.form.testMember || !this.form.supervisor || !this.form.testItem || !this.form.sampleNumber
         || !this.form.testDate) {
         this.$message.warning('璇峰~鍐欏畬鏁�')
@@ -321,18 +288,13 @@
       }
     },
     // 鎻愪氦璁板綍
-    addInfo () {
+    addInfo() {
       if (!this.form.ratifyUserId) {
         this.$message.warning('璇烽�夋嫨涓嬩竴姝ユ壒鍑嗕汉')
         return
       }
       this.editLoad = true
-      this.$axios.post(this.$api.qualitySupervise.addSuperviseDetailRecord, this.form, {
-        headers: {
-          "Content-Type": "application/json"
-        },
-        noQs: true
-      }).then(res => {
+      addSuperviseDetailRecord(this.form).then(res => {
         this.editLoad = false
         if (res.code === 201) return
         this.$message.success('鎿嶄綔鎴愬姛')
@@ -343,7 +305,7 @@
       })
     },
     // 鎻愪氦鎵瑰噯
-    editInfo () {
+    editInfo() {
       if (!this.form.ratifyOpinion) {
         this.$message.warning('璇峰~鍐欏鎵规剰瑙�')
         return
@@ -354,12 +316,7 @@
         return
       }
       this.editLoad = true
-      this.$axios.post(this.$api.qualitySupervise.addSuperviseRecordOpinion, this.form, {
-        headers: {
-          "Content-Type": "application/json"
-        },
-        noQs: true
-      }).then(res => {
+      addSuperviseRecordOpinion(this.form).then(res => {
         this.editLoad = false
         if (res.code === 201) return
         this.$message.success('鎿嶄綔鎴愬姛')
@@ -370,12 +327,12 @@
       })
     },
     // 鍏抽棴寮规
-    closeRecordsDia () {
+    closeRecordsDia() {
       this.formDia = false
       this.$emit('closeRecordsDia')
     },
     getAuthorizedPerson() {
-      this.$axios.get(this.$api.user.getUserMenu).then(res => {
+      selectUserCondition().then(res => {
         let data = []
         res.data.forEach(a => {
           data.push({
@@ -394,11 +351,13 @@
 >>>.el-dialog {
   margin: 20px auto 50px !important;
 }
+
 .tables {
   table-layout: fixed;
   width: 100%;
   margin-top: 10px;
 }
+
 .td-title {
   height: 40px;
   text-align: center;
@@ -407,12 +366,14 @@
   white-space: normal;
   padding: 6px;
 }
+
 .td-info {
   text-align: center;
   font-size: 14px;
   word-wrap: break-word;
   white-space: normal;
 }
+
 .tables td {
   height: 40px;
   font-size: 14px;

--
Gitblit v1.9.3