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

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

parents 516ceabd 29f7b9a9
...@@ -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 {getPriceSnapshotList} from "@/api/ecw/productPrice"; 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 { export default {
name: "Logs", name: "Logs",
components: {ShowStepPriceItem, Template},
filters: {parseTime},
props:{ props:{
currencyMap:{ currencyMap:{
type:Object, type:Object,
...@@ -25,6 +30,7 @@ export default { ...@@ -25,6 +30,7 @@ export default {
} }
}, },
methods:{ methods:{
parseTime,
open(id){ open(id){
this.showLogsDialog = true this.showLogsDialog = true
this.loading = true this.loading = true
...@@ -61,6 +67,8 @@ export default { ...@@ -61,6 +67,8 @@ export default {
<!----阶梯定价--> <!----阶梯定价-->
<template v-if="row.detail.stepPrice == 1"> <template v-if="row.detail.stepPrice == 1">
<!--老的数据格式-->
<template v-if="row.detail.priceStepList">
<template v-for="(item, index) in row.detail.priceStepList"> <template v-for="(item, index) in row.detail.priceStepList">
<div class="mt-10"> <div class="mt-10">
{{index+1}}阶段 {{index+1}}阶段
...@@ -83,35 +91,74 @@ export default { ...@@ -83,35 +91,74 @@ export default {
</div> </div>
</template> </template>
</template> </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-else>
<template v-if="row.detail.priceType != 1"> <template v-if="row.detail.priceType != 1">
<div> <div>
默认运费 {{$t('默认运费')}}
{{row.detail.transportPrice}} {{currencyMap[row.detail.transportPriceUnit]}} / {{unitMap[row.detail.transportVolumeUnit]}} {{row.detail.transportPrice}} {{currencyMap[row.detail.transportPriceUnit]}} / {{unitMap[row.detail.transportVolumeUnit]}}
</div> </div>
<div> <div>
默认清关费 {{$t('默认清关费')}}
{{row.detail.clearancePrice}} {{currencyMap[row.detail.clearancePriceUnit]}} / {{unitMap[row.detail.clearanceVolumeUnit]}} {{row.detail.clearancePrice}} {{currencyMap[row.detail.clearancePriceUnit]}} / {{unitMap[row.detail.clearanceVolumeUnit]}}
</div> </div>
</template> </template>
<div v-else> <div v-else>
全包价 {{$t('全包价')}}
{{row.detail.allPrice}} {{currencyMap[row.detail.allPriceUnit]}} / {{unitMap[row.detail.allVolumeUnit]}} {{row.detail.allPrice}} {{currencyMap[row.detail.allPriceUnit]}} / {{unitMap[row.detail.allVolumeUnit]}}
</div> </div>
<template v-for="(item, index) in row.detail.specialList"> <template v-for="(item, index) in row.detail.specialList">
<template v-if="row.detail.priceType != 1"> <template v-if="row.detail.priceType != 1">
<div :key="item.specialDictType + '_freight'" > <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]}} {{item.transportPrice}} {{currencyMap[item.transportPriceUnit]}} / {{unitMap[item.transportVolumeUnit]}}
</div> </div>
<div :key="item.specialDictType + '_clearance'" > <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]}} {{item.clearancePrice}} {{currencyMap[item.clearancePriceUnit]}} / {{unitMap[item.clearanceVolumeUnit]}}
</div> </div>
</template> </template>
<div v-else> <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]}} {{item.allPrice}} {{currencyMap[item.allPriceUnit]}} / {{unitMap[item.allVolumeUnit]}}
</div> </div>
</template> </template>
......
...@@ -52,7 +52,8 @@ export default { ...@@ -52,7 +52,8 @@ export default {
}, },
computed:{ computed:{
packagingList(){ 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 dict.enable = true
this.value.packagingList.forEach(item => { this.value.packagingList.forEach(item => {
if(item.packagingTypes?.length && item.packagingTypes.indexOf(dict.value) > -1){ if(item.packagingTypes?.length && item.packagingTypes.indexOf(dict.value) > -1){
...@@ -210,7 +211,7 @@ export default { ...@@ -210,7 +211,7 @@ export default {
<!--包装类型价格--> <!--包装类型价格-->
<template v-for="(item, i) in value.packagingList"> <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> <template #label>
<div class="el-form-item__label" style="width: 150px;">{{$t('包装类型') + priceName + (i+1)}}</div> <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> <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 @@ ...@@ -191,7 +191,7 @@
<el-button @click="showLogs" type="primary" v-if="readonly">{{$t('查看价格日志')}}</el-button> <el-button @click="showLogs" type="primary" v-if="readonly">{{$t('查看价格日志')}}</el-button>
</div> </div>
<logs ref="logs"></logs> <logs ref="logs" :unit-map="unitMap" :currency-map="currencyMap"></logs>
</div> </div>
</template> </template>
<script> <script>
...@@ -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