zhanghui před 2 roky
rodič
revize
371b1b5cd2

+ 146 - 19
orderPages/bookService/index.vue

@@ -29,19 +29,20 @@
 			<view class="serob">
 				<text>服务人员</text>
 			</view>
-			<view >
+			<view>
 				<u-grid col="4">
-					<u-grid-item  v-for="(item,index1) in item.serviceTeacherList" :key="index1" >
-						<view class="serobItem flex-col " >
+					<u-grid-item  v-for="(item1,index1) in item.serviceTeacherList" :key="index1">
+						<view class="serobItem flex-col"  @click="selectServiceTeach(item.serviceTeacherList,index,index1)">
 							<view class="serobImgView ">
-								<image class="serobImg" mode="aspectFill" :src="item.facePhotoUrl || '/static/logo.png'"></image>
+								<image class="serobImg" mode="aspectFill" :src="item1.facePhotoUrl || '/static/logo.png'"></image>
 							</view>
-							<text class="serobName ">{{item.personName || '未填写'}}</text>
+							<text class="serobName ">{{item1.personName || '未填写'}}</text>
 							<view class="flex-row justify-center ">
 								<u-icon name="rmb-circle" size="14"></u-icon>
-								<text class="teachPrice">¥{{item.fee}}</text>
+								<text class="teachPrice">¥{{item1.fee}}</text>
 							</view>
-							<view class="serobV " v-if="item.select === true">
+							<view class="serobV " v-if="item1.select">
+
 								<image class="serobVicon" src="/static/order/ud20.png"></image>
 							</view>
 						</view>
@@ -53,13 +54,13 @@
 			</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}">
+					<u-grid-item v-if="item2.total > 0"  v-for="(item2,index2) in item.serviceTimeList" :key="index2">
+						<view class="flex-col justify-center timeItem " :class="{selectBack: item2.select}" @click="selectServiceTime(item.serviceTimeList,index,index2)">
 							<view class="flex-row justify-center">
-								<text class="time">{{item.label}}</text>
+								<text class="time">{{item2.label}}</text>
 							</view>
 							<view class="flex-row justify-center">
-								<text class="price">¥{{item.price}}</text>
+								<text class="price">¥{{item2.price}}</text>
 							</view>
 						</view>
 					</u-grid-item>
@@ -91,7 +92,7 @@
 			<view class="btn flex-row justify-between">
 				<view>
 					<text class="title">待支付</text>
-					<text class="num">¥{{ price }}</text>
+					<text class="num">¥{{price}}</text>
 				</view>
 				<view class="btnRight" @click="commitOrder">
 					<text>提交</text>
@@ -152,7 +153,6 @@
 			this.orderParam.serviceStoreId = this.store.storeId
 			//获取排班日期
 			this.selectDate()
-			this.listServiceObject()
 
 		},
 		onShow() {
@@ -186,6 +186,8 @@
 					this.serviceTeacherList = res.data.data;
 					this.serviceTeacherList[0].select = true
 					this.getServicePersonUrl(this.serviceTeacherList);
+					this.listServiceObject()
+
 				})
 			},
 			getServicePersonUrl(items){
@@ -244,6 +246,8 @@
 
 						let selectServiceObjectList = this.orderParam.childService
 
+
+						//选择服务对象时,获取的排班时间为全部技师的排班时间,所以只要某个时段被选过,那么这个时段的数量-1
 						selectServiceObjectList.forEach(selectServiceObject =>{
 							periodTimeList.forEach(periodTime =>{
 								if (selectServiceObject.serviceStartTime === periodTime.label ){
@@ -251,17 +255,51 @@
 								}
 							})
 						})
-						periodTimeList = periodTimeList.filter(periodTime=> periodTime.total>0)
-						periodTimeList[0].select = true
+
+
+						let date = null //系统为当前服务对象分配的时间
+
+						for (const time of periodTimeList) {
+							if (time.total>0){
+								time.select = true
+								date = time
+								//为当前服务对象分配时间段成功时,需要将以前的服务对象的可选择的时间段的total -1
+								selectServiceObjectList.forEach(selectServiceObject =>{
+
+									if (selectServiceObject.serviceUserId === -1){
+										//如果子订单没有指定技师,则对应的时段-1
+										selectServiceObject.serviceTimeList.forEach(t=>{
+											if (t.label == date.label){
+												t.total = t.total -1
+											}
+										})
+
+									}else {
+										selectServiceObject.serviceTimeList.forEach(t=>{
+											//如果子订单指定技师,且该技师的服务时段未被选中,则对应的时段-1
+											if (t.label == date.label && !t.select){
+												t.total = t.total -1
+											}
+										})
+									}
+
+								})
+								break
+							}
+						}
 						console.log(periodTimeList)
+						//这里只为了断开技师列表的应用关系
+						let serviceTeacherListStr = JSON.stringify(this.serviceTeacherList)
+						let serviceTeacherList = JSON.parse(serviceTeacherListStr)
+						//创建子订单项
 						let childService ={
 							serviceObjectId: item.id,
 							facePhotoUrl:item.facePhotoUrl, //回显需要,不做参数
 							nickName:item.nickName, //回显需要,不做参数
-							serviceUserId: this.serviceTeacherList[0].personId,
-							fee:this.serviceTeacherList[0].fee,//回显需要,不做参数
-							serviceStartTime: periodTimeList[0].label,
-							serviceTeacherList:this.serviceTeacherList,//服务人员列表,回显需要,不做参数
+							serviceUserId: serviceTeacherList[0].personId,
+							fee:serviceTeacherList[0].fee,//回显需要,不做参数
+							serviceStartTime: date.label,
+							serviceTeacherList:serviceTeacherList,//服务人员列表,回显需要,不做参数
 							serviceTimeList:periodTimeList//服务时段列表,回显需要,不做参数
 						}
 						this.orderParam.childService.push(childService)
@@ -273,10 +311,99 @@
 				this.price = 0
 				for (let childService of this.orderParam.childService) {
 					this.price =  this.price * 1 + childService.fee * 1
+					this.price = this.price.toFixed(2)
 				}
 			},
 
 
+			selectServiceTeach(items,index,index1){
+				items.forEach(e=>{
+					e.select=false
+				})
+				items[index1].select =true
+				this.orderParam.childService[index].fee = items[index1].fee
+				this.orderParam.childService[index].serviceUserId = items[index1].personId
+				this.$api.getServicePersonTime({
+					personId: items[index1].personId,
+					date: this.periodDate.label,
+					storeId:this.store.storeId
+				}).then(res => {
+					let serviceTimeList = res.data.data
+					let selectServiceObjectList = this.orderParam.childService.filter(selectServiceObject =>
+							(selectServiceObject.serviceUserId === items[index1].personId
+							&& selectServiceObject.serviceObjectId !== this.orderParam.childService[index].serviceObjectId)
+							|| selectServiceObject.serviceUserId === -1
+					)
+					selectServiceObjectList.forEach(selectServiceObject =>{
+						serviceTimeList.forEach(periodTime =>{
+							if (selectServiceObject.serviceStartTime === periodTime.label ){
+								if (selectServiceObject.serviceUserId === -1){
+									selectServiceObject.serviceTimeList.forEach(t=>{
+										if (t.label == periodTime.label && t.total === 1){
+											periodTime.total = periodTime.total - 1
+										}
+									})
+								}else {
+									periodTime.total = periodTime.total - 1
+								}
+							}
+						})
+					})
+					for (const time of serviceTimeList) {
+						if (time.total>0){
+							time.select = true
+							break
+						}
+					}
+					serviceTimeList[0].select = true
+					this.orderParam.childService[index].serviceStartTime= serviceTimeList[0].label,
+					this.orderParam.childService[index].serviceTimeList= serviceTimeList
+				})
+				this.price = 0
+				for (let childService of this.orderParam.childService) {
+					this.price =  this.price * 1 + childService.fee * 1
+					this.price = this.price.toFixed(2)
+				}
+
+				console.log(this.price)
+				this.$forceUpdate()
+			},
+			selectServiceTime(items,index,index2){
+				console.log(items,index,index2)
+				items.forEach(e=>{
+					e.select=false
+				})
+				items[index2].select =true // 新选中的时间
+				let selectServiceObject = this.orderParam.childService[index] //旧的时间
+				this.orderParam.childService.forEach(i=>{
+					if (selectServiceObject.serviceUserId === -1){
+						i.serviceTimeList.forEach(t=>{
+							if (t.label == selectServiceObject.serviceStartTime && !t.select ){
+								console.log('-1----------加1')
+								t.total +=1
+							}
+							if (t.label == items[index2].serviceStartTime && i.serviceObjectId != selectServiceObject.serviceObjectId){
+								console.log('-1----------减1')
+								t.total -=1
+							}
+						})
+					}else {
+						if (selectServiceObject.serviceUserId == i.serviceUserId){
+							i.serviceTimeList.forEach(t=>{
+								if (t.label == selectServiceObject.serviceStartTime && !t.select ){
+									t.total +=1
+								}
+								if (t.label == items[index2].serviceStartTime && i.serviceObjectId != selectServiceObject.serviceObjectId){
+									t.total -=1
+								}
+							})
+						}
+					}
+				})
+				this.orderParam.childService[index].serviceStartTime = items[index2].label
+				this.$forceUpdate()
+			},
+
 			selectChange() {
 				this.selectIcon = !this.selectIcon
 			},

+ 463 - 459
orderPages/orderDetail/index.vue

@@ -1,466 +1,470 @@
 <template>
-        <view class="page" >
-                    <view class="state ">
-                        <view class="flex-row justify-center">
-                            <u-icon name="cut" color="#93D21A" size="18"></u-icon>
-                            <text>{{order.orderStatusDesc}}</text>
-                        </view>
-                        <view class="box_4 flex-row justify-center">
-                            <text>{{order.orderDesc}}</text>
-                        </view>
-                    </view>
-                    <view class="detail">
-                        <view :class="order.serviceAttribute == 1? 'serviceAttrDesc':'serviceAttrDesc1'">
-                            <text>{{order.serviceAttrDesc}}</text>
-                        </view>
-                        <view class="flex-row justify-start orderNo">
-                            <text>订单编号:</text>
-                            <text>{{order.orderNo}}</text>
-                        </view>
-
-                        <view class="flex-row justify-between  jishi">
-                            <view class="flex-col ">
-                                <view class=" flex-row">
-                                    <u-icon name="/static/order/ud1.png" color="#93D21A" size="18"></u-icon>
-                                    <text  class="key">服务日期:</text>
-                                    <text  class="value">{{order.serviceDate || ''}}</text>
-                                </view>
-                                <view class="flex-row">
-                                    <u-icon name="/static/order/ud2.png" color="#93D21A" size="18"></u-icon>
-                                    <text class="key">服务门店:</text>
-                                    <text class="value">{{order.storeName}}</text>
-                                </view>
-                                <view class="flex-row">
-                                    <u-icon name="/static/order/ud14.png" size="16"></u-icon>
-                                    <text class="key">下单时间:</text>
-                                    <text class="value">{{order.createTime}}</text>
-                                </view>
-                            </view>
-
-                        </view>
-
-
-                        <view class="flex-col borderBottom " v-for="(item,index) in order.child" :key="index">
-                                <view class="flex-row justify-between ">
-                                    <text class="serviceType">排号:A102</text>
-                                    <text class="projectState">{{item.statusDesc}}</text>
-                                </view>
-
-                                <view class="box_11">
-                                    <view class="group_2"></view>
-                                    <view class="group_3">
-                                        <view class="flex-row">
-                                            <u-icon name="/static/order/ud22.png" size="16"></u-icon>
-                                            <text class="key">服务项目:</text>
-                                            <text class="value">{{item.servicePerson || ''}}</text>
-                                        </view>
-                                        <view class="flex-row">
-                                            <u-icon name="/static/order/ud21.png" size="16"></u-icon>
-                                            <text class="key">服务对象:</text>
-                                            <text class="value">{{item.servicePerson || ''}}</text>
-                                        </view>
-                                        <view class="flex-row">
-                                            <u-icon name="/static/order/ud14.png" size="16"></u-icon>
-                                            <text class="key">服务时段:</text>
-                                            <text class="value">{{item.servicePerson || ''}}</text>
-                                        </view>
-                                        <view class="flex-row">
-                                            <u-icon name="/static/order/ud3.png" size="16"></u-icon>
-                                            <text class="key">服务人员:</text>
-                                            <text class="value">{{item.servicePerson || ''}}</text>
-                                        </view>
-                                    </view>
-                                </view>
-                                <view class="flex-row justify-between">
-                                    <view >
-
-                                      <text  class="key">服务金额:</text>
-                                      <text  class="projectMoney">¥{{item.payAmount}}</text>
-<!--                                      <text  class="lineMoney">¥{{item.servicePrice}}</text>-->
-                                    </view>
-
-                                    <view class="flex-row" @click="appeal(item.orderServiceId)">
-                                        <u-icon name="/static/order/ud17.png" color="#93D21A" size="14"></u-icon>
-                                        <text  class="ss_key">申诉</text>
-                                    </view>
-                                </view>
-                        </view>
-                    </view>
-
-            <view class="bottomHeight"></view>
-
-            <view class="bottom1 flex-col" >
-                <text class="allMoney"></text>
-                <view class="bottomBtn flex-row justify-between">
-                    <view class=" flex-row">
-                        <text  class="unpaid">合计</text>
-                        <text  class="preferentialPrice">¥{{allPrice}}</text>
-                      <text  class="unpaid">已优惠</text>
-                        <text  class="originalPrice">¥{{totalDiscount}}</text>
-<!--                        <text  class="priceDetail">价格明细</text>-->
-                    </view>
-
-                    <view v-if="order.canPay" class="btn" @click="qenPayInfo">
-                        <text class="text_33">结 算</text>
-                    </view>
-                    <view v-else class="btn" @click="orderFinish">
-                        <text  class="text_33">结束订单</text>
-                    </view>
-                </view>
-            </view>
-
-            <uni-popup ref="appealPopup"  :animation="false" :catchtouchmove="true">
-
-                <view class="appealView flex-col justify-around">
-                    <view class="popupTitle">
-                        <text>请输入申诉理由</text>
-                    </view>
-
-                    <view class="lex-row justify-center">
-                        <textarea class="textarea" v-model="appealReason"  placeholder="请输入申诉理由"></textarea>
-                    </view>
-
-
-                    <view class="flex-row justify-around">
-                        <view class="leftBtn" @click="appealPopupClose">
-                            <text>取消</text>
-                        </view>
-                        <view class="rightBtn" @click="commitAppeal">
-                            <text>确定</text>
-                        </view>
-                    </view>
-                </view>
-
-            </uni-popup>
-
-
-            <uni-popup ref="popup" :catchtouchmove="true" :animation="false" type="bottom">
-
-                <view class="payView">
-                    <view class="flex-row justify-between">
-                        <text class="payType">请选择支付方式</text>
-                        <image class="x" src="/static/common/ox.png" @click="closePayPopup"></image>
-                    </view>
-                    <view class="payTitle">
-                        <text>选择微信支付或余额支付</text>
-                    </view>
-
-
-                    <view class="payItem flex-row justify-between" @click="payItem(1)">
-                        <view class="flex-row">
-                            <u-icon name="/static/me/u701.png" color="#38db38" size="36"></u-icon>
-                            <view class="payName flex-col justify-center">
-                                <text>余额支付</text>
-                                <text class="balance">可以余额¥{{userInfo.balance || 0}}</text>
-                            </view>
-                        </view>
-
-                        <view class="flex-col justify-center">
-                            <view v-if="curServiceTab === 1" >
-                                <u-icon name="checkmark-circle-fill" color="#38db38" size="25"></u-icon>
-                            </view>
-                            <view v-else>
-                                <u-icon name="/static/order/ud9.png" color="green" size="25"></u-icon>
-                            </view>
-                        </view>
-                    </view>
-
-                    <view class="payItem flex-row justify-between" @click="payItem(2)">
-                        <view class="flex-row">
-                            <u-icon name="weixin-circle-fill" color="#38db38" size="36"></u-icon>
-                            <view class="payName flex-col justify-center">
-                                <text>微信支付</text>
-                            </view>
-                        </view>
-                        <view class="flex-col justify-center">
-                            <view v-if="curServiceTab === 2" >
-                                <u-icon name="checkmark-circle-fill" color="#38db38" size="25"></u-icon>
-                            </view>
-                            <view v-else>
-                                <u-icon name="/static/order/ud9.png" color="green" size="25"></u-icon>
-                            </view>
-                        </view>
-                    </view>
-
-                    <view class="commitBtn" @click="commonGeneralOrder">
-                        <text>确定</text>
-                    </view>
-                </view>
-
-            </uni-popup>
-
-
-            <uni-popup ref="passwordPopup">
-                <view class="passwordView flex-col">
-                    <view class="flex-row justify-center">
-                        <text>请输入交易密码</text>
-                    </view>
-                    <view class="h-tab-bar flex-row justify-center">
-                        <u-code-input  v-model="password" mode="box" dot></u-code-input>
-                    </view>
-                    <view class="flex-row justify-center">
-                        <view class="h-operate-btn flex-row justify-center" @click="balancePay">
-                            <text>确定</text>
-                        </view>
-                    </view>
-                </view>
-            </uni-popup>
-
-
-        </view>
+	<view class="page">
+		<view class="state ">
+			<view class="flex-row justify-center">
+				<u-icon name="cut" color="#93D21A" size="18"></u-icon>
+				<text>{{order.orderStatusDesc}}</text>
+			</view>
+			<view class="box_4 flex-row justify-center">
+				<text>{{order.orderDesc}}</text>
+			</view>
+		</view>
+		<view class="detail">
+			<view :class="order.serviceAttribute == 1? 'serviceAttrDesc':'serviceAttrDesc1'">
+				<text>{{order.serviceAttrDesc}}</text>
+			</view>
+			<view class="flex-row justify-start orderNo">
+				<text>订单编号:</text>
+				<text>{{order.orderNo}}</text>
+			</view>
+
+			<view class="flex-row justify-between  jishi">
+				<view class="flex-col ">
+					<view class=" flex-row">
+						<u-icon name="/static/order/ud1.png" color="#93D21A" size="18"></u-icon>
+						<text class="key">服务日期:</text>
+						<text class="value">{{order.serviceDate || ''}}</text>
+					</view>
+					<view class="flex-row">
+						<u-icon name="/static/order/ud2.png" color="#93D21A" size="18"></u-icon>
+						<text class="key">服务门店:</text>
+						<text class="value">{{order.storeName}}</text>
+					</view>
+					<view class="flex-row">
+						<u-icon name="/static/order/ud14.png" size="16"></u-icon>
+						<text class="key">下单时间:</text>
+						<text class="value">{{order.createTime}}</text>
+					</view>
+				</view>
+			</view>
+
+
+			<view class="flex-col borderBottom " v-for="(item,index) in order.child" :key="index">
+				<view class="flex-row justify-between ">
+					<text class="serviceType">排号:{{item.planNumber}}</text>
+					<text class="projectState">{{item.statusDesc}}</text>
+				</view>
+
+				<view class="box_11">
+					<view class="group_2"></view>
+					<view class="group_3">
+						<view class="flex-row">
+							<u-icon name="/static/order/ud22.png" size="16"></u-icon>
+							<text class="key">服务项目:</text>
+							<text class="value">{{item.serviceName || ''}}</text>
+						</view>
+						<view class="flex-row">
+							<u-icon name="/static/order/ud21.png" size="16"></u-icon>
+							<text class="key">服务对象:</text>
+							<text class="value">{{item.serviceObjectName || ''}}</text>
+						</view>
+						<view class="flex-row">
+							<u-icon name="/static/order/ud14.png" size="16"></u-icon>
+							<text class="key">服务时段:</text>
+							<text class="value">{{item.servicePerson || ''}}</text>
+						</view>
+						<view class="flex-row">
+							<u-icon name="/static/order/ud3.png" size="16"></u-icon>
+							<text class="key">服务人员:</text>
+							<text class="value">{{item.servicePerson || ''}}</text>
+						</view>
+					</view>
+				</view>
+				<view class="flex-row justify-between">
+					<view>
+
+						<text class="key">服务金额:</text>
+						<text class="projectMoney">¥{{item.servicePrice}}</text>
+						<!--                                      <text  class="lineMoney">¥{{item.servicePrice}}</text>-->
+					</view>
+
+					<view v-if="item.status == 2" class="flex-row" @click="appeal(item.orderServiceId)">
+						<u-icon name="/static/order/ud17.png" color="#93D21A" size="14"></u-icon>
+						<text class="ss_key">申诉</text>
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<view class="bottomHeight"></view>
+
+		<view class="bottom1 flex-col">
+			<text class="allMoney"></text>
+			<view class="bottomBtn flex-row justify-between">
+				<view class=" flex-row">
+					<text class="unpaid">合计</text>
+					<text class="preferentialPrice">¥{{allPrice}}</text>
+					<text class="unpaid">已优惠</text>
+					<text class="originalPrice">¥{{totalDiscount}}</text>
+					<!--                        <text  class="priceDetail">价格明细</text>-->
+				</view>
+
+				<view v-if="order.canPay" class="btn" @click="qenPayInfo">
+					<text class="text_33">结 算</text>
+				</view>
+				<view v-else class="btn" @click="orderFinish">
+					<text class="text_33">结束订单</text>
+				</view>
+			</view>
+		</view>
+
+		<uni-popup ref="appealPopup" :animation="false" :catchtouchmove="true">
+
+			<view class="appealView flex-col justify-around">
+				<view class="popupTitle">
+					<text>请输入申诉理由</text>
+				</view>
+
+				<view class="lex-row justify-center">
+					<textarea class="textarea" v-model="appealReason" placeholder="请输入申诉理由"></textarea>
+				</view>
+
+
+				<view class="flex-row justify-around">
+					<view class="leftBtn" @click="appealPopupClose">
+						<text>取消</text>
+					</view>
+					<view class="rightBtn" @click="commitAppeal">
+						<text>确定</text>
+					</view>
+				</view>
+			</view>
+
+		</uni-popup>
+
+
+		<uni-popup ref="popup" :catchtouchmove="true" :animation="false" type="bottom">
+
+			<view class="payView">
+				<view class="flex-row justify-between">
+					<text class="payType">请选择支付方式</text>
+					<image class="x" src="/static/common/ox.png" @click="closePayPopup"></image>
+				</view>
+				<view class="payTitle">
+					<text>选择微信支付或余额支付</text>
+				</view>
+
+
+				<view class="payItem flex-row justify-between" @click="payItem(1)">
+					<view class="flex-row">
+						<u-icon name="/static/me/u701.png" color="#38db38" size="36"></u-icon>
+						<view class="payName flex-col justify-center">
+							<text>余额支付</text>
+							<text class="balance">可以余额¥{{userInfo.balance || 0}}</text>
+						</view>
+					</view>
+
+					<view class="flex-col justify-center">
+						<view v-if="curServiceTab === 1">
+							<u-icon name="checkmark-circle-fill" color="#38db38" size="25"></u-icon>
+						</view>
+						<view v-else>
+							<u-icon name="/static/order/ud9.png" color="green" size="25"></u-icon>
+						</view>
+					</view>
+				</view>
+
+				<view class="payItem flex-row justify-between" @click="payItem(2)">
+					<view class="flex-row">
+						<u-icon name="weixin-circle-fill" color="#38db38" size="36"></u-icon>
+						<view class="payName flex-col justify-center">
+							<text>微信支付</text>
+						</view>
+					</view>
+					<view class="flex-col justify-center">
+						<view v-if="curServiceTab === 2">
+							<u-icon name="checkmark-circle-fill" color="#38db38" size="25"></u-icon>
+						</view>
+						<view v-else>
+							<u-icon name="/static/order/ud9.png" color="green" size="25"></u-icon>
+						</view>
+					</view>
+				</view>
+
+				<view class="commitBtn" @click="commonGeneralOrder">
+					<text>确定</text>
+				</view>
+			</view>
+
+		</uni-popup>
+
+
+		<uni-popup ref="passwordPopup">
+			<view class="passwordView flex-col">
+				<view class="flex-row justify-center">
+					<text>请输入交易密码</text>
+				</view>
+				<view class="h-tab-bar flex-row justify-center">
+					<u-code-input v-model="password" mode="box" dot></u-code-input>
+				</view>
+				<view class="flex-row justify-center">
+					<view class="h-operate-btn flex-row justify-center" @click="balancePay">
+						<text>确定</text>
+					</view>
+				</view>
+			</view>
+		</uni-popup>
+
+
+	</view>
 </template>
 
 <script>
-import UniPopup from "../../uni_modules/uni-popup/components/uni-popup/uni-popup";
-export default {
-    components: {
-        UniPopup
-    },
-    data() {
-        return {
-            title: 'Hello',
-            tabIndex: 3,
-            order:{},
-            allPrice:0,
-            totalDiscount:0,
-            appealId:'',
-            appealReason:'',
-            orderId:'',
-            curServiceTab:2,
-            userInfo:{},
-            tradeNo:'',
-            password:'',
-            requestStatus : false
-        }
-    },
-    onLoad(e) {
-        this.orderId = e.id
-        this.getUserInfo();
-    },
-    onShow(){
-      this.getOrderDetailByOrderId(this.orderId )
-    },
-    methods: {
-      getUserInfo() {
-          this.$api.getUserInfo().then(res => {
-              this.userInfo = res.data.data
-              uni.setStorageSync('userInfo', res.data.data);
-          });
-      },
-        balancePay(){
-
-            let that = this;
-            // if(this.password.length< 6 ){
-            //     uni.showToast({
-            //         title: "交易密码不能小于6位"
-            //     })
-            //     return ;
-            // }
-            // this.$refs.passwordPopup.close()
-
-            this.$api.trade({
-                tradeNo: this.tradeNo,
-                password: ''
-            }).then((res)=>{
-                this.requestStatus=false
-                uni.hideLoading();
-                uni.showToast({
-                    title: '支付成功!'
-                });
-                that.$refs.popup.close()
-                that.getOrderDetailByOrderId(that.orderId)
-            }).catch((err)=>{
-                this.requestStatus=false
-                uni.hideLoading();
-                uni.showToast({
-                    title: err.msg,
-                    icon:'error'
-                })
-            })
-        },
-
-        scanCodeOrder(order){
-            uni.scanCode({
-                scanType: ['qrCode'],
-                success: function (res) {
-                    let json = JSON.parse(res.result)
-                    if(json.storeId != order.storeId){
-                        uni.showToast({
-                            icon: 'error',
-                            duration: 3000,
-                            title: '请扫描订单门店二维码'
-                        });
-                        return
-                    }
-                    uni.navigateTo({
-                        url:'/orderPages/serviceItems/index?serviceStationId='+ json.stationId + '&orderId='+order.orderId + '&serviceObjectId=' + order.serviceObjectId
-                    })
-                }
-            })
-        },
-
-        commonGeneralOrder(){
-            if(this.requestStatus){
-                return;
-            }
-            this.requestStatus=true
-            uni.showLoading({
-                title: '支付中'
-            });
-            let that =this
-            if (this.curServiceTab===1){
-                // that.password = '';
-                // this.$refs.popup.close()
-                // this.$refs.passwordPopup.open()
-
-                this.balancePay()
-
-            }else {
-                this.$api.wechatPayTradeNo({tradeNo:this.tradeNo}).then(res=>{
-                    var param = res.data.data;
-                    uni.requestPayment({
-                        appId: param.appid,
-                        timeStamp: param.timestamp+"",
-                        nonceStr: param.noncestr,
-                        package: "prepay_id="+param.prepayid,
-                        signType: "RSA",
-                        paySign: param.sign,
-                        success: res => {
-                            this.requestStatus=false
-                            uni.hideLoading();
-                            uni.showToast({
-                                title: '支付成功!'
-                            });
-                            that.getOrderDetailByOrderId(that.orderId)
-                            that.$refs.popup.close()
-                        },
-                        fail: res => {
-                            this.requestStatus=false
-                            uni.hideLoading();
-                            uni.showModal({
-                                content: '支付失败',
-                                showCancel: false
-                            });
-                            that.$refs.popup.close()
-                        }
-                    });
-                })
-            }
-        },
-
-        orderFinish(){
-          this.$api.orderFinish(this.order.orderNo).then((res)=>{
-              uni.$u.toast('操作成功')
-              this.getOrderDetailByOrderId(this.order.orderId)
-          })
-        },
-
-        qenPayInfo(){
-
-            for(let i=0;i<this.order.child.length;i++){
-                if (this.order.child[i].status==3){
-                    uni.$u.toast('子订单未审核结束')
-                    return
-                }
-            }
-
-          this.getUserInfo();
-            let orderServiceIds = []
-            this.order.child.forEach(i=>{
-                if (i.status !=5){ //排除审核通过的子订单
-                    orderServiceIds.push(i.orderServiceId)
-                }
-            })
-            this.$api.qenPayInfo({
-                orderServiceIds:orderServiceIds,
-                orderNo:this.order.orderNo
-            }).then(res=>{
-                this.tradeNo=res.data.data.tradeNo
-                this.$refs.popup.open()
-            })
-        },
-
-        commitAppeal(){
-            this.$api.appeal({
-                childOrderId:this.appealId,
-                appealReason:this.appealReason
-            }).then(res=>{
-                this.appealReason=''
-                uni.$u.toast('申诉已提交')
-                this.$refs.appealPopup.close()
-                this.getOrderDetailByOrderId(this.orderId)
-            })
-        },
-        appealPopupClose(){
-            this.appealReason=''
-            this.$refs.appealPopup.close()
-        },
-
-        appeal(id){
-            this.appealId = id
-            this.$refs.appealPopup.open()
-        },
-
-        // 原来的计算价格逻辑  选择的时候计算
-        // tick(item,index){
-        //
-        //   if (item.status === 1 || item.status === 4){
-        //       this.allPrice = 0
-        //       this.totalDiscount = 0;
-        //       item.tick = !item.tick
-        //       this.$set(this.order.child,index,item)
-        //       this.order.child.forEach(i=>{
-        //           if (i.tick){
-        //               this.totalDiscount += i.discountAmount * 1;
-        //               this.allPrice += i.payAmount *1;
-        //           }
-        //       })
-        //       this.allPrice = this.allPrice.toFixed(2)
-        //       this.totalDiscount = this.totalDiscount.toFixed(2)
-        //   }
-        // },
-
-
-
-        //新的价格计算逻辑  订单加载或刷新的时候计算
-        calculatePrice(){
-            this.allPrice = 0
-            this.totalDiscount = 0;
-            this.order.child.forEach(i=>{
-                if (i.status !=5){ //不在申诉的子订单
-                    this.totalDiscount += i.discountAmount * 1;
-                    this.allPrice += i.payAmount *1;
-                }
-            })
-            this.allPrice = this.allPrice.toFixed(2)
-            this.totalDiscount = this.totalDiscount.toFixed(2)
-        },
-
-        getOrderDetailByOrderId(id){
-            this.$api.getOrderDetailByOrderId({
-                id:id
-            }).then(res=>{
-                this.order= res.data.data
-                this.calculatePrice()
-            })
-        },
-        payItem(num){
-          console.log('this.userInfo.balance',this.userInfo.balance*1)
-          console.log('this.price',this.allPrice*1)
-
-            if (this.userInfo.balance*1 < this.allPrice*1 && num == 1){
-                return
-            }
-            this.curServiceTab = num
-        },
-
-        closePayPopup(){
-            this.$refs.popup.close()
-        },
-    }
-}
+	import UniPopup from "../../uni_modules/uni-popup/components/uni-popup/uni-popup";
+	export default {
+		components: {
+			UniPopup
+		},
+		data() {
+			return {
+				title: 'Hello',
+				tabIndex: 3,
+				order: {},
+				allPrice: 0,
+				totalDiscount: 0,
+				appealId: '',
+				appealReason: '',
+				orderId: '',
+				curServiceTab: 2,
+				userInfo: {},
+				tradeNo: '',
+				password: '',
+				requestStatus: false
+			}
+		},
+		onLoad(e) {
+			this.orderId = e.id
+			this.getUserInfo();
+		},
+		onShow() {
+			this.getOrderDetailByOrderId(this.orderId)
+		},
+		methods: {
+			getUserInfo() {
+				this.$api.getUserInfo().then(res => {
+					this.userInfo = res.data.data
+					uni.setStorageSync('userInfo', res.data.data);
+				});
+			},
+			balancePay() {
+
+				let that = this;
+				// if(this.password.length< 6 ){
+				//     uni.showToast({
+				//         title: "交易密码不能小于6位"
+				//     })
+				//     return ;
+				// }
+				// this.$refs.passwordPopup.close()
+
+				this.$api.trade({
+					tradeNo: this.tradeNo,
+					password: ''
+				}).then((res) => {
+					this.requestStatus = false
+					uni.hideLoading();
+					uni.showToast({
+						title: '支付成功!'
+					});
+					that.$refs.popup.close()
+					that.getOrderDetailByOrderId(that.orderId)
+				}).catch((err) => {
+					this.requestStatus = false
+					uni.hideLoading();
+					uni.showToast({
+						title: err.msg,
+						icon: 'error'
+					})
+				})
+			},
+
+			scanCodeOrder(order) {
+				uni.scanCode({
+					scanType: ['qrCode'],
+					success: function(res) {
+						let json = JSON.parse(res.result)
+						if (json.storeId != order.storeId) {
+							uni.showToast({
+								icon: 'error',
+								duration: 3000,
+								title: '请扫描订单门店二维码'
+							});
+							return
+						}
+						uni.navigateTo({
+							url: '/orderPages/serviceItems/index?serviceStationId=' + json.stationId +
+								'&orderId=' + order.orderId + '&serviceObjectId=' + order
+								.serviceObjectId
+						})
+					}
+				})
+			},
+
+			commonGeneralOrder() {
+				if (this.requestStatus) {
+					return;
+				}
+				this.requestStatus = true
+				uni.showLoading({
+					title: '支付中'
+				});
+				let that = this
+				if (this.curServiceTab === 1) {
+					// that.password = '';
+					// this.$refs.popup.close()
+					// this.$refs.passwordPopup.open()
+
+					this.balancePay()
+
+				} else {
+					this.$api.wechatPayTradeNo({
+						tradeNo: this.tradeNo
+					}).then(res => {
+						var param = res.data.data;
+						uni.requestPayment({
+							appId: param.appid,
+							timeStamp: param.timestamp + "",
+							nonceStr: param.noncestr,
+							package: "prepay_id=" + param.prepayid,
+							signType: "RSA",
+							paySign: param.sign,
+							success: res => {
+								this.requestStatus = false
+								uni.hideLoading();
+								uni.showToast({
+									title: '支付成功!'
+								});
+								that.getOrderDetailByOrderId(that.orderId)
+								that.$refs.popup.close()
+							},
+							fail: res => {
+								this.requestStatus = false
+								uni.hideLoading();
+								uni.showModal({
+									content: '支付失败',
+									showCancel: false
+								});
+								that.$refs.popup.close()
+							}
+						});
+					})
+				}
+			},
+
+			orderFinish() {
+				this.$api.orderFinish(this.order.orderNo).then((res) => {
+					uni.$u.toast('操作成功')
+					this.getOrderDetailByOrderId(this.order.orderId)
+				})
+			},
+
+			qenPayInfo() {
+
+				for (let i = 0; i < this.order.child.length; i++) {
+					if (this.order.child[i].status == 3) {
+						uni.$u.toast('子订单未审核结束')
+						return
+					}
+				}
+
+				this.getUserInfo();
+				let orderServiceIds = []
+				this.order.child.forEach(i => {
+					if (i.status != 5) { //排除审核通过的子订单
+						orderServiceIds.push(i.orderServiceId)
+					}
+				})
+				this.$api.qenPayInfo({
+					orderServiceIds: orderServiceIds,
+					orderNo: this.order.orderNo
+				}).then(res => {
+					this.tradeNo = res.data.data.tradeNo
+					this.$refs.popup.open()
+				})
+			},
+
+			commitAppeal() {
+				this.$api.appeal({
+					childOrderId: this.appealId,
+					appealReason: this.appealReason
+				}).then(res => {
+					this.appealReason = ''
+					uni.$u.toast('申诉已提交')
+					this.$refs.appealPopup.close()
+					this.getOrderDetailByOrderId(this.orderId)
+				})
+			},
+			appealPopupClose() {
+				this.appealReason = ''
+				this.$refs.appealPopup.close()
+			},
+
+			appeal(id) {
+				this.appealId = id
+				this.$refs.appealPopup.open()
+			},
+
+			// 原来的计算价格逻辑  选择的时候计算
+			// tick(item,index){
+			//
+			//   if (item.status === 1 || item.status === 4){
+			//       this.allPrice = 0
+			//       this.totalDiscount = 0;
+			//       item.tick = !item.tick
+			//       this.$set(this.order.child,index,item)
+			//       this.order.child.forEach(i=>{
+			//           if (i.tick){
+			//               this.totalDiscount += i.discountAmount * 1;
+			//               this.allPrice += i.payAmount *1;
+			//           }
+			//       })
+			//       this.allPrice = this.allPrice.toFixed(2)
+			//       this.totalDiscount = this.totalDiscount.toFixed(2)
+			//   }
+			// },
+
+
+
+			//新的价格计算逻辑  订单加载或刷新的时候计算
+			calculatePrice() {
+				this.allPrice = 0
+				this.totalDiscount = 0;
+				this.order.child.forEach(i => {
+					if (i.status != 5) { //不在申诉的子订单
+						this.totalDiscount += i.discountAmount * 1;
+						this.allPrice += i.payAmount * 1;
+					}
+				})
+				this.allPrice = this.allPrice.toFixed(2)
+				this.totalDiscount = this.totalDiscount.toFixed(2)
+			},
+
+			getOrderDetailByOrderId(id) {
+				this.$api.getOrderDetailByOrderId({
+					id: id
+				}).then(res => {
+					this.order = res.data.data
+					this.calculatePrice()
+				})
+			},
+			payItem(num) {
+				console.log('this.userInfo.balance', this.userInfo.balance * 1)
+				console.log('this.price', this.allPrice * 1)
+
+				if (this.userInfo.balance * 1 < this.allPrice * 1 && num == 1) {
+					return
+				}
+				this.curServiceTab = num
+			},
+
+			closePayPopup() {
+				this.$refs.popup.close()
+			},
+		}
+	}
 </script>
 
 <style>
-@import '/common/css/common.css';
-@import './index.rpx.scss';</style>
+	@import '/common/css/common.css';
+	@import './index.rpx.scss';
+</style>

+ 56 - 127
orderPages/storeService/index.rpx.scss

@@ -4,33 +4,72 @@
 .group{
   background: #FFFFFF;
   padding: 24rpx 32rpx;
+  margin-top: 16rpx;
 }
-.serob{
-  font-size: 32rpx;
+.groupItemKey{
+  font-size: 28rpx;
+  width: 200rpx;
   font-weight: bold;
   color: #333333;
+  line-height: 92rpx;
+}
+.marginTop{
+  margin-top: 24rpx;
+}
+.textareaView{
+  height: 280rpx;
+  background: #FAFAFA;
+  border-radius: 16rpx;
+  margin-top: 16rpx;
+  margin-bottom: 32rpx;
+  font-size: 28rpx;
+  font-weight: 400;
+  color: #999999;
+  padding: 24rpx;
+}
+.tabBarLineHeight {
+  height: 138rpx;
+}
+.tabBarView {
+  width: 750rpx;
+  height: 138rpx;
+  background: #ffffff;
+  position: fixed;
+  left: 0;
+  bottom: 0;
+  z-index: 5;
+
+  .submitButton {
+    text-align: center;
+    line-height: 84rpx;
+    width: 686rpx;
+    height: 84rpx;
+    background: #FFE05C;
+    border-radius: 54rpx;
+    margin-left: 32rpx;
+  }
 }
-.serobItems{
-  margin-top: 32rpx;
-  height: 206rpx;
+
+.periodDate{
+  height: 100rpx;
+  background: #FFFFFF;
+  font-size: 28rpx;
+  font-weight: 500;
+  color: #333333;
+  line-height: 100rpx;
+  padding-left: 32rpx;
 }
-.scrollX{
-  height: 206rpx;
-  white-space: nowrap;
-  min-width: 150rpx;
-  max-width: 506rpx;
 
+.serob{
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333333;
 }
+
 .serobItem{
-  width: 150rpx;
-  height: 206rpx;
+  margin-top: 24rpx;
   text-align: center;
-  margin-left: 28rpx;
   position: relative;
-
-}
-.serobItem:first-child {
-  margin-left: 0rpx;
 }
 .serobImgView{
   width: 146rpx;
@@ -41,19 +80,7 @@
   width: 146rpx;
   height: 146rpx;
   border-radius: 75rpx;
-
-}
-.addSerobImg{
-  width: 146rpx;
-  height: 146rpx;
-  border-radius: 75rpx;
-  margin-left: 28rpx;
-  border: 2rpx dashed #DDDDDD;
-  font-size: 120rpx;
-  text-align: center;
-  line-height: 130rpx;
 }
-
 .serobName{
   height: 40rpx;
   font-size: 24rpx;
@@ -73,101 +100,3 @@
   width: 32rpx;
   height: 32rpx;
 }
-
-
-.hintView{
-  width: 686rpx;
-  height: 104rpx;
-  background: #FFF7EA;
-  border-radius: 16rpx;
-  border: 2rpx solid #FFFFFF;
-  margin: 24rpx 32rpx;
-}
-.hint{
-  width: 24rpx;
-  height: 24rpx;
-  border-radius: 12rpx;
-  text-align: center;
-  background:   #FFAF36;
-  color: #FFFFFF;
-  font-size: 18rpx;
-  margin-left: 10rpx;
-}
-.hintCentent{
-  font-size: 24rpx;
-  font-weight: 400;
-  color: #FFAF36;
-  line-height: 40rpx;
-  margin-left: 16rpx;
-  margin-top: 12rpx;
-}
-.marginTop{
-  margin-top: 24rpx;
-}
-.selectSerobImg{
-  width: 80rpx;
-  height: 80rpx;
-  border-radius: 40rpx;
-  margin-bottom: 40rpx;
-}
-.selectSerobName{
-  font-size: 24rpx;
-  font-weight: 400;
-  color: #666666;
-  line-height: 80rpx;
-  margin-left: 16rpx;
-}
-.groupItem{
-  height: 92rpx;
-  border-bottom: 1px solid #EEEEEE;
-}
-.groupItemKey{
-  font-size: 28rpx;
-  width: 200rpx;
-  font-weight: bold;
-  color: #333333;
-  line-height: 92rpx;
-}
-.groupItemContent{
-  font-size: 28rpx;
-  line-height: 92rpx;
-  font-weight: 400;
-  width: 486rpx;
-  color: #999999;
-}
-.tabBarLineHeight {
-  height: 138rpx;
-}
-
-.tabBarView {
-  width: 750rpx;
-  height: 138rpx;
-  background: #ffffff;
-  position: fixed;
-  left: 0;
-  bottom: 0;
-  z-index: 5;
-
-  .submitButton {
-    text-align: center;
-    line-height: 84rpx;
-    width: 686rpx;
-    height: 84rpx;
-    background: #FFE05C;
-    border-radius: 54rpx;
-    margin-left: 32rpx;
-  }
-}
-.textareaView{
-  height: 280rpx;
-  background: #FAFAFA;
-  border-radius: 16rpx;
-  margin-top: 16rpx;
-  margin-bottom: 32rpx;
-
-  font-size: 28rpx;
-  font-family: PingFangSC-Regular, PingFang SC;
-  font-weight: 400;
-  color: #999999;
-  padding: 24rpx;
-}

+ 196 - 243
orderPages/storeService/index.vue

@@ -1,251 +1,204 @@
 <template>
-  <view class="page">
-    <view class="flex-col group">
-      <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>
-            </view>
-          </view>
-        </scroll-view>
-        <view class="addSerobImg" @click="addServiceObject">
-          <text>+</text>
-        </view>
-      </view>
-    </view>
-
-
-    <view class="flex-row hintView">
-      <view class="flex-col justify-center">
-        <view class="hint">
-          <text>!</text>
-        </view>
-      </view>
-      <view class="hintCentent">
-        <text>娇宝,此排队提交后只针对一个服务对象,服务对象指接受娇骄儿理发服务的儿童</text>
-      </view>
-
-    </view>
-
-    <view class="flex-col group marginTop" v-for="(item, index) in  orderParam.childService" :key="index">
-      <view class="flex-row">
-        <image class="selectSerobImg" mode="aspectFill" :src="item.facePhotoUrl || '/static/logo.png'"></image>
-        <text class="selectSerobName">{{item.nickName || '未填写'}}</text>
-      </view>
-
-      <view class="flex-row  groupItem ">
-        <view class="groupItemKey ">
-          <text>服务日期</text>
-        </view>
-        <view class="flex-row justify-between groupItemContent ">
-          <text>{{ orderParam.serviceDate || '请选择服务日期' }}</text>
-        </view>
-      </view>
-
-      <view class="flex-row  groupItem">
-        <view class="groupItemKey">
-          <text>服务人员</text>
-        </view>
-        <view class="flex-row justify-between groupItemContent" >
-          <text>系统随机</text>
-        </view>
-      </view>
-
-      <view class="flex-row  groupItem">
-        <view class="groupItemKey">
-          <text>服务时段</text>
-        </view>
-        <view class="flex-row justify-between groupItemContent">
-          <text>系统随机</text>
-        </view>
-      </view>
-    </view>
-
-
-    <view class="flex-col group marginTop">
-      <view class="groupItemKey">
-        <text>服务定制</text>
-      </view>
-      <view class="textareaView">
-        <textarea v-model="orderParam.remark" placeholder-style="color:#999999;fontSize:28rpx" placeholder="如有其它特殊需求,请在此输入您的需求" />
-      </view>
-    </view>
-
-    <view class="tabBarLineHeight "></view>
-    <view class="tabBarView">
-      <view class="submitButton " @click="commonGeneralOrder">提交</view>
-    </view>
-
-  </view>
+	<view class="page">
+		<view class="periodDate">
+			<text>服务日期:{{orderParam.serviceDate}}</text>
+		</view>
+
+		<view class="flex-col group" v-if="serviceObjectList.length > 1">
+			<view class="serob"><text>服务对象</text></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>
+				</u-grid-item>
+			</u-grid>
+		</view>
+
+		<view class="flex-col group ">
+			<view class="groupItemKey">
+				<text>服务定制</text>
+			</view>
+			<view class="textareaView">
+				<textarea v-model="orderParam.remark" placeholder-style="color:#999999;fontSize:28rpx"
+					placeholder="如有其它特殊需求,请在此输入您的需求" />
+			</view>
+		</view>
+		<view class="tabBarLineHeight "></view>
+		<view class="tabBarView">
+			<view class="submitButton " @click="commonGeneralOrder">提交</view>
+		</view>
+
+	</view>
 </template>
 
 <script>
-
-export default {
-
-  components: {
-
-  },
-  data() {
-    return {
-      userInfo:{},
-      store:{},
-      serviceObjectList: [],
-      requestStatus: false,
-      orderParam:{
-        orderType: 1,
-        serviceAttribute: 1,
-        serviceStoreId: '',
-        remark: '',
-        serviceDate:'',
-        childService:[
-          // {
-          //   periodDate:'',//回显需要,不做参数
-          //   serviceObjectId: '',
-          //   facePhotoUrl:'', //回显需要,不做参数
-          //   nickName:'', //回显需要,不做参数
-          //   serviceUserId: '',
-          //   personName:'',//回显需要,不做参数
-          //   fee:'',//回显需要,不做参数
-          //   serviceStartTime: ''
-          // }
-        ]
-      }
-
-    }
-  },
-  onLoad() {
-    this.store = uni.getStorageSync('storeInfo')
-    this.userInfo = uni.getStorageSync('userInfo')
-    this.orderParam.serviceStoreId = this.store.storeId
-    let date = new Date();
-    this.orderParam.serviceDate = date.getFullYear() + '-' + ('0' + (date.getMonth() +1) ).slice(-2) + '-' + ('0' + date.getDate()).slice(-2)
-
-  },
-  onShow() {
-    // 服务对象
-    this.listServiceObject()
-  },
-  methods: {
-
-    // 查询服务对接信息列表
-    listServiceObject() {
-      this.$api.listServiceObject(this.reqParm).then((res) => {
-        console.log(res)
-        this.serviceObjectList = res.data.data
-        this.getImgUrlByBannerOssId(this.serviceObjectList);
-
-        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)
-        } else {
-          for (let selectServiceObject of this.orderParam.childService) {
-            for (let serviceObject of this.serviceObjectList) {
-              if (selectServiceObject.id === serviceObject.id) {
-                serviceObject.select = true
-              }
-            }
-          }
-        }
-
-
-      })
-    },
-    // 获取图片
-    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'
-      })
-    },
-
-    selectServiceObject(item) {
-      if (item.select) {
-        this.orderParam.childService = this.orderParam.childService.filter(selectServiceObject =>
-                selectServiceObject.serviceObjectId !== item.id)
-      } else {
-        let childService ={
-          periodDate: '',
-          serviceObjectId: item.id,
-          facePhotoUrl:item.facePhotoUrl,
-          nickName:item.nickName,
-          serviceUserId: -1 ,
-          fee:'' ,
-          serviceStartTime: '' ,
-        }
-        this.orderParam.childService.push(childService)
-
-      }
-      item.select = !item.select
-      this.price = 0
-      for (let childService of this.orderParam.childService) {
-        this.price =  this.price * 1 + childService.fee * 1
-      }
-    },
-
-
-
-    commonGeneralOrder() {
-
-
-      if(!this.orderParam.childService.length){
-        uni.$u.toast('请选择服务对象')
-        return
-      }
-      if (this.requestStatus) {
-        return;
-      }
-      this.requestStatus = true
-
-      this.$api.commonGeneralOrder(this.orderParam).then(res => {
-        this.requestStatus = false
-        uni.switchTab({
-          url: '/pages/order/index'
-        })
-
-      }).catch(err=>{
-        this.requestStatus = false
-      })
-    }
-
-  }
-}
+	export default {
+
+		components: {
+
+		},
+		data() {
+			return {
+				userInfo: {},
+				store: {},
+				serviceObjectList: [],
+				requestStatus: false,
+				orderParam: {
+					orderType: 1,
+					serviceAttribute: 1,
+					serviceStoreId: '',
+					remark: '',
+					serviceDate: '',
+					childService: [
+						// {
+						//   periodDate:'',//回显需要,不做参数
+						//   serviceObjectId: '',
+						//   facePhotoUrl:'', //回显需要,不做参数
+						//   nickName:'', //回显需要,不做参数
+						//   serviceUserId: '',
+						//   personName:'',//回显需要,不做参数
+						//   fee:'',//回显需要,不做参数
+						//   serviceStartTime: ''
+						// }
+					]
+				}
+
+			}
+		},
+		onLoad() {
+			this.store = uni.getStorageSync('storeInfo')
+			this.userInfo = uni.getStorageSync('userInfo')
+			this.orderParam.serviceStoreId = this.store.storeId
+			let date = new Date();
+			this.orderParam.serviceDate = date.getFullYear() + '-' + ('0' + (date.getMonth() + 1)).slice(-2) + '-' + ('0' +
+				date.getDate()).slice(-2)
+
+		},
+		onShow() {
+			// 服务对象
+			this.listServiceObject()
+		},
+		methods: {
+
+			// 查询服务对接信息列表
+			listServiceObject() {
+				this.$api.listServiceObject(this.reqParm).then((res) => {
+					console.log(res)
+					this.serviceObjectList = res.data.data
+					this.getImgUrlByBannerOssId(this.serviceObjectList);
+
+					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)
+					} else {
+						for (let selectServiceObject of this.orderParam.childService) {
+							for (let serviceObject of this.serviceObjectList) {
+								if (selectServiceObject.id === serviceObject.id) {
+									serviceObject.select = true
+								}
+							}
+						}
+					}
+
+
+				})
+			},
+			// 获取图片
+			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'
+				})
+			},
+
+			selectServiceObject(item) {
+				if (item.select) {
+					this.orderParam.childService = this.orderParam.childService.filter(selectServiceObject =>
+						selectServiceObject.serviceObjectId !== item.id)
+				} else {
+					let childService = {
+						periodDate: '',
+						serviceObjectId: item.id,
+						facePhotoUrl: item.facePhotoUrl,
+						nickName: item.nickName,
+						serviceUserId: -1,
+						fee: '',
+						serviceStartTime: '',
+					}
+					this.orderParam.childService.push(childService)
+
+				}
+				item.select = !item.select
+				this.price = 0
+				for (let childService of this.orderParam.childService) {
+					this.price = this.price * 1 + childService.fee * 1
+				}
+			},
+
+
+
+			commonGeneralOrder() {
+
+
+				if (!this.orderParam.childService.length) {
+					uni.$u.toast('请选择服务对象')
+					return
+				}
+				if (this.requestStatus) {
+					return;
+				}
+				this.requestStatus = true
+
+				this.$api.commonGeneralOrder(this.orderParam).then(res => {
+					this.requestStatus = false
+					uni.switchTab({
+						url: '/pages/order/index'
+					})
+
+				}).catch(err => {
+					this.requestStatus = false
+				})
+			}
+
+		}
+	}
 </script>
 
 <style scoped lang="scss">
-@import './index.rpx.scss';
+	@import './index.rpx.scss';
 </style>

+ 6 - 6
pages/order/module/mescrollUni-item.vue

@@ -62,9 +62,9 @@
 
 						</view>
 						<view class="nav-bar">
-							<view class="btn" v-if="!item.canPay && item.orderStatus == 6"  @click="orderFinish(item)">
-								<text>结束订单</text>
-							</view>
+<!--							<view class="btn" v-if="!item.canPay && item.orderStatus == 6"  @click="orderFinish(item)">-->
+<!--								<text>结束订单</text>-->
+<!--							</view>-->
 							<view class="btn" v-if="item.canPay"  @click="oneClickPay(item)">
 								<text>一键付款</text>
 							</view>
@@ -75,9 +75,9 @@
 								<text>去支付预约费用</text>
 							</view>
 
-							<view @click="getOrderSign(item)" class="btn" v-else-if="item.orderStatus == 5">
-								<text>点击查看排号</text>
-							</view>
+<!--							<view @click="getOrderSign(item)" class="btn" v-else-if="item.orderStatus == 5">-->
+<!--								<text>点击查看排号</text>-->
+<!--							</view>-->
 
 							<view @click="orderSign(item)" class="btn">
 								<text>签到</text>