|
|
|
@ -41,6 +41,7 @@
|
|
|
|
|
<div class="avue-crud__left"> |
|
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="handleAdd">新 增</el-button> |
|
|
|
|
<el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain>删 除</el-button> |
|
|
|
|
<el-button type="danger" icon="el-icon-delete" @click="handleExport" plain>导 出 货 区</el-button> |
|
|
|
|
<el-button type="danger" |
|
|
|
|
icon="el-icon-delete" |
|
|
|
|
plain |
|
|
|
@ -69,7 +70,6 @@
|
|
|
|
|
@selection="selectionChange" |
|
|
|
|
> |
|
|
|
|
<template #default="slotProps"> |
|
|
|
|
|
|
|
|
|
<el-text type="primary" text icon="el-icon-view" @click="handleView(slotProps.scope.row)">查看</el-text> |
|
|
|
|
<el-text type="primary" text icon="el-icon-view" @click="handleExport(slotProps.scope.row)">导出数据</el-text> |
|
|
|
|
<el-text type="primary" text icon="el-icon-edit" @click="handleEdit(slotProps.scope.row)">编辑</el-text> |
|
|
|
@ -512,7 +512,11 @@ export default {
|
|
|
|
|
handleExport(row) { |
|
|
|
|
let downloadUrl = `/api/logpm-basicdata/goodsArea/export-warehouseGoodsArea?${this.website.tokenHeader}=${getToken()}`; |
|
|
|
|
const {} = this.query; |
|
|
|
|
let values = {id:row.id}; |
|
|
|
|
let values = null; |
|
|
|
|
if (!!row){ |
|
|
|
|
values = {ids:this.ids}; |
|
|
|
|
}else { |
|
|
|
|
values = {id:row.id};} |
|
|
|
|
this.$confirm('是否导出数据?', '提示', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
@ -520,7 +524,8 @@ export default {
|
|
|
|
|
}).then(() => { |
|
|
|
|
NProgress.start(); |
|
|
|
|
exportBlob(downloadUrl, values).then(res => { |
|
|
|
|
downloadXls(res.data, `货区信息-`+row.headline+`${dateNow()}.xlsx`); |
|
|
|
|
console.log("导出>>>>>>>>>>{}",res); |
|
|
|
|
downloadXls(res.data, `货区信息`+`${dateNow()}.xlsx`); |
|
|
|
|
NProgress.done(); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
@ -606,6 +611,30 @@ export default {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleExports () { |
|
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
|
this.$message.warning("请选择至少一条数据"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
let downloadUrl = `/api/logpm-basicdata/goodsArea/export-warehouseGoodsArea?${this.website.tokenHeader}=${getToken()}`; |
|
|
|
|
const {} = this.query; |
|
|
|
|
let ids = this.ids |
|
|
|
|
console.log("ids>>>>>>>>>>>",ids); |
|
|
|
|
const {} = this.query; |
|
|
|
|
let values = {ids:'1696443526218350594'}; |
|
|
|
|
this.$confirm('是否导出数据?', '提示', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning' |
|
|
|
|
}).then(() => { |
|
|
|
|
NProgress.start(); |
|
|
|
|
exportBlob(downloadUrl, values).then(res => { |
|
|
|
|
console.log("导出>>>>>>>>>>{}",res); |
|
|
|
|
downloadXls(res.data, `货区信息-`+row.headline+`${dateNow()}.xlsx`); |
|
|
|
|
NProgress.done(); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleDisable () { |
|
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
|
this.$message.warning("请选择至少一条数据"); |
|
|
|
|