From df3a4b9f4657fb8a4c04006ad52bd407b1316a29 Mon Sep 17 00:00:00 2001 From: qsh <> Date: Thu, 5 Dec 2024 17:22:40 +0800 Subject: [PATCH] sc --- src/api/clue/payment.js | 7 ++++++- src/views/Clue/Order/Comp/Reback.vue | 23 +++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/api/clue/payment.js b/src/api/clue/payment.js index 5f69e3a..4913d56 100644 --- a/src/api/clue/payment.js +++ b/src/api/clue/payment.js @@ -5,7 +5,7 @@ export const getPaymentList = async (params) => { return await request.get({ url: '/admin-api/crm/sign-pay-record/list', params }) } -// 查询(精简)列表 +// 查询列表 export const getPaymentPage = async (params) => { return await request.get({ url: '/admin-api/crm/sign-pay-record/page', params }) } @@ -45,3 +45,8 @@ export const updateApplyPayment = async (data) => { data }) } + +// 导出 +export const exportPayment = async (params) => { + return await request.download({ url: '/admin-api/crm/sign-pay-record/export-excel', params }) +} diff --git a/src/views/Clue/Order/Comp/Reback.vue b/src/views/Clue/Order/Comp/Reback.vue index aa4d9b1..267f6af 100644 --- a/src/views/Clue/Order/Comp/Reback.vue +++ b/src/views/Clue/Order/Comp/Reback.vue @@ -192,6 +192,7 @@ 查询 重置 + 导出 批量审核 @@ -423,8 +424,10 @@ import DialogFeebackDetail from './DialogFeebackDetail.vue' import DialogBatchAudit from './DialogBatchAudit.vue' import { removeNullField } from '@/utils' +import download from '@/utils/download' import { useAppStore } from '@/store/modules/app' import { dateFormatter, formatDate } from '@/utils/formatTime' +import { ElLoading } from 'element-plus' const userStore = useUserStore() const message = useMessage() // 消息弹窗 @@ -518,6 +521,26 @@ async function getList() { } } +async function handleExport() { + try { + ElLoading.service({ + lock: true, + text: '正在导出数据,请稍后...', + background: 'rgba(0, 0, 0, 0.7)' + }) + const params = removeNullField(searchForm.value) + delete params.pageNo + delete params.pageSize + const data = await FeebackApi.exportPayment(params) + download.excel(data, `汇款记录表${new Date().getTime()}.xls`) + } finally { + setTimeout(() => { + const loadingInstance = ElLoading.service() + loadingInstance.close() + }, 400) + } +} + const batchIds = ref([]) function handleSelectionChange(val) { batchIds.value = val.map((it) => it.id)