Browse Source

HL-6146制品回收申请新增时,把工位代码放到主数据中,并且把生产线代码设置为非必填项,同时在主数据中增加主数据备注字段。筛选工位代码时,如果选择了生产线代码,则根据生产线代码筛选工位;如果没选生产线代码,则根据车间筛选工位

hella_online_20241011
王宇飞 5 months ago
parent
commit
fe1d5a7205
  1. 240
      src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts

240
src/views/wms/productionManage/productredress/productredressRequestMain/productredressRequestMain.data.ts

@ -27,8 +27,8 @@ export const ProductredressRequestMainRules = reactive({
workshopCode: [
{ required: true, message: '请选择车间代码', trigger: 'change' }
],
productionLineCode: [
{ required: true, message: '请选择生产线代码', trigger: 'change' }
workStationCode: [
{ required: true, message: '请选择工位代码', trigger: 'change' }
],
})
@ -169,6 +169,84 @@ export const ProductredressRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
}
}
},
{
label: '工位代码',
field: 'workStationCode',
sort: 'custom',
table: {
width: 150
},
isTable: true,
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'productionLineCode',
value: 'productionLineCode',
message: '请填写生产线代码!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
form: {
// labelMessage: '信息提示说明!!!',
componentProps: {
enterSearch: true,
isSearchList: true, // 开启查询弹窗
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'workshopCode',
value: 'workshopCode',
message: '请填写车间代码!',
isMainValue: true
},
{
key: 'productionLineCode',
value: 'productionLineCode',
message: '请填写生产线代码!',
isMainValue: true,
isOptional:true, // isMainValue=true情况,添加参数可选可空的判断
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
// {
// label: '车间代码',
// field: 'workshopCode',
@ -417,14 +495,20 @@ export const ProductredressRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 180,
fixed: 'right'
}
}
},
{
label: '备注',
field: 'remark',
sort: 'custom',
table: {
width: 150
}
},
]))
// 表单校验
export const ProductredressRequestDetailRules = reactive({
workStationCode: [
{ required: true, message: '请选择工位代码', trigger: 'change' }
],
})
export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>([
@ -503,6 +587,8 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
isFormModel:true, // filters中添加筛选的数据--取于formModel
required:true, // 前置添加必有,和isFormModel结合使用
message: '请选择生产线代码!', // 前置添加没填的提示语
isOptional:true, // isMainValue=true情况,添加参数可选可空的判断
}
]
@ -573,77 +659,77 @@ export const ProductredressRequestDetail = useCrudSchemas(reactive<CrudSchema[]>
}
}
},
{
label: '工位代码',
field: 'workStationCode',
sort: 'custom',
table: {
width: 150
},
isTable: true,
tableForm: {
isInpuFocusShow: true,
searchListPlaceholder: '请选择工位代码', // 输入框占位文本
searchField: 'code', // 查询弹窗赋值字段
searchTitle: '工位信息', // 查询弹窗标题
searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
searchCondition: [
{
key: 'productionLineCode',
value: 'productionLineCode',
message: '请填写生产线代码!',
isMainValue: true
},
{
key: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
},
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: 'available',
value: 'TRUE',
isMainValue: false
}
],
verificationParams: [{
key: 'code',
action: '==',
value: '',
isMainValue: false,
isSearch: true,
isFormModel: true,
}], // 失去焦点校验参数
}
}
},
// {
// label: '工位代码',
// field: 'workStationCode',
// sort: 'custom',
// table: {
// width: 150
// },
// isTable: true,
// tableForm: {
// isInpuFocusShow: true,
// searchListPlaceholder: '请选择工位代码', // 输入框占位文本
// searchField: 'code', // 查询弹窗赋值字段
// searchTitle: '工位信息', // 查询弹窗标题
// searchAllSchemas: Workstation.allSchemas, // 查询弹窗所需类
// searchPage: WorkstationApi.getWorkstationPage, // 查询弹窗所需分页方法
// searchCondition: [
// {
// key: 'productionLineCode',
// value: 'productionLineCode',
// message: '请填写生产线代码!',
// isMainValue: true
// },
// {
// key: 'available',
// value: 'TRUE',
// isMainValue: false
// }
// ],
// verificationParams: [{
// key: 'code',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true,
// }], // 失去焦点校验参数
// },
// 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: 'available',
// value: 'TRUE',
// isMainValue: false
// }
// ],
// verificationParams: [{
// key: 'code',
// action: '==',
// value: '',
// isMainValue: false,
// isSearch: true,
// isFormModel: true,
// }], // 失去焦点校验参数
// }
// }
// },
{
label: '包装号',
field: 'packingNumber',

Loading…
Cancel
Save