From 1ea1ad2c56e95e71e1756cfca73e7183f9795ac9 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 16 四月 2025 15:23:39 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev_test

---
 src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue
index f3fd3c5..70a291d 100644
--- a/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue
+++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue
@@ -145,7 +145,10 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="closeCarryOutDia">鍙� 娑�</el-button>
-        <el-button v-if="currentStep !== 2" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
+        <el-button v-if="currentStep === 0" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
+        <el-button v-if="currentStep === 1 && userId == ratifyUserId" :loading="editLoad" @click="handleEdit(0)">涓嶉�氳繃</el-button>
+        <el-button v-if="currentStep === 1 && userId == ratifyUserId" :loading="editLoad" type="primary" @click="handleEdit(1)">閫�
+          杩�</el-button>
       </span>
     </el-dialog>
   </div>
@@ -158,6 +161,7 @@
   getQualityMonitorRatify
 } from "@/api/cnas/process/ensureResults/qualityMonitor";
 import { selectUserCondition } from "@/api/business/inspectionTask";
+import {mapGetters} from "vuex";
 
 export default {
   name: 'carryOutDialog',
@@ -186,7 +190,11 @@
       personList: [],
       editLoad: false,
       isCarryOut: false, // 鏄惁涓哄疄鏂�
+      ratifyUserId: ''
     };
+  },
+  computed: {
+    ...mapGetters(["userId"]),
   },
   // 鏂规硶闆嗗悎
   methods: {
@@ -199,9 +207,9 @@
     searchInfo(row) {
       getQualityMonitorRatify({ qualityMonitorDetailsId: row.qualityMonitorDetailsId }).then(res => {
         // 鏈塪etailsRatifyId鍒欒鏄庢彁浜よ繃瀹炴柦淇℃伅
-        if (res.data.detailsRatifyId) {
+        if (res.data.ratifyUserId) {
           // 鏄惁缁撴潫0:鏈粨鏉�, 1:宸茬粨鏉�
-          if (res.data.isFinish == 0) {
+          if (res.data.isFinish != 1) {
             this.currentStep = 1
           } else if (res.data.isFinish == 1) {
             this.currentStep = 2
@@ -210,21 +218,18 @@
           this.currentStep = 0
         }
         this.form = res.data
+        this.ratifyUserId = res.data.ratifyUserId
       }).catch(err => {
         console.log('err---', err);
       })
     },
     // 鎻愪氦
-    handleEdit() {
-      if (!this.form.ratifyUserId) {
-        this.$message.warning('璇烽�夋嫨鎵瑰噯浜�')
-        return
-      }
+    handleEdit(isFinish) {
       this.editLoad = true
       if (this.currentStep == 0) {
         this.addInfo()
       } else {
-        this.editInfo()
+        this.editInfo(isFinish)
       }
     },
     // 鎻愪氦瀹炴柦
@@ -239,7 +244,8 @@
       })
     },
     // 鎻愪氦鎵瑰噯
-    editInfo() {
+    editInfo(isFinish) {
+      this.form.isFinish = isFinish
       addQualityMonitorRatifyOpinion(this.form).then(res => {
         this.editLoad = false
         this.$message.success('鎿嶄綔鎴愬姛')

--
Gitblit v1.9.3