diff --git a/src/views/hard/hard-dept-total/index.vue b/src/views/hard/hard-dept-total/index.vue index 02544fe..2f7b54c 100644 --- a/src/views/hard/hard-dept-total/index.vue +++ b/src/views/hard/hard-dept-total/index.vue @@ -3,20 +3,10 @@
- - - - - - - - - - - + @@ -30,6 +20,19 @@ + +
+ +
+
- + + + + + + + + + + + + + + - - - + - - - - - - + -
@@ -90,6 +99,7 @@ const selectObjs = ref([]) as any const multiple = ref(true) // 表格变量 const state: BasicTableProps = reactive({ + isPage: false, queryForm: {}, pageList: hardTotalApi.pageListDept, }) @@ -98,17 +108,33 @@ const state: BasicTableProps = reactive({ const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, downBlobFile, tableStyle } = useTable(state) +// 导出excel +const exportExcel = () => { + downBlobFile("/hard/hard-total/export-dept", Object.assign(state.queryForm), "部门交易记录导出.xlsx") +} + const getSummaries = (param: any) => { const { columns, data } = param - const totalColumns = ["beforePrice", "price"] + const totalColumns = [ + "walletPrice", + "walletCount", + "orderPayPrice", + "orderPayCount", + "orderRefundPrice", + "orderRefundCont", + ] 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]) + .map((v: any) => Number(v[i.property])) .reduce((pren: number, next: number) => pren + next, 0) - totalRow[index] = displayPrice(total) + if (i.property.includes("Price")) { + totalRow[index] = displayPrice(total) + } else { + totalRow[index] = total + "次" + } } }) return totalRow