|
|
@ -1,5 +1,6 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import {getSamplingScheme} from '@/api/qms/sampleCode/index' |
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const SampleCodeRules = reactive({ |
|
|
@ -7,7 +8,7 @@ export const SampleCodeRules = reactive({ |
|
|
|
batchUpperLimiting: [required], |
|
|
|
available: [required], |
|
|
|
}) |
|
|
|
|
|
|
|
const samplingSchemeList = await getSamplingScheme() |
|
|
|
export const SampleCode = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: 'id', |
|
|
@ -21,6 +22,16 @@ export const SampleCode = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'code', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
component: 'Select', |
|
|
|
componentProps: { |
|
|
|
options: samplingSchemeList, |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'description', |
|
|
|
valueField: 'code' |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '批量下限', |
|
|
@ -84,7 +95,7 @@ export const SampleCode = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
form: { |
|
|
|
component: 'SelectV2' |
|
|
|
component: 'Select' |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|