快检标准新增

This commit is contained in:
2026-06-16 15:35:54 +08:00
parent be215d604d
commit 7f0f8a3a2f
15 changed files with 684 additions and 50 deletions

View File

@@ -1,6 +1,5 @@
import { BasicColumn, FormSchema } from '/@/components/Table';
import { JVxeColumn, JVxeTypes } from '/@/components/jeecg/JVxeTable/types';
import { checkStdName } from './MesXslRubberQuickTestStd.api';
const numProps = { style: { width: '100%' }, precision: 6 };
@@ -72,27 +71,8 @@ export const formSchema: FormSchema[] = [
label: '实验标准名称',
field: 'stdName',
component: 'Input',
required: true,
componentProps: { placeholder: '同租户内不可重复' },
dynamicRules: ({ model }) => [
{ required: true, message: '请输入实验标准名称' },
{
validator: async (_rule, value) => {
const v = value == null ? '' : String(value).trim();
if (!v) {
return Promise.resolve();
}
try {
await checkStdName({ stdName: v, dataId: model?.id });
return Promise.resolve();
} catch (e: any) {
const msg = e?.response?.data?.message || e?.message || '实验标准名称已存在';
return Promise.reject(msg);
}
},
trigger: ['blur', 'change'],
},
],
slot: 'stdNameDisplay',
dynamicDisabled: true,
},
{
label: '实验方法',