|
|
@ -1,50 +1,152 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import * as LocationAreaApi from '@/api/eam/basic/locationArea' |
|
|
|
import { LocationArea } from '@/views/eam/basic/locationArea/locationArea.data' |
|
|
|
|
|
|
|
import * as LocationApi from '@/api/eam/basic/location' |
|
|
|
import { Location } from '@/views/eam/basic/location/location.data' |
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const ItemOutLocationRules = reactive({ |
|
|
|
number: [required], |
|
|
|
// number: [required],
|
|
|
|
itemNumber: [required], |
|
|
|
qty: [required], |
|
|
|
locationNumber: [required], |
|
|
|
}) |
|
|
|
|
|
|
|
export const ItemOutLocation = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
// {
|
|
|
|
// label: '编号',
|
|
|
|
// field: 'number',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: false,
|
|
|
|
// isForm:false,
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// label: '库区编号',
|
|
|
|
// field: 'areaNumber',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: false,
|
|
|
|
// form: {
|
|
|
|
// // labelMessage: '信息提示说明!!!',
|
|
|
|
// componentProps: {
|
|
|
|
// isSearchList: true, // 开启查询弹窗
|
|
|
|
// searchListPlaceholder: '请选择库区编号', // 输入框占位文本
|
|
|
|
// searchField: 'number', // 查询弹窗赋值字段
|
|
|
|
// searchTitle: '库区信息', // 查询弹窗标题
|
|
|
|
// searchAllSchemas: LocationArea.allSchemas, // 查询弹窗所需类
|
|
|
|
// searchPage: LocationAreaApi.getLocationAreaPage, // 查询弹窗所需分页方法
|
|
|
|
// searchCondition: [
|
|
|
|
// {
|
|
|
|
// key: 'available',
|
|
|
|
// value: 'TRUE',
|
|
|
|
// isMainValue: false
|
|
|
|
// }
|
|
|
|
// ]
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// label: '库区名称',
|
|
|
|
// field: 'areaName',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: false,
|
|
|
|
// isForm:false
|
|
|
|
// },
|
|
|
|
{ |
|
|
|
label: '出库编号', |
|
|
|
field: 'number', |
|
|
|
label: '库位编号', |
|
|
|
field: 'locationNumber', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
// labelMessage: '信息提示说明!!!',
|
|
|
|
componentProps: { |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择库位编号', // 输入框占位文本
|
|
|
|
searchField: 'number', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '库位信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [ |
|
|
|
{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
} |
|
|
|
|
|
|
|
// ,
|
|
|
|
// {
|
|
|
|
// key: 'areaNumber',
|
|
|
|
// value: 'areaNumber',
|
|
|
|
// isMainValue: true
|
|
|
|
// },
|
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '库位名称', |
|
|
|
field: 'locationName', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
isForm:false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '备件编号', |
|
|
|
field: 'itemNumber', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
form:{ |
|
|
|
componentProps:{ |
|
|
|
disabled:true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '库位编号', |
|
|
|
field: 'locationNumber', |
|
|
|
label: '备件名称', |
|
|
|
field: 'itemName', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
isSearch: false, |
|
|
|
form:{ |
|
|
|
componentProps:{ |
|
|
|
disabled:true |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '出库类型', |
|
|
|
field: 'type', |
|
|
|
label: '领用人', |
|
|
|
field: 'receiver', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
form: { |
|
|
|
component: 'Select' |
|
|
|
}, |
|
|
|
}, |
|
|
|
// {
|
|
|
|
// label: '出库类型',
|
|
|
|
// field: 'type',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: false,
|
|
|
|
// form: {
|
|
|
|
// component: 'Select'
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
{ |
|
|
|
label: '数量', |
|
|
|
label: '出库数量', |
|
|
|
field: 'qty', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
table: { |
|
|
|
width: 110 |
|
|
|
}, |
|
|
|
form:{ |
|
|
|
component: 'InputNumber', |
|
|
|
componentProps:{ |
|
|
|
min: 0,//最小值`
|
|
|
|
precision: 2//精度`
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '操作', |
|
|
|
field: 'action', |
|
|
|
isForm: false, |
|
|
|
isTable:false, |
|
|
|
table: { |
|
|
|
width: 150, |
|
|
|
fixed: 'right' |
|
|
|