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