|
|
@@ -89,7 +89,7 @@
|
|
|
var level = sessionStorage.getItem('level');
|
|
|
if (level === '2') {
|
|
|
// 获取总金额
|
|
|
- this.get_total_amount();
|
|
|
+ this.get_total_amount('init');
|
|
|
// 获取余额列表
|
|
|
let params = {
|
|
|
page: this.currentPage,
|
|
|
@@ -103,23 +103,25 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- get_total_amount() {
|
|
|
+ get_total_amount(param) {
|
|
|
var _this = this;
|
|
|
let formData = new FormData();
|
|
|
- if (typeof _this.startTime != 'undefined' && _this.startTime != '') {
|
|
|
- formData.append("begin_time", _this.startTime);
|
|
|
- }
|
|
|
- if (typeof _this.endTime != 'undefined' && _this.endTime != '') {
|
|
|
- formData.append("end_time", _this.endTime);
|
|
|
+ if (param != 'init') {
|
|
|
+ if (typeof _this.startTime != 'undefined' && _this.startTime != '') {
|
|
|
+ formData.append("begin_time", _this.startTime);
|
|
|
+ }
|
|
|
+ if (typeof _this.endTime != 'undefined' && _this.endTime != '') {
|
|
|
+ formData.append("end_time", _this.endTime);
|
|
|
+ }
|
|
|
}
|
|
|
if (_this.searchformUser != '' && typeof _this.searchformUser != 'undefined') {
|
|
|
- params.user_name = this.searchformUser
|
|
|
+ formData.append('user_name', this.searchformUser);
|
|
|
}
|
|
|
this.$axios.post('/jxch-smartmp/HotWaters/waterrefund_total.action', formData)
|
|
|
.then(res => {
|
|
|
// console.log(res.data);
|
|
|
if (res.data.code == 200) {
|
|
|
- _this.amount = res.data.data;
|
|
|
+ _this.amount = res.data.data.toFixed(2);
|
|
|
} else {
|
|
|
_this.$message.error(res.data.message);
|
|
|
}
|