|
@@ -1207,6 +1207,8 @@ Page({
|
|
|
sns: [],//床
|
|
sns: [],//床
|
|
|
dateData: [],//日期
|
|
dateData: [],//日期
|
|
|
dateTimeData: [],//时间段
|
|
dateTimeData: [],//时间段
|
|
|
|
|
+ selectTitleList: [],//床垫
|
|
|
|
|
+ showSelect: false,
|
|
|
showSelectSn: false,
|
|
showSelectSn: false,
|
|
|
showSelectDate: false,
|
|
showSelectDate: false,
|
|
|
showSelectDateTime: false,
|
|
showSelectDateTime: false,
|
|
@@ -1538,6 +1540,21 @@ Page({
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
+ onTitleChange(event) {
|
|
|
|
|
+ const { picker, value, index } = event.detail;
|
|
|
|
|
+ console.log(`当前值:${value.rpid}, 当前索引:${index}`);
|
|
|
|
|
+ console.log(`当前值:${value.bedname}, 当前索引:${index}`);
|
|
|
|
|
+ console.log(`当前值:${value.hotelname}, 当前索引:${index}`);
|
|
|
|
|
+ console.log(`当前值:${value.roomname}, 当前索引:${index}`);
|
|
|
|
|
+ this.setData({
|
|
|
|
|
+ reportId: value.rpid,
|
|
|
|
|
+ hotelname: value.hotelname,
|
|
|
|
|
+ roomname: value.roomname,
|
|
|
|
|
+ bedname: value.bedname,
|
|
|
|
|
+ });
|
|
|
|
|
+ this.closePicker();
|
|
|
|
|
+ this.getReportData();//更新报告
|
|
|
|
|
+ },
|
|
|
onSnChange(event) {
|
|
onSnChange(event) {
|
|
|
const { picker, value, index } = event.detail;
|
|
const { picker, value, index } = event.detail;
|
|
|
console.log(`当前值:${value.sn}, 当前索引:${index}`);
|
|
console.log(`当前值:${value.sn}, 当前索引:${index}`);
|
|
@@ -1570,10 +1587,14 @@ Page({
|
|
|
var type = e.currentTarget.dataset.type;
|
|
var type = e.currentTarget.dataset.type;
|
|
|
console.log(type);
|
|
console.log(type);
|
|
|
|
|
|
|
|
- if (type == 'sn' && this.data.sns.length) {
|
|
|
|
|
|
|
+ if (type == 'sn' && this.data.selectTitleList.length) {
|
|
|
this.setData({
|
|
this.setData({
|
|
|
- showSelectSn: true,
|
|
|
|
|
|
|
+ showSelect: true,
|
|
|
});
|
|
});
|
|
|
|
|
+ } else if (type == 'sn' && this.data.sns.length) {
|
|
|
|
|
+ // this.setData({
|
|
|
|
|
+ // showSelectSn: true,
|
|
|
|
|
+ // });
|
|
|
} else if (type == 'date' && this.data.dateData.length) {
|
|
} else if (type == 'date' && this.data.dateData.length) {
|
|
|
return
|
|
return
|
|
|
// this.setData({
|
|
// this.setData({
|
|
@@ -1588,11 +1609,35 @@ Page({
|
|
|
},
|
|
},
|
|
|
closePicker() {
|
|
closePicker() {
|
|
|
this.setData({
|
|
this.setData({
|
|
|
|
|
+ showSelect: false,
|
|
|
showSelectSn: false,
|
|
showSelectSn: false,
|
|
|
showSelectDate: false,
|
|
showSelectDate: false,
|
|
|
showSelectDateTime: false
|
|
showSelectDateTime: false
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ getAllUnionidList() {
|
|
|
|
|
+ var that = this;
|
|
|
|
|
+ wx.request({
|
|
|
|
|
+ url: `${aipushApi}` + '/allunionidlist',
|
|
|
|
|
+ data: {
|
|
|
|
|
+ "udi": wx.getStorageSync("unionid"),
|
|
|
|
|
+ "token": token_today_push
|
|
|
|
|
+ },
|
|
|
|
|
+ method: 'POST',
|
|
|
|
|
+ success(res) {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const tempList = res.data.data || []
|
|
|
|
|
+ that.setData({
|
|
|
|
|
+ selectTitleList: tempList,
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error(error);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ },
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
getSnData() {
|
|
getSnData() {
|
|
|
var that = this;
|
|
var that = this;
|
|
|
wx.request({
|
|
wx.request({
|
|
@@ -1927,6 +1972,7 @@ Page({
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
that.getSnData();//需要筛选的 要获取sn
|
|
that.getSnData();//需要筛选的 要获取sn
|
|
|
|
|
+ that.getAllUnionidList();
|
|
|
} else {
|
|
} else {
|
|
|
// wx.showModal({
|
|
// wx.showModal({
|
|
|
// title: '提示',
|
|
// title: '提示',
|