feat:【mall 商城】售后退款(100% antd form)

This commit is contained in:
YunaiV
2025-10-14 20:28:21 +08:00
parent 9f3a0a9f34
commit 5e8c9175bb
3 changed files with 108 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ import type { VxeGridPropTypes } from '#/adapter/vxe-table';
import { DICT_TYPE } from '@vben/constants';
import { getDictOptions } from '@vben/hooks';
import { z } from '#/adapter/form';
import { getRangePickerDefaultProps } from '#/utils';
/** 列表的搜索表单 */
@@ -60,6 +61,30 @@ export function useGridFormSchema(): VbenFormSchema[] {
];
}
/** 拒绝售后表单的 schema 配置 */
export function useDisagreeFormSchema(): VbenFormSchema[] {
return [
{
component: 'Input',
fieldName: 'id',
dependencies: {
triggerFields: [''],
show: () => false,
},
},
{
component: 'Textarea',
fieldName: 'reason',
label: '拒绝原因',
componentProps: {
placeholder: '请输入拒绝原因',
rows: 4,
},
rules: z.string().min(2, { message: '拒绝原因不能少于 2 个字符' }),
},
];
}
/** 表格列配置 */
export function useGridColumns(): VxeGridPropTypes.Columns {
return [