|
@@ -154,6 +154,10 @@ var render = function () {
|
|
|
: null
|
|
|
var m2 = _vm.getPriceLable(_vm.nowPriceTime.timeType)
|
|
|
var m3 = _vm.getDeviceStatusLable(_vm.deviceInfo.deviceStatus)
|
|
|
+ var g5 =
|
|
|
+ _vm.payment_msg != null
|
|
|
+ ? (_vm.payment_msg.maspAmount + _vm.payment_msg.maspRealAmount).toFixed(2)
|
|
|
+ : null
|
|
|
if (!_vm._isMounted) {
|
|
|
_vm.e0 = function ($event) {
|
|
|
return _vm.$app.url.goto(
|
|
@@ -180,6 +184,7 @@ var render = function () {
|
|
|
g4: g4,
|
|
|
m2: m2,
|
|
|
m3: m3,
|
|
|
+ g5: g5,
|
|
|
},
|
|
|
}
|
|
|
)
|
|
@@ -410,13 +415,17 @@ var _default = {
|
|
|
});
|
|
|
},
|
|
|
mounted: function mounted() {
|
|
|
- if (this.amountOwed !== null) {
|
|
|
- this.$refs.filter.open();
|
|
|
- }
|
|
|
+ var _this3 = this;
|
|
|
+ this.get_paymentMsg();
|
|
|
+ setTimeout(function () {
|
|
|
+ if (_this3.payment_msg != null) {
|
|
|
+ _this3.$refs.filter.open();
|
|
|
+ }
|
|
|
+ }, 500);
|
|
|
},
|
|
|
data: function data() {
|
|
|
return {
|
|
|
- amountOwed: null,
|
|
|
+ payment_msg: null,
|
|
|
deviceId: 0,
|
|
|
deviceStatus: 0,
|
|
|
visit: '',
|
|
@@ -474,40 +483,46 @@ var _default = {
|
|
|
},
|
|
|
//获取设备的详情信息
|
|
|
getDeviceInfo: function getDeviceInfo(deviceId) {
|
|
|
- var _this3 = this;
|
|
|
+ var _this4 = this;
|
|
|
this.$api.base("post", "/chargeApi/getDevicesDetial", {
|
|
|
"deviceId": deviceId
|
|
|
}, {}).then(function (res) {
|
|
|
- _this3.deviceInfo = res.device;
|
|
|
- _this3.nowPriceTime = res.nowPriceTime;
|
|
|
- _this3.stationInfo = res.stationInfo;
|
|
|
+ _this4.deviceInfo = res.device;
|
|
|
+ _this4.nowPriceTime = res.nowPriceTime;
|
|
|
+ _this4.stationInfo = res.stationInfo;
|
|
|
if (res.discountInfo) {
|
|
|
- _this3.discountInfo = res.discountInfo;
|
|
|
+ _this4.discountInfo = res.discountInfo;
|
|
|
}
|
|
|
- if (_this3.deviceInfo.tipsStatus == 1) {
|
|
|
- _this3.$app.popup.alert(_this3.deviceInfo.tipsContent, "温馨提示");
|
|
|
+ if (_this4.deviceInfo.tipsStatus == 1) {
|
|
|
+ _this4.$app.popup.alert(_this4.deviceInfo.tipsContent, "温馨提示");
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ get_paymentMsg: function get_paymentMsg() {
|
|
|
+ var _this5 = this;
|
|
|
+ // maspStatus(1:待补缴,2:已补缴)realPredictServiceCost平台;maspAmount第三方
|
|
|
+ this.$api.base("post", "/chargeApi/queryOrderList-arrearage", {}, {}).then(function (res) {
|
|
|
+ _this5.payment_msg = res.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
//获取账户信息
|
|
|
getAccountInfo: function getAccountInfo() {
|
|
|
- var _this4 = this;
|
|
|
+ var _this6 = this;
|
|
|
if (this.personal == 1) {
|
|
|
//获取个人账户信息
|
|
|
this.$api.base("post", "/chargeApi/getUserAccount", {}, {}).then(function (res) {
|
|
|
- _this4.amountOwed = res.userAccount.amountOwed;
|
|
|
- _this4.accountInfo.balance = res.userAccount.balance;
|
|
|
+ _this6.accountInfo.balance = res.userAccount.balance;
|
|
|
});
|
|
|
} else {
|
|
|
//获取集团账户信息
|
|
|
this.$api.base("post", "/chargeApi/getEcUserAccount", {}, {
|
|
|
error: false
|
|
|
}).then(function (res) {
|
|
|
- _this4.ecInfo = res.ecInfo;
|
|
|
- _this4.accountInfo.balance = res.ecUserAccount.balance;
|
|
|
+ _this6.ecInfo = res.ecInfo;
|
|
|
+ _this6.accountInfo.balance = res.ecUserAccount.balance;
|
|
|
}).catch(function (err) {
|
|
|
- _this4.accountInfo.balance = 0;
|
|
|
- _this4.$app.popup.alert(err.msg, "温馨提示");
|
|
|
+ _this6.accountInfo.balance = 0;
|
|
|
+ _this6.$app.popup.alert(err.msg, "温馨提示");
|
|
|
});
|
|
|
}
|
|
|
},
|
|
@@ -590,7 +605,7 @@ var _default = {
|
|
|
return str;
|
|
|
},
|
|
|
startup: function startup() {
|
|
|
- var _this5 = this;
|
|
|
+ var _this7 = this;
|
|
|
if (this.visit) {
|
|
|
this.$app.popup.alert("该充电枪被占用或存在异常,请重新尝试或更换其他充电枪。", "温馨提示");
|
|
|
return;
|
|
@@ -602,7 +617,7 @@ var _default = {
|
|
|
confirmText: "立即购券"
|
|
|
}).then(function (confirm) {
|
|
|
if (confirm) {
|
|
|
- _this5.$app.url.goto('/pages/coupon-buy/coupon-buy', true);
|
|
|
+ _this7.$app.url.goto('/pages/coupon-buy/coupon-buy', true);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -624,7 +639,7 @@ var _default = {
|
|
|
},
|
|
|
//统一下单并启动接口
|
|
|
startChangeAndOrder: function startChangeAndOrder() {
|
|
|
- var _this6 = this;
|
|
|
+ var _this8 = this;
|
|
|
var obj = {
|
|
|
userId: this.userInfo.id,
|
|
|
deviceId: this.deviceInfo.id,
|
|
@@ -633,18 +648,18 @@ var _default = {
|
|
|
|
|
|
this.$api.base("post", "/chargeApi/startChangeAndOrder", obj, {}).then(function (res) {
|
|
|
//下单成功,并进行了订单预充值
|
|
|
- _this6.orderInfo = res.orderInfo;
|
|
|
+ _this8.orderInfo = res.orderInfo;
|
|
|
if (res.flg && res.flg == 1) {
|
|
|
//用户有充电中的订单
|
|
|
- _this6.$app.popup.confirm("您有一个进行中充电订单,不可再次启动。", null, {
|
|
|
+ _this8.$app.popup.confirm("您有一个进行中充电订单,不可再次启动。", null, {
|
|
|
showCancel: false,
|
|
|
confirmText: "查看订单"
|
|
|
}).then(function (cres) {
|
|
|
- _this6.$app.url.goto('/pages/charging/charging?orderId=' + _this6.orderInfo.id + "&deviceId=" + _this6.deviceInfo.id, false);
|
|
|
+ _this8.$app.url.goto('/pages/charging/charging?orderId=' + _this8.orderInfo.id + "&deviceId=" + _this8.deviceInfo.id, false);
|
|
|
});
|
|
|
} else {
|
|
|
//正常启动充电订单
|
|
|
- _this6.$app.url.goto('/pages/charging/charging?orderId=' + _this6.orderInfo.id + "&deviceId=" + _this6.deviceInfo.id, false);
|
|
|
+ _this8.$app.url.goto('/pages/charging/charging?orderId=' + _this8.orderInfo.id + "&deviceId=" + _this8.deviceInfo.id, false);
|
|
|
}
|
|
|
//this.$app.popup.loading(true,{title:"启动中...."})
|
|
|
//延迟5s查询一下订单,看看是否真的启动成功
|
|
@@ -688,7 +703,7 @@ var _default = {
|
|
|
}, */
|
|
|
// 延迟5s查询一下订单,看看是否真的启动成功
|
|
|
checkedStartStatus: function checkedStartStatus() {
|
|
|
- var _this7 = this;
|
|
|
+ var _this9 = this;
|
|
|
this.$api.base("post", "/chargeApi/checkedStartStatus", {
|
|
|
"id": this.orderInfo.id
|
|
|
}, {}).then(function (res) {
|
|
@@ -698,20 +713,20 @@ var _default = {
|
|
|
if (respObj.status == 1) {
|
|
|
uni.hideLoading();
|
|
|
//状态为1说明正常启动
|
|
|
- _this7.$app.url.goto('/pages/charging/charging?orderId=' + _this7.orderInfo.id + "&deviceId=" + _this7.deviceInfo.id, false);
|
|
|
+ _this9.$app.url.goto('/pages/charging/charging?orderId=' + _this9.orderInfo.id + "&deviceId=" + _this9.deviceInfo.id, false);
|
|
|
} else {
|
|
|
//其他状态,说明充电桩,未启动。或其他问题,需要再次进行进行验证
|
|
|
- if (_this7.checkNum < 20) {
|
|
|
- _this7.checkNum = _this7.checkNum + 1;
|
|
|
+ if (_this9.checkNum < 20) {
|
|
|
+ _this9.checkNum = _this9.checkNum + 1;
|
|
|
//延迟2s查询一下订单,看看是否真的启动成功
|
|
|
setTimeout(function () {
|
|
|
- return _this7.checkedStartStatus();
|
|
|
+ return _this9.checkedStartStatus();
|
|
|
}, 2000);
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
uni.hideLoading();
|
|
|
- _this7.$app.popup.alert(respObj.msg, "温馨提示");
|
|
|
+ _this9.$app.popup.alert(respObj.msg, "温馨提示");
|
|
|
}
|
|
|
} else {
|
|
|
uni.hideLoading();
|