|
@@ -13,12 +13,11 @@
|
|
暂无订单数据
|
|
暂无订单数据
|
|
</div>
|
|
</div>
|
|
<div class="tab-view">
|
|
<div class="tab-view">
|
|
- <div v-for="item in oldOrderList" class="my-order-body" @click='btnEditOrder(item)'>
|
|
|
|
- <div><span class="title">日期:</span>{{item.order_time}}</div>
|
|
|
|
- <div><span class="title">服务地址:</span>{{item.address.floor}}号楼{{item.address.room}}号房</div>
|
|
|
|
- <div><span class="title">服务标准:</span>{{serviceStandards[Number.parseInt(item.service_standards)]}}</div>
|
|
|
|
- <div v-show="isActive !== 0"><span class="title">进房时间:</span>{{item.in_room_time}}</div>
|
|
|
|
- <div v-show="isActive === 2"><span class="title">出房时间:</span>{{item.out_room_time}}</div>
|
|
|
|
|
|
+ <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>{{type[item.type]}}</div>
|
|
|
|
+ <div><span class="title">服务类型:</span>{{item.cart_str}}</div>
|
|
|
|
+ <div><span class="title">服务类型:</span>{{item.address}}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</scroller>
|
|
</scroller>
|
|
@@ -33,76 +32,63 @@
|
|
name: 'order',
|
|
name: 'order',
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- isActive: 1,
|
|
|
|
|
|
+ isActive: 0,
|
|
showOldOrderInfo: false,
|
|
showOldOrderInfo: false,
|
|
oldId: null, // 养老院的雇员专属id
|
|
oldId: null, // 养老院的雇员专属id
|
|
- oldOrderList: null,//养老院订单数据集合
|
|
|
|
- serviceStandards: ['大清洁', '小清洁', '深度清洁', '空房清洁']
|
|
|
|
|
|
+ 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() {
|
|
created() {
|
|
- alert(_.user_id);
|
|
|
|
// 清理数据
|
|
// 清理数据
|
|
_.oldOrderInfo = null;
|
|
_.oldOrderInfo = null;
|
|
let that = this;
|
|
let that = this;
|
|
_.auth = null;
|
|
_.auth = null;
|
|
-
|
|
|
|
-// axios.post(_.apiPath + '/moonclub/employe/GetAuthinfo').then(res => {
|
|
|
|
-// console.log(res.data.data)
|
|
|
|
-// })
|
|
|
|
- // 检验用户是否以及注册过
|
|
|
|
- /*axios.post(_.apiPath + '/moonclub/employe/QueryPersonalInfoByUserId&user_id=' + _.user_id).then(res => {
|
|
|
|
- if (res.data.message === '已经注册过') {
|
|
|
|
- _.auth = res.data.data.auth
|
|
|
|
- that.oldId = res.data.data._id.$id
|
|
|
|
- if (_.auth === 6) {
|
|
|
|
- document.title = '养老院'
|
|
|
|
- that.tabF(0)
|
|
|
|
- } else if (_.auth >= 0 && _.auth < 6) {
|
|
|
|
- // 用户为享月会的雇员时,跳转到 相关组件中
|
|
|
|
- document.title = '享月会'
|
|
|
|
- that.$router.push({path: '/moonClubEmployeeOrder'})
|
|
|
|
|
|
+ axios.post(_.apiPath + '/j/HouseKeeping/list&user_id=' + _.user_id).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)
|
|
}
|
|
}
|
|
- } else { // 用户还为注册,引导去注册组件
|
|
|
|
- that.$router.push({path: '/employe'})
|
|
|
|
|
|
+ this.tabF(0);
|
|
}
|
|
}
|
|
- })*/
|
|
|
|
|
|
+ })
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
tabF(index) {
|
|
tabF(index) {
|
|
- axios.post(_.apiPath + '/j/HouseKeeping/list&id=' + _.user_id).then(res => {
|
|
|
|
- console.log(res);
|
|
|
|
- })
|
|
|
|
-/* let loading = weui.loading('加载中...', {
|
|
|
|
|
|
+
|
|
|
|
+ var loading = weui.loading('loading', {
|
|
className: 'custom-classname'
|
|
className: 'custom-classname'
|
|
});
|
|
});
|
|
|
|
+
|
|
this.isActive = index;
|
|
this.isActive = index;
|
|
- axios.post(_.apiPath + '/moonclub/employe/pOrderListByEmployerId&id=' + this.oldId + '&status=' + index).then(oldRes => {
|
|
|
|
- this.oldOrderList = oldRes.data.data;
|
|
|
|
- this.showOldOrderInfo = (this.oldOrderList.length === 0) ? true : false
|
|
|
|
- // 处理订单上的各种时间
|
|
|
|
- for (let i in this.oldOrderList) {
|
|
|
|
- // orderTime
|
|
|
|
- if (parseInt(this.oldOrderList[i].order_time) > 0) {
|
|
|
|
- this.oldOrderList[i].order_time = _.timetrans(parseInt(this.oldOrderList[i].order_time))
|
|
|
|
- } else {
|
|
|
|
- this.oldOrderList[i].order_time = '暂无服务时间'
|
|
|
|
- }
|
|
|
|
- // in room time
|
|
|
|
- if (parseInt(this.oldOrderList[i].in_room_time) > 0) {
|
|
|
|
- // listArr[i].in_room_time = in_room_time
|
|
|
|
- } else {
|
|
|
|
- this.oldOrderList[i].in_room_time = '暂无服务时间'
|
|
|
|
- }
|
|
|
|
- // out room time
|
|
|
|
- if (parseInt(this.oldOrderList[i].out_room_time) > 0) {
|
|
|
|
- // listArr[i].out_room_time = out_room_time
|
|
|
|
- } else {
|
|
|
|
- this.oldOrderList[i].out_room_time = '暂无服务时间'
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- loading.hide();
|
|
|
|
- })*/
|
|
|
|
|
|
+ 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) {
|
|
btnEditOrder(item) {
|
|
_.oldOrderInfo = item;
|
|
_.oldOrderInfo = item;
|
|
@@ -168,14 +154,24 @@
|
|
/*background-color: #0ac8ff;*/
|
|
/*background-color: #0ac8ff;*/
|
|
.my-order-body {
|
|
.my-order-body {
|
|
font-size: 15px;
|
|
font-size: 15px;
|
|
- border: 1px solid black;
|
|
|
|
|
|
+ border-top: 1px solid rgba(0, 0, 0, 0.2);
|
|
|
|
+ border-bottom: 1px solid rgba(0, 0, 0, 0.2);
|
|
margin: 10px 0;
|
|
margin: 10px 0;
|
|
- padding: 15px;
|
|
|
|
- color: white;
|
|
|
|
- text-shadow: 1px 1px 10px white;
|
|
|
|
- background-color: #570044;
|
|
|
|
|
|
+ padding: 0 15px;
|
|
|
|
+ color: black;
|
|
|
|
+ /*text-shadow: 1px 1px 10px white;*/
|
|
|
|
+ /*background-color: #570044;*/
|
|
width: 100%;
|
|
width: 100%;
|
|
/*font-size: 15px;*/
|
|
/*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 {
|
|
span.title {
|
|
width: 30%;
|
|
width: 30%;
|
|
display: inline-block;
|
|
display: inline-block;
|