|
|
@ -3,129 +3,102 @@ import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import * as ItemAccountsApi from '@/api/eam/itemAccounts' |
|
|
|
import { ItemAccounts } from '@/views/eam/itemAccounts/itemAccounts.data' |
|
|
|
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const SparePartsInLocationRecordMainRules = reactive({ |
|
|
|
number: [required], |
|
|
|
theme: [required], |
|
|
|
type: [required], |
|
|
|
type: [required] |
|
|
|
}) |
|
|
|
// 备件入库主表
|
|
|
|
export const SparePartsInLocationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: 'id', |
|
|
|
field: 'id', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isForm: false, |
|
|
|
isDetail:false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '编号', |
|
|
|
field: 'number', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
isForm: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '入库主题', |
|
|
|
field: 'theme', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
},{ |
|
|
|
label: '入库类型', |
|
|
|
field: 'type', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.PUT_IN_TYPE, |
|
|
|
dictClass: 'string', |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '流程状态', |
|
|
|
field: 'status', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
isForm:false, |
|
|
|
|
|
|
|
dictType: DICT_TYPE.SPAREPARTS_APPLY_STATUS_ENUM, |
|
|
|
dictClass: 'string', |
|
|
|
|
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '入库申请人', |
|
|
|
field: 'applyer', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '审核人', |
|
|
|
field: 'approver', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
isForm:false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '审核内容', |
|
|
|
field: 'approveContent', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
isForm:false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '审核时间', |
|
|
|
field: 'approveTime', |
|
|
|
sort: 'custom', |
|
|
|
formatter: dateFormatter, |
|
|
|
isSearch: false, |
|
|
|
isForm: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')] |
|
|
|
export const SparePartsInLocationRecordMain = useCrudSchemas( |
|
|
|
reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '备件编号', |
|
|
|
field: 'sparePartsCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
isForm: false, |
|
|
|
table: { |
|
|
|
width: 180, |
|
|
|
fixed: 'left' |
|
|
|
} |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'DatePicker', |
|
|
|
componentProps: { |
|
|
|
type: 'datetime', |
|
|
|
valueFormat: 'x' |
|
|
|
{ |
|
|
|
label: '备件名称', |
|
|
|
field: 'name', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
table: { |
|
|
|
width: 110 |
|
|
|
} |
|
|
|
}, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
{ |
|
|
|
label: '备件名称', |
|
|
|
field: 'name', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
table: { |
|
|
|
width: 110 |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
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')] |
|
|
|
{ |
|
|
|
label: '备件类型', |
|
|
|
field: 'classification', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.PART_CLASS, |
|
|
|
dictClass: 'string', |
|
|
|
isSearch: false, |
|
|
|
isTable: true, |
|
|
|
tableForm: { |
|
|
|
type: 'Select' |
|
|
|
} |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
detail: { |
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss' |
|
|
|
|
|
|
|
{ |
|
|
|
label: '规格型号', |
|
|
|
field: 'specifications', |
|
|
|
sort: 'custom' |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
label: '备注', |
|
|
|
field: 'remark', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
}, |
|
|
|
])) |
|
|
|
{ |
|
|
|
label: '存放位置', |
|
|
|
field: 'locationCode', |
|
|
|
sort: 'custom' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '计量单位', |
|
|
|
field: 'uom', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.UOM, |
|
|
|
dictClass: 'string', |
|
|
|
isSearch: false, |
|
|
|
isTable: true, |
|
|
|
tableForm: { |
|
|
|
type: 'Select' |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '生产厂家', |
|
|
|
field: 'brand', |
|
|
|
sort: 'custom' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '申请单号', |
|
|
|
field: 'requestNumber', |
|
|
|
sort: 'custom' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '申领数量', |
|
|
|
field: 'applyQty', |
|
|
|
sort: 'custom' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '出库时问', |
|
|
|
field: 'createTime', |
|
|
|
sort: 'custom' |
|
|
|
} |
|
|
|
]) |
|
|
|
) |
|
|
|
// 备件入库子表
|
|
|
|
export const SparePartsInLocationRecordDetailRules = reactive({ |
|
|
|
number: [required], |
|
|
@ -133,24 +106,42 @@ export const SparePartsInLocationRecordDetailRules = reactive({ |
|
|
|
locationCode: [required], |
|
|
|
areaCode: [required], |
|
|
|
sparePartsCode: [required], |
|
|
|
applyQty: [required], |
|
|
|
applyQty: [required] |
|
|
|
}) |
|
|
|
|
|
|
|
export const SparePartsInLocationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '库位编号', |
|
|
|
field: 'locationCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择库位编号', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '库位信息', // 查询弹窗标题
|
|
|
|
|
|
|
|
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
|
|
|
|
export const SparePartsInLocationRecordDetail = useCrudSchemas( |
|
|
|
reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '库位编号', |
|
|
|
field: 'locationCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择库位编号', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '库位信息', // 查询弹窗标题
|
|
|
|
|
|
|
|
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [ |
|
|
|
{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
tableForm: { |
|
|
|
isInpuFocusShow: true, |
|
|
|
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
|
|
|
|
searchField: 'itemNumber', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '备件信息', // 查询弹窗标题
|
|
|
|
|
|
|
|
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [ |
|
|
|
{ |
|
|
|
key: 'available', |
|
|
@ -160,99 +151,80 @@ export const SparePartsInLocationRecordDetail = useCrudSchemas(reactive<CrudSche |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
tableForm: { |
|
|
|
isInpuFocusShow: true, |
|
|
|
searchListPlaceholder: '请选择备件编号', // 输入框占位文本
|
|
|
|
searchField: 'itemNumber', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '备件信息', // 查询弹窗标题
|
|
|
|
|
|
|
|
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [ |
|
|
|
{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
isMainValue: false |
|
|
|
{ |
|
|
|
label: '库区编号', |
|
|
|
field: 'areaCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '库区编号', |
|
|
|
field: 'areaCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
}, |
|
|
|
tableForm: { |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
}, |
|
|
|
tableForm:{ |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '备件编号', |
|
|
|
field: 'sparePartsCode', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
{ |
|
|
|
label: '备件编号', |
|
|
|
field: 'sparePartsCode', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
}, |
|
|
|
tableForm: { |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
}, |
|
|
|
tableForm:{ |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '库存数量', |
|
|
|
field: 'currentQty', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
tableForm: { |
|
|
|
disabled: true |
|
|
|
{ |
|
|
|
label: '库存数量', |
|
|
|
field: 'currentQty', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
tableForm: { |
|
|
|
disabled: true |
|
|
|
}, |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
}, |
|
|
|
isDetail: false, |
|
|
|
isTable: false |
|
|
|
}, |
|
|
|
form:{ |
|
|
|
componentProps:{ |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
{ |
|
|
|
label: '申领数量', |
|
|
|
field: 'applyQty', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false |
|
|
|
}, |
|
|
|
isDetail:false, |
|
|
|
isTable:false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '申领数量', |
|
|
|
field: 'applyQty', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false |
|
|
|
}, |
|
|
|
{ |
|
|
|
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')] |
|
|
|
} |
|
|
|
{ |
|
|
|
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, |
|
|
|
isTableForm: false |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
isTableForm:false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '备注', |
|
|
|
field: 'remark', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
|
|
|
|
])) |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
label: '备注', |
|
|
|
field: 'remark', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true |
|
|
|
} |
|
|
|
]) |
|
|
|
) |
|
|
|