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.

209 lines
3.1 KiB

import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const MesBarCodeRules = reactive({
available: [required],
})
export const MesBarCode = useCrudSchemas(reactive<CrudSchema[]>([
{
label: 'Plnt',
field: 'plat',
sort: 'custom',
table: {
width: 120
},
form: {
component: 'InputNumber',
value: 0
},
},
{
label: 'Counter',
field: 'counter',
sort: 'custom',
table: {
width: 150
},
},
{
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
},
form: {
component: 'SelectV2'
},
},
{
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',
table: {
width: 120
},
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
table: {
width: 180
},
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')]
}
},
isForm: false,
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 120
},
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))