|
|
@ -1,5 +1,11 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import { Itembasic } from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data"; |
|
|
|
import * as ItembasicApi from "@/api/wms/itembasic"; |
|
|
|
import * as ItemAccountsApi from '@/api/eam/itemAccounts' |
|
|
|
import { ItemAccounts } from '@/views/eam/itemAccounts/itemAccounts.data' |
|
|
|
import * as LocationApi from '@/api/wms/location' |
|
|
|
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' |
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const SpareitemLocationRules = reactive({ |
|
|
@ -13,42 +19,147 @@ export const SpareitemLocation = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'itemCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
// labelMessage: '信息提示说明!!!',
|
|
|
|
componentProps: { |
|
|
|
enterSearch: true, |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '物料信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [ |
|
|
|
// {
|
|
|
|
// key:'supplierCode',
|
|
|
|
// value:'supplierCode',
|
|
|
|
// isMainValue: true
|
|
|
|
// },
|
|
|
|
], |
|
|
|
verificationParams: [{ |
|
|
|
key: 'code', |
|
|
|
action: '==', |
|
|
|
value: '', |
|
|
|
isMainValue: false, |
|
|
|
isSearch: 'true', |
|
|
|
isFormModel: true |
|
|
|
}], // 失去焦点校验参数
|
|
|
|
} |
|
|
|
}, |
|
|
|
table: { |
|
|
|
width: 180 |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '名称', |
|
|
|
field: 'name', |
|
|
|
sort: 'custom', |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
}, |
|
|
|
table: { |
|
|
|
width: 180 |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '描述1', |
|
|
|
field: 'desc1', |
|
|
|
sort: 'custom', |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
}, |
|
|
|
table: { |
|
|
|
width: 180 |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '描述2', |
|
|
|
field: 'desc2', |
|
|
|
sort: 'custom', |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
}, |
|
|
|
table: { |
|
|
|
width: 180 |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '库位代码', |
|
|
|
field: 'locationCode', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
form: { |
|
|
|
// labelMessage: '信息提示说明!!!',
|
|
|
|
componentProps: { |
|
|
|
enterSearch: true, |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择库位代码', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '库位信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: LocationApi.getLocationPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
}], |
|
|
|
verificationParams: [{ |
|
|
|
key: 'code', |
|
|
|
action: '==', |
|
|
|
value: '', |
|
|
|
isMainValue: false, |
|
|
|
isSearch: true, |
|
|
|
isFormModel: true |
|
|
|
}], // 失去焦点校验参数
|
|
|
|
} |
|
|
|
}, |
|
|
|
table: { |
|
|
|
width: 180 |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '库位名称', |
|
|
|
field: 'locationName', |
|
|
|
sort: 'custom', |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
}, |
|
|
|
table: { |
|
|
|
width: 180 |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '是否可用', |
|
|
|
field: 'available', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
form: { |
|
|
|
component: 'Switch', |
|
|
|
value: 'TRUE', |
|
|
|
componentProps: { |
|
|
|
inactiveValue: 'FALSE', |
|
|
|
activeValue: 'TRUE' |
|
|
|
} |
|
|
|
}, |
|
|
|
table: { |
|
|
|
width: 110 |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '备注', |
|
|
|
field: 'remark', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 220 |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '创建时间', |
|
|
@ -65,6 +176,9 @@ export const SpareitemLocation = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
} |
|
|
|
}, |
|
|
|
isForm: false, |
|
|
|
table: { |
|
|
|
width: 220 |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '操作', |
|
|
|