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 @@
+
+
+
+
+
+
+
+
+
+ {{ file.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
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附件!");
+ }
+ })
}
-
-
- }
- ,
-
+ },
}