gaoyognxing 4 anni fa
parent
commit
e5c67e030a

+ 1 - 0
client/app.js

@@ -17,6 +17,7 @@ App({
     userInfo:{},  //用户信息
     employRelationNo:'',//进入工作台的雇佣关系编号
     relationInfo:'',//雇佣关系详情,编辑服务者用
+    servantInfo:''//保姆编辑使用
   }
   
 });

+ 9 - 0
client/pages/customer/servantdetail/servantdetail.acss

@@ -52,4 +52,13 @@
 .nosettingservaent text{
   display: inline-block;
   width: 100%;
+}
+.no-content-wrapper{
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 600rpx
+}
+.no-content-wrapper image{
+   width:500rpx;
 }

+ 6 - 3
client/pages/customer/servantdetail/servantdetail.axml

@@ -13,7 +13,7 @@
     <view class="common-card servantdetailitem">
       <view class="cell-title">
         <label>{{servantName}}</label>
-        <image mode="scaleToFill" src="/image/icon-edit.png"/>
+        <!-- <image mode="scaleToFill" src="/image/icon-edit.png"/> -->
       </view>
       <view class="cell-list">
         <view class="work-day">{{weekday}}</view>
@@ -22,6 +22,7 @@
     </view>
     <view >
       <!-- 保姆列表 -->
+      <view a:if="{{noServantList}}">
       <view class="common-card servantdetailitem">
         <view a:for="{{servantDescribleList}}" key="{{index}}">
           <view class="servant-list">
@@ -31,10 +32,12 @@
           </view>
         </view>
       </view>
+      </view>
+    
       <!-- 暂无保姆 -->
-      <view a:if="{{noServantList}}">
+      <view a:if="{{noServantPic}}">
         <view class="no-content-wrapper">
-          <image mode="aspectFill" src="/image/no-content.png"/>
+          <image mode="widthFix" src="/image/no-content.png"/>
         </view>
       </view>
     </view>

+ 5 - 2
client/pages/customer/servantdetail/servantdetail.js

@@ -9,6 +9,7 @@ Page({
     servantTypeValue: '',//保姆工种,
     servantDescribleList: [],
     noServantList:false,
+    noServantPic:false
   },
   onLoad() {
     this.setData({
@@ -29,13 +30,15 @@ Page({
       console.log("保姆描述信息=" + data.length);
       if (data.length == 0) {
         this.setData({
-          noServantList: true,
+          noServantPic: true,
+          noServantList:false,
           servantDescribleList:[]
         });
       } else {
         console.log("aaa" + data[0])
         this.setData({
-          noServantList: false,
+          noServantList: true,
+          noServantPic:false,
           servantDescribleList:data
         });
       }

+ 1 - 0
client/pages/servant/servantCenter/servantCenter.js

@@ -66,6 +66,7 @@ Page({
     }
      request.httpServiceGet(apiUrl.getRelationInfoPath,params).then(data=>{
         console.log(data);
+        app.globalData.servantInfo=data;
         let isOnlyOne=(data.isMoreEmploy<=1);
           this.setData({
          customerName:data.employerName,

+ 9 - 0
client/pages/servant/servantdetail/servantdetail.acss

@@ -52,4 +52,13 @@
 .nosettingservaent text{
   display: inline-block;
   width: 100%;
+}
+.no-content-wrapper{
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  height: 600rpx
+}
+.no-content-wrapper image{
+   width:500rpx;
 }

+ 12 - 13
client/pages/servant/servantdetail/servantdetail.axml

@@ -13,32 +13,31 @@
     <view class="common-card servantdetailitem">
       <view class="cell-title">
         <label>{{servantName}}</label>
-        <image mode="scaleToFill" src="/image/icon-edit.png"/>
+        <!-- <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>
+      <view class="cell-type">保姆工种:{{formate.serviceType(servantTypeValue)}}</view>
     </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 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 a:if="{{noServantList}}">
+      <view a:if="{{noServantPic}}">
         <view class="no-content-wrapper">
-          <image mode="aspectFill" src="/image/no-content.png"/>
+          <image mode="widthFix" src="/image/no-content.png"/>
         </view>
       </view>
     </view>

+ 7 - 4
client/pages/servant/servantdetail/servantdetail.js

@@ -9,10 +9,11 @@ Page({
     servantTypeValue: '',//保姆工种,
     servantDescribleList: [],
     noServantList:false,
+    noServantPic:false
   },
   onLoad() {
     this.setData({
-      servantName: app.globalData.relationInfo.servantName,
+      customerName: app.globalData.relationInfo.servantName,
       weekday: app.globalData.relationInfo.servantTaskPeriod.workDay,
       servantTypeValue: app.globalData.relationInfo.servantType
     }),
@@ -25,17 +26,19 @@ Page({
       "subjectType": "SN000002",
       "userType": "1"
     }
-    request.httpServicePost(apiUrl.servantDescribleInfo, params).then(data => {
+    request.httpServicePost(apiUrl.customerDescribleInfo, params).then(data => {
       console.log("保姆描述信息=" + data.length);
       if (data.length == 0) {
         this.setData({
-          noServantList: true,
+          noServantPic: true,
+          noServantList:false,
           servantDescribleList:[]
         });
       } else {
         console.log("aaa" + data[0])
         this.setData({
-          noServantList: false,
+          noServantList: true,
+          noServantPic:false,
           servantDescribleList:data
         });
       }