|
@@ -21,7 +21,9 @@ Page({
|
|
[]
|
|
[]
|
|
],
|
|
],
|
|
value: [0, 0],
|
|
value: [0, 0],
|
|
- weiguiList: []
|
|
|
|
|
|
+ state: '',
|
|
|
|
+ listTitle: '无进出记录人员',
|
|
|
|
+ list: []
|
|
},
|
|
},
|
|
|
|
|
|
getCurrentDate: function(e) {
|
|
getCurrentDate: function(e) {
|
|
@@ -96,6 +98,7 @@ Page({
|
|
listDept: res.data
|
|
listDept: res.data
|
|
})
|
|
})
|
|
that.getStatisticsInfo();
|
|
that.getStatisticsInfo();
|
|
|
|
+ that.getUnOut();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -203,32 +206,142 @@ Page({
|
|
|
|
|
|
getUnInInfo: function(e) {
|
|
getUnInInfo: function(e) {
|
|
const that = this;
|
|
const that = this;
|
|
- util.httpRequest(api.getUnInfo, {
|
|
|
|
|
|
+ util.httpRequest(api.getUnInInfo, {
|
|
start: that.data.startDate,
|
|
start: that.data.startDate,
|
|
end: that.data.endDate,
|
|
end: that.data.endDate,
|
|
page: 1,
|
|
page: 1,
|
|
rows: 20
|
|
rows: 20
|
|
}, 'post').then(res => {
|
|
}, 'post').then(res => {
|
|
that.setData({
|
|
that.setData({
|
|
- weiguiList: res.data.data.data
|
|
|
|
|
|
+ list: res.data.data.data
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
getOutAndInInfo: function(e) {
|
|
getOutAndInInfo: function(e) {
|
|
const that = this;
|
|
const that = this;
|
|
|
|
+ let deptId;
|
|
|
|
+ if (that.data.listDept != '') {
|
|
|
|
+ deptId = that.data.listDept[that.data.value[1]].deptId
|
|
|
|
+ } else {
|
|
|
|
+ deptId = that.data.listCollege[that.data.value[0]].deptId
|
|
|
|
+ }
|
|
util.httpRequest(api.getOutAndInInfo, {
|
|
util.httpRequest(api.getOutAndInInfo, {
|
|
startDate: that.data.startDate,
|
|
startDate: that.data.startDate,
|
|
endDate: that.data.endDate,
|
|
endDate: that.data.endDate,
|
|
page: 1,
|
|
page: 1,
|
|
- rows: 20
|
|
|
|
|
|
+ rows: 20,
|
|
|
|
+ deptId: deptId,
|
|
|
|
+ state: that.data.state
|
|
}, 'post').then(res => {
|
|
}, 'post').then(res => {
|
|
that.setData({
|
|
that.setData({
|
|
|
|
+ list: res.data.data.data
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
|
|
|
|
+ getUnOut: function(e) {
|
|
|
|
+ const that = this;
|
|
|
|
+ let deptId;
|
|
|
|
+ if (that.data.listDept != '') {
|
|
|
|
+ deptId = that.data.listDept[that.data.value[1]].deptId
|
|
|
|
+ } else {
|
|
|
|
+ deptId = that.data.listCollege[that.data.value[0]].deptId
|
|
|
|
+ }
|
|
|
|
+ util.httpRequest(api.getUnOut, {
|
|
|
|
+ start: that.data.startDate,
|
|
|
|
+ end: that.data.endDate,
|
|
|
|
+ page: 1,
|
|
|
|
+ rows: 20,
|
|
|
|
+ deptId: deptId
|
|
|
|
+ }, 'post').then(res => {
|
|
|
|
+ that.setData({
|
|
|
|
+ list: res.data.data.data
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ getLateIn: function(e) {
|
|
|
|
+ const that = this;
|
|
|
|
+ let deptId;
|
|
|
|
+ if (that.data.listDept != '') {
|
|
|
|
+ deptId = that.data.listDept[that.data.value[1]].deptId
|
|
|
|
+ } else {
|
|
|
|
+ deptId = that.data.listCollege[that.data.value[0]].deptId
|
|
|
|
+ }
|
|
|
|
+ util.httpRequest(api.getLateIn, {
|
|
|
|
+ start: that.data.startDate,
|
|
|
|
+ end: that.data.endDate,
|
|
|
|
+ page: 1,
|
|
|
|
+ rows: 20,
|
|
|
|
+ deptId: deptId
|
|
|
|
+ }, 'post').then(res => {
|
|
|
|
+ that.setData({
|
|
|
|
+ list: res.data.data.data
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ getInUnOut: function(e) {
|
|
|
|
+ const that = this;
|
|
|
|
+ let deptId;
|
|
|
|
+ if (that.data.listDept != '') {
|
|
|
|
+ deptId = that.data.listDept[that.data.value[1]].deptId
|
|
|
|
+ } else {
|
|
|
|
+ deptId = that.data.listCollege[that.data.value[0]].deptId
|
|
|
|
+ }
|
|
|
|
+ util.httpRequest(api.getInUnOunt, {
|
|
|
|
+ start: that.data.startDate,
|
|
|
|
+ end: that.data.endDate,
|
|
|
|
+ page: 1,
|
|
|
|
+ rows: 20,
|
|
|
|
+ deptId: deptId
|
|
|
|
+ }, 'post').then(res => {
|
|
|
|
+ that.setData({
|
|
|
|
+ list: res.data.data.data
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ qiehuan: function(e) {
|
|
|
|
+ const that = this;
|
|
|
|
+ let type = e.currentTarget.dataset.type;
|
|
|
|
+ let state = e.currentTarget.dataset.state;
|
|
|
|
+ if (type == 1) {
|
|
|
|
+ that.setData({
|
|
|
|
+ listTitle: '无进出记录人员'
|
|
|
|
+ })
|
|
|
|
+ that.getUnOut();
|
|
|
|
+ } else if (type == 2) {
|
|
|
|
+ that.setData({
|
|
|
|
+ listTitle: '已出宿舍人员',
|
|
|
|
+ state: state
|
|
|
|
+ })
|
|
|
|
+ that.getOutAndInInfo();
|
|
|
|
+ } else if (type == 3) {
|
|
|
|
+ that.setData({
|
|
|
|
+ listTitle: '已归宿舍人员',
|
|
|
|
+ state: state
|
|
|
|
+ })
|
|
|
|
+ that.getOutAndInInfo();
|
|
|
|
+ } else if (type == 4) {
|
|
|
|
+ that.setData({
|
|
|
|
+ listTitle: '晚归宿舍人员'
|
|
|
|
+ })
|
|
|
|
+ that.getLateIn();
|
|
|
|
+ } else if (type == 5) {
|
|
|
|
+ that.setData({
|
|
|
|
+ listTitle: '未归宿舍人员'
|
|
|
|
+ })
|
|
|
|
+ that.getUnInInfo();
|
|
|
|
+ } else if (type == 6) {
|
|
|
|
+ that.setData({
|
|
|
|
+ listTitle: '未出宿舍人员'
|
|
|
|
+ })
|
|
|
|
+ that.getInUnOut();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 生命周期函数--监听页面加载
|
|
* 生命周期函数--监听页面加载
|
|
*/
|
|
*/
|
|
@@ -237,8 +350,6 @@ Page({
|
|
that.getCurrentDate();
|
|
that.getCurrentDate();
|
|
that.data.userInfo = wx.getStorageSync('user');
|
|
that.data.userInfo = wx.getStorageSync('user');
|
|
that.getCollegeInfo();
|
|
that.getCollegeInfo();
|
|
- that.getUnInInfo();
|
|
|
|
- that.getOutAndInInfo();
|
|
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|