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