优化财务单据的数值计算
This commit is contained in:
@@ -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 @@
|
|||||||
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 @@
|
|||||||
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 @@
|
|||||||
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 @@
|
|||||||
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') {
|
||||||
|
|||||||
Reference in New Issue
Block a user