Merge remote-tracking branch 'origin/master'
| | |
| | | ftpUrl: 'https://yqzx.jinmingyuan.com/lowConsum',//测试 |
| | | // ftpUrl: protocol + '//'+ host + '/file',// 正式, |
| | | // 接口请求地址 |
| | | apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//测试 |
| | | // apiBaseURL: 'http://172.16.20.2:8083/lowConsum',//开发 |
| | | // apiBaseURL: 'https://yqzx.jinmingyuan.com/lowConsum',//测试 |
| | | // apiBaseURL: 'http://127.0.0.1:8083/lowConsum',//开发 |
| | | // apiBaseURL: 'http://172.16.60.155:8083/lowConsum',//开发 |
| | | // apiBaseURL: protocol + '//'+ host + '/lowConsum',// 正式, |
| | | apiBaseURL: protocol + '//'+ host + '/lowapi',// 正式, |
| | | debug: false //调试开关 true时会输出请求日志 |
| | | }; |
| | | |
| | |
| | | export function procureExport(params) { |
| | | return request({ |
| | | url: '/pc/whForm/procure/list/export', |
| | | responseType: 'blob', // 指定响应数据类型为Blob |
| | | // responseType: 'blob', // 指定响应数据类型为Blob |
| | | method: 'get', |
| | | params, |
| | | }); |
| | |
| | | export function transferExport(params) { |
| | | return request({ |
| | | url: '/pc/l/wh/form/transfer/list/export', |
| | | responseType: 'blob', // 指定响应数据类型为Blob |
| | | // responseType: 'blob', // 指定响应数据类型为Blob |
| | | method: 'get', |
| | | params, |
| | | }); |
| | |
| | | export function inventoryExport(params) { |
| | | return request({ |
| | | url: '/pc/l/wh/form/inventory/list/export', |
| | | responseType: 'blob', // 指定响应数据类型为Blob |
| | | // responseType: 'blob', // 指定响应数据类型为Blob |
| | | method: 'get', |
| | | params, |
| | | }); |
| | |
| | | export function scrappedExport(params) { |
| | | return request({ |
| | | url: '/pc/l/wh/form/scrapped/list/export', |
| | | responseType: 'blob', // 指定响应数据类型为Blob |
| | | // responseType: 'blob', // 指定响应数据类型为Blob |
| | | method: 'get', |
| | | params, |
| | | }); |
| | |
| | | export function deptScrappedExport(params) { |
| | | return request({ |
| | | url: '/pc/l/wh/form/scrapped/deptList/export', |
| | | responseType: 'blob', // 指定响应数据类型为Blob |
| | | // responseType: 'blob', // 指定响应数据类型为Blob |
| | | method: 'get', |
| | | params, |
| | | }); |
| | |
| | | |
| | | |
| | | // 下载文件 |
| | | export function downLoad(obj) { |
| | | let url = obj.url |
| | | if (obj.url.indexOf('http') !== 0) { |
| | | url = SettingIplatform.ftpUrl + obj.url |
| | | export function downLoad(url) { |
| | | let link = url |
| | | if (link.indexOf('http') !== 0) { |
| | | link = SettingIplatform.ftpUrl + url |
| | | } |
| | | window.open(decodeURI(url)) |
| | | var doc = document.createElement('a') |
| | | doc.href = url |
| | | doc.href = link |
| | | doc.target = '_blank' |
| | | doc.rel = "noreferrer noopener" |
| | | doc.click() |
| | |
| | | methods: { |
| | | // 导出 |
| | | handleExport(api, fileName, params) { |
| | | console.log(fileName) |
| | | let loading = this.$loading({ |
| | | lock: true, |
| | | text: '导出中,请稍候...', |
| | |
| | | // 判断总条数是否大于最大支持条数 |
| | | dataExport[api](params) |
| | | .then((res) => { |
| | | const blob = new Blob([res], {type: 'application/vnd.ms-excel'}); |
| | | /*if ('download' in document.createElement('a')) { |
| | | // 非IE下载 |
| | | const elink = document.createElement('a'); |
| | | elink.download = `${fileName}.xls`; |
| | | elink.style.display = 'none'; |
| | | const URL = window.URL || window.webkitURL |
| | | const href = URL.createObjectURL(blob) |
| | | elink.href = href; |
| | | document.body.appendChild(elink); |
| | | elink.click(); |
| | | URL.revokeObjectURL(elink.href); |
| | | document.body.removeChild(elink); |
| | | window.URL.revokeObjectURL(href) |
| | | } else { |
| | | // IE10+下载 |
| | | navigator.msSaveBlob(blob, `${fileName}.xls`); |
| | | }*/ |
| | | console.log(res) |
| | | downLoad(res) |
| | | this.$message.success('导出成功!'); |
| | | loading.close(); |
| | |
| | | <el-col> |
| | | <!--列表--> |
| | | <div class="table-tool-bar" style="margin-bottom: 15px"> |
| | | <!-- <my-button name="新增" check-permission="procure:order:add" @click="handleAdd" site="tools" size="medium" />--> |
| | | <my-button name="新增" check-permission="procure:order:add" @click="handleAdd" site="tools" size="medium" /> |
| | | <my-button name="导入" @click="importSetting.dialogShow = true" site="tools" size="medium" /> |
| | | </div> |