Commit faf57101 authored by 季圣华's avatar 季圣华
Browse files

优化财务单据的数值计算

parent c25b6dd4
...@@ -166,7 +166,6 @@ export const BillModalMixin = { ...@@ -166,7 +166,6 @@ export const BillModalMixin = {
//单元值改变一个字符就触发一次 //单元值改变一个字符就触发一次
onValueChange(event) { onValueChange(event) {
let that = this let that = this
debugger
const { type, row, column, value, target } = event const { type, row, column, value, target } = event
let param,operNumber,unitPrice,taxUnitPrice,allPrice,taxRate,taxMoney,taxLastMoney let param,operNumber,unitPrice,taxUnitPrice,allPrice,taxRate,taxMoney,taxLastMoney
switch(column.key) { switch(column.key) {
......
...@@ -165,7 +165,8 @@ ...@@ -165,7 +165,8 @@
for(let item of detailArr){ for(let item of detailArr){
totalPrice += item.eachAmount-0 totalPrice += item.eachAmount-0
} }
billMain.totalPrice = totalPrice billMain.totalPrice = 0-totalPrice
billMain.changeAmount = 0-billMain.changeAmount
if(this.model.id){ if(this.model.id){
billMain.id = this.model.id billMain.id = this.model.id
} }
......
...@@ -177,7 +177,8 @@ ...@@ -177,7 +177,8 @@
for(let item of detailArr){ for(let item of detailArr){
totalPrice += item.eachAmount-0 totalPrice += item.eachAmount-0
} }
billMain.totalPrice = totalPrice billMain.totalPrice = 0-totalPrice
billMain.changeAmount = 0-billMain.changeAmount
if(this.model.id){ if(this.model.id){
billMain.id = this.model.id billMain.id = this.model.id
} }
......
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
for(let item of detailArr){ for(let item of detailArr){
totalPrice += item.eachAmount-0 totalPrice += item.eachAmount-0
} }
billMain.totalPrice = totalPrice billMain.totalPrice = 0-totalPrice
if(this.model.id){ if(this.model.id){
billMain.id = this.model.id billMain.id = this.model.id
} }
......
...@@ -165,6 +165,7 @@ ...@@ -165,6 +165,7 @@
let moneyBeginNeedGet = beginNeedGet - 0; //期初应收 let moneyBeginNeedGet = beginNeedGet - 0; //期初应收
let moneyBeginNeedPay = beginNeedPay - 0; //期初应付 let moneyBeginNeedPay = beginNeedPay - 0; //期初应付
money = (money + moneyBeginNeedGet - moneyBeginNeedPay).toFixed(2); money = (money + moneyBeginNeedGet - moneyBeginNeedPay).toFixed(2);
money = 0-money;
if(type === 'first') { if(type === 'first') {
this.firstTotal = prefix + money + "" this.firstTotal = prefix + money + ""
} else if(type === 'last') { } else if(type === 'last') {
......
Supports Markdown
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