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 @@