Commit 9ab53b11 authored by 邓春圆's avatar 邓春圆

Merge remote-tracking branch 'origin/dev' into dev

parents 516ceabd 29f7b9a9
......@@ -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 {getPriceSnapshotList} from "@/api/ecw/productPrice";
import {parseTime} from "../../../../utils/ruoyi";
import Template from "@/views/cms/template/index.vue";
import ShowStepPriceItem from "@/views/ecw/productPrice/components/ShowStepPriceItem.vue";
export default {
name: "Logs",
components: {ShowStepPriceItem, Template},
filters: {parseTime},
props:{
currencyMap:{
type:Object,
......@@ -25,6 +30,7 @@ export default {
}
},
methods:{
parseTime,
open(id){
this.showLogsDialog = true
this.loading = true
......@@ -61,57 +67,98 @@ export default {
<!----阶梯定价-->
<template v-if="row.detail.stepPrice == 1">
<template v-for="(item, index) in row.detail.priceStepList">
<div class="mt-10">
{{index+1}}阶段
{{item.startNum}} - {{item.endNum}} {{unitMap[item.weightUnit]}}
</div>
<template v-if="row.detail.priceType != 1">
<div :key="index + '_freight'" class="pl-10" >
运费:
{{item.transportPrice}} {{currencyMap[item.transportPriceUnit]}} / {{unitMap[item.transportVolumeUnit]}}
<!--老的数据格式-->
<template v-if="row.detail.priceStepList">
<template v-for="(item, index) in row.detail.priceStepList">
<div class="mt-10">
{{index+1}}阶段
{{item.startNum}} - {{item.endNum}} {{unitMap[item.weightUnit]}}
</div>
<!--空运没有清关费, 不需要显示-->
<div v-if="type != 'air'" :key="item.specialDictType + '_clearance'" class="pl-10">
清关费:
{{item.clearancePrice}} {{currencyMap[item.clearancePriceUnit]}} / {{unitMap[item.clearanceVolumeUnit]}}
<template v-if="row.detail.priceType != 1">
<div :key="index + '_freight'" class="pl-10" >
运费:
{{item.transportPrice}} {{currencyMap[item.transportPriceUnit]}} / {{unitMap[item.transportVolumeUnit]}}
</div>
<!--空运没有清关费, 不需要显示-->
<div v-if="type != 'air'" :key="item.specialDictType + '_clearance'" class="pl-10">
清关费:
{{item.clearancePrice}} {{currencyMap[item.clearancePriceUnit]}} / {{unitMap[item.clearanceVolumeUnit]}}
</div>
</template>
<div v-else class="pl-10">
全包价:
{{item.allPrice}} {{currencyMap[item.allPriceUnit]}} / {{unitMap[item.allVolumeUnit]}}
</div>
</template>
<div v-else class="pl-10">
全包价:
{{item.allPrice}} {{currencyMap[item.allPriceUnit]}} / {{unitMap[item.allVolumeUnit]}}
</div>
</template>
<template v-else-if="row.detail.priceType">
<template v-for="(item, index) in row.detail.fullPriceStepList">
<show-step-price-item
:value="item"
:unit-map="unitMap"
:currency-map="currencyMap"
:index="index"
:price-name="$t('全包价')"
field-prefix="all"
/>
</template>
</template>
<template v-else>
<template v-if="row.detail.freightPriceStepList && row.detail.freightPriceStepList.length">
<template v-for="(item, index) in row.detail.freightPriceStepList">
<show-step-price-item
:value="item"
:unit-map="unitMap"
:currency-map="currencyMap"
:index="index"
:price-name="$t('运费')"
field-prefix="transport"
/>
</template>
</template>
<template v-if="row.detail.freightPriceStepList && row.detail.freightPriceStepList.length">
<template v-for="(item, index) in row.detail.freightPriceStepList">
<show-step-price-item
:value="item"
:unit-map="unitMap"
:currency-map="currencyMap"
:index="index"
:price-name="$t('清关费')"
field-prefix="clearance"
/>
</template>
</template>
</template>
</template>
<template v-else>
<template v-if="row.detail.priceType != 1">
<div>
默认运费
{{$t('默认运费')}}
{{row.detail.transportPrice}} {{currencyMap[row.detail.transportPriceUnit]}} / {{unitMap[row.detail.transportVolumeUnit]}}
</div>
<div>
默认清关费
{{$t('默认清关费')}}
{{row.detail.clearancePrice}} {{currencyMap[row.detail.clearancePriceUnit]}} / {{unitMap[row.detail.clearanceVolumeUnit]}}
</div>
</template>
<div v-else>
全包价
{{$t('全包价')}}
{{row.detail.allPrice}} {{currencyMap[row.detail.allPriceUnit]}} / {{unitMap[row.detail.allVolumeUnit]}}
</div>
<template v-for="(item, index) in row.detail.specialList">
<template v-if="row.detail.priceType != 1">
<div :key="item.specialDictType + '_freight'" >
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} 运费
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} {{$t('运费')}}}
{{item.transportPrice}} {{currencyMap[item.transportPriceUnit]}} / {{unitMap[item.transportVolumeUnit]}}
</div>
<div :key="item.specialDictType + '_clearance'" >
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} 清关费
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} {{$t('清关费')}}
{{item.clearancePrice}} {{currencyMap[item.clearancePriceUnit]}} / {{unitMap[item.clearanceVolumeUnit]}}
</div>
</template>
<div v-else>
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} 全包价
{{getDictDataLabel(DICT_TYPE.ECW_SPECIAL_REQ_FOR_LINE_PRODUCTS, item.specialDictType)}} {{$t('全包价')}}
{{item.allPrice}} {{currencyMap[item.allPriceUnit]}} / {{unitMap[item.allVolumeUnit]}}
</div>
</template>
......
......@@ -52,7 +52,8 @@ export default {
},
computed:{
packagingList(){
return getDictDatas(DICT_TYPE.ECW_PACKAGING_TYPE).map(dict => {
const dicts = JSON.parse(JSON.stringify(getDictDatas(DICT_TYPE.ECW_PACKAGING_TYPE)))
return dicts.map(dict => {
dict.enable = true
this.value.packagingList.forEach(item => {
if(item.packagingTypes?.length && item.packagingTypes.indexOf(dict.value) > -1){
......@@ -210,7 +211,7 @@ export default {
<!--包装类型价格-->
<template v-for="(item, i) in value.packagingList">
<el-form-item :label="$t('包装类型') + priceName + (i+1)">
<el-form-item :label="$t('包装类型') + priceName + (i+1)" :key="i">
<template #label>
<div class="el-form-item__label" style="width: 150px;">{{$t('包装类型') + priceName + (i+1)}}</div>
<div v-if="!item.packagingTypes || !item.packagingTypes.length" class="tips">{{$t('未选择包装类型将被忽略')}}</div>
......
<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",
components: {Template, Selector},
props: {
index: Number,
value: Object,
priceName: String,
fieldPrefix: String,
unitMap: {
type: Object,
default(){
return {}
}
},
currencyMap: {
type: Object,
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>
<template>
<div>
<div class="mt-10">
{{$t("第{no}阶段", {no: index + 1})}} {{priceName}}
{{value.startNum}} - {{value.endNum}} {{unitMap[value.weightUnit]}}
</div>
<div class="pl-10" >
{{$t('默认') + priceName}}
{{value.transportPrice}} {{currencyMap[value[`${fieldPrefix}PriceUnit`]]}} / {{unitMap[value[`${fieldPrefix}VolumeUnit`]]}}
</div>
<!--特需加价-->
<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`]]}}
{{unitMap[special[`${fieldPrefix}VolumeUnit`]]}}
</div>
<!--包装价-->
<!--包装类型价格-->
<template v-for="(item, i) in value.packagingList">
{{$t('包装类型') + priceName + (i+1)}}
{{showPackages(item.packagingTypes)}}
{{item.packagingPrice}}
{{currencyMap[item.packagingPriceUnit]}}
{{unitMap[item.packagingVolumeUnit]}}
</template>
</div>
</template>
......@@ -191,7 +191,7 @@
<el-button @click="showLogs" type="primary" v-if="readonly">{{$t('查看价格日志')}}</el-button>
</div>
<logs ref="logs"></logs>
<logs ref="logs" :unit-map="unitMap" :currency-map="currencyMap"></logs>
</div>
</template>
<script>
......@@ -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