Browse Source

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

fuxubing 4 years ago
parent
commit
0d5eee9938

+ 8 - 6
client/app.json

@@ -6,22 +6,24 @@
     "pages/servant/servantCenter/servantCenter",
     "pages/customer/createServant/createServant",
     "pages/customer/dailytasks/dailytasks",
-     "pages/customer/servantdetail/servantdetail",
+    "pages/customer/servantdetail/servantdetail",
     "pages/servant/servantdetail/servantdetail",
     "pages/customer/customerCenter/customerCenter",
     "pages/common/selectRole/selectRole",
     "pages/customer/monthReport/monthReport",
     "pages/customer/editServant/editServant",
-     "pages/customer/taskreminder/taskreminder",
+    "pages/customer/taskreminder/taskreminder",
     "pages/servant/taskreminder/taskreminder",
     "pages/servant/servantlist/servantlist",
+    "pages/customer/servantlist/servantlist",
     "pages/common/userGuide/userGuide",
-    "pages/servant/servantsettings/servantsettings"
+    "pages/customer/servantsettings/servantsettings",
+    "pages/servant/servantsettings/servantsettings",
+    "pages/customer/reportList/reportList"
   ],
   "window": {
     "defaultTitle": "保姆管家",
-    "navigationBarTextStyle":"black",
-    "titleBarColor":"#F3F3F3"
-
+    "navigationBarTextStyle": "black",
+    "titleBarColor": "#F3F3F3"
   }
 }

+ 18 - 15
client/pages/customer/customerCenter/customerCenter.js

@@ -267,6 +267,9 @@ Page({
       unSetServiceModal: false,
     });
     // 跳转到服务标准页面
+     my.navigateTo({
+      url: '../servantsettings/servantsettings'
+    });
   
     }else{
       // 提醒设置任务
@@ -311,15 +314,15 @@ Page({
   },
    // 跳转到服务标准页面
   switchSerStandard(){
-//       if(this.data.noSetSerStan){
-//  my.navigateTo({
-//       url: '../servantsettings/servantsettings'
-//     });
-//       }else{
-//          my.navigateTo({
-//       url: '../servantlist/servantlist'
-//     });
-//       }
+      if(this.data.noSetSerStan){
+ my.navigateTo({
+      url: '../servantsettings/servantsettings'
+    });
+      }else{
+         my.navigateTo({
+      url: '../servantlist/servantlist'
+    });
+      }
     
   },
     switchSerHobby(){
@@ -406,9 +409,9 @@ Page({
     try{
        let  data=await this.readNotice(e);
        if(data!=undefined){
-    // my.navigateTo({
-    //   url: '../monthReport/monthReport'
-    // });
+    my.navigateTo({
+      url: '../taskreminder/taskreminder'
+    });
        }
       }catch(e){
          console.log(e);
@@ -421,9 +424,9 @@ Page({
      try{
        let  data=await this.readNotice(e);
        if(data!=undefined){
-    // my.navigateTo({
-    //   url: '../monthReport/monthReport'
-    // });
+      my.navigateTo({
+      url: '../servantdetail/servantdetail'
+    });
        }
       }catch(e){
          console.log(e);

+ 3 - 0
client/pages/customer/monthReport/monthReport.acss

@@ -64,3 +64,6 @@
 .shape-chart2{
   padding:260rpx 40rpx 40rpx;
 }
+.shape-chart5{
+  padding:80rpx 40rpx 80rpx;
+}

+ 56 - 63
client/pages/customer/monthReport/monthReport.axml

@@ -1,65 +1,58 @@
 <view class="report-wrapper">
-      <!-- <view class="f2-chart">
-      <f2 onInit="onInitChart"></f2>
-    </view>
-     <view class="f2-chart">
-      <f2 onInit="onInitChart2"></f2>
-    </view> -->
-        <image mode="widthFix" class="report-img" src="/image/report-01.jpg"/>
-         <view class="common-data-wrapper block-data-wrapper">
-             <image mode="widthFix" class="report-img" src="/image/report-02.jpg"/>
-             <view class="common-data">
-                <view>——保姆服务月度回顾——</view>
-                <view class="report-date">{{reportDate}}</view>
-                <view class="service-day">[{{servantName}}]已服务您<text>{{serviceDay}}</text>天啦!</view>
-                <view class="percent-top">您的保姆服务质量超过全国<text>{{percentTop}}</text>的家庭</view>
-             </view>
-         </view>
-        <image mode="widthFix" class="report-img" src="/image/report-03.jpg"/>
-        <!-- 本月花销合计 -->
-       <view  class="expend-total">
-          您的保姆本月服务花销共计 <text>{{expendTotal}}</text> 元
-       </view>
-
-         <view class="common-data-wrapper block-data-wrapper">
-              <image mode="widthFix" class="report-img" src="/image/report-04.jpg"/>
-             <view class="common-data shape-chart1">
-        <f2 onInit="onInitChart1"></f2>
-             </view>
-
-         </view>
-
-           <view class="common-data-wrapper block-data-wrapper">
-              <image mode="widthFix" class="report-img" src="/image/report-05.jpg"/>
-             <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"/> -->
+     <!--<view class="f2-chart"><f2 onInit="onInitChart"></f2></view><view class="f2-chart"><f2 onInit="onInitChart2"></f2></view> -->
+     <image mode="widthFix" class="report-img" src="/image/report-01.jpg"/>
+     <view class="common-data-wrapper block-data-wrapper">
+          <image mode="widthFix" class="report-img" src="/image/report-02.jpg"/>
+          <view class="common-data">
+               <view>——保姆服务月度回顾——</view>
+               <view class="report-date">{{reportDate}}</view>
+               <view class="service-day">[{{servantName}}]已服务您
+                    <text>{{serviceDay}}</text>天啦!</view>
+               <view class="percent-top">您的保姆服务质量超过全国
+                    <text>{{percentTop}}</text>的家庭</view>
+          </view>
+     </view>
+     <image mode="widthFix" class="report-img" src="/image/report-03.jpg"/>
+     <!-- 本月花销合计 -->
+     <view class="expend-total">
+          您的保姆本月服务花销共计
+          <text>{{expendTotal}}</text> 元
+     </view>
+     <view class="common-data-wrapper block-data-wrapper">
+          <image mode="widthFix" class="report-img" src="/image/report-04.jpg"/>
+          <view class="common-data shape-chart1">
+               <f2 onInit="onInitChart1"></f2>
+          </view>
+     </view>
+     <view class="common-data-wrapper block-data-wrapper">
+          <image mode="widthFix" class="report-img" src="/image/report-05.jpg"/>
+          <view class="common-data shape-chart2">
+               <f2 onInit="onInitChart2"></f2>
+          </view>
+     </view>
+     <!-- 任务完成趋势图 -->
+     <view class="common-data-wrapper block-data-wrapper">
+          <image mode="widthFix" class="report-img" src="/image/report-06.jpg"/>
+          <view class="common-data shape-chart1">
+               <f2 onInit="onInitChart3"></f2>
+          </view>
+     </view>
+     <!-- 任务完成详细情况 -->
+     <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-chart5">
+               <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"/> -->
 </view>

+ 369 - 226
client/pages/customer/monthReport/monthReport.js

@@ -8,286 +8,429 @@ const PieLabel = require('@antv/f2/lib/plugin/pie-label'); // 引入 PieLabel 
 F2.Chart.plugins.register(PieLabel);
 Page({
   data: {
-    reportDate:'2020年11月',
-    servantName:'王阿姨',
-    serviceDay:'28',
-    percentTop:'88%',
-    expendTotal:'1888',
-    taskNum:'60',
+    reportDate: '2020年11月',
+    servantName: '王阿姨',
+    serviceDay: '28',
+    percentTop: '88%',
+    expendTotal: '1888',
+    taskNum: '60',
   },
   onLoad() {
 
   },
-   onInitChart(F2, config) {
+  onInitChart(F2, config) {
     //  饼状图
-const chart = new F2.Chart(config);
+    const chart = new F2.Chart(config);
     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' },
-];
+      { 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: 'right'
-});
-chart.coord('polar', {
-  transposed: true,
-  innerRadius: 0.7,
-});
-chart.axis(false);
-chart
-  .interval()
-  .position('a*proportion')
-  .color('name', [
-    '#1890FF',
-    '#13C2C2',
-    '#2FC25B',
-    '#FACC14',
-    '#F04864',
-    '#8543E0',
-  ])
-  .adjust('stack');
+    chart.source(data);
+    chart.legend({
+      position: 'right'
+    });
+    chart.coord('polar', {
+      transposed: true,
+      innerRadius: 0.7,
+    });
+    chart.axis(false);
+    chart
+      .interval()
+      .position('a*proportion')
+      .color('name', [
+        '#1890FF',
+        '#13C2C2',
+        '#2FC25B',
+        '#FACC14',
+        '#F04864',
+        '#8543E0',
+      ])
+      .adjust('stack');
+
+    chart.render();
 
-chart.render();
-   
     // 注意:需要把chart return 出来
     return chart;
   },
 
   onInitChart1(F2, config) {
     //  本月任务分布饼状图
-   const chart = new F2.Chart(config);
-   let taskNum=this.data.taskNum;
+    const chart = new F2.Chart(config);
+    let taskNum = this.data.taskNum;
 
-// chart.plugins.register([ PieLabel ]);
+    // 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' },
-];
+      { 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,
-  innerRadius: 0.5,
-});
-chart.axis(false);
-chart
-  .interval()
-  .position('a*proportion')
-  .color('name', [
-    '#EB6F49',
-    '#00D98B',
-    '#FDB628',
-    '#0091F1',
-    '#00E4EC',
-    '#8256E8',
-  ])
-  .adjust('stack');
-  chart.guide()
-  .text({
-    position: [ '50%', '50%' ],
-    style:{
-     fill:'#7ED4F6',
-    fontSize:'12',
-    },
-    content: ` 本月共
+    chart.source(data);
+    chart.legend(false);
+    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');
+    chart.guide()
+      .text({
+        position: ['50%', '50%'],
+        style: {
+          fill: '#7ED4F6',
+          fontSize: '12',
+        },
+        content: ` 本月共
   ${taskNum}条任务`,
-  
-     limitInPlot:true,
-  });
-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();
-   
+
+        limitInPlot: true,
+      });
+    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;
   },
   onInitChart2(F2, config) {
     //  本月任务完成情况
-   const chart = new F2.Chart(config);
-   let taskNum=this.data.taskNum;
+    const chart = new F2.Chart(config);
+    let taskNum = this.data.taskNum;
 
-// chart.plugins.register([ PieLabel ]);
+    // 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' },
-];
+      { 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'
-    };
+    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;
   },
-  label2: function label2(data) {
-    return {
-      text: data.proportion,
-      fill: '#7ED4F6'
-    };
+   onInitChart3(F2, config) {
+
+    //任务完成趋势图
+    const chart = new F2.Chart(config);
+ const data = [{
+  time: '2016-08-08 00:00:00',
+  value: 10,
+  type: '预期收益率'
+}, {
+  time: '2016-08-08 00:10:00',
+  value: 22,
+  type: '预期收益率'
+}, {
+  time: '2016-08-08 00:30:00',
+  value: 16,
+  type: '预期收益率'
+}, {
+  time: '2016-08-09 00:35:00',
+  value: 26,
+  type: '预期收益率'
+}, {
+  time: '2016-08-09 01:00:00',
+  value: 12,
+  type: '预期收益率'
+}, {
+  time: '2016-08-09 01:20:00',
+  value: 26,
+  type: '预期收益率'
+}, {
+  time: '2016-08-10 01:40:00',
+  value: 18,
+  type: '预期收益率'
+}, {
+  time: '2016-08-10 02:00:00',
+  value: 26,
+  type: '预期收益率'
+}, {
+  time: '2016-08-10 02:20:00',
+  value: 12,
+  type: '预期收益率'
+}, {
+  time: '2016-08-08 00:00:00',
+  value: 4,
+  type: '实际收益率'
+}, {
+  time: '2016-08-08 00:10:00',
+  value: 3,
+  type: '实际收益率'
+}, {
+  time: '2016-08-08 00:30:00',
+  value: 6,
+  type: '实际收益率'
+}, {
+  time: '2016-08-09 00:35:00',
+  value: -12,
+  type: '实际收益率'
+}, {
+  time: '2016-08-09 01:00:00',
+  value: 1,
+  type: '实际收益率'
+}, {
+  time: '2016-08-09 01:20:00',
+  value: 9,
+  type: '实际收益率'
+}, {
+  time: '2016-08-10 01:40:00',
+  value: 13,
+  type: '实际收益率'
+}, {
+  time: '2016-08-10 02:00:00',
+  value: -3,
+  type: '实际收益率'
+}, {
+  time: '2016-08-10 02:20:00',
+  value: 11,
+  type: '实际收益率'
+}];
+    chart.source(data, {
+      time: {
+    type: 'timeCat',
+    tickCount: 3,
+    mask: 'hh:mm',
+    range: [ 0, 1 ]
   },
-   onClick: function onClick(ev) {
-    console.log(ev.data) ;
-    
+  value: {
+    tickCount: 3,
+    formatter: function formatter(ivalue) {
+      return ivalue + '%';
+    }
   }
-  });
+    });
+    // chart.tooltip({
+    //   showItemMarker: false,
+    //   onShow: function onShow(ev) {
+    //     const items = ev.items;
+    //     items[0].name = null;
+    //     items[0].name = items[0].title;
+    //     items[0].value = '¥ ' + items[0].value;
+    //   }
+    // });
+  chart.axis('time', {
+  line: null,
+  label: function label(text, index, total) {
+    const textCfg = {};
+    if (index === 0) {
+      textCfg.textAlign = 'left';
+    } else if (index === total - 1) {
+      textCfg.textAlign = 'right';
+    }
+    return textCfg;
+  }
+});
+chart.axis('tem', {
+  grid: function grid(text) {
+    if (text === '0%') {
+      return {
+        lineDash: null,
+        lineWidth: 1
+      };
+    }
+  }
+});
+chart.legend({
+  position: 'bottom',
+  offsetY: -5
+});
+chart.line()
+  .position('time*value')
+  .color('type');
+  
+
 chart.render();
-   
     // 注意:需要把chart return 出来
     return chart;
   },
   onInitChart4(F2, config) {
     //  任务类完成详细情况
-    //  本月任务分布饼状图
-   const chart = new F2.Chart(config);
-   let taskNum=this.data.taskNum;
+    const chart = new F2.Chart(config);
+    let taskNum = this.data.taskNum;
 
-// chart.plugins.register([ PieLabel ]);
+    // 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' },
-];
+      { 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.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: `完成
+    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();
-   
+        limitInPlot: true,
+      });
+
+    chart.render();
+
     // 注意:需要把chart return 出来
     return chart;
   },
-   onInitChart5(F2, config) {
+  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' },
-    ];
+    const data = [{
+      year: '2014 年',
+      sales: 145
+    }, {
+      year: '2015 年',
+      sales: 121
+    }, {
+      year: '2016 年',
+      sales: 100
+    }, {
+      year: '2017 年',
+      sales: 97
+    }, {
+      year: '2018 年',
+      sales: 85
+    }];
     chart.source(data, {
-      date: {
-        range: [0, 1],
-        type: 'timeCat',
-        mask: 'MM-DD'
-      },
-      value: {
-        max: 300,
-        tickCount: 4
+      sales: {
+        tickCount: 5
       }
     });
-    chart.area().position('date*value').color('city').adjust('stack');
-    chart.line().position('date*value').color('city').adjust('stack');
+    // chart.tooltip({
+    //   showItemMarker: false,
+    //   onShow: function onShow(ev) {
+    //     const items = ev.items;
+    //     items[0].name = null;
+    //     items[0].name = items[0].title;
+    //     items[0].value = '¥ ' + items[0].value;
+    //   }
+    // });
+    chart.interval()
+      .position('year*sales')
+      .color('l(90) 0:#FBEC9F 1:#F3D34D'); // 定义柱状图渐变色
     chart.render();
     // 注意:需要把chart return 出来
     return chart;
   },
-   onInitChart0(F2, config) {
+  onInitChart0(F2, config) {
 
-  //折线图
+    //折线图
     const chart = new F2.Chart(config);
     const data = [
       { value: 63.4, city: 'New York', date: '2011-10-01' },

+ 24 - 0
client/pages/customer/reportList/reportList.acss

@@ -0,0 +1,24 @@
+.servantlistpage{
+  padding-top: 27rpx;
+}
+.servantlistitem{
+  height: 102rpx;
+  line-height: 102rpx;
+  background: #FFFFFF;
+  border-radius: 18rpx;
+  font-size: 28rpx;
+  font-weight: bold;
+  margin-bottom: 17rpx;
+}
+.servantlistitem image{
+  width: 9.75rpx;
+  height: 17.2rpx;
+}
+.servantlistitem-left{
+  float: left;
+  padding-left: 28rpx;
+}
+.servantlistitem-right{
+  float: right;
+  padding-right: 31rpx;
+}

+ 16 - 0
client/pages/customer/reportList/reportList.axml

@@ -0,0 +1,16 @@
+<view class="common-page-padding servantlistpage">
+<!---服务列表-->
+  <view class="servantlistitem">
+     <view class="servantlistitem-left">1月月报</view>
+     <view class="servantlistitem-right">
+      <image mode="scaleToFill" src="/image/icon-right.png"/>
+     </view>
+  </view>
+  <view class="servantlistitem">
+     <view class="servantlistitem-left">2月月报</view>
+     <view class="servantlistitem-right">
+      <image mode="scaleToFill" src="/image/icon-right.png"/>
+     </view>
+  </view>
+  
+</view>

+ 4 - 0
client/pages/customer/reportList/reportList.js

@@ -0,0 +1,4 @@
+Page({
+  data: {},
+  onLoad() {},
+});

+ 3 - 0
client/pages/customer/reportList/reportList.json

@@ -0,0 +1,3 @@
+{
+  "defaultTitle":"月报列表"
+}

+ 35 - 0
client/pages/customer/servantlist/servantlist.acss

@@ -0,0 +1,35 @@
+.servantlistpage{
+  padding-top: 27rpx;
+}
+.servantlistitem{
+  height: 102rpx;
+  line-height: 102rpx;
+  background: #FFFFFF;
+  border-radius: 18rpx;
+  font-size: 28rpx;
+  font-weight: bold;
+  margin-bottom: 17rpx;
+}
+.servantlistitem image{
+  width: 9.75rpx;
+  height: 17.2rpx;
+}
+.servantlistitem-left{
+  float: left;
+  padding-left: 28rpx;
+}
+.servantlistitem-right{
+  float: right;
+  padding-right: 31rpx;
+}
+.noset{
+  width: 78rpx;
+  height: 31rpx;
+  background: #FFEDEA;
+  border-radius: 4px;
+  color: #FF5030;
+  font-size: 20rpx;
+  display: inline-block;
+  margin-left: 16rpx;
+  text-align: center;
+}

+ 30 - 0
client/pages/customer/servantlist/servantlist.axml

@@ -0,0 +1,30 @@
+<view class="common-page-padding servantlistpage">
+<!---服务列表-->
+  <view class="servantlistitem">
+     <view class="servantlistitem-left">打扫类</view>
+     <view class="servantlistitem-right">
+      <image mode="scaleToFill" src="/image/icon-right.png"/>
+     </view>
+  </view>
+  <view class="servantlistitem">
+     <view class="servantlistitem-left">做饭类</view>
+     <view class="servantlistitem-right">
+      <image mode="scaleToFill" src="/image/icon-right.png"/>
+     </view>
+  </view>
+  <view class="servantlistitem">
+     <view class="servantlistitem-left">
+      打扫类
+      <!-- <label class="noset">未设置</label> -->
+     </view>
+     <view class="servantlistitem-right">
+      <image mode="scaleToFill" src="/image/icon-right.png"/>
+     </view>
+  </view>
+  <view class="servantlistitem">
+     <view class="servantlistitem-left">做饭类</view>
+     <view class="servantlistitem-right">
+      <image mode="scaleToFill" src="/image/icon-right.png"/>
+     </view>
+  </view>
+</view>

+ 4 - 0
client/pages/customer/servantlist/servantlist.js

@@ -0,0 +1,4 @@
+Page({
+  data: {},
+  onLoad() {},
+});

+ 1 - 0
client/pages/customer/servantlist/servantlist.json

@@ -0,0 +1 @@
+{}

+ 103 - 0
client/pages/customer/servantsettings/servantsettings.acss

@@ -0,0 +1,103 @@
+.servant-settings-page{
+  background-color: #F3F3F3;
+}
+.servant-setting-header{
+  height: 62rpx;
+  line-height: 62rpx;
+  background-color: #E6F7FF;
+  color: #09AFFF;
+  padding-left: 35rpx;
+  padding-right: 24rpx;
+  font-size: 22rpx;
+}
+.notice-style{
+  width: 23rpx;
+  height: 22rpx;
+  margin-right: 10rpx;
+  float: left;
+  margin-top: 21rpx;
+}
+.close-stle{
+  width: 17.87rpx;
+  height: 17.87rpx;
+  float: right;
+  margin-top: 20rpx;
+}
+.setting-list{
+  background: #FFFFFF;
+  border-radius: 18px;
+  margin: 25.99rpx 24rpx 20rpx 24rpx;
+}
+.setting-list-title{
+  color: #333333;
+  font-size: 32rpx;
+  font-weight: bold;
+  text-align: center;
+  height: 80rpx;
+  line-height: 80rpx;
+  padding-right: 24rpx; 
+}
+.setting-list-title text{
+  font-size: 26rpx;
+  float: right;
+}
+.setting-list-titlelabel{
+  width: 72prx;
+  height: 80rpx;
+  font-size: 24rpx;
+  font-weight: 400;
+  color: #999999;
+  line-height: 80rpx;
+  display: inline-block;
+  float: left;
+  margin-left: 24rpx;
+}
+.icon-left{
+  width: 9rpx;
+  height: 16rpx;
+  margin-right: 7rpx;
+}
+.setting-list-item{
+  padding-left: 44rpx;
+  padding-top: 37rpx;
+  border-top: 1rpx solid #EEEEEE;
+  padding-bottom: 37rpx;
+}
+.item-title{
+  color: #333333;
+  font-size: 28rpx;
+  font-weight: bold;
+  height: 28rpx;
+  line-height: 28rpx;
+  margin-bottom: 31rpx;
+  display: inline-block;
+}
+.item-body{
+  margin-bottom: 24rpx;
+  padding-left: 20rpx;
+}
+
+.item-body textarea{
+  background-color: #EEEEEE;
+  border: none;
+  height: 110rpx;
+  margin-left: 40rpx;
+  margin-right: 86rpx;
+  color: #CCCCCC;
+  font-size: 24rpx;
+  padding: 12rpx;
+  width: 80%;
+}
+.checkbox {
+  display: block;
+  margin-bottom: 20rpx;
+}
+
+button + button {
+  margin-top: 32rpx;
+}
+
+.checkbox-text {
+  font-size:34rpx;
+  line-height: 1.2;
+}

+ 47 - 0
client/pages/customer/servantsettings/servantsettings.axml

@@ -0,0 +1,47 @@
+<view class="servant-settings-page">
+<!--服务设置-->
+  <view class="servant-setting-header">
+    <image mode="scaleToFill" src="/image/notice-blue.png" class="notice-style"/>
+    <text>您可以查看保姆偏好,双向沟通更清晰</text>
+    <image mode="scaleToFill" src="/image/close-blue.png" class="close-stle"/>
+  </view>
+  <!--服务列表-->
+  <view class="setting-list" a:for="{{servantlist}}" key="{{index}}">
+    <view a:if="{{item.show}}" class="setting-list-title" data-id="{{item.subtypeNo}}">
+      <view class="setting-list-titlelabel" data-id="{{item.subtypeNo}}" onTap="{{item.index >1?'loadclasslist':''}}">
+      <image a:if="{{item.index >1}}" class="icon-left" mode="scaleToFill" src="/image/icon-left.png"/>
+      {{item.index >1?'上一类':''}}
+      </view>
+      {{item.subjectType}}
+      <text>{{item.index}}/ {{servantlist.length}}</text>
+    </view>
+    <view a:if="{{item.show}}" class="setting-list-item" a:for="{{item.subjectList}}" a:for-item="subjectitem" key="{{subjectindex}}">
+      <view  a:if="{{subjectitem.isChoose}}" >
+        <text class="item-title">{{subjectitem.subject}}</text>
+          <view a:if="{{subjectitem.chooseType==1}}"> <!---单选-->
+            <checkbox-group onChange="answerselectedSingle"  data-id="{{subjectitem.subjectId}}">
+              <label class="checkbox" a:for="{{subjectitem.answer}}"  a:for-item="answeritem" key="label-{{answerindex}}">
+                <checkbox value="{{answeritem.answer}}" checked="{{answeritem.isChoose}}" color="#09AFFF" />
+                <text class="checkbox-text">{{answeritem.answer}}</text>
+              </label>
+            </checkbox-group>                             
+          </view>
+          <view a:if="{{subjectitem.chooseType==2}}"><!---多选-->
+            <checkbox-group onChange="answerselected"  data-id="{{subjectitem.subjectId}}">
+              <label class="checkbox" a:for="{{subjectitem.answer}}"  a:for-item="answeritem" key="label-{{answerindex}}">
+                <checkbox value="{{answeritem.answer}}" checked="{{answeritem.isChoose}}" color="#09AFFF" />
+                <text class="checkbox-text">{{answeritem.answer}}</text>
+              </label>
+            </checkbox-group>                             
+          </view>
+      </view>
+      <view class="item-body" a:if="{{subjectitem.isCustom==1}}">
+        <textarea placeholder="请输入文字" onBlur="customanswer" data-id="{{subjectitem.subjectId}}">{{subjectitem.customAnswer}}</textarea>
+      </view>
+    </view>
+  <!--提交按钮-->
+  <view  a:if="{{item.show}}" class="common-button-wrapper">
+     <button type="primary"  data-id="{{item.subtypeNo}}" class="common-button" hover-class="active-button" onTap="{{item.button=='完成'?'dailytasksdeit':'loadclasslistadd'}}" >{{item.button}}</button>
+  </view>
+  </view>
+</view>

+ 184 - 0
client/pages/customer/servantsettings/servantsettings.js

@@ -0,0 +1,184 @@
+import request from '../../../util/http'
+import apiUrl from '../../../util/apiUrl1'
+import util from '../../../util/util'
+import moment from 'moment'
+var app = getApp();
+
+Page({
+  data: {
+    servantlist:[],
+  },
+  onLoad() {
+    this.getservantlist("SN000002");
+  },
+  ///加载绑定数据
+  getservantlist(subjectType){
+     request.httpServiceGet(apiUrl.servantappletservicePath,{subjectType:subjectType}).then(data=>{
+        //console.log(data);
+        let servantlist = data;
+        var that = this;
+        for(let i=0;i<servantlist.length;i++){
+          if(i==0){
+          servantlist[i].show=true;
+          }
+          else{
+          servantlist[i].show=false;
+          }
+          if(i==(servantlist.length-1)) {
+             servantlist[i].button="完成";
+          }else{
+            servantlist[i].button="下一步";
+          }
+          servantlist[i].index=i+1;
+        }
+        this.setData({
+          servantlist: servantlist
+        });
+      });
+  },
+  //提交数据
+  dailytasksdeit(){
+    let employRelationNo = app.globalData.employRelationNo;
+    let servantselectedlist=[];
+    for(let i=0;i<this.data.servantlist.length;i++){
+        for(let j=0;j<this.data.servantlist[i].subjectList.length;j++){
+          let answerstr='';
+            for(let t=0;t<this.data.servantlist[i].subjectList[j].answer.length;t++){
+                if(this.data.servantlist[i].subjectList[j].answer[t].isChoose){
+                  answerstr += this.data.servantlist[i].subjectList[j].answer[t].answer+',';
+                }
+            }
+          //console.log(answerstr);
+          servantselectedlist.push({answer: [answerstr],customAnswer: this.data.servantlist[i].subjectList[j].subject,subjectId: this.data.servantlist[i].subjectList[j].subjectId});
+        }
+    }
+        //console.log(servantselectedlist);
+      request.httpServicePost(apiUrl.insertNewservantappletservicePath,{employRelationNo:employRelationNo,subjectList:servantselectedlist,subjectType:"SN000002"}).then(data=>{
+        my.alert({
+          title: data,
+        });
+      });
+  },
+  //选择问题 多选
+  answerselected(e){
+    let checkedlist=e.detail.value;
+    let servantlist=this.data.servantlist;
+    //先做清除
+    for(let i=0;i<servantlist.length;i++){
+        for(let j=0;j<servantlist[i].subjectList.length;j++){
+          if(servantlist[i].subjectList[j].subjectId==e.target.dataset.id){
+            for(let t=0;t<servantlist[i].subjectList[j].answer.length;t++){
+                servantlist[i].subjectList[j].answer[t].isChoose=0;
+            }
+          }
+        }
+    }
+    //添加选中
+    for(let i=0;i<servantlist.length;i++){
+        for(let j=0;j<servantlist[i].subjectList.length;j++){
+          if(servantlist[i].subjectList[j].subjectId==e.target.dataset.id){
+            for(let t=0;t<servantlist[i].subjectList[j].answer.length;t++){
+              for(let u=0;u<checkedlist.length;u++){
+                if(checkedlist[u]==servantlist[i].subjectList[j].answer[t].answer){
+                  servantlist[i].subjectList[j].answer[t].isChoose=1;
+                }
+              }
+            }
+          }
+        }
+    }
+    this.setData({
+      servantlist: servantlist
+    })
+  },
+  //问题选择单选
+  answerselectedSingle(e){
+    let checkedlist=e.detail.value;
+    let servantlist=this.data.servantlist;
+    //先做清除
+    for(let i=0;i<servantlist.length;i++){
+        for(let j=0;j<servantlist[i].subjectList.length;j++){
+          if(servantlist[i].subjectList[j].subjectId==e.target.dataset.id){
+            for(let t=0;t<servantlist[i].subjectList[j].answer.length;t++){
+                servantlist[i].subjectList[j].answer[t].isChoose=0;
+            }
+          }
+        }
+    }
+    //添加选中
+    for(let i=0;i<servantlist.length;i++){
+        for(let j=0;j<servantlist[i].subjectList.length;j++){
+          if(servantlist[i].subjectList[j].subjectId==e.target.dataset.id){
+            for(let t=0;t<servantlist[i].subjectList[j].answer.length;t++){
+              for(let u=0;u<checkedlist.length;u++){
+                if(checkedlist[u]==servantlist[i].subjectList[j].answer[t].answer){
+                  servantlist[i].subjectList[j].answer[t].isChoose=1;
+                }
+                else {
+                  servantlist[i].subjectList[j].answer[t].isChoose=0;
+                }
+              }
+            }
+          }
+        }
+    }
+    this.setData({
+      servantlist: servantlist
+    })
+  },
+  //自定义问题
+  customanswer(e){
+    console.log(e.target.dataset.id);
+    let servantlist=this.data.servantlist;
+    for(let i=0;i<servantlist.length;i++){
+        for(let j=0;j<servantlist[i].subjectList.length;j++){
+          if(servantlist[i].subjectList[j].subjectId==e.target.dataset.id){
+              servantlist[i].subjectList[j].customAnswer = e.detail.value;
+              break;
+           }
+        }
+    }
+    this.setData({
+      servantlist: servantlist
+    })
+  },
+  //切换tab
+  loadclasslistadd(e){
+    let nowsubtypeNo=e.target.dataset.id;
+
+    let servantlist=this.data.servantlist;
+    //1.先清除
+    let t=0;
+    for(let i=0;i<servantlist.length;i++){
+      servantlist[i].show=false;
+      if(servantlist[i].subtypeNo==nowsubtypeNo){
+          t=i;
+      }
+    }
+    servantlist[t+1].show=true;
+    this.setData({
+      servantlist: servantlist
+    })
+  },
+  
+  //切换tab
+  loadclasslist(e){
+    let nowsubtypeNo=e.target.dataset.id;
+
+    let servantlist=this.data.servantlist;
+    //1.先清除
+    let t=0;
+    for(let i=0;i<servantlist.length;i++){
+      servantlist[i].show=false;
+      if(servantlist[i].subtypeNo==nowsubtypeNo){
+          t=i;
+      }
+    }
+    servantlist[t-1].show=true;
+    this.setData({
+      servantlist: servantlist
+    })
+  },
+});
+
+

+ 3 - 0
client/pages/customer/servantsettings/servantsettings.json

@@ -0,0 +1,3 @@
+{
+    "defaultTitle": "服务标准"
+}

+ 1 - 1
client/pages/servant/servantlist/servantlist.acss

@@ -5,7 +5,7 @@
   height: 102rpx;
   line-height: 102rpx;
   background: #FFFFFF;
-  border-radius: 18px;
+  border-radius: 18rpx;
   font-size: 28rpx;
   font-weight: bold;
   margin-bottom: 17rpx;

+ 9 - 3
client/util/apiUrl.js

@@ -50,10 +50,15 @@ const getServantNoticePath=baseService+'/notice/getServantNotice';
 //POST  /notice/userReadNotice    读取通知 传 雇佣关系编号,用户id,通知类型
 const userReadNoticePath=baseService+'/notice/userReadNotice';
 //雇主保姆偏好的详情info
-const customerDescribleInfo = baseService + "/servantlove/getStandardsDescribe"
+const customerDescribleInfo = baseService + "/servantlove/getStandardsDescribe";
 //保姆端的偏好描述
 const servantDescribleInfo = baseService + "/servicestandard/getStandardsDescribe";
 
+//  POST /monthly/selectMonthlyReport 获取月报列表
+const selectMonthlyReportPath = baseService + "/monthly/selectMonthlyReport";
+
+//GET /monthly/selectMonthLyReportInfo   获取月报详细信息
+const selectMonthLyReportInfoPath = baseService + "/monthly/selectMonthLyReportInfo";
 
 export default{
 registerUserPath,
@@ -76,6 +81,7 @@ getEmployerNoticePath,
 getServantNoticePath,
 userReadNoticePath,
 customerDescribleInfo,
-servantDescribleInfo
-
+servantDescribleInfo,
+selectMonthlyReportPath,
+selectMonthLyReportInfoPath
 }