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.
190 lines
3.3 KiB
190 lines
3.3 KiB
11 months ago
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
||
|
import { dateFormatter } from '@/utils/formatTime'
|
||
|
|
||
|
// 表单校验
|
||
|
export const Rules = reactive({
|
||
|
number: [required],
|
||
|
planNumber: [required],
|
||
|
})
|
||
|
|
||
|
export const AdjustRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
|
||
|
{
|
||
|
label: '调整编号',
|
||
|
field: 'number',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '计划编号',
|
||
|
field: 'planNumber',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '任务编号',
|
||
|
field: 'jobNumber',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '操作',
|
||
|
field: 'action',
|
||
|
isForm: false,
|
||
|
table: {
|
||
|
width: 150,
|
||
|
fixed: 'right'
|
||
|
}
|
||
|
}
|
||
|
]))
|
||
|
|
||
|
//表单校验
|
||
|
export const AdjustRecordMainRules = reactive({
|
||
|
name: [
|
||
|
{ required: true, message: '请填写描述', trigger: 'change' }
|
||
|
],
|
||
|
remark: [
|
||
|
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
|
||
|
],
|
||
|
available: [
|
||
|
{ required: true, message: '请选择是否可用', trigger: 'change' }
|
||
|
],
|
||
|
})
|
||
|
/**
|
||
|
* @returns {Array} 备件申请子表
|
||
|
*/
|
||
|
export const AdjustRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
|
||
|
{
|
||
|
label: '任务编号',
|
||
|
field: 'number',
|
||
|
sort: 'custom',
|
||
|
isForm: false,
|
||
|
isSearch: true,
|
||
|
table: {
|
||
|
width: 180,
|
||
|
fixed: 'left'
|
||
|
},
|
||
|
},
|
||
|
|
||
|
{
|
||
|
label: '备件编号',
|
||
|
field: 'itemNumber',
|
||
|
sort: 'custom',
|
||
|
isForm: false,
|
||
|
isSearch: true,
|
||
|
table: {
|
||
|
width: 180,
|
||
|
},
|
||
|
},
|
||
|
|
||
|
{
|
||
|
label: '库位编号',
|
||
|
field: 'locationNumber',
|
||
|
sort: 'custom',
|
||
|
isForm: false,
|
||
|
isSearch: true,
|
||
|
table: {
|
||
|
width: 180,
|
||
|
},
|
||
|
},
|
||
|
|
||
|
{
|
||
|
label: '库区编号',
|
||
|
field: 'areaNumber',
|
||
|
sort: 'custom',
|
||
|
isForm: false,
|
||
|
isSearch: true,
|
||
|
table: {
|
||
|
width: 180,
|
||
|
},
|
||
|
},
|
||
|
|
||
|
{
|
||
|
label: '库存数量',
|
||
|
field: 'qty',
|
||
|
sort: 'custom',
|
||
|
isForm: false,
|
||
|
isSearch: true,
|
||
|
table: {
|
||
|
width: 180,
|
||
|
},
|
||
|
form: {
|
||
|
component: 'InputNumber',
|
||
|
componentProps: {
|
||
|
min: 0,
|
||
|
precision: 2
|
||
|
}
|
||
|
},
|
||
|
tableForm: {
|
||
|
type: 'InputNumber',
|
||
|
min: 0,
|
||
|
precision: 2
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
label: '盘点数量',
|
||
|
field: 'countQty',
|
||
|
sort: 'custom',
|
||
|
isForm: false,
|
||
|
isSearch: true,
|
||
|
table: {
|
||
|
width: 180,
|
||
|
},
|
||
|
form: {
|
||
|
component: 'InputNumber',
|
||
|
componentProps: {
|
||
|
min: 0,
|
||
|
precision: 2
|
||
|
}
|
||
|
},
|
||
|
tableForm: {
|
||
|
type: 'InputNumber',
|
||
|
min: 0,
|
||
|
precision: 2
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
label: '差异数量',
|
||
|
field: 'differenceQty',
|
||
|
sort: 'custom',
|
||
|
isForm: false,
|
||
|
isSearch: true,
|
||
|
table: {
|
||
|
width: 180,
|
||
|
},
|
||
|
form: {
|
||
|
component: 'InputNumber',
|
||
|
componentProps: {
|
||
|
min: 0,
|
||
|
precision: 2
|
||
|
}
|
||
|
},
|
||
|
tableForm: {
|
||
|
type: 'InputNumber',
|
||
|
min: 0,
|
||
|
precision: 2
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
label: '操作',
|
||
|
field: 'action',
|
||
|
isDetail: false,
|
||
|
isForm: false,
|
||
|
table: {
|
||
|
width: 150,
|
||
|
fixed: 'right'
|
||
|
},
|
||
|
isTableForm: false,
|
||
|
}
|
||
|
]))
|
||
|
|
||
|
//表单校验
|
||
|
export const AdjustRecordDetailRules = reactive({
|
||
|
lineNumber: [
|
||
|
{ required: true, message: '请输入行号', trigger: 'blur' },
|
||
|
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
|
||
|
],
|
||
|
stdPackQty: [
|
||
|
{ required: true, message: '请输入标包数量', trigger: 'blur' }
|
||
|
],
|
||
|
})
|