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.
 
 
 

144 lines
2.6 KiB

import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter2 } from '@/utils/formatTime'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const QadProductionPlanMainRules = reactive({
workshop: [required],
woNumber: [required],
woLine: [required],
})
export const QadProductionPlanMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
table: {
width: 350,
}
},
{
label: '物料代码',
field: 'itemCode',
sort: 'custom',
isSearch: true,
table: {
width: 150,
}
},
{
label: '计划数量',
field: 'planQty',
sort: 'custom',
},
{
label: '生产线',
field: 'productionLine',
sort: 'custom',
isSearch: true,
},
{
label: '班组',
field: 'team',
sort: 'custom',
},
{
label: '计划日期',
field: 'planDate',
sort: 'custom',
formatter: dateFormatter2,
detail: {
dateFormat : 'YYYY-MM-DD'
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '计划类型',
field: 'planType',
sort: 'custom',
form: {
component: 'SelectV2'
},
},
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
form: {
component: 'SelectV2'
},
},
{
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: 'remark',
// sort: 'custom',
// },
// {
// label: '是否可用',
// field: 'available',
// sort: 'custom',
// isForm: false,
// },
// {
// label: '状态',
// field: 'status',
// sort: 'custom',
// isForm: false,
// },
// {
// label: '订单号',
// field: 'woNumber',
// sort: 'custom',
// },
// {
// label: '订单行',
// field: 'woLine',
// sort: 'custom',
// },
// {
// label: '操作',
// field: 'action',
// isForm: false,
// table: {
// width: 150,
// fixed: 'right'
// }
// }
]))