feat: 客户对接人提示

This commit is contained in:
caiyuchao
2025-09-10 18:35:23 +08:00
parent 63e3792e6d
commit 8439e16fed
5 changed files with 11 additions and 4 deletions

View File

@@ -137,7 +137,7 @@ export function useFormSchema(): VbenFormSchema[] {
return await isLicenseSnUnique(value, formData.value?.id);
},
(value) => ({
message: $t('ui.formRules.alreadyExists', ['SN', value]),
message: $t('license.snExist', ['SN', value]),
}),
),
},

View File

@@ -151,8 +151,12 @@ export function useFormSchema(): VbenFormSchema[] {
{
fieldName: 'customerOwner',
label: $t('project.customerOwner'),
rules: 'required',
help: '请填写客户方的对接人',
component: 'Input',
rules: z.string().min(1, '注意:请填写客户方的对接人'),
componentProps: {
placeholder: '请填写客户方的对接人',
},
},
{
fieldName: 'technicalOwnerA',

View File

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