Merge branch 'master' of http://124.223.211.244:8418/zianxin/biz-pc-cloud
This commit is contained in:
commit
67fd7bfd09
6 files changed
+107
-21
No files matched your search
@@ -49,7 +49,7 @@ export function putObj(obj?: Object) {
|
||||
|
||||
export function recover(params?: Object) {
|
||||
return request({
|
||||
url: "/wallet-recharge-import/recover",
|
||||
url: "/wallet/wallet-recharge-import/recover",
|
||||
method: "get",
|
||||
params,
|
||||
})
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:summary-method="getSummaries"
|
||||
show-summary
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@@ -64,12 +66,17 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="walletTypeUniqueCode" width="200" label="充值金额">
|
||||
<el-table-column prop="wallet_biz" width="200" label="交易类型">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="wallet_biz" :value="row.bizType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" width="200" align="center" label="充值金额">
|
||||
<template #default="{ row }">
|
||||
<div class="color-success">{{ displayPrice(row.price) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="walletTypeUniqueCode" width="200" label="饭卡余额">
|
||||
<el-table-column prop="balance" width="200" align="center" label="饭卡余额">
|
||||
<template #default="{ row }">
|
||||
<div class="color-primary">{{ displayPrice(row.balance) }}</div>
|
||||
</template>
|
||||
@@ -90,7 +97,6 @@
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</div>
|
||||
|
||||
<!-- 编辑、新增 -->
|
||||
<form-dialog ref="formDialogRef" @refresh="getDataList(false)" />
|
||||
</div>
|
||||
@@ -106,7 +112,7 @@ import { displayPrice } from "/@/utils/formatMoney"
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||
// 定义查询字典
|
||||
const { wallet_type } = useDict("wallet_type")
|
||||
const { wallet_type, wallet_biz } = useDict("wallet_type", "wallet_biz")
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
// 搜索变量
|
||||
@@ -134,6 +140,22 @@ const resetQuery = () => {
|
||||
getDataList()
|
||||
}
|
||||
|
||||
const getSummaries = (param: any) => {
|
||||
const { columns, data } = param
|
||||
const totalColumns = ["price", "balance"]
|
||||
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])
|
||||
.reduce((pren: number, next: number) => pren + next, 0)
|
||||
totalRow[index] = displayPrice(total)
|
||||
}
|
||||
})
|
||||
return totalRow
|
||||
}
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile(
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:summary-method="getSummaries"
|
||||
show-summary
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@@ -76,17 +78,17 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="cardNumber" width="150" label="饭卡卡号" />
|
||||
<el-table-column prop="balance" width="100" label="余额">
|
||||
<el-table-column prop="balance" align="center" width="100" label="余额">
|
||||
<template #default="{ row }">
|
||||
<div class="color-primary">{{ displayPrice(row.balance) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="totalExpense" width="100" label="累计支出">
|
||||
<el-table-column prop="totalExpense" align="center" width="100" label="累计支出">
|
||||
<template #default="{ row }">
|
||||
<div class="color-danger">{{ displayPrice(row.totalExpense) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="totalRecharge" width="100" label="累计充值">
|
||||
<el-table-column prop="totalRecharge" align="center" width="100" label="累计充值">
|
||||
<template #default="{ row }">
|
||||
<div class="color-success">{{ displayPrice(row.totalRecharge) }}</div>
|
||||
</template>
|
||||
@@ -175,6 +177,22 @@ const exportExcel = () => {
|
||||
)
|
||||
}
|
||||
|
||||
const getSummaries = (param: any) => {
|
||||
const { columns, data } = param
|
||||
const totalColumns = ["balance", "totalExpense", "totalRecharge"]
|
||||
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])
|
||||
.reduce((pren: number, next: number) => pren + next, 0)
|
||||
totalRow[index] = displayPrice(total)
|
||||
}
|
||||
})
|
||||
return totalRow
|
||||
}
|
||||
|
||||
// 多选事件
|
||||
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id)
|
||||
|
||||
@@ -109,19 +109,16 @@
|
||||
<div class="color-success">{{ displayPrice(row.price) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
<el-table-column v-auths="['wallet_walletRechargeImport_recover']" label="操作" width="200">
|
||||
<template #default="{ row }">
|
||||
<!-- <el-button
|
||||
v-if="false"
|
||||
icon="delete"
|
||||
<el-button
|
||||
v-auth="'wallet_walletRechargeImport_recover'"
|
||||
icon="RefreshRight"
|
||||
text
|
||||
type="primary"
|
||||
v-auth="'wallet_walletRechargeApply_del'"
|
||||
@click="handleDelete([row.id])"
|
||||
@click="handleRecover(row.id)"
|
||||
>恢复</el-button
|
||||
>
|
||||
删除</el-button
|
||||
> -->
|
||||
<el-button icon="RefreshRight" text type="primary" @click="handleRecover(row.id)">恢复</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -150,6 +147,9 @@ const selectObjs = ref([]) as any
|
||||
const multiple = ref(true)
|
||||
// 表格变量
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
pagination: {
|
||||
pageSizes: [1, 10, 20, 50, 100, 200, 500, 1000, 2000],
|
||||
},
|
||||
queryForm: {},
|
||||
pageList: walletRechargeImportApi.pageJoin,
|
||||
})
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:summary-method="getSummaries"
|
||||
show-summary
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@@ -64,7 +66,12 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="walletTypeUniqueCode" width="200" label="退款金额">
|
||||
<el-table-column prop="wallet_biz" width="200" label="交易类型">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="wallet_biz" :value="row.bizType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" align="center" width="200" label="退款金额">
|
||||
<template #default="{ row }">
|
||||
<div class="color-success">{{ displayPrice(row.price) }}</div>
|
||||
</template>
|
||||
@@ -113,7 +120,7 @@ import { displayPrice } from "/@/utils/formatMoney"
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||
// 定义查询字典
|
||||
const { wallet_type } = useDict("wallet_type")
|
||||
const { wallet_type, wallet_biz } = useDict("wallet_type", "wallet_biz")
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
// 搜索变量
|
||||
@@ -160,6 +167,22 @@ const exportExcel = () => {
|
||||
)
|
||||
}
|
||||
|
||||
const getSummaries = (param: any) => {
|
||||
const { columns, data } = param
|
||||
const totalColumns = ["price"]
|
||||
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])
|
||||
.reduce((pren: number, next: number) => pren + next, 0)
|
||||
totalRow[index] = displayPrice(total)
|
||||
}
|
||||
})
|
||||
return totalRow
|
||||
}
|
||||
|
||||
// 多选事件
|
||||
const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
selectObjs.value = objs.map(({ id }) => id)
|
||||
|
||||
@@ -40,6 +40,8 @@
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:summary-method="getSummaries"
|
||||
show-summary
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@@ -64,7 +66,12 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="walletTypeUniqueCode" width="200" label="消费金额">
|
||||
<el-table-column prop="wallet_biz" width="200" label="交易类型">
|
||||
<template #default="{ row }">
|
||||
<dict-tag :options="wallet_biz" :value="row.bizType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" align="center" width="200" label="消费金额">
|
||||
<template #default="{ row }">
|
||||
<div class="color-danger">{{ displayPrice(row.price) }}</div>
|
||||
</template>
|
||||
@@ -114,7 +121,7 @@ const { push } = useRouter()
|
||||
// 引入组件
|
||||
const FormDialog = defineAsyncComponent(() => import("./form.vue"))
|
||||
// 定义查询字典
|
||||
const { wallet_type } = useDict("wallet_type")
|
||||
const { wallet_type, wallet_biz } = useDict("wallet_type", "wallet_biz")
|
||||
// 定义变量内容
|
||||
const formDialogRef = ref()
|
||||
// 搜索变量
|
||||
@@ -161,6 +168,22 @@ const selectionChangHandle = (objs: { id: string }[]) => {
|
||||
multiple.value = !objs.length
|
||||
}
|
||||
|
||||
const getSummaries = (param: any) => {
|
||||
const { columns, data } = param
|
||||
const totalColumns = ["price"]
|
||||
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])
|
||||
.reduce((pren: number, next: number) => pren + next, 0)
|
||||
totalRow[index] = displayPrice(total)
|
||||
}
|
||||
})
|
||||
return totalRow
|
||||
}
|
||||
|
||||
// 删除操作
|
||||
const handleDelete = async (ids: string[]) => {
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user