|
@@ -9,7 +9,11 @@ Page({
|
|
noTaskShow:false,//今天无任务
|
|
noTaskShow:false,//今天无任务
|
|
taskListShow:false,//任务列表
|
|
taskListShow:false,//任务列表
|
|
taskList:[],
|
|
taskList:[],
|
|
- noticeShow:true,//通知栏展示
|
|
|
|
|
|
+ gzybgxShow:false,//通知栏展示
|
|
|
|
+ rwszShow:false,
|
|
|
|
+ rwgxShow:false,
|
|
|
|
+ fwbzszShow:false,
|
|
|
|
+ fwbzgxShow:false,
|
|
editModalShow:false,//编辑弹框
|
|
editModalShow:false,//编辑弹框
|
|
unSetModal:false,//未设置偏好
|
|
unSetModal:false,//未设置偏好
|
|
noSetSerHobby:false,//展示未设置服务偏好
|
|
noSetSerHobby:false,//展示未设置服务偏好
|
|
@@ -40,13 +44,20 @@ Page({
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
+ // this.initCustomerInfo();
|
|
|
|
+ // this.isChooseSerHobSubject();
|
|
|
|
+ // this.isChooseSerStanSubject();
|
|
|
|
+ // this.selectTodayTaskItem();
|
|
|
|
+ // this.getServantNotice();
|
|
|
|
+ },
|
|
|
|
+ onShow(query){
|
|
|
|
+ console.log(query);
|
|
|
|
+
|
|
this.initCustomerInfo();
|
|
this.initCustomerInfo();
|
|
this.isChooseSerHobSubject();
|
|
this.isChooseSerHobSubject();
|
|
this.isChooseSerStanSubject();
|
|
this.isChooseSerStanSubject();
|
|
this.selectTodayTaskItem();
|
|
this.selectTodayTaskItem();
|
|
- },
|
|
|
|
- onShow(query){
|
|
|
|
- console.log(query);
|
|
|
|
|
|
+ this.getServantNotice();
|
|
},
|
|
},
|
|
// 获取雇佣关系详情
|
|
// 获取雇佣关系详情
|
|
initCustomerInfo(){
|
|
initCustomerInfo(){
|
|
@@ -214,11 +225,6 @@ Page({
|
|
});
|
|
});
|
|
|
|
|
|
},
|
|
},
|
|
- closeNotice(){
|
|
|
|
- this.setData({
|
|
|
|
- noticeShow:false
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
switchTaskRemind(){
|
|
switchTaskRemind(){
|
|
// 跳转到任务提醒器页面
|
|
// 跳转到任务提醒器页面
|
|
my.navigateTo({
|
|
my.navigateTo({
|
|
@@ -254,6 +260,131 @@ Page({
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 获取保姆通知
|
|
|
|
+ getServantNotice(){
|
|
|
|
+ let params={
|
|
|
|
+ employRelationNo:app.globalData.employRelationNo,
|
|
|
|
+ userId:app.globalData.userInfo.id
|
|
|
|
+ }
|
|
|
|
+ request.httpServicePost(apiUrl.getServantNoticePath,params).then(data=>{
|
|
|
|
+ console.log('保姆通知');
|
|
|
|
+ console.log(data);
|
|
|
|
+
|
|
|
|
+ let gzybgx=(data.gzybgx.size>=1);
|
|
|
|
+ let rwsz=(data.rwsz.size>=1);
|
|
|
|
+ let rwgx=(data.rwgx.size>=1);
|
|
|
|
+ let fwbzsz=(data.fwbzsz.size>=1);
|
|
|
|
+ let fwbzgx=(data.fwbzgx.size>=1);
|
|
|
|
+ this.setData({
|
|
|
|
+ gzybgxShow:gzybgx,
|
|
|
|
+ rwszShow:rwsz,
|
|
|
|
+ rwgxShow:rwgx,
|
|
|
|
+ fwbzszShow:fwbzsz,
|
|
|
|
+ fwbzgxShow:fwbzgx,
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ }).catch(e=>{
|
|
|
|
+ console.log(e);
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 查看月报
|
|
|
|
+ async viewMonthReport(e){
|
|
|
|
+ try{
|
|
|
|
+ let data=await this.readNotice(e);
|
|
|
|
+ if(data!=undefined){
|
|
|
|
+ // my.navigateTo({
|
|
|
|
+ // url: '../monthReport/monthReport'
|
|
|
|
+ // });
|
|
|
|
+ }
|
|
|
|
+ }catch(e){
|
|
|
|
+ console.log(e);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 查看任务
|
|
|
|
+ async viewTaskReminder(e){
|
|
|
|
+ try{
|
|
|
|
+ let data=await this.readNotice(e);
|
|
|
|
+ if(data!=undefined){
|
|
|
|
+ my.navigateTo({
|
|
|
|
+ url: '../taskreminder/taskreminder'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }catch(e){
|
|
|
|
+ console.log(e);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ // 查看服务标准
|
|
|
|
+ async viewSerStan(e){
|
|
|
|
+ console.log(e);
|
|
|
|
+ try{
|
|
|
|
+ let data=await this.readNotice(e);
|
|
|
|
+ if(data!=undefined){
|
|
|
|
+ my.navigateTo({
|
|
|
|
+ url: '../servantdetail/servantdetail'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }catch(e){
|
|
|
|
+ console.log(e);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ async readNotice(e){
|
|
|
|
+ let type=e.target.dataset.noticeType;
|
|
|
|
+ console.log(type);
|
|
|
|
+ let params={
|
|
|
|
+ "employRelationNo": app.globalData.employRelationNo,
|
|
|
|
+ "noticeType": type,
|
|
|
|
+ "userId": app.globalData.userInfo.id
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ try{
|
|
|
|
+ let data=await request.httpServicePost(apiUrl.userReadNoticePath,params);
|
|
|
|
+ return data;
|
|
|
|
+ }catch(e){
|
|
|
|
+ console.log(e);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ async closeNotice(e){
|
|
|
|
+ console.log('关闭通知');
|
|
|
|
+ try{
|
|
|
|
+ let data=await this.readNotice(e);
|
|
|
|
+ console.log(data);
|
|
|
|
+ if(data!=undefined){
|
|
|
|
+ // 通知不展示
|
|
|
|
+ let type=e.target.dataset.noticeType;
|
|
|
|
+ console.log(type);
|
|
|
|
+ if(type=='bmybgx'){
|
|
|
|
+ this.setData({
|
|
|
|
+ bmybgxShow:false
|
|
|
|
+ })
|
|
|
|
+ }else if(type=='rwwfwc'){
|
|
|
|
+ this.setData({
|
|
|
|
+ rwwfwcShow:false
|
|
|
|
+ })
|
|
|
|
+ }else if(type=='phsz'){
|
|
|
|
+ this.setData({
|
|
|
|
+ phszShow:false
|
|
|
|
+ })
|
|
|
|
+ }else if(type=='phgx'){
|
|
|
|
+ this.setData({
|
|
|
|
+ phgxShow:false
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }catch(e){
|
|
|
|
+ console.log(e);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
});
|
|
});
|