lhl 2 gadi atpakaļ
vecāks
revīzija
5cee4bb2f3

+ 4 - 0
common/http.api.js

@@ -464,6 +464,10 @@ const install = (Vue, vm) => {
 		getArtDetail:(params = '') => vm.$u.get(`/Enterprise/Article/details`, params),
 		// 审核状态
 		getSh:(params = '') => vm.$u.get(`/System/ApiBasicSetup/over_examination`, params),
+		//充值档位
+		getRechargeList:(params = '' ) => vm.$u.post('/UserCenter/ApiUserCenter/getAllGivePay',params),
+		//充值
+		recharge:(params = '') => vm.$u.post('/UserCenter/ApiUserCenter/user_pay',params),
 	};
 }
 

+ 1 - 1
manifest.json

@@ -1,6 +1,6 @@
 {
     "name" : "君子堂",
-    "appid" : "__UNI__80E213F",
+    "appid" : "__UNI__A1D6192",
     "description" : "六牛云商 - 为传统商户量身打造的全渠道线上线下一体化新零售营销系统! 以客户为中心,将线上和线下、进销存、CRM、财务一体化,完美融合!支持连锁、代理、经销多种运营模式,小程序一键发布,自定义APP界面,多套模板选择。7X24小时为您服务",
     "versionName" : "1.1.3",
     "versionCode" : 113,

+ 6 - 0
pages.json

@@ -311,6 +311,12 @@
 					"navigationBarTitleText": "支付成功"
 				}
 			},
+			{
+				"path": "money/recharge",
+				"style": {
+					"navigationBarTitleText": "充值"
+				}
+			},
 			{
 				"path": "address/SelAddress",
 				"style": {

+ 15 - 3
pages/user/user.vue

@@ -346,6 +346,7 @@
 		},
 		data() {
 			return {
+				kefu_phone: '',
 				tip_model: false,
 				show_change_name: false,
 				call_show: false,
@@ -387,6 +388,7 @@
 			}
 		},
 		computed: {
+			
 			// 业代姓名
 			salesManName() {
 				if (this.$store.state.userStatus.salesManName) {
@@ -432,6 +434,7 @@
 			}
 		},
 		onLoad() {
+			this.getSh()
 			if (JSON.stringify(this.$store.state.locationObj) === '{}') {
 				this.getAuthorizeInfo();
 				return;
@@ -459,6 +462,14 @@
 			}
 		},
 		methods: {
+			getSh() {
+				this.$u.api.getBasicField({'field': ["phone"]}).then(({data})=> {
+					// this.shenhe = data/
+					// console.log(data);
+					// this.shenhe = data.shenhe
+					this.kefu_phone = data.phone
+				})
+			},
 			// #ifdef APP-PLUS
 			share() {
 				uni.share({
@@ -656,11 +667,12 @@
 			},
 			openpop() {
 				if (this.userInfo.salesManName) {
-					this.call_show = true;
+					// this.call_show = true;
+					this.lianxi(this.kefu_phone)
 				} else {
 					// this.lianxi(this.enterprisemobile);
-					this.lianxi('17350663338');
-					
+					// this.lianxi('17350663338');
+					this.lianxi(this.kefu_phone)
 				}
 			},
 			// 完善资料提示取消

+ 77 - 63
pagesT/money/Balance.vue

@@ -13,7 +13,11 @@
 				<text class="label">余额提现</text>
 				<text class="ibonfont ibonjinru float_right"></text>
 			</view> -->
-
+			<view class="btn-li" @click="goPage('/pagesT/money/recharge')">
+				<text class="ibonfont ibondaifukuan"></text>
+				<text class="label">余额充值</text>
+				<text class="ibonfont ibonjinru float_right"></text>
+			</view>
 			<view class="btn-li clearfix" @click="goPage('/pagesT/money/BalanceDetail')">
 				<text class="ibonfont ibonnavicon-jylstj"></text>
 				<text class="label">余额流水</text>
@@ -34,76 +38,86 @@
 </template>
 
 <script>
-export default {
-	data() {
-		return {
-			userInfo: {}
-		};
-	},
-	onShow() {
-		this.getCustomerInfo();
-	},
-	methods: {
-		// 获取用户信息
-		getCustomerInfo() {
-			this.$u.api.getCustomerInfo().then(({ data }) => {
-				this.userInfo = data;
-				this.$store.commit('commit_userStatus', data);
-			});
+	export default {
+		data() {
+			return {
+				userInfo: {}
+			};
+		},
+		onShow() {
+			this.getCustomerInfo();
 		},
-		setPassword() {
-			// 已经设置过密码
-			if (this.userInfo.payPassword) {
-				this.goPage('/pagesT/money/PayPasswordEditCheck');
-			} else {
-				// 未设置过密码
-				this.goPage('/pagesT/money/PayPassword');
+		methods: {
+			// 获取用户信息
+			getCustomerInfo() {
+				this.$u.api.getCustomerInfo().then(({
+					data
+				}) => {
+					this.userInfo = data;
+					this.$store.commit('commit_userStatus', data);
+				});
+			},
+			setPassword() {
+				// 已经设置过密码
+				if (this.userInfo.payPassword) {
+					this.goPage('/pagesT/money/PayPasswordEditCheck');
+				} else {
+					// 未设置过密码
+					this.goPage('/pagesT/money/PayPassword');
+				}
 			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss" scoped>
-.balace-view {
-	width: 710rpx;
-	margin: 20rpx auto;
-	text-align: center;
-	color: #ffffff;
-	border-radius: 20rpx;
-	padding: 50rpx 0;
-	.label {
-		font-size: 24rpx;
-		padding-bottom: 10rpx;
-	}
-	.money {
-		font-size: 50rpx;
-		font-weight: bold;
-		font-family: DIN-Medium;
-		.icon {
-			font-size: 28rpx;
-		}
-	}
-}
-.bth-ul {
-	padding: 0 30rpx;
-	width: 710rpx;
-	margin: 40rpx auto 0;
-	background-color: #ffffff;
-	border-radius: 20rpx;
-	.btn-li {
-		line-height: 90rpx;
-		border-bottom: 1px solid #f5f5f5;
+	.balace-view {
+		width: 710rpx;
+		margin: 20rpx auto;
+		text-align: center;
+		color: #ffffff;
+		border-radius: 20rpx;
+		padding: 50rpx 0;
+
 		.label {
-			margin-left: 20rpx;
+			font-size: 24rpx;
+			padding-bottom: 10rpx;
 		}
-		.ibonjinru {
-			font-size: 28rpx;
-			color: #999999;
+
+		.money {
+			font-size: 50rpx;
+			font-weight: bold;
+			font-family: DIN-Medium;
+
+			.icon {
+				font-size: 28rpx;
+			}
 		}
-		&:last-child {
-			border-bottom: 0;
+	}
+
+	.bth-ul {
+		padding: 0 30rpx;
+		width: 710rpx;
+		margin: 40rpx auto 0;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+
+		.btn-li {
+			line-height: 90rpx;
+			border-bottom: 1px solid #f5f5f5;
+
+			.label {
+				margin-left: 20rpx;
+			}
+
+			.ibonjinru {
+				font-size: 28rpx;
+				color: #999999;
+			}
+
+			&:last-child {
+				border-bottom: 0;
+			}
 		}
 	}
-}
-</style>
+</style>

+ 488 - 0
pagesT/money/recharge.vue

@@ -0,0 +1,488 @@
+<template>
+	<view class="content" :class="['qn-page-' + theme]">
+		<view class="now">
+			<view>当前余额:</view>
+			<view class="now-money">¥{{Number(userInfo.memberBalance) || 0 }}</view>
+		</view>
+		<view class="main-jg"></view>
+		<view class="add-wrapper">
+			<view class="add-box">
+				<view class="add-log">¥</view>
+				<input type="text" v-model="money" placeholder="请输入充值金额" placeholder-class="place"
+					@keyup="clearNoNum()" />
+			</view>
+			<view class="jg" style="height: 1px; background-color: #E6E6E6;"></view>
+			<view class="add-tags">
+				<view class="tag" v-for="(item, index) in addTags" :key="item" @click="tagClick(index)"
+					:class="{ 'primary-lg': currentIndex === index && money == addTags[index].money }">
+					<view class="">
+						<text>{{ item.money }}</text>
+						元
+					</view>
+					<view class="give">
+						赠送:<text>{{ item.give }}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="main-jg"></view>
+		<button class="add-btn up primary-lg" :class="{ 'active-bg': payLoding }"
+			@click="!payLoding ? confirm() : ''">立即充值</button>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	
+	export default {
+		data() {
+			return {
+				userInfo: {},
+				type: 'weixin',
+				money: '', //充值金额
+				payLoding: false, //是否加载中
+				addTags: [],
+				currentIndex: 0,
+				addMoney: 0,
+				isSect: false, //是否选择微信充值
+				new_money: 0,
+			};
+		},
+		onLoad(options) {
+			this.getCustomerInfo()
+			this.getRechargeList()
+		},
+		computed: {},
+		methods: {
+			getCustomerInfo() {
+				this.$u.api.getCustomerInfo().then(({
+					data
+				}) => {
+					console.log(data);
+					this.userInfo = data;
+				});
+			},
+			getRechargeList() {
+				this.$u.api.getRechargeList({
+					page: 1,
+					pageSize: 100
+				}).then(res => {
+					console.log(res);
+					this.addTags = res.data
+				})
+			},
+			// 跳转
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				});
+			},
+			// 切换选中对象
+			tabRadio(e) {
+				this.type = e;
+			},
+			// 提交
+			confirm() {
+				let obj = this;
+				if (this.money == 0) {
+					return this.$api.msg('请输入充值金额');
+				}
+				obj.payLoding = true;
+				obj.$u.api.recharge({
+						// price: this.money
+						request_id: obj.userInfo.id,
+						pay_type: 1,
+						money: obj.money,
+						source: obj.$common.source()
+					})
+					.then(e => {
+						let da = e.data.data;
+						console.log(da,'da');
+						try{
+							wx.requestPayment({
+								timeStamp: da.timeStamp,
+								nonceStr: da.nonceStr,
+								package: da.package,
+								signType: da.signType,
+								paySign: da.paySign,
+								success: function(res) {
+									// uni.redirectTo({
+									// 	url: '/pages/money/paySuccess?isshow=false'
+									// });
+									uni.showToast({
+										title: '充值成功'
+									});
+									setTimeout(()=> {
+										uni.navigateBack()
+									})
+								},fail(e) {
+									console.log(e);
+								}
+							});
+						}catch(e){
+							console.log(e,'e');
+							//TODO handle the exception
+						}
+						
+
+						obj.payLoding = false;
+					})
+					.catch(e => {
+						obj.payLoding = false;
+						console.log(e);
+					});
+			},
+			//获取订单列表
+			loadData(source) {
+				console.log(source);
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				navItem.loadingType = 'loading';
+				setTimeout(() => {
+					let orderList = [];
+					orderList.forEach(item => {
+						navItem.orderList.push(item);
+					});
+					//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
+					this.$set(navItem, 'loaded', true);
+					//判断是否还有数据, 有改为 more, 没有改为noMore
+					navItem.loadingType = 'more';
+				}, 600);
+			},
+			tagClick(index) {
+				this.currentIndex = index;
+				this.money = this.addTags[index].money;
+			},
+			clearNoNum() {
+				this.money = this.money.replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3');
+				// switch (this.money) {
+				// 	case '300':
+				// 		this.currentIndex = 0;
+				// 		break;
+				// 	case '200':
+				// 		this.currentIndex = 1;
+				// 		break;
+				// 	case '150':
+				// 		this.currentIndex = 2;
+				// 		break;
+				// 	case '100':
+				// 		this.currentIndex = 3;
+				// 		break;
+				// 	case '50':
+				// 		this.currentIndex = 4;
+				// 		break;
+				// }
+				// let item = this.addTags.find(item=> {
+				// 	return item.money == this.money
+				// })
+				this.addTags.forEach((item, index) => {
+					if (item.money * 1 == this.money * 1) {
+						this.currentIndex = index
+						console.log(this.currentIndex);
+					}
+				})
+
+			},
+			btnClick() {
+				this.isSect = !this.isSect
+			},
+			userBalance() {
+				userBalance().then(res => {
+					this.new_money = res.data.now_money
+					console.log(res)
+				})
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+		background-color: #fff;
+	}
+
+	.add-btn {
+		&.modified {
+			color: $base-color;
+		}
+
+		&.up {
+			background-color: $base-color;
+			color: #fff;
+		}
+
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 604rpx;
+		height: 90rpx;
+		margin: 0 auto;
+		margin-top: 30rpx;
+		font-size: $font-lg;
+		border-radius: 10rpx;
+		// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+	}
+
+	.row-box {
+		margin-top: 30rpx;
+		padding: 20rpx 30rpx;
+		background: #fff;
+
+		.title {
+			font-size: 28rpx;
+			color: $font-color-dark;
+		}
+
+		.row {
+			display: flex;
+			align-items: center;
+			position: relative;
+			height: 80rpx;
+
+			.tit {
+				flex-shrink: 0;
+				width: 40rpx;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.input {
+				flex: 1;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.iconlocation {
+				font-size: 36rpx;
+				color: $font-color-light;
+			}
+
+			.buttom {
+				color: $font-color;
+				font-size: $font-base;
+			}
+		}
+	}
+
+	.list {
+		padding-left: 30rpx;
+		margin-top: 30rpx;
+		background-color: #ffffff;
+
+		.box {
+			display: flex;
+			align-items: center;
+			width: 100%;
+			height: 120rpx;
+			border-bottom: 1px solid $border-color-light;
+
+			.icon {
+				font-size: 48rpx;
+				padding-right: 20rpx;
+			}
+
+			.iconweixin1 {
+				color: #18bf16;
+			}
+
+			.iconzhifubao {
+				color: #08aaec;
+			}
+
+			.title-box {
+				flex-grow: 1;
+				text-align: left;
+
+				.title {
+					font-size: $font-base + 2upx;
+					color: $font-color-base;
+				}
+
+				.node {
+					font-size: $font-sm;
+					color: $font-color-light;
+				}
+			}
+		}
+	}
+
+	/deep/ .uni-radio-input {
+		width: 45rpx;
+		height: 45rpx;
+	}
+
+	.active-bg {
+		background-color: red !important;
+	}
+
+	.now {
+		width: 100%;
+		height: 86rpx;
+		padding: 0 26rpx 0 47rpx;
+		display: flex;
+		justify-content: space-between;
+		line-height: 86rpx;
+		background-color: #fff;
+		// margin-bottom: 21rpx;
+
+		view {
+			font-size: 28rpx;
+			font-weight: 500;
+			color: #333333;
+		}
+
+		.now-money {
+			font-size: 32rpx;
+			font-weight: bold;
+		}
+	}
+
+	.add-wrapper {
+		width: 750rpx;
+		height: 338rpx;
+		padding-left: 30rpx;
+		background: #ffffff;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+
+		// margin-bottom: 22rpx;
+		.add-box {
+			width: 100%;
+			height: 103rpx;
+			display: flex;
+			flex-direction: row;
+			justify-content: space-between;
+			padding: 0 39rpx 0 10rpx;
+			align-items: center;
+
+			.add-log {
+				font-size: 37rpx;
+				font-weight: bold;
+			}
+
+			input {
+				width: 218rpx;
+				height: 30rpx;
+				font-size: 32rpx;
+				font-weight: 500;
+				color: #000;
+				line-height: 40px;
+				text-align: right;
+
+				.place {
+					color: #bfbfbf;
+				}
+			}
+		}
+
+		.jg {
+			width: 100%;
+		}
+
+		.add-tags {
+			// height: 234rpx;
+			padding-top: 47rpx;
+			padding-bottom: 17rpx;
+			display: flex;
+			flex-direction: row;
+			flex-wrap: wrap;
+
+			// justify-content: space-between;
+			.tag {
+				width: 210rpx;
+				// height: 140rpx;
+				padding-top: 10rpx;
+				padding-bottom: 10rpx;
+				background-color: #f0f0f0;
+				border-radius: 4rpx;
+				margin: 0 30rpx 30rpx 0;
+				text-align: center;
+				// line-height: 70rpx;
+				font-size: 22rpx;
+
+				text {
+					font-size: 32rpx;
+					font-weight: 500;
+				}
+
+				.give {
+					font-size: 24rpx;
+
+					text {
+						font-size: 24rpx;
+					}
+				}
+			}
+
+			.action {
+				color: #fff;
+				background-color: #901b21;
+			}
+		}
+	}
+
+	.btn-wrapper {
+		padding: 49rpx 32rpx 0 40rpx;
+		height: 183rpx;
+		display: flex;
+		justify-content: space-between;
+		background-color: #fff;
+
+		.iconweixin1 {
+			color: #18bf16;
+			font-size: 48rpx;
+			display: flex;
+
+			view {
+				// display: inline-block;
+				height: 48rpx;
+				text-align: 48rpx;
+				padding-left: 20rpx;
+				// padding-top: 10rpx;
+				color: #000000;
+				font-size: 30rpx;
+			}
+		}
+
+		.btn {
+			width: 36rpx;
+			height: 36rpx;
+			border: 4rpx #901b21 solid;
+			border-radius: 8rpx 8rpx;
+
+			image {
+				// display: none;
+				width: 100%;
+				height: 100%;
+			}
+
+			.action {
+				display: none;
+			}
+		}
+
+		.actiont {
+			border: none;
+		}
+	}
+
+	.main-jg {
+		width: 100%;
+		height: 21rpx;
+		background-color: #f8f6f6;
+	}
+</style>

+ 24 - 6
pagesT/order/CancelOrder.vue

@@ -20,6 +20,10 @@
 <script>
 export default {
 	props: {
+		type: {
+			type: Number,
+			default: 1
+		},
 		show: {
 			type: Boolean,
 			default: false
@@ -75,17 +79,31 @@ export default {
 				obj.cancelbeforeOrderStatus = this.cancelbeforeOrderStatus;
 			}
 			this.loading = true;
-			this.$u.api
-				.updateOrderStatus(this.orderId, obj)
-				.then(res => {
+			if(this.type == 1) {
+				this.$u.api
+					.updateOrderStatus(this.orderId, obj)
+					.then(res => {
+						this.loading = false;
+						this.$api.msg('取消成功');
+						this.close();
+						this.$emit('confirm');
+					})
+					.catch(err => {
+						this.loading = false;
+					});
+			}else {
+				this.$u.api.itemCancel({
+					id: this.orderId,
+					refund_remarks: obj.cancelReason
+				}).then(res => {
+					// this.getOrderSelect('reload');
 					this.loading = false;
 					this.$api.msg('取消成功');
 					this.close();
 					this.$emit('confirm');
 				})
-				.catch(err => {
-					this.loading = false;
-				});
+			}
+			
 		},
 		close() {
 			this.$emit('close');

+ 59 - 34
pagesT/order/createOrderT.vue

@@ -89,9 +89,12 @@
 		<!-- 预约 -->
 		<its-calendar :sta_num="start_time" :end_num="end_time" :int_num="30" @getTime="getTime"></its-calendar>
 		<!-- 指派 -->
-		<scroll-view scroll-x="true" class="zp-wrap" v-if="timed">
+		<!-- <scroll-view scroll-x="true" class="zp-wrap" v-if="timed"> -->
+		<scroll-view scroll-x="true" class="zp-wrap" @scrolltolower="">
+			<!-- <view class="zp-item" v-for="ygitem in yg.list" @click="choosYg(ygitem)"
+				:class="{'choose': ygitem.uid == choose_yg.uid}"> -->
 			<view class="zp-item" v-for="ygitem in yg.list" @click="choosYg(ygitem)"
-				:class="{'choose': ygitem.uid == choose_yg.uid}">
+				:class="{'choose': ygitem.id == choose_yg.id}">
 				<image :src="ygitem.avatar || '../../static/img/avt.png'" mode="" class="zp-logo"></image>
 				<view class="zp-name">{{ygitem.staffName}}</view>
 			</view>
@@ -222,11 +225,11 @@
 				}
 				if (this.choose_time != '') {
 					console.log(this.choose_time, 'this.choose_time ')
-					this.getYgList('reload')
+					// this.getYgList('reload')
 				}
 			},
 			choose_time(newval, oldval) {
-				this.getYgList('reload')
+				// this.getYgList('reload')
 			},
 			choose_yg(newval, oldval) {
 				if (newval.staffName && newval.uid != 0) {
@@ -251,6 +254,7 @@
 			this.calculation()
 			console.log(this.$store.state.locationObj, 'this.$store.state.locationObj')
 			this.getStoreList()
+			this.getAllygList()
 		},
 		onShow() {
 			console.log(this.customerData)
@@ -262,6 +266,23 @@
 
 		},
 		methods: {
+			getAllygList() {
+				let that = this
+				that.$u.api.getAllygList({
+					page: 1,
+					pageSize: 100
+				}).then(res => {
+					console.log(res);
+					let arr0 = res.data.filter(item => item.is_technician == 1)
+					let arr = [{
+						uid: 0,
+						id: 0,
+						staffName: '随机指派'
+					}]
+					that.yg.list = arr.concat(arr0)
+					// console.log();
+				})
+			},
 			close() {
 				this.store_choose_show = false
 			},
@@ -352,11 +373,14 @@
 				}
 				item.loadingType = 'loading'
 				this.$u.api.getTimeYgList({
+					page: 1,
+					pageSize:100,
 					time: this.choose_time,
 					'SHOP-TOKEN': this.choose_store.token
 				}).then(({
 					data
 				}) => {
+					console.log(data,'data');
 					let arr = [{
 						uid: 0,
 						staffName: '随机指派'
@@ -400,36 +424,37 @@
 				}).then(({
 					data
 				}) => {
-					console.log(data,'data')
-					let choose_time = that.choose_time_detail.replace(/\:/g, '')
-					if(this.isJson(data.time_slot)) {
-						data.time_slot = JSON.parse(data.time_slot)
-					}
+					this.canpay = true
+					// console.log(data,'data')
+					// let choose_time = that.choose_time_detail.replace(/\:/g, '')
+					// if(this.isJson(data.time_slot)) {
+					// 	data.time_slot = JSON.parse(data.time_slot)
+					// }
 					
-					for(let j = 0;j<data.time_slot.length;j++) {
-						let worktime = [data.time_slot[j][0].replace(/\:/g, ''), data.time_slot[j][1].replace(/\:/g,
-							'')]
-						// 判断员工是否在工作时间
-						console.log(choose_time, worktime)
-						if (choose_time * 1 >= worktime[0] * 1 && choose_time * 1 <= worktime[1] * 1) {
-							this.canpay = true
-							console.log('可以预约');
-							break
-						} else {
-							if(j == data.time_slot.length) {
-								that.cannot()
-							}
+					// for(let j = 0;j<data.time_slot.length;j++) {
+					// 	let worktime = [data.time_slot[j][0].replace(/\:/g, ''), data.time_slot[j][1].replace(/\:/g,
+					// 		'')]
+					// 	// 判断员工是否在工作时间
+					// 	console.log(choose_time, worktime)
+					// 	if (choose_time * 1 >= worktime[0] * 1 && choose_time * 1 <= worktime[1] * 1) {
+					// 		this.canpay = true
+					// 		console.log('可以预约');
+					// 		break
+					// 	} else {
+					// 		if(j == data.time_slot.length) {
+					// 			that.cannot()
+					// 		}
 							
-						}
-						if (data.reserved && data.reserved.length > 0) {
-							for (let i = 0; i < data.reserved.length; i++) {
-								if (j== data.time_slot.length && that.choose_time_detail == data.reserved[i]) {
-									that.cannot('该员工已有预约')
-									break
-								}
-							}
-						}
-					}
+					// 	}
+					// 	if (data.reserved && data.reserved.length > 0) {
+					// 		for (let i = 0; i < data.reserved.length; i++) {
+					// 			if (j== data.time_slot.length && that.choose_time_detail == data.reserved[i]) {
+					// 				that.cannot('该员工已有预约')
+					// 				break
+					// 			}
+					// 		}
+					// 	}
+					// }
 					
 
 				})
@@ -453,7 +478,7 @@
 				that.$u.api.createItemOrder({
 					"order_id": that.order_detail.order_id,
 					"time": that.choose_time + ' ' + that.choose_time_detail, //预约时间
-					"staff_id": that.choose_yg.uid, //0随机排员工 指定员工传入员工id
+					"staff_id": that.choose_yg.id, //0随机排员工 指定员工传入员工id
 					"pay_type": 2, //1余额2微信3支付宝
 					"source": 3, //微信8h5支付3小程序支付0app支付
 					"remarks": that.mjly, //备注
@@ -474,7 +499,7 @@
 				that.$u.api.createItemOrder({
 					"order_id": that.order_detail.order_id,
 					"time": that.choose_time + ' ' + that.choose_time_detail, //预约时间
-					"staff_id": that.choose_yg.uid, //0随机排员工 指定员工传入员工id
+					"staff_id": that.choose_yg.id, //0随机排员工 指定员工传入员工id
 					"pay_type": that.pay_type, //1余额2微信3支付宝
 					"source": that.pay_type == 2 ? 3 : '',
 					"remarks": that.mjly, //备注

+ 33 - 4
pagesT/order/orderT.vue

@@ -51,13 +51,25 @@
 							<view class="middle clearfix">
 								<!-- #ifdef APP-PLUS||MP-WEIXIN -->
 								<view class="btnSAdd float_right primary-btn" @click="goPay(item)"
-									v-if="item.paid == 0">
+									v-if="item.paid == 0 && item.examine_status == 0">
 									去付款
 								</view>
 								<view class="btnSAdd float_right primary-btn" @click="goQx(item)"
-									v-if="item.status == 0">
+									v-if="item.status == 0 && item.examine_status == 0">
 									取消预约
 								</view>
+								<view class="btnSAdd float_right " style="color: #1f76f5;"
+									v-if="item.status == 0 && (item.examine_status == 1 || item.examine_status == 2)">
+									请等待审核
+								</view>
+								<view class="btnSAdd float_right " style="color: #ff4d4d;"
+									v-if="item.status == 0 && item.examine_status == -1 ">
+									取消预约未通过
+								</view>
+								<view class="btnSAdd float_right primary-btn"
+									v-if="item.status == 0 && item.examine_status == 3 ">
+									取消预约已通过
+								</view>
 								<view class="btnSAdd float_right primary-btn" @click="goPage('/pagesT/unit/evaluate?uid=' + item.uid + '&order_id=' + item.id)"
 									v-if="item.status == 1 && !item.is_evaluate">
 									去评价
@@ -107,6 +119,15 @@
 		</u-popup>
 		<u-modal :show-cancel-button="true" :confirm-color="primaryColor" v-model="modal_show" :content="content"
 			@confirm="confirmEdit" @cancel="cancelEdit"></u-modal>
+		<CancelOrder
+			@confirm="cancelOrderConfirm"
+			:payStatus="pay_status"
+			:cancelbeforeOrderStatus="order_status"
+			:orderId="order_id"
+			@close="closeCancel"
+			:show="cancel_show"
+			:type="2"
+		></CancelOrder>
 	</view>
 </template>
 
@@ -189,6 +210,15 @@
 			this.getCustomerInfo()
 		},
 		methods: {
+			cancelOrderConfirm() {
+				this.getOrderSelect('reload')
+			},
+			cancelHandel(row) {
+				this.order_id = row.id;
+				this.order_status = row.orderStatus;
+				this.pay_status = row.payStatus;
+				this.cancel_show = true;
+			},
 			closeCancel() {
 				this.cancel_show = false;
 			},
@@ -252,8 +282,7 @@
 				})
 			},
 			goQx(item) {
-				this.qx_item = item;
-				this.modal_show = true
+				this.cancelHandel(item);
 			},
 			confirmEdit() {
 				this.$u.api.itemCancel({

+ 98 - 8
pagesT/unit/item.vue

@@ -1,6 +1,33 @@
 <template>
 	<view class="content">
-		<view class="gq-list">
+		<view class="good-list">
+			<view class="good" v-for="item in list" @click="navTo('/pagesT/unit/itemdetail?id=' + item.id)">
+				<image :src="item.image" mode="" class="good-image"></image>
+				<view class="good-name ">
+					<view class="clamp">
+						{{item.name}}
+					</view>
+				</view>
+				<!-- <view class="good-key">
+					鸿运开来 为成功喝彩
+				</view> -->
+				<view class="time-wrap">
+					<view class="time">
+						时间:{{item.service_time}}分钟
+					</view>
+					
+				</view>
+				<view class="good-price">
+					<view class="price">
+						¥{{item.price}}
+					</view>
+					<view class="xl">
+						<!-- 销量:{{item.sales}} -->
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- <view class="gq-list">
 			<view class="gq-item" v-for="item in list" @click="navTo('/pagesT/unit/itemdetail?id=' + item.id)">
 				<view class="gq-logo">
 					<image :src="item.image" mode="" class=""></image>
@@ -47,7 +74,7 @@
 					</view>
 				</view>
 			</view>
-		</view>
+		</view> -->
 		<u-loadmore :status="loadingType" />
 	</view>
 </template>
@@ -59,7 +86,7 @@
 				list: [],
 				type: '',
 				page: 1,
-				limit: 12,
+				limit: 100,
 				loadingType: 'loadmore'
 			}
 		},
@@ -73,7 +100,7 @@
 			this.getList()
 		},
 		onReady() {
-			
+
 		},
 		methods: {
 			navTo(url) {
@@ -103,7 +130,7 @@
 			},
 			getList() {
 				let that = this
-				if (that.loadingType == 'loading') {
+				if (that.loadingType == 'loading' || that.loadingType == 'nomore') {
 					return
 				}
 				that.loadingType = 'loading'
@@ -115,9 +142,9 @@
 					that.list = that.list.concat(res.data)
 					console.log(that.list)
 					that.page++
-					if(res.data.length == that.limit) {
+					if (res.data.length == that.limit) {
 						that.loadingType = 'loadmore'
-					}else {
+					} else {
 						that.loadingType = 'nomore'
 					}
 				})
@@ -193,4 +220,67 @@
 		}
 
 	}
-</style>
+
+	.good-list {
+		display: flex;
+		justify-content: space-between;
+		flex-wrap: wrap;
+		padding: 20rpx 28rpx;
+
+		.good {
+			width: 336rpx;
+			height: 500rpx;
+			background: #FFFFFF;
+			box-shadow: 0px 0px 6rpx 0px rgba(0, 0, 0, 0.1);
+			border-radius: 14rpx;
+			margin-bottom: 20rpx;
+			position: relative;
+
+			.good-image {
+				width: 336rpx;
+				height: 336rpx;
+				background-color: #eee;
+				border-radius: 14rpx 14rpx 0 0;
+			}
+
+			.good-name {
+				font-size: 28rpx;
+				font-weight: bold;
+				color: #333333;
+				padding: 0 20rpx;
+			}
+
+			.good-key {
+				font-size: 22rpx;
+				font-weight: 500;
+				color: #999999;
+				padding-left: 20rpx
+			}
+			.time {
+				padding: 5rpx 10rpx ;
+				border: 1px solid #ff6973;
+				color: #ff6973;
+				display: inline-block;
+				margin: 10rpx 0;
+				margin-left: 20rpx;
+			}
+			.good-price {
+				display: flex;
+				width: 336rpx;
+				justify-content: space-between;
+				font-size: 28rpx;
+				font-weight: bold;
+				color: #ff6973;
+				position: absolute;
+				bottom: 20rpx;
+				padding: 0 20rpx;
+
+				.xl {
+					font-size: 20rpx;
+					font-weight: bold;
+					color: #999999;
+				}
+			}
+		}
+	}
+</style>

+ 1 - 1
pagesT/unit/yhk.vue

@@ -40,7 +40,7 @@
 			this.getList()
 		},
 		onReachBottom() {
-
+this.getList()
 		},
 		onReady() {
 

+ 1 - 0
uni.scss

@@ -15,6 +15,7 @@ $font-sm: 24upx;
 $font-base: 28upx;
 $font-lg: 32upx;
 /*文字颜色*/
+$font-color: #000;
 $font-color-dark: #303133;
 $font-color-base: #606266;
 $font-color-light: #909399;