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.
295 lines
5.3 KiB
295 lines
5.3 KiB
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
|
|
// 表单校验
|
|
export const ItemRequestMainRules = reactive({
|
|
concurrencyStamp: [required],
|
|
})
|
|
|
|
export const ItemRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
|
|
{
|
|
label: '删除时间',
|
|
field: 'deleteTime',
|
|
sort: 'custom',
|
|
formatter: dateFormatter,
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail: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: 'requestBillNo',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '主键',
|
|
field: 'id',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
},
|
|
{
|
|
label: '状态',
|
|
field: 'status',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
form: {
|
|
component: 'Radio'
|
|
},
|
|
},
|
|
{
|
|
label: '并发乐观锁',
|
|
field: 'concurrencyStamp',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
form: {
|
|
component: 'InputNumber',
|
|
value: 0
|
|
},
|
|
},
|
|
{
|
|
label: '删除用户名',
|
|
field: 'deleter',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
},
|
|
{
|
|
label: '位置ID',
|
|
field: 'siteId',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
form: {
|
|
component: 'InputNumber',
|
|
value: 0
|
|
},
|
|
},
|
|
|
|
{
|
|
label: '计划编码',
|
|
field: 'planDayCode',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '工单编码',
|
|
field: 'workBillNo',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '批次编码',
|
|
field: 'batchCode',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '工位编码',
|
|
field: 'workstationCode',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '产品编码',
|
|
field: 'productCode',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '工序编码',
|
|
field: 'processCode',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '类型(1:叫料、2:补料)',
|
|
field: 'requestType',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
form: {
|
|
component: 'SelectV2'
|
|
},
|
|
},
|
|
{
|
|
label: '创建时间',
|
|
field: 'createTime',
|
|
sort: 'custom',
|
|
formatter: dateFormatter,
|
|
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')]
|
|
}
|
|
},
|
|
isForm: false,
|
|
},
|
|
{
|
|
label: '备注',
|
|
field: 'remark',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '操作',
|
|
field: 'action',
|
|
isForm: false,
|
|
table: {
|
|
width: 150,
|
|
fixed: 'right'
|
|
}
|
|
}
|
|
]))
|
|
|
|
|
|
export const ItemRequestDetailRules = reactive({
|
|
concurrencyStamp: [required],
|
|
})
|
|
|
|
|
|
export const ItemRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
|
|
{
|
|
label: '主键',
|
|
field: 'id',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
},
|
|
{
|
|
label: '状态',
|
|
field: 'status',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
form: {
|
|
component: 'Radio'
|
|
},
|
|
},
|
|
{
|
|
label: '并发乐观锁',
|
|
field: 'concurrencyStamp',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
form: {
|
|
component: 'InputNumber',
|
|
value: 0
|
|
},
|
|
},
|
|
|
|
{
|
|
label: '删除用户名',
|
|
field: 'deleter',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
},
|
|
{
|
|
label: '申请单号',
|
|
field: 'requestBillNo',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '物料编码',
|
|
field: 'itemBasicCode',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '物料数量',
|
|
field: 'itemCounts',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '物料单位',
|
|
field: 'itemUom',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '位置ID',
|
|
field: 'siteId',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isTable: false,
|
|
isForm: false,
|
|
isDetail:false,
|
|
form: {
|
|
component: 'InputNumber',
|
|
value: 0
|
|
},
|
|
},
|
|
{
|
|
label: '创建时间',
|
|
field: 'createTime',
|
|
sort: 'custom',
|
|
formatter: dateFormatter,
|
|
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')]
|
|
}
|
|
},
|
|
isForm: false,
|
|
},
|
|
{
|
|
label: '备注',
|
|
field: 'remark',
|
|
sort: 'custom',
|
|
isSearch: true,
|
|
},
|
|
{
|
|
label: '操作',
|
|
field: 'action',
|
|
isForm: false,
|
|
table: {
|
|
width: 150,
|
|
fixed: 'right'
|
|
}
|
|
}
|
|
]))
|
|
|