Ver código fonte

服务标准

gaoyognxing 4 anos atrás
pai
commit
e2ca1071c5

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

@@ -18,9 +18,7 @@
       <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 >
       <!-- 保姆列表 -->

+ 1 - 1
client/pages/customer/servantdetail/servantdetail.js

@@ -25,7 +25,7 @@ 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({

+ 22 - 30
client/pages/servant/servantdetail/servantdetail.axml

@@ -1,3 +1,4 @@
+<import-sjs from="../../../util/formateFuc.sjs" name="formate"></import-sjs>
 <!--未设置保姆偏好-->
 <view a:if="{{!isservantsettinged}}">
   <view class="nosettingservaent">
@@ -5,49 +6,40 @@
     <text>保姆还未设置偏好</text>
   </view>
 </view>
- <!--已经设置过保姆偏好-->
+<!--已经设置过保姆偏好-->
 <view a:if="{{isservantsettinged}}">
   <view class="common-page-padding servantdetail-servant-page">
     <!---阿姨类型--->
     <view class="common-card servantdetailitem">
       <view class="cell-title">
-      <label>王阿姨</label>
-      <image mode="scaleToFill" src="/image/icon-edit.png"/>
+        <label>{{servantName}}</label>
+        <image mode="scaleToFill" src="/image/icon-edit.png"/>
       </view>
       <view class="cell-list">
-        <label>周一▪</label>
-        <label>周二▪</label>
-        <label>周三▪</label>
-        <label>周四▪</label>
-        <label>周五▪</label>
-        <label>周六▪</label>
-        <label>周日</label>
+        <view class="work-day">{{weekday}}</view>
       </view>
       <view class="cell-type">
-        保密工种:<label>钟点工</label>
+        <view class="service-model">保姆工种:{{formate.serviceType(servantTypeValue)}}</view>
       </view>
     </view>
-    <!---阿姨类型--->
-    <view class="common-card servantdetailitem">
-      <view class="cell-title">做饭类</view>
-      <view class="servant-list">
-        <view class="good-list">
-          <view>1. 您擅长做的菜系?</view>
-          <view class="good-item-list">粤菜</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 class="servant-list">
-        <view class="good-list">
-          <view>1. 您擅长做的菜系?</view>
-          <view class="good-item-list">粤菜</view>
-        </view>
-      </view>
-      <view class="servant-list">
-        <view class="good-list">
-          <view>1. 您擅长做的菜系?</view>
-          <view class="good-item-list">粤菜</view>
+      <!-- 暂无保姆 -->
+      <view a:if="{{noServantList}}">
+        <view class="no-content-wrapper">
+          <image mode="aspectFill" src="/image/no-content.png"/>
         </view>
       </view>
     </view>
-  </view>
-</view>
+  </view>

+ 45 - 2
client/pages/servant/servantdetail/servantdetail.js

@@ -1,6 +1,49 @@
+import request from '../../../util/http'
+import apiUrl from '../../../util/apiUrl'
+var app = getApp();
 Page({
   data: {
-    isservantsettinged:true
+    isservantsettinged: true,
+    servantName: '',//保姆姓名
+    weekday: '',//日前
+    servantTypeValue: '',//保姆工种,
+    servantDescribleList: [],
+    noServantList:false,
   },
-  onLoad() {},
+  onLoad() {
+    this.setData({
+      servantName: app.globalData.relationInfo.servantName,
+      weekday: app.globalData.relationInfo.servantTaskPeriod.workDay,
+      servantTypeValue: app.globalData.relationInfo.servantType
+    }),
+      console.log("employRelationNo=" + app.globalData.employRelationNo)
+    this.initServantDescribleInfo()
+  },
+  initServantDescribleInfo() {
+    let params = {
+      "employRelationNo": app.globalData.employRelationNo,
+      "subjectType": "SN000002",
+      "userType": "1"
+    }
+    request.httpServicePost(apiUrl.servantDescribleInfo, params).then(data => {
+      console.log("保姆描述信息=" + data.length);
+      if (data.length == 0) {
+        this.setData({
+          noServantList: true,
+          servantDescribleList:[]
+        });
+      } else {
+        console.log("aaa" + data[0])
+        this.setData({
+          noServantList: false,
+          servantDescribleList:data
+        });
+      }
+      
+
+    }).catch(e => {
+      console.log(e);
+
+    })
+  }
 });

+ 1 - 1
client/pages/servant/servantdetail/servantdetail.json

@@ -1,3 +1,3 @@
 {
-  "defaultTitle":"阿姨偏好"
+  "defaultTitle":"服务标准"
 }

+ 6 - 2
client/util/apiUrl.js

@@ -49,8 +49,10 @@ const getServantNoticePath=baseService+'/notice/getServantNotice';
 
 //POST  /notice/userReadNotice    读取通知 传 雇佣关系编号,用户id,通知类型
 const userReadNoticePath=baseService+'/notice/userReadNotice';
-//保姆偏好的详情info
-const servantDescribleInfo = baseService + "/servantlove/getStandardsDescribe"
+//雇主保姆偏好的详情info
+const customerDescribleInfo = baseService + "/servantlove/getStandardsDescribe"
+//保姆端的偏好描述
+const servantDescribleInfo = baseService + "/servicestandard/getStandardsDescribe";
 
 
 export default{
@@ -73,5 +75,7 @@ updateEmploySetStatePath,
 getEmployerNoticePath,
 getServantNoticePath,
 userReadNoticePath,
+customerDescribleInfo,
 servantDescribleInfo
+
 }