修饰入库

This commit is contained in:
bb_pan 2025-09-11 17:17:32 +08:00
parent ed10e4a8ab
commit e305af8665
1 changed files with 30 additions and 16 deletions

View File

@ -149,6 +149,7 @@ const rejectBoundNum = ref(0)
const rejectReason = ref('')
const countdown = ref(0)
const timer = ref(null)
const isSubmit = ref(false)
//
const getDetailsData = async () => {
@ -233,23 +234,33 @@ const onClick=async (e,item)=> {
const confirmNumInBound = async () => {
console.log(inBoundNum.value)
if (countdown.value > 0) return
console.log(inputItem.value.inputCode)
console.log(inputItem.value.inputCode)
if(inBoundNum.value==0){
uni.showToast({ title: '入库数量需大于0',icon: 'none'})
uni.showToast({ title: '入库数量需大于0',icon: 'none'})
}else{
let param = {
taskId:taskInfo.value.taskId,
typeId:inputItem.value.typeId,
pendingInputNum:inputItem.value.pendingInputNum,
inputNum:inBoundNum.value,
inputCode:inputItem.value.inputCode
}
const res = await repairInputWarehouseApi(param)
if(res.code==200){
uni.showToast({ title: '入库成功!',icon: 'none'})
getDetailsData()
inBoundNumPopup.value.close();
}
inBoundNumPopup.value.close()
try {
if (isSubmit.value) return
isSubmit.value = true
uni.showLoading({ title: '操作中...', mask: true })
let param = {
taskId:taskInfo.value.taskId,
typeId:inputItem.value.typeId,
pendingInputNum:inputItem.value.pendingInputNum,
inputNum:inBoundNum.value,
inputCode:inputItem.value.inputCode
}
const res = await repairInputWarehouseApi(param)
if(res.code==200){
uni.showToast({ title: '入库成功!',icon: 'none'})
getDetailsData()
}
} catch (error) {
console.log('🚀 ~ confirmNumInBound ~ error:', error)
} finally {
uni.hideLoading()
isSubmit.value = false
}
}
}
const closePopup = () => {
@ -260,6 +271,8 @@ const rejectNumInBound = async () => {
console.log(rejectBoundNum.value)
if (countdown.value > 0) return
try {
if (isSubmit.value) return
isSubmit.value = true
uni.showLoading({ title: '操作中...', mask: true })
if(rejectBoundNum.value==0){
uni.showToast({ title: '入库驳回数量需大于0',icon: 'none'})
@ -268,6 +281,7 @@ const rejectNumInBound = async () => {
uni.showToast({ title: '驳回数量不能大于待入库数量!',icon: 'none'})
return
}
rejectNumPopup.value.close()
let param = {
taskId:taskInfo.value.taskId,
typeId:inputItem.value.typeId,
@ -280,13 +294,13 @@ const rejectNumInBound = async () => {
if(res.code==200){
uni.showToast({ title: '驳回成功!',icon: 'none'})
getDetailsData()
rejectNumPopup.value.close();
}
}
} catch (error) {
console.log('🚀 ~ rejectNumInBound ~ error:', error)
} finally {
uni.hideLoading()
isSubmit.value = false
}
}
const closePopup2 = () => {