|
|
@@ -149,10 +149,10 @@
|
|
|
async getInfo(row) {
|
|
|
let data = await accountstatementInfoAPI(row.id);
|
|
|
// this.recorpayList = data.recorpayList || [];
|
|
|
- data.orderTotalAmount = data.orderList.reduce((pre, cur) => pre + +cur.orderAmount, 0);
|
|
|
- data.amountTotalPrice = data.orderList.reduce((pre, cur) => pre + +cur.amountTotalPrice, 0);
|
|
|
- data.amountCompletePrice = data.orderList.reduce((pre, cur) => pre + +cur.statementAmount, 0);
|
|
|
- data.amountUnCompletePrice = data.orderList.reduce((pre, cur) => pre + +cur.unStatementAmount, 0);
|
|
|
+ data.orderTotalAmount = data.orderList.reduce((pre, cur) => pre + Math.round(+cur.orderAmount * 100), 0) / 100;
|
|
|
+ data.amountTotalPrice = data.orderList.reduce((pre, cur) => pre + Math.round(+cur.amountTotalPrice * 100), 0) / 100;
|
|
|
+ data.amountCompletePrice = data.orderList.reduce((pre, cur) => pre + Math.round(+cur.statementAmount * 100), 0) / 100;
|
|
|
+ data.amountUnCompletePrice = data.orderList.reduce((pre, cur) => pre + Math.round(+cur.unStatementAmount * 100), 0) / 100;
|
|
|
this.datasource = data.orderList || [];
|
|
|
this.dataForm = data;
|
|
|
switch (this.dataForm.dateType) {
|
|
|
@@ -204,10 +204,10 @@
|
|
|
// amountTotalPrice: data.amountTotalPrice,
|
|
|
// amountPayablePass: data.amountPayablePass,
|
|
|
// amountReceivablePass: data.amountReceivablePass
|
|
|
- orderTotalAmount: data.reduce((pre, cur) => pre + +cur.orderAmount, 0),
|
|
|
- amountTotalPrice: data.reduce((pre, cur) => pre + +cur.amountTotalPrice, 0),
|
|
|
- amountCompletePrice: data.reduce((pre, cur) => pre + +cur.statementAmount, 0),
|
|
|
- amountUnCompletePrice: data.reduce((pre, cur) => pre + +cur.unStatementAmount, 0)
|
|
|
+ orderTotalAmount: data.reduce((pre, cur) => pre + Math.round(+cur.orderAmount * 100), 0) / 100,
|
|
|
+ amountTotalPrice: data.reduce((pre, cur) => pre + Math.round(+cur.amountTotalPrice * 100), 0) / 100,
|
|
|
+ amountCompletePrice: data.reduce((pre, cur) => pre + Math.round(+cur.statementAmount * 100), 0) / 100,
|
|
|
+ amountUnCompletePrice: data.reduce((pre, cur) => pre + Math.round(+cur.unStatementAmount * 100), 0) / 100
|
|
|
};
|
|
|
// if (!this.datasource.length) this.$message.warning('暂无订单信息');
|
|
|
},
|