From 83be7ca0c138b64b3447cc207b63c7933690f6ec Mon Sep 17 00:00:00 2001 From: 曹睿 <360930172@qq.com> Date: 星期二, 25 二月 2025 09:08:58 +0800 Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev --- src/views/business/inspectionReview/index.vue | 434 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 434 insertions(+), 0 deletions(-) diff --git a/src/views/business/inspectionReview/index.vue b/src/views/business/inspectionReview/index.vue new file mode 100644 index 0000000..7586d81 --- /dev/null +++ b/src/views/business/inspectionReview/index.vue @@ -0,0 +1,434 @@ +<template> + <div class="app-container"> + <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-form-item> + <el-form-item label="涓嬪崟绫诲埆" prop="entrustCode"> + <el-select size="small" v-model="entity.typeSource" clearable style="width: 100%;" @change="refreshTable()"> + <el-option v-for="(a, i) in typeSourceList" :key="i" :label="a.label" :value="a.value"></el-option> + </el-select> + </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 class="page_total"> + <span>鎬昏浠诲姟鏁伴噺:</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> + </div> +<!-- <div style="width: 100%;height: 100%;" v-if="activeFace >0 && isCopper == null">--> +<!-- <Add :active="activeFace" :currentId="currentId"/>--> +<!-- </div>--> +<!-- <div style="width: 100%;height: 100%;" v-if="activeFace >0 && isCopper == 0">--> +<!-- <CustomsInspection :active="activeFace" :customsInspection="customsInspection" :currentId="currentId"/>--> +<!-- </div>--> +<!-- <div style="width: 100%;height: 100%;" v-if="activeFace >0 && isCopper == 1">--> +<!-- <CopperOrder :active="activeFace" :currentId="currentId"></CopperOrder>--> +<!-- </div>--> +<!-- <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :sonLaboratory="componentData.entity.sonLaboratory" :typeSource="typeSource" :state="state"/>--> +<!-- <!–浜т笟閾句俊鎭煡鐪�–>--> +<!-- <ShowInfo v-if="showInfoDialog" :showInfoDialog="showInfoDialog" ref="showInfoDialog"></ShowInfo>--> + <!--鎶ュ憡鏌ョ湅--> + <el-dialog title="鎶ュ憡鏌ョ湅" :visible.sync="issuedVisible" width="80vw" :modal-append-to-body="false" + :fullscreen="fullscreen"> + <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;" > + </div> + <div style="height: 80vh;" v-if="issuedVisible"> + <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" /> + </div> + </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;" /> + </el-dialog> + </div> +</template> + +<script> +import { getYearAndMonthAndDays } from "@/utils/date"; +// 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 {delfile} from "@/api/business/rawMaterialOrder"; +import filePreview from "@/components/Preview/filePreview.vue"; + +export default { + components: { + filePreview, + onlyoffice, + limsTable, + // ShowInfo, + }, + dicts: ["urgency_level", "inspection_task_state"], + computed: { + ...mapGetters(["nickName", "userId"]), + }, + data() { + return { + lookDialogVisible: false, + alone: false, + tabList: [], + active: 1, + tabIndex: 0, + entity: { + sonLaboratory: null, + insState: '3', + userId: 0, + typeSource: null, + isCheck: 1 + }, + tableData: [], + column: [ + { + label: "濮旀墭缂栧彿", + prop: "entrustCode", + width: "160px", + dataType: "link", + linkMethod: "selectAllByOne", + }, + { label: "鏍峰搧鍚嶇О", prop: "sample", width: "160px" }, + { + label: "涓嬪崟绫诲埆", + prop: "typeSource", + width: "100px", + dataType: "tag", + formatData: (params) => { + if (params == 0) { + return "鎴愬搧涓嬪崟"; + } else { + return "鍘熸潗鏂欎笅鍗�"; + } + }, + }, + { label: "鏍峰搧鍨嬪彿", prop: "sampleModel", width: "120px" }, + { + label: "绱ф�ョ▼搴�", + prop: "type", + dataType: "tag", + formatData: (params) => { + return this.urgencyLevel.find((m) => m.value == params).label; + }, + }, + { + label: "妫�楠岀被鍨�", + prop: "orderType", + width: "100px", + dataType: "tag", + formatData: (params) => { + return this.orderTypeList.find((m) => m.value == params).label; + }, + formatType: (params) => { + return this.orderTypeList.find((m) => m.value == params).type; + }, + }, + { + label: "鐘舵��", + prop: "insState", + dataType: "tag", + formatData: (params) => { + return this.inspectionTaskState.find((m) => m.value == params) + .label; + }, + formatType: (params) => { + return this.inspectionTaskState.find((m) => m.value == params).type; + }, + }, + { label: "妫�楠屼汉", prop: "userName" }, + { label: "澶嶆牳浜�", prop: "checkName" }, + { label: "绾﹀畾鏃堕棿", prop: "appointed" }, + { label: "涓嬪彂鏃堕棿", prop: "sendTime", width: "140px" }, + { label: "妫�楠屽紑濮嬫椂闂�", prop: "insTime", width: "140px" }, + { label: "鐞嗙敱", prop: "verifyTell", width: "140px" }, + { + dataType: "action", + fixed: "right", + label: "鎿嶄綔", + operation: [ + { + name: "澶嶆牳", + type: "text", + clickFun: (row) => { + this.handleReview(row); + }, + disabled: (row) => { + return row.userName == null || row.userName && !row.userName.includes(this.nickName) + } + }, + { + name: "涓嬭浇鎶ュ憡", + type: "text", + clickFun: (row) => { + this.download(row); + }, + }, + { + name: "涓婁紶", + type: "upload", + accept: '.doc,.docx', + url: '/insReport/inReport', + uploadIdFun: (row) => { + return row.insReportId + } + }, + { + name: "杩樺師", + type: "text", + clickFun: (row) => { + this.handleRestore(row); + }, + }, + { + name: "鏌ョ湅鎶ュ憡", + type: "text", + clickFun: (row) => { + this.handleIssued(row); + } + }, + // { + // name: "浜т笟閾�", + // type: "text", + // clickFun: (row) => { + // this.openInfoDialog(row); + // }, + // disabled: (row) => { + // return row.typeSource !== 1 + // }, + // } + ], + }, + ], + page: { + total: 0, + size: 10, + current: 0, + }, + tableLoading: false, + upIndex: 0, + planTotal: 0, + insStateList: [], + state:0,//0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0 + activeFace: 0, //1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍革紝榛樿涓�0 + examine: null, + isReport: 0, + currentId: null, + orderId: 0, + personList:[], + currentTime: null, + sonLaboratoryList:[], + typeSourceList: [ + {label: '鎴愬搧涓嬪崟', value: 0}, + {label: '鍘熸潗鏂欎笅鍗�', value: 1}, + ], + isCopper: null, + customsInspection: {}, + typeSource: null,// 0:鎴愬搧涓嬪崟锛�1锛氬師鏉愭枡涓嬪崟 + showInfoDialog: false, // 浜т笟閾句俊鎭煡鐪� + issuedVisible: false, + fullscreen: false, + option:null, + orderTypeList: [ + {label: '濮旀墭璇曢獙', value: 'Customer-ordered test'}, + {label: '鎶芥', value: '鎶芥'}, + {label: '杩涘巶妫�楠�', value: '杩涘巶妫�楠�'}, + {label: '瀛e害妫�楠�', value: 'Quarterly inspection'}, + ], + urgencyLevel: [], + inspectionTaskState: [], + } + }, + created() { + this.getDicts("urgency_level").then((response) => { + this.urgencyLevel = this.dictToValue(response.data); + }); + this.getDicts("inspection_task_state").then((response) => { + this.inspectionTaskState = this.dictToValue(response.data); + }); + this.getAuthorizedPerson() + this.currentTime = getYearAndMonthAndDays() + }, + mounted() { + this.refreshTable() + }, + methods: { + refreshTable() { + this.tableLoading = true; + let param = { ...this.entity, ...this.page }; + delete param.total; + selectInsOrderPlanList({ ...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.refreshTable(); + }, + refresh() { + this.resetForm('entity') + this.refreshTable() + }, + rowClassName({ row, rowIndex }) { + if (this.currentTime == row.appointed) { + return "highlight-warning-row-border"; + } else if (this.currentTime > row.appointed) { + return "highlight-danger-row-border"; + } + return ""; + }, + // 鏌ョ湅浜т笟閾句俊鎭� + // openInfoDialog (row) { + // this.showInfoDialog = true + // this.$nextTick(() => { + // this.$refs.showInfoDialog.getInfo(row.ifsInventoryId) + // }) + // }, + selectAllByOne(row) { + this.isCopper = row.isCopper + this.customsInspection = row + this.activeFace = 2; + this.examine = 1; + this.isReport = 0; + this.currentId = parseInt(row.id) + switch (row.isCopper) { + case 0: + // 鍘熸潗鏂� + this.$router.push({ + path: "/materialOrder/customsInspection", query: { + customsInspection: row, + active: this.activeFace, + currentId: this.currentId, + isReport: this.isReport + } + }); + break; + case null: + // 鎴愬搧 + this.$router.push({ + path: "/productOrder/add", query: { + examine: this.examine, + active: this.activeFace, + currentId: this.currentId + } + }); + break; + case 1: + // 閾滄潗 + this.$router.push({ + path: "/materialOrder/copperOrder", query: { + active: this.activeFace, + currentId: this.currentId + } + }); + break; + } + }, + // 澶嶆牳鍥炶皟 + handleReview(row){ + this.$router.push({ + path: "/inspectionTask/inspection", + query: { + sonLaboratory: row.sonLaboratory, + state: 2, + typeSource: row.typeSource, + orderId: row.id, + }, + }) + }, + // 涓婁紶鎶ュ憡 + handleUpload (row) { + + }, + // 涓嬭浇鎶ュ憡 + download(row) { + let url = (row.urlS===null||row.urlS==='')?row.url:row.urlS + const link = document.createElement('a'); + link.href = this.javaApi + url; + link.target = '_blank'; + document.body.appendChild(link); + link.click(); + }, + // 杩樺師鎿嶄綔 + handleRestore(row) { + this.$confirm('鏄惁杩樺師褰撳墠鎶ュ憡?', "璀﹀憡", { + confirmButtonText: "纭畾", + cancelButtonText: "鍙栨秷", + type: "warning" + }).then(() => { + upReportUrl({id: row.insReportId}).then(res => { + if (res.code === 200) { + this.$message.success('杩樺師鎴愬姛') + this.refreshTable() + } + }) + }).catch(() => { }) + + }, + // 鏌ョ湅鎶ュ憡 + handleIssued(row) { + if (!row.tempUrlPdf) return this.$message.warning('鏂囦欢鏈笂浼�') + this.currentInfo = row + this.lookDialogVisible = true + // this.currentInfo = row; + // let fileName = row.url + // let fileType = "docx" + // if (row.tempUrlPdf != null || row.tempUrlPdf === '') { + // fileName = row.tempUrlPdf + // fileType = "pdf" + // } + // fileName = fileName.replace('/word/','') + // const userName = this.nickName + // this.option = { + // url: this.javaApi + "/word/" + fileName, + // isEdit: false, + // fileType: fileType, + // title: fileName, + // lang: 'zh-CN', + // isPrint: false, + // user_id: 1, + // user_name: userName, + // editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName + // } + // this.issuedVisible = true; + }, + getAuthorizedPerson() { + selectUserCondition({ type: 1 }).then((res) => { + let data = []; + res.data.forEach((a) => { + data.push({ + label: a.name, + value: a.id, + }); + }); + this.personList = data; + }); + }, + } +} +</script> +<style scoped> +.page_total { + margin-bottom: 10px; +} +</style> -- Gitblit v1.9.3