Bläddra i källkod

Merge branch 'master' of http://47.102.110.240:3000/yuxiangpei/tbServantMini_cloud into master

yangyongyong 4 år sedan
förälder
incheckning
ffa177913b

+ 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({

+ 4 - 1
client/pages/customer/monthReport/monthReport.acss

@@ -60,4 +60,7 @@
 }
 .shape-chart1{
   padding:100rpx 40rpx 40rpx;
-}
+}
+.shape-chart2{
+  padding:260rpx 40rpx 40rpx;
+}

+ 21 - 5
client/pages/customer/monthReport/monthReport.axml

@@ -31,19 +31,35 @@
 
            <view class="common-data-wrapper block-data-wrapper">
               <image mode="widthFix" class="report-img" src="/image/report-05.jpg"/>
-             <view class="common-data shape-chart">
-        <f2 onInit="onInitChart1"></f2>
+             <view class="common-data shape-chart2">
+        <f2 onInit="onInitChart2"></f2>
              </view>
 
          </view>
+        <!-- 任务完成趋势图 -->
+        <image mode="widthFix" class="report-img" src="/image/report-06.jpg"/>  
+          <!-- 任务完成详细情况 -->
+           <view class="common-data-wrapper block-data-wrapper">
+              <image mode="widthFix" class="report-img" src="/image/report-07.jpg"/>
+             <view class="common-data shape-chart1">
+        <f2 onInit="onInitChart4"></f2>
+             </view>
 
+         </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-06.jpg"/> -->
+        <!-- <image mode="widthFix" class="report-img" src="/image/report-07.jpg"/> -->
+        <!-- <image mode="widthFix" class="report-img" src="/image/report-08.png"/> -->
 </view>

+ 166 - 11
client/pages/customer/monthReport/monthReport.js

@@ -84,12 +84,12 @@ chart
   .interval()
   .position('a*proportion')
   .color('name', [
-    '#1890FF',
-    '#13C2C2',
-    '#2FC25B',
-    '#FACC14',
-    '#F04864',
-    '#8543E0',
+    '#EB6F49',
+    '#00D98B',
+    '#FDB628',
+    '#0091F1',
+    '#00E4EC',
+    '#8256E8',
   ])
   .adjust('stack');
   chart.guide()
@@ -97,11 +97,11 @@ chart
     position: [ '50%', '50%' ],
     style:{
      fill:'#7ED4F6',
-    fontSize:'13',
+    fontSize:'12',
     },
-    content: `本月共
-    ${taskNum}条任务`,
-    rotate: Math.PI / 4,
+    content: ` 本月共
+  ${taskNum}条任务`,
+  
      limitInPlot:true,
   });
 chart.pieLabel({
@@ -130,7 +130,162 @@ chart.render();
     // 注意:需要把chart return 出来
     return chart;
   },
-   onInitChart2(F2, config) {
+  onInitChart2(F2, config) {
+    //  本月任务完成情况
+   const chart = new F2.Chart(config);
+   let taskNum=this.data.taskNum;
+
+// chart.plugins.register([ PieLabel ]);
+    const data = [
+  { name: '打扫房间', proportion: 0.4, a: '1' },
+  { name: '打扫厨房', proportion: 0.2, a: '1' },
+  { name: '带孩子', proportion: 0.18, a: '1' },
+  { name: '照顾老人', proportion: 0.15, a: '1' },
+  { name: '清洁厨房', proportion: 0.05, a: '1' },
+  { name: '其他', proportion: 0.02, a: '1' },
+];
+
+chart.source(data);
+chart.legend(false);
+chart.coord('polar', {
+  transposed: true,
+});
+chart.axis(false);
+chart
+  .interval()
+  .position('a*proportion')
+  .color('name', [
+    '#EB6F49',
+    '#00D98B',
+    '#FDB628',
+    '#0091F1',
+    '#00E4EC',
+    '#8256E8',
+  ])
+  .adjust('stack');
+ 
+chart.pieLabel({
+  sidePadding: 30,
+  activeShape: true,
+  label1: function label1(data) {
+    return {
+      text: data.name,
+      fill: '#7ED4F6',
+      fontWeight: 'bold'
+    };
+  },
+  label2: function label2(data) {
+    return {
+      text: data.proportion,
+      fill: '#7ED4F6'
+    };
+  },
+   onClick: function onClick(ev) {
+    console.log(ev.data) ;
+    
+  }
+  });
+chart.render();
+   
+    // 注意:需要把chart return 出来
+    return chart;
+  },
+  onInitChart4(F2, config) {
+    //  任务类完成详细情况
+    //  本月任务分布饼状图
+   const chart = new F2.Chart(config);
+   let taskNum=this.data.taskNum;
+
+// chart.plugins.register([ PieLabel ]);
+    const data = [
+  { name: '打扫房间', proportion: 0.4, a: '1' },
+  { name: '打扫厨房', proportion: 0.2, a: '1' },
+  { name: '带孩子', proportion: 0.18, a: '1' },
+  { name: '照顾老人', proportion: 0.15, a: '1' },
+  { name: '清洁厨房', proportion: 0.05, a: '1' },
+  { name: '其他', proportion: 0.02, a: '1' },
+];
+
+chart.source(data);
+
+chart.legend({
+  position: 'left'
+});
+chart.coord('polar', {
+  transposed: true,
+  innerRadius: 0.5,
+});
+chart.axis(false);
+chart
+  .interval()
+  .position('a*proportion')
+  .color('name', [
+    '#EB6F49',
+    '#00D98B',
+    '#FDB628',
+    '#0091F1',
+    '#00E4EC',
+    '#8256E8',
+  ])
+  .adjust('stack')
+   .style({
+    lineWidth: 1,
+    stroke: '#4413A0',
+    lineJoin: 'round',
+    lineCap: 'round'
+  });
+  chart.guide()
+  .text({
+    position: [ '50%', '50%' ],
+    style:{
+     fill:'#7ED4F6',
+    fontSize:'12',
+    backgroundColor:'#fff',
+    },
+    content: `完成
+占比`,
+  
+     limitInPlot:true,
+  });
+
+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) {
 
   //折线图
     const chart = new F2.Chart(config);

+ 19 - 26
client/pages/customer/servantdetail/servantdetail.axml

@@ -6,43 +6,36 @@
     <text>保姆还未设置偏好</text>
   </view>
 </view>
- <!--已经设置过保姆偏好-->
+<!--已经设置过保姆偏好-->
 <view a:if="{{isservantsettinged}}">
   <view class="common-page-padding servantdetail-servant-page">
     <!---阿姨类型--->
     <view class="common-card servantdetailitem">
       <view class="cell-title">
-      <label>{{servantName}}</label>
-      <image mode="scaleToFill" src="/image/icon-edit.png"/>
+        <label>{{servantName}}</label>
+        <image mode="scaleToFill" src="/image/icon-edit.png"/>
       </view>
       <view class="cell-list">
-       <view class="work-day">{{weekday}}</view>
-      </view>
-      <view class="cell-type">
-        <view class="service-model">保姆工种:{{formate.serviceType(servantTypeValue)}}</view>
+        <view class="work-day">{{weekday}}</view>
       </view>
+      <view class="cell-type">保姆工种:{{formate.serviceType(servantTypeValue)}}</view>
     </view>
-    <!---阿姨类型--->
-    <view class="common-card servantdetailitem">
-      <view class="cell-title">做饭类</view>
-      <view class="servant-list">
-        <view class="good-list">
-          <view>1. 您擅长做的菜系?</view>
-          <view class="good-item-list">粤菜</view>
+    <view >
+      <!-- 保姆列表 -->
+      <view class="common-card servantdetailitem">
+        <view a:for="{{servantDescribleList}}" key="{{index}}">
+          <view class="servant-list">
+            <view class="good-list">
+              <view class="good-item-list">{{item}}</view>
+            </view>
+          </view>
         </view>
       </view>
-      <view class="servant-list">
-        <view class="good-list">
-          <view>1. 您擅长做的菜系?</view>
-          <view class="good-item-list">粤菜</view>
-        </view>
-      </view>
-      <view class="servant-list">
-        <view class="good-list">
-          <view>1. 您擅长做的菜系?</view>
-          <view class="good-item-list">粤菜</view>
+      <!-- 暂无保姆 -->
+      <view a:if="{{noServantList}}">
+        <view class="no-content-wrapper">
+          <image mode="aspectFill" src="/image/no-content.png"/>
         </view>
       </view>
     </view>
-  </view>
-</view>
+  </view>

+ 39 - 8
client/pages/customer/servantdetail/servantdetail.js

@@ -3,16 +3,47 @@ import apiUrl from '../../../util/apiUrl'
 var app = getApp();
 Page({
   data: {
-    isservantsettinged:true,
-    servantName:'',//保姆姓名
-    weekday:'',//日前
-    servantTypeValue:''//保姆工种
+    isservantsettinged: true,
+    servantName: '',//保姆姓名
+    weekday: '',//日前
+    servantTypeValue: '',//保姆工种,
+    servantDescribleList: [],
+    noServantList:false,
   },
   onLoad() {
     this.setData({
-      servantName:app.globalData.relationInfo.servantName,
-      weekday:app.globalData.relationInfo.servantTaskPeriod.workDay,
-      servantTypeValue:app.globalData.relationInfo.servantType
-    })
+      servantName: app.globalData.relationInfo.servantName,
+      weekday: app.globalData.relationInfo.servantTaskPeriod.workDay,
+      servantTypeValue: app.globalData.relationInfo.servantType
+    }),
+      console.log("employRelationNo=" + app.globalData.employRelationNo)
+    this.initServantDescribleInfo()
   },
+  initServantDescribleInfo() {
+    let params = {
+      "employRelationNo": app.globalData.employRelationNo,
+      "subjectType": "SN000002",
+      "userType": "1"
+    }
+    request.httpServicePost(apiUrl.customerDescribleInfo, params).then(data => {
+      console.log("保姆描述信息=" + data.length);
+      if (data.length == 0) {
+        this.setData({
+          noServantList: true,
+          servantDescribleList:[]
+        });
+      } else {
+        console.log("aaa" + data[0])
+        this.setData({
+          noServantList: false,
+          servantDescribleList:data
+        });
+      }
+      
+
+    }).catch(e => {
+      console.log(e);
+
+    })
+  }
 });

+ 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>

+ 22 - 30
client/pages/servant/servantdetail/servantdetail.axml

@@ -1,3 +1,4 @@
+<import-sjs from="../../../util/formateFuc.sjs" name="formate"></import-sjs>
 <!--未设置保姆偏好-->
 <view a:if="{{!isservantsettinged}}">
   <view class="nosettingservaent">
@@ -5,49 +6,40 @@
     <text>保姆还未设置偏好</text>
   </view>
 </view>
- <!--已经设置过保姆偏好-->
+<!--已经设置过保姆偏好-->
 <view a:if="{{isservantsettinged}}">
   <view class="common-page-padding servantdetail-servant-page">
     <!---阿姨类型--->
     <view class="common-card servantdetailitem">
       <view class="cell-title">
-      <label>王阿姨</label>
-      <image mode="scaleToFill" src="/image/icon-edit.png"/>
+        <label>{{servantName}}</label>
+        <image mode="scaleToFill" src="/image/icon-edit.png"/>
       </view>
       <view class="cell-list">
-        <label>周一▪</label>
-        <label>周二▪</label>
-        <label>周三▪</label>
-        <label>周四▪</label>
-        <label>周五▪</label>
-        <label>周六▪</label>
-        <label>周日</label>
+        <view class="work-day">{{weekday}}</view>
       </view>
       <view class="cell-type">
-        保密工种:<label>钟点工</label>
+        <view class="service-model">保姆工种:{{formate.serviceType(servantTypeValue)}}</view>
       </view>
     </view>
-    <!---阿姨类型--->
-    <view class="common-card servantdetailitem">
-      <view class="cell-title">做饭类</view>
-      <view class="servant-list">
-        <view class="good-list">
-          <view>1. 您擅长做的菜系?</view>
-          <view class="good-item-list">粤菜</view>
+    <view >
+      <!-- 保姆列表 -->
+      <view a:if="{{!noServantList}}">
+        <view class="common-card servantdetailitem">
+          <view a:for="{{servantDescribleList}}" key="{{index}}">
+            <view class="servant-list">
+              <view class="good-list">
+                <view class="good-item-list">{{item}}</view>
+              </view>
+            </view>
+          </view>
         </view>
       </view>
-      <view class="servant-list">
-        <view class="good-list">
-          <view>1. 您擅长做的菜系?</view>
-          <view class="good-item-list">粤菜</view>
-        </view>
-      </view>
-      <view class="servant-list">
-        <view class="good-list">
-          <view>1. 您擅长做的菜系?</view>
-          <view class="good-item-list">粤菜</view>
+      <!-- 暂无保姆 -->
+      <view a:if="{{noServantList}}">
+        <view class="no-content-wrapper">
+          <image mode="aspectFill" src="/image/no-content.png"/>
         </view>
       </view>
     </view>
-  </view>
-</view>
+  </view>

+ 45 - 2
client/pages/servant/servantdetail/servantdetail.js

@@ -1,6 +1,49 @@
+import request from '../../../util/http'
+import apiUrl from '../../../util/apiUrl'
+var app = getApp();
 Page({
   data: {
-    isservantsettinged:true
+    isservantsettinged: true,
+    servantName: '',//保姆姓名
+    weekday: '',//日前
+    servantTypeValue: '',//保姆工种,
+    servantDescribleList: [],
+    noServantList:false,
   },
-  onLoad() {},
+  onLoad() {
+    this.setData({
+      servantName: app.globalData.relationInfo.servantName,
+      weekday: app.globalData.relationInfo.servantTaskPeriod.workDay,
+      servantTypeValue: app.globalData.relationInfo.servantType
+    }),
+      console.log("employRelationNo=" + app.globalData.employRelationNo)
+    this.initServantDescribleInfo()
+  },
+  initServantDescribleInfo() {
+    let params = {
+      "employRelationNo": app.globalData.employRelationNo,
+      "subjectType": "SN000002",
+      "userType": "1"
+    }
+    request.httpServicePost(apiUrl.servantDescribleInfo, params).then(data => {
+      console.log("保姆描述信息=" + data.length);
+      if (data.length == 0) {
+        this.setData({
+          noServantList: true,
+          servantDescribleList:[]
+        });
+      } else {
+        console.log("aaa" + data[0])
+        this.setData({
+          noServantList: false,
+          servantDescribleList:data
+        });
+      }
+      
+
+    }).catch(e => {
+      console.log(e);
+
+    })
+  }
 });

+ 1 - 1
client/pages/servant/servantdetail/servantdetail.json

@@ -1,3 +1,3 @@
 {
-  "defaultTitle":"阿姨偏好"
+  "defaultTitle":"服务标准"
 }

+ 6 - 2
client/util/apiUrl.js

@@ -49,8 +49,10 @@ const getServantNoticePath=baseService+'/notice/getServantNotice';
 
 //POST  /notice/userReadNotice    读取通知 传 雇佣关系编号,用户id,通知类型
 const userReadNoticePath=baseService+'/notice/userReadNotice';
-//保姆偏好的详情info
-const servantDescribleInfo = baseService + "/servantlove/getStandardsDescribe"
+//雇主保姆偏好的详情info
+const customerDescribleInfo = baseService + "/servantlove/getStandardsDescribe"
+//保姆端的偏好描述
+const servantDescribleInfo = baseService + "/servicestandard/getStandardsDescribe";
 
 
 export default{
@@ -73,5 +75,7 @@ updateEmploySetStatePath,
 getEmployerNoticePath,
 getServantNoticePath,
 userReadNoticePath,
+customerDescribleInfo,
 servantDescribleInfo
+
 }