diff --git a/src/api/purchaseorder/purchaseRequisition.js b/src/api/purchaseorder/purchaseRequisition.js index d16deb7..996d877 100644 --- a/src/api/purchaseorder/purchaseRequisition.js +++ b/src/api/purchaseorder/purchaseRequisition.js @@ -27,6 +27,9 @@ export const downFtpFile = data => createAPI(`ftp/file/downFtpFile?ossEntity=`+d //获取审批记录信息 export const getFileList = data => createAPI(`sys/oss/getSysOssEntityList`,'POST' ,data) +//获取工具类型 +export const getPartFamilyList = data => createAPI(`base/getPartFamilyList`,'POST' ,data) + diff --git a/src/views/modules/knifemold/receive.vue b/src/views/modules/knifemold/receive.vue index d0d92ad..0ef4419 100644 --- a/src/views/modules/knifemold/receive.vue +++ b/src/views/modules/knifemold/receive.vue @@ -200,11 +200,56 @@ :label="buttons.operating"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -235,6 +280,8 @@ exportList, getFileList, } from "@/api/knifemold/receive.js" + import axios from "axios"; + import Vue from "vue"; export default { components: { @@ -255,6 +302,8 @@ value: 'N', label: '不显示' }], + select2 :[ + ], }, height: 0, //搜索名称 @@ -273,6 +322,7 @@ //横幅宽幅设定 bannersFlag : false, bannersBut : false, + pdfVisible : false, torNumacc : '', torNumdown : '', //生成按钮是否可用 @@ -848,13 +898,11 @@ methods: { // 文件下载 fileDownload(row) { - this.$http({ - url: this.$http.adornUrl('ftp/file/downFtpFile'), - method: 'post', - data: JSON.stringify(row), + axios.get('/api/ftp/file/downFtpFile/' + row.id, { responseType: 'blob', headers: { - 'Content-Type': 'application/json' + 'Content-Type': 'application/json', + 'token':Vue.cookie.get('token') } }).then(({data}) => { // 不限制文件下载类型 @@ -866,12 +914,21 @@ linkNode.download = fileName // a标签的download属性规定下载文件的名称 linkNode.style.display = 'none' linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL + // if(val == 'Y'){ + // this.pdfVisible = true + // this.pdfUrl = linkNode.href + // }else { document.body.appendChild(linkNode) linkNode.click() // 模拟在按钮上的一次鼠标单击 URL.revokeObjectURL(linkNode.href) // 释放URL 对象 document.body.removeChild(linkNode) + // } }) }, + filePreview(row){ + this.pdfVisible = true + this.pdfUrl= 'http://192.168.1.2:9002/file/'+row.newFileName + }, //初始化文件信息模态框 initFileModel(row){ this.getFileList(row) diff --git a/src/views/modules/purchaseorder/procurementReview.vue b/src/views/modules/purchaseorder/procurementReview.vue index d2422e2..fddca3c 100644 --- a/src/views/modules/purchaseorder/procurementReview.vue +++ b/src/views/modules/purchaseorder/procurementReview.vue @@ -175,10 +175,11 @@ @@ -505,6 +506,23 @@ status: true, fixed: false }, + { + userId: this.$store.state.user.name, + functionId: 2101, + serialNumber: 'review2101EnterDate', + tableId: "review2101", + tableName: "PRHeader", + columnProp: "enterDate", + headerAlign: "center", + align: "left", + columnLabel: "创建时间", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: false + }, { userId: this.$store.state.user.name, functionId: 2101, @@ -677,6 +695,7 @@ reviewDetails: '审批详情', appendixInfo: '附件信息', fileDownload: '下载', + preview : '预览', }, // 导出 start exportData: [], @@ -792,33 +811,36 @@ methods: { // 文件下载 fileDownload(row) { - - // window.open( this.baseUrl+'/file/'+row.newFileName) + axios.get('/api/ftp/file/downFtpFile/' + row.id, { + responseType: 'blob', + headers: { + 'Content-Type': 'application/json', + 'token':Vue.cookie.get('token') + } + }).then(({data}) => { + // 不限制文件下载类型 + const blob = new Blob([data], {type: "application/octet-stream"}) + // 下载文件名称 + const fileName = row.fileName + // a标签下载 + const linkNode = document.createElement('a') + linkNode.download = fileName // a标签的download属性规定下载文件的名称 + linkNode.style.display = 'none' + linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL + // if(val == 'Y'){ + // this.pdfVisible = true + // this.pdfUrl = linkNode.href + // }else { + document.body.appendChild(linkNode) + linkNode.click() // 模拟在按钮上的一次鼠标单击 + URL.revokeObjectURL(linkNode.href) // 释放URL 对象 + document.body.removeChild(linkNode) + // } + }) + }, + filePreview(row){ this.pdfVisible = true - this.pdfUrl= 'http://192.168.1.83:9002/file/'+row.newFileName - // axios.get('/proxyApi/ftp/file/downFtpFile/' + row.id, { - // responseType: 'blob', - // headers: { - // 'Content-Type': 'application/json', - // 'token':Vue.cookie.get('token') - // } - // }).then(({data}) => { - // // 不限制文件下载类型 - // const blob = new Blob([data], {type: "application/octet-stream"}) - // // 下载文件名称 - // const fileName = row.fileName - // // a标签下载 - // const linkNode = document.createElement('a') - // linkNode.download = fileName // a标签的download属性规定下载文件的名称 - // linkNode.style.display = 'none' - // linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL - // this.pdfUrl = linkNode.href - // // window.open( this.pdfUrl) - // // document.body.appendChild(linkNode) - // // linkNode.click() // 模拟在按钮上的一次鼠标单击 - // // URL.revokeObjectURL(linkNode.href) // 释放URL 对象 - // // document.body.removeChild(linkNode) - // }) + this.pdfUrl= 'http://192.168.1.2:9002/file/'+row.newFileName }, prePage(){ var p = this.pageNum diff --git a/src/views/modules/purchaseorder/purchaseRequisition.vue b/src/views/modules/purchaseorder/purchaseRequisition.vue index d40a4c1..07971f0 100644 --- a/src/views/modules/purchaseorder/purchaseRequisition.vue +++ b/src/views/modules/purchaseorder/purchaseRequisition.vue @@ -253,10 +253,11 @@ @@ -295,6 +296,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -328,6 +373,7 @@ import { updatePRHeaderAuthorizeFlag, downFtpFile, getFileList, + getPartFamilyList, } from '@/api/purchaseorder/purchaseRequisition.js' import upload from "../common/upload"; import axios from "axios"; @@ -399,6 +445,7 @@ export default { // 是否收藏 favorite: false, addLanguage: false, + pdfVisible : false, functionId: 2001, tableId: "common1001", value1: true, @@ -909,6 +956,7 @@ export default { close: '关闭', fileDownload: '下载', reapply: '重新申请', + preview: '预览', }, // 导出 start exportData: [], @@ -1056,13 +1104,22 @@ export default { const linkNode = document.createElement('a') linkNode.download = fileName // a标签的download属性规定下载文件的名称 linkNode.style.display = 'none' - linkNode.href = window.URL.createObjectURL(blob) // 生成一个Blob URL + linkNode.href = URL.createObjectURL(blob) // 生成一个Blob URL + // if(val == 'Y'){ + // this.pdfVisible = true + // this.pdfUrl = linkNode.href + // }else { document.body.appendChild(linkNode) linkNode.click() // 模拟在按钮上的一次鼠标单击 URL.revokeObjectURL(linkNode.href) // 释放URL 对象 document.body.removeChild(linkNode) + // } }) }, + filePreview(row){ + this.pdfVisible = true + this.pdfUrl= 'http://192.168.1.2:9002/file/'+row.newFileName + }, childByValue(childValue) { // childValue就是子组件传过来的值 this.fileList.push(childValue) diff --git a/src/views/modules/warehouse/warehouse.vue b/src/views/modules/warehouse/warehouse.vue index d06b9b9..3ecdfea 100644 --- a/src/views/modules/warehouse/warehouse.vue +++ b/src/views/modules/warehouse/warehouse.vue @@ -193,9 +193,9 @@ import { headerInput : { label1 : '仓库编码', label2 : '仓库名称', - label3 : '库位类型', + label3 : '仓库类型', label4 : '使用状态', - label5 : '库房信息', + label5 : '仓库信息', }, }, selectList: {