Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
84e11a2c2d
5 files changed
+42
-69
No files matched your search
@@ -191,6 +191,8 @@ defineExpose({
|
||||
padding-top: 10px;
|
||||
box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.1);
|
||||
z-index: 10;
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="layout-padding-auto layout-padding-view">
|
||||
<el-scrollbar>
|
||||
<dep-tree
|
||||
ref="queryTreeRef"
|
||||
ref="depTreeRef"
|
||||
:placeholder="$t('common.queryDeptTip')"
|
||||
:query="deptData.queryList"
|
||||
:show-expand="true"
|
||||
@@ -250,7 +250,7 @@ const excelUploadRef = ref()
|
||||
const queryRef = ref()
|
||||
const showSearch = ref(true)
|
||||
const inputPassword = ref()
|
||||
const queryTreeRef = ref() // 树组件ref引用
|
||||
const depTreeRef = ref() // 树组件ref引用
|
||||
|
||||
// 多选rows
|
||||
const selectObjs = ref([]) as any
|
||||
@@ -287,7 +287,7 @@ const treeDeepSearch = (isDeep: boolean) => {
|
||||
const resetQuery = () => {
|
||||
queryRef.value?.resetFields()
|
||||
state.queryForm.deptId = ""
|
||||
queryTreeRef.value.getdeptTree()
|
||||
depTreeRef.value.getTreeData()
|
||||
getDataList()
|
||||
}
|
||||
|
||||
|
||||
@@ -361,65 +361,36 @@ const getSummaries = (param: SummaryMethodProps) => {
|
||||
return
|
||||
}
|
||||
if (column.property === "paymentInformation") {
|
||||
const totalPriceValues = data.map((item) => Number(item.totalPrice))
|
||||
const extraPriceValues = data.map((item) => Number(item.extraPrice))
|
||||
const payPriceValues = data.map((item) => Number(item.payPrice))
|
||||
if (
|
||||
!totalPriceValues.every((value) => Number.isNaN(value)) &&
|
||||
!extraPriceValues.every((value) => Number.isNaN(value)) &&
|
||||
!payPriceValues.every((value) => Number.isNaN(value))
|
||||
) {
|
||||
// h("div", { style: { textDecoration: "underline" } }, ["Total Cost"])
|
||||
sums[index] = h("div", { style: {} }, [
|
||||
h("div", {}, [
|
||||
h("span", { style: { marginRight: "40px", fontWeight: "bold" } }, ["商品总价"]),
|
||||
h("span", { style: { color: "#67C260" } }, [
|
||||
`${displayPrice(
|
||||
totalPriceValues.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0),
|
||||
)}`,
|
||||
const priceVNode: VNode[] & string[] = []
|
||||
;[
|
||||
{ column: "totalPrice", columnName: "商品总价", color: "#67C260" },
|
||||
{ column: "extraPrice", columnName: "额外支付", color: "#F56E9B" },
|
||||
{ column: "payPrice", columnName: "实际支付", color: "#355CF6" },
|
||||
].forEach(({ column, columnName, color }: any, index: number) => {
|
||||
const values = data.map((item) => Number(item[column]))
|
||||
if (!values.every((value) => Number.isNaN(value))) {
|
||||
priceVNode.push(
|
||||
h("div", {}, [
|
||||
h("span", { style: { marginRight: "40px", minWidth: "60px", fontWeight: "bold" } }, [columnName]),
|
||||
h("span", { style: { color, minWidth: "50px", flex: 1 } }, [
|
||||
displayPrice(
|
||||
values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0),
|
||||
),
|
||||
]),
|
||||
]),
|
||||
]),
|
||||
h("div", { style: {} }, [
|
||||
h("span", { style: { marginRight: "40px", fontWeight: "bold" } }, ["额外支付"]),
|
||||
h("span", { style: { color: "#F56E9B" } }, [
|
||||
`${displayPrice(
|
||||
extraPriceValues.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0),
|
||||
)}`,
|
||||
]),
|
||||
]),
|
||||
h("div", { style: {} }, [
|
||||
h("span", { style: { marginRight: "40px", fontWeight: "bold" } }, ["实际支付"]),
|
||||
h("span", { style: { color: "#355CF6" } }, [
|
||||
`${displayPrice(
|
||||
payPriceValues.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!Number.isNaN(value)) {
|
||||
return prev + curr
|
||||
} else {
|
||||
return prev
|
||||
}
|
||||
}, 0),
|
||||
)}`,
|
||||
]),
|
||||
]),
|
||||
])
|
||||
} else {
|
||||
sums[index] = "N/A"
|
||||
}
|
||||
)
|
||||
} else {
|
||||
priceVNode.push("NaN")
|
||||
}
|
||||
})
|
||||
sums[index] = h("div", { style: {} }, [...priceVNode])
|
||||
} else {
|
||||
sums[index] = ""
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle"
|
||||
>
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="selection" width="80" align="center" />
|
||||
<el-table-column type="index" label="#" width="50" />
|
||||
<el-table-column label="设备" align="center">
|
||||
<template #default="{ row }">
|
||||
@@ -97,14 +97,14 @@ const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, do
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile("/wallet/hard-total/export-sb", Object.assign(state.queryForm), "设备交易记录.xlsx")
|
||||
downBlobFile("/hard/hard-total/export-sb", Object.assign(state.queryForm), "设备交易记录.xlsx")
|
||||
}
|
||||
|
||||
const getSummaries = (param: any) => {
|
||||
const { columns, data } = param
|
||||
const totalColumns = ["totalPayPrice", "totalPayCount"]
|
||||
const totalRow = Array.from({ length: columns.length })
|
||||
totalRow[2] = "合计"
|
||||
totalRow[0] = "合计"
|
||||
columns.forEach((i: any, index: number) => {
|
||||
if (totalColumns.includes(i.property)) {
|
||||
const total = data
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
<el-form ref="queryRef" :inline="true" :model="state.queryForm" @keyup.enter="getDataList">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="5">
|
||||
<el-form-item class="w100" label="创建时间" prop="createTimeList">
|
||||
<el-date-picker v-model="state.queryForm.createTimeList" value-format="YYYY-MM-DD" type="daterange" />
|
||||
<el-form-item class="w100" label="创建时间" prop="payTimeList">
|
||||
<el-date-picker v-model="state.queryForm.payTimeList" value-format="YYYY-MM-DD" type="daterange" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-form-item>
|
||||
@@ -38,7 +38,7 @@
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle"
|
||||
>
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="selection" width="80" align="center" />
|
||||
<el-table-column type="index" label="#" width="50" />
|
||||
<el-table-column label="商户" align="center" prop="merchantName" />
|
||||
<el-table-column label="总消费金额" align="center" prop="totalPayPrice">
|
||||
@@ -94,14 +94,14 @@ const resetQuery = () => {
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile("/wallet/hard-total/export-cs", Object.assign(state.queryForm), "商户交易记录.xlsx")
|
||||
downBlobFile("/hard/hard-total/export-cs", Object.assign(state.queryForm), "商户交易记录.xlsx")
|
||||
}
|
||||
|
||||
const getSummaries = (param: any) => {
|
||||
const { columns, data } = param
|
||||
const totalColumns = ["totalPayPrice", "totalPayCount"]
|
||||
const totalRow = Array.from({ length: columns.length })
|
||||
totalRow[2] = "合计"
|
||||
totalRow[0] = "合计"
|
||||
columns.forEach((i: any, index: number) => {
|
||||
if (totalColumns.includes(i.property)) {
|
||||
const total = data
|
||||
|
||||
Reference in new issue
Block a user