From 06642ec87b3820b08feeb401de9aa663cde635ae Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期二, 25 二月 2025 17:48:33 +0800 Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev --- src/views/CNAS/process/ensureResultsValidity/components/detailFormDialog.vue | 158 ++++ src/views/CNAS/process/ensureResultsValidity/components/evaluateDialog.vue | 351 ++++++++++ src/views/business/inspectionReview/index.vue | 13 src/views/CNAS/process/ensureResultsValidity/components/ViewRecord.vue | 183 +++++ src/api/cnas/process/ensureResultsValidity/qualityMonitor.js | 86 ++ src/views/CNAS/process/ensureResultsValidity/components/carryOutDialog.vue | 356 ++++++++++ src/views/CNAS/process/ensureResultsValidity/index.vue | 837 ++++++++++++++++++++++++ 7 files changed, 1,971 insertions(+), 13 deletions(-) diff --git a/src/api/cnas/process/ensureResultsValidity/qualityMonitor.js b/src/api/cnas/process/ensureResultsValidity/qualityMonitor.js new file mode 100644 index 0000000..0115f0b --- /dev/null +++ b/src/api/cnas/process/ensureResultsValidity/qualityMonitor.js @@ -0,0 +1,86 @@ +// 璐ㄩ噺鐩戞帶璁″垝椤甸潰鐩稿叧鎺ュ彛 +import request from '@/utils/request' + +// 鐩戞帶骞村害璁″垝鍒楄〃 +export function pageQualityMonitor(query) { + return request({ + url: '/qualityMonitor/pageQualityMonitor', + method: 'get', + params: query + }) +} +// 鐩戞帶璁″垝瀹℃牳 +export function examineQualityMonitor(query) { + return request({ + url: '/qualityMonitor/examineQualityMonitor', + method: 'post', + data: query + }) +} +// 鐩戞帶璁″垝鎵瑰噯 +export function ratifyQualityMonitor(query) { + return request({ + url: '/qualityMonitor/ratifyQualityMonitor', + method: 'post', + data: query + }) +} +// 鎵瑰噯瀹屾垚鎶ュ憡 +export function ratifyFinishReport(query) { + return request({ + url: '/qualityMonitor/ratifyFinishReport', + method: 'post', + data: query + }) +} +// 瀵煎嚭鐩戞帶璁″垝 +export function exportQualityMonitorDetail(query) { + return request({ + url: '/qualityMonitor/exportQualityMonitorDetail', + method: 'get', + params: query, + responseType: "blob" + }) +} +// 鍒犻櫎鐩戠潱璁″垝 +export function delQualitySupervise(query) { + return request({ + url: '/qualityMonitor/delQualitySupervise', + method: 'delete', + params: query + }) +} +// 鐩戞帶璁″垝璇︽儏鍒楄〃 +export function pageQualityMonitorDetail(query) { + return request({ + url: '/qualityMonitor/pageQualityMonitorDetail', + method: 'get', + params: query + }) +} +// 璐ㄩ噺鐩戞帶瀹炴柦璁″垝瀵煎嚭 +export function exportQualityMonitorRatify(query) { + return request({ + url: '/qualityMonitor/exportQualityMonitorRatify', + method: 'get', + params: query, + responseType: "blob" + }) +} +// 璐ㄩ噺鐩戞帶璇勪环瀵煎嚭 +export function exportQualityMonitorEvaluate(query) { + return request({ + url: '/qualityMonitor/exportQualityMonitorEvaluate', + method: 'get', + params: query, + responseType: "blob" + }) +} +// 鍒犻櫎鐩戞帶璁″垝璇︽儏 +export function delQualityMonitorDetail(query) { + return request({ + url: '/qualityMonitor/delQualityMonitorDetail', + method: 'delete', + params: query + }) +} diff --git a/src/views/CNAS/process/ensureResultsValidity/components/ViewRecord.vue b/src/views/CNAS/process/ensureResultsValidity/components/ViewRecord.vue new file mode 100644 index 0000000..7da7493 --- /dev/null +++ b/src/views/CNAS/process/ensureResultsValidity/components/ViewRecord.vue @@ -0,0 +1,183 @@ +<template> + <div> + <el-dialog :visible.sync="filesDialogVisible" title="闄勪欢涓婁紶" width="80%" @closed="closeFilesLook"> + <div style="display: flex;justify-content: space-between;"> + <el-upload ref='upload' + :action="fileAction" + :auto-upload="true" + :before-upload="fileBeforeUpload" :data="{detailsEvaluateId: info.detailsEvaluateId}" + :headers="headers" :on-error="onError" + :on-success="handleSuccessUp" + :show-file-list="false" + accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' style="width: 80px !important;"> + <el-button size="small" style="height: 38px" type="primary">闄勪欢涓婁紶</el-button> + </el-upload> + </div> + <div> + <lims-table :tableData="tableData" :column="columnData" :tableLoading="tableLoading" + :height="'calc(100vh - 270px)'" key="tableData"></lims-table> + </div> + </el-dialog> + <el-dialog + :visible.sync="lookDialogVisible" + fullscreen + title="鏌ョ湅闄勪欢" width="800px"> + <filePreview v-if="lookDialogVisible" :currentFile="{}" + :fileUrl="javaApi+'/word/'+currentInfo.fileUrl" style="height: 90vh;overflow-y: auto;top: 0"/> + </el-dialog> + </div> +</template> + +<script> +import file from '@/utils/file'; +import filePreview from '@/components/Preview/filePreview.vue'; +import limsTable from "@/components/Table/lims-table.vue"; + +export default { + name: 'ViewRecord', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {limsTable, filePreview }, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + filesDialogVisible: false, + tableLoading: false, + filesLookInfo: {}, + columnData: [ + { + label: '鏂囦欢鍚嶇О', + prop: 'fileName', + minWidth: '150px' + }, + { + dataType: 'action', + minWidth: '100', + label: '鎿嶄綔', + fixed: 'right', + operation: [ + { + name: '棰勮', + type: 'text', + clickFun: (row) => { + this.handleLook(row) + } + }, + { + name: '涓嬭浇', + type: 'text', + clickFun: (row) => { + this.upload(row) + } + }, + { + name: '鍒犻櫎', + type: 'text', + color: '#f56c6c', + clickFun: (row) => { + this.delete(row) + } + } + ] + } + ], + tableData: [], + info: {}, + currentInfo:{}, + lookDialogVisible: false, + }; + }, + // 鏂规硶闆嗗悎 + methods: { + openDia(row) { + this.filesDialogVisible = true + this.info = row + this.searchTableList() + }, + // 鏌ヨ闄勪欢鍒楄〃 + searchTableList () { + this.tableLoading = true + this.$axios.get(this.$api.qualityMonitor.getEvaluateFileList + '?detailsEvaluateId=' + this.info.detailsEvaluateId).then(res => { + this.tableLoading = false + if (res.code === 201) return + this.tableData = res.data + }).catch(err => { + this.tableLoading = false + console.log('err---', err); + }) + }, + closeFilesLook () { + this.filesDialogVisible = false + }, + // 涓嬭浇 + upload (row) { + let url = ''; + if(row.type==1){ + url = this.javaApi+'/img/'+row.fileUrl + file.downloadIamge(url,row.fileName) + }else{ + url = this.javaApi+'/word/'+row.fileUrl + const link = document.createElement('a'); + link.href = url; + link.download = row.fileName; + link.click(); + } + }, + // 鍒犻櫎 + delete (row) { + this.tableLoading = true + this.$axios.get(this.$api.qualityMonitor.delVerifyEvaluateFileList + '?evaluateFileId=' + row.evaluateFileId).then(res => { + this.tableLoading = false + if (res.code === 201) return + this.$message.success('鍒犻櫎鎴愬姛') + this.searchTableList() + }).catch(err => { + this.tableLoading = false + console.log('err---', err); + }) + }, + // 涓婁紶楠岃瘉 + fileBeforeUpload(file) { + let flag = true + if (file.size > 1024 * 1024 * 10) { + this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M'); + this.$refs.upload.clearFiles() + flag = false + } + if (!flag) { + return Promise.reject(flag); //姝g‘鐨勭粓姝� + } + }, + onError(err, file, fileList,type) { + this.$message.error('涓婁紶澶辫触') + this.$refs.upload.clearFiles() + }, + handleSuccessUp(response, ) { + this.upLoading = false; + if (response.code == 200) { + this.$message.success('涓婁紶鎴愬姛'); + this.searchTableList() + } + }, + // 鏌ョ湅鏂囦欢 + handleLook(row){ + this.currentInfo = row + this.lookDialogVisible = true + }, + }, + computed: { + headers() { + return { + 'token': sessionStorage.getItem('token') + } + }, + fileAction() { + return this.javaApi + this.$api.qualityMonitor.uploadEvaluateFile + + } + }, +}; +</script> + +<style scoped> + +</style> diff --git a/src/views/CNAS/process/ensureResultsValidity/components/carryOutDialog.vue b/src/views/CNAS/process/ensureResultsValidity/components/carryOutDialog.vue new file mode 100644 index 0000000..22a138b --- /dev/null +++ b/src/views/CNAS/process/ensureResultsValidity/components/carryOutDialog.vue @@ -0,0 +1,356 @@ +<template> + <div> + <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" + :visible.sync="formDia" + title="瀹炴柦" + width="60%" @close="closeCarryOutDia"> + <el-steps :active="currentStep" align-center finish-status="success"> + <el-step title="瀹炴柦"></el-step> + <el-step title="鎵瑰噯"></el-step> + </el-steps> + <div style="height: 620px;overflow-y: auto"> + <table border="1" cellspacing="10" class="tables"> + <tr> + <td class="td-title"> + <p>鐩戞帶椤圭洰锛�</p> + </td> + <td colspan="3"> + <el-input v-if="currentStep === 0" v-model="form.monitorProject" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-else class="td-info"> {{ form.monitorProject }}</span> + </td> + <td class="td-title"> + <p>鐩戞帶鏃堕棿锛�</p> + </td> + <td colspan="3"> + <el-input v-if="currentStep === 0" v-model="form.monitorData" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-else class="td-info"> {{ form.monitorData }}</span> + </td> + </tr> + <tr> + <td colspan="8"> + <div> + <p>鐩戞帶鐩殑锛�</p> + </div> + <div> + <el-input v-if="currentStep === 0" v-model="form.monitorPurpose" + :rows="3" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-else class="td-info2"> {{ form.monitorPurpose }}</span> + </div> + </td> + </tr> + <tr> + <td colspan="8"> + <div> + <p>鐩戞帶鏂规硶锛�</p> + </div> + <div> + <el-input v-if="currentStep === 0" v-model="form.monitorMethod" + :rows="4" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-else class="td-info2"> {{ form.monitorMethod }}</span> + </div> + </td> + </tr> + <tr> + <td colspan="8"> + <div> + <p>鍙傚姞浜哄憳锛�</p> + </div> + <div> + <el-input v-if="currentStep === 0" v-model="form.participant" + :rows="3" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-else class="td-info2"> {{ form.participant }}</span> + </div> + </td> + </tr> + <tr> + <td colspan="8"> + <div> + <p>杩囩▼鎺у埗锛�</p> + </div> + <div> + <el-input v-if="currentStep === 0" v-model="form.processControl" + :rows="3" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-else class="td-info2"> {{ form.processControl }}</span> + </div> + </td> + </tr> + <tr> + <td colspan="8"> + <div> + <p>缁撴灉璇勪环鏍囧噯锛堝浣曡瘎浠凤級锛�</p> + </div> + <div> + <el-input v-if="currentStep === 0" v-model="form.howEvaluate" + :rows="3" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-else class="td-info2"> {{ form.howEvaluate }}</span> + </div> + </td> + </tr> + <tr> + <td colspan="8"> + <div> + <p>缁忚垂棰勭畻锛�</p> + </div> + <div> + <el-input v-if="currentStep === 0" v-model="form.budget" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-else class="td-info2"> {{ form.budget }}</span> + </div> + </td> + </tr> + <tr> + <td colspan="4"> + <div> + <p>妫�娴嬮儴闂細</p> + </div> + <div> + <el-input v-if="currentStep === 0" v-model="form.inspectionDepartment" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-else class="td-info2"> {{ form.inspectionDepartment }}</span> + </div> + </td> + <td colspan="4"> + <div v-if="currentStep === 0"> + <div>鎵瑰噯浜猴細</div> + <div> + <el-select v-if="currentStep === 0" 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> + <span v-else class="td-info2"> {{ form.ratifyName }}</span> + </div> + </div> + <div> + <div v-if="currentStep !== 0"> + <p>鎵瑰噯鎰忚锛�</p> + </div> + <div> + <el-input v-if="currentStep === 1" v-model="form.ratifyOpinion" + :rows="3" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-if="currentStep === 2" class="td-info2"> {{ form.ratifyOpinion }}</span> + <span v-if="currentStep !== 0" class="td-info3"> {{ '鎵瑰噯浜猴細' + form.ratifyName }}</span> + </div> + </div> + </td> + </tr> + </table> + </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> + </span> + </el-dialog> + </div> +</template> + +<script> + +export default { + name: 'carryOutDialog', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {}, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + formDia: false, + currentStep: 0, + form: { + monitorProject: '', + monitorData: '', + monitorPurpose: '', + monitorMethod: '', + participant: '', + processControl: '', + howEvaluate: '', + budget: '', + inspectionDepartment: '', + ratifyUserId: '', + ratifyOpinion: '', + qualityMonitorDetailsId: '', + ratifyName: '', + }, + personList: [], + editLoad: false, + isCarryOut: false, // 鏄惁涓哄疄鏂� + }; + }, + // 鏂规硶闆嗗悎 + methods: { + openDia(row) { + this.formDia = true + this.searchInfo(row) + this.getAuthorizedPerson() + }, + // 鏌ヨ鐩戞帶璁″垝璇︽儏瀹炴柦淇℃伅 + searchInfo (row) { + this.$axios.get(this.$api.qualityMonitor.getQualityMonitorRatify + '?qualityMonitorDetailsId=' + row.qualityMonitorDetailsId).then(res => { + if (res.code === 201) return + // 鏈塪etailsRatifyId鍒欒鏄庢彁浜よ繃瀹炴柦淇℃伅 + if (res.data.detailsRatifyId) { + // 鏄惁缁撴潫0:鏈粨鏉�, 1:宸茬粨鏉� + if (res.data.isFinish == 0) { + this.currentStep = 1 + } else if (res.data.isFinish == 1) { + this.currentStep = 2 + } + } else { + this.currentStep = 0 + } + this.form = res.data + }).catch(err => { + console.log('err---', err); + }) + }, + // 鎻愪氦 + handleEdit() { + if (!this.form.ratifyUserId) { + this.$message.warning('璇烽�夋嫨鎵瑰噯浜�') + return + } + this.editLoad = true + if (this.currentStep == 0) { + this.addInfo() + } else { + this.editInfo() + } + }, + // 鎻愪氦瀹炴柦 + addInfo () { + this.$axios.post(this.$api.qualityMonitor.addQualityMonitorRatify, this.form, { + headers: { + "Content-Type": "application/json" + }, + noQs: true + }).then(res => { + this.editLoad = false + if (res.code === 201) return + this.$message.success('鎿嶄綔鎴愬姛') + this.closeCarryOutDia() + }).catch(err => { + console.log('err---', err); + this.editLoad = false + }) + }, + // 鎻愪氦鎵瑰噯 + editInfo () { + this.$axios.post(this.$api.qualityMonitor.addQualityMonitorRatifyOpinion, this.form, { + headers: { + "Content-Type": "application/json" + }, + noQs: true + }).then(res => { + this.editLoad = false + if (res.code === 201) return + this.$message.success('鎿嶄綔鎴愬姛') + this.closeCarryOutDia() + }).catch(err => { + console.log('err---', err); + this.editLoad = false + }) + }, + // 鍏抽棴寮规 + closeCarryOutDia () { + this.formDia = false + this.$emit('closeCarryOutDia') + }, + getAuthorizedPerson() { + this.$axios.get(this.$api.user.getUserMenu).then(res => { + let data = [] + res.data.forEach(a => { + data.push({ + label: a.name, + value: a.id + }) + }) + this.personList = data + }) + }, + } +}; +</script> + +<style scoped> +>>>.el-dialog { + margin: 20px auto 50px !important; +} +.tables { + table-layout: fixed; + width: 100%; + margin-top: 10px; +} +.td-title { + height: 40px; + width: 100px; + text-align: center; + font-size: 14px; + word-wrap: break-word; + white-space: normal; + padding: 6px; +} +.td-info { + display: inline-block; + width: 100%; + text-align: center; + font-size: 14px; + word-wrap: break-word; + white-space: normal; +} +.td-info2 { + display: inline-block; + width: 90%; + text-align: left; + font-size: 16px; + word-wrap: break-word; + white-space: normal; + margin-left: 20px; +} +.tables td { + height: 40px; + width: 100px; + font-size: 14px; + word-wrap: break-word; + white-space: normal; + padding: 6px; +} +.td-info3 { + width: 90%; + display: inline-block; + text-align: right; +} +</style> diff --git a/src/views/CNAS/process/ensureResultsValidity/components/detailFormDialog.vue b/src/views/CNAS/process/ensureResultsValidity/components/detailFormDialog.vue new file mode 100644 index 0000000..8225f29 --- /dev/null +++ b/src/views/CNAS/process/ensureResultsValidity/components/detailFormDialog.vue @@ -0,0 +1,158 @@ +<template> + <div> + <el-dialog title="缂栬緫" :visible.sync="formDia" + :close-on-click-modal="false" + :close-on-press-escape="false" + width="80%" @close="closeDia"> + <el-form :model="form" :rules="rules" ref="form" label-width="140px"> + <el-col :span="12"> + <el-form-item label="鐩戞帶鐩殑" prop="monitorPurpose"> + <el-input v-model="form.monitorPurpose" size="small" clearable></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="璁″垝寮�灞曟椂闂�" prop="plannedTime"> + <el-input v-model="form.plannedTime" size="small" clearable></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鐩戞帶椤圭洰" prop="monitorProject"> + <el-input v-model="form.monitorProject" size="small" clearable></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鍙傚姞鍗曚綅锛堜汉鍛橈級" prop="participant"> + <el-input v-model="form.participant" size="small" clearable></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="棰勭畻锛堝厓锛�" prop="budget"> + <el-input v-model="form.budget" size="small" clearable></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="缁勭粐浜哄憳" prop="organization"> + <el-input v-model="form.organization" size="small" clearable></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鐩戞帶鏂瑰紡" prop="monitorWay"> + <el-input v-model="form.monitorWay" size="small" clearable></el-input> + </el-form-item> + </el-col> + </el-form> + <span slot="footer" class="dialog-footer"> + <el-button @click="closeDia">鍙� 娑�</el-button> + <el-button type="primary" @click="submitForm" :loading="upLoad">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +export default { + name: 'detailFormDialog', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {}, + props: ['qualityMonitorId'], + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + formDia: false, + form: { + qualityMonitorDetailsId: '', + monitorPurpose: '', + plannedTime: '', + monitorProject: '', + participant: '', + budget: '', + organization: '', + monitorWay: '', + }, + rules: { + monitorPurpose: [{ required: true, message: '璇疯緭鍏ョ洃鎺х洰鐨�', trigger: 'blur' }], + monitorProject: [{ required: true, message: '璇疯緭鍏ョ洃鎺ч」鐩�', trigger: 'blur' }], + }, + upLoad: false, + operationType: '', + }; + }, + // 鏂规硶闆嗗悎 + methods: { + openDia(type, row) { + this.formDia = true + this.operationType = type + if (type === 'edit') { + this.searchInfo(row) + } + }, + searchInfo (row) { + this.form = {...row} + }, + // 鎻愪氦琛ㄥ崟 + submitForm () { + this.$refs['form'].validate((valid) => { + if (valid) { + if (this.operationType === 'add') { + this.handleAdd() + } else { + this.handleEdit() + } + } + }) + }, + // 鎻愪氦鏂板 + handleAdd () { + let entity = this.HaveJson(this.form) + entity.qualityMonitorId = this.qualityMonitorId + this.upLoad = true + this.$axios.post(this.$api.qualityMonitor.addQualityMonitorDetail, entity, { + headers: { + "Content-Type": "application/json" + }, + noQs: true + }).then(res => { + this.upLoad = false + if (res.code === 201) return + this.$message.success('鏂板鎴愬姛') + this.closeDia() + }).catch(err => { + console.log('err---', err); + this.upLoad = false + }) + }, + // 鎻愪氦淇敼 + handleEdit () { + const entity = this.HaveJson(this.form) + this.upLoad = true + this.$axios.post(this.$api.qualityMonitor.updateQualityMonitorDetail, entity, { + headers: { + "Content-Type": "application/json" + }, + noQs: true + }).then(res => { + this.upLoad = false + if (res.code === 201) return + this.$message.success('淇敼鎴愬姛') + this.closeDia() + }).catch(err => { + console.log('err---', err); + this.upLoad = false + }) + }, + // 鍏抽棴寮规 + closeDia () { + this.$refs.form.resetFields(); + this.formDia = false + this.$emit('closeDia') + }, + } +}; +</script> + +<style scoped> +>>>.el-dialog__body { + max-height: 720px; + overflow-y: auto; +} +</style> diff --git a/src/views/CNAS/process/ensureResultsValidity/components/evaluateDialog.vue b/src/views/CNAS/process/ensureResultsValidity/components/evaluateDialog.vue new file mode 100644 index 0000000..d63fc50 --- /dev/null +++ b/src/views/CNAS/process/ensureResultsValidity/components/evaluateDialog.vue @@ -0,0 +1,351 @@ +<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'; + +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 + this.$axios.get(this.$api.qualityMonitor.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) { + this.$axios.post(this.$api.qualityMonitor.addMonitorEvaluateOpinion, this.form, { + headers: { + "Content-Type": "application/json" + }, + noQs: true + }).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 + } + } + this.$axios.post(this.$api.qualityMonitor.addQualityMonitorEvaluate, this.form, { + headers: { + "Content-Type": "application/json" + }, + noQs: true + }).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() { + this.$axios.get(this.$api.user.getUserMenu).then(res => { + let data = [] + res.data.forEach(a => { + data.push({ + label: a.name, + value: a.id + }) + }) + this.personList = data + }) + }, + getDepartment() { + this.$axios.get(this.$api.user.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> diff --git a/src/views/CNAS/process/ensureResultsValidity/index.vue b/src/views/CNAS/process/ensureResultsValidity/index.vue new file mode 100644 index 0000000..04828cc --- /dev/null +++ b/src/views/CNAS/process/ensureResultsValidity/index.vue @@ -0,0 +1,837 @@ +<template> + <!-- 7.7璐ㄩ噺鐩戞帶璁″垝--> + <div class="app-container"> + <div class="table-card"> + <div style="display: flex;justify-content: space-between;"> + <el-form :model="yearForm" ref="yearForm" size="small" :inline="true"> + <el-form-item label="璁″垝鍚嶇О" prop="monitorName"> + <el-input size="small" placeholder="璇疯緭鍏�" clearable + v-model="yearForm.monitorName" + @keyup.enter.native="getYearPlanList"></el-input> + </el-form-item> + <el-form-item> + <el-button icon="el-icon-refresh" size="mini" @click="clearYear">閲� 缃�</el-button> + <el-button type="primary" icon="el-icon-search" size="mini" @click="getYearPlanList">鏌� 璇�</el-button> + </el-form-item> + </el-form> + <div> + <el-button size="small" type="primary" @click="leadInto">瀵煎叆</el-button> + </div> + </div> + <lims-table :tableData="yearTableData" :column="yearColumnData" :page="yearPage" :tableLoading="yearLoading" + height="40vh" @pagination="pagination" + key="yearTableData"></lims-table> + </div> + <div style="margin-top: 20px"> + <div style="display: flex;justify-content: space-between;"> + <el-form :model="yearDetailForm" ref="yearDetailForm" size="small" :inline="true"> + <el-form-item label="鐩戞帶鐩殑" prop="monitorPurpose"> + <el-input v-model="yearDetailForm.monitorPurpose" placeholder="璇疯緭鍏�" size="small"></el-input> + </el-form-item> + <el-form-item label="鐩戞帶椤圭洰" prop="monitorProject"> + <el-input v-model="yearDetailForm.monitorProject" placeholder="璇疯緭鍏�" size="small"></el-input> + </el-form-item> + <el-form-item> + <el-button icon="el-icon-refresh" size="mini" @click="clearDetail">閲� 缃�</el-button> + <el-button type="primary" icon="el-icon-search" size="mini" @click="getYearDetailPlanList">鏌� 璇�</el-button> + </el-form-item> + </el-form> + <div> + <el-button size="small" type="primary" @click="showDialog('add')">鏂板</el-button> + </div> + </div> + <lims-table :tableData="yearDetailTableData" :column="yearDetailColumnData" :page="yearDetailPage" :tableLoading="yearDetailLoading" + height="40vh" @pagination="pagination1" + key="yearDetailTableData"></lims-table> + </div> + <!--鏂板淇敼寮规--> + <detail-form-dialog v-if="formDia" ref="formDia" :qualityMonitorId="qualityMonitorId" @closeDia="closeDia"></detail-form-dialog> + <!--瀹炴柦娴佺▼寮规--> + <carry-out-dialog v-if="carryOutDia" ref="carryOutDia" :qualityMonitorId="qualityMonitorId" @closeDia="closeCarryOutDia"></carry-out-dialog> + <!--璇勪环娴佺▼寮规--> + <evaluate-dialog v-if="evaluateDialog" ref="evaluateDialog" @closeEvaDia="closeEvaDia"></evaluate-dialog> + <el-dialog :visible.sync="examineDialog" title="瀹℃牳" width="30%" @close="closeExamineDia"> + <span> + 瀹℃牳澶囨敞锛� + <el-input v-model="examineInfo.examineRemark" type="textarea"></el-input> + </span> + <span style="margin-top: 10px;display: inline-block"> + 鎵瑰噯浜猴細 + <el-select v-model="examineInfo.ratifyUserId" clearable + filterable size="small" style="width: 70%;"> + <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> + </el-option> + </el-select> + </span> + <span slot="footer" class="dialog-footer"> + <el-button :loading="examineLoading" @click="handleReview(0)">涓嶉�氳繃</el-button> + <el-button :loading="examineLoading" type="primary" @click="handleReview(1)">閫� 杩�</el-button> + </span> + </el-dialog> + <el-dialog :visible.sync="ratifyDialog" title="鎵瑰噯" width="30%" @close="closeRatifyDia"> + <span> + 鎵瑰噯澶囨敞锛� + <el-input v-model="ratifyInfo.ratifyRemark" type="textarea"></el-input> + </span> + <span slot="footer" class="dialog-footer"> + <el-button :loading="ratifyLoading" @click="handleRatify(0)">涓嶆壒鍑�</el-button> + <el-button :loading="ratifyLoading" type="primary" @click="handleRatify(1)">鎵� 鍑�</el-button> + </span> + </el-dialog> + <!--棰勮鎶ュ憡--> + <el-dialog + :visible.sync="lookDialogVisible" + fullscreen + title="鏌ョ湅闄勪欢" top="5vh" width="800px"> + <filePreview v-if="lookDialogVisible" :currentFile="{}" + :fileUrl="javaApi+'/word/' + currentInfo.finishReportUrl" style="height: 70vh;overflow-y: auto;"/> + <div> + 鎵瑰噯鐘舵�侊細 + <el-tag v-if="this.ratifyStatus === 1" type="success">鎵瑰噯</el-tag> + <el-tag v-if="this.ratifyStatus === 0" type="danger">涓嶆壒鍑�</el-tag> + </div> + <div> + 鎵瑰噯鎰忚锛� + <el-input v-model="approvalRemarks" :disabled="this.ratifyStatus === 1" type="textarea"></el-input> + </div> + <span v-if="this.ratifyStatus !== 1" slot="footer" class="dialog-footer"> + <el-button :loading="lookDialogLoading" @click="handleApproval(0)">涓嶆壒鍑�</el-button> + <el-button :loading="lookDialogLoading" type="primary" @click="handleApproval(1)">鎵� 鍑�</el-button> + </span> + </el-dialog> + <el-dialog :visible.sync="downloadDialog" title="瀵煎嚭" width="600px"> + <span> + <el-button plain type="primary" @click="controlDown">瀹炴柦璁″垝瀵煎嚭</el-button> + <el-button plain type="primary" @click="processingDown">璇勪环瀵煎嚭</el-button> + </span> + <span slot="footer" class="dialog-footer"> + <el-button @click="downloadDialog = false">鍙� 娑�</el-button> + </span> + </el-dialog> + <!--瀵煎叆璁″垝--> + <el-dialog :visible.sync="uploadDia" title="鏁版嵁瀵煎叆" width="500px" :close-on-click-modal="false" :close-on-press-escape="false"> + <div style="display: flex; align-items: center;"> + <span style="width: 60px">骞翠唤锛�</span> + <el-date-picker + v-model="planYear" + type="year" + value-format="yyyy" + clearable + size="small" + format="yyyy" + placeholder="閫夋嫨骞�"> + </el-date-picker> + </div> + <div style="display: flex;align-items: center;margin: 10px 0"> + <div style="width: 60px">瀹℃牳浜猴細</div> + <el-select v-model="examineUserId" clearable + filterable size="small" style="width: 50%;"> + <el-option v-for="item in responsibleOptions" :key="item.id" :label="item.name" :value="item.id"> + </el-option> + </el-select> + </div> + <div style="margin: 0 auto;"> + <el-upload ref="upload" :action="action" :auto-upload="false" :file-list="fileList" + :headers="headers" :limit="1" + accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' + :on-change="beforeUpload" :on-error="onError" :on-success="handleSuccessUp" drag + :data="{planYear: planYear, examineUserId: examineUserId}" + name="file"> + <i class="el-icon-upload"></i> + <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div> + </el-upload> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="uploadDia = false">鍙� 娑�</el-button> + <el-button :loading="uploading" type="primary" @click="submitUpload">涓� 浼�</el-button> + </span> + </el-dialog> + <!--鐢熸垚鎶ュ憡寮规--> + <el-dialog :visible.sync="uploadDia1" title="鐢熸垚鎶ュ憡" width="500px"> + <div v-if="approvalRemarks"> + 鎵瑰噯鎰忚锛� + <el-input v-model="approvalRemarks" :disabled="this.ratifyStatus === 1" type="textarea"></el-input> + </div> + <div style="margin: 0 auto;"> + <el-upload ref="upload1" :action="action1" :auto-upload="false" + :data="{qualityMonitorDetailsId: qualityMonitorDetailsId}" :file-list="fileList1" :headers="headers" + :limit="1" + :on-change="beforeUpload1" :on-error="onError1" :on-success="onSuccess1" accept='.doc,.docx' + drag + name="file"> + <i class="el-icon-upload"></i> + <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div> + </el-upload> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="uploadDia1 = false">鍙� 娑�</el-button> + <el-button :loading="uploading1" type="primary" @click="submitUpload1()">涓� 浼�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import DetailFormDialog from './components/detailFormDialog.vue'; +import CarryOutDialog from './components/carryOutDialog.vue'; +import EvaluateDialog from './components/evaluateDialog.vue'; +import filePreview from "@/components/Preview/filePreview.vue"; +import limsTable from "@/components/Table/lims-table.vue"; +import { + delQualityMonitorDetail, + delQualitySupervise, + examineQualityMonitor, exportQualityMonitorDetail, exportQualityMonitorEvaluate, exportQualityMonitorRatify, + pageQualityMonitor, pageQualityMonitorDetail, ratifyFinishReport, + ratifyQualityMonitor +} from "@/api/cnas/process/ensureResultsValidity/qualityMonitor"; +import {selectUserCondition} from "@/api/performance/class"; +import {getToken} from "@/utils/auth"; + +export default { + name: 'a7-Ensure-results-validity', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {limsTable, filePreview, EvaluateDialog, CarryOutDialog, DetailFormDialog }, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + examineUserId: '', + responsibleOptions: [], + yearForm: { + monitorName: '', + }, + yearPage: { + current: 1, + size: 20, + total: 0 + }, + yearColumnData: [ + { + label: '璁″垝鍚嶇О', + prop: 'monitorName', + minWidth: '150px' + }, { + label: '缂栧埗浜�', + prop: 'writeName', + minWidth: '100' + }, { + label: '缂栧埗鏃ユ湡', + prop: 'writeTime', + minWidth: '160' + }, { + dataType: 'tag', + label: '瀹℃牳鐘舵��', + prop: 'examineStatus', + minWidth: '100', + formatData: (params) => { + if (params === 0) { + return '涓嶉�氳繃'; + } else if (params === 1) { + return '閫氳繃'; + } else { + return null; + } + }, + formatType: (params) => { + if (params === 0) { + return 'danger'; + } else if (params === 1) { + return 'success'; + } else { + return null; + } + } + }, { + label: '瀹℃牳鍐呭', + prop: 'examineRemark', + minWidth: '100' + }, { + label: '瀹℃牳浜�', + prop: 'examineName', + minWidth: '100' + }, { + label: '瀹℃牳鏃ユ湡', + prop: 'examineTime', + minWidth: '160' + },{ + dataType: 'tag', + label: '鎵瑰噯鐘舵��', + prop: 'ratifyStatus', + minWidth: '100', + formatData: (params) => { + if (params === 0) { + return '涓嶆壒鍑�'; + } else if (params === 1) { + return '鎵瑰噯'; + } else { + return null; + } + }, + formatType: (params) => { + if (params === 0) { + return 'danger'; + } else if (params === 1) { + return 'success'; + } else { + return null; + } + } + },{ + label: '鎵瑰噯鍐呭', + prop: 'ratifyRemark', + minWidth: '100' + },{ + label: '鎵瑰噯浜�', + prop: 'ratifyName', + minWidth: '100' + },{ + label: '鎵瑰噯鏃ユ湡', + prop: 'ratifyTime', + minWidth: '160' + }, { + dataType: 'action', + minWidth: '190', + label: '鎿嶄綔', + fixed: 'right', + operation: [ + { + name: '瀹℃牳', + type: 'text', + disabled: (row) => { + if (row.examineStatus === 1 || JSON.parse(localStorage.getItem("user")).userId != row.examineUserId) { + return true + } else { + return false + } + }, + clickFun: (row) => { + this.examinePlan(row) + } + }, + { + name: '鎵瑰噯', + type: 'text', + disabled: (row) => { + if (row.ratifyStatus === 1 || row.examineStatus !== 1 || JSON.parse(localStorage.getItem("user")).userId != row.ratifyUserId) { + return true + } else { + return false + } + }, + clickFun: (row) => { + this.approvalPlan(row) + } + }, + { + name: '瀵煎嚭', + type: 'text', + clickFun: (row) => { + this.handleDown(row) + }, + disabled: (row) => { + if (row.ratifyStatus !== 1) { + return true + } else { + return false + } + }, + }, + { + name: '鍒犻櫎', + type: 'text', + color: '#f56c6c', + clickFun: (row) => { + this.delPlan(row) + }, + disabled: (row) => { + if(row.examineStatus === 1) { + return true; + } else { + return false; + } + }, + } + ] + }], + yearTableData: [], // 骞磋〃 + yearLoading: false, + yearDetailForm: { + monitorPurpose: '', + monitorProject: '', + }, + yearDetailColumnData: [ + { + label: '鐩戞帶鐩殑', + prop: 'monitorPurpose', + width: '150px', + showOverflowTooltip: true, + }, { + label: '璁″垝寮�灞曟椂闂�', + prop: 'plannedTime', + minWidth: '150px' + }, { + label: '鐩戞帶椤圭洰', + prop: 'monitorProject', + minWidth: '150px' + }, { + label: '鍙傚姞鍗曚綅锛堜汉鍛橈級', + prop: 'participant', + minWidth: '150px' + }, { + label: '棰勭畻锛堝厓锛�', + prop: 'budget', + minWidth: '150px' + },{ + label: '缁勭粐浜哄憳', + prop: 'organization', + minWidth: '150px' + },{ + label: '鐩戞帶鏂瑰紡', + prop: 'monitorWay', + minWidth: '150px' + }, { + dataType: 'action', + width: '280', + label: '鎿嶄綔', + fixed: 'right', + operation: [ + { + name: '缂栬緫', + type: 'text', + clickFun: (row) => { + this.showDialog('edit', row) + } + }, + { + name: '瀹炴柦', + type: 'text', + clickFun: (row) => { + this.carryOut(row) + } + }, + { + name: '瀹屾垚鎶ュ憡', + type: 'text', + clickFun: (row) => { + this.record(row) + }, + }, + { + name: '璇勪环', + type: 'text', + clickFun: (row) => { + this.evaluate(row) + } + }, + { + name: '瀵煎嚭', + type: 'text', + clickFun: (row) => { + this.downLoadPost(row); + }, + }, + { + name: '鍒犻櫎', + type: 'text', + color: '#f56c6c', + clickFun: (row) => { + this.delYearPlanDetail(row) + } + } + ] + } + ], + yearDetailTableData: [], // 骞存槑缁嗚〃 + yearDetailLoading: false, + yearDetailPage: { + current: 1, + size: 20, + total: 0 + }, + formDia: false, + qualityMonitorId: '', + carryOutDia: false, + evaluateDialog: false, + examineDialog: false, + examineLoading: false, + ratifyDialog: false, + ratifyLoading: false, + examineInfo: {}, + ratifyInfo: {}, + upLoading: false, + uploadDia: false, + uploadDia1: false, + uploading: false, + uploading1: false, + fileList: [], + fileList1: [], + lookDialogVisible: false, + lookDialogLoading: false, + currentInfo: {}, + qualityMonitorDetailsId: '', + ratifyStatus: '', + approvalRemarks: '', + downloadDialog: false, + download: {}, + planYear: '', + headers: { + Authorization: "Bearer " + getToken(), + }, + }; + }, + mounted() { + this.getYearPlanList() + }, + // 鏂规硶闆嗗悎 + methods: { + // 鏌ヨ骞村害璁″垝琛� + getYearPlanList () { + const entity = { + monitorName: this.yearForm.monitorName, + } + const page = this.yearPage + this.yearLoading = true + pageQualityMonitor({ ...entity, ...page }).then(res => { + this.yearLoading = false + this.yearTableData = res.data.records + this.yearPage.total = res.data.total + if (this.yearTableData.length > 0) { + this.rowClick(this.yearTableData[0]) + } + }).catch(err => { + console.log('err---', err); + this.yearLoading = false + }) + }, + clearYear () { + this.yearForm.monitorName = '' + this.getYearPlanList() + }, + pagination({ page, limit }) { + this.yearPage.current = page; + this.yearPage.size = limit; + this.getYearPlanList(); + }, + pagination1({ page, limit }) { + this.yearDetailPage.current = page; + this.yearDetailPage.size = limit; + this.getYearPlanList(); + }, + leadInto () { + this.uploadDia = true + this.getUserList() + }, + // 瀵煎叆娴佺▼ + beforeUpload(file) { + if (file.size > 1024 * 1024 * 10) { + this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M'); + this.$refs.upload.clearFiles() + return false; + } else { + return true; + } + }, + onError(err, file, fileList) { + this.$message.error('涓婁紶澶辫触') + this.$refs.upload.clearFiles() + }, + handleSuccessUp(response) { + this.uploading = false; + if (response.code == 200) { + this.$message.success('涓婁紶鎴愬姛'); + } else { + this.$message.error(response.msg) + } + }, + submitUpload () { + if (!this.planYear) { + this.$message.warning('璇烽�夋嫨骞翠唤') + return; + } + if (!this.examineUserId) { + this.$message.warning('璇烽�夋嫨鎵瑰噯浜�') + return; + } + this.$refs.upload.submit(); + this.timer = setTimeout(() => { + this.uploadDia = false + this.fileList = [] + this.planYear = '' + this.examineUserId = '' + this.getYearPlanList() + }, 1000) + }, + // end + // 瀹℃牳 + examinePlan (row) { + this.examineDialog = true + this.examineInfo = row + this.getUserList() + }, + handleReview (examineStatus) { + // 瀹℃牳鐘舵�� , 0 涓嶉�氳繃, 1閫氳繃 + this.examineInfo.examineStatus = examineStatus + this.examineLoading = true + examineQualityMonitor(this.examineInfo).then(res => { + this.examineLoading = false + this.$message.success('鎿嶄綔鎴愬姛') + this.closeExamineDia() + }).catch(err => { + console.log('err---', err); + this.examineLoading = false + }) + }, + closeExamineDia () { + this.examineDialog = false + this.examineInfo.examineRemark = '' + this.getYearPlanList() + }, + // 鎵瑰噯 + approvalPlan (row) { + this.ratifyDialog = true + this.ratifyInfo = row + }, + handleRatify (ratifyStatus) { + // 鎵瑰噯鐘舵�� , 0 涓嶉�氳繃, 1閫氳繃 + this.ratifyInfo.ratifyStatus = ratifyStatus + this.ratifyLoading = true + ratifyQualityMonitor(this.ratifyInfo).then(res => { + this.ratifyLoading = false + this.$message.success('鎿嶄綔鎴愬姛') + this.closeRatifyDia() + }).catch(err => { + console.log('err---', err); + this.ratifyLoading = false + }) + }, + closeRatifyDia () { + this.ratifyDialog = false + this.ratifyInfo.ratifyRemark = '' + this.getYearPlanList() + }, + // 鎵瑰噯鎶ュ憡 + handleApproval (status) { + const personTrainingUpdateDto = { + qualityMonitorDetailsId: this.currentInfo.qualityMonitorDetailsId, + ratifyRemark: this.approvalRemarks, + ratifyStatus: status + } + this.lookDialogLoading = true + ratifyFinishReport(personTrainingUpdateDto).then(res => { + if (res.code === 200) { + this.$message.success('鎻愪氦鎴愬姛锛�'); + this.lookDialogVisible = false + this.getYearDetailPlanList(); + } + this.lookDialogLoading = false + }).catch(() => { + this.lookDialogLoading = false + }) + }, + // 瀵煎嚭 + handleDown (row) { + exportQualityMonitorDetail({qualityMonitorId: row.qualityMonitorId}).then(res => { + this.outLoading = false + const blob = new Blob([res],{ type: 'application/msword' }); + this.$download.saveAs(blob, row.monitorName + '.docx') + this.$message.success('瀵煎嚭鎴愬姛') + }) + }, + // 鍒犻櫎杩涘害璁″垝琛� + delPlan (row) { + this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + this.yearLoading = true + delQualitySupervise({qualityMonitorId: row.qualityMonitorId}).then(res => { + this.yearLoading = false + this.$message.success('鍒犻櫎鎴愬姛') + this.getYearPlanList() + }).catch(err => { + this.yearLoading = false + console.log('err---', err); + }) + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }); + }); + }, + // 骞村害璁″垝琛ㄦ牸锛岀偣鍑昏鏁版嵁鍚庡埛鏂拌鎯� + rowClick(row) { + this.qualityMonitorId = row.qualityMonitorId + this.getYearDetailPlanList() + }, + // 鑾峰彇骞村害鏄庣粏琛� + getYearDetailPlanList () { + const entity = { + qualityMonitorId: this.qualityMonitorId, + monitorPurpose: this.yearDetailForm.monitorPurpose, + monitorProject: this.yearDetailForm.monitorProject, + } + const page = this.yearDetailPage + this.yearDetailLoading = true + pageQualityMonitorDetail({ ...entity, ...page }).then(res => { + this.yearDetailLoading = false + this.yearDetailTableData = res.data.records + this.yearDetailPage.total = res.data.total + }).catch(err => { + console.log('err---', err); + this.yearDetailLoading = false + }) + }, + // 閲嶇疆鏄庣粏琛� + clearDetail () { + this.yearDetailForm = { + monitorPurpose: '', + monitorProject: '' + } + this.getYearDetailPlanList() + }, + // 鏄庣粏琛ㄥ疄鏂� + carryOut (row) { + this.carryOutDia = true + this.$nextTick(() => { + this.$refs.carryOutDia.openDia(row) + }) + }, + closeCarryOutDia () { + this.carryOutDia = false + this.getYearDetailPlanList() + }, + // 鎵撳紑鎶ュ憡寮规 + record (row) { + this.qualityMonitorDetailsId = row.qualityMonitorDetailsId + this.approvalRemarks = row.approvalRemarks + if (row.finishReportUrl) { + this.currentInfo = row + this.ratifyStatus = row.ratifyStatus + this.lookDialogVisible = true + } else { + this.uploadDia1 = true + } + }, + onSuccess1(response, file, fileList) { + this.$refs.upload1.clearFiles() + this.uploading1 = false + if (response.code == 200) { + this.$message.success('涓婁紶鎴愬姛'); + this.uploadDia1 = false + } else { + this.$message.error(response.msg) + } + this.getYearDetailPlanList() + }, + beforeUpload1(file) { + if (file.size > 1024 * 1024 * 10) { + this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M'); + this.$refs.upload1.clearFiles() + return false; + } else { + return true; + } + }, + onError1(err, file, fileList) { + this.$message.error('涓婁紶澶辫触') + this.$refs.upload1.clearFiles() + this.uploading1 = false + }, + submitUpload1() { + if (this.$refs.upload1.uploadFiles.length === 0) { + this.$message.error('鏈�夋嫨鏂囦欢') + return + } + this.uploading1 = true + this.$refs.upload1.submit(); + this.uploadDia1 = false; + }, + // end + // 鎵撳紑璇勪环寮规 + evaluate (row) { + this.evaluateDialog = true + this.$nextTick(() => { + this.$refs.evaluateDialog.openDia(row) + }) + }, + closeEvaDia () { + this.evaluateDialog = false + this.getYearDetailPlanList() + }, + // 鎵撳紑瀵煎嚭寮规 + downLoadPost (row) { + this.downloadDialog = true + this.download = row + }, + // 鎵撳紑骞村害鏄庣粏鏂板銆佷慨鏀瑰脊妗� + showDialog (type, row) { + this.formDia = true + this.$nextTick(() => { + this.$refs.formDia.openDia(type, row) + }) + }, + closeDia () { + this.formDia = false + this.getYearDetailPlanList() + }, + // 鎺у埗鍗曞鍑� + controlDown() { + exportQualityMonitorRatify({qualityMonitorDetailsId: this.download.qualityMonitorDetailsId}).then(res => { + this.outLoading = false + const blob = new Blob([res], { type: 'application/msword' }); + this.$download.saveAs(blob, '璐ㄩ噺鐩戞帶瀹炴柦璁″垝.docx') + this.$message.success('瀵煎嚭鎴愬姛') + }) + }, + // 澶勭悊鍗曞鍑� + processingDown() { + exportQualityMonitorEvaluate({qualityMonitorDetailsId: this.download.qualityMonitorDetailsId}).then(res => { + this.outLoading = false + const blob = new Blob([res], { type: 'application/msword' }); + this.$download.saveAs(blob, '璐ㄩ噺鐩戞帶璇勪环.docx') + this.$message.success('瀵煎嚭鎴愬姛') + }) + }, + delYearPlanDetail (row) { + this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + this.yearDetailLoading = true + delQualityMonitorDetail({qualityMonitorDetailsId: row.qualityMonitorDetailsId}).then(res => { + this.yearDetailLoading = false + this.$message.success('鍒犻櫎鎴愬姛') + this.getYearDetailPlanList() + }).catch(err => { + this.yearDetailLoading = false + console.log('err---', err); + }) + }) + }, + // 鑾峰彇璐熻矗浜轰俊鎭帴鍙� + getUserList() { + selectUserCondition().then((res) => { + this.responsibleOptions = res.data; + }) + } + }, + // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭� + computed: { + action() { + return this.javaApi + '/qualityMonitor/importQualityMonitor' + }, + action1() { + return this.javaApi + '/qualityMonitor/uploadFinishReport' + } + }, + beforeDestroy() { + clearTimeout(this.timer); + } +}; +</script> + +<style scoped> + +</style> diff --git a/src/views/business/inspectionReview/index.vue b/src/views/business/inspectionReview/index.vue index 8c19573..d065a44 100644 --- a/src/views/business/inspectionReview/index.vue +++ b/src/views/business/inspectionReview/index.vue @@ -27,18 +27,6 @@ :rowClassName="rowClassName" :height="'calc(100vh - 270px)'" @pagination="pagination" key="tableData0"></lims-table> </div> -<!-- <div style="width: 100%;height: 100%;" v-if="activeFace >0 && isCopper == null">--> -<!-- <Add :active="activeFace" :currentId="currentId"/>--> -<!-- </div>--> -<!-- <div style="width: 100%;height: 100%;" v-if="activeFace >0 && isCopper == 0">--> -<!-- <CustomsInspection :active="activeFace" :customsInspection="customsInspection" :currentId="currentId"/>--> -<!-- </div>--> -<!-- <div style="width: 100%;height: 100%;" v-if="activeFace >0 && isCopper == 1">--> -<!-- <CopperOrder :active="activeFace" :currentId="currentId"></CopperOrder>--> -<!-- </div>--> -<!-- <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :sonLaboratory="componentData.entity.sonLaboratory" :typeSource="typeSource" :state="state"/>--> -<!-- <!–浜т笟閾句俊鎭煡鐪�–>--> -<!-- <ShowInfo v-if="showInfoDialog" :showInfoDialog="showInfoDialog" ref="showInfoDialog"></ShowInfo>--> <!--鎶ュ憡鏌ョ湅--> <el-dialog title="鎶ュ憡鏌ョ湅" :visible.sync="issuedVisible" width="80vw" :modal-append-to-body="false" :fullscreen="fullscreen"> @@ -65,7 +53,6 @@ import {selectInsOrderPlanList, selectUserCondition} from "@/api/business/inspectionTask"; import {mapGetters} from "vuex"; import {upReportUrl} from "@/api/business/insReport"; -import {delfile} from "@/api/business/rawMaterialOrder"; import filePreview from "@/components/Preview/filePreview.vue"; export default { -- Gitblit v1.9.3