From 19aa907bebf3cb2247a51ad8f2ab11842d353c97 Mon Sep 17 00:00:00 2001 From: yinq Date: Fri, 20 Sep 2024 16:37:35 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20add=E9=99=84=E4=BB=B6=E9=A2=84?= =?UTF-8?q?=E8=A7=88=E7=BB=84=E4=BB=B6=EF=BC=8C=E5=9B=9B=E6=A5=BC=E6=BF=80?= =?UTF-8?q?=E5=85=89=E6=B5=8B=E8=AF=95SOP=E9=A2=84=E8=A7=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hw-ui/src/components/viewFile/index.vue | 124 ++++++++++++++++++ .../views/board/fourthFloor/laserLight.vue | 50 +++++-- 2 files changed, 166 insertions(+), 8 deletions(-) create mode 100644 hw-ui/src/components/viewFile/index.vue diff --git a/hw-ui/src/components/viewFile/index.vue b/hw-ui/src/components/viewFile/index.vue new file mode 100644 index 00000000..ac638970 --- /dev/null +++ b/hw-ui/src/components/viewFile/index.vue @@ -0,0 +1,124 @@ + + + + + diff --git a/hw-ui/src/views/board/fourthFloor/laserLight.vue b/hw-ui/src/views/board/fourthFloor/laserLight.vue index ef0637ed..7b2dc339 100644 --- a/hw-ui/src/views/board/fourthFloor/laserLight.vue +++ b/hw-ui/src/views/board/fourthFloor/laserLight.vue @@ -197,7 +197,7 @@ 首页 板材入库 - SOP预览 + SOP预览 退出 @@ -238,6 +238,10 @@ +
+ +
+ @@ -261,6 +265,8 @@ import {monitorSerialData} from "@/utils/serial" import {addWmslocation, updateWmslocation} from "@/api/wms/wmslocation"; import WorkshopNotice from "@/components/workshopNotice/index.vue"; import {noticeData} from "@/utils/notice" +import ViewFile from "@/components/viewFile/index.vue"; +import {getDispatchSOPAttachList} from "@/api/mes/productplan"; const setState = (e) => { if (e === '1') { @@ -279,7 +285,8 @@ export default { mixins: [monitorSerialData, noticeData], components: { Chart, - WorkshopNotice + WorkshopNotice, + ViewFile }, data() { return { @@ -341,7 +348,15 @@ export default { RETURN: "3",//退库 }, - submitLoading: false + submitLoading: false, + // 存储选中的行 + selectedRows: {}, + //显示预览文件 + showFileDialog: false, + //显示预览文件标题 + thisTitle: "查看SOP附件", + //预览文件数据列表 + fileListData: [], } }, async mounted() { @@ -564,6 +579,8 @@ export default { }) }, getOrderInfo(e) { + console.log("当前选择行:", e) + this.selectedRows = e; this.getInfo(e) getNewestProductPlanDetailJoinAttach({planId: e.planId}).then(val => { if (val.data) { @@ -1193,12 +1210,29 @@ export default { this.wmsForm.materialBarcode = this.serialData; } } + }, + /** SOP预览*/ + handleViewSOP(){ + this.fileListData = []; + getDispatchSOPAttachList(this.selectedRows.dispatchCode, this.selectedRows.processId).then(res => { + let attachList = res.data; + let thisFileList = []; + attachList.forEach(e => { + let previewFile = {}; + previewFile.url = e.attachPath; + previewFile.name = e.attachName; + thisFileList.push(previewFile); + }) + console.log("thisFileList:", thisFileList) + if (thisFileList.length > 0){ + this.fileListData = thisFileList; + this.showFileDialog = true; + } else { + this.$modal.msgWarning("此派工派工单号无SOP附件!"); + } + }) } - - - } - , - + }, }