Commit a9c42920 by wusiyi

fix: 修复扫码后图片展示有误bug

parent 666bd325
......@@ -532,7 +532,7 @@ const podBoxList = computed(() => {
})
const coverImage = ref<string>('')
watch(coverImage, (value) => {
console.log('🍉🍉🍉🍉🍉🍉🍉coverImage changed:', value)
console.log('🍡🍡🍡🍡🍡coverImage changed:', value)
})
let currentCode = ''
const tableRef = ref()
......@@ -737,7 +737,7 @@ const renderItemBox = (bool: boolean) => {
currentCode = ''
} else {
// 切换箱子,默认展示第一张图片
coverImage.value = productList[0]?.previewImgs?.[0]?.url || ''
// coverImage.value = productList[0]?.previewImgs?.[0]?.url || ''
}
podOrderDetailsData.value = data
......@@ -1000,6 +1000,7 @@ const getPackingData = async (code: string) => {
}
}
coverImage.value = product.previewImgs?.[0]?.url || ''
console.log('🍉🍉🍉🍉getPackingData', coverImage.value)
break
}
}
......@@ -1169,8 +1170,10 @@ const initOrderDetailBox = async (type: 'scan' | 'manual' = 'manual') => {
}
}
})
coverImage.value =
podOrderDetailsData.value?.productList?.[0]?.previewImgs?.[0].url || ''
if (type !== 'scan') {
coverImage.value =
podOrderDetailsData.value?.productList?.[0]?.previewImgs?.[0].url || ''
}
if (
podOrderDetailsData.value &&
......@@ -1458,6 +1461,7 @@ const handleRowClick = (row: ProductList) => {
const handleCurrentChange = (url: string) => {
if (url) {
coverImage.value = url || ''
console.log('🍉🍉🍉🍉handleCurrentChange', coverImage.value)
}
}
const warehouseId = ref<string | number>('')
......
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