|
@@ -748,22 +748,30 @@
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- if (res.data.message == '该订单已结算,请勿重复结算') {
|
|
|
|
|
|
|
+ if (res.data.message.indexOf('已结算') != -1 || res.data.message.indexOf('结算成功') != -1) {
|
|
|
// 显示已经关闭图标
|
|
// 显示已经关闭图标
|
|
|
_this.airs[index].status = '状态:';
|
|
_this.airs[index].status = '状态:';
|
|
|
- _this.airs[index].on = false;
|
|
|
|
|
_this.airs[index].time = '设备已结算';
|
|
_this.airs[index].time = '设备已结算';
|
|
|
|
|
+
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ uni.hideLoading();
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // "该空调开启时长超过5天,请联系管理员关闭"
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ title: res.data.message,
|
|
|
|
|
+ duration: 3000,
|
|
|
|
|
+ success() {
|
|
|
|
|
+ _this.airs[index].status = '状态:';
|
|
|
|
|
+ _this.airs[index].time = _this.time_string;
|
|
|
|
|
+
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ uni.hideLoading();
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
- uni.showToast({
|
|
|
|
|
- icon: 'none',
|
|
|
|
|
- title: res.data.message,
|
|
|
|
|
- duration: 3000,
|
|
|
|
|
- success() {
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- uni.hideLoading();
|
|
|
|
|
- }, 1000);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -783,8 +791,9 @@
|
|
|
title: '开启中...',
|
|
title: '开启中...',
|
|
|
mask: true
|
|
mask: true
|
|
|
});
|
|
});
|
|
|
|
|
+ var _this = this;
|
|
|
const res = await this.$myRequest({
|
|
const res = await this.$myRequest({
|
|
|
- host: this.ceshi,
|
|
|
|
|
|
|
+ host: _this.ceshi,
|
|
|
url: '/airManage/consumestart.action',
|
|
url: '/airManage/consumestart.action',
|
|
|
method: 'POST',
|
|
method: 'POST',
|
|
|
header: {
|
|
header: {
|
|
@@ -814,9 +823,8 @@
|
|
|
} else {
|
|
} else {
|
|
|
// console.log(res.data);
|
|
// console.log(res.data);
|
|
|
if (res.data.code == 200) {
|
|
if (res.data.code == 200) {
|
|
|
- let _this = this;
|
|
|
|
|
// 获取订单号
|
|
// 获取订单号
|
|
|
- this.airs[index].order_num = res.data.order_num
|
|
|
|
|
|
|
+ _this.airs[index].order_num = res.data.order_num
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '开启成功!',
|
|
title: '开启成功!',
|
|
|
duration: 2000,
|
|
duration: 2000,
|
|
@@ -831,16 +839,29 @@
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
- uni.showToast({
|
|
|
|
|
- icon: 'none',
|
|
|
|
|
- title: res.data.message,
|
|
|
|
|
- duration: 2000,
|
|
|
|
|
- success() {
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- uni.hideLoading();
|
|
|
|
|
- }, 1000);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ // "设备已被其他人使用"
|
|
|
|
|
+ if (res.data.message.indexOf('已被其他人使用') != -1 || res.data.message.indexOf('请勿重复开启' != -1)) {
|
|
|
|
|
+ // 显示已经关闭图标
|
|
|
|
|
+ _this.airs[index].status = '状态:';
|
|
|
|
|
+ _this.airs[index].time = _this.time_string;
|
|
|
|
|
+
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ uni.hideLoading();
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ icon: 'none',
|
|
|
|
|
+ title: res.data.message,
|
|
|
|
|
+ duration: 2000,
|
|
|
|
|
+ success() {
|
|
|
|
|
+ _this.airs[index].status = '状态:';
|
|
|
|
|
+ _this.airs[index].time = res.data.message;
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ uni.hideLoading();
|
|
|
|
|
+ }, 1000);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|