From a0cbb1d0a5a82111b5e24739faea1e2cba2ff59f Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Tue, 8 Jul 2025 20:05:55 +0800 Subject: [PATCH 1/7] =?UTF-8?q?feat:=E7=BB=9F=E8=AE=A1=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E6=AC=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hard/canteen-product-total/index.vue | 64 +++++++------------ .../wallet/wallet-recharge-invoice/index.vue | 2 +- .../wallet-recharge-invoice/print-dialog.vue | 10 +-- 3 files changed, 31 insertions(+), 45 deletions(-) diff --git a/src/views/hard/canteen-product-total/index.vue b/src/views/hard/canteen-product-total/index.vue index b8a6aec..8f3708a 100644 --- a/src/views/hard/canteen-product-total/index.vue +++ b/src/views/hard/canteen-product-total/index.vue @@ -1,16 +1,9 @@ - + diff --git a/src/views/wallet/wallet-recharge-invoice/print-dialog.vue b/src/views/wallet/wallet-recharge-invoice/print-dialog.vue index 4b7c1f2..1d84155 100644 --- a/src/views/wallet/wallet-recharge-invoice/print-dialog.vue +++ b/src/views/wallet/wallet-recharge-invoice/print-dialog.vue @@ -96,10 +96,11 @@ :disabled="loading"> 作废 - 申请审批 - 保存 + 申请审批 + 保存 打印 @@ -131,6 +132,7 @@ interface ReceiptData { picUrl: string stampPicUrl: string processStatus: string | null + status?: string } const emit = defineEmits(["refresh"]) From cd86f299d76f8c19498b2dc210d274ccc6754015 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Wed, 9 Jul 2025 12:17:48 +0800 Subject: [PATCH 2/7] =?UTF-8?q?feat:=E5=8F=91=E7=A5=A8=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E4=B8=80=E4=B8=8B=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 +- src/api/wallet/wallet-recharge-apply.ts | 8 +++ .../wallet-recharge-apply/preview-excel.vue | 67 ++++++------------- .../wallet/wallet-recharge-invoice/index.vue | 15 +++++ .../wallet-recharge-invoice/print-dialog.vue | 16 ++++- 5 files changed, 60 insertions(+), 50 deletions(-) diff --git a/.env.development b/.env.development index 621b6ca..27907cc 100644 --- a/.env.development +++ b/.env.development @@ -12,7 +12,7 @@ ENV = 'development' # VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/ # 测试线上-过期 # VITE_ADMIN_PROXY_PATH = http://pjcloud.center.takin.cc/ # VITE_ADMIN_PROXY_PATH = http://localhost:9999/ -VITE_ADMIN_PROXY_PATH = http://192.168.101.150:9999/ # 邓-本地 +VITE_ADMIN_PROXY_PATH = http://192.168.101.159:9999/ # 邓-本地 # VITE_ADMIN_PROXY_PATH = http://59.202.170.152:81/api # 正式环境线上 # 图片访问基础地址 @@ -20,7 +20,7 @@ VITE_ADMIN_PROXY_PATH = http://192.168.101.150:9999/ # 邓-本地 # VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api/ # 测试线上-过期 # VITE_IMAGE_BASE_PATH = http://pjcloud.center.takin.cc # VITE_IMAGE_BASE_PATH = http://localhost:9999 -VITE_IMAGE_BASE_PATH = http://192.168.101.150:9999 # 邓-本地 +VITE_IMAGE_BASE_PATH = http://192.168.101.159:9999 # 邓-本地 # VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api/ # 正式环境线上 # 代码生成服务地址 diff --git a/src/api/wallet/wallet-recharge-apply.ts b/src/api/wallet/wallet-recharge-apply.ts index bdca851..28d3a6c 100644 --- a/src/api/wallet/wallet-recharge-apply.ts +++ b/src/api/wallet/wallet-recharge-apply.ts @@ -24,6 +24,14 @@ export function comparePageJoin(obj?: Object) { }) } +export function compareInvoicePageJoin(obj?: Object) { + return request({ + url: "/wallet/wallet-recharge-apply/compare-invoice-page-join", + method: "get", + params: obj, + }) +} + export function pageJoin(query?: Object) { return request({ url: "/wallet/wallet-recharge-apply/page-join", diff --git a/src/views/wallet/wallet-recharge-apply/preview-excel.vue b/src/views/wallet/wallet-recharge-apply/preview-excel.vue index 8b7343d..cbbe976 100644 --- a/src/views/wallet/wallet-recharge-apply/preview-excel.vue +++ b/src/views/wallet/wallet-recharge-apply/preview-excel.vue @@ -52,7 +52,9 @@ const { query } = useRoute() onMounted(async () => { const id = query.id as unknown as any + const invoiceId = query.invoiceId as unknown as any state.queryForm.id = id + state.queryForm.invoiceId = invoiceId getList() getDetail() }) @@ -66,7 +68,7 @@ const state = reactive({ total: 0, pageSizes: [10, 20, 50, 100, 200, 500], }, - pageList: walletRechargeApplyApi.comparePageJoin, + pageList: walletRechargeApplyApi.compareInvoicePageJoin, }) const { downBlobFile, tableStyle } = useTable(state) @@ -107,13 +109,27 @@ const getList = async () => { ...state.pagination, ...state.queryForm, } - const { data: pageData } = await walletRechargeApplyApi.comparePageJoin(_pa) - data.list = pageData.page.records - data.total = pageData.page.total + const { data: pageData } = await walletRechargeApplyApi.compareInvoicePageJoin(_pa) + console.log(pageData, "pageData"); + + if (pageData.records && pageData.records.length) { + pageData.records = pageData.records.map((v: any) => { + return { + ...v, + currentImport_price: v.price + } + }) + } + + console.log(pageData.records, "pageData.records"); + + + data.list = pageData.records + data.total = pageData.total data.tableList = pageData.tableList - console.log(pageData.tableList) data.tableListStr = pageData.tableListStr - state.pagination.total = pageData.page.total + + state.pagination.total = pageData.total } finally { state.loading = false } @@ -151,47 +167,8 @@ const getSummaries = (param: SummaryMethodProps) => { } else { sums[index] = "NaN" } - } else if (column.property === "afterBalance") { - const values = data1.map((item) => Number(item[column.property])) - if (!values.every((value) => Number.isNaN(value))) { - sums[index] = h("span", { style: {} }, [ - displayPrice( - values.reduce((prev, curr) => { - const value = Number(curr) - if (!Number.isNaN(value)) { - return prev + curr - } else { - return prev - } - }, 0), - ), - ]) - } else { - sums[index] = "NaN" - } - } else if (column.property === data.tableList[0]) { - sums[index] = displayPrice( - data.list.reduce((prev: any, curr: any) => { - return prev + curr[data.tableList[0] + "_price"] - }, 0), - ) - } else if (column.property === data.tableList[1]) { - sums[index] = displayPrice( - data.list.reduce((prev: any, curr: any) => { - return prev + curr[data.tableList[1] + "_price"] - }, 0), - ) - } else if (column.property === data.tableList[2]) { - sums[index] = displayPrice( - data.list.reduce((prev: any, curr: any) => { - return prev + curr[data.tableList[2] + "_price"] - }, 0), - ) - } else { - sums[index] = "" } }) - return sums } diff --git a/src/views/wallet/wallet-recharge-invoice/index.vue b/src/views/wallet/wallet-recharge-invoice/index.vue index e9f3451..537cc99 100644 --- a/src/views/wallet/wallet-recharge-invoice/index.vue +++ b/src/views/wallet/wallet-recharge-invoice/index.vue @@ -102,6 +102,10 @@ - + @@ -131,6 +142,13 @@ const showSearch = ref(true) // 多选变量 const selectObjs = ref([]) as any const multiple = ref(true) +const showDrawer = ref(false) // 余额统计抽屉开关 +const balanceStatisticsLoading = ref(false) +const balanceStatistics = reactive({ + a: 0, + b: 0, + c: 0, +}) const state: BasicTableProps = reactive({ queryForm: { @@ -154,6 +172,35 @@ const resetQuery = () => { getDataList() } +// 余额统计 +const viewBalanceStatistics = async () => { + showDrawer.value = true + balanceStatisticsLoading.value = true + try { + const { code, data } = await getBalanceStatistics({ + deptIds: state.queryForm.deptIds, + isInclude: state.queryForm.isInclude, + userId: state.queryForm.userId, + }) + if (code == 0) { + balanceStatistics.a = data.a + return + } + return useMessage().error(data.msg || "获取数据失败") + } catch (error: any) { + useMessage().error(error.msg) + } finally { + balanceStatisticsLoading.value = false + } +} + +// 关闭抽屉 +const drawerClose = () => { + for (const key in balanceStatistics) { + balanceStatistics[key] = 0 + } +} + // 导出excel const exportExcel = () => { postDownBlobFile( From 4cb85e2dea5a81b6e6086c5567e9a5f26ee07590 Mon Sep 17 00:00:00 2001 From: dzc <2388224167@qq.com> Date: Wed, 9 Jul 2025 17:05:06 +0800 Subject: [PATCH 6/7] =?UTF-8?q?feat:=E4=BD=99=E9=A2=9D=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wallet/wallet-manage.ts | 8 ++ src/views/wallet/wallet-qb/index.vue | 113 ++++++++++++--------------- 2 files changed, 57 insertions(+), 64 deletions(-) diff --git a/src/api/wallet/wallet-manage.ts b/src/api/wallet/wallet-manage.ts index b5b2888..b75c0d7 100644 --- a/src/api/wallet/wallet-manage.ts +++ b/src/api/wallet/wallet-manage.ts @@ -34,6 +34,14 @@ export function fetchList(query?: Object) { }) } +export function qbTotal(data: any) { + return request({ + url: "/wallet/wallet-manage/qb-total", + method: "post", + data: data, + }) +} + export function fetchListJoinQb(query: any) { return request({ url: "/wallet/wallet-manage/page-join-qb", diff --git a/src/views/wallet/wallet-qb/index.vue b/src/views/wallet/wallet-qb/index.vue index da57ec8..259545d 100644 --- a/src/views/wallet/wallet-qb/index.vue +++ b/src/views/wallet/wallet-qb/index.vue @@ -1,16 +1,9 @@ - - {{ balanceStatistics.a }} - {{ balanceStatistics.b }} - {{ balanceStatistics.c }} - + + + + + + + + + + + + +