Commit 0db4acd0 authored by 我在何方's avatar 我在何方

收款单修复

parent 9f8dd866
......@@ -514,14 +514,15 @@ export default {
},
WriteOffProportion(){
let total = 0
let amountTotal = 0
let amountTotal = this.form.receiptAccountList.find(item=>item.type=='total').writeOffAmount
this.detailed.forEach(item => {
if(item.status){
amountTotal = NP.plus(amountTotal, item.writeOffAmount)
}
// if(item.status){
// amountTotal = NP.plus(amountTotal, item.writeOffAmount)
// }
total = NP.plus(total, item.writeOffAmount)
})
let portion = NP.divide(amountTotal,total)
let portion = NP.divide(total,amountTotal)
return (portion*100).toFixed(2)
}
},
......@@ -623,7 +624,7 @@ export default {
})
this.form.receiptAccountList[this.form.receiptAccountList.length -1].collectionAmount = amountList
this.$set(this.form, 'receiptAccountList', [...this.form.receiptAccountList])
this.$nextTick(() => {
this.form.receiptAccountList.forEach((item, index) => {
......@@ -896,7 +897,7 @@ export default {
}
})
console.log('collom',collom)
if(recepted.length>collom.length){
// if(recepted.length>collom.length){
recepted.forEach((amount,currency)=>{
if(amount){
if(collom[currency]){
......@@ -907,17 +908,20 @@ export default {
}
})
}else{
// }else{
collom.forEach((amount,currency)=>{
if(amount){
if(recepted[currency]){
if((amount-recepted[currency])!=0) this.surplusData[currency] = +parseFloat((amount-recepted[currency]).toPrecision(12))
}else{
if(!this.surplusData[currency]){
if(recepted[currency]){
if((amount-recepted[currency])!=0) this.surplusData[currency] = +parseFloat((amount-recepted[currency]).toPrecision(12))
}else{
this.surplusData[currency] = amount
}
}
}
})
}
// }
console.log(this.surplusData)
this.addForm = {}
this.openAddDialog = true
......
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