From 0d11525aa58ec5e35ea22ff4b0d6d5863d73649b Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 04 三月 2025 16:43:52 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before-ruoyi
---
src/views/CNAS/process/ensureResults/ensureResultsValidity/components/evaluateDialog.vue | 334 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 334 insertions(+), 0 deletions(-)
diff --git a/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/evaluateDialog.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/evaluateDialog.vue
new file mode 100644
index 0000000..aae2b99
--- /dev/null
+++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/evaluateDialog.vue
@@ -0,0 +1,334 @@
+<template>
+ <div>
+ <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="璐ㄩ噺鐩戞帶璇勪环"
+ width="60%" @close="closeEvaDia">
+ <div style="text-align: right">
+ <el-button size="small" type="primary" @click="viewTestRecord">闄勪欢涓婁紶</el-button>
+ </div>
+ <el-steps :active="currentStep" align-center finish-status="success">
+ <el-step title="鐩戞帶璁″垝瀹炴柦鎯呭喌" @click.native="setStep(0)"></el-step>
+ <el-step title="鐩戞帶缁撴灉璇勪环" @click.native="setStep(1)"></el-step>
+ <el-step title="璇勫缁撹锛堟槸鍚﹂噰鍙栨帾鏂斤級" @click.native="setStep(2)"></el-step>
+ </el-steps>
+ <div>
+ <table border="1" cellspacing="10" class="tables">
+ <tr v-if="showStep === 0">
+ <td class="td-title">
+ <p><span class="required-span">* </span>璇勫鐩殑锛�</p>
+ </td>
+ <td class="td-info" colspan="3">
+ <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.reviewPurpose" placeholder="璇疯緭鍏ュ唴瀹�"
+ size="small">
+ </el-input>
+ <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.reviewPurpose }}</span>
+ </td>
+ </tr>
+ <tr v-if="showStep === 0">
+ <td class="td-title">
+ <p><span class="required-span">* </span>璇勫浜哄憳锛�</p>
+ </td>
+ <td class="td-info" colspan="3">
+ <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.reviewUser" placeholder="璇疯緭鍏ュ唴瀹�"
+ size="small">
+ </el-input>
+ <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.reviewUser }}</span>
+ </td>
+ </tr>
+ <tr v-if="showStep === 0">
+ <td class="td-title">
+ <p><span class="required-span">* </span>璇勫鏃ユ湡锛�</p>
+ </td>
+ <td class="td-info" colspan="3">
+ <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.reviewTime" placeholder="璇疯緭鍏ュ唴瀹�"
+ size="small">
+ </el-input>
+ <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.reviewTime }}</span>
+ </td>
+ </tr>
+ <tr v-if="showStep === 0">
+ <td class="td-title">
+ <p><span class="required-span">* </span>鐩戞帶璁″垝瀹炴柦鎯呭喌锛�</p>
+ </td>
+ <td class="td-info" colspan="3">
+ <el-input v-if="showStep === 0 && currentStep === 0" v-model="form.implementCondition" :rows="5"
+ placeholder="璇疯緭鍏ュ唴瀹�" size="small" type="textarea">
+ </el-input>
+ <span v-if="showStep === 0 && currentStep !== 0" class="td-info1"> {{ form.implementCondition }}</span>
+ </td>
+ </tr>
+ <tr v-if="showStep === 0">
+ <td class="td-title">
+ <p>瀹炴柦閮ㄩ棬锛�</p>
+ </td>
+ <td class="td-info">
+ <span> {{ form.implementDepartment }}</span>
+ </td>
+ <td v-if="currentStep === 0" class="td-title">
+ <p>璇烽�夋嫨涓嬩竴姝ヨ礋璐d汉锛�</p>
+ </td>
+ <td v-if="currentStep === 0" class="td-info">
+ <el-select v-model="form.implementUserId" 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>
+ </tr>
+ <tr v-if="showStep === 1">
+ <td class="td-title">
+ <p>鐩戞帶缁撴灉璇勪环锛�</p>
+ </td>
+ <td class="td-info" colspan="4">
+ <el-input v-if="showStep === 1 && currentStep === 1" v-model="form.implementResult" :rows="5"
+ placeholder="璇疯緭鍏ュ唴瀹�" size="small" type="textarea">
+ </el-input>
+ <span v-if="showStep === 1 && currentStep !== 1" class="td-info1"> {{ form.implementResult }}</span>
+ </td>
+ </tr>
+ <tr v-if="showStep === 1">
+ <td class="td-title">
+ <p>褰撳墠璐熻矗浜猴細</p>
+ </td>
+ <td class="td-info" colspan="4">
+ {{ form.implementName }}
+ </td>
+ </tr>
+ <tr v-if="showStep === 1">
+ <td v-if="currentStep === 1" class="td-title">
+ <p>璇烽�夋嫨涓嬩竴姝ヨ礋璐d汉锛�</p>
+ </td>
+ <td v-if="currentStep === 1" class="td-info" colspan="4">
+ <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>
+ </tr>
+ <tr v-if="showStep === 2">
+ <td class="td-title">
+ <p>璇勫缁撹锛堟槸鍚﹂噰鍙栨帾鏂斤級锛�</p>
+ </td>
+ <td class="td-info" colspan="4">
+ <el-input v-if="showStep === 2 && currentStep === 2" v-model="form.ratifyOpinion" :rows="5"
+ placeholder="璇疯緭鍏ュ唴瀹�" size="small" type="textarea">
+ </el-input>
+ <span v-if="showStep === 2 && currentStep !== 2" class="td-info1"> {{ form.ratifyOpinion }}</span>
+ </td>
+ </tr>
+ <tr v-if="showStep === 2">
+ <td class="td-title">
+ <p>褰撳墠璐熻矗浜猴細</p>
+ </td>
+ <td class="td-info" colspan="4">
+ {{ form.ratifyUserName }}
+ </td>
+ </tr>
+ <tr v-if="showStep === 2">
+ <td class="td-title">
+ <p>瀹℃壒鏃ユ湡锛�</p>
+ </td>
+ <td class="td-info" colspan="4">
+ {{ form.ratifyTime }}
+ </td>
+ </tr>
+ </table>
+ </div>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="closeEvaDia">鍙� 娑�</el-button>
+ <el-button v-if="currentStep !== 3" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button>
+ </span>
+ </el-dialog>
+ <view-record v-if="ViewRecord" ref="ViewRecord"></view-record>
+ </div>
+</template>
+
+<script>
+import ViewRecord from './ViewRecord.vue';
+import {
+ getQualityMonitorEvaluate,
+ addMonitorEvaluateOpinion,
+ addQualityMonitorEvaluate,
+} from '@/api/cnas/process/ensureResults/ensureResultsValidity.js'
+import { selectUserCondition } from "@/api/system/user";
+import { selectUserDepartmentLimsName } from "@/api/system/user";
+export default {
+ name: 'evaluateDialog',
+ // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
+ components: { ViewRecord },
+ data() {
+ // 杩欓噷瀛樻斁鏁版嵁
+ return {
+ formDia: false,
+ currentStep: 0,
+ showStep: 0,
+ form: {
+ implementDepartment: '',
+ reviewPurpose: '',
+ reviewUser: '',
+ reviewTime: '',
+ implementCondition: '',
+ implementName: '',
+ implementUserId: '',
+ implementResult: '',
+ ratifyUserName: '',
+ ratifyUserId: '',
+ ratifyOpinion: '',
+ qualityMonitorDetailsId: '',
+ ratifyTime: '',
+ detailsEvaluateId: '',
+ },
+ editLoad: false,
+ personList: [],
+ ViewRecord: false,
+ };
+ },
+ // 鏂规硶闆嗗悎
+ methods: {
+ openDia(row) {
+ this.formDia = true
+ this.searchInfo(row)
+ this.getAuthorizedPerson()
+ this.getDepartment()
+ },
+ // 鏌ヨ鐩戞帶璁″垝璇︽儏瀹炴柦淇℃伅
+ searchInfo(row) {
+ this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId
+ getQualityMonitorEvaluate({ qualityMonitorDetailsId: row.qualityMonitorDetailsId }).then(res => {
+ if (res.code === 201) return
+ if (res.data === null) {
+ this.showStep = 0
+ this.currentStep = 0
+ } else {
+ this.form = res.data
+ if (res.data.isFinish === 0) {
+ if (res.data.implementUserId && !res.data.ratifyUserId) {
+ this.showStep = 1
+ this.currentStep = 1
+ } else if (res.data.implementUserId && res.data.ratifyUserId) {
+ this.showStep = 2
+ this.currentStep = 2
+ }
+ } else {
+ this.currentStep = 3
+ this.showStep = 2
+ }
+ }
+ }).catch(err => {
+ console.log('err---', err);
+ })
+ },
+ // 鎻愪氦
+ handleEdit() {
+ if (this.currentStep === 2) {
+ addMonitorEvaluateOpinion(this.form).then(res => {
+ this.editLoad = false
+ if (res.code === 201) return
+ this.$message.success('鎿嶄綔鎴愬姛')
+ this.closeEvaDia()
+ }).catch(err => {
+ console.log('err---', err);
+ this.editLoad = false
+ })
+ } else {
+ if (!this.form.reviewPurpose) {
+ this.$message.warning('璇峰~鍐欒瘎瀹$洰鐨�')
+ return
+ }
+ if (!this.form.reviewUser) {
+ this.$message.warning('璇峰~鍐欒瘎瀹′汉鍛�')
+ return
+ }
+ if (!this.form.reviewTime) {
+ this.$message.warning('璇峰~鍐欒瘎瀹℃棩鏈�')
+ return
+ }
+ if (!this.form.implementCondition) {
+ this.$message.warning('璇峰~鍐欑洃鎺ц鍒掑疄鏂芥儏鍐�')
+ return
+ }
+ if (!this.form.implementUserId) {
+ this.$message.warning('璇烽�夋嫨涓嬩竴姝ヨ礋璐d汉')
+ return
+ }
+ if (this.currentStep === 1) {
+ if (!this.form.ratifyUserId) {
+ this.$message.warning('璇烽�夋嫨涓嬩竴姝ヨ礋璐d汉')
+ return
+ }
+ }
+ addQualityMonitorEvaluate(this.form).then(res => {
+ this.editLoad = false
+ if (res.code === 201) return
+ this.$message.success('鎿嶄綔鎴愬姛')
+ this.closeEvaDia()
+ }).catch(err => {
+ console.log('err---', err);
+ this.editLoad = false
+ })
+ }
+ },
+ // 鍏抽棴寮规
+ closeEvaDia() {
+ this.formDia = false
+ this.$emit('closeEvaDia')
+ },
+ setStep(step) {
+ this.showStep = step
+ },
+ viewTestRecord() {
+ this.ViewRecord = true
+ this.$nextTick(() => {
+ this.$refs.ViewRecord.openDia(this.form)
+ })
+ },
+ getAuthorizedPerson() {
+ selectUserCondition().then(res => {
+ let data = []
+ res.data.forEach(a => {
+ data.push({
+ label: a.name,
+ value: a.id
+ })
+ })
+ this.personList = data
+ })
+ },
+ getDepartment() {
+ selectUserDepartmentLimsName().then(res => {
+ if (res.code === 201) return
+ this.form.implementDepartment = res.data
+ })
+ },
+ }
+};
+</script>
+
+<style scoped>
+.tables {
+ table-layout: fixed;
+ width: 100%;
+ margin-top: 10px;
+}
+
+.td-title {
+ height: 40px;
+ width: 170px;
+ text-align: center;
+ font-size: 14px;
+ word-wrap: break-word;
+ white-space: normal;
+ padding: 6px;
+}
+
+.td-info {
+ padding: 6px;
+}
+
+.td-info1 {
+ display: inline-block;
+ width: 100%;
+ text-align: left;
+ font-size: 14px;
+ word-wrap: break-word;
+ white-space: normal;
+}
+</style>
--
Gitblit v1.9.3