Commit f795462d authored by wanglianghe's avatar wanglianghe

价格导出

parent 2440020a
...@@ -48,6 +48,7 @@ export function exportProductPriceExcel(query) { ...@@ -48,6 +48,7 @@ export function exportProductPriceExcel(query) {
return request({ return request({
url: '/ecw/product-price/export-excel', url: '/ecw/product-price/export-excel',
method: 'get', method: 'get',
timeout: 3*60*1000,
params: query, params: query,
responseType: 'blob' responseType: 'blob'
}) })
......
...@@ -77,6 +77,9 @@ ...@@ -77,6 +77,9 @@
<el-button v-if="!$route.query.product_id" type="primary" plain icon="el-icon-setting" size="mini" @click="batchBlock" :disabled="multiple">{{$t('批量加入黑名单')}}</el-button> <el-button v-if="!$route.query.product_id" type="primary" plain icon="el-icon-setting" size="mini" @click="batchBlock" :disabled="multiple">{{$t('批量加入黑名单')}}</el-button>
<el-button v-if="!$route.query.product_id" type="primary" plain icon="el-icon-setting" size="mini" @click="batchOff" :disabled="multiple">{{$t('批量下架')}}</el-button> <el-button v-if="!$route.query.product_id" type="primary" plain icon="el-icon-setting" size="mini" @click="batchOff" :disabled="multiple">{{$t('批量下架')}}</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading" >{{$t('导出')}}</el-button>
</el-col>
<!--指定商品--> <!--指定商品-->
<el-button v-if="$route.query.product_id" type="primary" plain icon="el-icon-setting" size="mini" @click="batchSetSingleProductPrice">{{$t('批量设置单个商品的路线')}}</el-button> <el-button v-if="$route.query.product_id" type="primary" plain icon="el-icon-setting" size="mini" @click="batchSetSingleProductPrice">{{$t('批量设置单个商品的路线')}}</el-button>
</el-col> </el-col>
...@@ -711,14 +714,16 @@ export default { ...@@ -711,14 +714,16 @@ export default {
params.pageNo = undefined; params.pageNo = undefined;
params.pageSize = undefined; params.pageSize = undefined;
this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime'); this.addBeginAndEndTime(params, this.dateRangeCreateTime, 'createTime');
// 执行导出 // c
this.$modal.confirm(this.$t('是否确认导出所有产品价格数据项?')).then(() => { this.$modal.confirm(this.$t('是否确认导出所有数据项?')).then(() => {
this.exportLoading = true; this.exportLoading = true;
return exportProductPriceExcel(params); return exportProductPriceExcel(params);
}).then(response => { }).then(response => {
this.$download.excel(response, '${table.classComment}.xls'); this.$download.excel(response, '路线价格.xlsx');
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); }).catch(() => {
this.exportLoading = false;
});
}, },
// 表格多选 // 表格多选
handleSelectionChange(selection) { handleSelectionChange(selection) {
......
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