Commit 61371fb9 authored by dragondean@qq.com's avatar dragondean@qq.com

费用详情特价里商品类型和名称错误

parent 0007ce83
...@@ -373,8 +373,12 @@ ...@@ -373,8 +373,12 @@
<el-card class="mt-10"> <el-card class="mt-10">
<span slot="header">{{$t('特价折扣')}}</span> <span slot="header">{{$t('特价折扣')}}</span>
<el-table :data="orderSpecialApplyVOList"> <el-table :data="orderSpecialApplyVOList">
<el-table-column :label="$t('商品类型')" prop="prodType"></el-table-column> <el-table-column :label="$t('商品类型')" prop="prodType">
<el-table-column :label="$t('商品名称')" prop="prodTitleEn"></el-table-column> <template slot-scope="{row}">
{{showProductTypeName(row.prodType)}}
</template>
</el-table-column>
<el-table-column :label="$t('商品名称')" prop="prodTitleZh"></el-table-column>
<el-table-column :label="$t('英文名称')" prop="prodTitleEn"></el-table-column> <el-table-column :label="$t('英文名称')" prop="prodTitleEn"></el-table-column>
<!--<el-table-column :label="$t('线路')" width="120" prop="line"> <!--<el-table-column :label="$t('线路')" width="120" prop="line">
...@@ -420,6 +424,7 @@ import Price from "@/views/ecw/order/components/price.vue"; ...@@ -420,6 +424,7 @@ import Price from "@/views/ecw/order/components/price.vue";
import {parseTime} from "@/utils/ruoyi"; import {parseTime} from "@/utils/ruoyi";
import Decimal from "decimal.js"; import Decimal from "decimal.js";
import {createElementVNode} from "@vue/runtime-dom"; import {createElementVNode} from "@vue/runtime-dom";
import {getProductTypeList} from "@/api/ecw/productType";
export default { export default {
props:{ props:{
orderId: [Number, String], orderId: [Number, String],
...@@ -437,7 +442,9 @@ export default { ...@@ -437,7 +442,9 @@ export default {
// 订单费用汇总 // 订单费用汇总
orderSummary: null, orderSummary: null,
// 订单费用明细汇总 // 订单费用明细汇总
orderDetailSummary: null orderDetailSummary: null,
// 商品类型
productTypeList: []
} }
}, },
computed:{ computed:{
...@@ -467,6 +474,23 @@ export default { ...@@ -467,6 +474,23 @@ export default {
// 特价折扣 // 特价折扣
orderSpecialApplyVOList(){ orderSpecialApplyVOList(){
return this.orderDetailSummary?.orderSpecialApplyVOList || [] return this.orderDetailSummary?.orderSpecialApplyVOList || []
},
// 根据商品类型ID返回名称
showProductTypeName(){
return id => {
if(!this.productTypeList.length) return '-'
const item = this.productTypeList.find(item => item.id === id)
return this.$l(item, 'title')
}
}
},
watch:{
orderSpecialApplyVOList(list){
if(list.length && !this.productTypeList.length){
getProductTypeList().then(res => {
this.productTypeList = res.data
})
}
} }
}, },
mounted() { mounted() {
......
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