钱包余额统计抽屉
This commit is contained in:
1 parent
83a4633699
commit
0951063bf9
1 file changed
+56
-9
@@ -36,7 +36,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row>
|
<el-row>
|
||||||
<div class="mb8" style="width: 100%">
|
<div class="mb8 flex justify-between" style="width: 100%">
|
||||||
<el-button
|
<el-button
|
||||||
plain
|
plain
|
||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@@ -47,14 +47,17 @@
|
|||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<right-toolbar
|
<div class="flex gap-5">
|
||||||
v-model:showSearch="showSearch"
|
<el-button plain type="primary" @click="viewBalanceStatistics">余额统计</el-button>
|
||||||
:export="'wallet_walletRecord_export'"
|
<right-toolbar
|
||||||
@exportExcel="exportExcel"
|
v-model:showSearch="showSearch"
|
||||||
class="ml10 mr20"
|
:export="'wallet_walletRecord_export'"
|
||||||
style="float: right"
|
@exportExcel="exportExcel"
|
||||||
@queryTable="getDataList"
|
class="ml10 mr20"
|
||||||
></right-toolbar>
|
style="float: right"
|
||||||
|
@queryTable="getDataList"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table
|
<el-table
|
||||||
@@ -111,6 +114,14 @@
|
|||||||
</template>
|
</template>
|
||||||
</DraggableDepTree>
|
</DraggableDepTree>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<el-drawer v-model="showDrawer" @closed="drawerClose">
|
||||||
|
<el-descriptions v-loading="balanceStatisticsLoading" :column="1" title="钱包余额统计" border>
|
||||||
|
<el-descriptions-item label="总余额:">{{ balanceStatistics.a }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="饭卡钱包总余额:">{{ balanceStatistics.b }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="消费钱包总余额:">{{ balanceStatistics.c }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</el-drawer>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -131,6 +142,13 @@ const showSearch = ref(true)
|
|||||||
// 多选变量
|
// 多选变量
|
||||||
const selectObjs = ref([]) as any
|
const selectObjs = ref([]) as any
|
||||||
const multiple = ref(true)
|
const multiple = ref(true)
|
||||||
|
const showDrawer = ref(false) // 余额统计抽屉开关
|
||||||
|
const balanceStatisticsLoading = ref(false)
|
||||||
|
const balanceStatistics = reactive<any>({
|
||||||
|
a: 0,
|
||||||
|
b: 0,
|
||||||
|
c: 0,
|
||||||
|
})
|
||||||
|
|
||||||
const state: BasicTableProps = reactive<BasicTableProps>({
|
const state: BasicTableProps = reactive<BasicTableProps>({
|
||||||
queryForm: {
|
queryForm: {
|
||||||
@@ -154,6 +172,35 @@ const resetQuery = () => {
|
|||||||
getDataList()
|
getDataList()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 余额统计
|
||||||
|
const viewBalanceStatistics = async () => {
|
||||||
|
showDrawer.value = true
|
||||||
|
balanceStatisticsLoading.value = true
|
||||||
|
try {
|
||||||
|
const { code, data } = await getBalanceStatistics({
|
||||||
|
deptIds: state.queryForm.deptIds,
|
||||||
|
isInclude: state.queryForm.isInclude,
|
||||||
|
userId: state.queryForm.userId,
|
||||||
|
})
|
||||||
|
if (code == 0) {
|
||||||
|
balanceStatistics.a = data.a
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return useMessage().error(data.msg || "获取数据失败")
|
||||||
|
} catch (error: any) {
|
||||||
|
useMessage().error(error.msg)
|
||||||
|
} finally {
|
||||||
|
balanceStatisticsLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关闭抽屉
|
||||||
|
const drawerClose = () => {
|
||||||
|
for (const key in balanceStatistics) {
|
||||||
|
balanceStatistics[key] = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 导出excel
|
// 导出excel
|
||||||
const exportExcel = () => {
|
const exportExcel = () => {
|
||||||
postDownBlobFile(
|
postDownBlobFile(
|
||||||
|
|||||||
Reference in new issue
Block a user