seam 7 vuotta sitten
vanhempi
sitoutus
a1a4a020a2

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
www/webapp/housekeeping/home/static/css/app.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
www/webapp/housekeeping/home/static/js/app.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
www/webapp/housekeeping/home/static/js/app.js.map


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 0
www/webapp/housekeeping/home/static/js/manifest.js.map


+ 7 - 3
www/webapp/housekeeping/src/components/Home.vue

@@ -46,7 +46,7 @@
       demand(type) {
         config.serviceType = null;
         config.serviceType = type;
-        this.$router.push({path:'/reservation'})
+        this.$router.push({path: '/reservation'})
       },
       btnPackage(n) {
 //        console.log(this.packageArray[n - 1])
@@ -61,8 +61,12 @@
     },
     created() {
 //      console.log(config)
-      init()
-      console.log(config.user_id)
+      init();
+      console.log(config.user_id);
+      // 用户是否为管理员
+      if (config.user_id == '582405cea84ea02e3e8b4611') {
+        this.$router.push({path: '/managementList'});
+      }
     }
   }
 

+ 97 - 0
www/webapp/housekeeping/src/components/management/edit.vue

@@ -0,0 +1,97 @@
+<template>
+  <scroller>
+    <div class="box">
+      <title>订单信息</title>
+      <div class="my-order-body">
+        <div><span class="title">创建日期:</span>{{order.time}}</div>
+        <div><span class="title">用户姓名:</span>{{order.user_name}}</div>
+        <div><span class="title">用户手机:</span><a id='tel' href="tel:13764567708">移动WEB页面JS一键拨打号码咨询功能</a></div>
+        <div><span class="title">用户手机:</span>{{order.mobile}}</div>
+        <div><span class="title">服务地址:</span>{{order.address}}</div>
+        <div><span class="title">服务类型:</span>{{order.type_str}}</div>
+
+
+        <div v-if='order.type -1 == 0'><span
+          class="title">服务时间:</span>早上:{{order.server_start_time}} ~ {{order.server_end_time}}结束
+        </div>
+        <div v-if='order.type -1  == 0'><span class="title">服务形式:</span>{{order.cart_str}}</div>
+
+        <div><span class="title">服务技能:</span>{{order.skill_str}}</div>
+        <div v-if='order.type - 1 == 1'><span class="title">预产期:</span>{{order.yc_time}}</div>
+        <div v-if='order.type -1 == 2'><span class="title">孩子年龄:</span>{{order.age}}岁</div>
+        <div><span class="title">预约状态:</span>{{order.contract_str}}</div>
+        <div><span class="title">预约日期:</span>{{order.status_time}}</div>
+        <div><span class="title">家政员:</span><span v-if="order.tech == ''">暂未分配家政员</span>{{order.tech}}</div>
+        <div><span class="title">备注:</span>{{order.desc}}</div>
+
+      </div>
+    </div>
+  </scroller>
+</template>
+<script>
+  import _ from '@/config'
+
+  export default {
+    name: 'orderInfo',
+    data() {
+      return {
+        type: {0: '钟点工', 1: '月嫂', 2: '育婴师', 3: '护理老人', 4: '全套家务'},
+        order: null
+      }
+    },
+    created() {
+      if (_.oldOrderInfo === undefined) {
+        this.$router.push({path: '/order'})
+      }
+      this.order = _.oldOrderInfo;
+      // 转化时间格式
+      this.order.yc_time = _.timetrans(this.order.yc_time); // 预产期
+      this.order.yc_time = this.order.yc_time.substring(0, 10); // 预产期
+      this.order.server_start_time = _.timetrans(this.order.server_start_time);
+      this.order.server_start_time = this.order.server_start_time.substring(11, 16);
+      this.order.server_end_time = _.timetrans(this.order.server_end_time);
+      this.order.server_end_time = this.order.server_end_time.substring(11, 16);
+      this.order.status_time = _.timetrans(this.order.status_time);
+    },
+    watch:{
+      order: function (val, oldVal) {
+        if(val == undefined){
+          this.$router.push({path: '/order'})
+        }
+      }
+    }
+  }
+  function telF(n) {
+    let $tel = document.getElementById('tel');
+
+  }
+</script>
+<style scoped lang="less">
+  title {
+    display: block;
+    padding: 15px 0;
+    font-size: 30px;
+    font-weight: 900;
+    text-align: center;
+  }
+
+  .my-order-body {
+    border-top: 1px solid rgba(0, 0, 0, 0.1);
+    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
+
+    padding-left: 15px;
+    & > div {
+      font-size: 15px;
+      padding: 5px 0;
+      border-bottom: 1px solid rgba(0, 0, 0, 0.1);
+      &:last-child {
+        border-bottom: 0;
+      }
+      & > span:nth-child(1) {
+        width: 20%;
+        display: inline-block;
+        margin-right: 20px;
+      }
+    }
+  }
+</style>

+ 184 - 0
www/webapp/housekeeping/src/components/management/list.vue

@@ -0,0 +1,184 @@
+<template>
+  <div class="service-info">
+    <div class="tabs">
+      <div class="tab" v-bind:class="{ active: isActive === 0}" @click='tabF(0)'>预约中</div>
+      <div class="tab" v-bind:class="{ active: isActive === 1}" @click='tabF(1)'>已预约</div>
+      <div class="tab" v-bind:class="{ active: isActive === 2}" @click='tabF(2)'>已面试</div>
+    </div>
+    <div style="z-index: -1">
+
+      <scroller>
+        <div v-show='showOldOrderInfo'
+             style="color: white;padding: 20% 0;font-size: 20px;text-align: center;background-color: white;text-shadow: 1px 1px 1px black;">
+          暂无订单数据
+        </div>
+        <div class="tab-view">
+          <div v-for="item in orderList" class="my-order-body" @click='btnEditOrder(item)'>
+            <div><span class="title">创建日期:</span>{{item.time}}</div>
+            <div><span class="title">服务类型:</span>{{item.type_str}}</div>
+            <div><span class="title">服务形式:</span>{{item.cart_str}}</div>
+            <div><span class="title">服务地址:</span>{{item.address}}</div>
+          </div>
+        </div>
+      </scroller>
+    </div>
+  </div>
+</template>
+<script>
+  import axios from 'axios'
+  import _ from '@/config'
+
+  export default {
+    name: 'order',
+    data() {
+      return {
+        isActive: 0,
+        showOldOrderInfo: false,
+        oldId: null, // 养老院的雇员专属id
+        oldOrderList: null,// 订单数据集合oldOrderList
+        orderList: [],// 订单数据集合oldOrderList
+        type: {0: '钟点工', 1: '月嫂', 2: '育婴师', 3: '护理老人', 4: '全套家务'},
+        serviceSkillsArr: [
+          {label: '烧饭', value: 0,},
+          {label: '保洁', value: 1},
+          {label: '育婴', value: 3},
+          {label: '护理', value: 4,},
+          {label: '全套家务', value: 5,}
+        ], // 服务技能
+
+        serviceType: null,
+        serviceArr: [
+          {label: '做一休一', value: 1},
+          {label: '做五休二', value: 3},
+          {label: '做六休一', value: 4,}
+        ]
+      }
+    },
+    created() {
+      // 清理数据
+      _.oldOrderInfo = null;
+      let that = this;
+      _.auth = null;
+      axios.post(_.apiPath + '/j/HouseKeeping/list').then(res => {
+        if (res.status === 200) {
+          that.oldOrderList = res.data.rows;
+          for (let i = 0; i < that.oldOrderList.length; i++) {
+            that.oldOrderList[i].time = _.timetrans(that.oldOrderList[i].time)
+          }
+          this.tabF(0);
+        }
+      })
+    },
+    methods: {
+      tabF(index) {
+
+        var loading = weui.loading('loading', {
+          className: 'custom-classname'
+        });
+
+        this.isActive = index;
+        this.orderList = [];
+        for (let i = 0; i < this.oldOrderList.length; i++) {
+//          console.log(this.oldOrderList[i].status - 1 == index);
+          if (this.oldOrderList[i].status - 1 == index) {
+            this.orderList.push(this.oldOrderList[i]);
+          }
+        }
+        setTimeout(function () {
+          loading.hide(function () {
+            console.log('`loading` has been hidden');
+          });
+        }, 200);
+      },
+      btnEditOrder(item) {
+        _.oldOrderInfo = item;
+        this.$router.push({path: '/managementEdit'})
+      }
+    }
+  }
+</script>
+<style scoped lang='less'>
+  /*变量*/
+  @borderRadius: 50px;
+  .service-info {
+    .tabs {
+      z-index: 99;
+      position: fixed;
+      top: 0;
+      left: 0;
+      right: 0;
+      display: flex;
+      flex-wrap: nowrap;
+      padding: 5px;
+      /*      -webkit-box-sizing: border-box;
+            -moz-box-sizing: border-box;
+            box-sizing: border-box;*/
+
+      background-color: #fff;
+      .tab {
+        font-size: 14px;
+        width: 33.33%;
+        /*background-color: #fff;*/
+        color: #929292;
+        border: 1px solid black;
+        text-align: center;
+        -webkit-box-sizing: border-box;
+        -moz-box-sizing: border-box;
+        box-sizing: border-box;
+        transition: all .3s;
+        padding: 5px 0;
+        &:nth-child(1) {
+          border-right: 0;
+          border-top-left-radius: @borderRadius;
+          border-bottom-left-radius: @borderRadius;
+        }
+        &:nth-child(2) {
+        }
+        &:nth-child(3) {
+          border-left: 0;
+          border-top-right-radius: @borderRadius;
+          border-bottom-right-radius: @borderRadius;
+        }
+      }
+      .active {
+        color: white;
+        background-color: #929292;
+      }
+    }
+    .tab-view {
+      padding-top: 40px;
+      width: 100%;
+      display: flex;
+      flex-wrap: wrap;
+
+      /*background-color: #0ac8ff;*/
+      .my-order-body {
+        font-size: 15px;
+        border-top: 1px solid rgba(0, 0, 0, 0.2);
+        border-bottom: 1px solid rgba(0, 0, 0, 0.2);
+        margin: 10px 0;
+        padding: 0 15px;
+        color: black;
+        /*text-shadow: 1px 1px 10px white;*/
+        /*background-color: #570044;*/
+        width: 100%;
+        /*font-size: 15px;*/
+        & > div {
+          line-height: 40px;
+          font-size: 14px;
+          /*border: 1px solid rgba(0,0,0,0.1);*/
+          border-bottom: 1px solid rgba(0, 0, 0, 0.1);
+        }
+        & > div:last-child {
+          border-bottom: 0;
+        }
+        span.title {
+          width: 30%;
+          display: inline-block;
+        }
+
+      }
+    }
+
+  }
+</style>

+ 28 - 0
www/webapp/housekeeping/src/components/userId.vue

@@ -0,0 +1,28 @@
+<template>
+  <div>
+    <input type="text" v-model="userId">
+  </div>
+</template>
+<script>
+  import config from '@/config'
+  export default {
+    name:'userId',
+    data(){
+      return{
+        userId:null
+      }
+    },
+    created(){
+      this.userId = config.user_id
+    }
+  }
+</script>
+<style scoped lang='less'>
+  input{
+    height: 50px;
+    width: 80%;
+    display: block;
+    margin: 10vh auto 0;
+    text-align: center;
+  }
+</style>

+ 15 - 0
www/webapp/housekeeping/src/router/index.js

@@ -4,6 +4,9 @@ import Home from '@/components/Home'
 import reservation from '@/components/reservation'
 import order from '@/components/order'
 import orderInfo from '@/components/orderInfo'
+import userId from '@/components/userId'
+import managementList from '@/components/management/list'
+import managementEdit from '@/components/management/edit'
 
 Vue.use(Router);
 
@@ -25,6 +28,18 @@ export default new Router({
       path: '/orderInfo',
       name: 'orderInfo',
       component: orderInfo
+    }, {
+      path: '/userId',
+      name: 'userId',
+      component: userId
+    }, {
+      path: '/managementList',
+      name: 'managementList',
+      component: managementList
+    }, {
+      path: '/managementEdit',
+      name: 'managementEdit',
+      component: managementEdit
     }
   ]
 })

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä