From 283a87dc51255c6aa3841b0c2c0e245bb92a6d76 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Thu, 23 Oct 2025 20:43:39 +0800 Subject: [PATCH] 11 --- src/utils/other.ts | 8 +++- src/views/hard/hard-sh/index.vue | 9 ++++- src/views/mch/mch-checkout/index.vue | 60 ++++++++++------------------ 3 files changed, 36 insertions(+), 41 deletions(-) diff --git a/src/utils/other.ts b/src/utils/other.ts index 3cd5bd5..2b9b1f9 100644 --- a/src/utils/other.ts +++ b/src/utils/other.ts @@ -261,9 +261,13 @@ export function downBlobFile(url: any, query: any, fileName: string) { method: "get", responseType: "blob", params: query, - }).then((response) => { - handleBlobFile(response, fileName) }) + .then((response) => { + handleBlobFile(response, fileName) + }) + .catch((error) => { + useMessage().error(error.msg || "下载失败") + }) } export function postDownBlobFile(url: any, data: any, fileName: string) { diff --git a/src/views/hard/hard-sh/index.vue b/src/views/hard/hard-sh/index.vue index 7bfb113..1f78747 100644 --- a/src/views/hard/hard-sh/index.vue +++ b/src/views/hard/hard-sh/index.vue @@ -87,7 +87,7 @@ - + @@ -138,6 +141,10 @@ const doCheckout = (row: any) => { push({ path: "/mch/mch-checkout/index", query: { mchId: row.merchantId } }) } +const exportMchExcel = (row: any) => { + postDownBlobFile("/hard/hard-total/export-mch-cs", { ...state.queryForm, merchantId: row.merchantId }, "商户流水.xlsx") +} + const getSummaries = (param: any) => { const { columns, data } = param const totalColumns = ["totalPayPrice", "totalPayCount", "totalRefundPrice", "totalRefundCount", "totalProfitPrice", "totalProfitCount"] diff --git a/src/views/mch/mch-checkout/index.vue b/src/views/mch/mch-checkout/index.vue index 7742059..6f0723b 100644 --- a/src/views/mch/mch-checkout/index.vue +++ b/src/views/mch/mch-checkout/index.vue @@ -1,16 +1,19 @@