From 4e84e34d7eccc691a2b23da82ce3261f72114a6b Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Thu, 23 Jan 2025 17:01:05 +0800 Subject: [PATCH 1/4] =?UTF-8?q?feat:=E5=9C=B0=E5=9D=80=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wallet/wallet-recharge-import.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/wallet/wallet-recharge-import.ts b/src/api/wallet/wallet-recharge-import.ts index c77ee85..3d59f07 100644 --- a/src/api/wallet/wallet-recharge-import.ts +++ b/src/api/wallet/wallet-recharge-import.ts @@ -49,7 +49,7 @@ export function putObj(obj?: Object) { export function recover(params?: Object) { return request({ - url: "/wallet-recharge-import/recover", + url: "/wallet/wallet-recharge-import/recover", method: "get", params, }) From 043ec31386ce549ea3fe90ac94bc5acc662fb4f4 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Thu, 23 Jan 2025 17:04:58 +0800 Subject: [PATCH 2/4] =?UTF-8?q?feat:=E6=B5=81=E6=B0=B4=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wallet/wallet-recharge-water/index.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/views/wallet/wallet-recharge-water/index.vue b/src/views/wallet/wallet-recharge-water/index.vue index 94bc071..c1da0cf 100644 --- a/src/views/wallet/wallet-recharge-water/index.vue +++ b/src/views/wallet/wallet-recharge-water/index.vue @@ -150,6 +150,9 @@ const selectObjs = ref([]) as any const multiple = ref(true) // 表格变量 const state: BasicTableProps = reactive({ + pagination: { + pageSizes: [1, 10, 20, 50, 100, 200, 500, 1000, 2000], + }, queryForm: {}, pageList: walletRechargeImportApi.pageJoin, }) From 1adf4d7fd83f221b77d724430f5f042a9a79b567 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Thu, 23 Jan 2025 17:46:46 +0800 Subject: [PATCH 3/4] =?UTF-8?q?feat:=E6=81=A2=E5=A4=8D=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wallet/wallet-recharge-water/index.vue | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/views/wallet/wallet-recharge-water/index.vue b/src/views/wallet/wallet-recharge-water/index.vue index c1da0cf..ff70c7f 100644 --- a/src/views/wallet/wallet-recharge-water/index.vue +++ b/src/views/wallet/wallet-recharge-water/index.vue @@ -109,19 +109,16 @@
{{ displayPrice(row.price) }}
- + From 233910f43337818af1290a8907bde528a01a450a Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Thu, 23 Jan 2025 20:05:57 +0800 Subject: [PATCH 4/4] =?UTF-8?q?feat:=E9=92=B1=E5=8C=85=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wallet/wallet-cz/index.vue | 30 ++++++++++++++++++++---- src/views/wallet/wallet-manage/index.vue | 24 ++++++++++++++++--- src/views/wallet/wallet-tk/index.vue | 27 +++++++++++++++++++-- src/views/wallet/wallet-xf/index.vue | 27 +++++++++++++++++++-- 4 files changed, 97 insertions(+), 11 deletions(-) diff --git a/src/views/wallet/wallet-cz/index.vue b/src/views/wallet/wallet-cz/index.vue index 6f89a8b..a999fbf 100644 --- a/src/views/wallet/wallet-cz/index.vue +++ b/src/views/wallet/wallet-cz/index.vue @@ -40,6 +40,8 @@ :data="state.dataList" v-loading="state.loading" border + :summary-method="getSummaries" + show-summary :cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle.headerCellStyle" @selection-change="selectionChangHandle" @@ -64,12 +66,17 @@ - + + + + - + @@ -90,7 +97,6 @@ - @@ -106,7 +112,7 @@ import { displayPrice } from "/@/utils/formatMoney" // 引入组件 const FormDialog = defineAsyncComponent(() => import("./form.vue")) // 定义查询字典 -const { wallet_type } = useDict("wallet_type") +const { wallet_type, wallet_biz } = useDict("wallet_type", "wallet_biz") // 定义变量内容 const formDialogRef = ref() // 搜索变量 @@ -134,6 +140,22 @@ const resetQuery = () => { getDataList() } +const getSummaries = (param: any) => { + const { columns, data } = param + const totalColumns = ["price", "balance"] + const totalRow = Array.from({ length: columns.length }) + columns.forEach((i: any, index: number) => { + if (totalColumns.includes(i.property)) { + const total = data + .filter((v: any) => v[i.property] != null) + .map((v: any) => v[i.property]) + .reduce((pren: number, next: number) => pren + next, 0) + totalRow[index] = displayPrice(total) + } + }) + return totalRow +} + // 导出excel const exportExcel = () => { downBlobFile( diff --git a/src/views/wallet/wallet-manage/index.vue b/src/views/wallet/wallet-manage/index.vue index a7c8901..912e32a 100644 --- a/src/views/wallet/wallet-manage/index.vue +++ b/src/views/wallet/wallet-manage/index.vue @@ -50,6 +50,8 @@ :data="state.dataList" v-loading="state.loading" border + :summary-method="getSummaries" + show-summary :cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle.headerCellStyle" @selection-change="selectionChangHandle" @@ -76,17 +78,17 @@ - + - + - + @@ -175,6 +177,22 @@ const exportExcel = () => { ) } +const getSummaries = (param: any) => { + const { columns, data } = param + const totalColumns = ["balance", "totalExpense", "totalRecharge"] + const totalRow = Array.from({ length: columns.length }) + columns.forEach((i: any, index: number) => { + if (totalColumns.includes(i.property)) { + const total = data + .filter((v: any) => v[i.property] != null) + .map((v: any) => v[i.property]) + .reduce((pren: number, next: number) => pren + next, 0) + totalRow[index] = displayPrice(total) + } + }) + return totalRow +} + // 多选事件 const selectionChangHandle = (objs: { id: string }[]) => { selectObjs.value = objs.map(({ id }) => id) diff --git a/src/views/wallet/wallet-tk/index.vue b/src/views/wallet/wallet-tk/index.vue index 89e7a41..6e285cb 100644 --- a/src/views/wallet/wallet-tk/index.vue +++ b/src/views/wallet/wallet-tk/index.vue @@ -40,6 +40,8 @@ :data="state.dataList" v-loading="state.loading" border + :summary-method="getSummaries" + show-summary :cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle.headerCellStyle" @selection-change="selectionChangHandle" @@ -64,7 +66,12 @@ - + + + + @@ -113,7 +120,7 @@ import { displayPrice } from "/@/utils/formatMoney" // 引入组件 const FormDialog = defineAsyncComponent(() => import("./form.vue")) // 定义查询字典 -const { wallet_type } = useDict("wallet_type") +const { wallet_type, wallet_biz } = useDict("wallet_type", "wallet_biz") // 定义变量内容 const formDialogRef = ref() // 搜索变量 @@ -160,6 +167,22 @@ const exportExcel = () => { ) } +const getSummaries = (param: any) => { + const { columns, data } = param + const totalColumns = ["price"] + const totalRow = Array.from({ length: columns.length }) + columns.forEach((i: any, index: number) => { + if (totalColumns.includes(i.property)) { + const total = data + .filter((v: any) => v[i.property] != null) + .map((v: any) => v[i.property]) + .reduce((pren: number, next: number) => pren + next, 0) + totalRow[index] = displayPrice(total) + } + }) + return totalRow +} + // 多选事件 const selectionChangHandle = (objs: { id: string }[]) => { selectObjs.value = objs.map(({ id }) => id) diff --git a/src/views/wallet/wallet-xf/index.vue b/src/views/wallet/wallet-xf/index.vue index 56a237f..f0a10ec 100644 --- a/src/views/wallet/wallet-xf/index.vue +++ b/src/views/wallet/wallet-xf/index.vue @@ -40,6 +40,8 @@ :data="state.dataList" v-loading="state.loading" border + :summary-method="getSummaries" + show-summary :cell-style="tableStyle.cellStyle" :header-cell-style="tableStyle.headerCellStyle" @selection-change="selectionChangHandle" @@ -64,7 +66,12 @@ - + + + + @@ -114,7 +121,7 @@ const { push } = useRouter() // 引入组件 const FormDialog = defineAsyncComponent(() => import("./form.vue")) // 定义查询字典 -const { wallet_type } = useDict("wallet_type") +const { wallet_type, wallet_biz } = useDict("wallet_type", "wallet_biz") // 定义变量内容 const formDialogRef = ref() // 搜索变量 @@ -161,6 +168,22 @@ const selectionChangHandle = (objs: { id: string }[]) => { multiple.value = !objs.length } +const getSummaries = (param: any) => { + const { columns, data } = param + const totalColumns = ["price"] + const totalRow = Array.from({ length: columns.length }) + columns.forEach((i: any, index: number) => { + if (totalColumns.includes(i.property)) { + const total = data + .filter((v: any) => v[i.property] != null) + .map((v: any) => v[i.property]) + .reduce((pren: number, next: number) => pren + next, 0) + totalRow[index] = displayPrice(total) + } + }) + return totalRow +} + // 删除操作 const handleDelete = async (ids: string[]) => { try {