Commit 9bfc0514 authored by youjie's avatar youjie

修改汇率bug修复

parent b9836316
......@@ -171,7 +171,6 @@ export default {
},
calculation(i){
if(!i){
let Money = 0
let benMoney = 0
this.currentMoney = 0
......@@ -188,22 +187,22 @@ export default {
benMoney += Money
this.benMoney = benMoney/100;
})
}else{
let Money = 0
let benMoney = 0
this.benMoney2 = 0
this.GetDetail.CashierDetail.forEach(x=>{
x.UnitPrice = this.$commonUtils.addCommas(Math.round(x.UnitPrice * 100) / 100)
x.Money = x.Rate*x.OriginalMoney
// x.Money = Math.round(x.Money)
x.Money = x.Money.toFixed(2)
x.OriginalMoney = Math.round(x.OriginalMoney * 100) / 100
Money = parseFloat(x.Money)*100
benMoney += Money
this.benMoney2 = benMoney/100;
})
}
// 有收款账户需对比总金额
if(this.GetDetail.CashierDetail&&this.GetDetail.CashierDetail.length>0){
let Money1 = 0
let benMoney1 = 0
this.benMoney2 = 0
this.GetDetail.CashierDetail.forEach(x=>{
x.UnitPrice = this.$commonUtils.addCommas(Math.round(x.UnitPrice * 100) / 100)
x.Money = x.Rate*x.OriginalMoney
// x.Money = Math.round(x.Money)
x.Money = x.Money.toFixed(2)
x.OriginalMoney = Math.round(x.OriginalMoney * 100) / 100
Money1 = parseFloat(x.Money)*100
benMoney1 += Money1
this.benMoney2 = benMoney1/100;
})
}
},
Financial_post_GetDetail(id){ //获取单据详情
......@@ -240,6 +239,7 @@ export default {
let TCID = data.TCIDList.length > 0 ? data.TCIDList[0] : 0
this.financeinfo_post_GetList(TCID);
}
this.calculation()
}
}, err => {})
},
......@@ -330,15 +330,15 @@ export default {
watch: { // 监听参数变化
GetDetail: {
handler: function(val, oldVal) {
let isAmount = true
if(this.GetDetail.CashierDetail&&this.GetDetail.CashierDetail.length){
if(this.benMoney2===this.benMoney){
isAmount = false
}else{
isAmount = true
}
}
this.$emit('getList',val,isAmount)
// let isAmount = true
// if(this.GetDetail.CashierDetail&&this.GetDetail.CashierDetail.length){
// if(this.benMoney2===this.benMoney){
// isAmount = false
// }else{
// isAmount = true
// }
// }
this.$emit('getList',val,false)
},
deep: true,
immediate: true
......
......@@ -138,7 +138,6 @@ export default {
},
calculation(i){
if(!i){
let Money = 0
let benMoney = 0
this.currentMoney = 0
......@@ -155,21 +154,21 @@ export default {
benMoney += Money
this.benMoney = benMoney/100;
})
}else{
let Money = 0
let benMoney = 0
this.benMoney2 = 0
this.GetDetail.CashierDetail.forEach(x=>{
x.UnitPrice = this.$commonUtils.addCommas(Math.round(x.UnitPrice * 100) / 100)
x.Money = x.Rate*x.OriginalMoney
x.Money = x.Money.toFixed(2)
x.OriginalMoney = Math.round(x.OriginalMoney * 100) / 100
Money = parseFloat(x.Money)*100
benMoney += Money
this.benMoney2 = benMoney/100;
})
}
// 有收款账户需对比总金额
if(this.GetDetail.CashierDetail&&this.GetDetail.CashierDetail.length>0){
let Money1 = 0
let benMoney1 = 0
this.benMoney2 = 0
this.GetDetail.CashierDetail.forEach(x=>{
x.UnitPrice = this.$commonUtils.addCommas(Math.round(x.UnitPrice * 100) / 100)
x.Money = x.Rate*x.OriginalMoney
x.Money = x.Money.toFixed(2)
x.OriginalMoney = Math.round(x.OriginalMoney * 100) / 100
Money1 = parseFloat(x.Money)*100
benMoney1 += Money1
this.benMoney2 = benMoney1/100;
})
}
},
Financial_post_GetDetail(id){ //获取单据详情
if(!id) return;
......@@ -199,6 +198,7 @@ export default {
this.benMoney2 = 0
this.loading=false
this.$set(this.$data,"GetDetail",data);
this.calculation()
}
}, err => {})
},
......
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