Commit f740b967 authored by dragondean@qq.com's avatar dragondean@qq.com

打包记录详情取值错误

parent 41b24638
......@@ -6,12 +6,13 @@
<el-descriptions-item :label="$t('品名')">{{orderItem.prodTitleZh}}</el-descriptions-item>
<el-descriptions-item :label="$t('英文品名')">{{orderItem.prodTitleEn}}</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')" >
<dict-tag :type="DICT_TYPE.ECW_IS_BRAND" :value="orderItem.brandType" />
<template v-if="orderItem.brandName">{{orderItem.brandName}}</template>
<dict-tag v-else :type="DICT_TYPE.ECW_IS_BRAND" :value="orderItem.brandType" />
</el-descriptions-item>
<el-descriptions-item :label="$t('箱数')">{{orderItem.num+$t('箱')}}</el-descriptions-item>
<el-descriptions-item :label="$t('体积')">{{orderItem.warehouseInInfoVO ? orderItem.warehouseInInfoVO.volume : orderItem.volume}}m³</el-descriptions-item>
<el-descriptions-item :label="$t('重量')">{{orderItem.warehouseInInfoVO ? orderItem.warehouseInInfoVO.weight : orderItem.weight}}kg</el-descriptions-item>
<el-descriptions-item :label="$t('量')">{{orderItem.warehouseInInfoVO ? orderItem.warehouseInInfoVO.quantityAll : orderItem.quantity}}</el-descriptions-item>
<el-descriptions-item :label="$t('量')">{{orderItem.warehouseInInfoVO ? orderItem.warehouseInInfoVO.quantityAll : orderItem.quantity}}</el-descriptions-item>
<el-descriptions-item :label="$t('备货状态')">{{airShipmentData[info.airShipment]}}</el-descriptions-item>
<el-descriptions-item :label="$t('商品特性')">{{productAttr}}</el-descriptions-item>
</el-descriptions>
......@@ -172,10 +173,13 @@ export default {
return JSON.parse(this.packAfterData.orderWarehouseInContent)
},
productAttr(){
if(this.productAttrList.length==0||!this.orderItem.prodAttrIds) return ''
var data = []
if(this.productAttrList.length==0||!this.orderItem.warehouseInProdAttrIds) return ''
let data = []
// 要拆分成数组再用indexOf,字符串直接indexOf会有问题,"12,3".indexOf('1') > -1 为true
let warehouseInProdAttrIds = this.orderItem.warehouseInProdAttrIds.split(',')
console.log({warehouseInProdAttrIds})
this.productAttrList.forEach(item=>{
if(this.orderItem.prodAttrIds.indexOf(item.id)>-1){
if(warehouseInProdAttrIds.indexOf(`${item.id}`)>-1){
data.push(this.$l(item, 'attrName'))
}
})
......
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