Browse Source

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

una 4 years ago
parent
commit
7c601e0d85

+ 2 - 2
client/pages/customer/servantedit/servantedit.js

@@ -15,7 +15,7 @@ Page({
   loadpage(subtypeNo){
     let employRelationNo = app.globalData.employRelationNo;
     let params = {employRelationNo:employRelationNo}
-    request.httpServiceGet(apiUrl.getSubjectWhenEdit, params).then(data => {
+    request.httpServiceGet(apiUrl.getEmployerSubjectWhenEdit, params).then(data => {
       if (data.length > 0) {
         //加载全部的类别
         let subjectList={};
@@ -56,7 +56,7 @@ Page({
       }
     }
       //console.log(servantselectedlist);
-      request.httpServicePost(apiUrl.updateServantLove,{employRelationNo:employRelationNo,subjectList:servantselectedlist,subjectType:"SN000002"}).then(data=>{
+      request.httpServicePost(apiUrl.updateEmployerLove,{employRelationNo:employRelationNo,subjectList:servantselectedlist,subjectType:"SN000001"}).then(data=>{
         my.alert({
           title: '提示',
           content: '设置完成',

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

@@ -10,7 +10,7 @@ Page({
   },
   loadpage(){
     let params = {}
-    request.httpServiceGet(apiUrl.getSubjectWhenEdit, params).then(data => {
+    request.httpServiceGet(apiUrl.getEmployerSubjectWhenEdit, params).then(data => {
       if (data.length > 0) {
         //添加选中的状态列
         let servantlist = data;

+ 1 - 1
client/pages/servant/taskreminder/taskreminder.axml

@@ -86,7 +86,7 @@
       <view class="tasks-list-money">
         <view class="tasks-list-pay">今日花销合计</view>
         <view class="tasks-list-pay-right">
-          <input placeholder="请输入"/>
+          <input placeholder="请输入" onInput="bindKeyInput" name="cost" />
           <text>元</text></view>
       </view>
       <view class="tasks-set">

+ 26 - 0
client/pages/servant/taskreminder/taskreminder.js

@@ -11,6 +11,7 @@ Page({
     showcancelbox: false,
     cancellist: [{ value: '1', label: '任务太多', checked: true }, { value: '2', label: '我不会', checked: false }, { value: '3', label: '任务不详细', checked: false }],
     taskList: [],
+    cost: ""
   },
   onLoad() {
     //加载选中的时间
@@ -122,4 +123,29 @@ Page({
     })
   },
 
+  //今日花销合计
+  bindKeyInput(e) {
+    this.setData({
+      cost: e.detail.value,
+    });
+    console.log(e);
+
+  },
+
+  //提交保姆今日花销
+  createServant() {
+    let employRelationNo = app.globalData.employRelationNo;
+    let date = this.data.nowselectTime;
+    let cost = this.data.cost;
+    request.httpServicePost(apiUrl1.insertDailyCostPath, { employRelationNo: employRelationNo, spendDate: date, cost: cost }).then(data => {
+      my.alert({
+        title: '提示',
+        content: '提交完成',
+        buttonText: '确定',
+        success: () => {
+          my.navigateBack();
+        }
+      });
+    });
+  }
 });

+ 25 - 14
client/util/apiUrl1.js

@@ -1,23 +1,34 @@
-let baseService='/servantappletservice';
+let baseService = '/servantappletservice';
 // 新设置题目时获取题目
-const servantappletservicePath = baseService+'/servantlove/getSubjectWhenFirst';
+const servantappletservicePath = baseService + '/servantlove/getSubjectWhenFirst';
 //新设置服务标准
-const insertNewservantappletservicePath = baseService+'/servantlove/insertNewServantLove';
+const insertNewservantappletservicePath = baseService + '/servantlove/insertNewServantLove';
 //设置每日任务
-const createDayTaskItem = baseService+'/taskItem/createDayTaskItem';
+const createDayTaskItem = baseService + '/taskItem/createDayTaskItem';
 //编辑时获取已选择的题目答案
-const getSubjectWhenEdit = baseService+'/servantlove/getSubjectWhenEdit';
+const getSubjectWhenEdit = baseService + '/servantlove/getSubjectWhenEdit';
 // 编辑阿姨偏好
-const updateServantLove=baseService+'/servantlove/updateServantLove';
+const updateServantLove = baseService + '/servantlove/updateServantLove';
 
 //GET /servantTask/selectTodayTaskItem  查询保姆当日任务
-const selectDayTaskItemPath=baseService+'/servantTask/selectDayTaskItem';
+const selectDayTaskItemPath = baseService + '/servantTask/selectDayTaskItem';
+// 添加保姆今日花销
+const insertDailyCostPath = baseService + '/servantTask/insertDailyCost';
+// 雇主段编辑阿姨偏好
+const updateEmployerLove =baseService+'/servicestandard/updateServiceStandards';
+//雇主端编辑时获取已选择的题目答案
+const getEmployerSubjectWhenEdit = baseService+'/servicestandard/getSubjectWhenEdit';
 
-export default{
-servantappletservicePath,
-insertNewservantappletservicePath,
-createDayTaskItem,
-getSubjectWhenEdit,
-selectDayTaskItemPath,
-updateServantLove
+
+
+export default {
+  servantappletservicePath,
+  insertNewservantappletservicePath,
+  createDayTaskItem,
+  getSubjectWhenEdit,
+  selectDayTaskItemPath,
+  updateServantLove,
+  insertDailyCostPath,
+  updateEmployerLove,
+  getEmployerSubjectWhenEdit
 }