Commit 1755e0f0 authored by 黄媛媛's avatar 黄媛媛

update

parent 4c465e93
......@@ -1948,7 +1948,11 @@ export default {
let fee = this.payMsgList[index].Fee,
Rate = this.payMsgList[index].Rate==0?1:this.payMsgList[index].Rate,
Money = this.payMsgList[index].OriginalMoney;
Rate=Rate*100;
Rate=Rate*100;
let NewRate=Rate;
if(Rate.toString().split(".")[1] && Rate.toString().split(".")[1].length <5){
NewRate= Rate*100;
}
let newmoney=Money*Rate+fee;
if(newmoney.toString().split(".")[1]){
let num=newmoney.toString().split(".")[1].length;
......@@ -1956,7 +1960,12 @@ export default {
newmoney=`${newmoney}1`;
}
}
this.payMsgList[index].allMoney = Math.round( newmoney* 100) / 100 / 100;
if(Rate.toString().split(".")[1] && Rate.toString().split(".")[1].length <5){
this.payMsgList[index].allMoney = Math.round( newmoney* 100) / 100 / 100;
} else{
this.payMsgList[index].allMoney = Math.round( newmoney* 100) / 100;
}
} else {
this.payMsg.Fee = isNaN(parseFloat(this.payMsg.Fee))?0:parseFloat(this.payMsg.Fee);
this.payMsg.Rate = isNaN(parseFloat(this.payMsg.Rate))?0:parseFloat(this.payMsg.Rate);
......@@ -1964,16 +1973,24 @@ export default {
let fee = this.payMsg.Fee,
Rate = this.payMsg.Rate==0?1:this.payMsg.Rate,
Money = this.payMsg.OriginalMoney;
Rate=Rate*100;
let newmoney=Money*Rate+fee;
// Rate=Rate*100;
let NewRate=Rate;
if(Rate.toString().split(".")[1] && Rate.toString().split(".")[1].length <5){
NewRate= Rate*100;
}
let newmoney=Money*NewRate+fee;
if(newmoney.toString().split(".")[1]){
let num=newmoney.toString().split(".")[1].length;
if(num==1){
newmoney=`${newmoney}1`;
}
}
this.payMsg.allMoney = Math.round( newmoney* 100) / 100 / 100;
if(Rate.toString().split(".")[1] && Rate.toString().split(".")[1].length <5){
this.payMsg.allMoney = Math.round( newmoney* 100) / 100 / 100;
}else{
this.payMsg.allMoney = Math.round( newmoney* 100) / 100;
}
}
},
......
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