From 35526a3f28689fa3277fd4337a005ce78e7a7a33 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期四, 18 九月 2025 15:45:00 +0800
Subject: [PATCH] feat: 页面
---
src/views/FinanceManage/WithdrawManage.vue | 140 ++++++++++++++++++++++++++++
src/views/FinanceManage/components/WithdrawalDetailDialog.vue | 145 +++++++++++++++++++++++++++++
2 files changed, 285 insertions(+), 0 deletions(-)
diff --git a/src/views/FinanceManage/WithdrawManage.vue b/src/views/FinanceManage/WithdrawManage.vue
new file mode 100644
index 0000000..e4c6dae
--- /dev/null
+++ b/src/views/FinanceManage/WithdrawManage.vue
@@ -0,0 +1,140 @@
+<template>
+ <LoadingLayout :loading="state.loading">
+ <AppContainer>
+ <ProTableQueryFilterBar @on-reset="reset">
+ <template #query>
+ <QueryFilterItem>
+ <FieldDatePicker
+ v-model="extraParamState.time"
+ type="daterange"
+ range-separator="~"
+ start-placeholder="璧峰鏃ユ湡"
+ end-placeholder="鎴鏃ユ湡"
+ clearable
+ @change="getList()"
+ tooltipContent="鐢宠鏃堕棿"
+ ></FieldDatePicker>
+ </QueryFilterItem>
+ <QueryFilterItem tip-content="鎻愮幇鐘舵��">
+ <FieldRadio
+ v-model="extraParamState.status"
+ :value-enum="[]"
+ buttonStyle
+ showAllBtn
+ @change="getList()"
+ />
+ </QueryFilterItem>
+ <QueryFilterItem>
+ <SearchInput
+ v-model="extraParamState.keywords"
+ style="width: 260px"
+ placeholder="濮撳悕/鐢佃瘽/韬唤璇佸彿"
+ @on-click-search="getList"
+ >
+ </SearchInput>
+ </QueryFilterItem>
+ </template>
+ </ProTableQueryFilterBar>
+ <ProTableV2 v-bind="proTableProps" :columns="column" :operationBtns="operationBtns">
+ </ProTableV2>
+ </AppContainer>
+ <WithdrawalDetailDialog v-bind="dialogProps" />
+ </LoadingLayout>
+</template>
+
+<script setup lang="ts">
+import {
+ ProTableQueryFilterBar,
+ OperationBtnType,
+ ProTableV2,
+ SearchInput,
+ LoadingLayout,
+ AppContainer,
+ QueryFilterItem,
+ useTable,
+ useFormDialog,
+ FieldDatePicker,
+ FieldRadio,
+} from '@bole-core/components';
+import { useAccess } from '@/hooks';
+import * as userServices from '@/services/api/user';
+import WithdrawalDetailDialog from './components/WithdrawalDetailDialog.vue';
+import { ModelValueType } from 'element-plus';
+
+defineOptions({
+ name: 'WithdrawManage',
+});
+
+const operationBtnMap: Record<string, OperationBtnType> = {
+ detailBtn: { emits: { onClick: (role) => openDialog(role) } },
+};
+
+const { column, operationBtns } = useAccess({
+ operationBtnMap,
+});
+
+const router = useRouter();
+const BaseState = {
+ loading: true,
+};
+
+const state = reactive({ ...BaseState });
+
+onMounted(async () => {
+ await getList();
+ state.loading = false;
+});
+
+const {
+ getDataSource: getList,
+ proTableProps,
+ paginationState,
+ extraParamState,
+ reset,
+} = useTable(
+ async ({ pageIndex, pageSize }, extraParamState) => {
+ try {
+ let params: API.GetPersonalUserWalletBalancesQuery = {
+ pageModel: {
+ rows: pageSize,
+ page: pageIndex,
+ orderInput: extraParamState.orderInput,
+ },
+ keywords: extraParamState.keywords,
+ };
+
+ let res = await userServices.getPersonalUserWalletBalances(params, {
+ showLoading: !state.loading,
+ });
+ return res;
+ } catch (error) {}
+ },
+ {
+ defaultExtraParams: {
+ keywords: '',
+ status: '',
+ time: [] as unknown as ModelValueType,
+ orderInput: [{ property: 'id', order: EnumPagedListOrder.Asc }],
+ },
+ columnsRenderProps: {
+ balance: { type: 'money' },
+ },
+ }
+);
+
+const { dialogProps, handleEdit, editForm } = useFormDialog({
+ defaultFormParams: {
+ id: '',
+ status: '',
+ time: '',
+ },
+});
+
+function openDialog(row) {
+ handleEdit({
+ id: row.id,
+ status: '',
+ time: '',
+ });
+}
+</script>
diff --git a/src/views/FinanceManage/components/WithdrawalDetailDialog.vue b/src/views/FinanceManage/components/WithdrawalDetailDialog.vue
new file mode 100644
index 0000000..0afafd9
--- /dev/null
+++ b/src/views/FinanceManage/components/WithdrawalDetailDialog.vue
@@ -0,0 +1,145 @@
+<template>
+ <ProDialog title="璇︽儏" v-model="visible" @close="onDialogClose" destroy-on-close draggable>
+ <!-- <PortraitTableWithAttachment v-bind="portraitTableWithAttachmentProps" /> -->
+ <ProForm :model="form" ref="dialogForm" label-width="90px" style="margin-top: 20px" is-read>
+ <ProFormCol>
+ <ProFormColItem :span="12">
+ <ProFormItemV2 label="鎻愮幇鐘舵��:" prop="status">
+ <ProFormRadio v-model="form.status" :value-enum="[]" />
+ </ProFormItemV2>
+ </ProFormColItem>
+ </ProFormCol>
+ <ProFormCol>
+ <ProFormColItem :span="12">
+ <ProFormItemV2 label="鎻愮幇鏃ユ湡:" prop="time">
+ <ProFormDatePicker v-model="form.time" type="date" format="YYYY-MM-DD HH:mm" />
+ </ProFormItemV2>
+ </ProFormColItem>
+ </ProFormCol>
+ </ProForm>
+ <template #footer>
+ <span class="dialog-footer">
+ <el-button @click="emit('onCancel')">鍙� 娑�</el-button>
+ <el-button type="primary" @click="emit('onCancel')">纭� 瀹�</el-button>
+ </span>
+ </template>
+ </ProDialog>
+</template>
+
+<script setup lang="ts">
+import { FormInstance } from 'element-plus';
+import {
+ ProDialog,
+ ProForm,
+ ProFormItemV2,
+ ProFormCol,
+ ProFormColItem,
+ ProFormRadio,
+ ProFormDatePicker,
+} from '@bole-core/components';
+import { usePortraitTableWithAttachment } from '@/hooks';
+import { convertApi2FormUrl } from '@/utils';
+import { useQuery } from '@tanstack/vue-query';
+
+defineOptions({
+ name: 'WithdrawalDetailDialog',
+});
+
+const visible = defineModel({ type: Boolean });
+
+type Form = {
+ title?: string;
+ id: string;
+ status: string;
+ time: string;
+};
+
+const form = defineModel<Form>('form');
+
+const emit = defineEmits<{
+ (e: 'onConfirm'): void;
+ (e: 'onCancel'): void;
+}>();
+
+watch(
+ () => visible.value,
+ (val) => {
+ if (val) {
+ // refetch();
+ }
+ }
+);
+
+// const {
+// data: detail,
+// refetch,
+// isLoading,
+// } = useQuery({
+// queryKey: ['parkBountyApplyServices/getEnterpriseDrawWithDetail', form.value?.id],
+// queryFn: async () => {
+// return await parkBountyApplyServices.getEnterpriseDrawWithDetail(
+// {
+// drawWithId: form.value?.id,
+// },
+// {
+// showLoading: true,
+// }
+// );
+// },
+// placeholderData: () => ({}),
+// enabled: !!form.value?.id,
+// onSuccess(data) {},
+// });
+
+// const { portraitTableWithAttachmentProps } = usePortraitTableWithAttachment({
+// data: detail,
+// annexList: computed(() =>
+// detail.value?.invoiceUrl
+// ? detail.value?.invoiceUrl.split('|').map((item) => convertApi2FormUrl(item))
+// : []
+// ),
+// columns: [
+// {
+// label: '濮撳悕',
+// key: 'enterpriseName',
+// },
+// {
+// label: '韬唤璇佸彿',
+// key: 'societyCreditCode',
+// },
+// {
+// label: '璐︽埛鍚嶇О',
+// key: 'accountName',
+// },
+// {
+// label: '閾惰甯愬彿',
+// key: 'bankNumber',
+// },
+// {
+// label: '寮�鎴烽摱琛�',
+// key: 'bankName',
+// },
+// {
+// label: '寮�鎴锋敮琛�',
+// key: 'bankResumeName',
+// },
+// {
+// label: '鎻愮幇閲戦',
+// key: 'amount',
+// type: 'money',
+// },
+// {
+// label: '鐢宠鏃ユ湡',
+// key: 'creationTime',
+// type: 'date',
+// },
+// ],
+// });
+
+const dialogForm = ref<FormInstance>();
+
+function onDialogClose() {
+ if (!dialogForm.value) return;
+ dialogForm.value.resetFields();
+}
+</script>
--
Gitblit v1.9.1