|
|
@ -1,6 +1,11 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
import { Item, ItemRules } from '../../basic/item/item.data' |
|
|
|
import * as ItemApi from '@/api/eam/basic/item' |
|
|
|
import { LocationArea, LocationAreaRules } from '../../basic/locationArea/locationArea.data' |
|
|
|
import * as LocationAreaApi from '@/api/eam/basic/locationArea' |
|
|
|
import { Location, LocationRules } from '../../basic/location/location.data' |
|
|
|
import * as LocationApi from '@/api/eam/basic/location' |
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const ItemAccountsRules = reactive({ |
|
|
@ -19,23 +24,60 @@ export const ItemAccounts = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
width: 180, |
|
|
|
fixed: 'left' |
|
|
|
}, |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择备件', // 输入框占位文本
|
|
|
|
searchField: 'number', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '备件', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Item.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItemApi.getItemNotInAccountSenior, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
label: '库位编号', |
|
|
|
field: 'locationNumber', |
|
|
|
label: '库区编号', |
|
|
|
field: 'areaNumber', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 110 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择备件', // 输入框占位文本
|
|
|
|
searchField: 'number', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '备件', // 查询弹窗标题
|
|
|
|
searchAllSchemas: LocationArea.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: LocationAreaApi.getLocationAreaPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '库区编号', |
|
|
|
field: 'areaNumber', |
|
|
|
label: '库位编号', |
|
|
|
field: 'locationNumber', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
width: 110 |
|
|
|
}, |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择备件', // 输入框占位文本
|
|
|
|
searchField: 'number', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '备件', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: LocationApi.getLocationNoInAccountPage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'areaNumber', |
|
|
|
value: 'areaNumber', |
|
|
|
message: '请选择库区编号!', |
|
|
|
isMainValue: true, // 拼接条件必须要 false 同时不能与 isMainValue: true 同用 // 前置添加必有,和isFormModel结合使用
|
|
|
|
}] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '备件名称', |
|
|
|