From 8439e16fed5ab36e19a0d8786c08e04b9ed61557 Mon Sep 17 00:00:00 2001 From: caiyuchao Date: Wed, 10 Sep 2025 18:35:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=A2=E6=88=B7=E5=AF=B9=E6=8E=A5?= =?UTF-8?q?=E4=BA=BA=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web-antd/src/locales/langs/en-US/license.json | 3 ++- apps/web-antd/src/locales/langs/zh-CN/license.json | 3 ++- apps/web-antd/src/views/license/license/data.ts | 2 +- apps/web-antd/src/views/license/project/data.ts | 6 +++++- apps/web-antd/src/views/license/project/modules/form.vue | 1 + 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/apps/web-antd/src/locales/langs/en-US/license.json b/apps/web-antd/src/locales/langs/en-US/license.json index c764dac..6d8bd59 100644 --- a/apps/web-antd/src/locales/langs/en-US/license.json +++ b/apps/web-antd/src/locales/langs/en-US/license.json @@ -37,5 +37,6 @@ "reapply": "Reapply", "reapplyAction": "Reapply For {0}", "history": "History", - "applyCount": "Application Count" + "applyCount": "Application Count", + "snExist": "{0} `{1}` already exists. If there is no corresponding project, please go to Project Management to create a project" } diff --git a/apps/web-antd/src/locales/langs/zh-CN/license.json b/apps/web-antd/src/locales/langs/zh-CN/license.json index 2fffbd7..e00ccfd 100644 --- a/apps/web-antd/src/locales/langs/zh-CN/license.json +++ b/apps/web-antd/src/locales/langs/zh-CN/license.json @@ -37,5 +37,6 @@ "reapply": "重新申请", "reapplyAction": "重新申请{0}", "history": "历史", - "applyCount": "license申请次数" + "applyCount": "license申请次数", + "snExist": "{0} `{1}` 已存在,没有对应项目请到项目管理创建项目" } diff --git a/apps/web-antd/src/views/license/license/data.ts b/apps/web-antd/src/views/license/license/data.ts index 7be35b3..5b49742 100644 --- a/apps/web-antd/src/views/license/license/data.ts +++ b/apps/web-antd/src/views/license/license/data.ts @@ -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]), }), ), }, diff --git a/apps/web-antd/src/views/license/project/data.ts b/apps/web-antd/src/views/license/project/data.ts index ec275c2..7fe448d 100644 --- a/apps/web-antd/src/views/license/project/data.ts +++ b/apps/web-antd/src/views/license/project/data.ts @@ -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', diff --git a/apps/web-antd/src/views/license/project/modules/form.vue b/apps/web-antd/src/views/license/project/modules/form.vue index 1c7d3ec..c5b494b 100644 --- a/apps/web-antd/src/views/license/project/modules/form.vue +++ b/apps/web-antd/src/views/license/project/modules/form.vue @@ -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();