Commit 080263e6 by wusiyi

fix: bug

parent 1ca9e0f5
...@@ -605,19 +605,18 @@ const matchProductByCode = (product: ProductList, code: string) => { ...@@ -605,19 +605,18 @@ const matchProductByCode = (product: ProductList, code: string) => {
// 单件商品 不进播种墙 // 单件商品 不进播种墙
const handleUsSingleItemPacking = (data?: OrderData | null) => { const handleUsSingleItemPacking = (data?: OrderData | null) => {
if (!data) return podOrderDetailsData.value = data as OrderData
podOrderDetailsData.value = data
podOrderDetailsData.value.fromUser = userStore.user?.id podOrderDetailsData.value.fromUser = userStore.user?.id
const list = podOrderDetailsData.value.productList || [] if (podOrderDetailsData.value.productList?.length) {
const list = podOrderDetailsData.value.productList
for (const product of list) { for (const product of list) {
if (product.count === product.purchaseNumber) { if (product.count === product.purchaseNumber) {
product.power = true product.power = true
print(data, false, () => { print(data as OrderData, false, () => {
renderLock = false renderLock = false
}) })
} }
} }
if (list.length) {
nextTick(() => { nextTick(() => {
tableRef.value?.setCurrentRow(list[0]) tableRef.value?.setCurrentRow(list[0])
}) })
...@@ -916,9 +915,11 @@ const getPackingData = async (code: string) => { ...@@ -916,9 +915,11 @@ const getPackingData = async (code: string) => {
boxIndex.value = box boxIndex.value = box
} }
} else if (props.type === 'us' || props.type === 'new') { } else if (props.type === 'us' || props.type === 'new') {
boxIndex.value = res.data?.box as number const { box, data } = res.data
if (boxIndex.value === 0) {
handleUsSingleItemPacking(res.data?.data) boxIndex.value = box as number
if (boxIndex.value == 0) {
handleUsSingleItemPacking(data)
} }
} }
} catch (error) { } 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