Commit 6a4365e9 authored by zhengyi's avatar zhengyi

订单详情中的货物名称栏补充商品类型名称

parent ca3b8c6a
......@@ -13,6 +13,10 @@ export default {
type: Array,
required: true
},
prodTypeList: {
type: Array,
required: true
},
currencyMap: {
type: Object,
required: true
......@@ -33,6 +37,16 @@ export default {
}
},
computed:{
getProdTypeName() {
return (prodType) => {
for (let index in this.prodTypeList) {
let prodTypeItem = this.prodTypeList[index];
if (prodTypeItem.id == prodType) {
return this.$l(prodTypeItem, "title");
}
}
};
},
// 显示特性
showAttrText(){
return ids => {
......@@ -47,119 +61,7 @@ export default {
},
},
methods:{
closeFeeDetail(){
this.showFeeDetailDialog = null
},
showFeeDetail(row, type){
console.log("showFeeDetail", row, type)
this.showFeeDetailDialog = true
const freight = [], clearance = []
let freightFields = []
let clearanceFields = []
const brandType = row.warehouseInInfoVO ? row.feeType : row.brandType
// 不是特价则显示其他字段
freightFields = [
// {field: 'oneSeaFreight', label: this.$t('成交单价')},
{field: 'originalSeaFreight', label: this.$t('默认单价(无牌无液无电)')},
// {field: 'brandFreightPrice', label: this.$t('品牌加价')},
{field: 'liquidFreightPrice', label: this.$t('液体加价')},
{field: 'electrifiedFreightPrice', label: this.$t('带电加价')},
{field: 'discountFreightPrice', label: this.$t('优惠活动减免')},
{field: 'plainCommission', label: this.$t('明佣')},
{field: 'hiddenCommission', label: this.$t('暗佣')}
]
// 批量加价
if(row.markupSeaFreight){
freightFields.push({field: 'markupSeaFreight', label: this.$t('批量加价')})
}
// 品牌加价
if(row['brandFreightPrice'] && row['brandFreightPrice'] > 0){
freightFields.push({field: 'brandFreightPrice', label: brandType == 1 ? this.$t('有品牌加价') : this.$t('中性品牌加价')})
}
// 有减免金额才显示优惠后单价
if(row['discountFreightPrice'] && row['discountFreightPrice'] > 0){
freightFields.push({field: 'afterDiscountSeaFreight', label: this.$t('优惠后单价')})
}
// 包装加价
if(row['packagingFreightPrice'] && row['packagingFreightPrice'] > 0){
freightFields.push({field: 'packagingFreightPrice', label: this.$t('包装加价')})
}
freightFields.push({field: 'oneSeaFreight', label: this.$t('成交单价')})
console.log({freightFields})
freightFields.forEach(item => {
if(row[item.field]){
freight.push({
label: item.label,
value: row[item.field],
currency: row.seaFreightCurrency,
volume: row.seaFreightVolume,
// 特价通过四个字段标识,任一为true则为特价
remark: item.field == 'oneSeaFreight' && (row.specialPriceType || row.splitCustomPriceType || row.channelManualPricing) ? this.$t('特价') : null
})
}
})
clearanceFields = [
{field: 'originalClearanceFreight', label: this.$t('默认单价(无牌无液无电)')},
// {field: 'brandClearanceFeePrice', label: this.$t('品牌加价')},
{field: 'liquidClearanceFeePrice', label: this.$t('液体加价')},
{field: 'electrifiedClearanceFeePrice', label: this.$t('带电加价')},
{field: 'discountClearanceFeePrice', label: this.$t('优惠活动减免')}
]
// 批量加价
if(row.markupClearanceFreight){
clearanceFields.push({field: 'markupClearanceFreight', label: this.$t('批量加价')})
}
// 品牌加价
if(row['brandClearanceFeePrice'] && row['brandClearanceFeePrice'] > 0){
clearanceFields.push({field: 'brandClearanceFeePrice', label: brandType == 1 ? this.$t('有品牌加价') : this.$t('中性品牌加价')})
}
if(row['discountClearanceFeePrice'] && row['discountClearanceFeePrice'] > 0){
clearanceFields.push({field: 'afterDiscountClearanceFreight', label: this.$t('优惠后单价')})
}
// 包装加价
if(row['packagingClearanceFeePrice'] && row['packagingClearanceFeePrice'] > 0){
clearanceFields.push({field: 'packagingClearanceFeePrice', label: this.$t('包装加价')})
}
clearanceFields.push({field: 'oneClearanceFreight', label: this.$t('成交单价')})
clearanceFields.forEach(item => {
if(row[item.field]){
clearance.push({
label: item.label,
value: row[item.field],
currency: row.clearanceFreightCurrency,
volume: row.clearanceFreightVolume,
remark: (row.specialPriceType || row.splitCustomPriceType || row.channelManualPricing) && item.field == 'oneClearanceFreight' ? this.$t('特价') : null
})
}
})
freight.push({
label: this.$t('价格更新时间'),
value: parseTime(row.updateTime)
})
clearance.push({
label: this.$t('价格更新时间'),
value: parseTime(row.updateTime)
})
this.feeDetail = {
freight,
clearance,
charging:
row.charging,
coupons: row.couponInfoVOList,
airClearanceSource: [,this.$t('商品'), this.$t('渠道'), this.$t('商品线路价格'),this.$t('线路渠道')][row.airClearanceSource], // 1 商品 2 渠道 3 商品线路价格 4 线路渠道
airClearanceInfo: JSON.parse(row.airClearanceInfo), //空运清关费来源数据详情,
sourceName: row.airClearanceSource == 1 ? this.$l(row, 'prodTitle') : this.order?.channelName
}
},
// 获取储位名称
getLocationName(locationArr){
if(!locationArr || !locationArr.length) return ''
......@@ -237,7 +139,8 @@ export default {
</el-table-column>
<el-table-column prop="prodTitleZh" :label="$t('品名')">
<template slot-scope="{row}">
{{row.prodTitleZh}}/{{row.prodTitleEn}}
<span>{{ getProdTypeName(row.prodType) }}</span>
<span>{{row.prodTitleZh}}/{{row.prodTitleEn}}</span>
</template>
</el-table-column>
<!--<el-table-column prop="prodTitleEn" :label="$t('品名')" />-->
......
......@@ -12,6 +12,10 @@ export default {
type: Array,
required: true
},
prodTypeList: {
type: Array,
required: true
},
currencyMap: {
type: Object,
required: true
......@@ -32,6 +36,16 @@ export default {
}
},
computed:{
getProdTypeName() {
return (prodType) => {
for (let index in this.prodTypeList) {
let prodTypeItem = this.prodTypeList[index];
if (prodTypeItem.id == prodType) {
return this.$l(prodTypeItem, "title");
}
}
};
},
// 显示特性
showAttrText(){
return ids => {
......@@ -236,7 +250,8 @@ export default {
</el-table-column>
<el-table-column prop="prodTitleZh" :label="$t('品名')">
<template slot-scope="{row}">
{{row.prodTitleZh}}/{{row.prodTitleEn}}
<span>{{ getProdTypeName(row.prodType) }}</span>
<span>{{row.prodTitleZh}}/{{row.prodTitleEn}}</span>
</template>
</el-table-column>
<!--<el-table-column prop="prodTitleEn" :label="$t('品名')" />-->
......
......@@ -222,6 +222,7 @@
<el-tab-pane :label="$t('货物详情')" name="first">
<detail-prod :list="order.orderItemVOList"
:attr-list="attrList"
:prod-type-list="prodTypeList"
:currency-map="currencyMap"
:unit-map="unitMap"
:transport-id="order.transportId"
......@@ -231,6 +232,7 @@
<el-tab-pane :label="$t('退仓/已混箱品名')" name="six">
<detail-prod :list="orderItemDeletedData"
:attr-list="attrList"
:prod-type-list="prodTypeList"
:currency-map="currencyMap"
:unit-map="unitMap"
:transport-id="order.transportId"
......@@ -326,6 +328,7 @@
<el-tab-pane :label="$t('到仓详情')" name="seven">
<check-detail-prod :list="orderCheckInfoData"
:attr-list="attrList"
:prod-type-list="prodTypeList"
:currency-map="currencyMap"
:unit-map="unitMap"
:transport-id="order.transportId"
......@@ -432,6 +435,7 @@ import {getProductAttrList} from "@/api/ecw/productAttr";
import Decimal from 'decimal.js'
import DetailProd from '@/views/ecw/order/components/DetailProd.vue'
import CheckDetailProd from '@/views/ecw/order/components/CheckDetailProd.vue'
import {getProductTypeList} from "@/api/ecw/productType";
export default {
name: "detail",
......@@ -494,6 +498,7 @@ export default {
attrList: [],
orderItemDeletedData:[],//退仓品名
orderCheckInfoData:[],//到仓详情
prodTypeList:[],//商品类型列表
type:1
}
},
......@@ -575,6 +580,7 @@ export default {
this.getOfferNumber()
this.getOrderItemDeleted()
this.getOrderCheckInfo()
this.getProdTypeList();
}
getCurrencyList().then(res => this.currencyList = res.data)
......@@ -629,6 +635,12 @@ export default {
that.orderCheckInfoData = response.data;
});
},
/** 获取产品类型列表 */
getProdTypeList() {
getProductTypeList().then((response) => {
this.prodTypeList = response.data;
});
},
/* loadBrands(){
let brandIds = []
this.form.orderItemVOList.forEach(item => {
......
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