Browse Source

任务提醒细节处理

yangyongyong 3 years ago
parent
commit
5ce96eaaaa

+ 26 - 7
client/pages/servant/taskreminder/taskreminder.acss

@@ -1,5 +1,5 @@
 .tasks-page{
-  padding-top: 0rpx;
+  padding-top: 35rpx;
   background-color: #FFFFFF;
 }
 .tasks-head{
@@ -25,11 +25,14 @@
 .cell-list{
   color: #999999;
   font-size: 22rpx;
+  margin-top: 16rpx;
 }
-.cell-type{
+.cell-typecontnet{
   color: #666666;
   font-size: 28rpx;
+  margin-top: 16rpx;
 }
+
 .cell-right{
   float: right;
   width: 50%;
@@ -88,9 +91,18 @@
   color: #09AFFF;
   border-radius: 12px;
 }
-.tik-week-item view{
+.tik-week-item-view{
   padding-bottom: 20rpx;
 }
+.littletik{
+  width: 6rpx;
+  height: 6rpx;
+  background-color: #09AFFF;
+  padding-bottom: 0rpx;
+  border-radius: 100%;
+  margin-left: 49%;
+  margin-top: 11rpx;
+}
 .tasks-list{
   margin-top: 56rpx;
   background: #FFFFFF;
@@ -130,11 +142,18 @@
   border-bottom-right-radius: 12rpx;
   background-color:#f2fbff;
 }
-.tasks-list-item image{
+
+.icon-yes{
   width: 35rpx;
-  height: 35rpx;
-  margin-left: 44.5rpx;
-  margin-top: 33.5rpx;
+  height: 26rpx;
+  margin-left: 40rpx;
+  margin-top: 30rpx;
+}
+.icon-no{
+  width: 30rpx;
+  height: 30rpx;
+  margin-left: 40rpx;
+  margin-top: 35rpx;
 }
 .tast-moneybox{
   height: 102rpx;

+ 10 - 9
client/pages/servant/taskreminder/taskreminder.axml

@@ -1,5 +1,5 @@
 <import-sjs from="../../../util/formateFuc.sjs" name="formate"></import-sjs>
-<view class="tasks-page">
+<view class="common-page-padding tasks-page">
   <!---客户信息-->
  <view class="tasks-head">
       <view class="cell-title">
@@ -12,7 +12,7 @@
       <view class="cell-list">
         {{weekday}}
       </view>
-        <view class="cell-type">
+        <view class="cell-typecontnet">
           保姆工种:<label>{{formate.serviceType(servantTypeValue)}}</label>
         </view>
       </view>
@@ -28,9 +28,10 @@
       </view>
       <view class="tik-week" a:for="{{datelist}}" key="{{index}}">
         <view class="tik-week-item {{item.cssName}}" onTap="changeWeekTime"  data-value="{{item.date}}" data-id="{{item.id}}">
-          <view>{{item.title}}</view>
-          <view>{{item.day}}
-            <text a:if={{item.cssName}}>\n▪</text>
+          <view class="tik-week-item-view">{{item.title}}</view>
+          <view class="tik-week-item-view">{{item.day}}
+            <text a:if={{item.cssName}}></text>
+            <view a:if={{item.cssName}} class="littletik"> </view>
           </view>
         </view>
       </view>
@@ -47,10 +48,10 @@
           <text> {{item.itemName}}</text>
           <view class="item-task-wrapper">
           <view class="tasks-item-yes" onTap="showyes" data-id="{{item.id}}">
-            <image mode="scaleToFill" src="/image/icon-yes.png"/>
+            <image class="icon-yes" mode="scaleToFill" src="/image/icon-yes.png"/>
           </view>
           <view class="tasks-item-no" onTap="showcancel" data-id="{{item.id}}">
-            <image mode="scaleToFill" src="/image/icon-no.png"/>
+            <image class="icon-no" mode="scaleToFill" src="/image/icon-no.png"/>
           </view>
           </view>
         </view>
@@ -58,7 +59,7 @@
           <text> {{item.itemName}}</text>
           
           <view class="tasks-item-yes">
-            <image mode="scaleToFill" src="/image/icon-yes.png"/>
+            <image class="icon-yes" mode="scaleToFill" src="/image/icon-yes.png"/>
           </view>
         </view>
         <view class="tasks-list-item" a:if="{{item.state == 2}}">
@@ -85,7 +86,7 @@
       <view class="tasks-list-money">
         <view class="tasks-list-pay">今日花销合计</view>
         <view class="tasks-list-pay-right">
-          <input placeholder="请输入" onInput="bindKeyInput" name="cost" />
+          <input placeholder="请输入" onInput="bindKeyInput" name="cost" value="{{costvalue}}"/>
           <text>元</text></view>
       </view>
       <view class="tasks-set">

+ 12 - 5
client/pages/servant/taskreminder/taskreminder.js

@@ -177,11 +177,18 @@ Page({
 
   //今日花销合计
   bindKeyInput(e) {
-    this.setData({
-      cost: e.detail.value,
-    });
-    console.log(e);
-
+    let costval=e.detail.value;
+    if ((/^[0-9]*$/.test(e.detail.value))) {
+      this.setData({
+        cost: costval,
+        costvalue:costval
+      });
+    }else{
+      this.setData({
+        cost: costval,
+        costvalue:null
+      });
+    }
   },
 
   //提交保姆今日花销