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.
127 lines
2.6 KiB
127 lines
2.6 KiB
5 months ago
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
||
|
import { dateFormatter } from '@/utils/formatTime'
|
||
|
|
||
|
// 表单校验
|
||
|
export const RepleinshDeliCountRules = reactive({
|
||
|
itemCode: [required],
|
||
|
timer: [required],
|
||
|
currentDeliDate: [required],
|
||
|
currentDeli: [required],
|
||
|
consumeQty: [required],
|
||
|
delayDeliDate: [required],
|
||
|
delayDeli: [required],
|
||
|
})
|
||
|
|
||
|
export const RepleinshDeliCount = useCrudSchemas(reactive<CrudSchema[]>([
|
||
|
{
|
||
|
label: '受入号',
|
||
|
field: 'model',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '物料代码',
|
||
|
field: 'itemCode',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '计时器时间',
|
||
|
field: 'timer',
|
||
|
sort: 'custom',
|
||
|
isSearch: false,
|
||
|
},
|
||
|
{
|
||
|
label: '计算便次日期',
|
||
|
field: 'currentDeliDate',
|
||
|
sort: 'custom',
|
||
|
formatter: dateFormatter,
|
||
|
isSearch: false,
|
||
|
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')]
|
||
|
}
|
||
|
},
|
||
|
form: {
|
||
|
component: 'DatePicker',
|
||
|
componentProps: {
|
||
|
type: 'datetime',
|
||
|
valueFormat: 'x'
|
||
|
}
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '计算便次',
|
||
|
field: 'currentDeli',
|
||
|
sort: 'custom',
|
||
|
isSearch: false,
|
||
|
form: {
|
||
|
component: 'InputNumber',
|
||
|
value: 0
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '总数',
|
||
|
field: 'consumeQty',
|
||
|
sort: 'custom',
|
||
|
isSearch: false,
|
||
|
},
|
||
|
{
|
||
|
label: '延迟便次日期',
|
||
|
field: 'delayDeliDate',
|
||
|
sort: 'custom',
|
||
|
formatter: dateFormatter,
|
||
|
isSearch: false,
|
||
|
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')]
|
||
|
}
|
||
|
},
|
||
|
form: {
|
||
|
component: 'DatePicker',
|
||
|
componentProps: {
|
||
|
type: 'datetime',
|
||
|
valueFormat: 'x'
|
||
|
}
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '延迟便次',
|
||
|
field: 'delayDeli',
|
||
|
sort: 'custom',
|
||
|
isSearch: false,
|
||
|
form: {
|
||
|
component: 'InputNumber',
|
||
|
value: 0
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
label: '下一便次开始时间',
|
||
|
field: 'nextDeliTimer',
|
||
|
sort: 'custom',
|
||
|
isSearch: false,
|
||
|
},
|
||
|
{
|
||
|
label: '创建时间',
|
||
|
field: 'createTime',
|
||
|
sort: 'custom',
|
||
|
formatter: dateFormatter,
|
||
|
isSearch: false,
|
||
|
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,
|
||
|
},
|
||
|
]))
|