Commit 64a5dc81 authored by 我在何方's avatar 我在何方

订单异常单证异常优化

parents d0e2e24e 27149936
......@@ -159,16 +159,20 @@ export default {
return s ? '' + s + '' : ''
}
},
costPrice(){
// 最初的运费
initialPrice(){
return Decimal(this.form.orgSeaFreight || 0)
.minus(this.form.orgShadeCommissionAmount || 0)
// .minus(this.form.orgShadeCommissionAmount || 0)
.minus(this.form.orgLightCommissionAmount || 0)
.minus(this.form.shadeCommissionAmount || 0)
},
// 新的成本价
costPrice(){
return this.initialPrice.minus(this.form.shadeCommissionAmount || 0)
},
// 新的销售价
salePrice(){
return Decimal(this.form.orgSeaFreight || 0)
.minus(this.form.orgLightCommissionAmount || 0)
.plus(this.form.lightCommissionAmount || 0)
return this.initialPrice.plus(this.form.lightCommissionAmount || 0)
},
currencyMap(){
let map = {}
......
......@@ -142,14 +142,17 @@ export default {
/* costPrice(){
return Decimal(this.form.seaFreight || 0).minus(this.form.lightCommissionAmount || 0).minus(this.form.shadeCommissionAmount || 0)
} */
costPrice(){
// 最初的运费
initialPrice(){
return Decimal(this.form.orgSeaFreight || 0)
.minus(this.form.orgShadeCommissionAmount || 0)
// .minus(this.form.orgShadeCommissionAmount || 0)
.minus(this.form.orgLightCommissionAmount || 0)
.minus(this.form.shadeCommissionAmount || 0)
},
costPrice(){
return this.initialPrice.minus(this.form.shadeCommissionAmount || 0)
},
salePrice(){
return Decimal(this.form.orgSeaFreight || 0).minus(this.form.orgLightCommissionAmount || 0).plus(this.form.lightCommissionAmount || 0)
return this.initialPrice.plus(this.form.lightCommissionAmount || 0)
},
},
methods: {
......
......@@ -67,10 +67,10 @@
{{$t('原运费')}}{{detail.orgFreight}}{{currencyMap[detail.freightCurrency]}} / {{unitMap[detail.freightVolume]}}
</div>
<div>
{{$t('新运费')}}{{Decimal(detail.freight).plus(detail.lightCommissionAmount)}}{{currencyMap[detail.freightCurrency]}} / {{unitMap[detail.freightVolume]}}
{{$t('新运费')}}{{Decimal(detail.orgFreight || 0).minus(detail.lightCommissionAmount || 0).plus(detail.lightCommissionAmount || 0)}}{{currencyMap[detail.freightCurrency]}} / {{unitMap[detail.freightVolume]}}
</div>
<div>
{{$t('成本价')}}{{Decimal(detail.freight).minus(detail.shadeCommissionAmount)}} {{ currencyMap[detail.freightCurrency] }} / {{ unitMap[detail.freightVolume] }}
{{$t('成本价')}}{{Decimal(detail.orgFreight || 0).minus(detail.lightCommissionAmount || 0).minus(detail.shadeCommissionAmount || 0)}} {{ currencyMap[detail.freightCurrency] }} / {{ unitMap[detail.freightVolume] }}
</div>
<div>
{{$t('明佣')}}{{ detail.lightCommissionAmount}}{{currencyMap[detail.freightCurrency]}} / {{unitMap[detail.freightVolume]}}
......
......@@ -187,19 +187,15 @@ export default {
},
// 原价
originPrice(){
if(!this.form.orgFreight) return 0
return Decimal(this.form.orgFreight).minus(parseFloat(this.form.orgLightCommissionAmount) || 0)
return Decimal(this.form.orgFreight || 0).minus(this.form.orgLightCommissionAmount || 0)
},
// 成本价
costPrice(){
if(!this.originPrice) return 0
return Decimal(this.originPrice).minus(parseFloat(this.form.shadeCommissionAmount) || 0)
return this.originPrice.minus(this.form.shadeCommissionAmount || 0)
},
// 销售价
salePrice(){
if(!this.originPrice) return 0
return Decimal(this.originPrice).plus(parseFloat(this.form.lightCommissionAmount) || 0)
return this.originPrice.plus(this.form.lightCommissionAmount || 0)
},
totalCommision(){
return Decimal(this.form.lightCommissionAmount || 0).plus(this.form.shadeCommissionAmount || 0)
......
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