修试入库驳回-增加驳回数量限制

This commit is contained in:
bb_pan 2025-08-26 09:33:36 +08:00
parent 48b00039a3
commit d7971a3b1c
1 changed files with 30 additions and 19 deletions

View File

@ -206,7 +206,7 @@ const onClick=async (e,item)=> {
} }
}else{// }else{//
inputItem.value=item; inputItem.value=item;
rejectBoundNum.value=0 rejectBoundNum.value = item.pendingInputNum
rejectReason.value="" rejectReason.value=""
rejectNumPopup.value.open('center'); rejectNumPopup.value.open('center');
} }
@ -238,9 +238,15 @@ const closePopup = () => {
const rejectNumInBound = async () => { const rejectNumInBound = async () => {
console.log(rejectBoundNum.value) console.log(rejectBoundNum.value)
try {
uni.showLoading({ title: '操作中...', mask: true })
if(rejectBoundNum.value==0){ if(rejectBoundNum.value==0){
uni.showToast({ title: '入库驳回数量需大于0',icon: 'none'}) uni.showToast({ title: '入库驳回数量需大于0',icon: 'none'})
}else{ }else{
if (rejectBoundNum.value > inputItem.value.pendingInputNum) {
uni.showToast({ title: '驳回数量不能大于待入库数量!',icon: 'none'})
return
}
let param = { let param = {
taskId:taskInfo.value.taskId, taskId:taskInfo.value.taskId,
typeId:inputItem.value.typeId, typeId:inputItem.value.typeId,
@ -249,12 +255,17 @@ const rejectNumInBound = async () => {
pendingInputNum:inputItem.value.pendingInputNum, pendingInputNum:inputItem.value.pendingInputNum,
rejectNum:rejectBoundNum.value rejectNum:rejectBoundNum.value
} }
const res = await rejectWarehouseApi(param) // const res = await rejectWarehouseApi(param)
if(res.code==200){ // if(res.code==200){
uni.showToast({ title: '驳回成功!',icon: 'none'}) // uni.showToast({ title: '',icon: 'none'})
getDetailsData() // getDetailsData()
rejectNumPopup.value.close(); // rejectNumPopup.value.close();
// }
} }
} catch (error) {
console.log('🚀 ~ rejectNumInBound ~ error:', error)
} finally {
uni.hideLoading()
} }
} }
const closePopup2 = () => { const closePopup2 = () => {