Quellcode durchsuchen

2020-10-16提出的雇主端的bug

yangyongyong vor 4 Jahren
Ursprung
Commit
495457bb6a

+ 22 - 0
client/pages/customer/editDailyTask/editDailyTask.acss

@@ -2,6 +2,28 @@
   padding-top:24rpx;
   padding-bottom: 10rpx;
 }
+.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;
+}
 .dailyitem{
   padding:24rpx;
   margin-bottom: 10rpx;

+ 6 - 0
client/pages/customer/editDailyTask/editDailyTask.axml

@@ -1,4 +1,10 @@
 <view class="common-page-padding daily-servant-page">
+  <!--提醒设置-->
+  <view class="servant-setting-header" a:if="{{tips}}">
+    <image mode="scaleToFill" src="/image/notice-blue.png" class="notice-style"/>
+    <text>任务编辑不会影响今日任务哦,请提前确认</text>
+    <image mode="scaleToFill" src="/image/close-blue.png" class="close-stle" onTap="closeTip"/>
+  </view>
   <view a:for="{{selectdailytasklist}}" key="{{index}}">
     <view class="common-card dailyitem">
       <view class="cell-title">{{item.categoryName}}</view>

+ 6 - 0
client/pages/customer/editDailyTask/editDailyTask.js

@@ -4,6 +4,7 @@ import apiUrl1 from '../../../util/apiUrl1'
 var app = getApp();
 Page({
   data: {
+    tips:true,
     selectdailytasklist: [],
   },
   onLoad(options) {
@@ -81,4 +82,9 @@ Page({
     } );
   });
 },
+  closeTip(){
+    this.setData({
+      tips: false
+    })
+  },
 });

+ 8 - 3
client/pages/customer/servantedit/servantedit.acss

@@ -1,5 +1,6 @@
 .servant-settings-page{
   background-color: #F3F3F3;
+   padding:0 0 160rpx;
 }
 .servant-setting-header{
   height: 62rpx;
@@ -25,8 +26,12 @@
 }
 .setting-list{
   background: #FFFFFF;
-  border-radius: 18rpx;
-  margin: 25.99rpx 24rpx 20rpx 24rpx;
+   border-radius: 18rpx;
+  margin: 0 24rpx 30rpx 24rpx;
+}
+.settling-list-wrapper{
+  padding:26rpx 0 0;
+  background-color: #F3F3F3;
 }
 .setting-list-title{
   color: #333333;
@@ -82,7 +87,7 @@
   height: 110rpx;
   margin-left: 40rpx;
   margin-right: 86rpx;
-  color: #CCCCCC;
+  color: #333333;
   font-size: 24rpx;
   padding: 12rpx;
   width: 80%;

+ 31 - 29
client/pages/customer/servantedit/servantedit.axml

@@ -6,37 +6,39 @@
     <image mode="scaleToFill" src="/image/close-blue.png" class="close-stle" onTap="closeTip"/>
   </view>
   <!--服务列表-->
-  <view class="setting-list">
-    <view  class="setting-list-title">
-      {{servanteditlist.subjectType}}
-    </view>
-    <view class="setting-list-item" a:for="{{servanteditlist.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 class="settling-list-wrapper">
+    <view class="setting-list">
+      <view  class="setting-list-title">
+        {{servanteditlist.subjectType}}
       </view>
-      <view class="item-body" a:if="{{subjectitem.isCustom==1}}">
-        <textarea placeholder="请输入文字" onBlur="customanswer" data-id="{{subjectitem.subjectId}}">{{subjectitem.customAnswer}}</textarea>
+      <view class="setting-list-item" a:for="{{servanteditlist.subjectList}}" a:for-item="subjectitem" key="{{subjectindex}}">
+        <view  a:if="{{subjectitem.isChoose}}" >
+          <text class="item-title">{{subjectitem.index}}.{{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  class="common-button-wrapper">
+      <button type="primary"  data-id="{{item.subtypeNo}}" class="common-button" hover-class="active-button" onTap="dailytasksdeit" >提交</button>
+    </view>
     </view>
-  <!--提交按钮-->
-  <view  class="common-button-wrapper">
-     <button type="primary"  data-id="{{item.subtypeNo}}" class="common-button" hover-class="active-button" onTap="dailytasksdeit" >提交</button>
-  </view>
   </view>
 </view>

+ 9 - 0
client/pages/customer/servantedit/servantedit.js

@@ -31,6 +31,15 @@ Page({
               console.log(subjectList);
           }
         }
+        //给每个题目添加编号
+        let t=1;
+        for(let j=0;j<subjectList.subjectList.length;j++){
+          subjectList.subjectList[j].index=t;
+          t++;
+        }
+        this.setData({
+          servanteditlist: subjectList
+        });
 
         this.setData({
           servanteditlist: subjectList

+ 1 - 1
client/pages/customer/servantsettings/servantsettings.acss

@@ -88,7 +88,7 @@
   height: 110rpx;
   margin-left: 40rpx;
   margin-right: 86rpx;
-  color: #CCCCCC;
+  color: #333333;
   font-size: 24rpx;
   padding: 12rpx;
   width: 80%;

+ 1 - 1
client/pages/customer/servantsettings/servantsettings.axml

@@ -18,7 +18,7 @@
     </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>
+        <text class="item-title">{{subjectitem.index}}.{{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}}">

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

@@ -32,6 +32,12 @@ Page({
             servantlist[i].button="下一步";
           }
           servantlist[i].index=i+1;
+          //给每个题目添加编号
+          let t=1;
+          for(let j=0;j<servantlist[i].subjectList.length;j++){
+            servantlist[i].subjectList[j].index=t;
+            t++;
+          }
         }
         this.setData({
           servantlist: servantlist

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

@@ -127,6 +127,9 @@
   /* float: right; */
   background-color:#fff6f4;
 }
+.homecssname{
+  color: #09AFFF;
+}
 .tasks-item-red{
   width: 122rpx;
   height: 102rpx;

+ 6 - 2
client/pages/customer/taskreminder/taskreminder.axml

@@ -4,9 +4,13 @@
     <view class="tasks-head">
       <view class="cell-title">
         <label>{{servantName}}</label>
-        <view class="cell-right">
+        <view class="cell-right" onTap="changeotherhome" a:if="{{homecssname}}">
+          <image mode="scaleToFill" src="/image/switch-blue.png"/>
+          <label class="homecssname">切换到其他家庭</label>
+        </view>
+        <view class="cell-right" onTap="changeotherhome" a:if="{{!homecssname}}">
           <image mode="scaleToFill" src="/image/switch-grey.png"/>
-          <label>切换到其他家庭</label>
+          <label>切换到其他保姆</label>
         </view>
       </view>
       <view class="cell-list">

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

@@ -25,6 +25,7 @@ Page({
     that.setnowweek();
     this.selectDayTaskItem();
     this.selectDayTaskCost();
+    this.servantcountlist();
   },
   setnowweek(){
     let data = this.data.datelist;
@@ -179,4 +180,32 @@ Page({
 
     })
   },
+  //切换到其他家庭
+  changeotherhome(){
+    my.navigateTo({
+      url: '../myServantList/myServantList'
+    });
+  },
+  //计算家庭数量
+  servantcountlist(){
+    let params={
+        "employerId":app.globalData.userInfo.id,
+        "pageNo": 1,
+        "pageSize": 100,
+    }
+    request.httpServicePost(apiUrl.findByEmployerIdListPath,params).then(data=>{
+        console.log(data);
+        if(data.dataList.length>1){
+            this.setData({
+              homecssname:true
+            });
+        }else{
+          this.setData({
+              homecssname:false
+            });
+        }
+      }).catch(e=>{
+        console.log(e);
+    })
+  },
 });