feat:【antd】【ele】【pay 支付】pay/demo/withdraw 迁移 antd 版本
This commit is contained in:
@@ -2,7 +2,6 @@ import type { VbenFormSchema } from '#/adapter/form';
|
|||||||
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
import type { VxeTableGridOptions } from '#/adapter/vxe-table';
|
||||||
|
|
||||||
import { DICT_TYPE } from '@vben/constants';
|
import { DICT_TYPE } from '@vben/constants';
|
||||||
import { formatDateTime } from '@vben/utils';
|
|
||||||
|
|
||||||
/** 新增/修改的表单 */
|
/** 新增/修改的表单 */
|
||||||
export function useFormSchema(): VbenFormSchema[] {
|
export function useFormSchema(): VbenFormSchema[] {
|
||||||
@@ -20,6 +19,9 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
label: '提现标题',
|
label: '提现标题',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请输入提现标题',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
fieldName: 'price',
|
fieldName: 'price',
|
||||||
@@ -30,6 +32,7 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
min: 1,
|
min: 1,
|
||||||
precision: 2,
|
precision: 2,
|
||||||
step: 0.01,
|
step: 0.01,
|
||||||
|
placeholder: '请输入提现金额',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -43,19 +46,46 @@ export function useFormSchema(): VbenFormSchema[] {
|
|||||||
{ label: '微信余额', value: 2 },
|
{ label: '微信余额', value: 2 },
|
||||||
{ label: '钱包余额', value: 3 },
|
{ label: '钱包余额', value: 3 },
|
||||||
],
|
],
|
||||||
|
placeholder: '请选择提现类型',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
fieldName: 'userName',
|
|
||||||
label: '收款人姓名',
|
|
||||||
component: 'Input',
|
|
||||||
rules: 'required',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
fieldName: 'userAccount',
|
fieldName: 'userAccount',
|
||||||
label: '收款人账号',
|
label: '收款人账号',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
rules: 'required',
|
rules: 'required',
|
||||||
|
dependencies: {
|
||||||
|
triggerFields: ['type'],
|
||||||
|
componentProps: (values) => {
|
||||||
|
const type = values.type;
|
||||||
|
let placeholder = '请输入收款人账号';
|
||||||
|
switch (type) {
|
||||||
|
case 1: {
|
||||||
|
placeholder = '请输入支付宝账号';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2: {
|
||||||
|
placeholder = '请输入微信 openid';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3: {
|
||||||
|
placeholder = '请输入钱包编号';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
placeholder,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
fieldName: 'userName',
|
||||||
|
label: '收款人姓名',
|
||||||
|
component: 'Input',
|
||||||
|
componentProps: {
|
||||||
|
placeholder: '请输入收款人姓名',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -109,7 +139,7 @@ export function useGridColumns(): VxeTableGridOptions['columns'] {
|
|||||||
{
|
{
|
||||||
field: 'transferChannelCode',
|
field: 'transferChannelCode',
|
||||||
title: '转账渠道',
|
title: '转账渠道',
|
||||||
minWidth: 120,
|
minWidth: 130,
|
||||||
cellRender: {
|
cellRender: {
|
||||||
name: 'CellDict',
|
name: 'CellDict',
|
||||||
props: { type: DICT_TYPE.PAY_CHANNEL_CODE },
|
props: { type: DICT_TYPE.PAY_CHANNEL_CODE },
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|||||||
<TableAction
|
<TableAction
|
||||||
:actions="[
|
:actions="[
|
||||||
{
|
{
|
||||||
label: '发起提现',
|
label: $t('ui.actionTitle.create', ['示例提现单']),
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: ACTION_ICON.ADD,
|
icon: ACTION_ICON.ADD,
|
||||||
onClick: handleCreate,
|
onClick: handleCreate,
|
||||||
|
|||||||
Reference in New Issue
Block a user