|
@ -1,7 +1,8 @@ |
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
import { Item } from '@/views/eam/basic/item/item.data' |
|
|
import { ItemAccounts } from '@/views/eam/item/itemAccounts/itemAccounts.data' |
|
|
import * as ItemApi from '@/api/eam/basic/item' |
|
|
import * as ItemAccountsApi from '@/api/eam/item/itemAccounts' |
|
|
|
|
|
import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance' |
|
|
import { validateHanset, validateEmail } from '@/utils/validator' |
|
|
import { validateHanset, validateEmail } from '@/utils/validator' |
|
|
const { t } = useI18n() // 国际化
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
|
|
|
|
@ -47,28 +48,19 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: '是否可用', |
|
|
label: '状态', |
|
|
field: 'available', |
|
|
field: 'status', |
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
sort: 'custom', |
|
|
|
|
|
dictType: DICT_TYPE.ITEM_APPLY_STATUS, |
|
|
dictClass: 'string', |
|
|
dictClass: 'string', |
|
|
isSearch: false, |
|
|
isSearch: true, |
|
|
isTable: true, |
|
|
isTable: true, |
|
|
sort: 'custom', |
|
|
|
|
|
table: { |
|
|
table: { |
|
|
width: 150 |
|
|
width: 150 |
|
|
}, |
|
|
}, |
|
|
tableForm: { |
|
|
tableForm: { |
|
|
type: 'Select', |
|
|
type: 'Select', |
|
|
inactiveValue: 'FALSE', |
|
|
|
|
|
disabled: true |
|
|
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} 备件申请子表 |
|
|
* @returns {Array} 备件申请子表 |
|
|
*/ |
|
|
*/ |
|
@ -110,8 +126,8 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
searchListPlaceholder: '请选择备件编号', |
|
|
searchListPlaceholder: '请选择备件编号', |
|
|
searchField: 'number', |
|
|
searchField: 'number', |
|
|
searchTitle: '库区信息', |
|
|
searchTitle: '库区信息', |
|
|
searchAllSchemas: Item.allSchemas, // 查询弹窗所需类
|
|
|
searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
|
|
|
searchPage: ItemApi.getItemPage, // 查询弹窗所需分页方法
|
|
|
searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
|
|
|
searchCondition: [{ |
|
|
searchCondition: [{ |
|
|
key: 'available', |
|
|
key: 'available', |
|
|
value: 'TRUE', |
|
|
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', |
|
|
field: 'qty', |
|
|
sort: 'custom', |
|
|
sort: 'custom', |
|
|
table: { |
|
|
table: { |
|
@ -160,6 +218,8 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
precision: 6 |
|
|
precision: 6 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
{ |
|
|
label: '是否可用', |
|
|
label: '是否可用', |
|
|
field: 'available', |
|
|
field: 'available', |
|
|