feat:【antd】【mall】满减送的建议

This commit is contained in:
YunaiV
2025-11-02 08:20:11 +08:00
parent 4412d455a3
commit 682a63bc6e
4 changed files with 43 additions and 40 deletions

View File

@@ -120,6 +120,16 @@ export function useFormSchema(): VbenFormSchema[] {
allowClear: true,
},
},
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
componentProps: {
placeholder: '请输入备注',
rows: 4,
allowClear: true,
},
},
{
fieldName: 'startAndEndTime',
label: '活动时间',
@@ -128,8 +138,10 @@ export function useFormSchema(): VbenFormSchema[] {
componentProps: {
showTime: true,
format: 'YYYY-MM-DD HH:mm:ss',
placeholder: [$t('common.startTimeText'), $t('common.endTimeText')],
allowClear: true,
placeholder: [
$t('utils.rangePicker.beginTime'),
$t('utils.rangePicker.endTime'),
],
},
},
{
@@ -154,22 +166,7 @@ export function useFormSchema(): VbenFormSchema[] {
},
rules: z.number().default(PromotionProductScopeEnum.ALL.scope),
},
{
fieldName: 'remark',
label: '备注',
component: 'Textarea',
componentProps: {
placeholder: '请输入备注',
rows: 4,
allowClear: true,
},
},
{
fieldName: 'rules',
label: '优惠设置',
component: 'Input',
formItemClass: 'items-start',
},
// TODO @puhui999选择完删除后自动就退出了 modal
{
fieldName: 'productSpuIds',
label: '选择商品',
@@ -180,6 +177,15 @@ export function useFormSchema(): VbenFormSchema[] {
return values.productScope === PromotionProductScopeEnum.SPU.scope;
},
},
rules: 'required',
},
// TODO @puhui999这里还有个分类
{
fieldName: 'rules',
label: '优惠设置',
component: 'Input',
formItemClass: 'items-start',
// TODO @puhui999这里可能要加个 rules: 'required',
},
];
}