Kaynağa Gözat

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

una 4 yıl önce
ebeveyn
işleme
e6b2e840a6

+ 4 - 4
client/pages/customer/taskreminder/taskreminder.axml

@@ -6,7 +6,7 @@
         <label>{{servantName}}</label>
         <view class="cell-right" onTap="changeotherhome" a:if="{{homecssname}}">
           <image mode="scaleToFill" src="/image/switch-blue.png"/>
-          <label class="homecssname">切换到其他家庭</label>
+          <label class="homecssname">切换到其他保姆</label>
         </view>
         <view class="cell-right" onTap="changeotherhome" a:if="{{!homecssname}}">
           <image mode="scaleToFill" src="/image/switch-grey.png"/>
@@ -50,7 +50,7 @@
       <view a:if="{{isreminds}}" a:for="{{taskList}}" key="{{index}}">
         <view class="tasks-list-item" a:if="{{item.state == 0}}">
           <text> {{item.itemName}}</text>
-          <view class="tasks-item-red">
+          <view class="tasks-item-red" a:if="{{tomorrowtasksState}}">
             <text> 未完成</text>
           </view>
           
@@ -75,13 +75,13 @@
     <!--没有任务-->
     <view a:if="{{!isreminds}}">
       <view class="notasks">
-        <text>还没有任务</text>
+        <text>今天无任务</text>
       </view>
     </view>
     <!--今天市休息日-->
     <view a:if="{{!workDay}}">
       <view class="notasks">
-        <text>今天市休息日</text>
+        <text>今日是休息日</text>
       </view>
     </view>
     <!---没有任务花销计算不显示-->

+ 16 - 1
client/pages/customer/taskreminder/taskreminder.js

@@ -16,7 +16,8 @@ Page({
     weekday: '',//日前
     servantTypeValue: '',//保姆工种,
     taskList: [],
-    selectDailyCost:0 //今日花销
+    selectDailyCost:0, //今日花销
+    tomorrowtasksState:true,//明天任务状态
   },
   onLoad() {
     //加载选中的时间
@@ -117,6 +118,13 @@ Page({
     });
     this.selectDayTaskItem();
     this.selectDayTaskCost();
+    //如果是选中的时间大于当天,任务不显示
+    let nowdate=util.formatDate(new Date());
+    if(nowdate < this.data.nowselectTime){
+      this.setData({
+          tomorrowtasksState: false
+        });
+    }
   },
   
   showtime(){
@@ -135,6 +143,13 @@ Page({
       this.setnowweek();
       this.selectDayTaskItem();
       this.selectDayTaskCost();
+      //如果是选中的时间大于当天,任务不显示
+      let nowdate=util.formatDate(new Date());
+      if(nowdate < this.data.nowselectTime){
+        this.setData({
+            tomorrowtasksState: false
+          });
+      }
   },
 
 // 查询保姆每日任务