From 8483de1c36962490d131753c27f52d9a1dfd6d31 Mon Sep 17 00:00:00 2001 From: zuowenwen Date: Sat, 9 Oct 2021 16:45:41 +0800 Subject: [PATCH] =?UTF-8?q?zww=20-Bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/purchaseorder/purchaseRequisition.js | 3 + .../purchaseorder/purchaseRequisition.vue | 113 ++++++++++++++++-- 2 files changed, 107 insertions(+), 9 deletions(-) diff --git a/src/api/purchaseorder/purchaseRequisition.js b/src/api/purchaseorder/purchaseRequisition.js index 230fb41..0b354d8 100644 --- a/src/api/purchaseorder/purchaseRequisition.js +++ b/src/api/purchaseorder/purchaseRequisition.js @@ -21,6 +21,9 @@ export const authorizationHistList = data => createAPI(`PRHeader/getAuthorizatio //获取审批记录信息 export const updatePRHeaderAuthorizeFlag = data => createAPI(`PRHeader/updatePRHeaderAuthorizeFlag`,'POST',data) +//获取审批记录信息 +export const downFtpFile = data => createAPI(`ftp/file/downFtpFile?ossEntity=`+data.id,'GET') + diff --git a/src/views/modules/purchaseorder/purchaseRequisition.vue b/src/views/modules/purchaseorder/purchaseRequisition.vue index 9d65970..f1c7a3b 100644 --- a/src/views/modules/purchaseorder/purchaseRequisition.vue +++ b/src/views/modules/purchaseorder/purchaseRequisition.vue @@ -163,7 +163,7 @@ - @@ -189,23 +189,57 @@ - + - - + - + + + + + + + + 取消 @@ -272,6 +306,7 @@ getExportList, authorizationHistList, updatePRHeaderAuthorizeFlag, + downFtpFile, } from '@/api/purchaseorder/purchaseRequisition.js' import upload from "../common/upload"; export default { @@ -710,6 +745,59 @@ fixed: false, }, ], + // 展示列集 + columnList2: [ + { + userId: this.$store.state.user.name, + functionId: 2001, + tableId: "fileDetail2001", + tableName: "fileDetailTable", + columnProp: "fileName", + headerAlign: "center", + align: "center", + columnLabel: "文件名称", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, + { + userId: this.$store.state.user.name, + functionId: 2001, + tableId: "fileDetail2001", + tableName: "fileDetailTable", + columnProp: "createDate", + headerAlign: "center", + align: "center", + columnLabel: "创建时间", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false, + columnWidth : 135, + }, + { + userId: this.$store.state.user.name, + functionId: 2001, + tableId: "fileDetail2001", + tableName: "fileDetailTable", + columnProp: "createdBy", + headerAlign: "center", + align: "center", + columnLabel: "创建人", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false, + columnWidth : 70, + }, + ], // 数据集 dataList: [], //选项 @@ -734,7 +822,8 @@ addLabelName: '新增', operating: '操作', reviewDetails : "审批详情", - close : '关闭' + close : '关闭', + fileDownload : '下载', }, // 导出 start exportData: [], @@ -851,6 +940,14 @@ }, methods: { + fileDownload(row){ + let downLoadData = { + id : row.id + } + downFtpFile(downLoadData).then(({data}) =>{ + + }) + }, childByValue (childValue) { // childValue就是子组件传过来的值 this.fileList = childValue @@ -977,6 +1074,7 @@ }) }, initAddModel(row) { + this.fileList = [] if (row == null) { this.currentPRDetailData.requisitionno = '' this.currentPRDetailData.itemno = '' @@ -1088,7 +1186,6 @@ // 获取button的词典 getFunctionButtonList() { searchFunctionButtonList(this.queryButton).then(({data}) => { - console.log(data.data) if (data.data.length > 0) { this.buttons = data.data } else { @@ -1291,7 +1388,6 @@ console.log("数据下载完成") }, fields(){ - console.log(this.columnList) let json = "{" this.columnList.forEach((item,index) =>{ if (index == this.columnList.length-1 ){ @@ -1302,7 +1398,6 @@ }) json +="}" let s = eval("(" + json + ")") - console.log(s) return s },