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.
101 lines
1.9 KiB
101 lines
1.9 KiB
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
|
|
// 表单校验
|
|
export const BarbasicRules = reactive({
|
|
number: [required],
|
|
type: [required],
|
|
template: [required],
|
|
status: [required],
|
|
barcodeString: [required],
|
|
printTimes: [required],
|
|
})
|
|
|
|
export const Barbasic = useCrudSchemas(reactive<CrudSchema[]>([
|
|
{
|
|
label: '标签号',
|
|
field: 'number',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
table: {
|
|
fixed: 'left'
|
|
}
|
|
},
|
|
{
|
|
label: '标签类型',
|
|
field: 'type',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
dictType: DICT_TYPE.LABEL_TYPE,
|
|
dictClass: 'string'
|
|
},
|
|
{
|
|
label: '标签模板',
|
|
field: 'template',
|
|
sort: 'custom',
|
|
},
|
|
{
|
|
label: '标签状态',
|
|
field: 'status',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
dictType: DICT_TYPE.LABEL_STATUS,
|
|
dictClass: 'string'
|
|
},
|
|
{
|
|
label: '关联号',
|
|
field: 'relateNumber',
|
|
sort: 'custom',
|
|
},
|
|
{
|
|
label: '标签条码字符串',
|
|
field: 'barcodeString',
|
|
sort: 'custom',
|
|
},
|
|
{
|
|
label: '打印次数',
|
|
field: 'printTimes',
|
|
sort: 'custom',
|
|
form: {
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
min: 0
|
|
},
|
|
value: 0
|
|
},
|
|
},
|
|
{
|
|
label: '最后打印时间',
|
|
field: 'lastPrintTime',
|
|
sort: 'custom',
|
|
formatter: dateFormatter,
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
style: {width:'100%'},
|
|
type: 'datetime',
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'x',
|
|
}
|
|
},
|
|
},
|
|
{
|
|
label: '最后打印人ID',
|
|
field: 'lastPrintUserId',
|
|
sort: 'custom'
|
|
},
|
|
{
|
|
label: '最后打印人用户名',
|
|
field: 'lastPrintUserName',
|
|
sort: 'custom',
|
|
},
|
|
// {
|
|
// label: '操作',
|
|
// field: 'action',
|
|
// isForm: false,
|
|
// table: {
|
|
// width: 150,
|
|
// fixed: 'right'
|
|
// }
|
|
// }
|
|
]))
|
|
|