|
@@ -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>
|