Commit 8cd2b5e3 authored by dragondean@qq.com's avatar dragondean@qq.com

修复价格日志异常

parent 6b1fe58c
<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>
......
<script>
import Selector from "@/components/Selector/index.vue";
import Template from "@/views/cms/template/index.vue";
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 {}
}
}
}
}
</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)}}
{{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>
......
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