Commit 25b1d6b5 authored by Mac's avatar Mac

计算手续费 满足平台账户 而且是结算方式为百分比 SettlementType=1

parent 7d591373
...@@ -1077,6 +1077,9 @@ ...@@ -1077,6 +1077,9 @@
this.msg.Fee = 0 this.msg.Fee = 0
} }
} }
if(this.bankType==12){//如果等于平台账户 进去判断
this.getcommission()
}
}, },
clearAccBank() { // 选择账户类型清空数据 clearAccBank() { // 选择账户类型清空数据
this.msg.BankList[0].Type = ''; this.msg.BankList[0].Type = '';
...@@ -1368,6 +1371,10 @@ ...@@ -1368,6 +1371,10 @@
this.Calculation(1); this.Calculation(1);
}) })
} }
if(this.bankType==12){
this.getcommission()
}
if (list.CostTypeId == '') return if (list.CostTypeId == '') return
if (list.Number == '') return if (list.Number == '') return
if (list.UnitPrice == '') return if (list.UnitPrice == '') return
...@@ -1409,6 +1416,37 @@ ...@@ -1409,6 +1416,37 @@
this.shouxufeiJiSuan() this.shouxufeiJiSuan()
} }
this.countFee(); this.countFee();
},
getcommission(){//计算手续费 满足平台账户 而且是结算方式为百分比 SettlementType=1
let obj = null
for(let i=0;i< this.accountList.length;i++){
let x = this.accountList[i]
if(x.ID == this.msg.BankList[0].AccountId){
obj={
SettlementType:x.SettlementType,
Commission:x.Commission
}
break
}
}
let allbTotalPriceTo = 0
if(obj.SettlementType==1){
if(this.detailList){
if(Number(this.detailList.yTotalPriceTo) > 0){
allbTotalPriceTo = allbTotalPriceTo + Number(this.detailList.yTotalPriceTo)
}
}
if(this.msg.detailList && this.msg.detailList.length>0){
this.msg.detailList.forEach(x=>{
if(Number(x.yTotalPriceTo) > 0){
allbTotalPriceTo = allbTotalPriceTo + Number(x.yTotalPriceTo)
}
})
}
}
this.msg.OriginalFee = (obj.Commission/100)*allbTotalPriceTo
}, },
Calculation(t, i) { // 计算原币 本位币 Calculation(t, i) { // 计算原币 本位币
let numberC = 0; let numberC = 0;
...@@ -1513,6 +1551,7 @@ ...@@ -1513,6 +1551,7 @@
chages(){ chages(){
this.$forceUpdate() this.$forceUpdate()
}, },
shouxufeiJiSuan: function () { shouxufeiJiSuan: function () {
let price = 0; let price = 0;
this.msg.detailList.forEach(y => { this.msg.detailList.forEach(y => {
......
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