Browse Source

对账单

chenrui 2 years ago
parent
commit
13e8e33a13
1 changed files with 5 additions and 3 deletions
  1. 5 3
      pages/sales/bill.vue

+ 5 - 3
pages/sales/bill.vue

@@ -113,6 +113,7 @@
 import billList from './billListComponent.vue';
 import { queryUnsettleSaleList, insert } from '@/api/verify.js';
 import getDate from '@/libs/getDate.js';
+import { toThousands } from '@/libs/tools'
 export default {
 	components: { billList },
 	data() {
@@ -254,7 +255,7 @@ export default {
 				this.bill[i].unsettleAmount = this.bill[i].unsettleAmount ? this.bill[i].unsettleAmount : 0;
 				totalPrice += this.bill[i].unsettleAmount;
 			}
-			return totalPrice;
+			return toThousands(totalPrice,2);
 		},
 		chooseTotalPayPrice() {
 			let price = 0;
@@ -262,10 +263,11 @@ export default {
 				item.unsettleAmount = item.unsettleAmount ? item.unsettleAmount : 0;
 				price += item.unsettleAmount;
 			});
-			return price;
+			return toThousands(price,2);
 		},
 		settlement() {
-			return this.chooseTotalPayPrice - this.discountVal || 0;
+			let priceNum=this.chooseTotalPayPrice - this.discountVal;
+			return toThousands(priceNum,2)
 		}
 	},
 	methods: {