You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

266 lines
4.2 KiB

import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const MesBarCodeRules = reactive({
available: [required],
11 months ago
lowerLim: [required],
partNumber: [required],
available: [{ required: true, message: '是否可用不能为空', trigger: 'change' }]
})
export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'Plnt',
field: 'plnt',
sort: 'custom',
table: {
width: 120
},
form: {
component: 'InputNumber',
value: 0
},
},
{
label: 'Counter',
field: 'counter',
sort: 'custom',
table: {
width: 150
},
isSearch:true
},
{
label: 'SIGN',
field: 'sign',
sort: 'custom',
table: {
width: 120
},
},
{
label: 'Option',
field: 'option',
sort: 'custom',
table: {
width: 120
},
},
{
label: 'Lower Lim.',
field: 'lowerLim',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'UpperLimit',
field: 'upperLimit',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'ITAC',
field: 'itac',
sort: 'custom',
table: {
width: 120
},
},
{
label: 'Type',
field: 'type',
sort: 'custom',
table: {
width: 120
},
},
{
label: 'Length BC',
field: 'lengthBc',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
value: 0
},
},
{
label: 'Pos. mat',
field: 'posMat',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'Length mat',
field: 'lengthMat',
sort: 'custom',
table: {
width: 150
},
form: {
component: 'InputNumber',
value: 0
},
},
{
label: 'Pos. revlv',
field: 'posRevlv',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'Part number',
field: 'partNumber',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'Pack Label',
field: 'packLabel',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'OES-Label',
field: 'oesLabel',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'Check Rvl',
field: 'checkRvl',
sort: 'custom',
table: {
width: 150
},
},
{
label: 'Days',
field: 'days',
sort: 'custom',
table: {
width: 120
},
form: {
component: 'InputNumber',
value: 0
},
},
{
label: '是否可用',
field: 'available',
sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string',
table: {
width: 120
},
form: {
component: 'Switch',
value: 'TRUE',
componentProps: {
inactiveValue: 'FALSE',
activeValue: 'TRUE'
}
}
},
{
label: '创建时间',
field: 'createTime',
isForm: false,
table: {
width: 180
},
formatter: dateFormatter,
detail: {
dateFormat : 'YYYY-MM-DD HH:mm:ss'
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
}
},
{
label: '创建者',
field: 'creator',
table: {
width: 130
},
isForm: false,
isTable: true
},
{
label: '最后更新时间',
field: 'updateTime',
sort: 'custom',
isDetail: true,
isForm: false,
isTable: false,
formatter: dateFormatter,
detail: {
dateFormat: 'YYYY-MM-DD HH:mm:ss'
},
table: {
width: 180
},
form: {
component: 'DatePicker',
componentProps: {
style: {width:'100%'},
type: 'datetime',
dateFormat: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'x',
}
}
},
{
label: '最后更新者',
field: 'updater',
isDetail: true,
isForm: false,
isTable: false,
table: {
width: 150
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 120
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))