|
@ -1,19 +1,23 @@ |
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
import * as LocationAreaApi from '@/api/eam/basic/locationArea' |
|
|
import * as LocationAreaApi from '@/api/eam/basic/locationArea' |
|
|
import { LocationArea } from '@/views/eam/basic/locationArea/locationArea.data' |
|
|
import { LocationArea } from '@/views/eam/basic/locationArea/locationArea.data' |
|
|
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
import * as LocationApi from '@/api/eam/basic/location' |
|
|
import * as LocationApi from '@/api/eam/basic/location' |
|
|
import { Location } from '@/views/eam/basic/location/location.data' |
|
|
import { Location } from '@/views/eam/basic/location/location.data' |
|
|
|
|
|
import { validateNumber } from '@/utils/validator' |
|
|
// 表单校验
|
|
|
// 表单校验
|
|
|
export const ItemOutLocationRules = reactive({ |
|
|
export const ItemOutLocationRules = reactive({ |
|
|
// number: [required],
|
|
|
// number: [required],
|
|
|
itemNumber: [required], |
|
|
itemNumber: [required], |
|
|
qty: [required], |
|
|
qty: [ |
|
|
locationNumber: [required], |
|
|
required, |
|
|
|
|
|
{ validator: validateNumber, message: '数量不能等于0', trigger: 'blur' }, |
|
|
|
|
|
], |
|
|
|
|
|
locationNumber: [required] |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
export const ItemOutLocation = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
export const ItemOutLocation = useCrudSchemas( |
|
|
|
|
|
reactive<CrudSchema[]>([ |
|
|
// {
|
|
|
// {
|
|
|
// label: '编号',
|
|
|
// label: '编号',
|
|
|
// field: 'number',
|
|
|
// field: 'number',
|
|
@ -88,16 +92,16 @@ export const ItemOutLocation = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
field: 'locationName', |
|
|
field: 'locationName', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: false, |
|
|
isSearch: false, |
|
|
isForm:false |
|
|
isForm: false |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '备件编号', |
|
|
label: '备件编号', |
|
|
field: 'itemNumber', |
|
|
field: 'itemNumber', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: true, |
|
|
isSearch: true, |
|
|
form:{ |
|
|
form: { |
|
|
componentProps:{ |
|
|
componentProps: { |
|
|
disabled:true |
|
|
disabled: true |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -106,9 +110,9 @@ export const ItemOutLocation = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
field: 'itemName', |
|
|
field: 'itemName', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: false, |
|
|
isSearch: false, |
|
|
form:{ |
|
|
form: { |
|
|
componentProps:{ |
|
|
componentProps: { |
|
|
disabled:true |
|
|
disabled: true |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
@ -116,7 +120,7 @@ export const ItemOutLocation = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
label: '领用人', |
|
|
label: '领用人', |
|
|
field: 'receiver', |
|
|
field: 'receiver', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
isSearch: false, |
|
|
isSearch: false |
|
|
}, |
|
|
}, |
|
|
// {
|
|
|
// {
|
|
|
// label: '出库类型',
|
|
|
// label: '出库类型',
|
|
@ -134,22 +138,39 @@ export const ItemOutLocation = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
table: { |
|
|
table: { |
|
|
width: 110 |
|
|
width: 110 |
|
|
}, |
|
|
}, |
|
|
form:{ |
|
|
form: { |
|
|
component: 'InputNumber', |
|
|
component: 'InputNumber', |
|
|
componentProps:{ |
|
|
componentProps: { |
|
|
min: 0,//最小值`
|
|
|
min: 0, //最小值`
|
|
|
precision: 2//精度`
|
|
|
precision: 2 //精度`
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
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 |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '操作', |
|
|
label: '操作', |
|
|
field: 'action', |
|
|
field: 'action', |
|
|
isForm: false, |
|
|
isForm: false, |
|
|
isTable:false, |
|
|
isTable: false, |
|
|
table: { |
|
|
table: { |
|
|
width: 150, |
|
|
width: 150, |
|
|
fixed: 'right' |
|
|
fixed: 'right' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
])) |
|
|
]) |
|
|
|
|
|
) |
|
|