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.
156 lines
4.0 KiB
156 lines
4.0 KiB
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 { ToolAccounts,ToolAccountsRules } from '../toolAccounts/toolAccounts.data'
|
|
import * as ToolAccountsApi from '@/api/eam/toolAccounts'
|
|
|
|
// 表单校验
|
|
export const ToolModRules = reactive({
|
|
modCode: [required],
|
|
toolCode: [required],
|
|
type: [required],
|
|
concurrencyStamp: [required]
|
|
})
|
|
|
|
export const ToolMod = useCrudSchemas(reactive<CrudSchema[]>([
|
|
{
|
|
label: '类型',
|
|
field: 'type',
|
|
sort: 'custom',
|
|
dictType: DICT_TYPE.DEVICE_TYPE,
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
isSearch: true,
|
|
form: {
|
|
component: 'Select',
|
|
}
|
|
},
|
|
{
|
|
label: '工装编码',
|
|
field: 'toolCode',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isDetail: false,
|
|
isForm: false,
|
|
isTable: true,
|
|
isTableForm: false,
|
|
},
|
|
// {
|
|
// label: '工装编码',
|
|
// field: 'toolCodeShow',
|
|
// sort: 'custom',
|
|
// isSearch: true,
|
|
// form: {
|
|
// componentProps: {
|
|
// isSearchList: true,
|
|
// searchListPlaceholder: '请选择工装代码',
|
|
// searchField: 'toolCodeShow',
|
|
// searchTitle: '客户物料基础信息',
|
|
// searchAllSchemas: ToolAccounts.allSchemas,
|
|
// searchPage: ToolAccountsApi.getToolAccountsPage,
|
|
// searchCondition: [{
|
|
// key: 'available',
|
|
// value: 'TRUE',
|
|
// isMainValue: false
|
|
// }]
|
|
// }
|
|
// },
|
|
// search: {
|
|
// componentProps: {
|
|
// isSearchList: true,
|
|
// searchListPlaceholder: '请选择工装代码',
|
|
// searchField: 'toolCodeShow',
|
|
// searchTitle: '客户物料基础信息',
|
|
// searchAllSchemas: ToolAccounts.allSchemas,
|
|
// searchPage: ToolAccountsApi.getToolAccountsPage,
|
|
// searchCondition: [{
|
|
// key: 'available',
|
|
// value: 'TRUE',
|
|
// isMainValue: false
|
|
// }]
|
|
// }
|
|
// }
|
|
// },
|
|
{
|
|
label: '物料编号',
|
|
field: 'modCode',
|
|
sort: 'custom',
|
|
isSearch: false,
|
|
isDetail: false,
|
|
isForm: false,
|
|
isTable: true,
|
|
isTableForm: false,
|
|
},
|
|
// {
|
|
// label: '物料编号',
|
|
// field: 'modCodeShow',
|
|
// sort: 'custom',
|
|
// isSearch: true,
|
|
// form: {
|
|
// componentProps: {
|
|
// isSearchList: true,
|
|
// searchListPlaceholder: '请选择品番',
|
|
// searchField: 'modCodeShow',
|
|
// searchTitle: '客户物料基础信息',
|
|
// multiple:true,
|
|
// searchAllSchemas: Itembasic.allSchemas,
|
|
// searchPage: ItembasicApi.getItembasicPage,
|
|
// searchCondition: [{
|
|
// key: 'available',
|
|
// value: 'TRUE',
|
|
// isMainValue: false
|
|
// }]
|
|
// }
|
|
// },
|
|
// search: {
|
|
// componentProps: {
|
|
// isSearchList: true,
|
|
// searchListPlaceholder: '请选择品番',
|
|
// searchField: 'modCodeShow',
|
|
// searchTitle: '客户物料基础信息',
|
|
// multiple: true,
|
|
// searchAllSchemas: Itembasic.allSchemas,
|
|
// searchPage: ItembasicApi.getItembasicPage,
|
|
// searchCondition: [{
|
|
// key: 'available',
|
|
// value: 'TRUE',
|
|
// isMainValue: false
|
|
// }]
|
|
// }
|
|
// }
|
|
// },
|
|
|
|
// {
|
|
// label: '部门',
|
|
// field: 'departmentCode',
|
|
// sort: 'custom',
|
|
// isSearch: true
|
|
// },
|
|
{
|
|
label: '备注',
|
|
field: 'remark',
|
|
sort: 'custom',
|
|
isSearch: true
|
|
},
|
|
{
|
|
label: '是否可用',
|
|
field: 'available',
|
|
sort: 'custom',
|
|
dictType: DICT_TYPE.TRUE_FALSE,
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
isTable: true,
|
|
isDetail: false,
|
|
isSearch: false,
|
|
isTableForm: false,
|
|
isForm: false,
|
|
},
|
|
{
|
|
label: '操作',
|
|
field: 'action',
|
|
isForm: false,
|
|
table: {
|
|
width: 150,
|
|
fixed: 'right'
|
|
}
|
|
}
|
|
]))
|
|
|