出库管理 增加出库数量验证

出库管理 增加出库数量验证
pull/3/head
siontion 9 months ago
parent c79f76a06b
commit db5a9a8bdd

@ -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
})

Loading…
Cancel
Save