|
|
@ -182,7 +182,7 @@ else if( routeName.value == 'InventorymoveRequestMain'){ |
|
|
|
} |
|
|
|
console.log(99 , businessType.value) |
|
|
|
InventorymoveRequestMain.allSchemas.tableFormColumns.map(item =>{ |
|
|
|
if(item.field == 'fromWarehouseCode') { |
|
|
|
if(item.field == 'fromLocationCode') { |
|
|
|
if (fromInventoryStatus.value) { |
|
|
|
item.tableForm.searchCondition = [ |
|
|
|
{ |
|
|
@ -249,30 +249,16 @@ InventorymoveRequestMain.allSchemas.tableFormColumns.map(item =>{ |
|
|
|
} else { |
|
|
|
delete item.tableForm.searchCondition |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
// 修改 tableform 属性 |
|
|
|
InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { |
|
|
|
if(item.field == 'fromPackingNumber') { |
|
|
|
if (fromInventoryStatus.value) { |
|
|
|
}else if(item.field == "toLocationCode"){ |
|
|
|
if (toInventoryStatus.value) { |
|
|
|
item.tableForm.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'businessType', |
|
|
|
value: businessType.value , |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
item.form.componentProps.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'businessType', |
|
|
|
value: businessType.value, |
|
|
|
isMainValue: false |
|
|
|
} |
|
|
|
] |
|
|
|
} else if (fromInventoryStatus.value == null) { |
|
|
|
item.tableForm.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'businessType', |
|
|
|
value: businessType.value , |
|
|
|
},{ |
|
|
|
key: 'isIn', |
|
|
|
value: 'in', |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
item.form.componentProps.searchCondition = [ |
|
|
@ -280,21 +266,21 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { |
|
|
|
key: 'businessType', |
|
|
|
value: businessType.value, |
|
|
|
isMainValue: false |
|
|
|
},{ |
|
|
|
key: 'isIn', |
|
|
|
value: 'in', |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
} else { |
|
|
|
delete item.tableForm.searchCondition |
|
|
|
} |
|
|
|
} |
|
|
|
if(item.field == "toLocationCode"){ |
|
|
|
if (toInventoryStatus.value) { |
|
|
|
}} |
|
|
|
}) |
|
|
|
// 修改 tableform 属性 |
|
|
|
InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { |
|
|
|
if(item.field == 'fromPackingNumber') { |
|
|
|
if (fromInventoryStatus.value) { |
|
|
|
item.tableForm.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'businessType', |
|
|
|
value: businessType.value, |
|
|
|
isMainValue: false |
|
|
|
},{ |
|
|
|
key: 'isIn', |
|
|
|
value: 'in', |
|
|
|
value: businessType.value , |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
item.form.componentProps.searchCondition = [ |
|
|
@ -302,34 +288,70 @@ InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { |
|
|
|
key: 'businessType', |
|
|
|
value: businessType.value, |
|
|
|
isMainValue: false |
|
|
|
},{ |
|
|
|
key: 'isIn', |
|
|
|
value: 'in', |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
}else if (toInventoryStatus.value == null) { |
|
|
|
} |
|
|
|
] |
|
|
|
} else if (fromInventoryStatus.value == null) { |
|
|
|
item.tableForm.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'businessType', |
|
|
|
value: businessType.value , |
|
|
|
isMainValue: false |
|
|
|
},{ |
|
|
|
key: 'isIn', |
|
|
|
value: 'in', |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
item.form.componentProps.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'businessType', |
|
|
|
value: businessType.value, |
|
|
|
isMainValue: false |
|
|
|
},{ |
|
|
|
key: 'isIn', |
|
|
|
value: 'in', |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
} else { |
|
|
|
delete item.tableForm.searchCondition |
|
|
|
} |
|
|
|
} |
|
|
|
// if(item.field == "toLocationCode"){ |
|
|
|
// if (toInventoryStatus.value) { |
|
|
|
// item.tableForm.searchCondition = [ |
|
|
|
// { |
|
|
|
// key: 'businessType', |
|
|
|
// value: businessType.value, |
|
|
|
// isMainValue: false |
|
|
|
// },{ |
|
|
|
// key: 'isIn', |
|
|
|
// value: 'in', |
|
|
|
// isMainValue: false |
|
|
|
// }] |
|
|
|
// item.form.componentProps.searchCondition = [ |
|
|
|
// { |
|
|
|
// key: 'businessType', |
|
|
|
// value: businessType.value, |
|
|
|
// isMainValue: false |
|
|
|
// },{ |
|
|
|
// key: 'isIn', |
|
|
|
// value: 'in', |
|
|
|
// isMainValue: false |
|
|
|
// }] |
|
|
|
// }else if (toInventoryStatus.value == null) { |
|
|
|
// item.tableForm.searchCondition = [ |
|
|
|
// { |
|
|
|
// key: 'businessType', |
|
|
|
// value: businessType.value , |
|
|
|
// isMainValue: false |
|
|
|
// },{ |
|
|
|
// key: 'isIn', |
|
|
|
// value: 'in', |
|
|
|
// isMainValue: false |
|
|
|
// }] |
|
|
|
// item.form.componentProps.searchCondition = [ |
|
|
|
// { |
|
|
|
// key: 'businessType', |
|
|
|
// value: businessType.value, |
|
|
|
// isMainValue: false |
|
|
|
// },{ |
|
|
|
// key: 'isIn', |
|
|
|
// value: 'in', |
|
|
|
// isMainValue: false |
|
|
|
// }] |
|
|
|
// } |
|
|
|
// } |
|
|
|
}) |
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
@ -351,7 +373,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
newRow['itemCode'] = item['itemCode'] |
|
|
|
newRow['fromBatch'] = item['batch'] |
|
|
|
newRow['fromInventoryStatus'] = item['inventoryStatus'] |
|
|
|
newRow['fromLocationCode'] = item['locationCode'] |
|
|
|
// newRow['fromLocationCode'] = item['locationCode'] |
|
|
|
newRow['uom'] = item['uom'] |
|
|
|
newRow['qty'] = item['qty'] |
|
|
|
if(routeName.value == 'OktoholdRequestMain'){ |
|
|
@ -376,16 +398,17 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
} |
|
|
|
} else { |
|
|
|
const setV = {} |
|
|
|
if (formField == 'fromWarehouseCode') { |
|
|
|
if (formField == 'fromLocationCode') { |
|
|
|
setV['fromWarehouseCode'] = val[0]['warehouseCode']//从仓库 |
|
|
|
if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){ |
|
|
|
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.push({ |
|
|
|
key: 'warehouseCode', |
|
|
|
key: 'locationCode', |
|
|
|
value: val[0]["code"], |
|
|
|
isMainValue: false |
|
|
|
}) |
|
|
|
} else { |
|
|
|
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => { |
|
|
|
if (item.key == 'warehouseCode') { |
|
|
|
if (item.key == 'locationCode') { |
|
|
|
item.value = val[0]["code"] |
|
|
|
} |
|
|
|
}) |
|
|
@ -406,7 +429,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
|
setV['itemCode'] = val[0]['itemCode'] |
|
|
|
setV['fromBatch'] = val[0]['batch'] |
|
|
|
setV['fromInventoryStatus'] = val[0]['inventoryStatus'] |
|
|
|
setV['fromLocationCode'] = val[0]['locationCode'] |
|
|
|
// setV['fromLocationCode'] = val[0]['locationCode'] |
|
|
|
setV['uom'] = val[0]['uom'] |
|
|
|
if(routeName.value == 'OktoholdRequestMain'){ |
|
|
|
setV['toInventoryStatus'] = "HOLD" |
|
|
@ -698,16 +721,11 @@ const submitForm = async (formType, submitData) => { |
|
|
|
if(data.masterId){ |
|
|
|
data.id = data.masterId |
|
|
|
} |
|
|
|
let findLocation = tableData.value.find(item=>item.fromLocationCode&&item.toLocationCode&&item.fromLocationCode==item.toLocationCode) |
|
|
|
if(findLocation){ |
|
|
|
message.warning('从库位和到库位不能相同') |
|
|
|
return |
|
|
|
} |
|
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
|
let isExist = false |
|
|
|
tableData.value.forEach(item => { |
|
|
|
let rs = tableData.value.filter(filterItem => (filterItem.fromPackingNumber&&filterItem.fromPackingNumber == item.fromPackingNumber) ) |
|
|
|
console.log(rs,5666); |
|
|
|
let rs = tableData.value.filter(filterItem => (filterItem.fromPackingNumber == item.fromPackingNumber) ) |
|
|
|
console.log(rs,5666); |
|
|
|
if(rs.length > 1) isExist = true |
|
|
|
}) |
|
|
|
if (isExist) { |
|
|
@ -715,7 +733,6 @@ const submitForm = async (formType, submitData) => { |
|
|
|
isExist = false |
|
|
|
return message.warning('包装号重复') |
|
|
|
} |
|
|
|
flag.value = false |
|
|
|
data.subList.forEach(item => { |
|
|
|
console.log(556565,item); |
|
|
|
if(fromInventoryStatus.value){ |
|
|
|