From e5454b769d44a34af423bf87ac8a740bf8c20341 Mon Sep 17 00:00:00 2001 From: Crunchy <3114200645@qq.com> Date: 星期二, 29 四月 2025 13:25:29 +0800 Subject: [PATCH] Merge branch 'dev' into dev_tides --- src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue | 27 +++++++++++++++++---------- 1 files changed, 17 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 7b4f94e..70a291d 100644 --- a/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue +++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue @@ -1,4 +1,5 @@ <template> +<!--璐ㄩ噺鐩戞帶-瀹炴柦娴佺▼椤甸潰--> <div> <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="瀹炴柦" width="60%" @close="closeCarryOutDia"> @@ -144,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> @@ -157,6 +161,7 @@ getQualityMonitorRatify } from "@/api/cnas/process/ensureResults/qualityMonitor"; import { selectUserCondition } from "@/api/business/inspectionTask"; +import {mapGetters} from "vuex"; export default { name: 'carryOutDialog', @@ -185,7 +190,11 @@ personList: [], editLoad: false, isCarryOut: false, // 鏄惁涓哄疄鏂� + ratifyUserId: '' }; + }, + computed: { + ...mapGetters(["userId"]), }, // 鏂规硶闆嗗悎 methods: { @@ -198,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 @@ -209,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) } }, // 鎻愪氦瀹炴柦 @@ -238,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