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