Commit 9deb8c3c by zhuzhequan

fix:bug修复

parent 6c4e5824
...@@ -710,17 +710,27 @@ const handleEmbryoInStockByCard = async ( ...@@ -710,17 +710,27 @@ const handleEmbryoInStockByCard = async (
background: 'rgba(0, 0, 0, 0.3)', background: 'rgba(0, 0, 0, 0.3)',
}) })
try { try {
const skus = operationList.map((r) => r.thirdSkuCode as string) otherPurchaseData.value = []
const res = if(type!=='embryoInStock'){
type === 'embryoInStock' const res = await getBySkuAndUserMarkAndInboundTypeApi(
? await getBySkuAndUserMarkApi(firstWid, skus.join(','), null)
: await getBySkuAndUserMarkAndInboundTypeApi(
operationList.map((r) => r.operationNo as string), operationList.map((r) => r.operationNo as string),
) )
if (res.code !== 200) return if (res.code !== 200) return
otherPurchaseData.value = res.data.map((item: InterskuList) => otherPurchaseData.value = res.data.map((item: InterskuList) =>
mapInterskuToProduct(item, type), mapInterskuToProduct(item, type),
) )
}else{
for(const item of operationList){
if(!item.thirdSkuCode) return
const userMark = item.thirdSkuCode.includes('JM')?null:item.thirdSkuCode.slice(0,4)
const res = await getBySkuAndUserMarkApi(firstWid, item.thirdSkuCode, userMark)
otherPurchaseData.value = otherPurchaseData.value.concat(
res.data.map((it: InterskuList) =>
mapInterskuToProduct(it, type)
)
)
}
}
await fetchReceiptLocationList('') await fetchReceiptLocationList('')
const listRes = await warehouseInfoGetAll() const listRes = await warehouseInfoGetAll()
warehouseList.value = listRes.data || [] warehouseList.value = listRes.data || []
......
...@@ -512,7 +512,7 @@ const normalizeDetail = (value: unknown): FastProductionDetail => { ...@@ -512,7 +512,7 @@ const normalizeDetail = (value: unknown): FastProductionDetail => {
} }
} }
if (!Array.isArray(d.note)) d.note = [] if (!Array.isArray(d.note)) d.note = []
const imageSource = d.imageAry || d.designImages || d.imgList const imageSource = d.imageAry || d.designImages || d.imgList || d.variantImage
d.imgList = parseImages(imageSource) d.imgList = parseImages(imageSource)
return d as unknown as FastProductionDetail return d as unknown as FastProductionDetail
} }
......
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