Commit 080263e6 by wusiyi

fix: bug

parent 1ca9e0f5
......@@ -605,19 +605,18 @@ const matchProductByCode = (product: ProductList, code: string) => {
// 单件商品 不进播种墙
const handleUsSingleItemPacking = (data?: OrderData | null) => {
if (!data) return
podOrderDetailsData.value = data
podOrderDetailsData.value = data as OrderData
podOrderDetailsData.value.fromUser = userStore.user?.id
const list = podOrderDetailsData.value.productList || []
for (const product of list) {
if (product.count === product.purchaseNumber) {
product.power = true
print(data, false, () => {
renderLock = false
})
if (podOrderDetailsData.value.productList?.length) {
const list = podOrderDetailsData.value.productList
for (const product of list) {
if (product.count === product.purchaseNumber) {
product.power = true
print(data as OrderData, false, () => {
renderLock = false
})
}
}
}
if (list.length) {
nextTick(() => {
tableRef.value?.setCurrentRow(list[0])
})
......@@ -916,9 +915,11 @@ const getPackingData = async (code: string) => {
boxIndex.value = box
}
} else if (props.type === 'us' || props.type === 'new') {
boxIndex.value = res.data?.box as number
if (boxIndex.value === 0) {
handleUsSingleItemPacking(res.data?.data)
const { box, data } = res.data
boxIndex.value = box as number
if (boxIndex.value == 0) {
handleUsSingleItemPacking(data)
}
}
} catch (error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment