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

价格部分bug

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