From e529237c143617b6b8addc235bc44c1653637e60 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 18 十二月 2024 14:22:47 +0800
Subject: [PATCH] 检验提交可撤销

---
 src/components/do/b1-inspect-order-plan/humidity.vue   |   18 ++++++++++++++++--
 src/components/do/b1-ins-order/add.vue                 |   15 ++++++++-------
 src/components/do/b1-inspect-order-plan/Inspection.vue |    2 +-
 src/components/view/b1-inspect-order-plan.vue          |   20 +++++++++++++++++++-
 src/assets/api/controller.js                           |    1 +
 5 files changed, 45 insertions(+), 11 deletions(-)

diff --git a/src/assets/api/controller.js b/src/assets/api/controller.js
index 57fe9f9..aeec3b6 100644
--- a/src/assets/api/controller.js
+++ b/src/assets/api/controller.js
@@ -223,6 +223,7 @@
   getInsOrderUserList: "/insOrderPlan/getInsOrderUserList", // 鏌ョ湅妫�楠屽巻鍙插垪琛�
   preview: "/insOrderPlan/preview", // csv鏂囦欢棰勮
   outInsOrderState: "/insOrderPlan/outInsOrderState", // 妫�楠屼换鍔℃壂鐮佸嚭搴�
+  cancelSubmitPlan: "/insOrderPlan/cancelSubmitPlan", // 妫�楠屼换鍔℃彁浜ゅ悗鎾ら攢鎻愪氦
 }
 
 const systemLog = {
diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 975e112..252e9e4 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -1971,13 +1971,14 @@
 
           let projectNum = this.totalArr.filter(a => a.state == 1).length
           if(projectNum==0){
-            this.$confirm('妫�楠岄」鐩负绌猴紝鏄惁纭鎻愪氦?', "鎻愮ず", {
-              confirmButtonText: "纭畾",
-              cancelButtonText: "鍙栨秷",
-              type: "warning"
-            }).then(() => {
-              this.saveMethod(sampleList)
-            }).catch(() => {})
+            // this.$confirm('妫�楠岄」鐩负绌猴紝鏄惁纭鎻愪氦?', "鎻愮ず", {
+            //   confirmButtonText: "纭畾",
+            //   cancelButtonText: "鍙栨秷",
+            //   type: "warning"
+            // }).then(() => {
+            //   this.saveMethod(sampleList)
+            // }).catch(() => {})
+            return this.$message.error('璇锋坊鍔犳楠岄」鐩�')
           }else{
             let isRTS = this.totalArr.find(a => a.ask != null && this.symbolList.find(b=>a.ask&&a.ask.includes(b)) && a.state == 1)
             if (isRTS&&this.PROJECT=='妫�娴嬩腑蹇�') {
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index 3334450..39e590b 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -259,7 +259,7 @@
     <el-row class="title">
       <el-col :span="12" style="padding-left: 20px;text-align: left;" :class="{noShow:noBack}">妫�楠屽崟璇︽儏
       </el-col>
-      <el-col :span="12" style="text-align: right;display: flex;align-items: center;justify-content: end;margin-bottom: 16px;">
+      <el-col :span="12" style="text-align: right;display: flex;align-items: center;justify-content: end;height: 60px;">
         <el-button size="small" type="primary" @click="versionDialogVisible=true" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('鐢佃矾璇曢獙')">鐢佃皟/闈炵數璋冩ā鏉垮垏鎹�</el-button>
         <el-select v-model="template" size="medium" placeholder="鐢佃矾棰勮妯℃澘" style="margin-right: 10px;margin-left: 10px;" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('鐢佃矾璇曢獙')"
           @change="selectInsProductTemplateById">
diff --git a/src/components/do/b1-inspect-order-plan/humidity.vue b/src/components/do/b1-inspect-order-plan/humidity.vue
index 3fc68d0..9ca6f6e 100644
--- a/src/components/do/b1-inspect-order-plan/humidity.vue
+++ b/src/components/do/b1-inspect-order-plan/humidity.vue
@@ -30,7 +30,7 @@
         </tr>
         <tr>
           <td style="font-size: 16px;background-color: #F0F1F5;">瀹為獙鍓嶆牱鍝佹鏌�</td>
-          <td colspan="2">
+          <td :colspan="item.beforeCheck=='鐮存崯'?1:2">
             <el-select v-model="item.beforeCheck" placeholder="璇烽�夋嫨" size="small" :disabled="state>1" @change="save(item)">
               <el-option
                 v-for="item in options"
@@ -40,8 +40,12 @@
               </el-option>
             </el-select>
           </td>
+          <td v-if="item.beforeCheck=='鐮存崯'">
+            <el-input v-model="item.beforeNote" placeholder="鐮存崯璇存槑" size="small" :disabled="state>1" style="display: inline-block;width: 100%;" @change="save(item)" type="textarea"
+              :rows="3"></el-input>
+          </td>
           <td style="font-size: 16px;background-color: #F0F1F5;">瀹為獙鍚庢牱鍝佹鏌�</td>
-          <td colspan="2">
+          <td :colspan="item.afterCheck=='鐮存崯'?1:2">
             <el-select v-model="item.afterCheck" placeholder="璇烽�夋嫨" size="small" :disabled="state>1" @change="save(item)">
               <el-option
                 v-for="item in options"
@@ -50,6 +54,10 @@
                 :value="item.value">
               </el-option>
             </el-select>
+          </td>
+          <td v-if="item.afterCheck=='鐮存崯'">
+            <el-input v-model="item.afterNote" placeholder="鐮存崯璇存槑" size="small" :disabled="state>1" style="display: inline-block;width: 100%;" @change="save(item)" type="textarea"
+              :rows="3"></el-input>
           </td>
         </tr>
         <tr v-if="item.inspectionItemSubclass&&item.inspectionItemSubclass.includes('浣�')">
@@ -134,6 +142,8 @@
           this.$set(item,'equipName','')
           this.$set(item,'beforeCheck','')
           this.$set(item,'afterCheck','')
+          this.$set(item,'afterNote','')
+          this.$set(item,'beforeNote','')
         }else{
           // 璧嬪��
           this.$set(item,'list',JSON.parse(item.insProductResult.insValue))
@@ -155,6 +165,8 @@
           this.$set(item,'equipName',item.insProductResult.equipName?JSON.parse(item.insProductResult.equipName)[0].v:'')
           this.$set(item,'beforeCheck',item.insProductResult.beforeCheck)
           this.$set(item,'afterCheck',item.insProductResult.afterCheck)
+          this.$set(item,'afterNote',item.insProductResult.afterNote)
+          this.$set(item,'beforeNote',item.insProductResult.beforeNote)
         }
       })
     },
@@ -240,6 +252,8 @@
         num:this.num,
         beforeCheck:item.beforeCheck,
         afterCheck:item.afterCheck,
+        afterNote:item.afterNote,
+        beforeNote:item.beforeNote,
       }, {
       headers: {
         'Content-Type': 'application/json'
diff --git a/src/components/view/b1-inspect-order-plan.vue b/src/components/view/b1-inspect-order-plan.vue
index d4c6c44..7c5c938 100644
--- a/src/components/view/b1-inspect-order-plan.vue
+++ b/src/components/view/b1-inspect-order-plan.vue
@@ -269,12 +269,13 @@
           <el-table-column
             fixed="right"
             align="center" label="鎿嶄綔"
-            width="320px"
+            width="340px"
           >
           <template slot-scope="scope">
             <el-button @click="handleDataLook(scope.row)" type="text" size="small">鏁版嵁鏌ョ湅</el-button>
             <el-button @click="handleInspection(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState == 3 || scope.row.insState == 5||scope.row.insState == 6||(scope.row.userName&&!scope.row.userName.includes(userName))" v-if="inspection">妫�楠�</el-button>
             <el-button @click="handleConnect(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState == 5  || scope.row.insState == 3||scope.row.insState == 6||(scope.row.userName&&!scope.row.userName.includes(userName))" v-if="connect">浜ゆ帴</el-button>
+            <el-button @click="cancelSubmitPlan(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState != 3 ||(scope.row.userName&&!scope.row.userName.includes(userName))" v-if="inspection">鎾ら攢</el-button>
             <el-button @click="handleReview(scope.row)" type="text" size="small" :disabled="scope.row.userName == null || scope.row.insState != 3 ||(scope.row.checkName&&!scope.row.checkName.includes(userName))" v-if="review">澶嶆牳</el-button>
             <el-button @click="claimFun(scope.row)" type="text" size="small" :disabled="scope.row.userName != null || scope.row.checkName!=null" v-if="claim">璁ら</el-button>
             <el-button @click="lookHistory0(scope.row)" type="text" size="small">鏌ョ湅璁板綍</el-button>
@@ -1188,6 +1189,23 @@
 				// 	}
 				// })
       },
+      cancelSubmitPlan(row){
+        this.$confirm('纭畾鎾ら攢姝ゆ妫�楠屾彁浜�?', "鎻愮ず", {
+          confirmButtonText: "纭畾",
+          cancelButtonText: "鍙栨秷",
+          type: "warning"
+        }).then(() => {
+          this.$axios.post(this.$api.insOrderPlan.cancelSubmitPlan, {
+          orderStateId: row.orderStateId
+				}).then(res => {
+          if(res.code==201){
+            return
+          }
+          this.$message.success("鎿嶄綔鎴愬姛")
+          this.refreshTable('page')
+        }).catch(() => {})
+        }).catch(() => {})
+      },
       confirmConnect(){
         if(this.connect.connectPerson==null||this.connect.connectPerson==''||this.connect.connectPerson==undefined){
           this.$message.error('鏈�夋嫨浜ゆ帴浜哄憳')

--
Gitblit v1.9.3