This commit is contained in:
		
							parent
							
								
									9b05cc53d7
								
							
						
					
					
						commit
						fcac34e38a
					
				| 
						 | 
					@ -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,17 +291,24 @@ const onHandleOutbound = async () => {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
    console.log('mmmmmmmmmmmmmmmm', paramsList)
 | 
					    console.log('mmmmmmmmmmmmmmmm', paramsList)
 | 
				
			||||||
    const res = await setOutboundNumAPI({ leaseOutDetailsList: paramsList })
 | 
					    try {
 | 
				
			||||||
    if (res.code === 200) {
 | 
					        const res = await setOutboundNumAPI({ leaseOutDetailsList: paramsList })
 | 
				
			||||||
        uni.showToast({
 | 
					        loading.value = false
 | 
				
			||||||
            title: '出库成功!',
 | 
					        uni.hideLoading()
 | 
				
			||||||
            icon: 'none',
 | 
					        if (res.code === 200) {
 | 
				
			||||||
        })
 | 
					            uni.showToast({
 | 
				
			||||||
        getCodeDetailData(
 | 
					                title: '出库成功!',
 | 
				
			||||||
            queryParams.value.id,
 | 
					                icon: 'none',
 | 
				
			||||||
            queryParams.value.publishTask,
 | 
					            })
 | 
				
			||||||
            queryParams.value.typeId,
 | 
					            getCodeDetailData(
 | 
				
			||||||
        ) //获取详情
 | 
					                queryParams.value.id,
 | 
				
			||||||
 | 
					                queryParams.value.publishTask,
 | 
				
			||||||
 | 
					                queryParams.value.typeId,
 | 
				
			||||||
 | 
					            ) //获取详情
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    } catch (error) {
 | 
				
			||||||
 | 
					        console.log('🚀 ~ onHandleOutbound ~ error:', error)
 | 
				
			||||||
 | 
					        loading.value = false
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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,21 +137,28 @@ const onHandleOutbound = async () => {
 | 
				
			||||||
        publishTask:queryParams.value.publishTask,
 | 
					        publishTask:queryParams.value.publishTask,
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    console.log('出库参数', params)
 | 
					    console.log('出库参数', params)
 | 
				
			||||||
    const res = await setOutboundNumAPI({ leaseOutDetailsList: [params] })
 | 
					    try {
 | 
				
			||||||
    console.log('出库结果', res)
 | 
					        const res = await setOutboundNumAPI({ leaseOutDetailsList: [params] })
 | 
				
			||||||
 | 
					        console.log('出库结果', res)
 | 
				
			||||||
 | 
					        loading.value = false
 | 
				
			||||||
 | 
					        uni.hideLoading()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (res.code === 200) {
 | 
					        if (res.code === 200) {
 | 
				
			||||||
        uni.showToast({
 | 
					            uni.showToast({
 | 
				
			||||||
            title: '出库成功!',
 | 
					                title: '出库成功!',
 | 
				
			||||||
            icon: 'none',
 | 
					                icon: 'none',
 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
        setTimeout(() => {
 | 
					 | 
				
			||||||
            // 返回上一个页面
 | 
					 | 
				
			||||||
            uni.navigateBack({
 | 
					 | 
				
			||||||
                delta: 1,
 | 
					 | 
				
			||||||
                success() {},
 | 
					 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
        }, 500)
 | 
					            setTimeout(() => {
 | 
				
			||||||
 | 
					                // 返回上一个页面
 | 
				
			||||||
 | 
					                uni.navigateBack({
 | 
				
			||||||
 | 
					                    delta: 1,
 | 
				
			||||||
 | 
					                    success() {},
 | 
				
			||||||
 | 
					                })
 | 
				
			||||||
 | 
					            }, 500)
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    } catch (error) {
 | 
				
			||||||
 | 
					        console.log('🚀 ~ onHandleOutbound ~ error:', error)
 | 
				
			||||||
 | 
					        loading.value = false
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue