From 8f1a4c831fc3080c8a8415f1d44f1341ec406d83 Mon Sep 17 00:00:00 2001 From: chenrui <1187576398@qq.com> Date: 星期三, 26 二月 2025 16:39:34 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue | 18 src/api/cnas/process/ensureResults/qualityMonitor.js | 0 src/views/CNAS/process/ensureResults/ensureResultsValidity/components/evaluateDialog.vue | 2 src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue | 2 src/views/CNAS/process/ensureResults/qualityControlPlan/components/processingSheet.vue | 510 +++++++ src/views/business/inspectionReview/index.vue | 54 src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue | 174 ++ src/api/cnas/process/ensureResults/qualitySupervise.js | 182 ++ /dev/null | 89 - src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue | 716 ++++++++++ src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue | 426 ++++++ src/main.js | 11 src/api/cnas/process/demand/demand.js | 104 src/views/CNAS/process/uncertainty/index.vue | 328 ++++ src/views/CNAS/process/demand/index.vue | 878 ++++++++++-- src/api/cnas/process/uncertainty.js | 39 src/views/CNAS/process/ensureResults/ensureResultsValidity/components/detailFormDialog.vue | 2 src/views/CNAS/process/ensureResults/qualityControlPlan/components/rectifyDialogNew.vue | 460 ++++++ src/views/CNAS/process/ensureResults/ensureResultsValidity/components/ViewRecord.vue | 0 19 files changed, 3,668 insertions(+), 327 deletions(-) diff --git a/src/api/cnas/process/demand/demand.js b/src/api/cnas/process/demand/demand.js index 5ab8327..8d007c1 100644 --- a/src/api/cnas/process/demand/demand.js +++ b/src/api/cnas/process/demand/demand.js @@ -6,55 +6,67 @@ import request from "@/utils/request"; // 濮旀墭鍗曟楠屽垎椤垫煡璇� -export const getInspectionOrder = (params) => { - return request({ - url: "/inspectionOrder/pageInspectionOrder", - method: "get", - params: params - }) +export function pageInspectionOrder(query) { + return request({ + url: '/inspectionOrder/pageInspectionOrder', + method: 'get', + params: query + }) } - +// 濮旀墭鍗曟煡璇㈡垚鍝佽鍗� +export function getInsOrderOnInspection(query) { + return request({ + url: '/inspectionOrder/getInsOrderOnInspection', + method: 'get', + params: query + }) +} +// 濮旀墭鍗曟楠屾柊澧� +export function addInspectionOrder(query) { + return request({ + url: '/inspectionOrder/addInspectionOrder', + method: 'post', + data: query + }) +} +// 濮旀墭鍗曟楠屼慨鏀� +export function updateInspectionOrder(query) { + return request({ + url: '/inspectionOrder/updateInspectionOrder', + method: 'post', + data: query + }) +} // 鏂板鏃舵牴鎹垚鍝佽鍗曟煡璇㈠鎵樺崟璇︽儏 -export const getInspectionOrderByInsOderId = (params) => { - return request({ - url: "/inspectionOrder/getInspectionOrderByInsOderId", - method: "get", - params: params - }) +export function getInspectionOrderByInsOderId(query) { + return request({ + url: '/inspectionOrder/getInspectionOrderByInsOderId', + method: 'get', + params: query + }) } - -// 鏌ヨ鍙柊澧炵殑妫�楠屽崟 -export const getInsOrderOnInspection = (data) => { - return request({ - url: "/inspectionOrder/getInsOrderOnInspection", - method: "post", - data: data - }) +// 濮旀墭鍗曟楠屾煡鐪嬭鎯� +export function getInspectionOrderOne(query) { + return request({ + url: '/inspectionOrder/getInspectionOrderOne', + method: 'get', + params: query + }) } - -// 鏌ョ湅濮旀墭鍗曡鎯� -export const getInspectionOrderOne = (params) => { - return request({ - url: "/inspectionOrder/getInspectionOrderOne", - method: "get", - params: params - }) +// 濮旀墭鍗曟楠屽垹闄� +export function delInspectionOrder(query) { + return request({ + url: '/inspectionOrder/delInspectionOrder', + method: 'get', + params: query + }) } - -// 鏂板妫�楠屽崟 -export const addInspectionOrder = (data) => { - return request({ - url: "/inspectionOrder/addInspectionOrder", - method: "post", - data: data - }) +// 濮旀墭鍗曟楠屽垹闄� +export function exportInspectionOrder(query) { + return request({ + url: '/inspectionOrder/exportInspectionOrder', + method: 'get', + params: query, + responseType: 'blob' + }) } - -// 缂栬緫妫�楠屽崟 -export const editInspectionOrder = (data) => { - return request({ - url: "/inspectionOrder/editInspectionOrder", - method: "post", - data: data - }) -} \ No newline at end of file diff --git a/src/api/cnas/process/ensureResultsValidity/qualityMonitor.js b/src/api/cnas/process/ensureResults/qualityMonitor.js similarity index 100% rename from src/api/cnas/process/ensureResultsValidity/qualityMonitor.js rename to src/api/cnas/process/ensureResults/qualityMonitor.js diff --git a/src/api/cnas/process/ensureResults/qualitySupervise.js b/src/api/cnas/process/ensureResults/qualitySupervise.js new file mode 100644 index 0000000..9de4337 --- /dev/null +++ b/src/api/cnas/process/ensureResults/qualitySupervise.js @@ -0,0 +1,182 @@ +// 璐ㄩ噺鐩戠潱璁″垝椤甸潰鐩稿叧鎺ュ彛 +import request from '@/utils/request' + +// 璐ㄩ噺鐩戠潱骞磋鍒掑垪琛� +export function pageQualitySupervise(query) { + return request({ + url: '/qualitySupervise/pageQualitySupervise', + method: 'get', + params: query + }) +} +// 璐ㄩ噺鐩戠潱骞磋鍒掑垪琛� +export function ratifyQualitySupervise(query) { + return request({ + url: '/qualitySupervise/ratifyQualitySupervise', + method: 'post', + data: query + }) +} +// 璐ㄩ噺鐩戠潱骞磋鍒掑垪琛� +export function exportQualitySupervise(query) { + return request({ + url: '/qualitySupervise/exportQualitySupervise', + method: 'get', + data: query, + responseType: "blob" + }) +} +// 鍒犻櫎鐩戠潱璁″垝 +export function delQualitySupervise(query) { + return request({ + url: '/qualitySupervise/delQualitySupervise', + method: 'delete', + params: query, + }) +} +// 璐ㄩ噺鐩戠潱骞磋鍒掑垪琛� +export function pageQualitySuperviseDetail(query) { + return request({ + url: '/qualitySupervise/pageQualitySuperviseDetail', + method: 'get', + params: query, + }) +} +// 瀵煎嚭璐ㄩ噺鐩戠潱璁″垝璁板綍鍗� +export function exportSuperviseDetailRecord(query) { + return request({ + url: '/qualitySupervise/exportSuperviseDetailRecord', + method: 'get', + params: query, + responseType: "blob" + }) +} +// 瀵煎嚭涓嶇鍚堥」 +export function superviseDetailAccordingExport(query) { + return request({ + url: '/qualitySupervise/superviseDetailAccordingExport', + method: 'get', + params: query, + responseType: "blob" + }) +} +// 瀵煎嚭鐩戠潱绾犳鎺柦 +export function exportSuperviseDetaillCorrect(query) { + return request({ + url: '/qualitySupervise/exportSuperviseDetaillCorrect', + method: 'get', + params: query, + responseType: "blob" + }) +} +// 鍒犻櫎鐩戠潱璁″垝璇︽儏 +export function delQualitySuperviseDetail(query) { + return request({ + url: '/qualitySupervise/delQualitySuperviseDetail', + method: 'delete', + params: query, + }) +} +// 鏂板鐩戠潱璁″垝璇︽儏 +export function addQualitySuperviseDetail(query) { + return request({ + url: '/qualitySupervise/addQualitySuperviseDetail', + method: 'post', + data: query, + }) +} +// 淇敼鐩戠潱璁″垝璇︽儏 +export function updateQualitySuperviseDetail(query) { + return request({ + url: '/qualitySupervise/updateQualitySuperviseDetail', + method: 'post', + data: query, + }) +} +// 鏌ヨ鐩戠潱璁″垝璁板綍娴佺▼璇︽儏 +export function getSuperviseDetailRecord(query) { + return request({ + url: '/qualitySupervise/getSuperviseDetailRecord', + method: 'get', + params: query, + }) +} +// 鏂板鐩戠潱璁板綍淇℃伅 +export function addSuperviseDetailRecord(query) { + return request({ + url: '/qualitySupervise/addSuperviseDetailRecord', + method: 'post', + data: query, + }) +} +// 鎻愪氦鐩戠潱璁板綍鎵瑰噯 +export function addSuperviseRecordOpinion(query) { + return request({ + url: '/qualitySupervise/addSuperviseRecordOpinion', + method: 'post', + data: query, + }) +} +// 鑾峰彇褰撳墠鐩戠潱璁板綍鐨勭洃鐫e憳鍒楄〃 +export function getRecordUser(query) { + return request({ + url: '/qualitySupervise/getRecordUser', + method: 'get', + params: query, + }) +} +// 鏌ヨ鐩戠潱璁板綍涓嶇鍚堟帶鍒朵俊鎭� +export function getSuperviseDetailAccording(query) { + return request({ + url: '/qualitySupervise/getSuperviseDetailAccording', + method: 'get', + params: query, + }) +} +// (瑁呭娴佺▼)鏂板鐩戠潱璁板綍涓嶇鍚堟帶鍒朵俊鎭� +export function addEquipSuperviseDetailAccording(query) { + return request({ + url: '/qualitySupervise/addEquipSuperviseDetailAccording', + method: 'post', + data: query, + }) +} +// (瑁呭娴佺▼)鎵瑰噯鐩戠潱璁板綍涓嶇鍚堟帶鍒朵俊鎭� +export function approverEquipSuperviseDetailAccording(query) { + return request({ + url: '/qualitySupervise/approverEquipSuperviseDetailAccording', + method: 'post', + data: query, + }) +} +// 鏌ヨ鐩戠潱绾犳澶勭悊 +export function getSuperviseDetailCorrect(query) { + return request({ + url: '/qualitySupervise/getSuperviseDetailCorrect', + method: 'get', + params: query, + }) +} +// (瑁呭娴佺▼)鏂板鐩戠潱绾犳澶勭悊 +export function addEquipSuperviseDetailCorrect(query) { + return request({ + url: '/qualitySupervise/addEquipSuperviseDetailCorrect', + method: 'post', + data: query, + }) +} +// (瑁呭娴佺▼)鎵瑰噯鐩戠潱绾犳澶勭悊 +export function approveEquipSuperviseDetailCorrect(query) { + return request({ + url: '/qualitySupervise/approveEquipSuperviseDetailCorrect', + method: 'post', + data: query, + }) +} +// (瑁呭娴佺▼)鎵瑰噯鐩戠潱绾犳澶勭悊 +export function getThisYearTrainingDetailed(query) { + return request({ + url: '/personTraining/getThisYearTrainingDetailed', + method: 'get' + }) +} diff --git a/src/api/cnas/process/uncertainty.js b/src/api/cnas/process/uncertainty.js new file mode 100644 index 0000000..7223cc1 --- /dev/null +++ b/src/api/cnas/process/uncertainty.js @@ -0,0 +1,39 @@ +// 涓嶇‘瀹氬害璇勫畾鐩稿叧鎺ュ彛 +import request from "@/utils/request"; + +//瀵煎嚭 +export function exportProcessEvaluate(query) { + return request({ + url: "/processEvaluate/exportProcessEvaluate", + method: "get", + responseType: "blob", + params: query, + }); +} + +// 濉啓 (涓昏涓婁紶id鍜屽娉╪ote灏卞ソ浜�) +export function doProcessEvaluate(data) { + return request({ + url: "/processEvaluate/doProcessEvaluate", + method: "post", + data: data, + }); +} + +//鍒犻櫎 +export function delProcessEvaluate(query) { + return request({ + url: "/processEvaluate/delProcessEvaluate", + method: "delete", + params: query, + }); +} + +//鍒嗛〉 +export function pageProcessEvaluate(query) { + return request({ + url: "/processEvaluate/pageProcessEvaluate", + method: "get", + params: query, + }); +} diff --git a/src/main.js b/src/main.js index 28883c0..5809760 100644 --- a/src/main.js +++ b/src/main.js @@ -66,11 +66,20 @@ }; Vue.prototype.javaApi = process.env.VUE_APP_BASE_API ? process.env.VUE_APP_BASE_API - : "http://192.168.0.170:8002"; + : "http://192.168.1.36:8002"; Vue.prototype.checkPermi = checkPermi; Vue.prototype.uploadHeader = { Authorization: "Bearer " + getToken(), }; +// 瑙e喅el-radio-group鍗曢�夋鑷韩鐨刡ug +Vue.directive('removeAriaHidden', { + bind(el, binding) { + let ariaEls = el.querySelectorAll('.el-radio__original'); + ariaEls.forEach((item) => { + item.removeAttribute('aria-hidden'); + }); + } +}) // 鍏ㄥ眬缁勪欢鎸傝浇 Vue.component("DictTag", DictTag); diff --git a/src/views/CNAS/process/demand/AddContracts.vue b/src/views/CNAS/process/demand/AddContracts.vue deleted file mode 100644 index 22fd026..0000000 --- a/src/views/CNAS/process/demand/AddContracts.vue +++ /dev/null @@ -1,465 +0,0 @@ -<template> - <el-dialog :title="title" :visible.sync="visible" width="1200px"> - <div id="dialogBody"> - <div style="max-height: 75vh;overflow-y: auto;"> - <div id="dialogBody"> - <table border="1" cellpadding="10" class="tables heads"> - <tr> - <td rowspan="2"> - <img alt="" :src="ZTTLogo" style="width: 80%;"> - </td> - <td> - <p>璁板綍鍚嶇О锛氭楠屽鎵樺崟</p> - </td> - <td> - <p>淇濆瓨鏈熼檺锛�6骞�</p> - </td> - </tr> - <tr> - <td> - <p>璁板綍缂栧彿锛� ZTT/QR-16-04-a</p> - </td> - <td> - <p>褰掓。閮ㄩ棬锛氱患鍚堝</p> - </td> - </tr> - </table> - <h4 class="table_h4"> - 妫� 楠� 濮� 鎵� 鍗� - </h4> - <p - v-if="operationType !== 'view'" - style="margin-left: 560px;display: flex;align-items: center"> - <span style="width: 100px">濮旀墭缂栧彿锛�</span> - <el-input clearable size="small"></el-input> - </p> - <p v-else style="margin-top: 16px;margin-left: 600px;"> - 濮旀墭缂栧彿锛歿{ currentInfo.entrustCode }} - </p> - <table border="1" cellpadding="10" class="tables"> - <tr> - <td colspan="2"> - <p>璇曟牱鍚嶇О</p> - </td> - <td > - <el-input v-if="operationType !== 'view'" v-model="currentInfo.sampleName" clearable size="small"></el-input> - <span v-else>{{ currentInfo.sampleName }}</span> - </td> - <td> - <p>濮旀墭鏃堕棿</p> - </td> - <td> - <el-date-picker - v-if="operationType !== 'view'" - v-model="currentInfo.commissionDate" - clearable - format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width: 100%" - type="date" - value-format="yyyy-MM-dd"> - </el-date-picker> - <span v-else>{{ currentInfo.commissionDate }}</span> - </td> - </tr> - <tr> - <td colspan="2"> - <p>鍨� 鍙�</p> - </td> - <td> - <el-input v-if="operationType !== 'view'" v-model="currentInfo.modelNo" clearable size="small"></el-input> - <span v-else>{{ currentInfo.modelNo }}</span> - </td> - <td> - <p>濮旀墭鍗曚綅</p> - </td> - <td> - <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionUnit" clearable size="small"></el-input> - <span v-else>{{ currentInfo.commissionUnit }}</span> - </td> - </tr> - <tr> - <td colspan="2"> - <p>鐢熶骇鍗曚綅</p> - </td> - <td> - <el-input v-if="operationType !== 'view'" v-model="currentInfo.production" clearable size="small"></el-input> - <span v-else>{{ currentInfo.production }}</span> - </td> - <td> - <p>濮旀墭浜�</p> - </td> - <td> - <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionUser" clearable size="small"></el-input> - <span v-else>{{ currentInfo.commissionUser }}</span> - </td> - </tr> - <tr> - <td colspan="2"> - <p>鏍峰搧鏁伴噺</p> - </td> - <td> - <el-input v-if="operationType !== 'view'" v-model="currentInfo.quantity" clearable size="small"></el-input> - <span v-else>{{ currentInfo.quantity }}</span> - </td> - <td> - <p>鏍峰搧鐘舵��</p> - </td> - <td> - <el-input v-if="operationType !== 'view'" v-model="currentInfo.sampleStatus" clearable size="small"></el-input> - <span v-else>{{ insStateList.find(m=>m.value==currentInfo.sampleStatus)?insStateList.find(m=>m.value==currentInfo.sampleStatus).label:'/' }}</span> - </td> - </tr> - <tr> - <td colspan="2"> - <p>鏄惁鐣欐牱</p> - </td> - <td> - <el-radio-group - v-if="operationType !== 'view'" - v-model="currentInfo.isLeave" - > - <el-radio :label="1">鏄�</el-radio> - <el-radio :label="0">鍚�</el-radio> - </el-radio-group> - <div v-else> - <span v-if="currentInfo.isLeave==1">鏄�</span> - <span v-else>鍚�</span> - </div> - </td> - <td> - <p>鏍峰搧澶勭悊鏂瑰紡</p> - </td> - <td v-if="operationType !== 'view'"> - <el-radio-group v-model="currentInfo.processing"> - <el-radio :label="0">濮旀墭鍗曚綅鍙栧洖</el-radio> - <el-radio :label="1">瀹為獙瀹ゅ鐞�</el-radio> - </el-radio-group> - </td> - <td v-else> - <span v-if="currentInfo.processing==0">濮旀墭鍗曚綅鍙栧洖</span> - <span v-else>瀹為獙瀹ゅ鐞�</span> - </td> - </tr> - <tr> - <td colspan="2"> - <p>绾﹀畾瀹屾垚鏃堕棿(鎶ュ憡鏃ユ湡)</p> - </td> - <td> - <el-date-picker - v-if="operationType !== 'view'" - v-model="currentInfo.appointed" - clearable - format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width: 100%" - type="date" - value-format="yyyy-MM-dd"> - </el-date-picker> - <span v-else> - {{ currentInfo.appointed }} - </span> - </td> - <td> - <p>鎶ュ憡鍙戦�佹柟寮�</p> - </td> - <td > - <el-radio-group - v-if="operationType !== 'view'" - v-model="currentInfo.send" - > - <el-radio :label="1">鑷彇</el-radio> - <el-radio :label="0">鍏朵粬</el-radio> - </el-radio-group> - <div v-else> - <span v-if="currentInfo.send==1">鑷彇</span> - <span v-else>鍏朵粬</span> - </div> - </td> - </tr> - <el-button class="add_btn" size="small" type="primary" @click="addOrderDetailList">娣诲姞</el-button> - <tr> - <td> - <p>搴忓彿</p> - </td> - <td> - <p>鏍峰搧缂栧彿</p> - </td> - <td> - <p>璇曢獙椤圭洰</p> - </td> - <td> - <p>妫�楠屼緷鎹�</p> - </td> - <td> - <p>澶囨敞</p> - </td> - </tr> - <tr v-for="(item,index) in currentInfo.orderDetailList" :key="index" > - <td>{{ index+1 }}</td> - <td> - <el-input v-if="operationType !== 'view'" v-model="item.sampleNumber" clearable size="small"></el-input> - <span v-else>{{ item.sampleNumber }}</span> - </td> - <td> - <el-input v-if="operationType !== 'view'"v-model="item.testItem" clearable size="small"></el-input> - <span v-else>{{ item.testItem }}</span> - </td> - <td> - <el-input v-if="operationType !== 'view'" v-model="item.testStandard" clearable size="small"></el-input> - <span v-else>{{ item.testStandard }}</span> - </td> - <td> - <el-input v-if="operationType !== 'view'" v-model="item.remark" clearable size="small"></el-input> - <span v-else>{{ item.remark }}</span> - </td> - </tr> - <tr> - <td colspan="2"> - <p>鍒ゅ畾瑙勫垯</p> - </td> - <td v-if="operationType !== 'view'" colspan="3"> - <el-radio-group v-model="currentInfo.criterionRule"> - <el-radio :label="0">涓嶈�冭檻涓嶇‘瀹氬害</el-radio> - <el-radio :label="1">鑰冭檻涓嶇‘瀹氬害</el-radio> - </el-radio-group> - <span v-if="currentInfo.criterionRule === 1"> - <el-input v-model="currentInfo.criterionRuleRemark" clearable size="small" style="width: 60px"></el-input> - % - </span> - </td> - <td v-else colspan="3"> - <span v-if="currentInfo.criterionRule===0">涓嶈�冭檻涓嶇‘瀹氬害</span> - <span v-if="currentInfo.criterionRule===1">鑰冭檻涓嶇‘瀹氬害</span> - <span v-if="currentInfo.criterionRule===1">{{ currentInfo.criterionRuleRemark + '%' }}</span> - </td> - </tr> - <tr> - <td colspan="2"> - <p>濮旀墭浜虹鍚�</p> - </td> - <td> - <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionUser" clearable size="small"></el-input> - <span v-else>{{currentInfo.commissionUser}}</span> - </td> - <td> - <p>濮旀墭鏃ユ湡</p> - </td> - <td> - <el-date-picker - v-if="operationType !== 'view'" - v-model="currentInfo.commissionDate" - clearable - format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width: 100%" - type="date" - value-format="yyyy-MM-dd"> - </el-date-picker> - <span v-else>{{ currentInfo.commissionDate }}</span> - </td> - </tr> - <tr> - <td colspan="2"> - <p>濮旀墭浜鸿仈绯荤數璇�</p> - </td> - <td colspan="3"> - <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionPhone" clearable size="small"></el-input> - <span v-else>{{ currentInfo.commissionPhone }}</span> - </td> - </tr> - <tr> - <td colspan="2"> - <p>缁煎悎瀹ょ鍚�</p> - </td> - <td> - <el-input v-if="operationType !== 'view'" v-model="currentInfo.generalOfficeUser" clearable size="small"></el-input> - <span v-else>{{currentInfo.generalOfficeUser}}</span> - </td> - <td> - <p>鎺ユ敹鏃ユ湡</p> - </td> - <td> - <el-date-picker - v-if="operationType !== 'view'" - v-model="currentInfo.receiptData" - clearable - format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width: 100%" - type="date" - value-format="yyyy-MM-dd"> - </el-date-picker> - <span v-else>{{ currentInfo.receiptData }}</span> - </td> - </tr> - <tr> - <td colspan="2"> - <p>棰嗘牱鍛樼鍚�</p> - </td> - <td> - <el-input v-if="operationType !== 'view'" v-model="currentInfo.sampleTakerUser" clearable size="small"></el-input> - <span v-else>{{ currentInfo.sampleTakerUser }}</span> - </td> - <td> - <p>棰嗘牱鏃ユ湡</p> - </td> - <td v-if="operationType !== 'view'"> - <el-date-picker - v-model="currentInfo.sampleData" - clearable - format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width: 100%" - type="date" - value-format="yyyy-MM-dd"> - </el-date-picker> - </td> - <td v-else>{{ currentInfo.sampleData }}</td> - </tr> - <tr> - <td colspan="2" rowspan="3"> - <p>妫�娴嬫満鏋勪俊鎭�</p> - </td> - <td colspan="3"> - <p>姹熻嫃涓ぉ绉戞妧鑲′唤鏈夐檺鍏徃妫�娴嬩腑蹇�</p> - </td> - </tr> - <tr> - <td colspan="3"> - <p>鍦板潃锛氭睙鑻忕渷鍗楅�氬競缁忔祹鎶�鏈紑鍙戝尯鏂板紑鍗楄矾 19 鍙�</p> - </td> - </tr> - <tr> - <td colspan="3"> - <p>鐢佃瘽锛�0513-89059043</p> - </td> - </tr> - </table> - <p style="margin-top: 10px;margin-left: 20px;">娉細鏈楠屽鎵樺崟涓�寮忎簩浠斤紝涓�浠界患鍚堝褰掓。锛屼竴浠藉鎵樺崟浣嶇暀瀛樸��</p> - </div> - </div> - </div> - <span v-if="operationType !== 'view'" slot="footer" class="dialog-footer"> - <el-button @click="detailDialogVisible = false">鍙� 娑�</el-button> - <el-button :loading="buttonLoading" type="primary" @click="handleSubmit"> - 纭� 瀹� - </el-button> - </span> - </el-dialog> -</template> -<script> -import ZTTLogo from "@/assets/logo/ZTTlogo.png" -import { getInspectionOrderByInsOderId, getInspectionOrderOne, addInspectionOrder, editInspectionOrder } from "@/api/cnas/process/demand/demand.js" - -export default { - name: 'AddContracts', - props: { - operationType: { - type: String, - default: '' - }, - }, - data() { - return { - title: '', - ZTTLogo, - visible: false, - currentInfo:{ - orderDetailList: [] - }, - buttonLoading: false - } - }, - methods: { - open(row) { - this.visible = true - if(operationType == 'add') { - this.goAddOrder(row) - } else { - - } - }, - // 鎵撳紑寮圭獥鐨勬椂鍊欙紝鏌ヨ闇�瑕佹柊澧炵殑濮旀墭鍗曡鎯� - async goAddOrder(row) { - this.title = '鏂板妫�楠屽鎵樺崟'; - const { code, data } = await getInspectionOrderByInsOderId({ - insOrderId: row.id - }) - if(code == 200) { - this.currentInfo = res.data - this.detailDialogVisible = true - } - }, - async goUpdateOrder(row) { - this.title = '缂栬緫妫�楠屽鎵樺崟'; - const { code, data } = await getInspectionOrderOne({ - insOrderId: row.inspectionOrderId - }) - if(code == 200) { - this.currentInfo = res.data - this.detailDialogVisible = true - } - }, - addOrderDetailList() { - if (this.currentInfo.orderDetailList == null) { - this.currentInfo.orderDetailList = [] - } - this.currentInfo.orderDetailList.push({ - sampleNumber: '', - testItem: '', - testStandard: '', - standardMethodList: '', - remark: '', - }) - }, - - async handleSubmit() { - this.operationType == 'add' ? await addInspectionOrder(this.currentInfo) : await editInspectionOrder(this.currentInfo) - } - } -} -</script> -<style lang="scss" scoped> -.tables { - table-layout: fixed; - width: 100%; - margin-top: 10px; - border-collapse: collapse; /* 鍏抽敭灞炴�э細鍚堝苟杈规 */ - td { - height: 40px; - width: 100px; - text-align: center; - font-size: 14px; - word-wrap: break-word; - white-space: normal; - p { - margin: unset - } - } -} -.heads { - td { - border: 1px dashed black; /* 鍗曞厓鏍肩殑铏氱嚎 */ - padding: 8px; - text-align: left; - } -} -.table_h4 { - display: flex; - align-items: center; - flex-direction: column; - justify-content: center; - font-size: 28px; - font-weight: bold; - margin: 10px 0 10px 0; -} -.add_btn { - margin: 10px 0 10px 10px; -} -</style> \ No newline at end of file diff --git a/src/views/CNAS/process/demand/Edit.vue b/src/views/CNAS/process/demand/Edit.vue deleted file mode 100644 index 46f3efa..0000000 --- a/src/views/CNAS/process/demand/Edit.vue +++ /dev/null @@ -1,89 +0,0 @@ -<template> - <div> - <el-dialog title="鏂板妫�楠屼换鍔″崟" :visible.sync="visible"> - <el-form :model="search" :inline="true"> - <el-form-item label="濮旀墭缂栧彿锛�"> - <el-input placeholder="璇疯緭鍏ュ鎵樼紪鍙�"></el-input> - </el-form-item> - <el-form-item> - <el-button type="primary">鏌� 璇�</el-button> - <el-button>閲� 缃�</el-button> - </el-form-item> - </el-form> - <lims-table - :column="column" - :tableData="tableData" - :page="page" - /> - </el-dialog> - <AddContracts ref="addContractsRef" :operationType="operationType" /> - </div> -</template> - -<script> - import limsTable from "@/components/Table/lims-table.vue"; - import AddContracts from "./AddContracts.vue"; - import { getInsOrderOnInspection } from "@/api/cnas/process/demand/demand.js" - - export default { - name: 'EditDemand', - components: { - limsTable, - AddContracts - }, - data() { - return { - visible: false, - search: {}, - operationType: '', - column: [ - { label: '搴忓彿', minWidth: '100px' }, - { label: '濮旀墭缂栧彿', minWidth: '100px' }, - { label: '鏍峰搧鍚嶇О', minWidth: '100px' }, - { - dataType: "action", - fixed: "right", - label: "鎿嶄綔", - operation: [ - { - name: "鏂板濮旀墭鍗�", - type: "text", - clickFun: (row) => { - this.operationType = 'add' - this.$refs.addContractsRef.open(row) - } - } - ], - }, - ], - tableData: [{}], - page: { - total: 0, - size: 10, - current: 1, - }, - } - }, - // 鎵撳紑寮圭獥 - methods: { - open(type) { - this.visible = true - this.operationType = type - this.getTableData() - }, - openAddContracts(row) { - this.operationType = 'edit' - this.$refs.addContractsRef.open(row) - }, - async getTableData() { - // 鏌ヨ褰撳墠寮圭獥琛ㄦ暟鎹� - const { code, data } = await getInsOrderOnInspection({ - ...this.search, ...this.page - }) - if (code === 200) { - this.tableData = data - } - } - } - } -</script> \ No newline at end of file diff --git a/src/views/CNAS/process/demand/index.vue b/src/views/CNAS/process/demand/index.vue index 137aba5..9667ffa 100644 --- a/src/views/CNAS/process/demand/index.vue +++ b/src/views/CNAS/process/demand/index.vue @@ -1,163 +1,737 @@ -<style lang="scss" scoped> -.standard_method { - padding: 20px; -} -.search { - background-color: #fff; - height: 80px; - display: flex; - align-items: center; -} - -.search_thing { -// width: 350px; - display: flex; - align-items: center; -} - -.search_label { - width: 110px; - font-size: 14px; - text-align: right; -} - -.search_input { - width: calc(100% - 110px); -} - -.table { - margin-top: 10px; - background-color: #fff; - width: calc(100% - 40px); - height: calc(100% - 60px - 80px - 10px - 40px); - padding: 20px; -} -</style> - <template> - <div class="standard_method"> - <el-form :model="model" :inline="true" label-width="auto"> - <el-form-item label="璇曟牱鍚嶇О锛�"> - <el-input size="small" - placeholder="璇疯緭鍏�" - clearable - @change="refreshTable()" - /> - </el-form-item> - <el-form-item label="濮旀墭鍗曚綅锛�"> - <el-input size="small" - placeholder="璇疯緭鍏�" - clearable - @change="refreshTable()" - /> - </el-form-item> - <el-form-item label="鐢熶骇鍗曚綅锛�"> - <el-input size="small" - placeholder="璇疯緭鍏�" - clearable - @change="refreshTable()" - /> - </el-form-item> - <el-form-item label="濮旀墭浜猴細"> - <el-input size="small" - placeholder="璇疯緭鍏�" - clearable - @change="refreshTable()" - /> - </el-form-item> - <el-form-item> - <el-button size="small"> - 閲� 缃� - </el-button> - <el-button size="small" type="primary"> - 鏌� 璇� - </el-button> - </el-form-item> - </el-form> - <div style="margin-bottom: 10px"> - <el-button size="small" type="primary" icon="el-icon-plus" @click="openDialog('add')"> - 鏂� 澧� - </el-button> - </div> - <lims-table - :column="column" - :tableData="tableData" - :height="'calc(100vh - 250px)'" - :page="page" - /> - <Edit ref="editRef" /> + <div class="app-container"> + <div style="display: flex;justify-content: space-between;"> + <el-form :model="entitySearch" ref="entitySearch" size="small" :inline="true"> + <el-form-item label="璇曟牱鍚嶇О" prop="sampleName"> + <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entitySearch.sampleName" + @keyup.enter.native="refreshTable"></el-input> + </el-form-item> + <el-form-item label="濮旀墭鍗曚綅" prop="commissionUnit"> + <el-input v-model="entitySearch.commissionUnit" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable()"></el-input> + </el-form-item> + <el-form-item label="鐢熶骇鍗曚綅" prop="production"> + <el-input v-model="entitySearch.production" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable()"></el-input> + </el-form-item> + <el-form-item label="濮旀墭浜�" prop="commissionUser"> + <el-input v-model="entitySearch.commissionUser" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable()"></el-input> + </el-form-item> + <el-form-item> + <el-button icon="el-icon-refresh" size="mini" @click="refresh">閲� 缃�</el-button> + <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">鏌� 璇�</el-button> + </el-form-item> + </el-form> </div> + <div style="text-align: right; margin-bottom: 20px"> + <el-button size="medium" type="primary" @click="goAdd">鏂板</el-button> + </div> + <div class="table"> + <el-table v-loading="tableListLoading" :data="tableList" height="530" style="width: 100%"> + <el-table-column align="center" label="搴忓彿" type="index" width="60"></el-table-column> + <el-table-column label="璇曟牱鍚嶇О" prop="sampleName" show-overflow-tooltip width="120"></el-table-column> + <el-table-column label="濮旀墭缂栧彿" prop="entrustCode" show-overflow-tooltip width="120"></el-table-column> + <el-table-column label="濮旀墭鏃堕棿" prop="commissionDate" width="120"></el-table-column> + <el-table-column label="鍨嬪彿" prop="modelNo"></el-table-column> + <el-table-column label="濮旀墭鍗曚綅" prop="commissionUnit" show-overflow-tooltip width="120"></el-table-column> + <el-table-column label="鐢熶骇鍗曚綅" prop="production" show-overflow-tooltip width="120"></el-table-column> + <el-table-column label="濮旀墭浜�" prop="commissionUser"></el-table-column> + <el-table-column label="鏍峰搧鏁伴噺" prop="quantity"></el-table-column> + <el-table-column label="鏍峰搧鐘舵��" prop="sampleStatus"></el-table-column> + <el-table-column label="鏄惁鐣欐牱" prop="isLeave"> + <template slot-scope="scope"> + <span v-if="scope.row.isLeave === 1">鏄�</span> + <span v-if="scope.row.isLeave === 0">鍚�</span> + </template> + </el-table-column> + <el-table-column label="鏍峰搧澶勭悊鏂瑰紡" prop="processing"> + <template slot-scope="scope"> + <span v-if="scope.row.processing === 1">瀹為獙瀹ゅ鐞�</span> + <span v-if="scope.row.processing === 0">濮旀墭鍗曚綅鍙栧洖</span> + </template> + </el-table-column> + <el-table-column align="center" label="鎿嶄綔" width="240" fixed="right"> + <template slot-scope="scope"> + <el-button size="mini" type="text" @click="goUpdate(scope.row)">缂栬緫</el-button> + <el-button size="mini" type="text" @click="handleLook(scope.row)">鏌ョ湅</el-button> + <el-button size="mini" style="color:#F56C6C" type="text" @click="deleteOrder(scope.row)">鍒犻櫎</el-button> + <el-button size="mini" type="text" @click="openDownloadDia(scope.row)">涓嬭浇</el-button> + <el-upload ref='upload' + :action="action" + :data="{inspectionOrderId: scope.row.inspectionOrderId}" :headers="uploadHeader" + :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false" accept='image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx,.xlsx' + name="file" style="background: transparent;display: inline;margin-left: 4px"> + <span style="color: #409EFF">涓婁紶</span> + </el-upload> + </template> + </el-table-column> + </el-table> + <el-pagination :current-page="1" :page-size="pages.size" :page-sizes="[10, 20, 30, 50, 100]" + :total="total1" layout="->,total, sizes, prev, pager, next" + style="margin-top: 10px" background + @size-change="handleSizeChange1" @current-change="handleCurrentChange1"> + </el-pagination> + </div> + <el-dialog + :close-on-click-modal="false" :close-on-press-escape="false" + :visible.sync="orderRowsVisible" title="鏂板妫�楠屼换鍔″崟" width="1000px"> + <div style="display: flex; align-items: center;margin-bottom: 10px"> + <span style="width: 80px">濮旀墭缂栧彿锛�</span> + <el-input v-model="entity.entrustCode" clearable size="small" style="width: 300px;margin-right: 10px"></el-input> + <el-button size="small" type="primary" @click="searchTableData">鏌ヨ</el-button> + <el-button size="small" @click="refreshTableData">閲� 缃�</el-button> + </div> + <el-table v-loading="tableLoading" :data="tableData" height="550" style="width: 100%"> + <el-table-column align="center" label="搴忓彿" type="index" width="60"></el-table-column> + <el-table-column label="濮旀墭缂栧彿" prop="entrustCode"></el-table-column> + <el-table-column label="鏍峰搧鍚嶇О" prop="sample"></el-table-column> + <el-table-column align="center" label="鎿嶄綔"> + <template slot-scope="scope"> + <el-button align="center" size="mini" type="text" @click="goAddOrder(scope.row)">鏂板濮旀墭鍗�</el-button> + </template> + </el-table-column> + </el-table> + <el-pagination :current-page="1" :page-size="tableSearch.size" :page-sizes="[10, 20, 30, 50, 100]" + :total="total" layout="->,total, sizes, prev, pager, next" + style="margin-top: 10px" background + @size-change="handleSizeChange" @current-change="handleCurrentChange"> + </el-pagination> + </el-dialog> + <el-dialog + :class="{downPdf:title=='涓嬭浇'}" :close-on-click-modal="false" + :close-on-press-escape="false" + :modal="title!='涓嬭浇'" :title="title" :visible.sync="detailDialogVisible" top="20px" width="1200px"> + <div style="max-height: 75vh;overflow-y: auto;"> + <div id="dialogBody"> + <table border="1" cellpadding="10" class="tables heads" style="border: 1px dashed black;"> + <tr> + <td rowspan="2"> + <img alt="" src="@/assets/logo/ZTTlogo.png" style="width: 80%;"> + </td> + <td> + <p>璁板綍鍚嶇О锛氭楠屽鎵樺崟</p> + </td> + <td> + <p>淇濆瓨鏈熼檺锛�6骞�</p> + </td> + </tr> + <tr> + <td> + <p>璁板綍缂栧彿锛� ZTT/QR-16-04-a</p> + </td> + <td> + <p>褰掓。閮ㄩ棬锛氱患鍚堝</p> + </td> + </tr> + </table> + <h4 style="display: flex;align-items: center;flex-direction: column;justify-content: center;"> + <span style="font-size: 28px;">妫� 楠� 濮� 鎵� 鍗�</span> + </h4> + <p v-if="operationType !== 'view'" style="margin-left: 560px;display: flex;align-items: center"> + <span style="width: 100px">濮旀墭缂栧彿锛�</span> + <el-input v-model="currentInfo.entrustCode" clearable size="small"></el-input> + </p> + <p v-if="operationType === 'view'" style="margin-top: 16px;margin-left: 600px;">濮旀墭缂栧彿锛歿{ currentInfo.entrustCode }}</p> + <table border="1" cellpadding="10" class="tables"> + <tr> + <td colspan="2"> + <p>璇曟牱鍚嶇О</p> + </td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleName" clearable size="small"></el-input></td> + <td v-if="operationType === 'view'">{{ currentInfo.sampleName }}</td> + <td> + <p>濮旀墭鏃堕棿</p> + </td> + <td v-if="operationType !== 'view'"> + <el-date-picker + v-model="currentInfo.commissionDate" + clearable + format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 100%" + type="date" + value-format="yyyy-MM-dd"> + </el-date-picker> + </td> + <td v-if="operationType === 'view'">{{ currentInfo.commissionDate }}</td> + </tr> + <tr> + <td colspan="2"> + <p>鍨� 鍙�</p> + </td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.modelNo" clearable size="small"></el-input></td> + <td v-if="operationType === 'view'">{{ currentInfo.modelNo }}</td> + <td> + <p>濮旀墭鍗曚綅</p> + </td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUnit" clearable size="small"></el-input></td> + <td v-if="operationType === 'view'">{{ currentInfo.commissionUnit }}</td> + </tr> + <tr> + <td colspan="2"> + <p>鐢熶骇鍗曚綅</p> + </td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.production" clearable size="small"></el-input></td> + <td v-if="operationType === 'view'">{{ currentInfo.production }}</td> + <td> + <p>濮旀墭浜�</p> + </td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable size="small"></el-input></td> + <td v-if="operationType === 'view'">{{ currentInfo.commissionUser }}</td> + </tr> + <tr> + <td colspan="2"> + <p>鏍峰搧鏁伴噺</p> + </td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.quantity" clearable size="small"></el-input></td> + <td v-if="operationType === 'view'">{{ currentInfo.quantity }}</td> + <td> + <p>鏍峰搧鐘舵��</p> + </td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleStatus" clearable size="small"></el-input></td> + <td v-if="operationType === 'view'">{{ insStateList.find(m=>m.value==currentInfo.sampleStatus)?insStateList.find(m=>m.value==currentInfo.sampleStatus).label:'/' }}</td> + </tr> + <tr> + <td colspan="2"> + <p>鏄惁鐣欐牱</p> + </td> + <td v-if="operationType !== 'view'"> + <el-radio-group v-model="currentInfo.isLeave" v-removeAriaHidden> + <el-radio :label="1">鏄�</el-radio> + <el-radio :label="0">鍚�</el-radio> + </el-radio-group> + </td> + <td v-if="operationType === 'view'"> + <span v-if="currentInfo.isLeave==1">鏄�</span> + <span v-else>鍚�</span> + </td> + <td> + <p>鏍峰搧澶勭悊鏂瑰紡</p> + </td> + <td v-if="operationType !== 'view'"> + <el-radio-group v-model="currentInfo.processing" v-removeAriaHidden> + <el-radio :label="0">濮旀墭鍗曚綅鍙栧洖</el-radio> + <el-radio :label="1">瀹為獙瀹ゅ鐞�</el-radio> + </el-radio-group> + </td> + <td v-if="operationType === 'view'"> + <span v-if="currentInfo.processing==0">濮旀墭鍗曚綅鍙栧洖</span> + <span v-else>瀹為獙瀹ゅ鐞�</span> + </td> + </tr> + <tr> + <td colspan="2"> + <p>绾﹀畾瀹屾垚鏃堕棿(鎶ュ憡鏃ユ湡)</p> + </td> + <td v-if="operationType !== 'view'"> + <el-date-picker + v-model="currentInfo.appointed" + clearable + format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 100%" + type="date" + value-format="yyyy-MM-dd"> + </el-date-picker> + </td> + <td v-if="operationType === 'view'">{{ currentInfo.appointed }}</td> + <td> + <p>鎶ュ憡鍙戦�佹柟寮�</p> + </td> + <td v-if="operationType !== 'view'"> + <el-radio-group v-model="currentInfo.send" v-removeAriaHidden> + <el-radio :label="1">鑷彇</el-radio> + <el-radio :label="0">鍏朵粬</el-radio> + </el-radio-group> + </td> + <td v-if="operationType === 'view'"> + <span v-if="currentInfo.send==1">鑷彇</span> + <span v-else>鍏朵粬</span> + </td> + </tr> + <el-button size="small" type="primary" @click="addOrderDetailList" v-if="operationType !== 'view'">娣诲姞</el-button> + <tr> + <td> + <p>搴忓彿</p> + </td> + <td> + <p>鏍峰搧缂栧彿</p> + </td> + <td> + <p>璇曢獙椤圭洰</p> + </td> + <td> + <p>妫�楠屼緷鎹�</p> + </td> + <td> + <p>澶囨敞</p> + </td> + </tr> + <tr v-for="(item,index) in currentInfo.orderDetailList" :key="index" > + <td>{{ index+1 }}</td> + <td v-if="operationType !== 'view'"><el-input v-model="item.sampleNumber" clearable size="small"></el-input></td> + <td v-if="operationType === 'view'">{{ item.sampleNumber }}</td> + <td v-if="operationType !== 'view'"><el-input v-model="item.testItem" clearable size="small"></el-input></td> + <td v-if="operationType === 'view'">{{ item.testItem }}</td> + <td v-if="operationType !== 'view'"><el-input v-model="item.testStandard" clearable size="small"></el-input></td> + <td v-if="operationType === 'view'">{{ item.testStandard }}</td> + <td v-if="operationType !== 'view'"><el-input v-model="item.remark" clearable size="small"></el-input></td> + <td v-if="operationType === 'view'">{{ item.remark }}</td> + </tr> + <tr> + <td colspan="2"> + <p>鍒ゅ畾瑙勫垯</p> + </td> + <td v-if="operationType !== 'view'" colspan="3"> + <el-radio-group v-model="currentInfo.criterionRule" v-removeAriaHidden> + <el-radio :label="0">涓嶈�冭檻涓嶇‘瀹氬害</el-radio> + <el-radio :label="1">鑰冭檻涓嶇‘瀹氬害</el-radio> + </el-radio-group> + <span v-if="currentInfo.criterionRule === 1"><el-input v-model="currentInfo.criterionRuleRemark" clearable size="small" style="width: 60px"></el-input>%</span> + </td> + <td v-if="operationType === 'view'" colspan="3"> + <span v-if="currentInfo.criterionRule===0">涓嶈�冭檻涓嶇‘瀹氬害</span> + <span v-if="currentInfo.criterionRule===1">鑰冭檻涓嶇‘瀹氬害</span> + <span v-if="currentInfo.criterionRule===1">{{ currentInfo.criterionRuleRemark + '%' }}</span> + </td> + </tr> + <tr> + <td colspan="2"> + <p>濮旀墭浜虹鍚�</p> + </td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable size="small"></el-input></td> + <td v-if="operationType === 'view'"> + {{currentInfo.commissionUser}} + </td> + <td> + <p>濮旀墭鏃ユ湡</p> + </td> + <td v-if="operationType !== 'view'"> + <el-date-picker + v-model="currentInfo.commissionDate" + clearable + format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 100%" + type="date" + value-format="yyyy-MM-dd"> + </el-date-picker> + </td> + <td v-if="operationType === 'view'">{{ currentInfo.commissionDate }}</td> + </tr> + <tr> + <td colspan="2"> + <p>濮旀墭浜鸿仈绯荤數璇�</p> + </td> + <td v-if="operationType !== 'view'" colspan="3"><el-input v-model="currentInfo.commissionPhone" clearable size="small"></el-input></td> + <td v-if="operationType === 'view'" colspan="3">{{ currentInfo.commissionPhone }}</td> + </tr> + <tr> + <td colspan="2"> + <p>缁煎悎瀹ょ鍚�</p> + </td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.generalOfficeUser" clearable size="small"></el-input></td> + <td v-if="operationType === 'view'">{{currentInfo.generalOfficeUser}}</td> + <td> + <p>鎺ユ敹鏃ユ湡</p> + </td> + <td v-if="operationType !== 'view'"> + <el-date-picker + v-model="currentInfo.receiptData" + clearable + format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 100%" + type="date" + value-format="yyyy-MM-dd"> + </el-date-picker> + </td> + <td v-if="operationType === 'view'">{{ currentInfo.receiptData }}</td> + </tr> + <tr> + <td colspan="2"> + <p>棰嗘牱鍛樼鍚�</p> + </td> + <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleTakerUser" clearable size="small"></el-input></td> + <td v-if="operationType === 'view'">{{ currentInfo.sampleTakerUser }}</td> + <td> + <p>棰嗘牱鏃ユ湡</p> + </td> + <td v-if="operationType !== 'view'"> + <el-date-picker + v-model="currentInfo.sampleData" + clearable + format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 100%" + type="date" + value-format="yyyy-MM-dd"> + </el-date-picker> + </td> + <td v-if="operationType === 'view'">{{ currentInfo.sampleData }}</td> + </tr> + <tr> + <td colspan="2" rowspan="3"> + <p>妫�娴嬫満鏋勪俊鎭�</p> + </td> + <td colspan="3"> + <p>姹熻嫃涓ぉ绉戞妧鑲′唤鏈夐檺鍏徃妫�娴嬩腑蹇�</p> + </td> + </tr> + <tr> + <td colspan="3"> + <p>鍦板潃锛氭睙鑻忕渷鍗楅�氬競缁忔祹鎶�鏈紑鍙戝尯鏂板紑鍗楄矾 19 鍙�</p> + </td> + </tr> + <tr> + <td colspan="3"> + <p>鐢佃瘽锛�0513-89059043</p> + </td> + </tr> + </table> + <p style="margin-top: 10px;margin-left: 20px;">娉細鏈楠屽鎵樺崟涓�寮忎簩浠斤紝涓�浠界患鍚堝褰掓。锛屼竴浠藉鎵樺崟浣嶇暀瀛樸��</p> + </div> + </div> + <span v-if="operationType !== 'view'" slot="footer" class="dialog-footer"> + <el-button @click="detailDialogVisible = false">鍙� 娑�</el-button> + <el-button v-if="operationType === 'add'" :loading="buttonLoading" type="primary" @click="handleAdd">纭� 瀹�</el-button> + <el-button v-if="operationType === 'edit'" :loading="buttonLoading" type="primary" @click="handleEdit">纭� 瀹�</el-button> + </span> + </el-dialog> + <el-dialog :visible.sync="downloadDialog" title="涓嬭浇" width="600px"> + <span> + <el-button :loading="outLoading" plain type="primary" @click="orderReportDown">涓嬭浇濮旀墭鍗�</el-button> + <el-button :loading="outLoading" plain type="primary" @click="orderFormDown">涓嬭浇濮旀墭鎶ュ憡</el-button> + </span> + <span slot="footer" class="dialog-footer"> + <el-button @click="downloadDialog = false">鍙� 娑�</el-button> + </span> + </el-dialog> + </div> </template> <script> +import { + addInspectionOrder, delInspectionOrder, exportInspectionOrder, + getInsOrderOnInspection, getInspectionOrderByInsOderId, getInspectionOrderOne, + pageInspectionOrder, + updateInspectionOrder +} from "@/api/cnas/process/demand/demand"; import limsTable from "@/components/Table/lims-table.vue"; -import Edit from './Edit.vue' -import { getInspectionOrder } from "@/api/cnas/process/demand/demand.js" +import {selectUserCondition} from "@/api/business/inspectionTask"; export default { - name: 'Demand', - components: { - limsTable, - Edit - }, - data() { - return { - queryParams: { - code: '' - }, - model: {}, - column: [ - { label: '搴忓彿', minWidth: '100px' }, - { label: '璇曟牱鍚嶇О', minWidth: '100px' }, - { label: '濮旀墭缂栧彿' }, - { label: '濮旀墭鏃堕棿' }, - { label: '鍨嬪彿' }, - { label: '濮旀墭鍗曚綅' }, - { label: '鐢熶骇鍗曚綅' }, - { label: '濮旀墭浜�' }, - { label: '鏍峰搧鏁伴噺' }, - { label: '鏍峰搧鐘舵��' }, - { label: '鏄惁鐣欐牱' }, - { label: '鏍峰搧澶勭悊鏂瑰紡' }, - { - dataType: "action", - fixed: "right", - label: "鎿嶄綔", - operation: [ - { - name: "缂� 杈�", - type: "text", - clickFun: (row) => { - this.$refs.editRef.openAddContracts(row) - } - } - ], - }, - ], - tableData: [], // 琛ㄦ牸鏁版嵁 - page: { - total: 0, - size: 10, - current: 1, - }, - } - }, - mounted() { - this.refreshTable() - }, - methods: { - /** - * @desc 鍒锋柊琛ㄦ牸 - */ - async refreshTable() { - await getInspectionOrder({ ...this.page }) + name: "a7-Inspection-Order-Form", + components: {limsTable}, + data() { + return { + title:'妫�楠屽鎵樺崟', + detailDialogVisible:false, + addLoading:false, + outLoading:false, + currentInfo:{ + orderDetailList: [] + }, + personList:[], + insStateList:[ + { + label: '寰呭鏍�', + value: 0 + }, { + label: '寰呮楠�', + value: 1 }, - /** - * @desc 鎵撳紑妯℃�佹 - */ - openDialog(type) { - this.$refs.editRef.open(type) - } + { + label: '宸叉楠�', + value: 4 + }, + { + label: '閫�鍥�', + value: 2 + }, + { + label: '鎾ら攢', + value: 3 + }, + ], + operationType: '', + orderRowsVisible: false, + tableList: [], + tableListLoading: false, + pages: { + current: 1, + size: 20, + }, + tableData: [], + tableLoading: false, + tableSearch: { + current: 1, + size: 20, + }, + total: 0, + total1: 0, + entity: { + entrustCode: '' + }, + entitySearch: { + sampleName: '', + commissionUnit: '', + production: '', + commissionUser: '', + }, + buttonLoading: false, + downloadDialog: false, + download: {}, + }; + }, + mounted() { + // this.getPower() + this.getAuthorizedPerson() + this.refreshTable() + }, + computed: { + action() { + return this.javaApi + '/inspectionOrder/uploadInspectionOrderFile' } + }, + methods: { + addOrderDetailList () { + if (this.currentInfo.orderDetailList == null) { + this.currentInfo.orderDetailList = [] + } + this.currentInfo.orderDetailList.push({ + sampleNumber: '', + testItem: '', + testStandard: '', + standardMethodList: '', + remark: '', + }) + }, + // 鏌ヨ鍒楄〃 + refreshTable() { + this.tableListLoading = true + pageInspectionOrder({ + ...this.pages, + ...this.entitySearch + }).then(res => { + this.tableListLoading = false + this.tableList = res.data.records + this.total1 = res.data.total + }).catch(err => { + this.tableListLoading = false + }) + }, + // 閲嶇疆 + refresh() { + this.entitySearch = { + sampleName: '', + commissionUnit: '', + production: '', + commissionUser: '', + } + this.pages = { + current: 1, + size: 20, + } + this.refreshTable() + }, + // 鎵撳紑鏂板寮规 + goAdd () { + this.operationType = 'add' + this.title = '鏂板妫�楠屽鎵樺崟'; + this.orderRowsVisible = true + this.searchTableData() + }, + // 鏌ヨ鍙柊澧炵殑妫�楠屽崟 + searchTableData () { + this.tableLoading = true + getInsOrderOnInspection({ + ...this.tableSearch, + ...this.entity + }).then(res => { + this.tableLoading = false + this.tableData = res.data.records + this.total = res.data.total + }).catch(err => { + this.tableLoading = false + }) + }, + // 閲嶇疆妫�楠屽崟鍒楄〃 + refreshTableData () { + this.entity = { + entrustCode: '' + } + this.tableSearch = { + current: 1, + size: 20, + } + this.searchTableData() + }, + // 妫�楠屽崟鍒楄〃鍒嗛〉 + handleSizeChange(val) { + this.tableSearch.size = val + this.searchTableData(); + }, + handleCurrentChange(val) { + this.tableSearch.current = val + this.searchTableData(); + }, + // 鍒楄〃鍒嗛〉 + handleSizeChange1(val) { + this.pages.size = val + this.refreshTable(); + }, + handleCurrentChange1(val) { + this.pages.current = val + this.refreshTable(); + }, + // 鎻愪氦鏂板 + handleAdd () { + this.buttonLoading = true + addInspectionOrder(this.currentInfo).then(res => { + this.buttonLoading = false + this.$message.success('鏂板鎴愬姛') + this.detailDialogVisible = false + this.orderRowsVisible = false + this.refreshTable() + }).catch(err => { + this.buttonLoading = false + }) + }, + // 鎻愪氦淇敼 + handleEdit () { + this.buttonLoading = true + updateInspectionOrder(this.currentInfo).then(res => { + this.buttonLoading = false + if (res.code === 201) return + this.$message.success('鏂板鎴愬姛') + this.detailDialogVisible = false + this.orderRowsVisible = false + this.refreshTable() + }).catch(err => { + this.buttonLoading = false + }) + }, + // 鏌ヨ闇�瑕佹柊澧炵殑濮旀墭鍗曡鎯� + goAddOrder (row) { + getInspectionOrderByInsOderId({insOrderId: row.id}).then(res => { + this.currentInfo = res.data + this.title = '鏂板妫�楠屽鎵樺崟'; + this.detailDialogVisible = true + }).catch(err => { + console.log('err----', err) + }) + }, + // 鎵撳紑缂栬緫寮规 + goUpdate (row) { + this.operationType = 'edit' + getInspectionOrderOne({inspectionOrderId: row.inspectionOrderId}).then(res => { + this.currentInfo = res.data + this.title = '缂栬緫妫�楠屽鎵樺崟'; + this.detailDialogVisible = true + }).catch(err => { + console.log('err----', err) + }) + }, + // 鏌ョ湅 + handleLook(row){ + this.operationType = 'view' + getInspectionOrderOne({inspectionOrderId: row.inspectionOrderId}).then(res => { + this.currentInfo = res.data + this.title = '鏌ョ湅妫�楠屽鎵樺崟'; + this.detailDialogVisible = true + }).catch(err => { + console.log('err----', err) + }) + }, + // 鍒犻櫎 + deleteOrder (row) { + this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + delInspectionOrder({inspectionOrderId: row.inspectionOrderId}).then(res => { + this.$message.success('鍒犻櫎鎴愬姛锛�'); + this.refreshTable(); + }); + }).catch(() => { + this.$message({ + type: 'info', + message: '宸插彇娑堝垹闄�' + }); + }); + }, + // 鎵撳紑涓嬭浇寮规 + openDownloadDia (row) { + this.downloadDialog = true + this.download = row + }, + // 濮旀墭鍗曚笅杞� + orderFormDown () { + let url = this.download.fileUrl; + const link = document.createElement('a'); + link.href = this.javaApi + url; + link.target = '_blank'; + document.body.appendChild(link); + link.click(); + }, + // 濮旀墭鎶ュ憡涓嬭浇 + orderReportDown () { + this.outLoading = true; + exportInspectionOrder({inspectionOrderId: this.download.inspectionOrderId}).then(res => { + this.outLoading = false; + const blob = new Blob([res], { type: 'application/octet-stream' }); + this.$download.saveAs(blob, '妫�楠屽鎵樺崟.docx') + this.$message.success('瀵煎嚭鎴愬姛'); + + }).catch(err => { + this.outLoading = false; + }) + }, + // 涓婁紶 + handleSuccessUp(response, ) { + if (response.code == 200) { + this.$message.success('涓婁紶鎴愬姛'); + this.refreshTable() + } + }, + 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() + }, + // 浜哄憳鍒楄〃 + getAuthorizedPerson() { + selectUserCondition().then(res => { + let data = [] + res.data.forEach(a => { + data.push({ + label: a.name, + value: a.id + }) + }) + this.personList = data + }) + }, + + }, } -</script> \ No newline at end of file +</script> + +<style scoped> +</style> diff --git a/src/views/CNAS/process/ensureResultsValidity/components/ViewRecord.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/ViewRecord.vue similarity index 100% rename from src/views/CNAS/process/ensureResultsValidity/components/ViewRecord.vue rename to src/views/CNAS/process/ensureResults/ensureResultsValidity/components/ViewRecord.vue diff --git a/src/views/CNAS/process/ensureResultsValidity/components/carryOutDialog.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue similarity index 99% rename from src/views/CNAS/process/ensureResultsValidity/components/carryOutDialog.vue rename to src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue index 205ec80..e7379c8 100644 --- a/src/views/CNAS/process/ensureResultsValidity/components/carryOutDialog.vue +++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/carryOutDialog.vue @@ -184,7 +184,7 @@ import { addQualityMonitorRatify, addQualityMonitorRatifyOpinion, getQualityMonitorRatify -} from "@/api/cnas/process/ensureResultsValidity/qualityMonitor"; +} from "@/api/cnas/process/ensureResults/qualityMonitor"; import {selectUserCondition} from "@/api/business/inspectionTask"; export default { diff --git a/src/views/CNAS/process/ensureResultsValidity/components/detailFormDialog.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/detailFormDialog.vue similarity index 98% rename from src/views/CNAS/process/ensureResultsValidity/components/detailFormDialog.vue rename to src/views/CNAS/process/ensureResults/ensureResultsValidity/components/detailFormDialog.vue index 66aa2b8..3089e9b 100644 --- a/src/views/CNAS/process/ensureResultsValidity/components/detailFormDialog.vue +++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/detailFormDialog.vue @@ -53,7 +53,7 @@ import { addQualityMonitorDetail, updateQualityMonitorDetail -} from "@/api/cnas/process/ensureResultsValidity/qualityMonitor"; +} from "@/api/cnas/process/ensureResults/qualityMonitor"; export default { name: 'detailFormDialog', diff --git a/src/views/CNAS/process/ensureResultsValidity/components/evaluateDialog.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/evaluateDialog.vue similarity index 99% rename from src/views/CNAS/process/ensureResultsValidity/components/evaluateDialog.vue rename to src/views/CNAS/process/ensureResults/ensureResultsValidity/components/evaluateDialog.vue index 06a9db4..78d618b 100644 --- a/src/views/CNAS/process/ensureResultsValidity/components/evaluateDialog.vue +++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/components/evaluateDialog.vue @@ -162,7 +162,7 @@ import { addMonitorEvaluateOpinion, addQualityMonitorEvaluate, getQualityMonitorEvaluate -} from "@/api/cnas/process/ensureResultsValidity/qualityMonitor"; +} from "@/api/cnas/process/ensureResults/qualityMonitor"; import {selectUserCondition} from "@/api/business/inspectionTask"; import {selectUserDepartmentLimsName} from "@/api/system/user"; diff --git a/src/views/CNAS/process/ensureResultsValidity/index.vue b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue similarity index 98% rename from src/views/CNAS/process/ensureResultsValidity/index.vue rename to src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue index c7f1316..024cb58 100644 --- a/src/views/CNAS/process/ensureResultsValidity/index.vue +++ b/src/views/CNAS/process/ensureResults/ensureResultsValidity/index.vue @@ -19,7 +19,7 @@ </div> </div> <lims-table :tableData="yearTableData" :column="yearColumnData" :page="yearPage" :tableLoading="yearLoading" - height="40vh" @pagination="pagination" + height="40vh" @pagination="pagination" :rowClick="rowClick" key="yearTableData"></lims-table> </div> <div style="margin-top: 20px"> @@ -182,7 +182,7 @@ examineQualityMonitor, exportQualityMonitorDetail, exportQualityMonitorEvaluate, exportQualityMonitorRatify, pageQualityMonitor, pageQualityMonitorDetail, ratifyFinishReport, ratifyQualityMonitor -} from "@/api/cnas/process/ensureResultsValidity/qualityMonitor"; +} from "@/api/cnas/process/ensureResults/qualityMonitor"; import {selectUserCondition} from "@/api/performance/class"; import {mapGetters} from "vuex"; @@ -534,6 +534,13 @@ this.uploading = false; if (response.code == 200) { this.$message.success('涓婁紶鎴愬姛'); + this.timer = setTimeout(() => { + this.uploadDia = false + this.fileList = [] + this.planYear = '' + this.examineUserId = '' + this.getYearPlanList() + }, 1000) } else { this.$message.error(response.msg) } @@ -548,13 +555,6 @@ return; } this.$refs.upload.submit(); - this.timer = setTimeout(() => { - this.uploadDia = false - this.fileList = [] - this.planYear = '' - this.examineUserId = '' - this.getYearPlanList() - }, 1000) }, // end // 瀹℃牳 diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue new file mode 100644 index 0000000..3734365 --- /dev/null +++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/detailFormDialog.vue @@ -0,0 +1,174 @@ +<template> + <div> + <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" + :title="operationType === 'edit'? '缂栬緫' : '鏂板'" + :visible.sync="formDia" + width="80%" @close="closeDia"> + <el-form ref="form" :model="form" :rules="rules" label-width="140px"> + <el-col :span="12"> + <el-form-item label="鐩戠潱鏃ユ湡" prop="superviseTime"> + <el-date-picker + v-model="form.superviseTime" + clearable + format="yyyy-MM" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 100%" + type="month" + value-format="yyyy-MM"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鐩戠潱鐩殑" prop="supervisePurpose"> + <el-input v-model="form.supervisePurpose" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鐩戞帶椤圭洰" prop="superviseProject"> + <el-input v-model="form.superviseProject" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="琚洃鐫d汉鍛�" prop="supervisedUserId"> + <el-select @change="usePersonName" v-model="form.supervisedUserId" placeholder="璇烽�夋嫨" size="small" style="width: 100%"> + <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> + </el-select> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鐩戠潱鍘熷洜" prop="superviseReason"> + <el-input v-model="form.superviseReason" clearable size="small"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="澶囨敞" prop="remark"> + <el-input v-model="form.remark" clearable size="small"></el-input> + </el-form-item> + </el-col> + </el-form> + <span slot="footer" class="dialog-footer"> + <el-button @click="closeDia">鍙� 娑�</el-button> + <el-button :loading="upLoad" type="primary" @click="submitForm">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import { + addQualitySuperviseDetail, + updateQualitySuperviseDetail +} from "@/api/cnas/process/ensureResults/qualitySupervise"; +import {selectUserCondition} from "@/api/business/inspectionTask"; + +export default { + name: 'detailFormDialog', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {}, + props: ['superviseId'], + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + formDia: false, + form: { + qualityMonitorDetailsId: '', + superviseTime: '', + supervisePurpose: '', + superviseProject: '', + supervisee: '', + supervisedUserId: '', + superviseReason: '', + remark: '', + superviseDetailsId: '', + }, + rules: { + superviseTime: [{ required: true, message: '璇疯緭鍏ョ洃鐫f棩鏈�', trigger: 'blur' }], + supervisePurpose: [{ required: true, message: '璇疯緭鍏ョ洃鐫g洰鐨�', trigger: 'blur' }], + superviseProject: [{ required: false, message: '璇疯緭鍏ョ洃鎺ч」鐩�', trigger: 'blur' }], + }, + upLoad: false, + operationType: '', + userList: [], + }; + }, + // 鏂规硶闆嗗悎 + methods: { + openDia(type, row) { + this.formDia = true + this.operationType = type + this.getUserList() + if (type === 'edit') { + this.searchInfo(row) + } + }, + usePersonName (value) { + const index = this.userList.findIndex(item => item.id === value) + if (index > -1) { + this.form.supervisee = this.userList[index].name + } + }, + 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.superviseId = this.superviseId + this.upLoad = true + addQualitySuperviseDetail(entity).then(res => { + this.upLoad = false + this.$message.success('鏂板鎴愬姛') + this.closeDia() + }).catch(err => { + console.log('err---', err); + this.upLoad = false + }) + }, + // 鎻愪氦淇敼 + handleEdit () { + const entity = this.HaveJson(this.form) + this.upLoad = true + updateQualitySuperviseDetail(entity).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') + }, + getUserList(){ + selectUserCondition({ type: 0 }).then((res) => { + this.userList = res.data; + }) + }, + } +}; +</script> + +<style scoped> +>>>.el-dialog__body { + max-height: 720px; + overflow-y: auto; +} +</style> diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/processingSheet.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/processingSheet.vue new file mode 100644 index 0000000..253a812 --- /dev/null +++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/processingSheet.vue @@ -0,0 +1,510 @@ +<template> + <div> + <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" + :visible.sync="formDia" + title="涓嶇鍚堝伐浣滄帶鍒跺崟" + width="60%" @close="closeProcessingDia"> + <el-steps :active="currentStep" align-center finish-status="success"> + <el-step title="涓嶇鍚堝伐浣滄儏鍐佃褰�"></el-step> + <el-step title="鎵瑰噯"></el-step> + </el-steps> + <div style="height: 510px;overflow-y: auto"> + <table border="1" cellspacing="10" class="tables"> + <tr> + <td class="td-title"> + <p>鍙戠敓閮ㄩ棬锛�</p> + </td> + <td class="td-info"> + <el-input v-if="currentStep === 0" v-model="form.occurrenceDepartment" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-if="currentStep !== 0" class="td-info1"> {{ form.occurrenceDepartment }}</span> + </td> + <td class="td-title"> + <p>閮ㄩ棬璐熻矗浜猴細</p> + </td> + <td class="td-info"> + <el-input v-if="currentStep === 0" v-model="form.headDepartment" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-if="currentStep !== 0" class="td-info1"> {{ form.headDepartment }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>涓嶇鍚堝伐浣滃彂鐜伴�斿緞锛�</p> + </td> + <td class="td-info" colspan="3"> + <el-radio-group v-model="form.findWay" v-removeAriaHidden :disabled="currentStep !== 0"> + <el-radio :label="0">绠$悊璇勫</el-radio> + <el-radio :label="1">鍐呴儴瀹℃牳</el-radio> + <el-radio :label="2">妫�娴嬭繃绋嬫帶鍒�</el-radio> + <el-radio :label="3">鍐呴儴璐ㄩ噺鎺у埗</el-radio> + <el-radio :label="4">鍐呴儴鐩戠潱</el-radio> + <el-radio :label="5">澶栭儴璇勫</el-radio> + <el-radio :label="6">澶栭儴鎶曡瘔</el-radio> + <el-radio :label="7">鍏朵粬</el-radio> + </el-radio-group> + </td> + </tr> + <tr> + <td class="td-title"> + <p>涓嶇鍚堝伐浣滅殑璇︾粏璁板綍锛�</p> + </td> + <td class="td-info" colspan="3"> + <el-input v-if="currentStep === 0" v-model="form.recordDetail" + :rows="4" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-if="currentStep !== 0" class="td-info1"> {{ form.recordDetail }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p>涓嶇鍚堝伐浣滅殑浠ュ強鍙婃潯娆惧彿锛�</p> + </td> + <td class="td-info" colspan="3"> + <el-input v-if="currentStep === 0" v-model="form.recordAccording" + :rows="4" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-if="currentStep !== 0" class="td-info1"> {{ form.recordAccording }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>琚洃鐫d汉锛�</p> + </td> + <td class="td-info"> +<!-- <el-select v-if="currentStep === 0" v-model="form.supervisedUserId" clearable--> +<!-- filterable--> +<!-- placeholder="璇烽�夋嫨" size="small">--> +<!-- <el-option v-for="(item,i) in supervisedUserList" :key="i" :label="item.label" :value="item.value">--> +<!-- </el-option>--> +<!-- </el-select>--> + <span class="td-info1"> {{ form.supervisedUserName }}</span> + </td> + <td class="td-title"> + <p><span class="required-span">* </span>琚洃鐫f椂闂达細</p> + </td> + <td class="td-info"> + <el-date-picker + v-if="currentStep === 0" + v-model="form.supervisedTime" + format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 80%" + type="date" + value-format="yyyy-MM-dd"> + </el-date-picker> + <span v-if="currentStep !== 0" class="td-info1"> {{ form.supervisedTime }}</span> + </td> + </tr> + <tr v-if="currentStep !== 0"> + <td class="td-title"> + <p>鍙戠幇閮ㄩ棬锛�</p> + </td> + <td class="td-info"> + {{form.foundDepartment}} + </td> + <td class="td-title"> + <p>鏃堕棿锛�</p> + </td> + <td class="td-info"> + {{form.recordTime}} + </td> + </tr> + <tr> + <td class="td-title" v-if="currentStep !== 0"> + <p>璁板綍浜猴細</p> + </td> + <td class="td-info" v-if="currentStep !== 0"> + {{form.recordUserName}} + </td> + <td class="td-title"> + <p>璁板綍鏃堕棿锛�</p> + </td> + <td class="td-info" v-if="currentStep === 0"> + <el-date-picker + v-model="form.recordTime" + format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 80%" + type="date" + value-format="yyyy-MM-dd"> + </el-date-picker> + </td> + <td class="td-info" v-if="currentStep !== 0"> + {{form.recordTime}} + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>娑堥櫎涓嶇鍚堝伐浣滄墍閲囧彇鐨勬帾鏂斤細</p> + </td> + <td class="td-info" colspan="3"> + <el-input v-if="currentStep === 0" v-model="form.eliminateMeasure" + :rows="5" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-if="currentStep !== 0" class="td-info1"> {{ form.eliminateMeasure }}</span> + </td> + </tr> + <tr> + <td class="td-title" v-if="currentStep !== 0"> + <p>褰撳墠璐熻矗浜猴細</p> + </td> + <td class="td-info" v-if="currentStep !== 0"> + {{form.actionsUserName}} + </td> + <td class="td-title"> + <p>澶勭悊鏃堕棿锛�</p> + </td> + <td class="td-info" v-if="currentStep === 0"> + <el-date-picker + v-model="form.actionsTime" + format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 80%" + type="date" + value-format="yyyy-MM-dd"> + </el-date-picker> + </td> + <td class="td-info" v-if="currentStep !== 0"> + {{form.actionsTime}} + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>鏄惁闇�瑕侀噰鍙栫籂姝f帾鏂斤細</p> + </td> + <td class="td-info" colspan="3"> + <el-radio-group v-model="form.isCorrect" v-removeAriaHidden :disabled="currentStep !== 0"> + <el-radio :label="0">鍚�</el-radio> + <el-radio :label="1">鏄�</el-radio> + </el-radio-group> + </td> + </tr> + <tr> + <td class="td-title"> + <p>绾犳鎺柦澶勭悊鍗曡窡韪細</p> + </td> + <td class="td-info" colspan="3"> + <el-input v-if="currentStep === 0" v-model="form.correctContent" + :rows="5" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-if="currentStep !== 0" class="td-info1"> {{ form.correctContent }}</span> + </td> + </tr> + <tr> + <td class="td-title" v-if="currentStep !== 0"> + <p>褰撳墠璐熻矗浜猴細</p> + </td> + <td class="td-info" v-if="currentStep !== 0"> + {{form.correctUserName}} + </td> + <td class="td-title"> + <p>绾犳濉啓鏃堕棿锛�</p> + </td> + <td class="td-info" v-if="currentStep === 0"> + <el-date-picker + v-model="form.correctTime" + format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 80%" + type="date" + value-format="yyyy-MM-dd"> + </el-date-picker> + </td> + <td v-if="currentStep !== 0" class="td-info"> + {{form.correctTime}} + </td> + </tr> + <tr> + <td rowspan="3"> + <p>鏄惁閫氱煡瀹㈡埛鍙婂彲鎭㈠宸ヤ綔</p> + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>閫氱煡瀹㈡埛锛�</p> + </td> + <td class="td-info" colspan="2"> + <el-radio-group v-model="form.notifyCustomer" v-removeAriaHidden :disabled="currentStep !== 0"> + <el-radio :label="0">鍚�</el-radio> + <el-radio :label="1">鏄�</el-radio> + </el-radio-group> + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>鎭㈠宸ヤ綔锛�</p> + </td> + <td class="td-info" colspan="2"> + <el-radio-group v-model="form.backToWork" v-removeAriaHidden :disabled="currentStep !== 0"> + <el-radio :label="0">鍚�</el-radio> + <el-radio :label="1">鏄�</el-radio> + </el-radio-group> + </td> + </tr> + <tr> + <td class="td-title" v-if="currentStep !== 0"> + <p>褰撳墠璐熻矗浜猴細</p> + </td> + <td class="td-info" v-if="currentStep !== 0"> + {{form.qualityManagerUserName}} + </td> + <td class="td-title"> + <p>璐ㄩ噺璐熻矗浜哄~鍐欐椂闂达細</p> + </td> + <td class="td-info" v-if="currentStep === 0"> + <el-date-picker + v-model="form.qualityManagerTime" + format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 80%" + type="date" + value-format="yyyy-MM-dd"> + </el-date-picker> + </td> + <td v-if="currentStep !== 0" class="td-info"> + {{form.qualityManagerTime}} + </td> + </tr> + <tr v-if=" currentStep === 0"> + <td v-if="currentStep === 0" class="td-title"> + <p><span class="required-span">* </span>璇烽�夋嫨鎵瑰噯浜猴細</p> + </td> + <td v-if="currentStep === 0" class="td-info" colspan="3"> + <el-select v-model="form.approverUserId" 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> + </table> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="closeProcessingDia">鍙� 娑�</el-button> + <el-button v-if="currentStep !== 2" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import { + addEquipSuperviseDetailAccording, approverEquipSuperviseDetailAccording, + getSuperviseDetailAccording +} from "@/api/cnas/process/ensureResults/qualitySupervise"; +import {selectUserCondition} from "@/api/business/inspectionTask"; + +export default { + name: 'processingSheet', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {}, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + formDia: false, + currentStep: 0, + form: { + occurrenceDepartment: '', + headDepartment: '', + findWay: '', + recordDetail: '', + recordAccording: '', + supervisedUserId: '', + supervisedUserName: '', + supervisedTime: '', + actionsUserName: '', + eliminateMeasure: '', + // correctUserId: '', + correctUserName: '', + isCorrect: '', + // qualityManagerUserId: '', + correctContent: '', + superviseDetailsId: '', + superviseDetailsAccordingId: '', + flowType: '', + recordUserName: '', + recordTime: '', + foundDepartment: '', + actionsTime: '', + correctTime: '', + notifyCustomer: '', + backToWork: '', + qualityManagerUserName: '', + qualityManagerTime: '', + approverUserId: '', + approveId: '', + }, + editLoad: false, + personList: [], + supervisedUserList: [], + }; + }, + // 鏂规硶闆嗗悎 + methods: { + openDia (row) { + this.formDia = true + this.searchInfo(row) + this.form.superviseDetailsId = row.superviseDetailsId + this.form.approveId = row.approveId + this.getAuthorizedPerson() // 鑾峰彇浜哄憳鍒楄〃 + // this.getSupervisedUserList() // 鑾峰彇褰撳墠閮ㄩ棬浜哄憳 + }, + // 鏌ヨ鐩戞帶璁″垝璇︽儏瀹炴柦淇℃伅 + searchInfo (row) { + this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId + getSuperviseDetailAccording({superviseDetailsId: row.superviseDetailsId}).then(res => { + this.form.supervisedUserId = res.data.supervisedUserId + this.form.supervisedUserName = res.data.supervisedUserName + if (res.data.superviseDetailsAccordingId === null) { + this.currentStep = 0 + } else { + this.form = res.data + if (res.data.isFinish === 0) { + if (res.data.approverUserId) { + this.currentStep = 1 + } + } else { + this.currentStep = 2 + } + } + }).catch(err => { + console.log('err---', err); + }) + }, + // 鎻愪氦 + handleEdit () { + if (this.currentStep === 0) { + if (this.form.findWay === null) { + this.$message.warning('璇烽�夋嫨涓嶇鍚堝伐浣滃彂鐜伴�斿緞') + return + } + if (!this.form.supervisedTime) { + this.$message.warning('璇烽�夋嫨琚洃鐫f椂闂�') + return + } + if (this.form.notifyCustomer === null) { + this.$message.warning('璇烽�夋嫨鏄惁閫氱煡瀹㈡埛') + return + } + if (this.form.backToWork === null) { + this.$message.warning('璇烽�夋嫨鏄惁鎭㈠宸ヤ綔') + return + } + if (this.form.isCorrect === null) { + this.$message.warning('璇烽�夋嫨鏄惁闇�瑕侀噰鍙栫籂姝f帾鏂�') + return + } + if (!this.form.approverUserId) { + this.$message.warning('璇烽�夋嫨鎵瑰噯浜�') + return + } + } + this.editLoad = true + this.form.flowType = this.currentStep + if (this.currentStep === 0) { + addEquipSuperviseDetailAccording(this.form).then(res => { + this.editLoad = false + if (res.code === 201) return + this.$message.success('鎻愪氦鎴愬姛') + this.closeProcessingDia() + }).catch(err => { + console.log('err---', err); + this.editLoad = false + }) + } else { + approverEquipSuperviseDetailAccording(this.form).then(res => { + this.editLoad = false + if (res.code === 201) return + this.$message.success('鎵瑰噯鎴愬姛') + this.closeProcessingDia() + }).catch(err => { + console.log('err---', err); + this.editLoad = false + }) + } + }, + // 鍏抽棴寮规 + closeProcessingDia () { + this.formDia = false + this.$emit('closeProcessingDia') + }, + getAuthorizedPerson() { + selectUserCondition({ type: 1 }).then((res) => { + let data = []; + res.data.forEach((a) => { + data.push({ + label: a.name, + value: a.id, + }); + }); + this.personList = data; + }); + }, + // getSupervisedUserList () { + // this.$axios.get(this.$api.user.selectDepartmentLimsUserList).then(res => { + // let data = [] + // res.data.forEach(a => { + // data.push({ + // label: a.name, + // value: a.id + // }) + // }) + // this.supervisedUserList = 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: 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/ensureResults/qualityControlPlan/components/recordsDialog.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue new file mode 100644 index 0000000..b5c9e52 --- /dev/null +++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/recordsDialog.vue @@ -0,0 +1,426 @@ +<template> + <div> + <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" + :visible.sync="formDia" + title="妫�娴嬪伐浣滅洃鐫h褰曡〃" + width="70%" @close="closeRecordsDia"> + <el-steps :active="currentStep" align-center finish-status="success"> + <el-step title="瀹炴柦"></el-step> + <el-step title="鎵瑰噯"></el-step> + </el-steps> + <div style="height: 470px;overflow-y: auto"> + <table border="1" cellspacing="10" class="tables"> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>妫�娴嬩汉鍛橈細</p> + </td> + <td colspan="2"> + <el-input v-if="currentStep === 0" v-model="form.testMember" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-else class="td-info"> {{ form.testMember }}</span> + </td> + <td class="td-title"> + <p><span class="required-span">* </span>鐩戠潱鍛橈細</p> + </td> + <td colspan="2"> + <el-select v-if="currentStep === 0" @change="usePersonName" v-model="form.supervisorId" placeholder="璇烽�夋嫨" size="small" style="width: 100%"> + <el-option v-for="item in recordUserList" :key="item.userId" :label="item.userName" :value="item.userId"></el-option> + </el-select> + <span v-else class="td-info"> {{ form.supervisor }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>妫�娴嬮」鐩細</p> + </td> + <td> + <el-input v-if="currentStep === 0" v-model="form.testItem" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-else class="td-info"> {{ form.testItem }}</span> + </td> + <td class="td-title"> + <p><span class="required-span">* </span>鏍峰搧缂栧彿锛�</p> + </td> + <td> + <el-input v-if="currentStep === 0" v-model="form.sampleNumber" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-else class="td-info"> {{ form.sampleNumber }}</span> + </td> + <td class="td-title"> + <p><span class="required-span">* </span>妫�娴嬫棩鏈燂細</p> + </td> + <td> + <el-input v-if="currentStep === 0" v-model="form.testDate" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-else class="td-info"> {{ form.testDate }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>浜哄憳锛�</p> + </td> + <td colspan="5"> + <el-input v-if="currentStep === 0" v-model="form.personnel" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-else class="td-info"> {{ form.personnel }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>浠櫒璁惧锛�</p> + </td> + <td colspan="5"> + <el-input v-if="currentStep === 0" v-model="form.device" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-else class="td-info"> {{ form.device }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>宸ヤ綔鐜锛�</p> + </td> + <td colspan="5"> + <el-input v-if="currentStep === 0" v-model="form.environment" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-else class="td-info"> {{ form.environment }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>鏍峰搧閲囬泦锛�</p> + </td> + <td colspan="5"> + <el-input v-if="currentStep === 0" v-model="form.sampleCollection" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-else class="td-info"> {{ form.sampleCollection }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>鏍峰搧鐨勫噯澶囷細</p> + </td> + <td colspan="5"> + <el-input v-if="currentStep === 0" v-model="form.samplePreparation" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-else class="td-info"> {{ form.samplePreparation }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>妫�娴嬫柟娉曪細</p> + </td> + <td colspan="5"> + <el-input v-if="currentStep === 0" v-model="form.detectionMethod" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-else class="td-info"> {{ form.detectionMethod }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>妫�娴嬭褰曪細</p> + </td> + <td colspan="5"> + <el-input v-if="currentStep === 0" v-model="form.inspectionRecord" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-else class="td-info"> {{ form.inspectionRecord }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>妫�娴嬫姤鍛婏細</p> + </td> + <td colspan="5"> + <el-input v-if="currentStep === 0" v-model="form.examiningReport" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small"> + </el-input> + <span v-else class="td-info"> {{ form.examiningReport }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>鐩戠潱鎯呭喌璇勪环锛�</p> + </td> + <td colspan="5"> + <el-input v-if="currentStep === 0" v-model="form.supervisionEvaluation" + :rows="4" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-else class="td-info"> {{ form.supervisionEvaluation }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>涓嶇鍚堝鐞嗘剰瑙侊細</p> + </td> + <td colspan="5"> + <el-input v-if="currentStep === 0" v-model="form.handlingAdvice" + :rows="4" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-else class="td-info"> {{ form.handlingAdvice }}</span> + </td> + </tr> + <tr> + <td v-if="currentStep === 0" class="td-title"> + <p><span class="required-span">* </span>璇烽�夋嫨涓嬩竴姝ユ壒鍑嗕汉锛�</p> + </td> + <td v-if="currentStep === 0" colspan="5"> + <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> + <td v-if="currentStep === 1" class="td-title"> + <p>鎵瑰噯璐熻矗浜猴細</p> + </td> + <td v-if="currentStep === 1" class="td-info" colspan="5"> + {{form.ratifyUserName}} + </td> + </tr> + <tr v-if="currentStep === 1 || currentStep === 2"> + <td class="td-title"> + <p><span class="required-span">* </span>瀹℃壒缁撹锛�</p> + </td> + <td colspan="2"> + <el-input v-if="currentStep === 1" + v-model="form.ratifyOpinion" + :rows="4" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-if="currentStep === 2" class="td-info"> {{ form.ratifyOpinion }}</span> + </td> + <td class="td-title"> + <p v-if="currentStep === 1">璇烽�夋嫨鏄惁绗﹀悎锛�</p> + <p v-if="currentStep === 2">鏄惁绗﹀悎锛�</p> + </td> + <td colspan="2"> + <el-radio-group v-if="currentStep === 1" v-model="form.isAccording"> + <el-radio :label="0">涓嶇鍚�</el-radio> + <el-radio :label="1">绗﹀悎</el-radio> + </el-radio-group> + <span v-if="currentStep === 2" class="td-info"> {{ form.isAccording === 0 ? '涓嶇鍚�' : '绗﹀悎' }}</span> + </td> + </tr> + </table> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="closeRecordsDia">鍙� 娑�</el-button> + <el-button v-if="currentStep !== 2" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import { + addSuperviseDetailRecord, + addSuperviseRecordOpinion, getRecordUser, + getSuperviseDetailRecord +} from "@/api/cnas/process/ensureResults/qualitySupervise"; +import {selectUserCondition} from "@/api/business/inspectionTask"; + +export default { + name: 'recordsDialog', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {}, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + formDia: false, + form: { + superviseDetailsId: '', + superviseDetailsRecordId: '', + testMember: '', + supervisor: '', + supervisorId: '', + testItem: '', + sampleNumber: '', + testDate: '', + personnel: '', + device: '', + environment: '', + sampleCollection: '', + samplePreparation: '', + detectionMethod: '', + inspectionRecord: '', + examiningReport: '', + supervisionEvaluation: '', + handlingAdvice: '', + ratifyUserId: '', + ratifyUserName: '', + ratifyOpinion: '', + isAccording: '', + }, + currentStep: 0, + editLoad: false, + personList: [], + recordUserList: [], + }; + }, + // 鏂规硶闆嗗悎 + methods: { + openDia(row) { + this.formDia = true + this.searchInfo(row) + this.getAuthorizedPerson() + }, + usePersonName (value) { + const index = this.recordUserList.findIndex(item => item.userId === value) + if (index > -1) { + this.form.supervisor = this.recordUserList[index].userName + } + }, + // 鏌ヨ鐩戠潱璁″垝璇︽儏璁板綍娴佺▼淇℃伅 + searchInfo (row) { + getSuperviseDetailRecord({superviseDetailsId: row.superviseDetailsId}).then(res => { + // 鏈塻uperviseDetailsRecordId璇存槑鎻愪氦杩囪褰� + if (res.data.superviseDetailsRecordId) { + // 鏄惁缁撴潫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 + this.form.superviseDetailsId = row.superviseDetailsId + this.getRecordUser() + }).catch(err => { + console.log('err---', err); + }) + }, + // 鎻愪氦娴佺▼ + handleEdit () { + if (!this.form.testMember || !this.form.supervisor || !this.form.testItem || !this.form.sampleNumber + || !this.form.testDate) { + this.$message.warning('璇峰~鍐欏畬鏁�') + return + } + if (this.currentStep === 0) { + this.addInfo() + } else { + this.editInfo() + } + }, + // 鎻愪氦璁板綍 + addInfo () { + if (!this.form.ratifyUserId) { + this.$message.warning('璇烽�夋嫨涓嬩竴姝ユ壒鍑嗕汉') + return + } + this.editLoad = true + addSuperviseDetailRecord(this.form).then(res => { + this.editLoad = false + this.$message.success('鎿嶄綔鎴愬姛') + this.closeRecordsDia() + }).catch(err => { + console.log('err---', err); + this.editLoad = false + }) + }, + // 鎻愪氦鎵瑰噯 + editInfo () { + if (!this.form.ratifyOpinion) { + this.$message.warning('璇峰~鍐欏鎵规剰瑙�') + return + } + if (this.form.isAccording === null) { + this.$message.warning('璇烽�夋嫨鏄惁绗﹀悎') + return + } + this.editLoad = true + addSuperviseRecordOpinion(this.form).then(res => { + this.editLoad = false + this.$message.success('鎿嶄綔鎴愬姛') + this.closeRecordsDia() + }).catch(err => { + console.log('err---', err); + this.editLoad = false + }) + }, + // 鍏抽棴寮规 + closeRecordsDia () { + this.formDia = false + this.$emit('closeRecordsDia') + }, + getAuthorizedPerson() { + selectUserCondition({ type: 1 }).then((res) => { + let data = []; + res.data.forEach((a) => { + data.push({ + label: a.name, + value: a.id, + }); + }); + this.personList = data; + }); + }, + getRecordUser () { + getRecordUser({superviseDetailsId: this.form.superviseDetailsId}).then(res => { + this.recordUserList = res.data + }) + }, + } +}; +</script> + +<style scoped> +.tables { + table-layout: fixed; + width: 100%; + margin-top: 10px; +} +.td-title { + height: 40px; + text-align: center; + font-size: 14px; + word-wrap: break-word; + white-space: normal; + padding: 6px; +} +.td-info { + text-align: center; + font-size: 14px; + word-wrap: break-word; + white-space: normal; +} +.tables td { + height: 40px; + font-size: 14px; + word-wrap: break-word; + white-space: normal; + padding: 6px; +} +</style> diff --git a/src/views/CNAS/process/ensureResults/qualityControlPlan/components/rectifyDialogNew.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/rectifyDialogNew.vue new file mode 100644 index 0000000..0f650e5 --- /dev/null +++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/components/rectifyDialogNew.vue @@ -0,0 +1,460 @@ +<template> + <div> + <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" + :visible.sync="formDia" + title="绾犳鎺柦澶勭悊鍗�" + width="60%" @close="closeRectifyDia"> + <el-steps :active="currentStep" align-center finish-status="success"> + <el-step title="涓嶅悎鏍兼垨鍋忕浜嬪疄鐨勬弿杩�" @click.native="setStep(0)"></el-step> + <el-step title="鎵瑰噯" @click.native="setStep(2)"></el-step> + </el-steps> + <div style="height: 510px;overflow-y: auto"> + <table border="1" cellspacing="10" class="tables"> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>鍩硅璁″垝锛�</p> + </td> + <td class="td-info" colspan="3"> + <el-select v-model="form.personTrainingDetailedId" clearable filterable + style="width: 100%" + :disabled="currentStep !== 0" + placeholder="璇烽�夋嫨" size="small"> + <el-option v-for="item in yearTrainingDetailed" :key="item.id" :label="item.trainingObjectives" :value="item.id"> + </el-option> + </el-select> + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>涓嶅悎鏍兼垨鍋忕浜嬪疄鐨勬弿杩帮細</p> + </td> + <td class="td-info" colspan="3"> + <el-input v-if="currentStep === 0" v-model="form.raiseResult" + :rows="2" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-if="currentStep !== 0" class="td-info1"> {{ form.raiseResult }}</span> + </td> + </tr> +<!-- <tr v-if="showStep === 0">--> +<!-- <td v-if="currentStep === 0" class="td-title">--> +<!-- <p><span class="required-span">* </span>璇烽�夋嫨涓嬩竴姝ヨ礋璐d汉锛�</p>--> +<!-- </td>--> +<!-- <td v-if="currentStep === 0" class="td-info" colspan="3">--> +<!-- <el-select v-model="form.causeUserId" 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="currentStep !== 0"> + <td class="td-title"> + <p>鎻愬嚭浜猴細</p> + </td> + <td class="td-info"> + {{form.raiseUserName}} + </td> + <td class="td-title"> + <p>鎻愬嚭閮ㄩ棬锛�</p> + </td> + <td class="td-info"> + {{form.raiseDepartment}} + </td> + </tr> + <tr> + <td class="td-title"> + <p>鎻愬嚭鏃ユ湡锛�</p> + </td> + <td class="td-info" v-if="currentStep === 0"> + <el-date-picker + v-model="form.raiseTime" + format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 80%" + type="date" + value-format="yyyy-MM-dd"> + </el-date-picker> + </td> + <td class="td-info" colspan="3" v-if="currentStep !== 0"> + {{form.raiseTime}} + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>鍘熷洜鍒嗘瀽锛�</p> + </td> + <td class="td-info" colspan="3"> + <el-input v-if="currentStep === 0" v-model="form.causeResult" + :rows="2" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-if="currentStep !== 0" class="td-info1"> {{ form.causeResult }}</span> + </td> + </tr> + <tr v-if="currentStep !== 0"> + <td class="td-title"> + <p>鍘熷洜鍒嗘瀽浜猴細</p> + </td> + <td class="td-info"> + {{form.causeUserName}} + </td> + <td class="td-title"> + <p>璐d换閮ㄩ棬锛�</p> + </td> + <td class="td-info"> + {{form.causeDepartment}} + </td> + </tr> + <tr> + <td class="td-title"> + <p>鍘熷洜鍒嗘瀽鏃ユ湡锛�</p> + </td> + <td class="td-info" colspan="3" v-if="currentStep === 0"> + <el-date-picker + v-model="form.causeTime" + format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 80%" + type="date" + value-format="yyyy-MM-dd"> + </el-date-picker> + </td> + <td class="td-info" colspan="3" v-if="currentStep !== 0"> + {{form.causeTime}} + </td> + </tr> +<!-- <tr v-if="showStep === 0">--> +<!-- <td v-if="currentStep === 0" class="td-title">--> +<!-- <p><span class="required-span">* </span>璇烽�夋嫨涓嬩竴姝ヨ礋璐d汉锛�</p>--> +<!-- </td>--> +<!-- <td v-if="currentStep === 0" class="td-info" colspan="3">--> +<!-- <el-select v-model="form.correctUserId" 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> + <td class="td-title"> + <p><span class="required-span">* </span>绾犳鎺柦锛�</p> + </td> + <td class="td-info" colspan="3"> + <el-input v-if="currentStep === 0" v-model="form.correctResult" + :rows="2" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-if="currentStep !== 0" class="td-info1"> {{ form.correctResult }}</span> + </td> + </tr> + <tr> + <td class="td-title"> + <p>鎻愬嚭瑕佹眰閮ㄩ棬纭锛�</p> + </td> + <td class="td-info" colspan="3"> + <el-input v-if="currentStep === 0" v-model="form.raiseDepartmentAffirm" + :rows="2" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-if="currentStep !== 0" class="td-info1"> {{ form.raiseDepartmentAffirm }}</span> + </td> + </tr> + <tr v-if="currentStep !== 0"> + <td class="td-title"> + <p>绾犳浜猴細</p> + </td> + <td class="td-info"> + {{form.correctUserName}} + </td> + <td class="td-title"> + <p>璐d换閮ㄩ棬锛�</p> + </td> + <td class="td-info"> + {{form.correctDepartment}} + </td> + </tr> + <tr> + <td class="td-title"> + <p>绾犳鏃ユ湡锛�</p> + </td> + <td class="td-info" v-if="currentStep === 0"> + <el-date-picker + v-model="form.correctTime" + format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 80%" + type="date" + value-format="yyyy-MM-dd"> + </el-date-picker> + </td> + <td class="td-info" colspan="3" v-if="currentStep !== 0"> + {{form.correctTime}} + </td> + </tr> + <tr> + <td class="td-title"> + <p><span class="required-span">* </span>瀹炴柦楠岃瘉缁撴灉锛�</p> + </td> + <td class="td-info" colspan="3"> + <el-input v-if="currentStep === 0" v-model="form.validationResult" + :rows="2" + placeholder="璇疯緭鍏ュ唴瀹�" + size="small" + type="textarea"> + </el-input> + <span v-if="currentStep !== 0" class="td-info1"> {{ form.validationResult }}</span> + </td> + </tr> + <tr v-if="currentStep !== 0"> + <td class="td-title"> + <p>楠岃瘉浜猴細</p> + </td> + <td class="td-info"> + {{form.validationUserName}} + </td> + <td class="td-title"> + <p>璐d换閮ㄩ棬锛�</p> + </td> + <td class="td-info"> + {{form.validationDepartment}} + </td> + </tr> + <tr> + <td class="td-title"> + <p>楠岃瘉鏃ユ湡锛�</p> + </td> + <td class="td-info" v-if="currentStep === 0"> + <el-date-picker + v-model="form.validationTime" + format="yyyy-MM-dd" + placeholder="閫夋嫨鏃ユ湡" + size="small" + style="width: 80%" + type="date" + value-format="yyyy-MM-dd"> + </el-date-picker> + </td> + <td class="td-info" colspan="3" v-if="currentStep !== 0"> + {{form.validationTime}} + </td> + </tr> + <tr v-if="currentStep === 0"> + <td v-if="currentStep === 0" class="td-title"> + <p><span class="required-span">* </span>璇烽�夋嫨鎵瑰噯浜猴細</p> + </td> + <td v-if="currentStep === 0" class="td-info" colspan="3"> + <el-select v-model="form.approverUserId" 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> + </table> + </div> + <span slot="footer" class="dialog-footer"> + <el-button @click="closeRectifyDia">鍙� 娑�</el-button> + <el-button v-if="currentStep !== 2" :loading="editLoad" type="primary" @click="handleEdit">鎻� 浜�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import { + addEquipSuperviseDetailCorrect, approveEquipSuperviseDetailCorrect, + getSuperviseDetailCorrect +} from "@/api/cnas/process/ensureResults/qualitySupervise"; +import {selectUserCondition} from "@/api/business/inspectionTask"; +import {getThisYearTrainingDetailed} from "@/api/cnas/systemManagement/correctiveAction"; + +export default { + name: 'rectifyDialog', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {}, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + formDia: false, + currentStep: 0, + showStep: 0, + form: { + superviseDetailsId: '', + raiseResult: '', + vdeRaiseResult: '', + // causeUserId: '', + raiseUserName: '', + raiseDepartment: '', + raiseTime: '', + causeResult: '', + causeUserName: '', + causeDepartment: '', + causeTime: '', + // correctUserId: '', + correctResult: '', + raiseDepartmentAffirm: '', + correctUserName: '', + correctDepartment: '', + correctTime: '', + approverUserId: '', + validationResult: '', + validationUserName: '', + validationDepartment: '', + validationTime: '', + superviseDetailsCorrectId: '', + approveId: '', + personTrainingDetailedId: '', + }, + editLoad: false, + personList: [], + yearTrainingDetailed: [], + }; + }, + // 鏂规硶闆嗗悎 + methods: { + openDia (row) { + this.formDia = true + this.searchInfo(row) + this.form.superviseDetailsId = row.superviseDetailsId + this.form.approveId = row.approveId + this.getAuthorizedPerson() // 鑾峰彇浜哄憳鍒楄〃 + this.getYearTrainingDetailed() // 鑾峰彇鍩硅璁″垝 + }, + // 鏌ヨ鐩戞帶璁″垝璇︽儏瀹炴柦淇℃伅 + searchInfo (row) { + this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId + getSuperviseDetailCorrect({superviseDetailsId: row.superviseDetailsId}).then(res => { + if (res.data.superviseDetailsCorrectId === null) { + this.showStep = 0 + this.currentStep = 0 + } else { + this.form = res.data + if (res.data.isFinish === 0) { + if (res.data.approverUserId) { + this.showStep = 1 + this.currentStep = 1 + } + } else { + this.currentStep = 2 + this.showStep = 1 + } + } + }).catch(err => { + console.log('err---', err); + }) + }, + // 鎻愪氦 + handleEdit () { + if (this.currentStep === 0) { + if (!this.form.raiseResult) { + this.$message.warning('璇峰~鍐欎笉鍚堟牸鎻忚堪') + return + } + if (!this.form.causeResult) { + this.$message.warning('璇峰~鍐欏師鍥犲垎鏋�') + return + } + if (!this.form.correctResult) { + this.$message.warning('璇峰~鍐欑籂姝f帾鏂�') + return + } + if (!this.form.validationResult) { + this.$message.warning('璇峰~鍐欏疄鏂介獙璇佺粨鏋�') + return + } + } + this.editLoad = true + this.form.flowType = this.currentStep + if (this.currentStep === 0) { + addEquipSuperviseDetailCorrect(this.form).then(res => { + this.editLoad = false + if (res.code === 201) return + this.$message.success('鎻愪氦鎴愬姛') + this.closeRectifyDia() + }).catch(err => { + console.log('err---', err); + this.editLoad = false + }) + } else { + approveEquipSuperviseDetailCorrect(this.form).then(res => { + this.editLoad = false + if (res.code === 201) return + this.$message.success('鎵瑰噯鎴愬姛') + this.closeRectifyDia() + }).catch(err => { + console.log('err---', err); + this.editLoad = false + }) + } + }, + // 鍏抽棴寮规 + closeRectifyDia () { + this.formDia = false + this.$emit('closeRectifyDia') + }, + setStep (step) { + this.showStep = step + }, + getAuthorizedPerson() { + selectUserCondition({ type: 1 }).then((res) => { + let data = []; + res.data.forEach((a) => { + data.push({ + label: a.name, + value: a.id, + }); + }); + this.personList = data; + }); + }, + getYearTrainingDetailed () { + getThisYearTrainingDetailed().then(res => { + this.yearTrainingDetailed = res.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: 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/ensureResults/qualityControlPlan/index.vue b/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue new file mode 100644 index 0000000..f25e0a1 --- /dev/null +++ b/src/views/CNAS/process/ensureResults/qualityControlPlan/index.vue @@ -0,0 +1,716 @@ +<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="superviseName"> + <el-input size="small" placeholder="璇疯緭鍏�" clearable + v-model="yearForm.superviseName" + @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="record">瀵煎叆</el-button> + </div> + </div> + <lims-table :tableData="yearTableData" :column="yearColumnData" :page="yearPage" :tableLoading="yearLoading" + height="40vh" @pagination="pagination" :rowClick="rowClick" + 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> + <el-radio-group v-model="yearDetailForm.causeType" @change="getYearDetailPlanList" size="small"> + <el-radio-button :label="1">瀹氭湡鐩戠潱</el-radio-button> + <el-radio-button :label="2">鍔ㄦ�佺洃鐫�</el-radio-button> + </el-radio-group> + </el-form-item> + <el-form-item label="鐩戞帶鐩殑" prop="supervisePurpose"> + <el-input v-model="yearDetailForm.supervisePurpose" placeholder="璇疯緭鍏�" size="small"></el-input> + </el-form-item> + <el-form-item label="鐩戞帶椤圭洰" prop="superviseProject"> + <el-input v-model="yearDetailForm.superviseProject" 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" :superviseId="superviseId" @closeDia="closeDia"></detail-form-dialog> + <!--璁板綍娴佺▼寮规--> + <records-dialog v-if="recordsDia" ref="recordsDia" :superviseId="superviseId" @closeRecordsDia="closeRecordsDia"></records-dialog> + <!--涓嶇鍚堝鐞嗘祦绋嬪脊妗�--> + <processing-sheet v-if="processingDia" ref="processingDia" :superviseId="superviseId" @closeProcessingDia="closeProcessingDia"></processing-sheet> + <!--绾犳澶勭悊娴佺▼寮规--> + <rectify-dialog-new v-if="rectifyDia" ref="rectifyDia" :superviseId="superviseId" @closeProcessingDia="closeRectifyDia"></rectify-dialog-new> + <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="downloadDialog" + title="瀵煎嚭" + width="600px"> + <span> + <el-button plain type="primary" @click="controlDown">璁板綍鍗曞鍑�</el-button> + <el-button plain type="primary" @click="processingDown">澶勭悊鍗曞鍑�</el-button> + <el-button plain type="primary" @click="supervisoryDown">绾犳鍗曞鍑�</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: 80px">骞翠唤锛�</span> + <el-date-picker + v-model="superviseYear" + type="year" + value-format="yyyy" + clearable + size="small" + format="yyyy" + placeholder="閫夋嫨骞�"> + </el-date-picker> + <span style="width: 110px">鐩戠潱鍛橈細</span> + <el-select v-model="recordUserIds" placeholder="璇烽�夋嫨" size="small" + @change="splitList" + :multiple-limit="2" filterable multiple style="width: 100%"> + <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> + </el-select> + </div> + <div style="display: flex;align-items: center;margin: 10px 0"> + <div style="width: 60px">鎵瑰噯浜猴細</div> + <el-select v-model="ratifyUserId" clearable + filterable size="small" style="width: 50%;"> + <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"> + </el-option> + </el-select> + </div> + <div style="margin: 0 auto;"> + <el-upload ref="upload1" :action="action" :auto-upload="false" :file-list="fileList" :headers="uploadHeader" :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="{recordUserIds: recordUserIds1, superviseYear: superviseYear, ratifyUserId: ratifyUserId}" + 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="closeUploadDia">鍙� 娑�</el-button> + <el-button :loading="uploading" type="primary" @click="submitUpload()">涓� 浼�</el-button> + </span> + </el-dialog> + </div> +</template> + +<script> +import DetailFormDialog from './components/detailFormDialog.vue'; +import RecordsDialog from './components/recordsDialog.vue'; +import ProcessingSheet from './components/processingSheet.vue'; +import RectifyDialogNew from './components/rectifyDialogNew.vue'; +import limsTable from "@/components/Table/lims-table.vue"; +import { + delQualitySupervise, delQualitySuperviseDetail, + exportQualitySupervise, exportSuperviseDetailRecord, + pageQualitySupervise, pageQualitySuperviseDetail, + ratifyQualitySupervise, superviseDetailAccordingExport, + exportSuperviseDetaillCorrect +} from "@/api/cnas/process/ensureResults/qualitySupervise"; +import {selectUserCondition} from "@/api/business/inspectionTask"; +import {mapGetters} from "vuex"; + +export default { + name: 'a7-quality-control-plan', + // import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢� + components: {limsTable, RectifyDialogNew, ProcessingSheet, RecordsDialog, DetailFormDialog}, + data() { + // 杩欓噷瀛樻斁鏁版嵁 + return { + yearForm: { + superviseName: '', + }, + yearPage: { + current: 1, + size: 20, + total: 0 + }, + yearColumnData: [ + { + label: '璁″垝鍚嶇О', + prop: 'superviseName', + minWidth: '150px' + }, { + label: '缂栧埗浜�', + prop: 'writeUserName', + minWidth: '100' + }, { + label: '缂栧埗鏃ユ湡', + prop: 'writeTime', + 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: 'ratifyUserName', + minWidth: '100' + },{ + label: '鎵瑰噯鏃ユ湡', + prop: 'ratifyTime', + minWidth: '160' + }, { + dataType: 'action', + minWidth: '170', + label: '鎿嶄綔', + fixed: 'right', + operation: [ + { + name: '鎵瑰噯', + type: 'text', + disabled: (row) => { + if (row.ratifyStatus === 1 || this.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.ratifyStatus === 1) { + return true + } else { + return false + } + }, + } + ] + }], + yearTableData: [], // 骞磋〃 + yearLoading: false, + yearDetailForm: { + supervisePurpose: '', + superviseProject: '', + causeType: 1 + }, + yearDetailColumnData: [ + { + label: '鐩戠潱鏃ユ湡', + prop: 'superviseTime', + minWidth: '150px' + }, { + label: '鐩戠潱鐩殑', + prop: 'supervisePurpose', + minWidth: '150px', + showOverflowTooltip: true, + }, { + label: '鐩戞帶椤圭洰', + prop: 'superviseProject', + minWidth: '150px' + }, { + label: '琚洃鐫d汉鍛�', + prop: 'supervisee', + minWidth: '150px' + }, { + label: '鐩戠潱鍘熷洜', + prop: 'superviseReason', + minWidth: '150px' + },{ + label: '澶囨敞', + prop: 'remark', + minWidth: '150px' + },{ + dataType: 'action', + width: '260', + label: '鎿嶄綔', + fixed: 'right', + operation: [ + { + name: '缂栬緫', + type: 'text', + clickFun: (row) => { + this.showDialog('edit', row) + } + }, + { + name: '璁板綍', + type: 'text', + clickFun: (row) => { + this.records(row) + } + }, + { + name: '澶勭悊', + type: 'text', + clickFun: (row) => { + this.processing(row) + }, + disabled: (row) => { + if (row.isAccording === 1 || row.isAccording === null) { + return true + } else { + return false + } + }, + }, + { + name: '绾犳', + type: 'text', + clickFun: (row) => { + this.rectify(row) + }, + disabled: (row) => { + if (row.isAccording === 1 || row.isAccording === null || row.isCorrect === null || row.isCorrect === 0) { + return true + } else { + return false + } + }, + }, + { + name: '瀵煎嚭', + type: 'text', + clickFun: (row) => { + this.openDownloadDia(row); + }, + }, + { + name: '鍒犻櫎', + type: 'text', + color: '#f56c6c', + clickFun: (row) => { + this.delYearPlanDetail(row) + } + } + ] + } + ], + yearDetailTableData: [], // 骞存槑缁嗚〃 + yearDetailLoading: false, + yearDetailPage: { + current: 1, + size: 20, + total: 0 + }, + superviseId: '', + formDia: false, + recordsDia: false, + processingDia: false, + rectifyDia: false, + ratifyDialog: false, + ratifyLoading: false, + ratifyInfo: {}, + downloadDialog: false, + download: {}, + uploadDia: false, + uploading: false, + fileList: [], + userList: [], + recordUserIds: [], + recordUserIds1: '', + superviseYear: '', + ratifyUserId: '', + }; + }, + mounted() { + this.getYearPlanList() + }, + // 鏂规硶闆嗗悎 + methods: { + // 鏌ヨ骞村害璁″垝琛� + getYearPlanList () { + const entity = { + superviseName: this.yearForm.superviseName, + } + const page = this.yearPage + this.yearLoading = true + pageQualitySupervise({ ...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.superviseName = '' + 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(); + }, + // 瀵煎叆娴佺▼ + beforeUpload(file) { + if (file.size > 1024 * 1024 * 10) { + this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M'); + this.$refs.upload1.clearFiles() + return false; + } + }, + onError(err, file, fileList) { + this.$message.error('涓婁紶澶辫触') + this.$refs.upload1.clearFiles() + }, + handleSuccessUp(response) { + this.uploading = false; + if (response.code == 200) { + this.$message.success('涓婁紶鎴愬姛'); + this.recordUserIds = [] + this.superviseYear = '' + this.fileList = [] + this.timer = setTimeout(() => { + this.closeUploadDia() + }, 1000) + } + }, + splitList (val) { + const string = this.HaveJson(val) + this.recordUserIds1 = string.join(','); + console.log(this.recordUserIds1) + }, + // 鎻愪氦瀵煎叆 + submitUpload() { + if (!this.superviseYear) { + this.$message.warning('璇烽�夋嫨骞翠唤') + return; + } + if (this.recordUserIds.length === 0) { + this.$message.warning('璇烽�夋嫨鐩戠潱鍛�') + return; + } + if (!this.ratifyUserId) { + this.$message.warning('璇烽�夋嫨鎵瑰噯浜�') + return; + } + this.uploading = true + this.$refs.upload1.submit(); + }, + // 鍏抽棴瀵煎叆寮规 + closeUploadDia () { + this.uploadDia = false; + this.recordUserIds = [] + this.ratifyUserId = '' + this.superviseYear = '' + this.getYearPlanList() + }, + // 鎵撳紑鎶ュ憡寮规 + record (row) { + this.uploadDia = true + this.getUserList() + }, + getUserList(){ + selectUserCondition({ type: 0 }).then((res) => { + this.userList = res.data; + }) + }, + // 鎵瑰噯 + approvalPlan (row) { + this.ratifyDialog = true + this.ratifyInfo = row + }, + handleRatify (ratifyStatus) { + // 鎵瑰噯鐘舵�� , 0 涓嶉�氳繃, 1閫氳繃 + this.ratifyInfo.ratifyStatus = ratifyStatus + this.ratifyLoading = true + ratifyQualitySupervise(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() + }, + // 瀵煎嚭 + handleDown (row) { + exportQualitySupervise({superviseId: row.superviseId}).then(res => { + try { + this.outLoading = false + const blob = new Blob([res],{ type: 'application/msword' }); + this.$download.saveAs(blob, row.superviseName + '.docx') + this.$message.success('瀵煎嚭鎴愬姛') + } catch (error) { + console.error('鍒涘缓Blob瀵硅薄鏃跺嚭閿�:', error); + } + }) + }, + // 鍒犻櫎杩涘害璁″垝琛� + delPlan (row) { + this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + this.yearLoading = true + delQualitySupervise({superviseId: row.superviseId}).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.superviseId = row.superviseId + this.getYearDetailPlanList() + }, + // 鑾峰彇骞村害鏄庣粏琛� + getYearDetailPlanList () { + const entity = { + superviseId: this.superviseId, + supervisePurpose: this.yearDetailForm.supervisePurpose, + superviseProject: this.yearDetailForm.superviseProject, + causeType: this.yearDetailForm.causeType, + } + const page = this.yearDetailPage + this.yearDetailLoading = true + pageQualitySuperviseDetail({ ...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 = { + supervisePurpose: '', + superviseProject: '' + } + this.getYearDetailPlanList() + }, + // 鎵撳紑骞村害鏄庣粏鏂板銆佷慨鏀瑰脊妗� + showDialog (type, row) { + this.formDia = true + this.$nextTick(() => { + this.$refs.formDia.openDia(type, row) + }) + }, + closeDia () { + this.formDia = false + this.getYearDetailPlanList() + }, + // 璁板綍娴佺▼ + records (row) { + this.recordsDia = true + this.$nextTick(() => { + this.$refs.recordsDia.openDia(row) + }) + }, + closeRecordsDia () { + this.recordsDia = false + this.getYearDetailPlanList() + }, + // 涓嶇鍚堟祦绋嬪脊妗� + processing (row) { + this.processingDia = true + this.$nextTick(() => { + this.$refs.processingDia.openDia(row) + }) + }, + closeProcessingDia () { + this.processingDia = false + this.getYearDetailPlanList() + }, + // 绾犳娴佺▼寮规 + rectify (row) { + this.rectifyDia = true + this.$nextTick(() => { + this.$refs.rectifyDia.openDia(row) + }) + }, + closeRectifyDia () { + this.rectifyDia = false + this.getYearDetailPlanList() + }, + // 鎵撳紑瀵煎嚭寮规 + openDownloadDia (row) { + this.downloadDialog = true + this.download = row + }, + // 瀵煎嚭璁板綍 + controlDown () { + exportSuperviseDetailRecord({superviseDetailsId: this.download.superviseDetailsId}).then(res => { + const blob = new Blob([res], { type: 'application/msword' }); + this.$download.saveAs(blob, '璁板綍瀵煎嚭.docx') + this.$message.success('瀵煎嚭鎴愬姛') + }).catch(err => { + console.log('err---', err); + }) + }, + // 澶勭悊鍗曞鍑� + processingDown () { + superviseDetailAccordingExport({superviseDetailsId: this.download.superviseDetailsId}).then(res => { + const blob = new Blob([res], { type: 'application/msword' }); + this.$download.saveAs(blob, '涓嶇鍚堥」瀵煎嚭.docx') + this.$message.success('瀵煎嚭鎴愬姛') + }).catch(err => { + console.log('err---', err); + }) + }, + // 绾犳鍗曞鍑� + supervisoryDown () { + exportSuperviseDetaillCorrect({superviseDetailsCorrectId: this.download.superviseDetailsCorrectId}).then(res => { + 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 + delQualitySuperviseDetail({superviseDetailsId: row.superviseDetailsId}).then(res => { + this.yearDetailLoading = false + this.$message.success('鍒犻櫎鎴愬姛') + this.getYearDetailPlanList() + }).catch(err => { + this.yearDetailLoading = false + console.log('err---', err); + }) + }) + }, + }, + // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭� + computed: { + action() { + return this.javaApi + '/qualitySupervise/importQualitySupervise' + }, + ...mapGetters(["userId"]), + }, +}; +</script> + +<style scoped> +.table-card { + background-color: #ffffff; +} +.flex_column { + display: flex; + height: 80vh; + flex-direction: column; + overflow: auto; + justify-content: space-between; +} + +.pagination { + display: flex; + justify-content: space-between +} + +.items_center { + display: flex; + align-items: center; +} + +.date_box { + margin: 0 5px; +} + +.search { + width: 150px; + padding: 0 16px; +} +</style> diff --git a/src/views/CNAS/process/uncertainty/index.vue b/src/views/CNAS/process/uncertainty/index.vue new file mode 100644 index 0000000..053008b --- /dev/null +++ b/src/views/CNAS/process/uncertainty/index.vue @@ -0,0 +1,328 @@ +<template> + <div class="uncertainty-evaluation"> + <div class="search"> + <div class="search_thing"> + <div class="search_label">鎶ュ憡鍚嶇О锛�</div> + <div class="search_input"><el-input v-model="queryParams.reportName" clearable placeholder="璇疯緭鍏�" size="small" + @keyup.enter.native="refreshTable()"></el-input></div> + </div> + <div class="search_thing" style="padding-left: 30px;"> + <el-button size="small" @click="refresh()">閲� 缃�</el-button> + <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button> + </div> + <div class="btn"> + <el-button :loading="outLoading" size="small" style="margin-right: 16px;margin-top: 3px;" type="primary" + @click="handleDown0">瀵煎嚭</el-button> + <el-upload ref='upload' :action="action" :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" + :on-success="handleSuccessUp" :show-file-list="false" + accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'> + <el-button :loading="upLoading" size="small" type="primary">瀵煎叆</el-button></el-upload> + </div> + </div> + <div class="table"> + <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 270px)'" + :page="page" @pagination="pagination"></lims-table> + </div> + <el-dialog :visible.sync="addDialogVisible" title="璇勪环" width="400px"> + <el-row> + <el-col :span="24" style="margin-bottom: 16px;"> + <div class="search_thing"> + <div class="search_label">璇勪环锛�</div> + <div class="search_input"><el-input v-model="addInfo.note" clearable placeholder="璇疯緭鍏�" + size="small"></el-input></div> + </div> + </el-col> + <el-col :span="24" style="margin-bottom: 16px;"> + <div class="search_thing"> + <div class="search_label">鏃ユ湡锛�</div> + <div class="search_input"> + <el-date-picker v-model="addInfo.evaluateTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width: 100%;" type="date" value-format="yyyy-MM-dd"> + </el-date-picker> + </div> + </div> + </el-col> + </el-row> + <span slot="footer" class="dialog-footer"> + <el-button @click="addDialogVisible = false">鍙� 娑�</el-button> + <el-button :loading="addLoading" type="primary" @click="handleAdd">纭� 瀹�</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.reportUrl" + style="max-height: 90vh;overflow-y: auto;" /> + </el-dialog> + </div> +</template> + +<script> +import limsTable from "@/components/Table/lims-table.vue"; +import filePreview from "@/components/Preview/filePreview.vue"; +import { + exportProcessEvaluate, + doProcessEvaluate, + delProcessEvaluate, + pageProcessEvaluate, +} from '@/api/cnas/process/uncertainty.js' +import { mapGetters } from "vuex"; +export default { + components: { + limsTable, + filePreview + }, + data() { + return { + addPower: false, + outPower: false, + outLoading: false, + upLoading: false, + addDialogVisible: false, + addInfo: {}, + addLoading: false, + currentInfo: {}, + lookDialogVisible: false, + queryParams: {}, + tableData: [], + column: [ + { label: "鎶ュ憡鍚嶇О", prop: "reportName" }, + { label: "璇勪环浜�", prop: "evaluateUserName" }, + { label: "璇勪环鏃ユ湡", prop: "evaluateTime" }, + { label: "澶囨敞", prop: "note" }, + { + dataType: "action", + fixed: "right", + label: "鎿嶄綔", + operation: [ + { + name: "璇勪环", + type: "text", + clickFun: (row) => { + this.handleTell(row); + }, + }, + { + name: "鍒犻櫎", + type: "text", + clickFun: (row) => { + this.handleDelete(row); + }, + }, + { + name: "涓嬭浇", + type: "text", + clickFun: (row) => { + this.handleDown(row); + }, + }, + { + name: "鏌ョ湅闄勪欢", + type: "text", + clickFun: (row) => { + this.handleLook(row); + }, + }, + ], + }, + ], + page: { + total: 0, + size: 10, + current: 0, + }, + tableLoading: false, + } + }, + // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭� + computed: { + ...mapGetters(["userId"]), + action() { + return this.javaApi + '/processEvaluate/addProcessEvaluate' + } + }, + mounted() { + // this.entityCopy = this.HaveJson(this.componentData.entity); + this.getList() + }, + methods: { + getPower() { + let power = JSON.parse(sessionStorage.getItem('power')) + let up = false + let del = false + let add = false + let out = false + for (var i = 0; i < power.length; i++) { + if (power[i].menuMethod == 'doProcessEvaluate') { + up = true + } + if (power[i].menuMethod == 'addProcessEvaluate') { + add = true + } + if (power[i].menuMethod == 'delProcessEvaluate') { + del = true + } + if (power[i].menuMethod == 'exportProcessEvaluate') { + out = true + } + } + if (!del) { + this.componentData.do.splice(1, 1) + } + if (!up) { + this.componentData.do.splice(0, 1) + } + this.outPower = out + this.addPower = add + }, + handleDown0() { + this.outLoading = true + exportProcessEvaluate(this.queryParams).then(res => { + this.outLoading = false + if (res.code === 201) return + const blob = new Blob([res], { type: 'application/octet-stream' }); + this.$download.saveAs(blob, '娴嬮噺涓嶇‘瀹氬害鐨勮瘎瀹�.xlsx'); + }) + }, + handleDown(row) { + let url = this.javaApi + '/word/' + row.reportUrl + this.$download.saveAs(url, row.reportName); + }, + beforeUpload(file) { + if (file.size > 1024 * 1024 * 10) { + this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M'); + this.$refs.upload.clearFiles() + return false; + } else { + // this.upLoading = true; + 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('涓婁紶鎴愬姛'); + this.refreshTable() + } + }, + handleTell(row) { + this.addInfo = row; + this.addDialogVisible = true; + }, + handleAdd() { + this.addLoading = true; + doProcessEvaluate({ + id: this.addInfo.id, + note: this.addInfo.note, + evaluateTime: this.addInfo.evaluateTime, + evaluateUser: this.userId + }).then((res) => { + this.addLoading = false; + if (res.code == 201) { + this.$message.error('璇勪环澶辫触'); + return; + } + this.$message.success('璇勪环鎴愬姛'); + this.addDialogVisible = false; + this.refreshTable() + }) + }, + getList() { + this.tableLoading = true; + let param = { ...this.queryParams, ...this.page }; + delete param.total; + pageProcessEvaluate({ ...param }) + .then((res) => { + this.tableLoading = false; + if (res.code === 200) { + this.tableData = res.data.records; + this.page.total = res.data.total; + } + }) + .catch((err) => { + this.tableLoading = false; + }); + }, + pagination({ page, limit }) { + this.page.current = page; + this.page.size = limit; + this.getList(); + }, + refresh() { + this.queryParams = {}; + this.page.current = 1; + this.getList(); + }, + refreshTable() { + this.page.current = 1; + this.getList(); + }, + handleLook(row) { + this.currentInfo = row; + this.lookDialogVisible = true; + }, + handleDelete(row) { + this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning", + }) + .then(() => { + delProcessEvaluate({ id: row.id }).then((res) => { + if (res.code == 201) return; + this.$message.success("鍒犻櫎鎴愬姛"); + this.refresh(); + }); + }) + .catch(() => { }); + }, + } +} +</script> + +<style scoped> +.title { + height: 60px; + line-height: 60px; +} + +.search { + background-color: #fff; + height: 80px; + display: flex; + align-items: center; + position: relative; +} + +.search_thing { + width: 350px; + display: flex; + align-items: center; +} + +.search_label { + width: 80px; + font-size: 14px; + text-align: right; +} + +.search_input { + width: calc(100% - 80px); +} + +.table { + background-color: #fff; + height: calc(100% - 60px - 80px - 10px - 40px); + padding: 20px; +} + +.btn { + position: absolute; + top: 16px; + right: 20px; + display: flex; + align-items: center; +} +</style> diff --git a/src/views/business/inspectionReview/index.vue b/src/views/business/inspectionReview/index.vue index d065a44..c724ca4 100644 --- a/src/views/business/inspectionReview/index.vue +++ b/src/views/business/inspectionReview/index.vue @@ -3,9 +3,8 @@ <div> <el-form :model="entity" ref="entity" size="small" :inline="true"> <el-form-item label="濮旀墭缂栧彿" prop="entrustCode"> - <el-input size="small" placeholder="璇疯緭鍏�" clearable - v-model="entity.entrustCode" - @keyup.enter.native="refreshTable()"></el-input> + <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entity.entrustCode" + @keyup.enter.native="refreshTable()"></el-input> </el-form-item> <el-form-item label="涓嬪崟绫诲埆" prop="entrustCode"> <el-select size="small" v-model="entity.typeSource" clearable style="width: 100%;" @change="refreshTable()"> @@ -19,20 +18,21 @@ </el-form> <div class="page_total"> <span>鎬昏浠诲姟鏁伴噺:</span> - <span>{{page.total}}</span> + <span>{{ page.total }}</span> </div> </div> <div> <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading" - :rowClassName="rowClassName" :height="'calc(100vh - 270px)'" @pagination="pagination" - key="tableData0"></lims-table> + :rowClassName="rowClassName" :height="'calc(100vh - 270px)'" @pagination="pagination" + key="tableData0"></lims-table> </div> <!--鎶ュ憡鏌ョ湅--> <el-dialog title="鎶ュ憡鏌ョ湅" :visible.sync="issuedVisible" width="80vw" :modal-append-to-body="false" - :fullscreen="fullscreen"> + :fullscreen="fullscreen"> <div class="full-screen"> - <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;" v-if="!fullscreen"></i> - <img src="@/assets/images/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen=false;" > + <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen = true;" + v-if="!fullscreen"></i> + <img src="@/assets/images/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen = false;"> </div> <div style="height: 80vh;" v-if="issuedVisible"> <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" /> @@ -40,7 +40,7 @@ </el-dialog> <el-dialog title="鏌ョ湅闄勪欢" :visible.sync="lookDialogVisible" width="800px" top="5vh" fullscreen> <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.tempUrlPdf" :currentFile="{}" - style="max-height: 90vh;overflow-y: auto;" /> + style="max-height: 90vh;overflow-y: auto;" /> </el-dialog> </div> </template> @@ -50,9 +50,9 @@ // import ShowInfo from "../do/b1-material-ins-order/showInfo.vue"; import onlyoffice from "@/components/Onlyoffice/onlyoffice.vue"; import limsTable from "@/components/Table/lims-table.vue"; -import {selectInsOrderPlanList, selectUserCondition} from "@/api/business/inspectionTask"; -import {mapGetters} from "vuex"; -import {upReportUrl} from "@/api/business/insReport"; +import { selectInsOrderPlanList, selectUserCondition } from "@/api/business/inspectionTask"; +import { mapGetters } from "vuex"; +import { upReportUrl } from "@/api/business/insReport"; import filePreview from "@/components/Preview/filePreview.vue"; export default { @@ -209,18 +209,18 @@ upIndex: 0, planTotal: 0, insStateList: [], - state:0,//0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0 + state: 0,//0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0 activeFace: 0, //1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍革紝榛樿涓�0 examine: null, isReport: 0, currentId: null, orderId: 0, - personList:[], + personList: [], currentTime: null, - sonLaboratoryList:[], + sonLaboratoryList: [], typeSourceList: [ - {label: '鎴愬搧涓嬪崟', value: 0}, - {label: '鍘熸潗鏂欎笅鍗�', value: 1}, + { label: '鎴愬搧涓嬪崟', value: 0 }, + { label: '鍘熸潗鏂欎笅鍗�', value: 1 }, ], isCopper: null, customsInspection: {}, @@ -228,12 +228,12 @@ showInfoDialog: false, // 浜т笟閾句俊鎭煡鐪� issuedVisible: false, fullscreen: false, - option:null, + option: null, orderTypeList: [ - {label: '濮旀墭璇曢獙', value: 'Customer-ordered test'}, - {label: '鎶芥', value: '鎶芥'}, - {label: '杩涘巶妫�楠�', value: '杩涘巶妫�楠�'}, - {label: '瀛e害妫�楠�', value: 'Quarterly inspection'}, + { label: '濮旀墭璇曢獙', value: 'Customer-ordered test' }, + { label: '鎶芥', value: '鎶芥' }, + { label: '杩涘巶妫�楠�', value: '杩涘巶妫�楠�' }, + { label: '瀛e害妫�楠�', value: 'Quarterly inspection' }, ], urgencyLevel: [], inspectionTaskState: [], @@ -332,7 +332,7 @@ } }, // 澶嶆牳鍥炶皟 - handleReview(row){ + handleReview(row) { this.$router.push({ path: "/inspectionTask/inspection", query: { @@ -344,12 +344,12 @@ }) }, // 涓婁紶鎶ュ憡 - handleUpload (row) { + handleUpload(row) { }, // 涓嬭浇鎶ュ憡 download(row) { - let url = this.javaApi+'/word/' + (row.urlS===null||row.urlS==='')?row.url:row.urlS + let url = this.javaApi + '/word/' + (row.urlS === null || row.urlS === '') ? row.url : row.urlS this.$download.saveAs(url, row.fileName); }, // 杩樺師鎿嶄綔 @@ -359,7 +359,7 @@ cancelButtonText: "鍙栨秷", type: "warning" }).then(() => { - upReportUrl({id: row.insReportId}).then(res => { + upReportUrl({ id: row.insReportId }).then(res => { if (res.code === 200) { this.$message.success('杩樺師鎴愬姛') this.refreshTable() -- Gitblit v1.9.3