fix: 合同编号的提示

This commit is contained in:
caiyuchao
2025-08-19 19:03:43 +08:00
parent 6bd0699c69
commit 7a37b0e013
2 changed files with 4 additions and 3 deletions

View File

@@ -108,11 +108,11 @@ export function useFormSchema(): VbenFormSchema[] {
{ {
fieldName: 'contractCode', fieldName: 'contractCode',
label: $t('project.contractCode'), label: $t('project.contractCode'),
rules: z.string().min(1, '请输入,没有合同请填0'), rules: z.string().min(1, '注意:没有合同编号的情况下填0'),
component: 'Input', component: 'Input',
help: '没有合同的项目请填0', help: '没有合同编号的情况下填0',
componentProps: { componentProps: {
placeholder: '请输入,没有合同填0', placeholder: '请输入,没有合同编号的填0',
}, },
}, },
{ {

View File

@@ -78,6 +78,7 @@ const [Modal, modalApi] = useVbenModal({
// 设置到 values // 设置到 values
formData.value = data; formData.value = data;
await formApi.setValues(formData.value); await formApi.setValues(formData.value);
await formApi.validateField('contractCode');
// 设置最大SN // 设置最大SN
const maxSn = await getMaxSn(); const maxSn = await getMaxSn();