| | |
| | | // bottom产品信息数据处理 |
| | | bottomProductData(arr) { |
| | | const list = arr.details.map((item) => { |
| | | let adjunctUnit='' |
| | | let adjunctAmount='' |
| | | if(item.product.moreUnit&&item.product.moreUnitList){ |
| | | let moreUnitList=item.product.moreUnitList |
| | | if(moreUnitList.length>0){ |
| | | let isValue=false |
| | | for(let j in moreUnitList){ |
| | | if(moreUnitList[j].floating){ |
| | | isValue=true; |
| | | adjunctUnit=moreUnitList[j].unit |
| | | adjunctAmount=moreUnitList[j].amount |
| | | break; |
| | | } |
| | | } |
| | | if(!isValue){ |
| | | for(let j in moreUnitList){ |
| | | if(moreUnitList[j].unit){ |
| | | adjunctUnit=moreUnitList[j].unit |
| | | adjunctAmount=moreUnitList[j].amount |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // let adjunctUnit='' |
| | | // let adjunctAmount='' |
| | | // if(item.product.moreUnit&&item.product.moreUnitList){ |
| | | // let moreUnitList=item.product.moreUnitList |
| | | // if(moreUnitList.length>0){ |
| | | // let isValue=false |
| | | // for(let j in moreUnitList){ |
| | | // if(moreUnitList[j].floating){ |
| | | // isValue=true; |
| | | // adjunctUnit=moreUnitList[j].unit |
| | | // adjunctAmount=moreUnitList[j].amount |
| | | // break; |
| | | // } |
| | | // } |
| | | // if(!isValue){ |
| | | // for(let j in moreUnitList){ |
| | | // if(moreUnitList[j].unit){ |
| | | // adjunctUnit=moreUnitList[j].unit |
| | | // adjunctAmount=moreUnitList[j].amount |
| | | // break; |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | return { |
| | | ...item, |
| | | productName: item.product.name, |
| | |
| | | specs:item.product.specs, |
| | | location: arr.location.name, |
| | | toLocation: arr.toLocation.name, |
| | | adjunctUnit:adjunctUnit, |
| | | adjunctAmount:adjunctAmount&&item.amount?adjunctAmount:'', |
| | | adjunctUnit:item.auxiliaryUnit, |
| | | adjunctAmount:item.auxiliaryAmount, |
| | | grossWeight:item.product.grossWeight==0?'':item.product.grossWeight, |
| | | totalGrossWeight:item.totalGrossWeight, |
| | | netWeight:item.product.netWeight==0?'':item.product.netWeight, |