Commit 65891de3 authored by dragondean@qq.com's avatar dragondean@qq.com

商品和价格导出改异步

parent df21715e
...@@ -389,7 +389,6 @@ export function exportSettlementExcel(params) { ...@@ -389,7 +389,6 @@ export function exportSettlementExcel(params) {
return request({ return request({
url: "/shipment/box/export-shipment-summary", url: "/shipment/box/export-shipment-summary",
method: "get", method: "get",
responseType: "blob",
params, params,
}); });
} }
...@@ -66,8 +66,7 @@ export function exportProductExcel(query) { ...@@ -66,8 +66,7 @@ export function exportProductExcel(query) {
return request({ return request({
url: '/ecw/product/export-excel', url: '/ecw/product/export-excel',
method: 'get', method: 'get',
params: query, params: query
responseType: 'blob'
}) })
} }
......
...@@ -50,7 +50,6 @@ export function exportProductPriceExcel(query) { ...@@ -50,7 +50,6 @@ export function exportProductPriceExcel(query) {
method: 'get', method: 'get',
timeout: 3*60*1000, timeout: 3*60*1000,
params: query, params: query,
responseType: 'blob'
}) })
} }
......
...@@ -671,7 +671,8 @@ export default { ...@@ -671,7 +671,8 @@ export default {
this.exportLoading = true; this.exportLoading = true;
return exportProductExcel(params); return exportProductExcel(params);
}).then(response => { }).then(response => {
this.$download.excel(response, '商品.xlsx'); // this.$download.excel(response, '商品.xlsx');
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
this.exportLoading = false; this.exportLoading = false;
}).catch(() => { }); }).catch(() => { });
}, },
......
...@@ -548,7 +548,7 @@ export default { ...@@ -548,7 +548,7 @@ export default {
// } // }
// 价格列表 跟 商品的价格列表,有时候商品价格列表的路由变动会导致价格列表也执行此处代码,所以做一个判断排除 // 价格列表 跟 商品的价格列表,有时候商品价格列表的路由变动会导致价格列表也执行此处代码,所以做一个判断排除
// https://zentao.test.jdshangmen.com/bug-view-4928.html // https://zentao.test.jdshangmen.com/bug-view-4928.html
if(this.$route.path != this.entryPath) return if(this.$route.path != this.entryPath) return
let productId = this.product?.id let productId = this.product?.id
if(this.$route.name === 'ProductPrice'){ if(this.$route.name === 'ProductPrice'){
...@@ -847,8 +847,9 @@ export default { ...@@ -847,8 +847,9 @@ export default {
this.exportLoading = true; this.exportLoading = true;
return exportProductPriceExcel(params); return exportProductPriceExcel(params);
}).then(response => { }).then(response => {
this.$download.excel(response, '路线价格.xlsx'); // this.$download.excel(response, '路线价格.xlsx');
this.exportLoading = false; this.exportLoading = false;
this.$message.success(this.$t('已加入导出队列,请稍后在下载日志中下载'))
}).catch(() => { }).catch(() => {
this.exportLoading = false; this.exportLoading = false;
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment