|
@ -1,9 +1,14 @@ |
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
|
|
import {PatternType} from "@/views/mes/patternType/patternType.data"; |
|
|
|
|
|
import * as PatternTypeApi from "@/api/mes/patternType"; |
|
|
|
|
|
import {validateInteger} from '@/utils/validator' |
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
// 表单校验
|
|
|
export const PatternRules = reactive({ |
|
|
export const PatternRules = reactive({ |
|
|
concurrencyStamp: [required], |
|
|
code: [required], |
|
|
|
|
|
name: [required], |
|
|
|
|
|
partternName: [required], |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
export const Pattern = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
export const Pattern = useCrudSchemas(reactive<CrudSchema[]>([ |
|
@ -112,6 +117,23 @@ export const Pattern = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
field: 'partternName', |
|
|
field: 'partternName', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
|
|
|
form: { |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
|
|
searchTitle: '模具类型', // 查询弹窗标题
|
|
|
|
|
|
searchAllSchemas: PatternType.allSchemas, // 查询弹窗所需类
|
|
|
|
|
|
searchField: 'name', // 查询弹窗赋值字段
|
|
|
|
|
|
searchPage: PatternTypeApi.getPatternTypePage, // 查询弹窗所需分页方法
|
|
|
|
|
|
multiple:true, |
|
|
|
|
|
searchCondition: [{ |
|
|
|
|
|
key: 'status', |
|
|
|
|
|
value: '1', |
|
|
|
|
|
action: '==', |
|
|
|
|
|
isSearch: true, |
|
|
|
|
|
isMainValue: false |
|
|
|
|
|
}] |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '产品编码', |
|
|
label: '产品编码', |
|
@ -124,12 +146,47 @@ export const Pattern = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
field: 'dateUseStart', |
|
|
field: 'dateUseStart', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
|
|
|
search: { |
|
|
|
|
|
component: 'DatePicker', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
|
type: 'daterange', |
|
|
|
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
formatter: dateFormatter, |
|
|
|
|
|
isForm: true, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'DatePicker', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
|
type: 'datetime', |
|
|
|
|
|
valueFormat: 'x' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '停用时间', |
|
|
label: '停用时间', |
|
|
field: 'dateUseStop', |
|
|
field: 'dateUseStop', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
|
|
|
search: { |
|
|
|
|
|
component: 'DatePicker', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
|
type: 'daterange', |
|
|
|
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
formatter: dateFormatter, |
|
|
|
|
|
isForm: true, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'DatePicker', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
type: 'datetime', |
|
|
|
|
|
valueFormat: 'x' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '模具来源', |
|
|
label: '模具来源', |
|
@ -148,18 +205,56 @@ export const Pattern = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
field: 'initCout', |
|
|
field: 'initCout', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'InputNumber', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
min: 1 |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '有效期开始时间', |
|
|
label: '有效期开始时间', |
|
|
field: 'effectStart', |
|
|
field: 'effectStart', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
|
|
|
search: { |
|
|
|
|
|
component: 'DatePicker', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
|
type: 'daterange', |
|
|
|
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
formatter: dateFormatter, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'DatePicker', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
type: 'datetime', |
|
|
|
|
|
valueFormat: 'x' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '有效期结束时间', |
|
|
label: '有效期结束时间', |
|
|
field: 'effectEnd', |
|
|
field: 'effectEnd', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
|
|
|
search: { |
|
|
|
|
|
component: 'DatePicker', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
valueFormat: 'YYYY-MM-DD HH:mm:ss', |
|
|
|
|
|
type: 'daterange', |
|
|
|
|
|
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
formatter: dateFormatter, |
|
|
|
|
|
form: { |
|
|
|
|
|
component: 'DatePicker', |
|
|
|
|
|
componentProps: { |
|
|
|
|
|
type: 'datetime', |
|
|
|
|
|
valueFormat: 'x' |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '所属单位编码', |
|
|
label: '所属单位编码', |
|
|