|
|
|
@ -615,6 +615,12 @@ const handleWh = async (wid) => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const handlePn = async (scope) =>{
|
|
|
|
|
var repeatItem = formData.value.matItemDOList.filter( mat => mat.matId==scope.row.matId && mat.pnId == scope.row.pnId)
|
|
|
|
|
if(repeatItem.length>1){
|
|
|
|
|
message.alertWarning('物料编码['+repeatItem[0].matCode+']出库库位存在多行数据,请修改,避免重复出库')
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (matLastData.value.find((item) => item.matId === scope.row.matId && item.whId== formData.value.whId && item.pnId == scope.row.pnId)) {
|
|
|
|
|
const matVo = matLastData.value.find((item) => item.matId === scope.row.matId && item.whId== formData.value.whId && item.pnId == scope.row.pnId)
|
|
|
|
|
// scope.row.matId = matVo.matId
|
|
|
|
@ -633,6 +639,7 @@ const handlePn = async (scope) =>{
|
|
|
|
|
} else{
|
|
|
|
|
scope.row.rgId = ''
|
|
|
|
|
scope.row.matRest = ''
|
|
|
|
|
message.alertWarning('当前库位无库存数量可出库')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -753,7 +760,7 @@ onMounted(async () => {
|
|
|
|
|
|
|
|
|
|
// 编辑时获取入库单据信息,包括基础信息、物料信息、附件信息
|
|
|
|
|
if (query.id) {
|
|
|
|
|
matList.value = matSimpList.value
|
|
|
|
|
matList.value = matSimpList.value.filter( mat => matLastData.value.filter( row => row.matId == mat.id).length>0)
|
|
|
|
|
|
|
|
|
|
// 获取库存信息
|
|
|
|
|
formData.value = await StorageApi.getStorage(query.id)
|
|
|
|
@ -787,6 +794,7 @@ onMounted(async () => {
|
|
|
|
|
item.matSpec = matSimpList.value.find((record) => record.id === item.matId)?.spec
|
|
|
|
|
item.matType = matSimpList.value.find((record) => record.id === item.matId)?.material_type
|
|
|
|
|
item.matUnit = matSimpList.value.find((record) => record.id === item.matId)?.unit
|
|
|
|
|
item.matRest = matLastData.value.find( row => row.matId == item.matId && row.pnId == item.pnId)?.matRest
|
|
|
|
|
item.pnlist = pnList.value.filter((pn) => pn.rg_id === item.rgId)
|
|
|
|
|
matCount = matCount + 1
|
|
|
|
|
})
|
|
|
|
|