This commit is contained in:
bb_pan 2025-06-21 20:36:58 +08:00
parent 9b05cc53d7
commit fcac34e38a
3 changed files with 60 additions and 25 deletions

View File

@ -147,6 +147,7 @@ import ScanQrCode from '@/pages/devicesSearch/ScanQrCode.vue'
import ScanQrCodeBox from '@/pages/devicesSearch/ScanQrCodeBox.vue'
// const query = defineProps() //
// const queryParams = JSON.parse(query.queryParams)
const loading = ref(false)
const scanQrCodeRef = ref(null)
const scanQrCodeRefBox = ref(null)
const queryParams = ref({})
@ -262,6 +263,15 @@ const onHandleOutbound = async () => {
})
return
}
if (loading.value) {
uni.showToast({
title: '请勿重复提交!',
icon: 'none',
})
return
}
uni.showLoading()
loading.value = true
//
const { typeId, parentId, publishTask } = queryParams.value
//
@ -281,17 +291,24 @@ const onHandleOutbound = async () => {
}
})
console.log('mmmmmmmmmmmmmmmm', paramsList)
const res = await setOutboundNumAPI({ leaseOutDetailsList: paramsList })
if (res.code === 200) {
uni.showToast({
title: '出库成功!',
icon: 'none',
})
getCodeDetailData(
queryParams.value.id,
queryParams.value.publishTask,
queryParams.value.typeId,
) //
try {
const res = await setOutboundNumAPI({ leaseOutDetailsList: paramsList })
loading.value = false
uni.hideLoading()
if (res.code === 200) {
uni.showToast({
title: '出库成功!',
icon: 'none',
})
getCodeDetailData(
queryParams.value.id,
queryParams.value.publishTask,
queryParams.value.typeId,
) //
}
} catch (error) {
console.log('🚀 ~ onHandleOutbound ~ error:', error)
loading.value = false
}
}

View File

@ -132,7 +132,7 @@ onLoad((options) => {
}
// leaseApplyInfo.value.publishTask = options.publishTask
console.log('🚀 ~ onLoad ~ options:', options)
getOutboundDetailsData()
// getOutboundDetailsData()
})
onShow(() => {
getOutboundDetailsData()

View File

@ -48,6 +48,7 @@
import { computed, ref } from 'vue'
import { setOutboundNumAPI } from '@/services/picking/outbound.js'
import { onLoad } from '@dcloudio/uni-app'
const loading = ref(false)
const formData = ref({})
const outboundNum = ref(0)
// const query = defineProps() //
@ -108,6 +109,16 @@ const onHandleOutbound = async () => {
return
}
if (loading.value) {
uni.showToast({
title: '请勿重复提交!',
icon: 'none',
})
return
}
uni.showLoading()
loading.value = true
//
const { maTypeName, typeName, preNum, alNum, id, typeId, parentId, manageType } =
queryParams.value
@ -126,21 +137,28 @@ const onHandleOutbound = async () => {
publishTask:queryParams.value.publishTask,
}
console.log('出库参数', params)
const res = await setOutboundNumAPI({ leaseOutDetailsList: [params] })
console.log('出库结果', res)
try {
const res = await setOutboundNumAPI({ leaseOutDetailsList: [params] })
console.log('出库结果', res)
loading.value = false
uni.hideLoading()
if (res.code === 200) {
uni.showToast({
title: '出库成功!',
icon: 'none',
})
setTimeout(() => {
//
uni.navigateBack({
delta: 1,
success() {},
if (res.code === 200) {
uni.showToast({
title: '出库成功!',
icon: 'none',
})
}, 500)
setTimeout(() => {
//
uni.navigateBack({
delta: 1,
success() {},
})
}, 500)
}
} catch (error) {
console.log('🚀 ~ onHandleOutbound ~ error:', error)
loading.value = false
}
}
</script>