Merge branch 'master' of http://gitea.zianxin.com/zianxin-tec/biz-pc-cloud
This commit is contained in:
commit
8e1566e050
1 file changed
+39
-9
@@ -38,26 +38,31 @@
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
<right-toolbar
|
||||
<!-- <right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
:export="'wallet_walletInactive_export'"
|
||||
@exportExcel="exportExcel"
|
||||
class="ml10 mr20"
|
||||
style="float: right"
|
||||
@queryTable="getDataList"
|
||||
></right-toolbar>
|
||||
></right-toolbar> -->
|
||||
</div>
|
||||
</el-row>
|
||||
<el-table
|
||||
:data="state.dataList"
|
||||
:data="tableList"
|
||||
v-loading="state.loading"
|
||||
border
|
||||
:row-key="(row:any) => row.id"
|
||||
lazy
|
||||
:load="load"
|
||||
:indent="30"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
:summary-method="getSummaries"
|
||||
show-summary
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
:header-cell-style="tableStyle.headerCellStyle"
|
||||
:cell-style="tableStyle.cellStyle"
|
||||
@selection-change="selectionChangHandle"
|
||||
@sort-change="sortChangeHandle"
|
||||
:row-class-name="tableRowClassName"
|
||||
>
|
||||
<el-table-column v-auth="'wallet_walletManage_del'" type="selection" width="40" align="center" />
|
||||
<el-table-column type="index" label="#" width="80" />
|
||||
@@ -69,6 +74,11 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="userMobile" label="手机号" />
|
||||
<el-table-column prop="deptName" label="部门" />
|
||||
<el-table-column prop="walletTypeName" label="钱包类型" />
|
||||
<el-table-column prop="balance" label="余额">
|
||||
<template #default="{ row }">{{ row.balance && displayPrice(row.balance) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="updateTime" label="最后充值时间" />
|
||||
</el-table>
|
||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||
</template>
|
||||
@@ -79,7 +89,7 @@
|
||||
|
||||
<script setup lang="ts" name="systemWalletManage">
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
||||
import { pageJoinActive, delObjs } from "/@/api/wallet/wallet-manage"
|
||||
import { pageJoinActive, delObjs, listJoinActive } from "/@/api/wallet/wallet-manage"
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message"
|
||||
import { useDict } from "/@/hooks/dict"
|
||||
import { displayPrice } from "/@/utils/formatMoney"
|
||||
@@ -101,8 +111,10 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
||||
},
|
||||
pageList: pageJoinActive,
|
||||
})
|
||||
const tableList = computed(() => {
|
||||
return state.dataList?.map((item: any) => ({ ...item, walletTypeName: "", updateTime: "", balance: "", children: [], hasChildren: true }))
|
||||
})
|
||||
|
||||
// table hook
|
||||
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, postDownBlobFile, tableStyle } = useTable(state)
|
||||
|
||||
// 清空搜索条件
|
||||
@@ -120,12 +132,24 @@ const resetQuery = () => {
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
postDownBlobFile(
|
||||
"/wallet/wallet-manage/export-qb",
|
||||
"/wallet/wallet-inactive/export",
|
||||
Object.assign(state.queryForm, { current: state.pagination?.current, size: state.pagination?.size }),
|
||||
"钱包记录.xlsx",
|
||||
"不活跃钱包统计.xlsx",
|
||||
)
|
||||
}
|
||||
|
||||
const tableRowClassName = ({ row, rowIndex }: { row: any; rowIndex: number }) => {
|
||||
if (row._flag) {
|
||||
return "success-row"
|
||||
}
|
||||
}
|
||||
|
||||
const load = (row: any, treeNode: unknown, resolve: (date: any[]) => void) => {
|
||||
listJoinActive({ userId: row.userId }).then((res) => {
|
||||
resolve(res.data.map((item: any) => ({ ...item, id: item.id + "0", _flag: true })))
|
||||
})
|
||||
}
|
||||
|
||||
const getSummaries = (param: any) => {
|
||||
const { columns, data } = param
|
||||
const totalColumns = ["balance"]
|
||||
@@ -173,3 +197,9 @@ const handleDelete = async (ids: string[]) => {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
::v-deep .el-table .success-row {
|
||||
--el-table-tr-bg-color: var(--el-color-success-light-9);
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user