feat:钱包明细
This commit is contained in:
1 parent
2487ca2431
commit
e2d7044f4e
4 files changed
+68
-46
No files matched your search
+2
-2
@@ -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.185:9999 # 邓-本地
|
||||
VITE_ADMIN_PROXY_PATH = http://192.168.101.196:9999 # 邓-本地
|
||||
# VITE_ADMIN_PROXY_PATH = http://59.202.170.152:81/api # 正式环境线上
|
||||
|
||||
# 图片访问基础地址
|
||||
@@ -20,7 +20,7 @@ VITE_ADMIN_PROXY_PATH = http://192.168.101.185: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.185:9999 # 邓-本地
|
||||
VITE_IMAGE_BASE_PATH = http://192.168.101.196:9999 # 邓-本地
|
||||
# VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api/ # 正式环境线上
|
||||
|
||||
# 代码生成服务地址
|
||||
|
||||
@@ -87,6 +87,14 @@ export function pageJoin(query?: Object) {
|
||||
})
|
||||
}
|
||||
|
||||
export function publicPageJoin(query?: Object) {
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction/public/page-join",
|
||||
method: "get",
|
||||
params: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function addObj(obj?: Object) {
|
||||
return request({
|
||||
url: "/wallet/wallet-transaction",
|
||||
|
||||
@@ -32,7 +32,8 @@
|
||||
</el-row>
|
||||
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
|
||||
height="70vh" :header-cell-style="tableStyle.headerCellStyle" :summary-method="getSummaries"
|
||||
show-summary @selection-change="selectionChangHandle" @sort-change="sortChangeHandle">
|
||||
show-summary @selection-change="selectionChangHandle" :cell-class-name="cellClassName"
|
||||
@sort-change="sortChangeHandle">
|
||||
<el-table-column type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="80" />
|
||||
<el-table-column prop="deptName" min-width="150" label="部门" />
|
||||
@@ -47,34 +48,6 @@
|
||||
<div :class="{ 'color-success': row.walletCount != 0 }">{{ row.walletCount }}次</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="walletReducePrice" label="批量扣减金额" align="center" min-width="110">
|
||||
<template #default="{ row }">
|
||||
<div :class="{ 'color-success': row.walletReducePrice != 0 }">{{
|
||||
displayPrice(row.walletReducePrice) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- start 批量退换食堂 start -->
|
||||
<el-table-column prop="walletReturnCanteenCount" label="批量退还各自食堂次数" align="center"
|
||||
min-width="170">
|
||||
<template #default="{ row }">
|
||||
<div :class="{ 'color-success': row.walletReturnCanteenCount != 0 }">{{
|
||||
row.walletReturnCanteenCount }}次</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="walletReturnCanteenPrice" label="批量退还各自食堂金额" align="center"
|
||||
min-width="170">
|
||||
<template #default="{ row }">
|
||||
<div :class="{ 'color-success': row.walletReturnCanteenPrice != 0 }">{{
|
||||
displayPrice(row.walletReturnCanteenPrice) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- end 批量退换食堂 end -->
|
||||
<el-table-column prop="walletReduceCount" label="批量扣减次数" align="center" min-width="110">
|
||||
<template #default="{ row }">
|
||||
<div :class="{ 'color-success': row.walletReduceCount != 0 }">{{ row.walletReduceCount
|
||||
}}次</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="walletOncePrice" label="单次充值金额" align="center" min-width="110">
|
||||
<template #default="{ row }">
|
||||
<div :class="{ 'color-success': row.walletOncePrice != 0 }">{{
|
||||
@@ -87,6 +60,18 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="walletReducePrice" label="批量扣减金额" align="center" min-width="110">
|
||||
<template #default="{ row }">
|
||||
<div :class="{ 'color-success': row.walletReducePrice != 0 }">{{
|
||||
displayPrice(row.walletReducePrice) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="walletReduceCount" label="批量扣减次数" align="center" min-width="110">
|
||||
<template #default="{ row }">
|
||||
<div :class="{ 'color-success': row.walletReduceCount != 0 }">{{ row.walletReduceCount
|
||||
}}次</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="walletOnceReducePrice" label="单次扣减金额" align="center" min-width="110">
|
||||
<template #default="{ row }">
|
||||
<div :class="{ 'color-success': row.walletOnceReducePrice != 0 }">{{
|
||||
@@ -99,6 +84,23 @@
|
||||
row.walletOnceReduceCount }}次</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- start 批量退换食堂 start -->
|
||||
<el-table-column prop="walletReturnCanteenPrice" label="批量退还各自食堂金额" align="center"
|
||||
min-width="170">
|
||||
<template #default="{ row }">
|
||||
<div :class="{ 'color-success': row.walletReturnCanteenPrice != 0 }">{{
|
||||
displayPrice(row.walletReturnCanteenPrice) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="walletReturnCanteenCount" label="批量退还各自食堂次数" align="center"
|
||||
min-width="170">
|
||||
<template #default="{ row }">
|
||||
<div :class="{ 'color-success': row.walletReturnCanteenCount != 0 }">{{
|
||||
row.walletReturnCanteenCount }}次</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- end 批量退换食堂 end -->
|
||||
|
||||
<el-table-column prop="orderPayPrice" label="流水金额" align="center" min-width="90">
|
||||
<template #default="{ row }">
|
||||
<div :class="{ 'color-primary': row.orderPayPrice != 0 }">{{
|
||||
@@ -175,6 +177,17 @@ const exportExcel = () => {
|
||||
postDownBlobFile("/hard/hard-total/export-dept", Object.assign(state.queryForm), "部门交易记录导出.xlsx")
|
||||
}
|
||||
|
||||
const cellClassName = ({ row, column, rowIndex }: any) => {
|
||||
if (column.property) {
|
||||
if (column.property.includes("Count")) {
|
||||
return 'success-cell'
|
||||
}
|
||||
if (column.property.includes("Price")) {
|
||||
return 'warning-cell'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const getSummaries = (param: any) => {
|
||||
const { columns, data } = param
|
||||
const totalColumns = [
|
||||
@@ -238,3 +251,14 @@ const handleGetSelectNode = (curClickedNode: any, checkedTreeNodes: any, isDeepT
|
||||
getDataList()
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
.el-table .warning-cell {
|
||||
background: var(--el-color-warning-light-9);
|
||||
}
|
||||
|
||||
.el-table .success-cell {
|
||||
background: var(--el-color-success-light-9);
|
||||
}
|
||||
</style>
|
||||
@@ -1,13 +1,7 @@
|
||||
<template>
|
||||
<el-dialog title="钱包余额明细" v-model="visible" width="60%" :close-on-click-modal="false" draggable>
|
||||
<el-table
|
||||
:data="state.dataList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
@sort-change="sortChangeHandle"
|
||||
>
|
||||
<el-table :data="state.dataList" v-loading="state.loading" border :cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle" @sort-change="sortChangeHandle">
|
||||
<el-table-column align="center" width="200" label="编号" prop="id" />
|
||||
<el-table-column align="center" width="200" label="钱包编号" prop="walletId" />
|
||||
<el-table-column align="center" width="200" label="交易类型" prop="title" />
|
||||
@@ -20,30 +14,26 @@
|
||||
<el-table-column align="center" label="交易时间" prop="createTime" width="180px" />
|
||||
</el-table>
|
||||
<template #footer>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
|
||||
v-bind="state.pagination" />
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="WalletManageDialog">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { useMessage } from "/@/hooks/message"
|
||||
import * as walletTransactionApi from "/@/api/wallet/wallet-transaction"
|
||||
import { rule } from "/@/utils/validate"
|
||||
import { displayPrice } from "/@/utils/formatMoney"
|
||||
const emit = defineEmits(["refresh"])
|
||||
|
||||
// 定义变量内容
|
||||
const visible = ref(false)
|
||||
const loading = ref(false)
|
||||
// 定义字典
|
||||
|
||||
// 提交表单数据
|
||||
const form = reactive({})
|
||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
queryForm: {},
|
||||
pageList: walletTransactionApi.pageJoin,
|
||||
pageList: walletTransactionApi.publicPageJoin,
|
||||
})
|
||||
|
||||
// table hook
|
||||
|
||||
Reference in new issue
Block a user