更新耗材记录所属商品

This commit is contained in:
YeMingfei666 2024-07-20 17:41:54 +08:00
parent bb2e166af2
commit 015ca6ae4e
1 changed files with 6 additions and 4 deletions

View File

@ -159,13 +159,15 @@ export default {
this.clickseetableData.loading = false;
this.clickseetableData.data = res.content.map(v=>{
const productIds=v.productId.split(',')
const productNames=v.productName.split(',')
return{
...v,
product:productIds.map((id,index)=>{
product:productIds.map((str,index)=>{
const startIndex=str.indexOf('_')
const productId=str.slice(0,startIndex)
const productName=str.slice(startIndex+1,str.length)
return {
productId:id,
productName:productNames[index]+`${(index==productIds.length-1)?'':','}`
productId,
productName:productName+`${(index==productIds.length-1)?'':','}`
}
})
}