|
|
|
import type {CrudSchema} from '@/hooks/web/useCrudSchemas'
|
|
|
|
import {dateFormatter} from '@/utils/formatTime'
|
|
|
|
import {Warehouse} from "@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data";
|
|
|
|
import * as WarehouseApi from "@/api/wms/warehouse";
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const WorkstationRules = reactive({
|
|
|
|
code: [required]
|
|
|
|
})
|
|
|
|
export const TabsList = [{
|
|
|
|
label: "班组",
|
|
|
|
prop: 'Team',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "设备",
|
|
|
|
prop: 'Equipment',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "工序",
|
|
|
|
prop: 'Process',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "操作步骤",
|
|
|
|
prop: 'Opersteps',
|
|
|
|
}
|
|
|
|
|
|
|
|
]
|
|
|
|
export const Workstation = useCrudSchemas(reactive<CrudSchema[]>([
|
|
|
|
|
|
|
|
{
|
|
|
|
label: '代码',
|
|
|
|
field: 'code',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '名称',
|
|
|
|
field: 'name',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '车间代码',
|
|
|
|
field: 'workshopCode',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
isForm: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '生产线代码',
|
|
|
|
field: 'productionLineCode',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
isForm: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '班组代码',
|
|
|
|
field: 'teamCode',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
isForm: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '生效时间',
|
|
|
|
field: 'activeTime',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
detail: {
|
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
|
|
},
|
|
|
|
form: {
|
|
|
|
component: 'DatePicker',
|
|
|
|
componentProps: {
|
|
|
|
style: {width: '100%'},
|
|
|
|
type: 'datetime',
|
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
valueFormat: 'x',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '失效时间',
|
|
|
|
field: 'expireTime',
|
|
|
|
sort: 'custom',
|
|
|
|
formatter: dateFormatter,
|
|
|
|
detail: {
|
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
|
|
},
|
|
|
|
form: {
|
|
|
|
component: 'DatePicker',
|
|
|
|
componentProps: {
|
|
|
|
style: {width: '100%'},
|
|
|
|
type: 'datetime',
|
|
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
|
|
valueFormat: 'x',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '操作',
|
|
|
|
field: 'action',
|
|
|
|
isForm: false,
|
|
|
|
table: {
|
|
|
|
width: 150,
|
|
|
|
fixed: 'right'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]))
|
|
|
|
export const Team = useCrudSchemas(reactive<CrudSchema[]>([
|
|
|
|
{
|
|
|
|
label: '代码',
|
|
|
|
field: 'code',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
isForm: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '名称',
|
|
|
|
field: 'name',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
isForm: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '操作',
|
|
|
|
field: 'action',
|
|
|
|
isDetail: false,
|
|
|
|
isForm: false ,
|
|
|
|
table: {
|
|
|
|
width: 150,
|
|
|
|
fixed: 'right'
|
|
|
|
},
|
|
|
|
isTableForm:true,
|
|
|
|
}
|
|
|
|
]))
|
|
|
|
|
|
|
|
export const Equipment = useCrudSchemas(reactive<CrudSchema[]>([
|
|
|
|
{
|
|
|
|
label: '代码',
|
|
|
|
field: 'code',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
isForm: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '名称',
|
|
|
|
field: 'name',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
isForm: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '操作',
|
|
|
|
field: 'action',
|
|
|
|
isDetail: false,
|
|
|
|
isForm: false ,
|
|
|
|
table: {
|
|
|
|
width: 150,
|
|
|
|
fixed: 'right'
|
|
|
|
},
|
|
|
|
isTableForm:true
|
|
|
|
}
|
|
|
|
]))
|
|
|
|
export const Process = useCrudSchemas(reactive<CrudSchema[]>([
|
|
|
|
{
|
|
|
|
label: '代码',
|
|
|
|
field: 'code',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
isForm: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '名称',
|
|
|
|
field: 'name',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
isForm: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '操作',
|
|
|
|
field: 'action',
|
|
|
|
isDetail: false,
|
|
|
|
isForm: false ,
|
|
|
|
table: {
|
|
|
|
width: 150,
|
|
|
|
fixed: 'right'
|
|
|
|
},
|
|
|
|
isTableForm:true,
|
|
|
|
}
|
|
|
|
]))
|
|
|
|
export const Opersteps = useCrudSchemas(reactive<CrudSchema[]>([
|
|
|
|
{
|
|
|
|
label: '代码',
|
|
|
|
field: 'code',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
isForm: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '名称',
|
|
|
|
field: 'name',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
isForm: false
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: '操作',
|
|
|
|
field: 'action',
|
|
|
|
isDetail: false,
|
|
|
|
isForm: false ,
|
|
|
|
table: {
|
|
|
|
width: 150,
|
|
|
|
fixed: 'right'
|
|
|
|
},
|
|
|
|
isTableForm:true,
|
|
|
|
}
|
|
|
|
]))
|
|
|
|
export const popCheckList = useCrudSchemas(reactive<CrudSchema[]>([
|
|
|
|
{
|
|
|
|
label: '多选列表',
|
|
|
|
field: 'popCheckList',
|
|
|
|
sort: 'custom',
|
|
|
|
isSearch: true,
|
|
|
|
isForm: false,
|
|
|
|
form: {
|
|
|
|
// labelMessage: '信息提示说明!!!',
|
|
|
|
componentProps: {
|
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
|
|
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '仓库信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{
|
|
|
|
key: 'available',
|
|
|
|
value: 'TRUE',
|
|
|
|
isMainValue: false
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]))
|