|
|
@ -1,12 +1,15 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import {getSamplingScheme} from '@/api/qms/sampleCode/index' |
|
|
|
import {validateNum} from "@/utils/validator"; |
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const SampleCodeRules = reactive({ |
|
|
|
code: [required], |
|
|
|
batchUpperLimiting: [required], |
|
|
|
// available: [required],
|
|
|
|
batchLowLimiting: [{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], |
|
|
|
batchUpperLimiting: [ |
|
|
|
{ required:true, message: '该项为必填', trigger: 'blur'}, |
|
|
|
{ validator:validateNum, message: '请输入整数', trigger: 'blur'}], |
|
|
|
}) |
|
|
|
const samplingSchemeList = await getSamplingScheme() |
|
|
|
export const SampleCode = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
@ -92,16 +95,6 @@ export const SampleCode = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'g3', |
|
|
|
sort: 'custom', |
|
|
|
}, |
|
|
|
// {
|
|
|
|
// label: '是否可用',
|
|
|
|
// field: 'available',
|
|
|
|
// sort: 'custom',
|
|
|
|
// dictType: DICT_TYPE.TRUE_FALSE,
|
|
|
|
// dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
// form: {
|
|
|
|
// component: 'Select'
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
{ |
|
|
|
label: '创建时间', |
|
|
|
field: 'createTime', |
|
|
|