|
|
@ -1,7 +1,8 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import { Item } from '@/views/eam/basic/item/item.data' |
|
|
|
import * as ItemApi from '@/api/eam/basic/item' |
|
|
|
import { ItemAccounts } from '@/views/eam/item/itemAccounts/itemAccounts.data' |
|
|
|
import * as ItemAccountsApi from '@/api/eam/item/itemAccounts' |
|
|
|
import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance' |
|
|
|
import { validateHanset, validateEmail } from '@/utils/validator' |
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
|
|
|
@ -47,28 +48,19 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '是否可用', |
|
|
|
field: 'available', |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
label: '状态', |
|
|
|
field: 'status', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.ITEM_APPLY_STATUS, |
|
|
|
dictClass: 'string', |
|
|
|
isSearch: false, |
|
|
|
isSearch: true, |
|
|
|
isTable: true, |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
tableForm: { |
|
|
|
type: 'Select', |
|
|
|
inactiveValue: 'FALSE', |
|
|
|
disabled: true |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Switch', |
|
|
|
value: 'TRUE', |
|
|
|
componentProps: { |
|
|
|
inactiveValue: 'FALSE', |
|
|
|
activeValue: 'TRUE' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
@ -96,6 +88,30 @@ export const ApplicationRecordMainRules = reactive({ |
|
|
|
], |
|
|
|
}) |
|
|
|
|
|
|
|
export const DeviceMOLD = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
{ |
|
|
|
label: '编号', |
|
|
|
field: 'number', |
|
|
|
sort: 'custom', |
|
|
|
isForm: false, |
|
|
|
table: { |
|
|
|
width: 180, |
|
|
|
fixed: 'left' |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '名称', |
|
|
|
field: 'name', |
|
|
|
sort: 'custom', |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '规格型号', |
|
|
|
field: 'specification', |
|
|
|
sort: 'custom', |
|
|
|
}, |
|
|
|
|
|
|
|
])) |
|
|
|
|
|
|
|
/** |
|
|
|
* @returns {Array} 备件申请子表 |
|
|
|
*/ |
|
|
@ -110,8 +126,8 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
searchListPlaceholder: '请选择备件编号', |
|
|
|
searchField: 'number', |
|
|
|
searchTitle: '库区信息', |
|
|
|
searchAllSchemas: Item.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItemApi.getItemPage, // 查询弹窗所需分页方法
|
|
|
|
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
@ -121,7 +137,49 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '数量', |
|
|
|
label: '类型', |
|
|
|
field: 'type', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.DEVICE_MOLD_TYPE, |
|
|
|
dictClass: 'string', |
|
|
|
isSearch: true, |
|
|
|
isTable: true, |
|
|
|
table: { |
|
|
|
width: 150 |
|
|
|
}, |
|
|
|
tableForm: { |
|
|
|
type: 'Select', |
|
|
|
disabled: false |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
label: '设备/模具编号', |
|
|
|
field: 'deviceNumber', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
tableForm: { |
|
|
|
isInpuFocusShow: true, |
|
|
|
searchListPlaceholder: '请选择单号', |
|
|
|
searchField: 'number', |
|
|
|
searchTitle: '单号信息', |
|
|
|
searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'available', |
|
|
|
value: "TRUE", |
|
|
|
isMainValue: false |
|
|
|
}, { |
|
|
|
key: 'type', |
|
|
|
value: "type", |
|
|
|
isMainValue: true |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '申领数量', |
|
|
|
field: 'qty', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
@ -160,6 +218,8 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
precision: 6 |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
label: '是否可用', |
|
|
|
field: 'available', |
|
|
|