|
|
|
@ -105,7 +105,12 @@
|
|
|
|
|
> |
|
|
|
|
取消提货 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="danger" icon="el-icon-download" @click="handleExportInfo" plain> |
|
|
|
|
<el-button |
|
|
|
|
type="danger" |
|
|
|
|
icon="el-icon-download" |
|
|
|
|
@click="() => handleExportInfo('page')" |
|
|
|
|
plain |
|
|
|
|
> |
|
|
|
|
导出 |
|
|
|
|
</el-button> |
|
|
|
|
</div> |
|
|
|
@ -271,8 +276,17 @@
|
|
|
|
|
:before-close="beforeClose" |
|
|
|
|
append-to-body |
|
|
|
|
> |
|
|
|
|
<el-button |
|
|
|
|
type="danger" |
|
|
|
|
icon="el-icon-download" |
|
|
|
|
@click="() => handleExportInfo('detail')" |
|
|
|
|
plain |
|
|
|
|
> |
|
|
|
|
导出 |
|
|
|
|
</el-button> |
|
|
|
|
<!-- 列表模块 --> |
|
|
|
|
<tablecmt |
|
|
|
|
class="mt20" |
|
|
|
|
:columnList="columnDetailList" |
|
|
|
|
:tableData="detailsData" |
|
|
|
|
:loading="loadingObj.detailsLoding" |
|
|
|
@ -333,6 +347,7 @@ import {
|
|
|
|
|
postFindWaybillBillladingList, |
|
|
|
|
postAddWaybillToBillladingId, |
|
|
|
|
postPageListExport, |
|
|
|
|
postBillladingPackageDetailExport, |
|
|
|
|
} from '@/api/distribution/arteryDistrilbutionBillLadingList'; |
|
|
|
|
// 引入表格配置文件 |
|
|
|
|
import { |
|
|
|
@ -1006,21 +1021,31 @@ export default {
|
|
|
|
|
this.form.num = this.form.maxNum; |
|
|
|
|
}, |
|
|
|
|
/** 导出 */ |
|
|
|
|
async handleExportInfo() { |
|
|
|
|
async handleExportInfo(type, row = {}) { |
|
|
|
|
try { |
|
|
|
|
this.loadingObj.pageLoading = true; |
|
|
|
|
type === 'detail' |
|
|
|
|
? (this.loadingObj.detailsLoding = true) |
|
|
|
|
: (this.loadingObj.pageLoading = true); |
|
|
|
|
|
|
|
|
|
const res = await postPageListExport(this.query); |
|
|
|
|
const res = |
|
|
|
|
type === 'detail' |
|
|
|
|
? await postBillladingPackageDetailExport(this.detailQuery) |
|
|
|
|
: await postPageListExport(this.query); |
|
|
|
|
|
|
|
|
|
const { status, data } = res; |
|
|
|
|
if (status !== 200) return; |
|
|
|
|
console.log('data :>> ', data); |
|
|
|
|
|
|
|
|
|
downloadXls(data, `干线提货数据-${dateNow()}.xlsx`); |
|
|
|
|
const name = |
|
|
|
|
type === 'detail' ? `${this.title}-${dateNow()}.xlsx` : `干线提货数据-${dateNow()}.xlsx`; |
|
|
|
|
|
|
|
|
|
downloadXls(data, name); |
|
|
|
|
} catch (error) { |
|
|
|
|
console.log('error :>> ', error); |
|
|
|
|
} finally { |
|
|
|
|
this.loadingObj.pageLoading = false; |
|
|
|
|
type === 'detail' |
|
|
|
|
? (this.loadingObj.detailsLoding = false) |
|
|
|
|
: (this.loadingObj.pageLoading = false); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|