Browse Source

YT-514供应商创建发货申请时,发货数量应该根据订单行进行校验,不是根据物料代码进行校验

intex_online20241111
zhang_li 1 month ago
parent
commit
886f8742ea
  1. 13
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

13
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverBasicForm.vue

@ -363,7 +363,10 @@ const submitForm = async (formType, submitData) => {
if(item['allowOverShipment']!='TRUE'){ if(item['allowOverShipment']!='TRUE'){
let qtyDefault = item['planQty'] - item['shippedQty'] let qtyDefault = item['planQty'] - item['shippedQty']
if(item['qty']>qtyDefault){ if(item['qty']>qtyDefault){
itemCodes.push(item['itemCode']) itemCodes.push({
itemCode:item['itemCode'],
poLine:item['poLine']
})
} }
if(!itemCodeSum.includes(item['itemCode'])){ if(!itemCodeSum.includes(item['itemCode'])){
@ -379,7 +382,11 @@ const submitForm = async (formType, submitData) => {
} }
}) })
if(itemCodes.length>0){ if(itemCodes.length>0){
message.error(`${itemCodes.join(',')}${t('ts.不允许超发')}`) let str = ''
itemCodes.forEach(cur => {
str += `【物料号${cur.itemCode}-订单行${cur.poLine}`
})
message.error(`${str}${t('ts.不允许超发')}`)
return return
} }
if (itemCodeSum.length > 0) { if (itemCodeSum.length > 0) {
@ -436,7 +443,7 @@ const inputNumberChange = (field, val,row, index) => {
if(row['allowOverShipment']!='TRUE'){ if(row['allowOverShipment']!='TRUE'){
let qtyDefault = row['planQty'] - row['shippedQty'] let qtyDefault = row['planQty'] - row['shippedQty']
if (row['qty'] > qtyDefault) { if (row['qty'] > qtyDefault) {
message.error(`${row['itemCode']}${t('ts.不允许超发')}`) message.error(`【物料号${row['itemCode']}-订单行${row['poLine']}${t('ts.不允许超发')}`)
} }
let planQty = row['planQty'] // let planQty = row['planQty'] //
let sumQty = tableData.value.filter(item1=>item1['itemCode']==row['itemCode'] && item1['poLine']==row['poLine'] ).reduce((prev, item1) => prev + item1['qty'],0) let sumQty = tableData.value.filter(item1=>item1['itemCode']==row['itemCode'] && item1['poLine']==row['poLine'] ).reduce((prev, item1) => prev + item1['qty'],0)

Loading…
Cancel
Save