| | |
| | | </QueryFilterItem> |
| | | </template> |
| | | <template #btn> |
| | | <el-button type="primary" @click="exportPersonalUserTransactionEreceipts()" |
| | | >回单导出</el-button |
| | | > |
| | | <el-button type="primary" @click="handleExport()">导出</el-button> |
| | | </template> |
| | | </ProTableQueryFilterBar> |
| | |
| | | { leading: true, trailing: false } |
| | | ); |
| | | |
| | | const exportPersonalUserTransactionEreceipts = _.debounce( |
| | | async () => { |
| | | if (paginationState.total === 0) { |
| | | Message.warnMessage('没有数据可以导出哦~'); |
| | | return; |
| | | } |
| | | try { |
| | | let params: API.ExportPersonalUserTransactionEreceiptsCommand = { |
| | | enterpriseWalletId: id, |
| | | createdTimeStart: format(extraParamState.creationTime?.[0] ?? '', 'YYYY-MM-DD 00:00:00'), |
| | | createdTimeEnd: format(extraParamState.creationTime?.[1] ?? '', 'YYYY-MM-DD 23:59:59'), |
| | | }; |
| | | let res = await userServices.exportPersonalUserTransactionEreceipts(params, { |
| | | responseType: 'blob', |
| | | getResponse: true, |
| | | }); |
| | | if (res) { |
| | | // @ts-ignore |
| | | downloadFile(res?.data, `电子回单`, 'zip'); |
| | | } |
| | | } catch (error) {} |
| | | }, |
| | | 1000, |
| | | { leading: true, trailing: false } |
| | | ); |
| | | |
| | | onMounted(() => { |
| | | state.loading = false; |
| | | getList(); |