lhl 2 years ago
parent
commit
6237a3d6b3

+ 0 - 8
pages/admin/staff/list.vue

@@ -1,8 +0,0 @@
-<template>
-</template>
-
-<script>
-</script>
-
-<style>
-</style>

+ 0 - 8
pages/admin/staff/sales.vue

@@ -1,8 +0,0 @@
-<template>
-</template>
-
-<script>
-</script>
-
-<style>
-</style>

+ 0 - 8
pages/admin/staff/stafforder.vue

@@ -1,8 +0,0 @@
-<template>
-</template>
-
-<script>
-</script>
-
-<style>
-</style>

+ 272 - 227
pages/goods/order_confirm/yuyue.vue

@@ -65,9 +65,21 @@
 			</view>
 			
 			<view class='moneyList'>
-				
+				<view class="item acea-row row-between-wrapper" >
+					<view>销售员工</view>
+				</view>
+				<scroll-view scroll-x="true" class="zp-wrap" @scrolltolower="">
+					<view class="zp-item" v-for="ygitem in yg.list" @click="choosYg(ygitem,1)"
+						:class="{'choose': ygitem.id == sale_yg.id}">
+						<image :src="ygitem.avatar || '../../../static/images/avt.png'" mode="" class="zp-logo"></image>
+						<view class="zp-name">{{ygitem.name}}</view>
+					</view>
+				</scroll-view>
+				<view class="item acea-row row-between-wrapper" >
+					<view>预约员工</view>
+				</view>
 				<scroll-view scroll-x="true" class="zp-wrap" @scrolltolower="">
-					<view class="zp-item" v-for="ygitem in yg.list" @click="choosYg(ygitem)"
+					<view class="zp-item" v-for="ygitem in yg.list" @click="choosYg(ygitem,2)"
 						:class="{'choose': ygitem.id == choose_yg.id}">
 						<image :src="ygitem.avatar || '../../../static/images/avt.png'" mode="" class="zp-logo"></image>
 						<view class="zp-name">{{ygitem.name}}</view>
@@ -343,9 +355,8 @@
 					loadingType: 'loadmore',
 					loaded: false,
 				},
-				choose_yg: {
-				
-				},
+				choose_yg: {},
+				sale_yg: {},
 				payInfo: {},
 			};
 		},
@@ -415,8 +426,12 @@
 				})
 			},
 			// 选择员工
-			choosYg(item) {
-				this.choose_yg = item
+			choosYg(item,index) {
+				if(index == 1) {
+					this.sale_yg = item
+				}else {
+					this.choose_yg = item
+				}
 			},
 			// 获取员工列表
 			getMen() {
@@ -717,8 +732,10 @@
 				console.log(e)
 				let that = this
 				if(e.action == 'payClose') {
+					console.log(this.payType)
 					this.pay_close = false
 				}else {
+					
 					SubscribeCreate({
 						uid: this.userInfo.uid,
 						work_member_id: this.choose_yg.id,
@@ -726,20 +743,250 @@
 						pay_type: e.value,
 						store_id: that.system_store.id,
 						reservation_time: that.yytime,
-						
+						sale_uid: that.sale_yg.id
 					}).then(res => {
-						that.$util.Tips({
-							title: '支付成功',
-							icon: 'success'
-						}, {
-							tab: 4,
-							url: goPages
-						});
-						setTimeout(()=> {
-							uni.switchTab({
-								url: '/pages/index/index'
-							})
-						},1500)
+						let status = res.data.status,
+							orderId = res.data.result.order_id,
+							jsConfig = res.data.result.jsConfig,
+							goPages = '/pages/goods/order_pay_status/index?order_id=' + orderId + '&msg=' + res
+							.msg +
+							'&type=6' + '&totalPrice=' + this.totalPrice + '&pay_type=' + e.value + '&pay_end=' + status
+						switch (status) {
+							case 'ORDER_EXIST':
+							case 'EXTEND_ORDER':
+							case 'PAY_ERROR':
+								uni.hideLoading();
+								return that.$util.Tips({
+									title: res.msg
+								}, {
+									tab: 5,
+									url: goPages
+								});
+								break;
+							case 'SUCCESS':
+								uni.hideLoading();
+								if (that.BargainId || that.combinationId || that.pinkId || that.seckillId || that
+									.discountId)
+									return that.$util.Tips({
+										title: res.msg,
+										icon: 'success'
+									}, {
+										tab: 4,
+										url: goPages
+									});
+								return that.$util.Tips({
+									title: res.msg,
+									icon: 'success'
+								}, {
+									tab: 5,
+									url: goPages
+								});
+								break;
+							case 'WECHAT_PAY':
+								that.toPay = true;
+								// #ifdef MP
+								/* that.toPay = true; */
+								let mp_pay_name = ''
+								if (uni.requestOrderPayment) {
+									mp_pay_name = 'requestOrderPayment'
+								} else {
+									mp_pay_name = 'requestPayment'
+								}
+								uni[mp_pay_name]({
+									timeStamp: jsConfig.timestamp,
+									nonceStr: jsConfig.nonceStr,
+									package: jsConfig.package,
+									signType: jsConfig.signType,
+									paySign: jsConfig.paySign,
+									success: function(res) {
+										uni.hideLoading();
+										if (that.BargainId || that.combinationId || that.pinkId || that
+											.seckillId || that.discountId)
+											return that.$util.Tips({
+												title: '支付成功',
+												icon: 'success'
+											}, {
+												tab: 4,
+												url: goPages
+											});
+										return that.$util.Tips({
+											title: '支付成功',
+											icon: 'success'
+										}, {
+											tab: 5,
+											url: goPages
+										});
+									},
+									fail: function(e) {
+										uni.hideLoading();
+										return that.$util.Tips({
+											title: '取消支付'
+										}, {
+											tab: 5,
+											url: goPages + '&status=2'
+										});
+									},
+									complete: function(e) {
+										uni.hideLoading();
+										//关闭当前页面跳转至订单状态
+										if (res.errMsg == 'requestPayment:cancel') return that.$util
+											.Tips({
+												title: '取消支付'
+											}, {
+												tab: 5,
+												url: goPages + '&status=2'
+											});
+									},
+								})
+								// #endif
+								// #ifdef H5
+								this.$wechat.pay(res.data.result.jsConfig).then(res => {
+									return that.$util.Tips({
+										title: '支付成功',
+										icon: 'success'
+									}, {
+										tab: 5,
+										url: goPages
+									});
+								}).catch(res => {
+									if (!this.$wechat.isWeixin()) {
+										uni.redirectTo({
+											url: goPages +
+												'&msg=支付失败&status=2'
+										})
+									}
+									if (res.errMsg == 'chooseWXPay:cancel') return that.$util.Tips({
+										title: '取消支付'
+									}, {
+										tab: 5,
+										url: goPages + '&status=2'
+									});
+								})
+								// #endif
+								// #ifdef APP-PLUS
+								uni.requestPayment({
+									provider: 'wxpay',
+									orderInfo: jsConfig,
+									success: (e) => {
+										let url = goPages;
+										uni.showToast({
+											title: "支付成功"
+										})
+										setTimeout(res => {
+											uni.redirectTo({
+												url: url
+											})
+										}, 2000)
+									},
+									fail: (e) => {
+										let url = '/pages/goods/order_pay_status/index?order_id=' +
+											orderId +
+											'&msg=支付失败';
+										uni.showModal({
+											content: "支付失败",
+											showCancel: false,
+											success: function(res) {
+												if (res.confirm) {
+													uni.redirectTo({
+														url: url
+													})
+												} else if (res.cancel) {
+													console.log('用户点击取消');
+												}
+											}
+										})
+									},
+									complete: () => {
+										uni.hideLoading();
+									},
+								});
+								// #endif
+								break;
+							case 'PAY_DEFICIENCY':
+								uni.hideLoading();
+								//余额不足
+								return that.$util.Tips({
+									title: res.msg
+								}, {
+									tab: 5,
+									url: goPages + '&status=1'
+								});
+								break;
+							case "WECHAT_H5_PAY":
+								uni.hideLoading();
+								that.$util.Tips({
+									title: '订单创建成功!'
+								}, {
+									tab: 4,
+									url: goPages + '&status=0'
+								});
+								setTimeout(() => {
+									location.href = res.data.result.jsConfig.mweb_url;
+								}, 2000);
+								break;
+						
+							case 'ALIPAY_PAY':
+								//#ifdef H5
+								if (this.from === 'weixin') {
+									uni.redirectTo({
+										url: `/pages/users/alipay_invoke/index?id=${orderId}&pay_key=${res.data.result.pay_key}`
+									});
+								} else {
+									uni.hideLoading();
+									that.formContent = res.data.result.jsConfig;
+									that.$nextTick(() => {
+										document.getElementById('alipaysubmit').submit();
+									})
+								}
+								//#endif
+								// #ifdef MP
+								uni.navigateTo({
+									url: `/pages/users/alipay_invoke/index?id=${orderId}&link=${jsConfig.qrCode}`
+								});
+								// #endif
+								// #ifdef APP-PLUS
+								uni.requestPayment({
+									provider: 'alipay',
+									orderInfo: jsConfig,
+									success: (e) => {
+										uni.showToast({
+											title: "支付成功"
+										})
+										let url = '/pages/goods/order_pay_status/index?order_id=' +
+											orderId +
+											'&msg=支付成功';
+										setTimeout(res => {
+											uni.redirectTo({
+												url: url
+											})
+										}, 2000)
+						
+									},
+									fail: (e) => {
+										let url = '/pages/goods/order_pay_status/index?order_id=' +
+											orderId +
+											'&msg=支付失败';
+										uni.showModal({
+											content: "支付失败",
+											showCancel: false,
+											success: function(res) {
+												if (res.confirm) {
+													uni.redirectTo({
+														url: url
+													})
+												} else if (res.cancel) {
+													console.log('用户点击取消');
+												}
+											}
+										})
+									},
+									complete: () => {
+										uni.hideLoading();
+									},
+								});
+								// #endif
+								break;
+						}
 					})
 				}
 				
@@ -748,6 +995,11 @@
 				this.pay_close = false;
 			},
 			goPay() {
+				if(!this.sale_yg.id) {
+					return this.$util.Tips({
+						title: '请选择销售员工'
+					});
+				}
 				if(!this.choose_yg.id) {
 					return this.$util.Tips({
 						title: '请选择预约员工'
@@ -949,213 +1201,6 @@
 			 * 
 			 */
 			getConfirm: function(numType) {
-				// let that = this;
-				// let shippingType = parseInt(this.shippingType) + 1;
-				// let addressId = 0,
-				// 	storeid;
-				// if (this.tableId) {
-				// 	shippingType = 4;
-				// }
-				// if (shippingType == 1) {
-				// 	addressId = that.addressId
-				// 	if (this.deliveryType == 1) {
-				// 		storeid = 0
-				// 	} else {
-				// 		storeid = that.storeId
-				// 	}
-				// } else {
-				// 	addressId = ''
-				// 	storeid = that.storeId
-				// }
-				// orderConfirm(that.cartId, that.news, addressId, shippingType, storeid, that.couponId).then(res => {
-				// 	if (res.data.upgrade_addr == 1) {
-				// 		that.id = res.data.addressInfo.id
-				// 		this.isaddress = true
-				// 	}
-				// 	if (numType != 1) {
-				// 		let confirm = this.objToArr(res.data.custom_form);
-				// 		confirm.forEach((item, index, arr) => {
-				// 			CACHE_CITY[index] = ''; //清空省市区
-				// 			if (item.name == 'texts') {
-				// 				if (item.defaultValConfig.value) {
-				// 					item.value = item.defaultValConfig.value
-				// 				} else {
-				// 					item.value = ''
-				// 				}
-				// 			} else if (item.name == 'radios') {
-				// 				item.value = item.wordsConfig.list[0].val
-				// 			} else if (item.name == 'uploadPicture') {
-				// 				item.value = [];
-				// 			} else if (item.name == 'dateranges') {
-				// 				if (item.valConfig.tabVal == 0) {
-				// 					if (item.valConfig.tabData == 0) {
-				// 						let obj = dayjs(new Date(Number(new Date().getTime()))).format(
-				// 							'YYYY-MM-DD');
-				// 						item.value = [obj, obj]
-				// 					} else {
-				// 						let data1 = dayjs(new Date(Number(new Date(item.valConfig
-				// 							.specifyDate[0]).getTime()))).format('YYYY-MM-DD');
-				// 						let data2 = dayjs(new Date(Number(new Date(item.valConfig
-				// 							.specifyDate[1]).getTime()))).format('YYYY-MM-DD');
-				// 						item.value = [data1, data2];
-				// 					}
-				// 				} else {
-				// 					item.value = [];
-				// 				}
-				// 			} else {
-				// 				if (['times', 'dates', 'timeranges'].indexOf(item.name) != -1) {
-				// 					if (item.valConfig.tabVal == 0) {
-				// 						if (item.valConfig.tabData == 0) {
-				// 							if (item.name == 'times') {
-				// 								item.value = dayjs(new Date(Number(new Date()
-				// 									.getTime()))).format('HH:mm');
-				// 							} else if (item.name == 'dates') {
-				// 								item.value = dayjs(new Date(Number(new Date()
-				// 									.getTime()))).format('YYYY-MM-DD');
-				// 							} else {
-				// 								let current = dayjs(new Date(Number(new Date()
-				// 									.getTime()))).format('HH:mm');
-				// 								item.value = current + ' - ' + current;
-				// 							}
-				// 						} else {
-				// 							if (item.name == 'times' || item.name == 'dates') {
-				// 								item.value = item.valConfig.specifyDate;
-				// 							} else {
-				// 								item.value = item.valConfig.specifyDate[0] + ' - ' +
-				// 									item.valConfig.specifyDate[1];
-				// 							}
-				// 						}
-				// 					} else {
-				// 						item.value = '';
-				// 					}
-				// 				} else {
-				// 					item.value = '';
-				// 				}
-				// 			}
-				// 		})
-
-				// 		function sortNumber(a, b) {
-				// 			return a.timestamp - b.timestamp;
-				// 		}
-				// 		confirm.sort(sortNumber);
-				// 		that.$set(that, 'confirm', confirm);
-				// 	}
-				// 	that.$set(that, 'goodsType', res.data.type);
-				// 	that.$set(that, 'userInfo', res.data.userInfo);
-				// 	that.$set(that, 'integral', res.data.userInfo.integral);
-				// 	that.$set(that, 'contacts', res.data.userInfo.real_name);
-				// 	that.$set(that, 'contactsTel', res.data.userInfo.record_phone || '');
-				// 	that.$set(that, 'integralRatio', res.data.integralRatio);
-				// 	that.$set(that, 'offlinePostage', res.data.offlinePostage);
-				// 	that.$set(that, 'orderKey', res.data.orderKey);
-				// 	that.$set(that, 'valid_count', res.data.valid_count);
-				// 	that.$set(that, 'discount_id', res.data.discount_id)
-				// 	that.$set(that, 'priceGroup', res.data.priceGroup);
-				// 	that.$set(that, 'seckillId', parseInt(res.data.seckill_id));
-				// 	that.$set(that, 'BargainId', parseInt(res.data.bargain_id));
-				// 	that.$set(that, 'combinationId', parseInt(res.data.combination_id));
-				// 	that.$set(that, 'discountId', parseInt(res.data.discount_id));
-				// 	that.$set(that, 'invoice_func', res.data.invoice_func);
-				// 	that.$set(that, 'special_invoice', res.data.special_invoice);
-				// 	that.$set(that, 'integral_ratio_status', res.data.integral_ratio_status);
-				// 	that.$set(that, 'store_self_mention', res.data.store_self_mention);
-				// 	that.$set(that, 'store_func_status', res.data.store_func_status);
-				// 	that.giveData.give_integral = res.data.give_integral;
-				// 	that.giveData.give_coupon = res.data.give_coupon;
-				// 	let cartInfo = res.data.cartInfo;
-				// 	let cartObj = [],
-				// 		giftObj = [];
-				// 	cartInfo.forEach(item => {
-				// 		if (item.is_gift == 1) {
-				// 			giftObj.push(item)
-				// 		} else {
-				// 			cartObj.push(item)
-				// 		}
-				// 	})
-				// 	that.$set(that, 'cartInfo', cartObj);
-				// 	that.$set(that, 'giveCartInfo', giftObj);
-				// 	let giveType = -1;
-				// 	giftObj.forEach(item => {
-				// 		if (item.product_type == 0 || item.product_type == 4) {
-				// 			return giveType = 0
-				// 		}
-				// 	})
-				// 	that.$set(that, 'product_type', (res.data.product_type == 0 || giveType == 0 || res.data
-				// 		.product_type == 4) ? 0 : 1);
-				// 	//微信支付是否开启
-				// 	that.cartArr[0].payStatus = res.data.pay_weixin_open || 0
-				// 	//支付宝是否开启
-				// 	that.cartArr[1].payStatus = res.data.ali_pay_status || 0;
-				// 	//#ifdef MP
-				// 	that.cartArr[1].payStatus = 0;
-				// 	//#endif
-				// 	//余额支付是否开启
-				// 	// that.cartArr[2].title = '可用余额:' + res.data.userInfo.now_money;
-				// 	that.cartArr[2].number = res.data.userInfo.now_money;
-				// 	that.cartArr[2].payStatus = res.data.yue_pay_status == 1 ? res.data.yue_pay_status : 0
-				// 	if (res.data.offline_pay_status == 2) {
-				// 		that.cartArr[3].payStatus = 0
-				// 	} else {
-				// 		that.cartArr[3].payStatus = 1
-				// 	}
-				// 	// that.$set(that, 'cartArr', that.cartArr);
-				// 	that.$set(that, 'ChangePrice', that.totalPrice);
-				// 	that.getBargainId();
-				// 	that.getCouponList();
-				// 	that.computedPrice();
-				// 	if (this.addressId || this.couponId) {
-				// 		// this.computedPrice();
-				// 	} else {
-				// 		that.$set(that, 'totalPrice', that.$util.$h.Add(parseFloat(res.data.priceGroup
-				// 				.totalPrice),
-				// 			parseFloat(res.data
-				// 				.priceGroup.storePostage)));
-				// 	}
-				// }).catch(err => {
-				// 	return this.$util.Tips({
-				// 		title: err
-				// 	});
-				// });
-			},
-			/*
-			 * 提取砍价和拼团id
-			 */
-			getBargainId: function() {
-				let that = this;
-				// let cartINfo = that.cartInfo;
-				// let BargainId = 0;
-				// let combinationId = 0;
-				// let discountId = 0;
-				// cartINfo.forEach(function(value, index, cartINfo) {
-				// 	BargainId = cartINfo[index].bargain_id,
-				// 		combinationId = cartINfo[index].combination_id,
-				// 		discountId = cartINfo[index].discount_id
-				// })
-				// that.$set(that, 'BargainId', parseInt(BargainId));
-				// that.$set(that, 'combinationId', parseInt(combinationId));
-				// that.$set(that, 'discountId', parseInt(discountId));
-				if (that.cartArr.length == 3 && (that.BargainId || that.combinationId || that.seckillId || that
-						.discountId)) {
-					that.cartArr[2].payStatus = 0;
-					that.$set(that, 'cartArr', that.cartArr);
-				}
-			},
-			/**
-			 * 获取当前金额可用优惠券
-			 * 
-			 */
-			getCouponList: function() {
-				let that = this;
-				let data = {
-					cartId: this.cartId,
-					'new': this.news,
-					shipping_type: that.$util.$h.Add(that.shippingType, 1),
-					store_id: that.system_store ? that.system_store.id : 0
-				}
-				getCouponsOrderPrice(this.totalPrice, data).then(res => {
-					that.$set(that.coupon, 'list', res.data);
-					that.openType = 1;
-				});
 			},
 			/*
 			 * 获取默认收货地址或者获取某条地址信息

+ 69 - 39
pages/goods/order_pay_status/index.vue

@@ -1,40 +1,55 @@
 <template>
 	<view :style="colorStyle">
-		<view class='payment-status' v-if="(!orderLottery || !order_pay_info.paid || order_pay_info.pay_type == 'offline') && loading && lotteryLoading">
+		<view class='payment-status'
+			v-if="(!orderLottery || !order_pay_info.paid || order_pay_info.pay_type == 'offline') && loading && lotteryLoading">
 			<!--失败时: 用icon-iconfontguanbi fail替换icon-duihao2 bg-color-->
-			<view class='iconfont icons icon-duihao2 bg-color'
-				v-if="order_pay_info.paid || order_pay_info.pay_type == 'offline'"></view>
-			<view class='iconfont icons icon-dengdaizhifu' v-else></view>
-			<view class='status' v-if="order_pay_info.pay_type == 'offline' && !order_pay_info.paid">订单创建成功</view>
-			<!-- 失败时:订单支付失败 -->
-			<view class='status' v-else>{{order_pay_info.paid ? (order_pay_info.type == 8 ? '抽奖提交成功' : '订单支付成功'):'等待支付...'}}
-			</view>
+			<template v-if="options.type != 6">
+				<view class='iconfont icons icon-duihao2 bg-color'
+					v-if="order_pay_info.paid || order_pay_info.pay_type == 'offline'"></view>
+				<view class='iconfont icons icon-dengdaizhifu' v-else></view>
+				<view class='status' v-if="order_pay_info.pay_type == 'offline' && !order_pay_info.paid">订单创建成功</view>
+				<!-- 失败时:订单支付失败 -->
+				<view class='status' v-else>
+					{{order_pay_info.paid ? (order_pay_info.type == 8 ? '抽奖提交成功' : '订单支付成功'):'等待支付...'}}
+				</view>
+			</template>
+			<template v-else>
+				<view class='iconfont icons icon-duihao2 bg-color'
+					v-if="options.pay_end == 'SUCCESS'"></view>
+				<view class='iconfont icons icon-dengdaizhifu' v-else> </view>
+				<!-- 失败时:订单支付失败 -->
+				<view class='status' >
+					{{options.pay_end == 'SUCCESS'? '支付成功': '支付失败'}}
+				</view>
+			</template>
 			<view class='wrapper'>
 				<view class='item acea-row row-between-wrapper'>
 					<view>订单编号</view>
 					<view class='itemCom'>{{orderId}}</view>
 				</view>
-				<view class='item acea-row row-between-wrapper'>
+				<view class='item acea-row row-between-wrapper' v-if="options.type != 6">
 					<view>下单时间</view>
 					<view class='itemCom'>{{order_pay_info._add_time}}</view>
 				</view>
 				<view class='item acea-row row-between-wrapper'>
 					<view>支付方式</view>
-					<view class='itemCom'>{{order_pay_info._status._payType || '暂未支付'}}</view>
+					<view class='itemCom' v-if="options.type != 6">{{order_pay_info._status._payType || '暂未支付'}}</view>
+					<view class='itemCom' v-else>{{options.pay_type == 'yue'? '余额': (options.pay_type == 'alipay'?'支付宝': (options.pay_type == 'weixin'?'微信': ''))}}</view>
 				</view>
 				<view class='item acea-row row-between-wrapper'>
 					<view>支付金额</view>
-					<view class='itemCom'>{{order_pay_info.pay_price}}</view>
+					<view class='itemCom' v-if="options.type != 6">{{order_pay_info.pay_price}}</view>
+					<view class='itemCom' v-else>{{options.totalPrice}}</view>
 				</view>
 				<!--失败时加上这个  -->
-			<!-- 	<view class='item acea-row row-between-wrapper'
+				<!-- 	<view class='item acea-row row-between-wrapper'
 					v-if="order_pay_info.paid==0 && order_pay_info.pay_type != 'offline'">
 					<view>失败原因</view>
 					<view class='itemCom'>{{status==2 ? '取消支付':msg=='订单创建成功'?'取消支付':msg}}</view>
 				</view> -->
 			</view>
 			<!--失败时: 重新购买 -->
-			<view @tap="goOrderDetails" v-if="status==0">
+			<view @tap="goOrderDetails" v-if="status==0 && options.type != 6">
 				<button formType="submit" class='returnBnt bg-color' hover-class='none'>查看订单</button>
 			</view>
 			<view @tap="goOrderDetails" v-if="order_pay_info.paid==0 && status==1">
@@ -44,14 +59,13 @@
 				<button class='returnBnt bg-color' hover-class='none'>重新支付</button>
 			</view>
 			<button @click="goPink(order_pay_info.pink_id)" class='returnBnt cart-color' formType="submit"
-				hover-class='none'
-				v-if="order_pay_info.pink_id && order_pay_info.paid!=0 && status!=2 && status!=1">
+				hover-class='none' v-if="order_pay_info.pink_id && order_pay_info.paid!=0 && status!=2 && status!=1">
 				{{order_pay_info.pinkStatus==2?'查看拼团':'邀请好友参团'}}
-				</button>
-			<button @click="goIndex" class='returnBnt cart-color' formType="submit" hover-class='none'
->返回首页</button>
+			</button>
+			<button @click="goIndex" class='returnBnt cart-color' formType="submit" hover-class='none'>返回首页</button>
 			<!-- #ifdef H5 -->
-			<button v-if="!$wechat.isWeixin() && !order_pay_info.paid" @click.stop="getOrderPayInfo" class='returnBnt cart-color' formType="submit" hover-class='none'>刷新支付状态</button>
+			<button v-if="!$wechat.isWeixin() && !order_pay_info.paid" @click.stop="getOrderPayInfo"
+				class='returnBnt cart-color' formType="submit" hover-class='none'>刷新支付状态</button>
 			<!-- #endif -->
 			<view class="coupons" v-if='couponList.length'>
 				<view class="title acea-row row-center-wrapper">
@@ -65,7 +79,11 @@
 						<view class="moneyCon acea-row row-between-wrapper">
 							<view class="price acea-row row-center-wrapper">
 								<view>
-									<text v-if="item.coupon_type==1"><text class="fontSize">¥</text><text>{{item.coupon_price.toString().split('.')[0]}}</text><text class="fontSize" v-if="item.coupon_price.toString().split('.').length>1">.{{item.coupon_price.toString().split('.')[1]}}</text></text><text v-if="item.coupon_type==2">{{parseFloat(item.coupon_price)/10}}折</text>
+									<text v-if="item.coupon_type==1"><text
+											class="fontSize">¥</text><text>{{item.coupon_price.toString().split('.')[0]}}</text><text
+											class="fontSize"
+											v-if="item.coupon_price.toString().split('.').length>1">.{{item.coupon_price.toString().split('.')[1]}}</text></text><text
+										v-if="item.coupon_type==2">{{parseFloat(item.coupon_price)/10}}折</text>
 								</view>
 							</view>
 						</view>
@@ -83,8 +101,10 @@
 				</view>
 			</view>
 		</view>
-		<lotteryModel v-show="orderLottery && order_pay_info.paid && order_pay_info.pay_type != 'offline' && loading && lotteryLoading" :options="options" :orderPayInfo="order_pay_info"
-		:status="status" @orderDetails="goOrderDetails" @lotteryShow="getOrderLottery"></lotteryModel>
+		<lotteryModel
+			v-show="orderLottery && order_pay_info.paid && order_pay_info.pay_type != 'offline' && loading && lotteryLoading"
+			:options="options" :orderPayInfo="order_pay_info" :status="status" @orderDetails="goOrderDetails"
+			@lotteryShow="getOrderLottery"></lotteryModel>
 		<!-- #ifdef MP -->
 		<!-- <authorize v-if="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> -->
 		<!-- #endif -->
@@ -144,20 +164,28 @@
 		},
 		onLoad: function(options) {
 			this.options = options
-			if (!options.order_id) return this.$util.Tips({
-				title: '缺少参数无法查看订单支付状态'
-			}, {
-				tab: 3,
-				url: 1
-			});
 			this.orderId = options.order_id;
+			if (options.type == 6) {
+				
+			} else {
+				if (!options.order_id) return this.$util.Tips({
+					title: '缺少参数无法查看订单支付状态'
+				}, {
+					tab: 3,
+					url: 1
+				});
+			}
 			this.status = options.status || 0;
 			this.msg = options.msg || '';
 		},
 		onShow() {
 			uni.setStorageSync('form_type_cart', 1);
 			if (this.isLogin) {
-				this.getOrderPayInfo();
+				if(this.options.type == 6) {
+					this.getOrderPayInfo();
+				}else {
+					this.getOrderPayInfo();
+				}
 			} else {
 				toLogin();
 			}
@@ -165,7 +193,7 @@
 		methods: {
 			// 授权关闭
 			authColse: function(e) {
-			  this.isShowAuth = e
+				this.isShowAuth = e
 			},
 			getOrderLottery(status) {
 				this.orderLottery = status
@@ -194,15 +222,15 @@
 					uni.setNavigationBarTitle({
 						title: res.data.paid ? '支付成功' : '未支付'
 					});
-					uni.$emit('newCartNum',res.data.cartInfo);
-					if(parseInt(uni.getStorageSync('news')) === 0){
+					uni.$emit('newCartNum', res.data.cartInfo);
+					if (parseInt(uni.getStorageSync('news')) === 0) {
 						let colNum = this.cartNum - res.data.total_num;
-						this.$store.commit('indexData/setCartNum', colNum +'');
+						this.$store.commit('indexData/setCartNum', colNum + '');
 						uni.removeStorageSync('news')
 					}
 					this.loading = true
-					setTimeout(function(){ 
-					   that.getOrderCoupon()
+					setTimeout(function() {
+						that.getOrderCoupon()
 					}, 1000);
 				}).catch(err => {
 					this.loading = true
@@ -294,7 +322,8 @@
 					text {
 						font-size: 54rpx;
 					}
-					.fontSize{
+
+					.fontSize {
 						font-size: 40rpx;
 					}
 				}
@@ -349,11 +378,12 @@
 		color: #fff;
 		text-align: center;
 		line-height: 140rpx;
-		text-shadow: 0px 4px 0px rgba(255,255,255,0.5);
+		text-shadow: 0px 4px 0px rgba(255, 255, 255, 0.5);
 		border: 6rpx solid #f5f5f5;
 		margin: -76rpx auto 0 auto;
 		background-color: #999;
-		&.icon-dengdaizhifu{
+
+		&.icon-dengdaizhifu {
 			background-color: var(--view-theme);
 		}
 	}
@@ -404,4 +434,4 @@
 		line-height: 86rpx;
 		margin: 0 auto 20rpx auto;
 	}
-</style>
+</style>

+ 3 - 3
pages/user/index.vue

@@ -393,11 +393,11 @@
             </view>
           </block>
         </view>
-		<!-- <view class="menus-list" v-if="userInfo.adminid"> -->
-		<view class="menus-list">
+		<view class="menus-list" v-if="userInfo.adminid || service_status==1">
+		<!-- <view class="menus-list"> -->
 		  <view class="title">员工功能</view>
 		    <view class="item acea-row row-between-wrapper" hover-class="none"
-		      @click="goMenuPage('/pages/admin/staff/stafforder', '我的订单')">
+		      @click="goMenuPage('/pages/goods/order_list/ygOrder', '我的订单')">
 		      <image src="/static/images/staffOrder.png"></image>
 		      <view class="text acea-row row-between-wrapper">
 		        <view>我的订单</view>