diff --git a/apps/web-antd/src/views/pay/wallet/balance/data.ts b/apps/web-antd/src/views/pay/wallet/balance/data.ts new file mode 100644 index 000000000..7476cdd45 --- /dev/null +++ b/apps/web-antd/src/views/pay/wallet/balance/data.ts @@ -0,0 +1,86 @@ +import type { VxeTableGridOptions } from '@vben/plugins/vxe-table'; + +import type { VbenFormSchema } from '#/adapter/form'; + +import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils'; + +/** 列表的搜索表单 */ +export function useGridFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'userId', + label: '用户编号', + component: 'Input', + }, + { + fieldName: 'userType', + label: '用户类型', + component: 'Select', + componentProps: { + options: getDictOptions(DICT_TYPE.USER_TYPE, 'number'), + }, + }, + { + fieldName: 'createTime', + label: '创建时间', + component: 'RangePicker', + componentProps: { + allowClear: true, + ...getRangePickerDefaultProps(), + }, + }, + ]; +} + +/** 列表的字段 */ +export function useGridColumns(): VxeTableGridOptions['columns'] { + return [ + { + title: '编号', + field: 'id', + }, + { + title: '用户编号', + field: 'userId', + }, + { + title: '用户类型', + field: 'userType', + cellRender: { + name: 'CellDict', + props: { type: DICT_TYPE.USER_TYPE }, + }, + }, + { + title: '余额', + field: 'balance', + formatter: 'formatFraction', + }, + { + title: '累计支出', + field: 'totalExpense', + formatter: 'formatFraction', + }, + { + title: '累计充值', + field: 'totalRecharge', + formatter: 'formatFraction', + }, + { + title: '冻结金额', + field: 'freezePrice', + formatter: 'formatFraction', + }, + { + title: '创建时间', + field: 'createTime', + formatter: 'formatDateTime', + }, + { + title: '操作', + field: 'actions', + fixed: 'right', + slots: { default: 'actions' }, + }, + ]; +} diff --git a/apps/web-antd/src/views/pay/wallet/balance/index.vue b/apps/web-antd/src/views/pay/wallet/balance/index.vue index e33be0dbb..e5d1048a9 100644 --- a/apps/web-antd/src/views/pay/wallet/balance/index.vue +++ b/apps/web-antd/src/views/pay/wallet/balance/index.vue @@ -1,28 +1,82 @@ diff --git a/apps/web-antd/src/views/pay/wallet/balance/modules/detail.vue b/apps/web-antd/src/views/pay/wallet/balance/modules/detail.vue new file mode 100644 index 000000000..4a8c3128f --- /dev/null +++ b/apps/web-antd/src/views/pay/wallet/balance/modules/detail.vue @@ -0,0 +1,40 @@ + + diff --git a/apps/web-antd/src/views/pay/wallet/rechargePackage/data.ts b/apps/web-antd/src/views/pay/wallet/rechargePackage/data.ts new file mode 100644 index 000000000..79e6d7c33 --- /dev/null +++ b/apps/web-antd/src/views/pay/wallet/rechargePackage/data.ts @@ -0,0 +1,119 @@ +import type { VbenFormSchema } from '#/adapter/form'; +import type { VxeTableGridOptions } from '#/adapter/vxe-table'; + +import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils'; + +/** 新增/修改的表单 */ +export function useFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'name', + label: '套餐名', + component: 'Input', + rules: 'required', + }, + { + fieldName: 'payPrice', + label: '支付金额(元)', + component: 'InputNumber', + rules: 'required', + componentProps: { + min: 0, + precision: 2, + step: 0.01, + }, + }, + { + fieldName: 'bonusPrice', + label: '赠送金额(元)', + component: 'InputNumber', + rules: 'required', + componentProps: { + min: 0, + precision: 2, + step: 0.01, + }, + }, + { + fieldName: 'status', + label: '开启状态', + component: 'RadioGroup', + rules: 'required', + componentProps: { + options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'), + }, + }, + ]; +} + +/** 列表的搜索表单 */ +export function useGridFormSchema(): VbenFormSchema[] { + return [ + { + fieldName: 'name', + label: '套餐名称', + component: 'Input', + }, + { + fieldName: 'status', + label: '状态', + component: 'Select', + componentProps: { + allowClear: true, + options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'), + }, + }, + { + fieldName: 'createTime', + label: '创建时间', + component: 'RangePicker', + componentProps: { + allowClear: true, + ...getRangePickerDefaultProps(), + }, + }, + ]; +} + +/** 列表的字段 */ +export function useGridColumns(): VxeTableGridOptions['columns'] { + return [ + { + field: 'id', + title: '编号', + }, + { + field: 'name', + title: '套餐名称', + }, + { + field: 'payPrice', + title: '支付金额', + formatter: 'formatFraction', + }, + { + field: 'bonusPrice', + title: '赠送金额', + formatter: 'formatFraction', + }, + { + field: 'status', + title: '状态', + cellRender: { + name: 'CellDict', + props: { type: DICT_TYPE.COMMON_STATUS }, + }, + }, + { + field: 'createTime', + title: '创建时间', + formatter: 'formatDateTime', + }, + { + title: '操作', + width: 130, + fixed: 'right', + slots: { default: 'actions' }, + }, + ]; +} diff --git a/apps/web-antd/src/views/pay/wallet/rechargePackage/index.vue b/apps/web-antd/src/views/pay/wallet/rechargePackage/index.vue index 472b3c341..b86896ece 100644 --- a/apps/web-antd/src/views/pay/wallet/rechargePackage/index.vue +++ b/apps/web-antd/src/views/pay/wallet/rechargePackage/index.vue @@ -1,28 +1,129 @@ diff --git a/apps/web-antd/src/views/pay/wallet/rechargePackage/modules/form.vue b/apps/web-antd/src/views/pay/wallet/rechargePackage/modules/form.vue new file mode 100644 index 000000000..11d1f9d5b --- /dev/null +++ b/apps/web-antd/src/views/pay/wallet/rechargePackage/modules/form.vue @@ -0,0 +1,98 @@ + + + diff --git a/apps/web-antd/src/views/pay/wallet/transaction/data.ts b/apps/web-antd/src/views/pay/wallet/transaction/data.ts new file mode 100644 index 000000000..2fe7a7279 --- /dev/null +++ b/apps/web-antd/src/views/pay/wallet/transaction/data.ts @@ -0,0 +1,40 @@ +import type { VxeTableGridOptions } from '#/adapter/vxe-table'; + +/** 列表的字段 */ +export function useGridColumns(): VxeTableGridOptions['columns'] { + return [ + { + field: 'id', + title: '编号', + width: 80, + }, + { + field: 'walletId', + title: '钱包编号', + width: 100, + }, + { + field: 'title', + title: '关联业务标题', + width: 200, + }, + { + field: 'price', + title: '交易金额', + width: 120, + formatter: ({ cellValue }) => `${cellValue / 100} 元`, + }, + { + field: 'balance', + title: '钱包余额', + width: 120, + formatter: ({ cellValue }) => `${cellValue / 100} 元`, + }, + { + field: 'createTime', + title: '交易时间', + width: 180, + formatter: 'formatDateTime', + }, + ]; +} diff --git a/apps/web-antd/src/views/pay/wallet/transaction/index.vue b/apps/web-antd/src/views/pay/wallet/transaction/index.vue new file mode 100644 index 000000000..dafb495cd --- /dev/null +++ b/apps/web-antd/src/views/pay/wallet/transaction/index.vue @@ -0,0 +1,61 @@ + + +