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' import ScanQrCodeBox from '@/pages/devicesSearch/ScanQrCodeBox.vue'
// const query = defineProps() // // const query = defineProps() //
// const queryParams = JSON.parse(query.queryParams) // const queryParams = JSON.parse(query.queryParams)
const loading = ref(false)
const scanQrCodeRef = ref(null) const scanQrCodeRef = ref(null)
const scanQrCodeRefBox = ref(null) const scanQrCodeRefBox = ref(null)
const queryParams = ref({}) const queryParams = ref({})
@ -262,6 +263,15 @@ const onHandleOutbound = async () => {
}) })
return return
} }
if (loading.value) {
uni.showToast({
title: '请勿重复提交!',
icon: 'none',
})
return
}
uni.showLoading()
loading.value = true
// //
const { typeId, parentId, publishTask } = queryParams.value const { typeId, parentId, publishTask } = queryParams.value
// //
@ -281,7 +291,10 @@ const onHandleOutbound = async () => {
} }
}) })
console.log('mmmmmmmmmmmmmmmm', paramsList) console.log('mmmmmmmmmmmmmmmm', paramsList)
try {
const res = await setOutboundNumAPI({ leaseOutDetailsList: paramsList }) const res = await setOutboundNumAPI({ leaseOutDetailsList: paramsList })
loading.value = false
uni.hideLoading()
if (res.code === 200) { if (res.code === 200) {
uni.showToast({ uni.showToast({
title: '出库成功!', title: '出库成功!',
@ -293,6 +306,10 @@ const onHandleOutbound = async () => {
queryParams.value.typeId, 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 // leaseApplyInfo.value.publishTask = options.publishTask
console.log('🚀 ~ onLoad ~ options:', options) console.log('🚀 ~ onLoad ~ options:', options)
getOutboundDetailsData() // getOutboundDetailsData()
}) })
onShow(() => { onShow(() => {
getOutboundDetailsData() getOutboundDetailsData()

View File

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