|
|
@@ -1559,27 +1559,29 @@ Page({
|
|
|
this.getReportData();//更新报告
|
|
|
},
|
|
|
showPicker(e) {
|
|
|
- return //暂时不开放
|
|
|
+ // return //暂时不开放
|
|
|
// 不是今天不让选择
|
|
|
- // if (!this.data.isToDay) {
|
|
|
- // return
|
|
|
- // }
|
|
|
- // var type = e.currentTarget.dataset.type;
|
|
|
- // console.log(type);
|
|
|
-
|
|
|
- // if (type == 'sn' && this.data.sns.length) {
|
|
|
- // this.setData({
|
|
|
- // showSelectSn: true,
|
|
|
- // });
|
|
|
- // } else if (type == 'date' && this.data.dateData.length) {
|
|
|
- // this.setData({
|
|
|
- // showSelectDate: true,
|
|
|
- // });
|
|
|
- // } else if (type == 'dateTime' && this.data.dateTimeData.length) {
|
|
|
- // this.setData({
|
|
|
- // showSelectDateTime: true,
|
|
|
- // });
|
|
|
- // }
|
|
|
+ if (!this.data.isToDay) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ var type = e.currentTarget.dataset.type;
|
|
|
+ console.log(type);
|
|
|
+
|
|
|
+ if (type == 'sn' && this.data.sns.length) {
|
|
|
+ this.setData({
|
|
|
+ showSelectSn: true,
|
|
|
+ });
|
|
|
+ } else if (type == 'date' && this.data.dateData.length) {
|
|
|
+ return
|
|
|
+ // this.setData({
|
|
|
+ // showSelectDate: true,
|
|
|
+ // });
|
|
|
+ } else if (type == 'dateTime' && this.data.dateTimeData.length) {
|
|
|
+ return
|
|
|
+ // this.setData({
|
|
|
+ // showSelectDateTime: true,
|
|
|
+ // });
|
|
|
+ }
|
|
|
},
|
|
|
closePicker() {
|
|
|
this.setData({
|
|
|
@@ -1636,6 +1638,9 @@ Page({
|
|
|
},
|
|
|
success(res) {
|
|
|
if (!res || !res.data || !res.data.results || !res.data.results.length) {
|
|
|
+ that.setData({
|
|
|
+ isNoReportToday: true
|
|
|
+ })
|
|
|
return;
|
|
|
}
|
|
|
that.setData({
|
|
|
@@ -1647,6 +1652,9 @@ Page({
|
|
|
},
|
|
|
fail: function (error) {
|
|
|
console.error('error', error);
|
|
|
+ that.setData({
|
|
|
+ isNoReportToday: true
|
|
|
+ })
|
|
|
},
|
|
|
complete: function (e) {
|
|
|
}
|
|
|
@@ -1668,6 +1676,9 @@ Page({
|
|
|
success(res) {
|
|
|
// { "results": [{ "rpids": "459857", "durations": "14:17-17:55" }] }
|
|
|
if (!res || !res.data || !res.data.results || !res.data.results.length) {
|
|
|
+ that.setData({
|
|
|
+ isNoReportToday:true
|
|
|
+ })
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
@@ -1676,6 +1687,7 @@ Page({
|
|
|
});
|
|
|
if (isRefresh) {
|
|
|
that.setData({
|
|
|
+ isNoReportToday: false,
|
|
|
reportId: res.data.results[0].rpids
|
|
|
});
|
|
|
that.getReportData();
|
|
|
@@ -1684,6 +1696,9 @@ Page({
|
|
|
},
|
|
|
fail: function (error) {
|
|
|
console.error('error', error);
|
|
|
+ that.setData({
|
|
|
+ isNoReportToday: true
|
|
|
+ })
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
@@ -1787,7 +1802,7 @@ Page({
|
|
|
}, 1000);
|
|
|
});
|
|
|
|
|
|
- // that.getSnData();//需要筛选的 要获取sn
|
|
|
+ that.getSnData();//需要筛选的 要获取sn
|
|
|
} else {
|
|
|
wx.showModal({
|
|
|
title: '提示',
|