Commit 08aa588a authored by dragondean@qq.com's avatar dragondean@qq.com

价格部分bug

parent 262f288f
......@@ -411,7 +411,10 @@ export default {
minWeightUnit,
needOrderInquiry,
needBook,
needPay
needPay,
freightPriceStepList,
clearancePriceStepList,
fullPriceStepList
} = res.data
const data = {
......@@ -432,7 +435,10 @@ export default {
minWeightUnit,
needOrderInquiry,
needBook,
needPay
needPay,
freightPriceStepList,
clearancePriceStepList,
fullPriceStepList
}
// 海运需要填充货柜位置和订单方数上限
if(this.type == 'sea'){
......
......@@ -216,15 +216,6 @@ export default {
// 获取模板数据(复制的源路线价格信息)
async getTemplateDetail(id){
const res = await getProductPrice(id)
// 填充商品、线路、价格信息、出货渠道(空运)
// this.form.productIdList = [res.data.productId]
/* 23-11-07要求不复制商品和线路 https://zentao.test.jdshangmen.com/bug-view-5145.html
this.selectedRoutes = [{
"lineId": res.data.warehouseLineId,
"channelId": res.data.shippingChannelId,
"transportId": res.data.warehouseLineDO.transportType,
"shippingChannelId":res.data.channelId
}]*/
// 要复制过来的字段
const {
allPrice,
......@@ -244,7 +235,10 @@ export default {
minWeightUnit,
needOrderInquiry,
needBook,
needPay
needPay,
freightPriceStepList,
clearancePriceStepList,
fullPriceStepList
} = res.data
const data = {
......@@ -265,7 +259,10 @@ export default {
minWeightUnit,
needOrderInquiry,
needBook,
needPay
needPay,
freightPriceStepList,
clearancePriceStepList,
fullPriceStepList
}
this.$set(this, 'form', Object.assign({}, this.form, data))
......
<script>
import Selector from "@/components/Selector/index.vue";
import Template from "@/views/cms/template/index.vue";
import {DICT_TYPE} from "@/utils/dict";
export default {
name: "ShowStepPriceItem",
......@@ -22,6 +23,16 @@ export default {
return {}
}
}
},
computed:{
showPackages(){
return str => {
let arr = str.split(",")
return arr.map(item => {
return this.getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, item)
}).join(",")
}
}
}
}
</script>
......@@ -40,16 +51,16 @@ export default {
<div v-for="(special, specialIndex) in value.specialList">
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, special.specialDictType) + priceName}}
{{special[`${fieldPrefix}Price`]}}
{{currencyMap[special[`${fieldPrefix}PriceUnit`]]}}}
{{currencyMap[special[`${fieldPrefix}PriceUnit`]]}}
{{unitMap[special[`${fieldPrefix}VolumeUnit`]]}}
</div>
<!--包装价-->
<!--包装类型价格-->
<template v-for="(item, i) in value.packagingList">
{{$t('包装类型') + priceName + (i+1)}}
{{item.packagingTypes}}
{{showPackages(item.packagingTypes)}}
{{item.packagingPrice}}
{{currencyMap[item.packagingPriceUnit]}}}
{{currencyMap[item.packagingPriceUnit]}}
{{unitMap[item.packagingVolumeUnit]}}
</template>
</div>
......
......@@ -235,6 +235,7 @@ export default {
checkList: [],
selectedRoutes: [], // 勾选的路线渠道
form: {
weightLimit: 0,
minWeightUnit: 0,
priceStepList: [], // 阶梯价格
specialList: [],
......@@ -606,6 +607,9 @@ export default {
}
}
// 空运固定阶梯价
data.stepPrice = 1
// 修改单条路线
if (this.$route.query.action == 'update') {
this.loading = true
......
......@@ -273,34 +273,42 @@
<el-row :gutter="20" v-if="showMoreStepPriceItem">
<el-col :span="12">
<div v-for="(item, index) in showMoreStepPriceItem.priceStepList">
<div class="page-title">
{{$t("第{no}阶梯({start}~{end}{weightUnit}", {
no: index + 1,
start: item.startNum,
end: item.endNum,
weightUnit: getUnitTitle(item.weightUnit),
})}}
<!--全包价-->
<template v-if="showMoreStepPriceItem.priceType">
<div v-for="(item, index) in showMoreStepPriceItem.fullPriceStepList">
<show-step-price-item
:value="item"
:unit-map="unitMap"
:currency-map="currencyMap"
:index="index"
field-prefix="all"
:price-name="$t('全包价')"></show-step-price-item>
</div>
<div v-if="showMoreStepPriceItem.priceType == 0">
{{$t('运费')}}:{{ getCurrencySymbol(item.transportPriceUnit) + item.transportPrice}}&nbsp;
{{ getCurrencyTitle(item.transportPriceUnit) + '/' + getUnitTitle(item.transportVolumeUnit)}}
<br />
<template v-if="[3,4].indexOf(+showMoreStepPriceItem.warehouseLineDO.transportType) > -1">
<!--空运的清关费单独显示-->
</template>
<template v-else>
<!--海运的清关费-->
{{$t('清关费')}}:{{ getCurrencySymbol(item.clearancePriceUnit) + item.clearancePrice}}&nbsp;
{{ getCurrencyTitle(item.clearancePriceUnit) + '/' + getUnitTitle(item.clearanceVolumeUnit)}}
</template>
</div>
<div v-if="showMoreStepPriceItem.priceType == 1">
{{$t('全包价')}}:{{ getCurrencySymbol(item.allPriceUnit) + item.allPrice}}&nbsp;
{{ getCurrencyTitle(item.allPriceUnit) + '/' + getUnitTitle(item.allVolumeUnit)}}
</div>
</div>
</template>
<template v-else>
<template v-if="showMoreStepPriceItem.freightPriceStepList">
<div v-for="(item, index) in showMoreStepPriceItem.freightPriceStepList">
<show-step-price-item
:value="item"
:unit-map="unitMap"
:currency-map="currencyMap"
:index="index"
field-prefix="transport"
:price-name="$t('运费')"></show-step-price-item>
</div>
</template>
<template v-if="showMoreStepPriceItem.clearancePriceStepList">
<div v-for="(item, index) in showMoreStepPriceItem.clearancePriceStepList">
<show-step-price-item
:value="item"
:unit-map="unitMap"
:currency-map="currencyMap"
:index="index"
field-prefix="clearance"
:price-name="$t('清关费')"></show-step-price-item>
</div>
</template>
</template>
</el-col>
<!--空运的清关费单独显示-->
<!--
......@@ -356,10 +364,12 @@ import { getProduct } from '@/api/ecw/product';
import {parseTime} from '@/utils/ruoyi'
import Template from "@/views/cms/template";
import {getStatusName} from "./util";
import ShowStepPriceItem from "@/views/ecw/productPrice/components/ShowStepPriceItem.vue";
export default {
name: "EcwProductpriceIndex",
filters: {parseTime},
components: {
ShowStepPriceItem,
Template,
DictTag
},
......@@ -379,7 +389,7 @@ export default {
/* startCityList: [], //始发地城市
destCityList: [], //目的地城市 */
routedList: [], //已开头路线列表
currecyList: [], //货币列表
currencyList: [], //货币列表
unitList: [], //单位列表
channelList:[] , // 渠道
routeParams:{}, //路线搜索条件
......@@ -506,8 +516,8 @@ export default {
// 显示币种符号
getCurrencySymbol() {
return currencyId => {
for(let index in this.currecyList) {
let currecyItem = this.currecyList[index];
for(let index in this.currencyList) {
let currecyItem = this.currencyList[index];
if(currecyItem.id == currencyId) {
return currecyItem.fuhao;
}
......@@ -517,8 +527,8 @@ export default {
// 显示币种名称
getCurrencyTitle() {
return currencyId => {
for(let index in this.currecyList) {
let currecyItem = this.currecyList[index];
for(let index in this.currencyList) {
let currecyItem = this.currencyList[index];
if(currecyItem.id == currencyId) {
return this.$l(currecyItem, 'title');
}
......@@ -543,6 +553,20 @@ export default {
destCityList(){
return this.cityList.filter(item => item.type == 1 || item.type == 3)
},
currencyMap(){
let map = {}
this.currencyList.forEach(item => {
map[item.id] = this.$l(item, 'title')
})
return map
},
unitMap(){
let map = {}
this.unitList.forEach(item => {
map[item.id] = this.$l(item, 'title')
})
return map
},
},
activated() {
// console.log('activated', Object.assign({}, this.$route.query))
......@@ -687,7 +711,7 @@ export default {
/**获取所有货币列表 */
requestCurrencyList() {
getCurrencyList().then(response => {
this.currecyList = response.data;
this.currencyList = response.data;
})
},
......
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