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.
499 lines
13 KiB
499 lines
13 KiB
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
|
|
import * as ItembasicApi from '@/api/wms/itembasic'
|
|
import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data'
|
|
import * as ItempackagingApi from '@/api/wms/itempackage'
|
|
import { Itempackaging } from '@/views/wms/basicDataManage/itemManage/itempackage/itempackage.data'
|
|
import * as LocationApi from '@/api/wms/location'
|
|
import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data'
|
|
import * as PackageunitApi from '@/api/wms/packageunit'
|
|
import { Packageunit } from '@/views/wms/basicDataManage/itemManage/packageunit/packageunit.data'
|
|
|
|
import * as WarehouseApi from '@/api/wms/warehouse'
|
|
import { Warehouse } from '@/views/wms/basicDataManage/factoryModeling/warehouse/warehouse.data'
|
|
|
|
import * as WorkshopApi from '@/api/wms/workshop'
|
|
import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data'
|
|
|
|
import * as ProductionlineApi from '@/api/wms/productionline'
|
|
import { Productionline } from '@/views/wms/basicDataManage/factoryModeling/productionline/productionline.data'
|
|
|
|
import * as WorkStationApi from '@/api/wms/workstation'
|
|
import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data'
|
|
|
|
import * as confgiApi from '@/api/infra/config'
|
|
|
|
const confgiDataOne = await confgiApi.queryByKey("WorkStation-IN")
|
|
|
|
// 表单校验
|
|
export const CallmaterialsRules = reactive({
|
|
itemCode: [required],
|
|
packUnit: [required],
|
|
qty: [required],
|
|
productionLineCode: [required],
|
|
callmaterialQtySum: [required],
|
|
warehouseCode: [required],
|
|
workshopCode: [required],
|
|
workStationCode: [required],
|
|
uom: [required],
|
|
callmaterialQty: [required],
|
|
project: [{ max: 50, message: '最多50字符', trigger: 'blur'}]
|
|
})
|
|
|
|
export const Callmaterials = useCrudSchemas(reactive<CrudSchema[]>([
|
|
{
|
|
label: '物料代码',
|
|
field: 'itemCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150,
|
|
fixed: 'left'
|
|
},
|
|
isSearch: true,
|
|
form: {
|
|
// labelMessage: '信息提示说明!!!',
|
|
componentProps: {
|
|
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: 'packUnit',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
// labelMessage: '信息提示说明!!!',
|
|
componentProps: {
|
|
enterSearch:true,
|
|
isSearch:true,
|
|
isSearchList: true, // 开启查询弹窗
|
|
searchListPlaceholder: '请选择包装规格', // 输入框占位文本
|
|
searchField: 'itemCode', // 查询弹窗赋值字段
|
|
searchTitle: '物料包装信息', // 查询弹窗标题
|
|
searchAllSchemas: Itempackaging.allSchemas, // 查询弹窗所需类
|
|
searchPage: ItempackagingApi.getItempackagingPage, // 查询弹窗所需分页方法
|
|
searchCondition: [{
|
|
key: 'available',
|
|
value: 'TRUE',
|
|
isMainValue: false
|
|
},{
|
|
key: 'itemCode',
|
|
value: 'itemCode',
|
|
message: '请填写物料代码!',
|
|
isMainValue: true
|
|
}],
|
|
verificationParams: [{
|
|
key: 'packUnit',
|
|
action: '==',
|
|
value: '',
|
|
isMainValue: false,
|
|
isSearch: true,
|
|
isFormModel: true,
|
|
}], // 失去焦点校验参数
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '叫料包装数量',
|
|
field: 'callmaterialQty',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 120
|
|
},
|
|
form: {
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
disabled: true,
|
|
style: {width:'100%'},
|
|
min: 0,
|
|
precision: 6
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '包装数量',
|
|
field: 'qty',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 120
|
|
},
|
|
form: {
|
|
labelMessage: '指包装个数',
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
style: {width:'100%'},
|
|
min: 0,
|
|
precision: 6
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '叫料总数量',
|
|
field: 'callmaterialQtySum',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 120
|
|
},
|
|
form: {
|
|
component: 'InputNumber',
|
|
componentProps: {
|
|
disabled: true,
|
|
style: {width:'100%'},
|
|
min: 0,
|
|
precision: 6
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '计量单位', // 发料申请 与当前物料计量单位做匹配 : 原PACK_UNIT 修改:UOM
|
|
field: 'uom',
|
|
dictType: DICT_TYPE.UOM,
|
|
dictClass: 'string',
|
|
isTable: true,
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
tableForm: {
|
|
disabled: true,
|
|
type: 'Select'
|
|
},
|
|
form: {
|
|
componentProps: {
|
|
disabled: true
|
|
}
|
|
}
|
|
},
|
|
// {
|
|
// label: '批次',
|
|
// field: 'batch',
|
|
// sort: 'custom',
|
|
// isSearch: true,
|
|
// table: {
|
|
// width: 120
|
|
// }
|
|
// },
|
|
{
|
|
label: '仓库代码',
|
|
field: 'warehouseCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isSearch: true,
|
|
form: {
|
|
// labelMessage: '信息提示说明!!!',
|
|
componentProps: {
|
|
enterSearch: true,
|
|
isSearchList: true, // 开启查询弹窗
|
|
searchListPlaceholder: '请选择仓库代码', // 输入框占位文本
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
searchTitle: '仓库信息', // 查询弹窗标题
|
|
searchAllSchemas: Warehouse.allSchemas, // 查询弹窗所需类
|
|
searchPage: WarehouseApi.getWarehousePage, // 查询弹窗所需分页方法
|
|
searchCondition: [{
|
|
key: 'available',
|
|
value: 'TRUE',
|
|
isMainValue: false
|
|
}],
|
|
verificationParams: [{
|
|
key: 'code',
|
|
action: '==',
|
|
value: '',
|
|
isMainValue: false,
|
|
isSearch: true,
|
|
isFormModel: true,
|
|
}], // 失去焦点校验参数
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '车间',
|
|
field: 'workshopCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
// labelMessage: '信息提示说明!!!',
|
|
componentProps: {
|
|
enterSearch: true,
|
|
isSearchList: true, // 开启查询弹窗
|
|
searchListPlaceholder: '请选择车间代码', // 输入框占位文本
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
searchTitle: '车间信息', // 查询弹窗标题
|
|
searchAllSchemas: Workshop.allSchemas, // 查询弹窗所需类
|
|
searchPage: WorkshopApi.getWorkshopPage, // 查询弹窗所需分页方法
|
|
verificationParams: [{
|
|
key: 'code',
|
|
action: '==',
|
|
value: '',
|
|
isMainValue: false,
|
|
isSearch: true,
|
|
isFormModel: true,
|
|
}], // 失去焦点校验参数
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '生产线',
|
|
field: 'productionLineCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
// labelMessage: '',
|
|
componentProps: {
|
|
enterSearch: true,
|
|
isSearchList: true, // 开启查询弹窗
|
|
searchListPlaceholder: '请选择生产线', // 输入框占位文本
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
searchTitle: '生产线信息', // 查询弹窗标题
|
|
searchAllSchemas: Productionline.allSchemas, // 查询弹窗所需类
|
|
searchPage: ProductionlineApi.getProductionlinePage, // 查询弹窗所需分页方法,
|
|
verificationParams: [{
|
|
key: 'code',
|
|
action: '==',
|
|
value: '',
|
|
isMainValue: false,
|
|
isSearch: true,
|
|
isFormModel: true,
|
|
}], // 失去焦点校验参数
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '工位',
|
|
field: 'workStationCode',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
form: {
|
|
// labelMessage: '信息提示说明!!!',
|
|
componentProps: {
|
|
enterSearch: true,
|
|
isSearchList: true, // 开启查询弹窗
|
|
searchListPlaceholder: '请选择工位', // 输入框占位文本
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
searchTitle: '工位信息', // 查询弹窗标题
|
|
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
|
|
searchPage: WorkStationApi.getWorkstationPage, // 查询弹窗所需分页方法
|
|
searchCondition: [{
|
|
key:'productionLineCode',
|
|
value:'productionLineCode',
|
|
message: '请填写生产线代码!',
|
|
isMainValue: true
|
|
},{
|
|
key:'workshopCode',
|
|
value:'workshopCode',
|
|
message: '请填写车间代码!',
|
|
isMainValue: true
|
|
},{
|
|
key:'available',
|
|
value:'TRUE',
|
|
isMainValue: false
|
|
}],
|
|
verificationParams: [{
|
|
key: 'code',
|
|
action: '==',
|
|
value: '',
|
|
isMainValue: false,
|
|
isSearch: true,
|
|
isFormModel: true,
|
|
}], // 失去焦点校验参数
|
|
}
|
|
},
|
|
tableForm:{
|
|
isInpuFocusShow: true,
|
|
searchListPlaceholder: '请选择工位', // 输入框占位文本
|
|
searchField: 'code', // 查询弹窗赋值字段
|
|
searchTitle: '工位信息', // 查询弹窗标题
|
|
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
|
|
searchPage: WorkStationApi.getWorkstationPage, // 查询弹窗所需分页方法
|
|
searchCondition: [{
|
|
key:'productionLineCode',
|
|
value:'productionLineCode',
|
|
message: '请填写生产线代码!',
|
|
isMainValue: true
|
|
},{
|
|
key:'workshopCode',
|
|
value:'workshopCode',
|
|
message: '请填写车间代码!',
|
|
isMainValue: true
|
|
},{
|
|
key:'available',
|
|
value:'TRUE',
|
|
isMainValue: false
|
|
}]
|
|
},
|
|
},
|
|
{
|
|
label: '项目',
|
|
field: 'project',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 100
|
|
} ,
|
|
form: {
|
|
componentProps:{
|
|
maxlength: 64,
|
|
type:'textarea',
|
|
showWordLimit:true
|
|
}
|
|
},
|
|
},
|
|
{
|
|
label: '库位',
|
|
field: 'location',
|
|
sort: 'custom',
|
|
table: {
|
|
width: 150
|
|
},
|
|
isForm:false,
|
|
// form: {
|
|
// // labelMessage: '信息提示说明!!!',
|
|
// componentProps: {
|
|
// isSearchList: true, // 开启查询弹窗
|
|
// searchListPlaceholder: '请选择库位代码', // 输入框占位文本
|
|
// searchField: 'code', // 查询弹窗赋值字段
|
|
// searchTitle: '库位信息', // 查询弹窗标题
|
|
// searchAllSchemas: Location.allSchemas, // 查询弹窗所需类
|
|
// searchPage: WorkstationApi.selectAreaTypeToLocation, // 查询弹窗所需分页方法
|
|
// searchCondition: [{
|
|
// key:'workStationCode',
|
|
// value:'workStationCode',
|
|
// message: '请填写工位代码!',
|
|
// isMainValue: true
|
|
// },{
|
|
// key: 'available',
|
|
// value: 'TRUE',
|
|
// isMainValue: false
|
|
// },
|
|
// {
|
|
// key: 'areaType',
|
|
// value: confgiDataOne.areaType,
|
|
// isMainValue: false
|
|
// }]
|
|
// }
|
|
// },
|
|
isSearch: true
|
|
},
|
|
{
|
|
label: '是否确认接收',
|
|
field: 'isRecive',
|
|
sort: 'custom',
|
|
dictType: DICT_TYPE.TRUE_FALSE,
|
|
dictClass: 'string',
|
|
isTable: true,
|
|
table: {
|
|
width: 150
|
|
},
|
|
isForm:false
|
|
// form: {
|
|
// component: 'Switch',
|
|
// value: 'FALSE',
|
|
// componentProps: {
|
|
// inactiveValue: 'FALSE',
|
|
// activeValue: 'TRUE'
|
|
// }
|
|
// }
|
|
},
|
|
{
|
|
label: '创建时间',
|
|
field: 'createTime',
|
|
isForm: false,
|
|
table: {
|
|
width: 180
|
|
},
|
|
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: 'creator',
|
|
table: {
|
|
width: 130
|
|
},
|
|
isForm: false,
|
|
isTable: true
|
|
},
|
|
{
|
|
label: '最后更新时间',
|
|
field: 'updateTime',
|
|
sort: 'custom',
|
|
isDetail: true,
|
|
isForm: false,
|
|
isTable: false,
|
|
formatter: dateFormatter,
|
|
detail: {
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss'
|
|
},
|
|
table: {
|
|
width: 180
|
|
},
|
|
form: {
|
|
component: 'DatePicker',
|
|
componentProps: {
|
|
style: {width:'100%'},
|
|
type: 'datetime',
|
|
dateFormat: 'YYYY-MM-DD HH:mm:ss',
|
|
valueFormat: 'x',
|
|
}
|
|
}
|
|
},
|
|
{
|
|
label: '最后更新者',
|
|
field: 'updater',
|
|
isDetail: true,
|
|
isForm: false,
|
|
isTable: false,
|
|
table: {
|
|
width: 150
|
|
}
|
|
},
|
|
{
|
|
label: '操作',
|
|
field: 'action',
|
|
isForm: false,
|
|
table: {
|
|
width: 180,
|
|
fixed: 'right'
|
|
}
|
|
}
|
|
]))
|
|
|