You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
2.3 KiB
96 lines
2.3 KiB
7 months ago
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
||
|
import {Area} from "@/views/wms/basicDataManage/factoryModeling/areabasic/areabasic.data";
|
||
|
import * as AreaApi from "@/api/wms/areabasic";
|
||
|
import {Itembasic} from "@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data";
|
||
|
import * as ItembasicApi from "@/api/wms/itembasic";
|
||
|
|
||
|
// 表单校验
|
||
|
export const ItemSyntheticRelationRules = reactive({
|
||
|
name: [required],
|
||
|
itemCode: [required],
|
||
|
available: [required],
|
||
|
})
|
||
|
|
||
|
export const ItemSyntheticRelation = useCrudSchemas(reactive<CrudSchema[]>([
|
||
|
{
|
||
|
label: '组合号',
|
||
|
field: 'code',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
isForm: false,
|
||
|
},
|
||
|
{
|
||
|
label: '组合名称',
|
||
|
field: 'name',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
},
|
||
|
{
|
||
|
label: '物料代码',
|
||
|
field: 'itemCode',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
form: {
|
||
|
// labelMessage: '信息提示说明!!!',
|
||
|
componentProps: {
|
||
|
multiple: true,
|
||
|
enterSearch: true, //可输入回车
|
||
|
isSearchList: true, // 开启查询弹窗
|
||
|
searchListPlaceholder: '请选择物料代码', // 输入框占位文本
|
||
|
searchField: 'code', // 查询弹窗赋值字段
|
||
|
searchTitle: '物料基础信息', // 查询弹窗标题
|
||
|
searchAllSchemas: Itembasic.allSchemas, // 查询弹窗所需类
|
||
|
searchPage: ItembasicApi.getItembasicPage, // 查询弹窗所需分页方法
|
||
|
searchCondition: [{
|
||
|
key: 'available',
|
||
|
value: 'TRUE',
|
||
|
isMainValue: false
|
||
|
}],
|
||
|
verificationParams: [{
|
||
|
key: 'code',
|
||
|
action: '==',
|
||
|
value: '',
|
||
|
isMainValue: false,
|
||
|
isSearch: 'true',
|
||
|
isFormModel: true
|
||
|
}], // 失去焦点校验参数
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
label: '物料名称',
|
||
|
field: 'itemName',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
isForm:false,
|
||
|
},
|
||
|
{
|
||
|
label: '是否可用',
|
||
|
field: 'available',
|
||
|
sort: 'custom',
|
||
|
isSearch: true,
|
||
|
dictType: DICT_TYPE.TRUE_FALSE,
|
||
|
dictClass: 'string',
|
||
|
table: {
|
||
|
width: 120
|
||
|
},
|
||
|
form: {
|
||
|
component: 'Switch',
|
||
|
value: 'TRUE',
|
||
|
componentProps: {
|
||
|
inactiveValue: 'FALSE',
|
||
|
activeValue: 'TRUE'
|
||
|
}
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
label: '操作',
|
||
|
field: 'action',
|
||
|
isForm: false,
|
||
|
table: {
|
||
|
width: 150,
|
||
|
fixed: 'right'
|
||
|
}
|
||
|
}
|
||
|
]))
|