|
@@ -1,78 +1,74 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="page">
|
|
<view class="page">
|
|
|
|
|
+ <view class="periodDate">
|
|
|
|
|
+ <text>服务日期:{{periodDate.label}}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
<view class="flex-col group">
|
|
<view class="flex-col group">
|
|
|
<view class="serob"><text>服务对象</text></view>
|
|
<view class="serob"><text>服务对象</text></view>
|
|
|
- <view class="serobItems flex-row">
|
|
|
|
|
- <scroll-view class="scrollX" scroll-x>
|
|
|
|
|
- <view class="flex-row">
|
|
|
|
|
- <view class="serobItem flex-col" v-for="(item,index) in serviceObjectList" :key="index">
|
|
|
|
|
- <view class="serobImgView" @click="selectServiceObject(item)">
|
|
|
|
|
- <image class="serobImg" mode="aspectFill" :src="item.facePhotoUrl || '/static/logo.png'"></image>
|
|
|
|
|
- </view>
|
|
|
|
|
- <text class="serobName">{{item.nickName || '未填写'}}</text>
|
|
|
|
|
- <view class="serobV" v-if="item.select === true">
|
|
|
|
|
- <image class="serobVicon" src="/static/order/ud20.png"></image>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <u-grid :border="false" col="4">
|
|
|
|
|
+ <u-grid-item v-for="(item,index) in serviceObjectList" :key="index">
|
|
|
|
|
+ <view class="serobItem flex-col" >
|
|
|
|
|
+ <view class="serobImgView" @click="selectServiceObject(item)">
|
|
|
|
|
+ <image class="serobImg" mode="aspectFill" :src="item.facePhotoUrl || '/static/logo.png'"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <text class="serobName">{{item.nickName || '未填写'}}</text>
|
|
|
|
|
+ <view class="serobV" v-if="item.select === true">
|
|
|
|
|
+ <image class="serobVicon" src="/static/order/ud20.png"></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- </scroll-view>
|
|
|
|
|
- <view class="addSerobImg" @click="addServiceObject">
|
|
|
|
|
- <text>+</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ </u-grid-item>
|
|
|
|
|
+ </u-grid>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
- <view class="flex-row hintView">
|
|
|
|
|
- <view class="flex-col justify-center">
|
|
|
|
|
- <view class="hint">
|
|
|
|
|
- <text>!</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="hintCentent">
|
|
|
|
|
- <text>娇宝,提前10分钟到哟,一人一号过号需要重新取号排队!等你哟</text>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <view class="flex-col group marginTop" v-for="(item, index) in orderParam.childService">
|
|
|
|
|
- <view class="flex-row">
|
|
|
|
|
|
|
+ <view class="flex-col group " v-for="(item, index) in orderParam.childService">
|
|
|
|
|
+ <view class="flex-row " >
|
|
|
<image class="selectSerobImg" mode="aspectFill" :src="item.facePhotoUrl || '/static/logo.png'"></image>
|
|
<image class="selectSerobImg" mode="aspectFill" :src="item.facePhotoUrl || '/static/logo.png'"></image>
|
|
|
<text class="selectSerobName">{{item.nickName || '未填写'}}</text>
|
|
<text class="selectSerobName">{{item.nickName || '未填写'}}</text>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
- <view class="flex-row groupItem ">
|
|
|
|
|
- <view class="groupItemKey ">
|
|
|
|
|
- <text>服务日期</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="flex-row justify-between groupItemContent ">
|
|
|
|
|
- <text>{{ item.periodDate || '请选择服务日期' }}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view class="serob">
|
|
|
|
|
+ <text>服务人员</text>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
- <view class="flex-row groupItem">
|
|
|
|
|
- <view class="groupItemKey">
|
|
|
|
|
- <text>服务人员</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="flex-row justify-between groupItemContent" @click="chooseServiceTeacher(index,item.serviceUserId)">
|
|
|
|
|
- <text>{{ item.personName || '请选择服务人员' }}</text>
|
|
|
|
|
- <u-icon name="arrow-right" color="#666" size="18"></u-icon>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view >
|
|
|
|
|
+ <u-grid col="4">
|
|
|
|
|
+ <u-grid-item v-for="(item,index1) in item.serviceTeacherList" :key="index1" >
|
|
|
|
|
+ <view class="serobItem flex-col " >
|
|
|
|
|
+ <view class="serobImgView ">
|
|
|
|
|
+ <image class="serobImg" mode="aspectFill" :src="item.facePhotoUrl || '/static/logo.png'"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <text class="serobName ">{{item.personName || '未填写'}}</text>
|
|
|
|
|
+ <view class="flex-row justify-center ">
|
|
|
|
|
+ <u-icon name="rmb-circle" size="14"></u-icon>
|
|
|
|
|
+ <text class="teachPrice">¥{{item.fee}}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="serobV " v-if="item.select === true">
|
|
|
|
|
+ <image class="serobVicon" src="/static/order/ud20.png"></image>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </u-grid-item>
|
|
|
|
|
+ </u-grid>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
- <view class="flex-row groupItem">
|
|
|
|
|
- <view class="groupItemKey">
|
|
|
|
|
- <text>服务时段</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="flex-row justify-between groupItemContent" @click="chooseServiceTime(index)">
|
|
|
|
|
- <text>{{ item.serviceStartTime || '服务时段' }}</text>
|
|
|
|
|
- <u-icon name="arrow-right" color="#666" size="18"></u-icon>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view class="serob" :style="{'marginTop':'32rpx'}">
|
|
|
|
|
+ <text>服务时段</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view>
|
|
|
|
|
+ <u-grid :border="false" col="5">
|
|
|
|
|
+ <u-grid-item v-for="(item,index2) in item.serviceTimeList" :key="index2">
|
|
|
|
|
+ <view class="flex-col justify-center timeItem" :class="{selectBack: item.select}">
|
|
|
|
|
+ <view class="flex-row justify-center">
|
|
|
|
|
+ <text class="time">{{item.label}}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="flex-row justify-center">
|
|
|
|
|
+ <text class="price">¥{{item.price}}</text>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </u-grid-item>
|
|
|
|
|
+ </u-grid>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="flex-col group marginTop">
|
|
|
|
|
|
|
+ <view class="flex-col group ">
|
|
|
<view class="groupItemKey">
|
|
<view class="groupItemKey">
|
|
|
<text>服务定制</text>
|
|
<text>服务定制</text>
|
|
|
</view>
|
|
</view>
|
|
@@ -102,43 +98,31 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <chooseServiceTeacher ref="chooseServiceTeacher" :storeId="store.storeId" :date="date" @getWorkPerson="getWorkPerson"></chooseServiceTeacher>
|
|
|
|
|
- <chooseServiceTime ref="chooseServiceTime" @getPeriodDate="getPeriodDate"></chooseServiceTime>
|
|
|
|
|
<myPay ref="myPay" :blPay="false" :orderNo="subOrderNo" @payResult="payResult"></myPay>
|
|
<myPay ref="myPay" :blPay="false" :orderNo="subOrderNo" @payResult="payResult"></myPay>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import chooseServiceTeacher from './components/chooseServiceTeacher';
|
|
|
|
|
- import chooseServiceTime from './components/chooseServiceTime';
|
|
|
|
|
import myPay from '../../components/pay/pay';
|
|
import myPay from '../../components/pay/pay';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
- chooseServiceTeacher,
|
|
|
|
|
- chooseServiceTime,
|
|
|
|
|
myPay
|
|
myPay
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- selectIndex:0,
|
|
|
|
|
- requestStatus:false,
|
|
|
|
|
- personId:'',
|
|
|
|
|
- date:'',
|
|
|
|
|
- serviceObjectList: [],
|
|
|
|
|
|
|
+ //服务对象列表
|
|
|
|
|
+ serviceObjectList:[],
|
|
|
|
|
+ //服务人员列表
|
|
|
|
|
+ serviceTeacherList:[],
|
|
|
userInfo: {},
|
|
userInfo: {},
|
|
|
//服务门店
|
|
//服务门店
|
|
|
store: {},
|
|
store: {},
|
|
|
- //默认服务技师
|
|
|
|
|
- serviceTeacher: {},
|
|
|
|
|
//默认服务时间
|
|
//默认服务时间
|
|
|
periodDate: [],
|
|
periodDate: [],
|
|
|
- //默认服务时段
|
|
|
|
|
- periodTime: [],
|
|
|
|
|
//预约费用
|
|
//预约费用
|
|
|
price: '0',
|
|
price: '0',
|
|
|
//订单编号
|
|
//订单编号
|
|
|
orderNo: '',
|
|
orderNo: '',
|
|
|
- subOrderNo: '',
|
|
|
|
|
selectIcon: true,
|
|
selectIcon: true,
|
|
|
orderParam:{
|
|
orderParam:{
|
|
|
orderType: 1,
|
|
orderType: 1,
|
|
@@ -148,14 +132,15 @@
|
|
|
serviceDate:'',
|
|
serviceDate:'',
|
|
|
childService:[
|
|
childService:[
|
|
|
// {
|
|
// {
|
|
|
- // periodDate:'',//回显需要,不做参数
|
|
|
|
|
// serviceObjectId: '',
|
|
// serviceObjectId: '',
|
|
|
// facePhotoUrl:'', //回显需要,不做参数
|
|
// facePhotoUrl:'', //回显需要,不做参数
|
|
|
// nickName:'', //回显需要,不做参数
|
|
// nickName:'', //回显需要,不做参数
|
|
|
// serviceUserId: '',
|
|
// serviceUserId: '',
|
|
|
// personName:'',//回显需要,不做参数
|
|
// personName:'',//回显需要,不做参数
|
|
|
// fee:'',//回显需要,不做参数
|
|
// fee:'',//回显需要,不做参数
|
|
|
- // serviceStartTime: ''
|
|
|
|
|
|
|
+ // serviceStartTime: '',
|
|
|
|
|
+ // serviceTeacherList:[],//服务人员列表,回显需要,不做参数
|
|
|
|
|
+ // serviceTimeList:[]//服务时段列表,回显需要,不做参数
|
|
|
// }
|
|
// }
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|
|
@@ -165,11 +150,13 @@
|
|
|
this.store = uni.getStorageSync('storeInfo')
|
|
this.store = uni.getStorageSync('storeInfo')
|
|
|
this.userInfo = uni.getStorageSync('userInfo')
|
|
this.userInfo = uni.getStorageSync('userInfo')
|
|
|
this.orderParam.serviceStoreId = this.store.storeId
|
|
this.orderParam.serviceStoreId = this.store.storeId
|
|
|
|
|
+ //获取排班日期
|
|
|
|
|
+ this.selectDate()
|
|
|
|
|
+ this.listServiceObject()
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
- // 服务对象
|
|
|
|
|
- this.listServiceObject()
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
mounted(){
|
|
mounted(){
|
|
|
|
|
|
|
@@ -185,11 +172,8 @@
|
|
|
organization: this.store.storeId
|
|
organization: this.store.storeId
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
this.periodDate = res.data.data[0]
|
|
this.periodDate = res.data.data[0]
|
|
|
- this.date=this.periodDate.label
|
|
|
|
|
this.orderParam.serviceDate=this.periodDate.label
|
|
this.orderParam.serviceDate=this.periodDate.label
|
|
|
- if (res.data.data[0]){
|
|
|
|
|
- this.getServicePerson(res.data.data[0].label);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.getServicePerson(this.periodDate.label)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -199,39 +183,60 @@
|
|
|
storeId:this.store.storeId,
|
|
storeId:this.store.storeId,
|
|
|
date:date
|
|
date:date
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
- this.serviceTeacher = res.data.data[0];
|
|
|
|
|
- this.personId =this.serviceTeacher.id
|
|
|
|
|
- if (res.data.data[0]){
|
|
|
|
|
- this.getServiceTime(date,res.data.data[0].personId)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.serviceTeacherList = res.data.data;
|
|
|
|
|
+ this.serviceTeacherList[0].select = true
|
|
|
|
|
+ this.getServicePersonUrl(this.serviceTeacherList);
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ getServicePersonUrl(items){
|
|
|
|
|
+ for (let i = 0; i < items.length; i++) {
|
|
|
|
|
+ if (items[i].facePhoto) {
|
|
|
|
|
+ this.$api.getImgUrlByOssId({
|
|
|
|
|
+ ossId: items[i].facePhoto
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ items[i].facePhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
|
|
|
|
|
+ this.$set(this.serviceTeacherList, i, items[i])
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ // 查询服务对象信息列表
|
|
|
|
|
+ listServiceObject() {
|
|
|
|
|
+ this.$api.listServiceObject(this.reqParm).then((res) => {
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ this.serviceObjectList = res.data.data
|
|
|
|
|
+ this.getServiceObjectUrl(this.serviceObjectList);
|
|
|
|
|
|
|
|
- //获取门店排班时段
|
|
|
|
|
- getServiceTime(date,personId) {
|
|
|
|
|
- this.$api.getServicePersonTime({
|
|
|
|
|
- personId: personId,
|
|
|
|
|
- date: date,
|
|
|
|
|
- storeId:this.store.storeId
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
- this.periodTime = res.data.data[0]
|
|
|
|
|
- this.orderParam.childService[0].serviceStartTime = this.periodTime.label
|
|
|
|
|
- this.orderParam.childService[0].periodDate = this.periodDate.label,
|
|
|
|
|
- this.orderParam.childService[0].serviceUserId = this.serviceTeacher.personId ,
|
|
|
|
|
- this.orderParam.childService[0].personName = this.serviceTeacher.personName ,//回显需要,不做参数
|
|
|
|
|
- this.orderParam.childService[0].fee = this.serviceTeacher.fee //回显需要,不做参数
|
|
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ // 获取图片
|
|
|
|
|
+ getServiceObjectUrl(items) {
|
|
|
|
|
+ for (let i = 0; i < items.length; i++) {
|
|
|
|
|
+ if (items[i].facePhoto) {
|
|
|
|
|
+ this.$api.getImgUrlByOssId({
|
|
|
|
|
+ ossId: items[i].facePhoto
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ items[i].facePhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
|
|
|
|
|
+ this.$set(this.serviceObjectList, i, items[i])
|
|
|
|
|
+ if (i === 0){
|
|
|
|
|
+ this.selectServiceObject(items[i])
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
selectServiceObject(item) {
|
|
selectServiceObject(item) {
|
|
|
- this.subOrderNo=''
|
|
|
|
|
console.log(item)
|
|
console.log(item)
|
|
|
if (item.select) {
|
|
if (item.select) {
|
|
|
this.orderParam.childService = this.orderParam.childService.filter(selectServiceObject =>
|
|
this.orderParam.childService = this.orderParam.childService.filter(selectServiceObject =>
|
|
|
selectServiceObject.serviceObjectId !== item.id)
|
|
selectServiceObject.serviceObjectId !== item.id)
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+
|
|
|
this.$api.getServicePersonTime({
|
|
this.$api.getServicePersonTime({
|
|
|
- personId: this.serviceTeacher.personId,
|
|
|
|
|
|
|
+ personId: this.serviceTeacherList[0].personId,
|
|
|
date: this.periodDate.label,
|
|
date: this.periodDate.label,
|
|
|
storeId:this.store.storeId
|
|
storeId:this.store.storeId
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
@@ -247,16 +252,17 @@
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
periodTimeList = periodTimeList.filter(periodTime=> periodTime.total>0)
|
|
periodTimeList = periodTimeList.filter(periodTime=> periodTime.total>0)
|
|
|
|
|
+ periodTimeList[0].select = true
|
|
|
console.log(periodTimeList)
|
|
console.log(periodTimeList)
|
|
|
let childService ={
|
|
let childService ={
|
|
|
- periodDate: this.periodDate.label,
|
|
|
|
|
serviceObjectId: item.id,
|
|
serviceObjectId: item.id,
|
|
|
facePhotoUrl:item.facePhotoUrl, //回显需要,不做参数
|
|
facePhotoUrl:item.facePhotoUrl, //回显需要,不做参数
|
|
|
nickName:item.nickName, //回显需要,不做参数
|
|
nickName:item.nickName, //回显需要,不做参数
|
|
|
- serviceUserId: this.serviceTeacher.personId ,
|
|
|
|
|
- personName:this.serviceTeacher.personName ,//回显需要,不做参数
|
|
|
|
|
- fee:this.serviceTeacher.fee ,//回显需要,不做参数
|
|
|
|
|
- serviceStartTime: periodTimeList[0].label ,
|
|
|
|
|
|
|
+ serviceUserId: this.serviceTeacherList[0].personId,
|
|
|
|
|
+ fee:this.serviceTeacherList[0].fee,//回显需要,不做参数
|
|
|
|
|
+ serviceStartTime: periodTimeList[0].label,
|
|
|
|
|
+ serviceTeacherList:this.serviceTeacherList,//服务人员列表,回显需要,不做参数
|
|
|
|
|
+ serviceTimeList:periodTimeList//服务时段列表,回显需要,不做参数
|
|
|
}
|
|
}
|
|
|
this.orderParam.childService.push(childService)
|
|
this.orderParam.childService.push(childService)
|
|
|
|
|
|
|
@@ -270,124 +276,6 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- // 查询服务对接信息列表
|
|
|
|
|
- listServiceObject() {
|
|
|
|
|
- this.$api.listServiceObject(this.reqParm).then((res) => {
|
|
|
|
|
- console.log(res)
|
|
|
|
|
- this.serviceObjectList = res.data.data
|
|
|
|
|
-
|
|
|
|
|
- if (this.orderParam.childService.length === 0) {
|
|
|
|
|
- let selectServiceObject = this.serviceObjectList[0]
|
|
|
|
|
- this.serviceObjectList[0].select = true
|
|
|
|
|
- let childService ={
|
|
|
|
|
- periodDate: '',
|
|
|
|
|
- serviceObjectId: selectServiceObject.id,
|
|
|
|
|
- facePhotoUrl:selectServiceObject.facePhotoUrl,
|
|
|
|
|
- nickName:selectServiceObject.nickName,
|
|
|
|
|
- serviceUserId: -1 ,
|
|
|
|
|
- fee:'' ,
|
|
|
|
|
- serviceStartTime: '' ,
|
|
|
|
|
- }
|
|
|
|
|
- this.orderParam.childService.push(childService)
|
|
|
|
|
- this.selectDate()
|
|
|
|
|
- } else {
|
|
|
|
|
- for (let selectServiceObject of this.orderParam.childService) {
|
|
|
|
|
- for (let serviceObject of this.serviceObjectList) {
|
|
|
|
|
- if (selectServiceObject.id === serviceObject.id) {
|
|
|
|
|
- serviceObject.select = true
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- this.getImgUrlByBannerOssId(this.serviceObjectList);
|
|
|
|
|
-
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 获取图片
|
|
|
|
|
- getImgUrlByBannerOssId(items) {
|
|
|
|
|
- for (let i = 0; i < items.length; i++) {
|
|
|
|
|
- if (items[i].facePhoto) {
|
|
|
|
|
- this.$api.getImgUrlByOssId({
|
|
|
|
|
- ossId: items[i].facePhoto
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
- items[i].facePhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
|
|
|
|
|
- this.$set(this.serviceObjectList, i, items[i])
|
|
|
|
|
- if (i === 0){
|
|
|
|
|
- this.orderParam.childService[0].facePhotoUrl =res.data.data[0].url.replace(/^http:/, "https:")
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- addServiceObject() {
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: '/myPages/ServiceObjectManagement/index'
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- //选择服务人员
|
|
|
|
|
- chooseServiceTeacher(index,serviceUserId) {
|
|
|
|
|
- this.selectIndex = index
|
|
|
|
|
- this.$refs.chooseServiceTeacher.openPopup(serviceUserId)
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- //选择服务人员
|
|
|
|
|
- getWorkPerson(e) {
|
|
|
|
|
-
|
|
|
|
|
- if (e.personId !== this.orderParam.childService[this.selectIndex].serviceUserId){
|
|
|
|
|
- this.subOrderNo=''
|
|
|
|
|
- this.$api.getServicePersonTime({
|
|
|
|
|
- personId: e.personId,
|
|
|
|
|
- date: this.periodDate.label,
|
|
|
|
|
- storeId: this.store.storeId
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
- this.orderParam.childService[this.selectIndex].serviceUserId = e.personId
|
|
|
|
|
- this.orderParam.childService[this.selectIndex].personName = e.personName
|
|
|
|
|
- this.orderParam.childService[this.selectIndex].fee = e.fee
|
|
|
|
|
- this.orderParam.childService[this.selectIndex].serviceStartTime = ''
|
|
|
|
|
- let periodTimeList = res.data.data
|
|
|
|
|
- let selectServiceObjectList = this.orderParam.childService.filter(selectServiceObject =>
|
|
|
|
|
- selectServiceObject.serviceUserId === e.personId
|
|
|
|
|
- || selectServiceObject.serviceUserId === -1
|
|
|
|
|
- )
|
|
|
|
|
- selectServiceObjectList.forEach(selectServiceObject =>{
|
|
|
|
|
- periodTimeList.forEach(periodTime =>{
|
|
|
|
|
- if (selectServiceObject.serviceStartTime === periodTime.label){
|
|
|
|
|
- periodTime.total = periodTime.total - 1
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
- periodTimeList = periodTimeList.filter(periodTime=> periodTime.total>0)
|
|
|
|
|
- this.orderParam.childService[this.selectIndex].serviceStartTime = periodTimeList[0].label
|
|
|
|
|
- this.price = 0
|
|
|
|
|
- for (let childService of this.orderParam.childService) {
|
|
|
|
|
- this.price = this.price * 1 + childService.fee * 1
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- //选择服务时段
|
|
|
|
|
- chooseServiceTime(index) {
|
|
|
|
|
- this.selectIndex = index
|
|
|
|
|
- this.$refs.chooseServiceTime.openPopup(this.orderParam.childService[index].serviceUserId,
|
|
|
|
|
- this.periodDate.label,this.store.storeId,this.orderParam.childService,index,this.orderParam.childService[index].serviceStartTime)
|
|
|
|
|
- },
|
|
|
|
|
- //选择服务时段
|
|
|
|
|
- getPeriodDate(e) {
|
|
|
|
|
- console.log(e)
|
|
|
|
|
- if (e){
|
|
|
|
|
- if (this.orderParam.childService[this.selectIndex].serviceStartTime !== e.label){
|
|
|
|
|
- this.subOrderNo=''
|
|
|
|
|
- this.orderParam.childService[this.selectIndex].serviceStartTime = e.label
|
|
|
|
|
- this.$set(this.orderParam)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
|
|
|
|
|
selectChange() {
|
|
selectChange() {
|
|
|
this.selectIcon = !this.selectIcon
|
|
this.selectIcon = !this.selectIcon
|