una пре 4 година
родитељ
комит
e9ce1e946e

+ 1 - 0
client/app.json

@@ -12,6 +12,7 @@
     "pages/common/selectRole/selectRole",
     "pages/customer/monthReport/monthReport",
     "pages/customer/editServant/editServant",
+     "pages/customer/taskreminder/taskreminder",
     "pages/servant/taskreminder/taskreminder",
     "pages/servant/servantlist/servantlist",
     "pages/common/userGuide/userGuide",

+ 2 - 2
client/pages/customer/customerCenter/customerCenter.axml

@@ -57,8 +57,8 @@
  </view>
 
  <!-- 任务提醒 -->
-  <view class="common-card task-module"  onTap="switchTaskRemind">
-     <view class="task-top">
+  <view class="common-card task-module"  >
+     <view class="task-top" onTap="switchTaskRemind">
       <view class="module-title">任务提醒
        <text class="task-schedule"  a:if="{{taskListShow}}">完成进度{{completeTaskCount}}/{{totalTaskCount}}</text>
       </view>

+ 3 - 3
client/pages/customer/customerCenter/customerCenter.js

@@ -230,9 +230,9 @@ Page({
   },
     switchTaskRemind(){
       // 跳转到任务提醒器页面
-  //  my.navigateTo({
-  //     url: '../dailytasks/dailytasks'
-  //   });
+   my.navigateTo({
+      url: '../taskreminder/taskreminder'
+    });
   },
   switchList(){
     my.navigateTo({

+ 10 - 1
client/pages/customer/monthReport/monthReport.axml

@@ -47,10 +47,19 @@
 
          </view>
 
+         <!-- 任务无法完成原因 -->
+           <view class="common-data-wrapper block-data-wrapper">
+              <image mode="widthFix" class="report-img" src="/image/report-08.png"/>
+             <view class="common-data shape-chart1">
+        <f2 onInit="onInitChart5"></f2>
+             </view>
+
+         </view>
+
 
         <!-- <image mode="widthFix" class="report-img" src="/image/report-04.jpg"/>
         <image mode="widthFix" class="report-img" src="/image/report-05.jpg"/> -->
         <!-- <image mode="widthFix" class="report-img" src="/image/report-06.jpg"/> -->
         <!-- <image mode="widthFix" class="report-img" src="/image/report-07.jpg"/> -->
-        <image mode="widthFix" class="report-img" src="/image/report-08.png"/>
+        <!-- <image mode="widthFix" class="report-img" src="/image/report-08.png"/> -->
 </view>

+ 32 - 0
client/pages/customer/monthReport/monthReport.js

@@ -253,6 +253,38 @@ chart.render();
     // 注意:需要把chart return 出来
     return chart;
   },
+   onInitChart5(F2, config) {
+
+  //任务无法完成原因
+    const chart = new F2.Chart(config);
+    const data = [
+      { value: 63.4, city: 'New York', date: '2011-10-01' },
+      { value: 62.7, city: 'Alaska', date: '2011-10-01' },
+      { value: 72.2, city: 'Austin', date: '2011-10-01' },
+      { value: 58, city: 'New York', date: '2011-10-02' },
+      { value: 59.9, city: 'Alaska', date: '2011-10-02' },
+      { value: 67.7, city: 'Austin', date: '2011-10-02' },
+      { value: 53.3, city: 'New York', date: '2011-10-03' },
+      { value: 59.1, city: 'Alaska', date: '2011-10-03' },
+      { value: 69.4, city: 'Austin', date: '2011-10-03' },
+    ];
+    chart.source(data, {
+      date: {
+        range: [0, 1],
+        type: 'timeCat',
+        mask: 'MM-DD'
+      },
+      value: {
+        max: 300,
+        tickCount: 4
+      }
+    });
+    chart.area().position('date*value').color('city').adjust('stack');
+    chart.line().position('date*value').color('city').adjust('stack');
+    chart.render();
+    // 注意:需要把chart return 出来
+    return chart;
+  },
    onInitChart0(F2, config) {
 
   //折线图

+ 247 - 0
client/pages/customer/taskreminder/taskreminder.acss

@@ -0,0 +1,247 @@
+.tasks-page{
+  padding-top: 0rpx;
+  background-color: #FFFFFF;
+}
+.tasks-head{
+  height: 185rpx;
+  background-color: #FFFFFF;
+  padding-left: 48rpx;
+}
+.cell-title{
+  color: #333333;
+  font-size: 32rpx;
+}
+.cell-title image{
+  width: 24rpx;
+  height: 16rpx;
+  margin-left: 9rpx;
+}
+.cell-list{
+  color: #999999;
+  font-size: 22rpx;
+}
+.cell-type{
+  color: #666666;
+  font-size: 28rpx;
+}
+.cell-right{
+  float: right;
+  width: 50%;
+  padding-right: 48rpx;
+  font-size: 24rpx;
+  color: #999999;
+  font-weight: normal;
+  text-align: right;
+}
+.tasks-line{
+  background-color: #F3F3F3;
+  border-top-right-radius: 28rpx;
+  border-top-left-radius: 28rpx;
+  padding-bottom: 25rpx;
+  padding-top: 26rpx;
+}
+.tasks-tik{
+  background-color: #FFFFFF;
+  margin-left: 23rpx;
+  margin-right: 24rpx;
+  border-radius: 12rpx;
+  padding-top: 29rpx;
+  padding-left: 24rpx;
+  height: 258rpx;
+  margin-bottom: 25rpx;
+}
+.tik-title{
+  color: #333333;
+  font-size: 48rpx;
+  font-weight: bold;
+}
+.tik-right{
+  color: #09AFFF;
+  float: right;
+  font-size: 20rpx;
+  height: 80rpx;
+  line-height: 80rpx;
+}
+.tik-right image{
+  width: 19.31rpx;
+  height: 20rpx;
+  margin-right: 6rpx;
+  margin-top: 30rpx;
+  float: left;
+}
+.tik-week-item{
+  float: left;
+  width: 14.2%;
+  color: #999999;
+  text-align: center;
+  height: 121rpx;
+  padding-top: 23rpx;
+}
+.tik-week-item-select{
+  background: rgba(9, 175, 255, 0.05);
+  color: #09AFFF;
+  border-radius: 12px;
+}
+.tik-week-item view{
+  padding-bottom: 20rpx;
+}
+.tasks-list{
+  margin-top: 56rpx;
+  background: #FFFFFF;
+  border-radius: 18px;
+  margin-left: 23rpx;
+  margin-right: 24rpx;
+  padding-top: 35rpx;
+  padding-bottom: 23rpx;
+}
+.tasks-list-item{
+  height: 100rpx;
+  background: #FAFAFA;
+  border-radius: 12px;
+  font-size: 28rpx;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #333333;
+  line-height: 100rpx;
+  padding-left: 28rpx;
+  margin-top: 30rpx;
+}
+.tasks-item-no{
+  width: 122rpx;
+  height: 102rpx;
+  float: right;
+  background-color:#fff6f4;
+}
+.tasks-item-yes{
+  width: 122rpx;
+  height: 102rpx;
+  float: right;
+  border-top-right-radius: 12rpx;
+  border-bottom-right-radius: 12rpx;
+  background-color:#f2fbff;
+}
+.tasks-list-item image{
+  width: 35rpx;
+  height: 35rpx;
+  margin-left: 44.5rpx;
+  margin-top: 33.5rpx;
+}
+.tast-moneybox{
+  height: 102rpx;
+  background-color: #F3F3F3;
+}
+.tasks-list-money{
+  height: 102rpx;
+  margin-top: 25rpx;
+  border-radius: 18px;
+  background: #FFFFFF;
+  margin-left: 23rpx;
+  margin-right: 24rpx;
+  width: 60%;
+  float: left;
+}
+.nogood{
+  width: 120rpx;
+  height: 31rpx;
+  background: #FFEDEA;
+  border-radius: 4px;
+  color: #FF5030;
+  font-size: 20rpx;
+  display: inline-block;
+  margin-left: 16rpx;
+  text-align: center;
+}
+.tasks-set{
+  float: right;
+  width: 27%;
+  margin-right: 24rpx;
+  height: 102rpx;
+  line-height: 102rpx;
+}
+.tasks-set button{
+  border-radius: 68rpx;
+  margin-top: 26rpx;
+}
+.tasks-list-pay{
+  font-weight: bold;
+  color: #333333;
+  font-size: 28rpx;
+  float: left;
+  width: 45%;
+  line-height: 102rpx;
+  padding-left: 24rpx;
+}
+.tasks-list-pay-right{
+  float: right;
+  width: 40%;
+  text-align: right;
+  padding-right: 5%;
+  height: 102rpx;
+  line-height: 102rpx;
+  font-weight: bold;
+}
+.tasks-list-pay-right input{
+  color: #09AFFF;
+  font-weight: normal;
+  width: 60%;
+  margin-top: 24rpx;
+}
+.tasks-list-pay-right text{
+  float: right;
+}
+.notasks{
+  margin: 21rpx 24rpx 30rpx 24rpx;
+  height: 327rpx;
+  line-height:  327rpx;
+  background: #FAFAFA;
+  border-radius: 12rpx;
+  text-align: center;
+  font-size: 36rpx;
+  color: #999999;
+}
+.cancel-box{
+  width: 100%;
+}
+.cancel-box label{
+  width: 100%;
+  text-align: left;
+  padding-left: 20%;
+  font-size: 26rpx;
+}
+.cancel-box text{
+  font-size: 46rpx;
+  font-weight: bold;
+  margin-bottom: 30rpx;
+  display: inline-block;
+}
+.radio{
+  width: 24rpx;
+  height: 24rpx;
+}
+radio-checked::before {
+  width: 24rpx;
+  height: 24rpx;
+  background-color: #09AFFF;
+}
+.cancel-box radio-group{
+  width: 100%;
+  margin-bottom: 67rpx;
+}
+.cancel-left{
+  width: 50%;
+  float: left;
+  height: 102rpx;
+  line-height: 102rpx;
+  border-top: 1rpx #e5e5e5 solid;
+  border-right: 1rpx #e5e5e5 solid;
+}
+.cancel-right{
+  float: right;
+  width: 49%;
+  height: 102rpx;
+  line-height: 102rpx;
+  border-top: 1rpx #e5e5e5 solid;
+  font-size: 36rpx;
+  color: #09AFFF;
+  font-weight: bold;
+}

+ 124 - 0
client/pages/customer/taskreminder/taskreminder.axml

@@ -0,0 +1,124 @@
+<view class="tasks-page">
+<!---客户信息-->
+    <view class="tasks-head">
+      <view class="cell-title">
+        <label>王阿姨</label>
+        <view class="cell-right">
+          <image mode="scaleToFill" src="/image/switch-grey.png"/>
+          <label>切换到其他家庭</label>
+        </view>
+      </view>
+      <view class="cell-list">
+        <label>周一▪</label>
+        <label>周二▪</label>
+        <label>周三▪</label>
+        <label>周四▪</label>
+        <label>周五▪</label>
+        <label>周六▪</label>
+        <label>周日</label>
+      </view>
+        <view class="cell-type">
+          保姆工种:<label>钟点工</label>
+        </view>
+      </view>
+      <!---一周任务查看器-->
+    <view class="tasks-line">
+      <view class="common-page-padding tasks-tik">
+        <view class="tik-title">
+          <label>今天</label>
+          <view class="tik-right" onTap="showtime">
+            <image mode="scaleToFill" src="/image/icon-calendar.png"/>
+            <label>查看其它日期</label>
+          </view>
+        </view>
+        <view class="tik-week" a:for="{{datelist}}" key="{{index}}">
+          <view class="tik-week-item {{item.cssName}}" onTap="changeWeekTime"  data-id="{{id}}">
+            <view>{{item.title}}</view>
+            <view>{{item.day}}
+            <text a:if={{item.cssName}}>\n▪</text>
+            </view>
+          </view>
+        </view>
+      </view>
+      <!--任务列表-->
+      <view class="common-page-padding tasks-list">
+        <view class="cell-title">
+          <label>任务提醒</label>
+          <view class="tik-right">
+            <image mode="scaleToFill" src="/image/icon-edit.png"/>
+            <label>编辑每日任务</label>
+          </view>
+        </view>
+        <!--有提醒任务-->
+        <view a:if="{{isreminds}}">
+          <view class="tasks-list-item">
+            <text>洗衣服</text>
+            <view class="tasks-item-yes">
+              <image mode="scaleToFill" src="/image/icon-yes.png"/>
+            </view>
+            <view class="tasks-item-no" onTap="showcancel">
+              <image mode="scaleToFill" src="/image/icon-no.png"/>
+            </view>
+          </view>
+          <view class="tasks-list-item">
+            <text>做完饭</text>
+            <view class="tasks-item-yes">
+              <image mode="scaleToFill" src="/image/icon-yes.png"/>
+            </view>
+            <view class="tasks-item-no" onTap="showcancel">
+              <image mode="scaleToFill" src="/image/icon-no.png"/>
+            </view>
+          </view>
+          <view class="tasks-list-item">
+            打扫卧室
+          </view>
+          <view class="tasks-list-item">
+            <text>打扫房间</text>
+            <label  class="nogood">任务不详细</label>
+            <view class="tasks-item-yes">
+              <image mode="scaleToFill" src="/image/icon-no.png"/>
+            </view>
+          </view>
+        </view>
+        <!--没有任务-->
+        <view  a:if="{{!isreminds}}">
+          <view class="notasks">
+            <text>还没有任务</text>
+          </view>
+        </view>
+      </view>
+      <!---没有任务花销计算不显示-->
+      <view a:if="{{isreminds}}" class="tast-moneybox">
+        <view class="tasks-list-money">
+          <view class="tasks-list-pay">今日花销合计</view>
+          <view class="tasks-list-pay-right"><input placeholder="请输入"/><text>元</text></view>
+        </view>
+         <view class="tasks-set">
+          <button type="primary"  hover-class="active-button"  onTap="createServant">提交</button>
+        </view>
+      </view>
+    </view>
+  <!---弹出日历--->
+  <modal show="{{showchangetime}}">
+    <calendar
+    type="single"
+    onSelect="handleSelect" />
+  </modal>
+  <!--弹出取消原因-->
+  <modal show="{{showcancelbox}}">
+    <view class="cancel-box">
+        <text>取消原因</text>
+        <radio-group class="radio-group weui-input">
+          <label a:for="{{cancellist}}"  a:key={{value}}>
+            <radio value="{{item.value}}" class="radio" checked="{{item.checked}}"/>{{item.label}}
+          </label>
+        </radio-group>
+    </view>
+    <view class="am-modal-buttons--vertical" onTap="hidecnacelbox" >
+      取消
+    </view>
+    <view class="am-modal-buttons--vertical">
+      确认选择
+    </view>
+  </modal>
+</view>

+ 92 - 0
client/pages/customer/taskreminder/taskreminder.js

@@ -0,0 +1,92 @@
+var util = require('../../../util/util.js')
+Page({
+  data: {
+    showchangetime:false,
+    nowselectTime:util.formatDate(new Date()),
+    datelist:[{title:"周一",date:0,cssName:'',id:1,day:0},{title:"周二",date:0,cssName:'',id:2,day:0},{title:"周三",date:0,cssName:'',id:3,day:0},{title:"周四",date:0,cssName:'',id:4,day:0},{title:"周五",date:0,cssName:'',id:5,day:0},{title:"周六",date:0,cssName:'',id:6,day:0},{title:"周天",date:0,cssName:'',id:7,day:0}],
+    isreminds:true,
+    showcancelbox:false,
+    cancellist:[{value:'1', label:'任务太多', checked:true},{value:'2', label:'我不会', checked:false},{value:'3', label:'任务不详细', checked:false}]
+  },
+  onLoad() {
+    //加载选中的时间
+    console.log(this.data.nowselectTime);
+    let that=this;
+    that.getWeekStartDate(this.data.nowselectTime);
+    let data = this.data.datelist;
+    for(let i=0;i<7;i++){
+      if(this.data.weekdateday[i]==this.data.nowDay){
+        data[i].date=this.data.weekdate[i];
+        data[i].day=this.data.weekdateday[i];
+        data[i].cssName='tik-week-item-select'
+      }
+      else{
+        data[i].date=this.data.weekdate[i];
+        data[i].day=this.data.weekdateday[i];
+      }
+    }
+    this.setData({
+      datelist: data
+    });
+    //处理时间完成
+  },
+  showcancel(){
+    this.setData({
+      showcancelbox: true
+    });
+  },
+  hidecnacelbox(){
+     this.setData({
+      showcancelbox: false
+    });
+  },
+  dateAdd:function(startDate,days) {
+  startDate = new Date(startDate);
+  startDate = +startDate + days * 1000 * 60 * 60 * 24;
+  startDate = new Date(startDate);
+  //var nextStartDate = startDate.getFullYear() + "-" + (startDate.getMonth() + 1) + "-" + startDate.getDate();
+  return startDate.getDate();
+},
+  datedayAdd:function(startDate,days) {
+  startDate = new Date(startDate);
+  startDate = +startDate + days * 1000 * 60 * 60 * 24;
+  startDate = new Date(startDate);
+  var nextStartDate = startDate.getFullYear() + "-" + (startDate.getMonth() + 1) + "-" + startDate.getDate();
+  
+  return nextStartDate;
+},
+   //获取本周的开始日期
+  getWeekStartDate(nowday) {
+    let that = this;
+    this.now = new Date(nowday);
+    this.nowYear = this.now.getFullYear(); //当前年 
+    this.nowMonth = this.now.getMonth(); //当前月 
+    this.nowDay = this.now.getDate(); //当前日 
+    this.setData({
+      nowDay:this.nowDay
+    });//保存当前日
+    this.nowDayOfWeek = this.now.getDay(); //今天是本周的第几天 
+    let dateStart = util.formatDate(new Date(this.nowYear, this.nowMonth, this.nowDay - this.nowDayOfWeek + 1));
+    
+    let weekdateday=[this.dateAdd(dateStart,0),this.dateAdd(dateStart,1),this.dateAdd(dateStart,2),this.dateAdd(dateStart,3),this.dateAdd(dateStart,4),this.dateAdd(dateStart,5),this.dateAdd(dateStart,6)];
+    let weekdate=[this.datedayAdd(dateStart,0),this.datedayAdd(dateStart,1),this.datedayAdd(dateStart,2),this.datedayAdd(dateStart,3),this.datedayAdd(dateStart,4),this.datedayAdd(dateStart,5),this.datedayAdd(dateStart,6)];
+    this.setData({
+      weekdate: weekdate,
+      weekdateday:weekdateday
+    })
+
+  },
+  changeWeekTime(e){
+    console.log(e.target.id);
+    let changetime=e.target;
+  },
+  
+  showtime(){
+    this.setData({
+      showchangetime: true,
+    });
+  },
+  handleSelect(e) {
+      console.log(e[0]);
+  },
+});

+ 7 - 0
client/pages/customer/taskreminder/taskreminder.json

@@ -0,0 +1,7 @@
+{
+  "defaultTitle":"任务提醒器",
+  "usingComponents":{
+    "calendar": "mini-antui/es/calendar/index",
+    "modal": "mini-ali-ui/es/modal/index"
+  }
+}

+ 2 - 2
client/pages/servant/servantCenter/servantCenter.axml

@@ -60,8 +60,8 @@
      </view>
  </view>
  <!-- 任务提醒 -->
-  <view class="common-card task-module" onTap="switchTaskRemind">
-     <view class="task-top">
+  <view class="common-card task-module" >
+     <view class="task-top" onTap="switchTaskRemind">
       <view class="module-title">任务提醒
        <text class="task-schedule"  a:if="{{taskListShow}}">完成进度{{completeTaskCount}}/{{totalTaskCount}}</text>
       </view>