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>
|
</el-button>
|
||||||
<right-toolbar
|
<!-- <right-toolbar
|
||||||
v-model:showSearch="showSearch"
|
v-model:showSearch="showSearch"
|
||||||
:export="'wallet_walletInactive_export'"
|
:export="'wallet_walletInactive_export'"
|
||||||
@exportExcel="exportExcel"
|
@exportExcel="exportExcel"
|
||||||
class="ml10 mr20"
|
class="ml10 mr20"
|
||||||
style="float: right"
|
style="float: right"
|
||||||
@queryTable="getDataList"
|
@queryTable="getDataList"
|
||||||
></right-toolbar>
|
></right-toolbar> -->
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table
|
<el-table
|
||||||
:data="state.dataList"
|
:data="tableList"
|
||||||
v-loading="state.loading"
|
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"
|
:summary-method="getSummaries"
|
||||||
show-summary
|
show-summary
|
||||||
:cell-style="tableStyle.cellStyle"
|
|
||||||
:header-cell-style="tableStyle.headerCellStyle"
|
:header-cell-style="tableStyle.headerCellStyle"
|
||||||
|
:cell-style="tableStyle.cellStyle"
|
||||||
@selection-change="selectionChangHandle"
|
@selection-change="selectionChangHandle"
|
||||||
@sort-change="sortChangeHandle"
|
@sort-change="sortChangeHandle"
|
||||||
|
:row-class-name="tableRowClassName"
|
||||||
>
|
>
|
||||||
<el-table-column v-auth="'wallet_walletManage_del'" type="selection" width="40" align="center" />
|
<el-table-column v-auth="'wallet_walletManage_del'" type="selection" width="40" align="center" />
|
||||||
<el-table-column type="index" label="#" width="80" />
|
<el-table-column type="index" label="#" width="80" />
|
||||||
@@ -69,6 +74,11 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="userMobile" label="手机号" />
|
<el-table-column prop="userMobile" label="手机号" />
|
||||||
<el-table-column prop="deptName" 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>
|
</el-table>
|
||||||
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
<pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" v-bind="state.pagination" />
|
||||||
</template>
|
</template>
|
||||||
@@ -79,7 +89,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts" name="systemWalletManage">
|
<script setup lang="ts" name="systemWalletManage">
|
||||||
import { BasicTableProps, useTable } from "/@/hooks/table"
|
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 { useMessage, useMessageBox } from "/@/hooks/message"
|
||||||
import { useDict } from "/@/hooks/dict"
|
import { useDict } from "/@/hooks/dict"
|
||||||
import { displayPrice } from "/@/utils/formatMoney"
|
import { displayPrice } from "/@/utils/formatMoney"
|
||||||
@@ -101,8 +111,10 @@ const state: BasicTableProps = reactive<BasicTableProps>({
|
|||||||
},
|
},
|
||||||
pageList: pageJoinActive,
|
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)
|
const { getDataList, currentChangeHandle, sizeChangeHandle, sortChangeHandle, postDownBlobFile, tableStyle } = useTable(state)
|
||||||
|
|
||||||
// 清空搜索条件
|
// 清空搜索条件
|
||||||
@@ -120,12 +132,24 @@ const resetQuery = () => {
|
|||||||
// 导出excel
|
// 导出excel
|
||||||
const exportExcel = () => {
|
const exportExcel = () => {
|
||||||
postDownBlobFile(
|
postDownBlobFile(
|
||||||
"/wallet/wallet-manage/export-qb",
|
"/wallet/wallet-inactive/export",
|
||||||
Object.assign(state.queryForm, { current: state.pagination?.current, size: state.pagination?.size }),
|
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 getSummaries = (param: any) => {
|
||||||
const { columns, data } = param
|
const { columns, data } = param
|
||||||
const totalColumns = ["balance"]
|
const totalColumns = ["balance"]
|
||||||
@@ -173,3 +197,9 @@ const handleDelete = async (ids: string[]) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</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