lhl 2 years ago
parent
commit
5f2db635ac

+ 27 - 1
common/http.api.js

@@ -427,7 +427,33 @@ const install = (Vue, vm) => {
 		//选择时间员工 
 		getTimeYgList: (params = '') => vm.$u.post(`/shop/ApiShopProject/choice`, params),
 		//员工预约时间
-		getYgYyTimeArea: (params = '') => vm.$u.post(`/shop/ApiShopProject/choice`, params),
+		getYgYyTimeArea: (params = '') => vm.$u.post(`/shop/ApiShopProject/choice_time`, params),
+		// 创建项目订单
+		createItemOrder: (params = '') => vm.$u.post(`/shop/ApiShopProject/create`, params),
+		//hop/ApiShopSubscribe/list 用户项目列表
+		getMyItem: (params = '') => vm.$u.post(`/shop/ApiShopSubscribe/list`, params),
+		// 取消预约项目/shop/ApiShopSubscribe/cancel
+		itemCancel: (params = '') => vm.$u.post(`/shop/ApiShopSubscribe/cancel`, params),
+		//支付待支付的项目shop/ApiShopProject/payment
+		itemPayment: (params = '') => vm.$u.post(`/shop/ApiShopProject/payment`, params),
+		// 抵用券列表shop/ApiShopCard/userCard
+		getDyquanList:(params = '') => vm.$u.post(`/shop/ApiShopCard/userCard`, params),
+		// 优惠卡列表
+		getYhkList:(params = '') => vm.$u.post(`/shop/ShopCard/list`, params),
+		//优惠卡详情
+		getYhkDetail:(params = '') => vm.$u.post(`/shop/ShopCard/details`, params),
+		//购买优惠卡
+		buyYhk:(params = '') => vm.$u.post(`/shop/ApiShopCard/buy_card`, params),
+		// 我的优惠卡
+		getMyyhkList:(params = '') => vm.$u.post(`/shop/ApiShopCard/card_order`, params),
+		// 提交员工评价
+		pjYg:(params = '') => vm.$u.post(`/shop/ApiShopSubscribe/comment`, params),
+		//员工详情/Department/staff/getStaffInfo
+		getYgdetail:(params = '') => vm.$u.post(`/Department/staff/getStaffInfo`, params),
+		// 员工评价列表
+		getYgPj:(params = '') => vm.$u.post(`/shop/ApiShopSubscribe/comment_list`, params),
+		//获取1招商2连锁3共享股东4高管
+		getOtherList:(params = '') => vm.$u.post(`/Enterprise/Personnel/list`, params),
 	};
 }
 

+ 1 - 1
common/http.interceptor.js

@@ -29,7 +29,7 @@ const install = (Vue, vm) => {
 		config.header.Authorization = getToken();
 		config.header.Token = getEnToken();
 		config.header.Location = getLocation();
-		console.log('接口:',config.url)
+		console.log('接口token:',getEnToken())
 		// 方式一,存放在vuex的token,假设使用了uView封装的vuex方式,见:https://uviewui.com/components/globalVariable.html
 		// config.header.token = vm.token;
 

+ 5 - 0
components/PageDesign/components/Banner.vue

@@ -10,6 +10,8 @@
 			bg-color="transparent"
 			:border-radius="modelData.style === 2 ? '24' : '0'"
 			@click="navTo"
+			img-mode="widthFix"
+			:mode="modelData.indicatorDots?'dot': 'none'"
 		></u-swiper>
 		<NoLoginTip @cancel="cancelTip" :show="loginTip" v-if="loginTip" />
 	</view>
@@ -33,6 +35,9 @@ export default {
 			loginTip: false
 		};
 	},
+	mounted() {
+		console.log(this.modelData,'modelData+++')
+	},
 	methods: {
 		cancelTip() {
 			this.loginTip = false;

+ 21 - 20
components/PageDesign/components/CouponGroup.vue

@@ -1,24 +1,24 @@
 <template>
-	<div class="coupon-box" v-if="!!couponList.length">
-		<div v-if="modelData.title || modelData.titleDesc" class="coupon-title">
-			<span class="title">{{ modelData.title }}</span>
-			<span v-if="modelData.titleDesc" class="line">|</span>
-			<span class="desc">{{ modelData.titleDesc }}</span>
-		</div>
-		<ul class="coupon-ul" :style="{ paddingTop: modelData.title || modelData.titleDesc ? '4rpx' : '46rpx' }">
-			<view v-for="(item, index) in couponList" :key="index" class="coupon-li" :class="[modelData.rowNum === 2 ? 'coupon-two-li' : '']">
-				<div class="coupon-in" @click="getCoupon(item)">
-					<p class="num">¥{{ Number(item.reducePrice) }}</p>
-					<div class="coupon-desc" v-if="Number(item.minPrice)">商品满{{ Number(item.minPrice) }}元可用</div>
-					<div class="coupon-desc" v-else>无使用门槛</div>
-					<div class="get-btn">
-						<span>领取使用</span>
-						<span class="ibonfont ibonyoujiantou"></span>
+		<div class="coupon-box" v-if="!!couponList.length">
+			<div v-if="modelData.title || modelData.titleDesc" class="coupon-title">
+				<span class="title">{{ modelData.title }}</span>
+				<span v-if="modelData.titleDesc" class="line">|</span>
+				<span class="desc">{{ modelData.titleDesc }}</span>
+			</div>
+			<ul class="coupon-ul" :style="{ paddingTop: modelData.title || modelData.titleDesc ? '4rpx' : '46rpx' }">
+				<view v-for="(item, index) in couponList" :key="index" class="coupon-li" :class="[modelData.rowNum === 2 ? 'coupon-two-li' : '']">
+					<div class="coupon-in" @click="getCoupon(item)">
+						<p class="num">¥{{ Number(item.reducePrice) }}</p>
+						<div class="coupon-desc" v-if="Number(item.minPrice)">商品满{{ Number(item.minPrice) }}元可用</div>
+						<div class="coupon-desc" v-else>无使用门槛</div>
+						<div class="get-btn">
+							<span>领取使用</span>
+							<span class="ibonfont ibonyoujiantou"></span>
+						</div>
 					</div>
-				</div>
-			</view>
-		</ul>
-	</div>
+				</view>
+			</ul>
+		</div>
 </template>
 
 <script>
@@ -54,11 +54,12 @@ export default {
 };
 </script>
 <style scoped lang="scss">
+
 .coupon-box {
 	border-radius: 32rpx;
 	width: 710rpx;
 	margin: 0 auto;
-	background-image: url('https://onlineimg.qianniao.vip/161231765683262/931544405107da76ca2ec31cd63fae49/coupon_bck.png');
+	background-image: url('https://liuniukj.com/static/img/coupon_bck.1336988a.png');
 	background-repeat: no-repeat;
 	background-position: center;
 	background-size: 100% 100%;

+ 4 - 4
components/PageDesign/components/NavBar.vue

@@ -40,21 +40,21 @@
 					if (item.text == '企业文化') {
 						return;
 					} else if (item.text == '高管') {
-						this.goPage('/pagesT/unit/official?type=1', switchTab);
+						this.goPage('/pagesT/unit/official?type=4', switchTab);
 					} else if (item.text == '员工') {
-						this.goPage('/pagesT/unit/official?type=2', switchTab);
+						this.goPage('/pagesT/unit/official?type=5', switchTab);
 					} else if (item.text == '项目') {
 						this.goPage('/pagesT/unit/item', switchTab);
 					} else if (item.text == '疗程') {
 
 					} else if (item.text == '会员') {
-
+						this.goPage('/pagesT/user/VipList',switchTab)
 					} else if (item.text == '股权') {
 						this.goPage('/pagesT/user/guquan', switchTab);
 					} else if (item.text == '共享股东') {
 						this.goPage('/pagesT/unit/official?type=3', switchTab);
 					} else if (item.text == '招商') {
-						return;
+						this.goPage('/pagesT/unit/officialT?state=0', switchTab);
 					} else if (item.text == '招聘') {
 
 					} else if (item.text == '食品') {

+ 2 - 1
components/PageDesign/components/NavigationBar.vue

@@ -60,7 +60,8 @@ export default {
 
 <style scoped lang="scss">
 .page-head {
-	height: 226px;
+	// height: 226px;
+	height: 100vh;
 	width: 750rpx;
 	position: fixed;
 	top: 0;

+ 2 - 2
components/its-calendar/its-calendar.vue

@@ -61,7 +61,7 @@
 					let today = new Date();
 					let nowTime = today.getTime() // 当前时间戳
 					this.nowTimes = parseInt(nowTime / 1000)
-					for (let i = 0; i < 5; i++) {
+					for (let i = 0; i < 6; i++) {
 						let newDate = new Date(today.getTime() + i * 1000 * 60 * 60 * 24);
 						let month = (parseInt(newDate.getMonth()) + 1) > 9 ? (parseInt(newDate.getMonth()) + 1) : "0" + (parseInt(
 							newDate.getMonth()) + 1); // 当前月份
@@ -104,7 +104,7 @@
 					this.dayArr = dateArr;
 					
 					let timeArr = [];
-					for (let i = 0; i < 5; i++) {
+					for (let i = 0; i < 6; i++) {
 						// let as = new Date(new Date().toLocaleDateString()).getTime() / 1000
 						let as = new Date(new Date().toLocaleDateString()).getTime() / 1000 + i * 60 * 60 * 24;
 						let staTime = this.sta_num * 60 * 60 + as;

+ 2 - 3
manifest.json

@@ -1,6 +1,6 @@
 {
     "name" : "六牛云商",
-    "appid" : "__UNI__5AA9E6F",
+    "appid" : "__UNI__C6CD808",
     "description" : "六牛云商 - 为传统商户量身打造的全渠道线上线下一体化新零售营销系统! 以客户为中心,将线上和线下、进销存、CRM、财务一体化,完美融合!支持连锁、代理、经销多种运营模式,小程序一键发布,自定义APP界面,多套模板选择。7X24小时为您服务",
     "versionName" : "1.1.3",
     "versionCode" : 113,
@@ -137,7 +137,6 @@
     "mp-weixin" : {
         /* 小程序特有相关 */
         "usingComponents" : true,
-        /* wx13c379134cf4b8c8 赛因代理商*/
         "appid" : "wxe74cfb90e4dcfdc3",
         "setting" : {
             "urlCheck" : false,
@@ -153,7 +152,7 @@
         "optimization" : {
             "subPackages" : true
         },
-		 "requiredPrivateInfos" : [ "getLocation", "chooseLocation" ]
+        "requiredPrivateInfos" : [ "getLocation", "chooseLocation" ]
     },
     "h5" : {
         "sdkConfigs" : {

+ 31 - 1
pages.json

@@ -98,6 +98,12 @@
 					"navigationBarTitleText": ""
 				}
 			},
+			{
+				"path": "unit/officialT",
+				"style": {
+					"navigationBarTitleText": ""
+				}
+			},
 			{
 				"path": "unit/ygdetail",
 				"style": {
@@ -122,6 +128,12 @@
 					"navigationBarTitleText": "项目"
 				}
 			},
+			{
+				"path": "unit/evaluate",
+				"style": {
+					"navigationBarTitleText": "评价"
+				}
+			},
 			{
 				"path": "unit/itemdetail",
 				"style": {
@@ -176,6 +188,18 @@
 					"navigationBarTitleText": "股权"
 				}
 			},
+			{
+				"path": "user/dyquan",
+				"style": {
+					"navigationBarTitleText": "我的抵用券"
+				}
+			},
+			{
+				"path": "user/myyhk",
+				"style": {
+					"navigationBarTitleText": "我的优惠卡"
+				}
+			},
 			{
 				"path": "user/gqDetail",
 				"style": {
@@ -309,7 +333,13 @@
 				"style": {
 					"navigationBarTitleText": "我的订单"
 				}
-			}, {
+			},
+			{
+				"path": "order/orderT",
+				"style": {
+					"navigationBarTitleText": "项目订单"
+				}
+			},{
 				"path": "order/createOrder",
 				"style": {
 					"navigationBarTitleText": "确认订单"

+ 1 - 0
pages/index/index.vue

@@ -393,6 +393,7 @@ export default {
 					this.model = data.type;
 					if (data.type === 2) {
 						this.temData = data.data;
+						console.log('版面信息',this.temData)
 						this.topData = data.data[0].modelData;
 					} else {
 						const homeObj = {};

+ 13 - 3
pages/user/user.vue

@@ -84,7 +84,7 @@
 		<view class="model-view">
 			<view class="model-tit clearfix">
 				<view class="float_left">我的订单</view>
-				<view class="float_right" @click="navTo('/pagesT/order/order?state=0')">
+				<view class="float_right" @click="navTo('/pagesT/order/orderT?state=1')">
 					<text>查看全部</text>
 					<text class="ibonfont ibonjinru"></text>
 				</view>
@@ -152,6 +152,10 @@
 				<view class="fn-li" @click="navTo('/pagesT/user/VipList')">
 					<view class="fn-icon"><image :src="'https://onlineimg.qianniao.vip/ic-vip-' + theme + '.png'"></image></view>
 					<view class="fn-label">会员卡</view>
+				</view>
+				<view class="fn-li" @click="navTo('/pagesT/user/dyquan')">
+					<view class="fn-icon"><image :src="'https://onlineimg.qianniao.vip/ic-vip-' + theme + '.png'"></image></view>
+					<view class="fn-label">我的抵用券</view>
 				</view>
 				<view class="fn-li" @click="navTo('/pagesT/address/address')">
 					<view class="fn-icon"><image :src="'https://onlineimg.qianniao.vip/ic-address-' + theme + '.png'"></image></view>
@@ -174,12 +178,12 @@
 		<view class="model-view list-model-view">
 			<view class="model-tit">工具与服务</view>
 			<view class="model-main list-ul new-class">
-				<view class="list-li clearfix" @click="openpop">
+				<!-- <view class="list-li clearfix" @click="openpop">
 					<view class="fn-icon">
 						<image src="https://onlineimg.qianniao.vip/ic-kf.png" mode="aspectFill"></image>
 						<view>{{ userInfo.salesManName ? '专属客服' : '客服中心' }}</view>
 					</view>
-				</view>
+				</view> -->
 				<view class="list-li clearfix" v-if="en_token === aier_en_token" @click="navTo('/pagesT/address/address')">
 					<view class="fn-icon">
 						<image src="https://onlineimg.qianniao.vip/ic-dz.png" mode="aspectFill"></image>
@@ -191,6 +195,12 @@
 						<image src="https://onlineimg.qianniao.vip/ic-3.png" mode="aspectFill"></image>
 						<view>往来查询</view>
 					</view>
+				</view>
+				<view class="list-li clearfix" v-if="en_token !== aier_en_token" @click="navTo('/pagesT/user/myyhk')">
+					<view class="fn-icon">
+						<image src="https://onlineimg.qianniao.vip/ix-lj.png" mode="aspectFill"></image>
+						<view>优惠卡</view>
+					</view>
 				</view>
 				<view class="list-li clearfix" v-if="en_token !== aier_en_token" @click="navTo('/pagesT/user/GetCoupon')">
 					<view class="fn-icon">

+ 8 - 2
pagesT/money/paySuccess.vue

@@ -4,7 +4,9 @@
 		<text class="tit">支付成功</text>
 
 		<view class="btn-group">
-			<navigator url="/pagesT/order/order?state=0" open-type="redirect" class="mix-btn primary-btn">查看订单</navigator>
+			<navigator url="/pagesT/order/order?state=0" open-type="redirect" class="mix-btn primary-btn" v-if="isyy == 0 && isyhk == 0">查看订单</navigator>
+			<navigator url="/pagesT/order/order?state=0" open-type="redirect" class="mix-btn primary-btn" v-if="isyhk == 1">查看优惠卡</navigator>
+			<navigator url="/pagesT/order/order?state=0" open-type="redirect" class="mix-btn primary-btn" v-if="isyy == 1">查看预约订单</navigator>
 			<navigator url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
 		</view>
 		<view class="coupon-view" v-if="get_coupon">
@@ -20,11 +22,15 @@ export default {
 	data() {
 		return {
 			get_coupon: false,
-			price: 0
+			price: 0,
+			isyy: 0,
+			isyhk: 0
 		};
 	},
 	onLoad(options) {
 		this.price=options.price
+		this.isyhk = options.isyhk
+		this.isyy = options.isyy
 		console.log(this.price)
 		// this.price = 10;
 		this.getData();

+ 334 - 35
pagesT/order/createOrderT.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="content">
+	<view class="content page-contanier" :class="['qn-page-' + theme]">
 		<view class="" style="background-color: #4076d6;height: 100rpx;">
 
 		</view>
@@ -90,9 +90,10 @@
 		<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">
-			<view class="zp-item" v-for="ygitem in yg.list" @click="choosYg(ygitem)">
-				<image src="" mode="" class="zp-logo"></image>
-				<view class="zp-name">随机指派</view>
+			<view class="zp-item" v-for="ygitem in yg.list" @click="choosYg(ygitem)"
+				:class="{'choose': ygitem.uid == choose_yg.uid}">
+				<image :src="ygitem.avatar" mode="" class="zp-logo"></image>
+				<view class="zp-name">{{ygitem.staffName}}</view>
 			</view>
 		</scroll-view>
 		<!-- 结算 -->
@@ -100,15 +101,53 @@
 		<view class="" style="height: 110rpx;"></view>
 		<view class="tj-dd">
 			<view class="">
-				<text style="font-size: 26rpx;color: #999;">提交</text>
+				<text style="font-size: 26rpx;color: #999;">实付</text>
 				<text style="color: #CE372E;font-size: 44rpx;font-weight: bold;padding-left: 10rpx;"
-					class="rmb">1000</text>
-				<text style="font-size: 22rpx;color: #333333;font-weight: bold;">(包含预约费¥3元)</text>
+					class="rmb">{{order_detail.pay_price || '0'}}</text>
+				<!-- <text style="font-size: 22rpx;color: #333333;font-weight: bold;">(包含预约费¥3元)</text> -->
 			</view>
-			<view class="tj-btn">
+			<view class="tj-btn" @click="canpay?selPayFun():''" :class="{'canpay': canpay}">
 				提交
 			</view>
+			<!-- <view class="tj-btn" @click="selPayFun()" :class="{'canpay': canpay}">
+				提交
+			</view> -->
 		</view>
+		<u-popup v-model="payPop" mode="bottom" :border-radius="12">
+			<view class="pay-pop-view">
+				<view class="pay-sel-title clearfix">
+					<text class="float_left">付款方式</text>
+					<text class="float_right ibonfont ibonguanbi" @click="closePayPop"></text>
+				</view>
+				<view class="pay-ul">
+					<view class="pay-li"  @click="pay_type = 1">
+						<text class="ibonfont ibonhuodaofukuan"></text>
+						<view class="pay-name clearfix"
+							:class="[order_detail.pay_price*1 > Number(order_detail.memberBalance) ? 'balance-pay-name' : '']">
+							<view class="float_left">
+								<text>余额</text>
+								<text class="balace-num">(余额:¥{{ Number(order_detail.memberBalance) }})</text>
+							</view>
+							<text  class="float_right ibonfont  ibonxuanze1" v-if="pay_type == 1"></text>
+							<text  class="float_right ibonfont  ibonxuanze1" style="color: #CCCCCC;" v-else></text>
+						</view>
+					</view>
+					<view class="pay-li" @click="pay_type = 2" v-if="order_detail.pay_price*1 > 0">
+						<text class="ibonfont ibonweixinzhifu"></text>
+						<view class="pay-name clearfix ">
+							<view class="float_left">
+								<text>微信</text>
+							</view>
+							<text class="float_right ibonfont ibonxuanze1" v-if="pay_type == 2"></text>
+							<text class="float_right ibonfont ibonxuanze1" style="color: #CCCCCC;" v-else></text>
+						</view>
+					</view>
+				</view>
+				<view class="pay-btn primary-btn" @click="submit">
+					<text>确定</text>
+				</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
@@ -120,6 +159,8 @@
 		},
 		data() {
 			return {
+				payPop: false,
+				canpay: false,
 				good_id: '',
 				item_detail: {},
 				mjly: '',
@@ -138,15 +179,19 @@
 					loadingType: 'loadmore',
 					loaded: false,
 				},
-				choose_yg: {},
+				choose_yg: {
+					
+				},
 				choose_store: {},
-				choose_time: {},
-				count_detail: {}, //计算结果
+				choose_time: '',
+				choose_time_detail: '',
+				order_detail: {}, //计算结果
 				timed: false, //是否选择完时间
 				store_choose_show: false, //门店选择弹出层开关
 				start_time: 0,
 				end_time: 24,
-				yyshow: true
+				yyshow: true,
+				pay_type: 1, //1余额2微信3支付宝
 			}
 		},
 		computed: {
@@ -159,29 +204,44 @@
 		},
 		watch: {
 			choose_store(newval, oldval) {
+				this.choose_yg = {}
 				if (newval.openTime.isAllDay != 1) {
 					let start = newval.openTime.start.split(':')
 					let end = newval.openTime.end.split(':')
-					if(start[1]>30) {
-						this.start_time = start[0]*1 + 1
-					}else {
-						this.start_time = start[0]*1
+					if (start[1] > 30) {
+						this.start_time = start[0] * 1 + 1
+					} else {
+						this.start_time = start[0] * 1
 					}
-					this.end_time = end[0]*1
+					this.end_time = end[0] * 1
 					console.log(this.start_time)
-					return;
-				}else {
+				} else {
 					this.start_time = 0
 					this.end_time = 24
 					console.log(this.start_time)
-					return;
+				}
+				if (this.choose_time != '') {
+					console.log(this.choose_time, 'this.choose_time ')
+					this.getYgList('reload')
 				}
 			},
 			choose_time(newval, oldval) {
 				this.getYgList('reload')
 			},
 			choose_yg(newval, oldval) {
-				this.getYgYyTimeArea()
+				if (newval.staffName && newval.uid != 0) {
+					this.getYgYyTimeArea()
+				}else {
+					if(newval.staffName == '随机指派' && this.choose_time) {
+						this.canpay = true
+					}
+				}
+
+			},
+			choose_time_detail(newval, oldval) {
+				if (this.choose_store && this.choose_yg.uid != 0) {
+					this.getYgYyTimeArea()
+				}
 			}
 		},
 		onLoad(opt) {
@@ -221,7 +281,8 @@
 				console.log(e);
 				this.timed = true
 				this.choose_time = e.time.split(' ')[0]
-				
+				this.choose_time_detail = e.time.split(' ')[1]
+
 			},
 			//计算价格
 			calculation() {
@@ -232,6 +293,7 @@
 					data
 				}) => {
 					console.log(data, 'price')
+					this.order_detail = data
 				}).catch(err => {
 
 				})
@@ -250,7 +312,7 @@
 			// 获取门店列表
 			getStoreList() {
 				console.log('获取门店列表')
-				let item = this.store 
+				let item = this.store
 				if (item.loadingType == 'loading' || item.loadingType == 'nomore') {
 					return
 				}
@@ -280,7 +342,7 @@
 			//获取员工列表
 			getYgList(type) {
 				let item = this.yg
-				if(type == 'reload') {
+				if (type == 'reload') {
 					item.list = []
 					item.loadingType = 'loadmore'
 				}
@@ -289,23 +351,158 @@
 				}
 				item.loadingType = 'loading'
 				this.$u.api.getTimeYgList({
-					time: this.choose_time
-				}).then(({data}) => {
-					if(data != '当天未找到员工') {
-						item.list = data
-					}
-					
+					time: this.choose_time,
+					'SHOP-TOKEN': this.choose_store.token
+				}).then(({
+					data
+				}) => {
+					let arr = [{
+						uid: 0,
+						staffName: '随机指派'
+					}]
+					item.list = arr.concat(data)
+
 					item.loadingType = 'nomore'
 				})
 			},
+			cannot(title = '该员工不在工作时间') {
+				uni.showToast({
+					title: title,
+					icon: 'none'
+				})
+				// this.choose_yg = {
+				// 	uid: 0,
+				// 	staffName: '随机指派'
+				// }
+				this.canpay = false
+			},
 			//判断是否能预约员工
 			getYgYyTimeArea() {
-				this.$u.api.getYgYyTimeArea({
-					time: this.choose_time,
-					uid: this.choose_yg.id
-				}).then(({data}) => {
+				let that = this
+				that.$u.api.getYgYyTimeArea({
+					time: that.choose_time,
+					uid: that.choose_yg.uid
+				}).then(({
+					data
+				}) => {
+					console.log()
+					let choose_time = that.choose_time_detail.replace(/\:/g, '')
+					let worktime = [data.time_slot[0][0].replace(/\:/g, ''), data.time_slot[0][1].replace(/\:/g,
+						'')]
+					// 判断员工是否在工作时间
+					console.log(choose_time, worktime)
+					if (choose_time * 1 >= worktime[0] * 1 && choose_time * 1 <= worktime[1] * 1) {
+						this.canpay = true
+					} else {
+						that.cannot()
+					}
+					if(data.reserved.length > 0 ) {
+						for(let i = 0;i< data.reserved.length; i++) {
+							console.log(i)
+							if( that.choose_time_detail == data.reserved[i]) {
+								that.cannot('该员工已有预约')
+								break
+							}
+						}
+					}
 					
 				})
+			},
+			choosYg(item) {
+				this.choose_yg = item
+				// //查看员工是否有空
+				// if (this.choose_yg.uid != 0) {
+				// 	this.getYgYyTimeArea()
+				// }
+			},
+			selPayFun() {
+				// if (!this.is_notExpress) {
+				// 	return;
+				// }
+				this.payPop = true;
+			},
+			// 创建项目订单
+			createItemOrder() {
+				let that = this
+				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
+					"pay_type": 2, //1余额2微信3支付宝
+					"source": 3, //微信8h5支付3小程序支付0app支付
+					"remarks": that.mjly, //备注
+					"SHOP-TOKEN": that.choose_store.token
+				}).then(({
+					data
+				}) => {
+
+				})
+			},
+			submit() {
+				let that = this
+				// 判断余额是否足够
+				
+				if(that.pay_type == 1 && (that.order_detail.pay_price*1 > that.order_detail.memberBalance*1)) {
+					return this.$u.toast('抱歉,您的可用余额不足');
+				}
+				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
+					"pay_type": that.pay_type, //1余额2微信3支付宝
+					"source": that.pay_type == 2 ? 3: '',
+					"remarks": that.mjly, //备注
+					"SHOP-TOKEN": that.choose_store.token
+				}).then(({
+					data
+				}) => {
+					// 余额支付
+					if(that.pay_type == 1) {
+						console.log(data)
+						if(data == '支付成功' || data.data == '支付成功') {
+							that.payPop = false
+							setTimeout(() => {
+								uni.navigateTo({
+									url: '/pagesT/money/paySuccess?price=' + that.order_detail.pay_price + '&isyy=1'
+								})
+							}, 200);
+						}
+					}
+					// 微信支付
+					if(that.pay_type == 2) {
+						// data.data
+						let payInfo = data.data
+						// #ifdef MP-WEIXIN
+						uni.requestPayment({
+							provider: 'wxpay',
+							timeStamp: payInfo.timeStamp, //当前时间
+							nonceStr: payInfo.nonceStr, //随机字符串,长度在32一下
+							package: payInfo.package, //统一单接口返回的prepay_id
+							signType: payInfo.signType, //签名算法,目前支持MD5
+							paySign: payInfo.paySign, //签名
+							success: res => {
+								// 订单审核,取消订单提醒
+								that.payPop = false
+								setTimeout(() => {
+									uni.navigateTo({
+										url: '/pagesT/money/paySuccess?price=' + that.order_detail.pay_price + '&isyy=1'
+									})
+									
+								}, 200);
+							},
+							fail: async err => {
+								that.payPop = false
+								console.log('支付失败');
+								await setTimeout(() => {
+									uni.redirectTo({
+										url: '/pagesT/order/orderT?state=0'
+									});
+								}, 100);
+							}
+						});
+						// #endif
+					}
+				})
 			}
 		}
 	}
@@ -426,6 +623,8 @@
 		height: 216rpx;
 		white-space: nowrap;
 
+
+
 		.zp-item {
 			display: inline-block;
 			margin-right: 15rpx;
@@ -446,6 +645,7 @@
 			}
 
 			.zp-name {
+				margin-top: 15rpx;
 				width: 100%;
 				text-align: center;
 				font-size: 30rpx;
@@ -453,6 +653,15 @@
 				color: #333333;
 			}
 		}
+
+		.choose {
+			background-color: #262261 !important;
+
+			.zp-name {
+				color: #fff !important;
+			}
+
+		}
 	}
 
 	.tj-dd {
@@ -471,13 +680,17 @@
 			height: 75rpx;
 			line-height: 75rpx;
 			color: #fff;
-			background-color: #d84840;
+			background-color: #999;
 			border-radius: 10rpx;
 			text-align: center;
 			font-size: 28rpx;
 			font-weight: 500;
 
 		}
+
+		.canpay {
+			background-color: #d84840;
+		}
 	}
 
 	.rmb {
@@ -566,4 +779,90 @@
 			border: 1px solid #262261;
 		}
 	}
+
+	.pay-pop-view {
+		background-color: #ffffff;
+		border-top-left-radius: 12upx;
+		border-top-right-radius: 12upx;
+		font-size: 28upx;
+
+		.pay-sel-title {
+			padding: 0 30upx;
+			line-height: 88upx;
+			font-weight: bold;
+			font-size: 32upx;
+
+			.ibonfont {
+				color: #999;
+				font-weight: 400;
+			}
+		}
+
+		.pay-btn {
+			height: 90upx;
+			line-height: 90upx;
+			color: #000;
+			font-size: 32upx;
+			text-align: center;
+			background-color: #108ee9;
+		}
+
+		.pay-ul {
+			.pay-li {
+				line-height: 100upx;
+
+				.ibonfont {
+					padding-left: 30upx;
+					font-size: 46upx;
+					vertical-align: middle;
+					margin-right: 24upx;
+				}
+
+				.ibonweixinzhifu {
+					color: #04be02;
+				}
+
+				.ibonumidd17 {
+					color: #108ee9;
+				}
+
+				.ibonhuodaofukuan {
+					color: #f2b844;
+				}
+
+				.pay-name {
+					width: 650upx;
+					display: inline-block;
+					padding-right: 30upx;
+					vertical-align: middle;
+					border-bottom: 1px solid #f5f5f5;
+
+					.ibonxuanze1,
+					.ibonweixuanze {
+						margin-right: 0;
+						padding-left: 0;
+						font-size: 38upx;
+					}
+
+					.balace-num {
+						font-size: 24rpx;
+						color: #6c6c6c;
+					}
+				}
+
+				.balance-pay-name {
+					position: relative;
+					padding-bottom: 20rpx;
+
+					.balance-tip {
+						position: absolute;
+						font-size: 22rpx;
+						line-height: 36rpx;
+						bottom: 10rpx;
+						left: 0;
+					}
+				}
+			}
+		}
+	}
 </style>

+ 634 - 0
pagesT/order/orderT.vue

@@ -0,0 +1,634 @@
+<template>
+	<view :class="['qn-page-' + theme]" style="height: 100vh">
+		<view class="content">
+			<view class="navbar">
+				<view v-for="(item, index) in navList" :key="index" class="nav-item"
+					:class="[tabCurrentIndex === index ? 'current' : '']" @click="tabClick(item, index)">
+					{{ item.text }}
+					<view class="current-line primary-btn"></view>
+				</view>
+			</view>
+
+			<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
+				<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+					<scroll-view @scrolltolower="scrollBootom" scroll-y="true" style="height:100%">
+						<u-empty v-if="tabItem.list.length == 0" mode="list"></u-empty>
+						<view v-for="(item, index) in tabItem.list" :key="index" class="order-item">
+							<view class="clearfix order-no-view"
+								@click="goPage(`/pagesT/order/orderDetail?id=` + item.id)">
+								<text class="float_left order-no-text">{{ $_utils.formatDate(item.createTime) }}</text>
+								<text class="float_right order-status-text">
+									{{
+										tabCurrentIndex === 0
+											? '待付款'
+											: tabCurrentIndex === 1
+											? '已支付'
+											: tabCurrentIndex === 2
+											? '已完成'
+											: ''
+									}}
+								</text>
+							</view>
+							<view class="goods-ul">
+								<block v-for="(it, gindex) in item.project" :key="gindex">
+									<view class="goods-li clearfix" v-if="gindex <= 4">
+										<image class="goods-img float_left" :src="it.image" mode="aspectFill"></image>
+									</view>
+								</block>
+							</view>
+							<view class="money-view">
+								总价:¥{{ item.to_price || '0.00' }}
+								<view class="price">
+									实付款:
+									<text style="font-size: 20rpx;">¥</text>
+									<view style="display: inline-block;font-size: 32rpx;">
+										<rich-text :nodes="$_utils.splitPrice(item.pay_price)"></rich-text>
+									</view>
+								</view>
+							</view>
+							<view class="middle clearfix">
+								<!-- #ifdef APP-PLUS||MP-WEIXIN -->
+								<view class="btnSAdd float_right primary-btn" @click="goPay(item)"
+									v-if="item.paid == 0">
+									去付款
+								</view>
+								<view class="btnSAdd float_right primary-btn" @click="goQx(item)"
+									v-if="item.status == 0">
+									取消预约
+								</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 == 0">
+									去评价
+								</view>
+								<!-- #endif -->
+							</view>
+						</view>
+						<u-loadmore margin-top="20" v-if="tabItem.list.length" :status="tabItem.loadingType" />
+					</scroll-view>
+				</swiper-item>
+			</swiper>
+		</view>
+		<u-popup v-model="payPop" mode="bottom" :border-radius="12">
+			<view class="pay-pop-view">
+				<view class="pay-sel-title clearfix">
+					<text class="float_left">付款方式</text>
+					<text class="float_right ibonfont ibonguanbi" @click="closePayPop"></text>
+				</view>
+				<view class="pay-ul">
+					<view class="pay-li"  @click="pay_type = 1">
+						<text class="ibonfont ibonhuodaofukuan"></text>
+						<view class="pay-name clearfix"
+							:class="[order_detail.pay_price*1 > Number(userInfo.memberBalance) ? 'balance-pay-name' : '']">
+							<view class="float_left">
+								<text>余额</text>
+								<text class="balace-num">(余额:¥{{ Number(userInfo.memberBalance) }})</text>
+							</view>
+							<text  class="float_right ibonfont  ibonxuanze1" v-if="pay_type == 1"></text>
+							<text  class="float_right ibonfont  ibonxuanze1" style="color: #CCCCCC;" v-else></text>
+						</view>
+					</view>
+					<view class="pay-li" @click="pay_type = 2" v-if="order_detail.pay_price*1 > 0">
+						<text class="ibonfont ibonweixinzhifu"></text>
+						<view class="pay-name clearfix ">
+							<view class="float_left">
+								<text>微信</text>
+							</view>
+							<text class="float_right ibonfont ibonxuanze1" v-if="pay_type == 2"></text>
+							<text class="float_right ibonfont ibonxuanze1" style="color: #CCCCCC;" v-else></text>
+						</view>
+					</view>
+				</view>
+				<view class="pay-btn primary-btn" @click="submit">
+					<text>确定</text>
+				</view>
+			</view>
+		</u-popup>
+		<u-modal :show-cancel-button="true" :confirm-color="primaryColor" v-model="modal_show" :content="content"
+			@confirm="confirmEdit" @cancel="cancelEdit"></u-modal>
+	</view>
+</template>
+
+<script>
+	import CancelOrder from './CancelOrder.vue';
+	export default {
+		components: {
+			CancelOrder
+		},
+		data() {
+			return {
+				pay_type: 1,
+				order_detail: {},
+				payPop: false,
+				qx_item: {},
+				content: '请确认是否要取消预约',
+				modal_show: false,
+				order_id: 0,
+				order_status: '',
+				pay_status: '',
+				cancel_show: false,
+				orderList: [],
+				tabCurrentIndex: 0,
+				state: 1,
+				loading_status: 'loadmore',
+				navList: [{
+						state: 1,
+						text: '待付款',
+						loadingType: 'loadmore',
+						page: 1,
+						pageSize: 10,
+						list: [],
+						loaded: false
+					},
+					{
+						state: 2,
+						text: '已支付',
+						loadingType: 'loadmore',
+						page: 1,
+						pageSize: 10,
+						list: [],
+						loaded: false
+					},
+					{
+						state: 3,
+						text: '已完成',
+						loadingType: 'loadmore',
+						page: 1,
+						pageSize: 10,
+						list: [],
+						loaded: false
+					}
+				],
+				page: 1,
+				pageSize: 10,
+				pageTotal: 0,
+				tmplIds: [],
+				userInfo: {},
+			};
+		},
+		computed: {
+			// 是否在发货前可以取消订单
+			// isCancelOrder() {
+			// 	return this.$store.state.baseSet.cancelOrder || 5;
+			// }
+			// userInfo() {
+			// 	return this.$store.state.userStatus;
+			// }
+		},
+		onLoad(opt) {
+			if(opt.state) {
+				this.tabCurrentIndex = opt.state
+			}
+			// #ifdef MP-WEIXIN
+			// this.getSettingDataByMessageId();
+			// #endif
+		},
+		onShow() {
+			this.getOrderSelect();
+			this.getCustomerInfo()
+		},
+		methods: {
+			closeCancel() {
+				this.cancel_show = false;
+			},
+			// 点击支付
+			goPay(item) {
+				this.order_detail = item
+				this.payPop = true
+			},
+			submit() {
+				//
+				let that = this
+				if(that.pay_type == 1 && (that.order_detail.pay_price*1 > that.userInfo.memberBalance*1)) {
+					return that.$u.toast('抱歉,您的可用余额不足');
+				}
+				that.$u.api.itemPayment({
+					"id": that.order_detail.id, 
+					"pay_type": that.pay_type, //1余额2微信3支付宝
+					"source": that.pay_type == 2 ? 3: '',
+				}).then(({data})=> {
+					// 余额支付
+					if(that.pay_type == 1) {
+						console.log(data)
+						if(data == '支付成功' || data.data == '支付成功') {
+							that.payPop = false
+							uni.showToast({
+								title: '支付成功'
+							});
+							that.getOrderSelect('reload');
+							that.getCustomerInfo()
+						}
+					}
+					// 微信支付
+					if(that.pay_type == 2) {
+						// data.data
+						let payInfo = data.data
+						// #ifdef MP-WEIXIN
+						uni.requestPayment({
+							provider: 'wxpay',
+							timeStamp: payInfo.timeStamp, //当前时间
+							nonceStr: payInfo.nonceStr, //随机字符串,长度在32一下
+							package: payInfo.package, //统一单接口返回的prepay_id
+							signType: payInfo.signType, //签名算法,目前支持MD5
+							paySign: payInfo.paySign, //签名
+							success: res => {
+								uni.showToast({
+									title: '支付成功'
+								});
+								that.payPop = false
+								that.getOrderSelect('reload');
+								that.getCustomerInfo()
+							},
+							fail: async err => {
+								that.payPop = false
+								that.$u.toast('支付失败');
+								that.getOrderSelect('reload');
+								that.getCustomerInfo()
+							}
+						});
+						// #endif
+					}
+				})
+			},
+			goQx(item) {
+				this.qx_item = item;
+				this.modal_show = true
+			},
+			confirmEdit() {
+				this.$u.api.itemCancel({
+					id: this.qx_item.id
+				}).then(res => {
+					this.getOrderSelect('reload');
+				})
+				this.modal_show = false
+			},
+			cancelEdit() {
+				this.qx_item = {}
+				this.modal_show = false
+			},
+			scrollBootom() {
+				this.getOrderSelect()
+			},
+			// 获取订单列表
+			getOrderSelect(type) {
+				let that = this
+				let item = that.navList[that.tabCurrentIndex]
+				if (type == 'reload' || type == 'tab') {
+					item.loadingType = 'loadmore'
+					item.list = []
+					item.page = 1
+				}
+				// if (type == 'tab' && item.loaded) {
+				// 	return
+				// }
+				if (item.loadingType == 'loading' || item.loadingType == 'nomore') {
+					return
+				}
+				item.loadingType = 'loading'
+				this.$u.api
+					.getMyItem({
+						page: item.page,
+						pageSize: item.pageSize,
+						name: '',
+						type: item.state
+					})
+					.then(({data}) => {
+						item.list = item.list.concat(data)
+						item.page++
+						if (item.pageSize == data.length) {
+							item.loadingType = 'loadmore'
+						} else {
+							item.loadingType = 'nomore'
+						}
+						item.loaded = true
+					});
+			},
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				// this.getOrderSelect('tab');
+			},
+			//顶部tab点击
+			tabClick(item, index) {
+				this.tabCurrentIndex = index;
+				this.getOrderSelect('tab');
+				// this.getOrderSelect()
+			},
+			// 获取用户信息
+			getCustomerInfo() {
+				this.$u.api.getCustomerInfo().then(({ data }) => {
+					this.userInfo = data;
+					this.$store.commit('commit_userStatus', data);
+				});
+			},
+			// 获取消息模版ID 后台取消订单, 退款通知
+			// getSettingDataByMessageId() {
+			// 	this.$u.api
+			// 		.getSettingDataByMessageId({
+			// 			id: [5, 7]
+			// 		})
+			// 		.then(res => {
+			// 			if (res.data.length > 0) {
+			// 				this.tmplIds = res.data.map(item => {
+			// 					return item.weixinTemplateId;
+			// 				});
+			// 			}
+			// 		});
+			// }
+		}
+	};
+</script>
+
+<style lang="scss">
+	.order-item {
+		margin: 24upx 0;
+		padding-bottom: 24rpx;
+		background-color: #fff;
+
+		.order-no-view {
+			font-size: 24upx;
+			padding: 24upx 30upx;
+			color: #666;
+			font-weight: 300;
+			border-bottom: 1upx solid #eee;
+
+			.order-status-text {
+				font-weight: 500;
+			}
+		}
+
+		.goods-li:last-child {
+			margin-bottom: 0;
+		}
+
+		.goods-ul {
+			padding: 20rpx 10rpx 0;
+
+			.goods-li {
+				margin: 0 10rpx;
+				display: inline-block;
+				text-align: center;
+				line-height: 100rpx;
+				background: #eeeeee;
+				border-radius: 16rpx;
+				overflow: hidden;
+				width: 100upx;
+				height: 100upx;
+
+				.goods-img {
+					width: 100%;
+					height: 100%;
+				}
+
+				position: relative;
+
+				.buyNum {
+					position: absolute;
+					font-size: 20rpx;
+					color: #ffffff;
+					line-height: 32rpx;
+					background-color: rgba($color: #000000, $alpha: 0.6);
+					padding: 0 10rpx;
+					right: 0;
+					bottom: 0;
+				}
+			}
+		}
+
+		.goods-li {
+			// background: #fafafa;
+			// padding: 30upx 20upx;
+			// margin-bottom: 20upx;
+			// margin-right: 10rpx;
+
+			.goods-right {
+				width: 500upx;
+				margin-left: 20upx;
+
+				.goods-name {
+					color: #333;
+					font-size: 32upx;
+					margin-bottom: 19upx;
+					text-overflow: -o-ellipsis-lastline;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					display: -webkit-box;
+					-webkit-line-clamp: 1;
+					line-clamp: 1;
+					-webkit-box-orient: vertical;
+				}
+
+				.goods-descrip {
+					font-size: 22upx;
+					color: #999;
+					margin-bottom: 28upx;
+					// font-weight: 300;
+					text-overflow: -o-ellipsis-lastline;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					display: -webkit-box;
+					-webkit-line-clamp: 1;
+					line-clamp: 1;
+					-webkit-box-orient: vertical;
+				}
+
+				.goods-price {
+					.price {
+						color: $price-color;
+						font-size: 40upx;
+					}
+
+					.sku {
+						font-size: 22upx;
+						font-weight: 300;
+						color: #666;
+					}
+
+					.float_right {
+						font-size: 24upx;
+					}
+				}
+			}
+		}
+	}
+
+	.money-view {
+		color: #666666;
+		text-align: right;
+		font-size: 24upx;
+		padding: 24upx 30upx;
+
+		.price {
+			font-size: 24upx;
+			font-weight: bold;
+			color: #000000;
+			margin-left: 10rpx;
+			display: inline-block;
+		}
+	}
+
+	.middle {
+		font-size: 24upx;
+		position: relative;
+		padding: 0 30upx;
+	}
+
+	.btnS {
+		padding: 0 20upx;
+		line-height: 50upx;
+		color: #6e6e6e;
+		font-size: 24upx;
+		text-align: center;
+		margin-left: 20upx;
+		height: 50upx;
+		background: rgba(241, 241, 241, 1);
+		// box-shadow: 0px 2upx 14upx 0px rgba(0, 0, 0, 0.1);
+		border-radius: 8upx;
+	}
+
+	.btnSAdd {
+		padding: 0 20upx;
+		line-height: 50upx;
+		color: #ffffff;
+		font-size: 24upx;
+		text-align: center;
+		height: 50upx;
+		border-radius: 8upx;
+		margin-left: 20rpx;
+	}
+
+	.content {
+		background: $page-color-base;
+		height: 100vh;
+	}
+
+	.swiper-box {
+		height: calc(100% - 80upx);
+	}
+
+	.list-scroll-content {
+		height: 100%;
+	}
+
+	.navbar {
+		display: flex;
+		height: 88upx;
+		background: #fff;
+		position: relative;
+		z-index: 10;
+		border-bottom: 1upx solid #eee;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 28upx;
+			color: #666666;
+			position: relative;
+			font-weight: 300;
+
+			&.current {
+				font-weight: 500;
+
+				.current-line {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 10upx;
+					transform: translateX(-50%);
+					width: 40upx;
+					height: 6upx;
+					background: $base-btn-bg;
+					border-radius: 6upx;
+					/*border-bottom: 2px solid #F53C28;*/
+				}
+			}
+		}
+	}
+	.pay-pop-view {
+		background-color: #ffffff;
+		border-top-left-radius: 12upx;
+		border-top-right-radius: 12upx;
+		font-size: 28upx;
+	
+		.pay-sel-title {
+			padding: 0 30upx;
+			line-height: 88upx;
+			font-weight: bold;
+			font-size: 32upx;
+	
+			.ibonfont {
+				color: #999;
+				font-weight: 400;
+			}
+		}
+	
+		.pay-btn {
+			height: 90upx;
+			line-height: 90upx;
+			color: #000;
+			font-size: 32upx;
+			text-align: center;
+			background-color: #108ee9;
+		}
+	
+		.pay-ul {
+			.pay-li {
+				line-height: 100upx;
+	
+				.ibonfont {
+					padding-left: 30upx;
+					font-size: 46upx;
+					vertical-align: middle;
+					margin-right: 24upx;
+				}
+	
+				.ibonweixinzhifu {
+					color: #04be02;
+				}
+	
+				.ibonumidd17 {
+					color: #108ee9;
+				}
+	
+				.ibonhuodaofukuan {
+					color: #f2b844;
+				}
+	
+				.pay-name {
+					width: 650upx;
+					display: inline-block;
+					padding-right: 30upx;
+					vertical-align: middle;
+					border-bottom: 1px solid #f5f5f5;
+	
+					.ibonxuanze1,
+					.ibonweixuanze {
+						margin-right: 0;
+						padding-left: 0;
+						font-size: 38upx;
+					}
+	
+					.balace-num {
+						font-size: 24rpx;
+						color: #6c6c6c;
+					}
+				}
+	
+				.balance-pay-name {
+					position: relative;
+					padding-bottom: 20rpx;
+	
+					.balance-tip {
+						position: absolute;
+						font-size: 22rpx;
+						line-height: 36rpx;
+						bottom: 10rpx;
+						left: 0;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 114 - 0
pagesT/unit/evaluate.vue

@@ -0,0 +1,114 @@
+<template>
+	<view class="content" :class="['qn-page-' + theme]">
+		<view class="pj-top">
+			<textarea placeholder="您对该项目的员工满意吗?说说你的评价." v-model="comment" placeholder-class="textholder"></textarea>
+		</view>
+		<view class="pj-xj">
+			<view class="">
+				满意度:
+			</view>
+			<u-rate :count="count" v-model="score"></u-rate>
+		</view>
+		<view class="btn primary-btn" @click="fbpj()">
+			发布
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				comment: '',
+				order_id: '',
+				uid: '',
+				yg: {},
+				score: 5,
+				count: 5,
+			}
+		},
+		onLoad(opt) {
+			this.order_id = opt.order_id
+			this.uid = opt.uid
+		},
+		onShow() {
+
+		},
+		onReachBottom() {
+
+		},
+		onReady() {
+			
+		},
+		methods: {
+			fbpj() {
+				if(this.comment == '') {
+					return that.$u.toast('请输入评价');
+				}
+				console.log(this.score, this.comment)
+				this.$u.api.pjYg({
+					uid: this.uid, //员工id
+					comment: this.comment, //评论
+					score: this.score, //评分
+					order_id: this.order_id //预约订单id
+				}).then(res => {
+					uni.showToast({
+						title: '评价成功'
+					});
+					
+					setTimeout(() => {
+						uni.navigateBack()
+					}, 1000);
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background: #f8f6f6;
+		height: auto;
+		min-height: 100%;
+	}
+	.pj-top {
+		background-color: #fff;
+		padding: 20rpx;
+		height: 250rpx;
+		textarea {
+			display: block;
+			width: 100%;
+			height: 100%;
+			font-size: 28rpx;
+			font-weight: 500;
+			color: #333;
+		}
+		.textholder {
+			font-size: 28rpx;
+			font-weight: 500;
+			color: #999;
+		}
+	}
+	.pj-xj {
+		margin-top: 20rpx;
+		display: flex;
+		justify-content: flex-start;
+		align-items: center;
+		background-color: #fff;
+		padding: 0 20rpx;
+		height: 75rpx;
+	}
+	.btn {
+		width: 560rpx;
+		height: 90rpx;
+		background: #E02020;
+		border-radius: 45px;
+		font-size: 36rpx;
+		font-weight: 500;
+		color: #FFFFFF;
+		text-align: center;
+		line-height: 90rpx;
+		margin: 88rpx auto 0;
+		
+	}
+</style>

+ 236 - 13
pagesT/unit/itemdetail.vue

@@ -137,6 +137,41 @@
 			:goodsId="goods_id" />
 		<setMealMore :goods_id="goods_id" :shopId="goods_detail.shopId" :isShow="is_setMeal_show"
 			@close="is_setMeal_show = false" /> -->
+			<u-popup v-model="payPop" mode="bottom" :border-radius="12">
+				<view class="pay-pop-view">
+					<view class="pay-sel-title clearfix">
+						<text class="float_left">付款方式</text>
+						<text class="float_right ibonfont ibonguanbi" @click="closePayPop"></text>
+					</view>
+					<view class="pay-ul">
+						<view class="pay-li"  @click="pay_type = 1">
+							<text class="ibonfont ibonhuodaofukuan"></text>
+							<view class="pay-name clearfix"
+								:class="[goods_detail.price*1 > Number(userInfo.memberBalance) ? 'balance-pay-name' : '']">
+								<view class="float_left">
+									<text>余额</text>
+									<text class="balace-num">(余额:¥{{ Number(userInfo.memberBalance) }})</text>
+								</view>
+								<text  class="float_right ibonfont  ibonxuanze1" v-if="pay_type == 1"></text>
+								<text  class="float_right ibonfont  ibonxuanze1" style="color: #CCCCCC;" v-else></text>
+							</view>
+						</view>
+						<view class="pay-li" @click="pay_type = 2" v-if="goods_detail.price*1 > 0">
+							<text class="ibonfont ibonweixinzhifu"></text>
+							<view class="pay-name clearfix ">
+								<view class="float_left">
+									<text>微信</text>
+								</view>
+								<text class="float_right ibonfont ibonxuanze1" v-if="pay_type == 2"></text>
+								<text class="float_right ibonfont ibonxuanze1" style="color: #CCCCCC;" v-else></text>
+							</view>
+						</view>
+					</view>
+					<view class="pay-btn primary-btn" @click="submit">
+						<text>确定</text>
+					</view>
+				</view>
+			</u-popup>
 	</view>
 </template>
 
@@ -196,6 +231,9 @@
 		},
 		data() {
 			return {
+				userInfo: {},
+				pay_type: 1,
+				payPop: false,
 				eq_sku_kg: {}, // 抄码商品kg
 				eq_sku_jian: {}, // 抄码商品辅助单位
 				//轮播图下标
@@ -243,7 +281,8 @@
 				is_setMeal_show: false, //组合套餐弹窗
 				combinedPackage: [],
 				total: 0,
-				shopId: ''
+				shopId: '',
+				isyhk: 0,//是否是优惠卡
 			};
 		},
 		onShow() {
@@ -320,6 +359,9 @@
 				const scene = decodeURIComponent(options.scene);
 				this.goods_id = scene;
 			}
+			if(options.isyhk) {
+				this.isyhk = options.isyhk
+			}
 			if (options.skuId) {
 				this.skuId = parseInt(options.skuId);
 			}
@@ -354,6 +396,9 @@
 			await this.getQrSrc();
 		},
 		methods: {
+			closePayPop() {
+				this.payPop = false
+			},
 			openService() {
 				this.service_pop = true;
 			},
@@ -508,7 +553,7 @@
 			},
 			//App分享为微信小程序(App中分享一个内容到微信好友,对方微信中呈现的是一个小程序卡片)
 			shareFriend() {
-				const path = '/pagesT/product/product?id=' + this.goods_id;
+				const path = '/pagesT/unit/itemdetail?id=' + this.goods_id;
 				uni.share({
 					provider: 'weixin',
 					scene: 'WXSceneSession',
@@ -538,16 +583,36 @@
 			// 请求商品品详情
 			async getGoodsDetail() {
 				let that = this
-				that.$u.api.getItemDetail({
-					id: that.goods_id
-				}).then(({
-					data
-				}) => {
-					console.log(data, 'itemdetail+++')
-					// 轮播图
-					that.goods_detail = data;
-					that.imgList = data.slider_image;
-				})
+					
+				if(that.isyhk == 1) {
+					
+					that.$u.api.getYhkDetail({
+						id: that.goods_id
+					}).then(({
+						data
+					}) => {
+						console.log(data, 'itemdetail+++')
+						// 轮播图
+						that.goods_detail = data;
+						that.goods_detail.result = data.introduce
+						let arr = []
+						arr[0] = data.image
+						that.imgList = arr;
+						console.log(that.imgList,'that.imgList')
+					})
+				}else {
+					that.$u.api.getItemDetail({
+						id: that.goods_id
+					}).then(({
+						data
+					}) => {
+						console.log(data, 'itemdetail+++')
+						// 轮播图
+						that.goods_detail = data;
+						that.imgList = data.slider_image;
+					})
+				}
+				
 				// this.$u.api
 				// 	.getGoodsDetail(this.goods_id)
 				// 	.then(({
@@ -630,7 +695,80 @@
 				// this.$u.api.calculation({
 					
 				// })
-				this.goPage('/pagesT/order/createOrderT?id=' + this.goods_detail.id)
+				if(this.isyhk == 1) {
+					this.$u.api.getCustomerInfo().then(({ data }) => {
+						this.userInfo = data;
+						this.$store.commit('commit_userStatus', data);
+						this.payPop = true
+					});
+				}else {
+					this.goPage('/pagesT/order/createOrderT?id=' + this.goods_detail.id)
+				}
+				
+			},
+			// 支付
+			submit() {
+				let that = this
+				// 判断余额是否足够
+				
+				if(that.pay_type == 1 && (that.goods_detail.price*1 > that.userInfo.memberBalance*1)) {
+					return this.$u.toast('抱歉,您的可用余额不足');
+				}
+				that.$u.api.buyYhk({
+					"id": that.goods_detail.id,
+					"pay_type": that.pay_type, //1余额2微信3支付宝
+					"source": that.pay_type == 2 ? 3: '',
+				}).then(({
+					data
+				}) => {
+					// 余额支付
+					if(that.pay_type == 1) {
+						console.log(data)
+						if(data == '支付成功' || data.data == '支付成功') {
+							that.payPop = false
+							setTimeout(() => {
+								uni.navigateTo({
+									url:'/pagesT/money/paySuccess?price=' + that.goods_detail.price + '&isyhq=1'
+								})
+								// this.otheMsgTip('/pagesT/money/paySuccess?price=' + this
+								// 	.goods_detail.price + '&isyhq=1');
+							}, 200);
+						}
+					}
+					// 微信支付
+					if(that.pay_type == 2) {
+						// data.data
+						let payInfo = data.data
+						// #ifdef MP-WEIXIN
+						uni.requestPayment({
+							provider: 'wxpay',
+							timeStamp: payInfo.timeStamp, //当前时间
+							nonceStr: payInfo.nonceStr, //随机字符串,长度在32一下
+							package: payInfo.package, //统一单接口返回的prepay_id
+							signType: payInfo.signType, //签名算法,目前支持MD5
+							paySign: payInfo.paySign, //签名
+							success: res => {
+								// 订单审核,取消订单提醒
+								that.payPop = false
+								setTimeout(() => {
+									this.otheMsgTip('/pagesT/money/paySuccess?price=' + this
+										.goods_detail.price + '&isyhq=1');
+								}, 200);
+							},
+							fail: async err => {
+								that.payPop = false
+								that.$u.toast('支付失败');
+								console.log('支付失败');
+								// await setTimeout(() => {
+								// 	// uni.redirectTo({
+								// 	// 	url: '/pagesT/order/orderT?state=0'
+								// 	// });
+								// }, 100);
+							}
+						});
+						// #endif
+					}
+				})
 			},
 			// 关闭加入购物车弹窗
 			closeaddcartPop(obj) {
@@ -1763,4 +1901,89 @@
 			margin-top: 30rpx;
 		}
 	}
+	.pay-pop-view {
+		background-color: #ffffff;
+		border-top-left-radius: 12upx;
+		border-top-right-radius: 12upx;
+		font-size: 28upx;
+	
+		.pay-sel-title {
+			padding: 0 30upx;
+			line-height: 88upx;
+			font-weight: bold;
+			font-size: 32upx;
+	
+			.ibonfont {
+				color: #999;
+				font-weight: 400;
+			}
+		}
+	
+		.pay-btn {
+			height: 90upx;
+			line-height: 90upx;
+			color: #000;
+			font-size: 32upx;
+			text-align: center;
+			background-color: #108ee9;
+		}
+	
+		.pay-ul {
+			.pay-li {
+				line-height: 100upx;
+	
+				.ibonfont {
+					padding-left: 30upx;
+					font-size: 46upx;
+					vertical-align: middle;
+					margin-right: 24upx;
+				}
+	
+				.ibonweixinzhifu {
+					color: #04be02;
+				}
+	
+				.ibonumidd17 {
+					color: #108ee9;
+				}
+	
+				.ibonhuodaofukuan {
+					color: #f2b844;
+				}
+	
+				.pay-name {
+					width: 650upx;
+					display: inline-block;
+					padding-right: 30upx;
+					vertical-align: middle;
+					border-bottom: 1px solid #f5f5f5;
+	
+					.ibonxuanze1,
+					.ibonweixuanze {
+						margin-right: 0;
+						padding-left: 0;
+						font-size: 38upx;
+					}
+	
+					.balace-num {
+						font-size: 24rpx;
+						color: #6c6c6c;
+					}
+				}
+	
+				.balance-pay-name {
+					position: relative;
+					padding-bottom: 20rpx;
+	
+					.balance-tip {
+						position: absolute;
+						font-size: 22rpx;
+						line-height: 36rpx;
+						bottom: 10rpx;
+						left: 0;
+					}
+				}
+			}
+		}
+	}
 </style>

+ 86 - 24
pagesT/unit/official.vue

@@ -6,24 +6,80 @@
 					<image :src="item.avatar" mode="" class=""></image>
 				</view>
 				<view class="store-name ellipsis">
-					{{item.staffName}}
+					{{type == 5?item.staffName:item.name }}
 				</view>
-				<view class="info">
-					<view class="info-tit">
-						职务:
+				<!-- 员工 -->
+				<template v-if="type == 5">
+					<view class="info">
+						<view class="info-tit">
+							职务:
+						</view>
+						<view class="info-val">
+							{{item.departmentName}}
+						</view>
 					</view>
-					<view class="info-val">
-						{{item.departmentName}}
+					<view class="info">
+						<view class="info-tit">
+							工号:
+						</view>
+						<view class="info-val">
+							{{item.staffCode}}
+						</view>
 					</view>
-				</view>
-				<view class="info">
-					<view class="info-tit">
-						工号:
+				</template>
+				<!-- 高管 -->
+				<template v-if="type == 4">
+					<view class="info">
+						<view class="info-tit">
+							职务:
+						</view>
+						<view class="info-val">
+							{{item.duties}}
+						</view>
 					</view>
-					<view class="info-val">
-						{{item.staffCode}}
+					<view class="info">
+						<view class="info-tit">
+							工号:
+						</view>
+						<view class="info-val">
+							{{item.job_no}}
+						</view>
 					</view>
-				</view>
+					<view class="info">
+						<view class="info-tit">
+							业务:
+						</view>
+						<view class="info-val">
+							{{item.business}}
+						</view>
+					</view>
+				</template>
+				<template v-if="type == 3">
+					<view class="info">
+						<view class="info-tit">
+							职务:
+						</view>
+						<view class="info-val">
+							{{item.duties}}
+						</view>
+					</view>
+					<view class="info">
+						<view class="info-tit">
+							联系:
+						</view>
+						<view class="info-val">
+							{{item.phone}}
+						</view>
+					</view>
+					<view class="info">
+						<view class="info-tit">
+							地址:
+						</view>
+						<view class="info-val clamp">
+							{{item.address}}
+						</view>
+					</view>
+				</template>
 				<!-- <view class="info">
 					<view class="info-tit">
 						业务:
@@ -58,16 +114,21 @@
 					uni.setNavigationBarTitle({
 						title: '高管'
 					})
-					this.typename = 'getAllygList'
-				} else if (this.type == 2) {
-					uni.setNavigationBarTitle({
-						title: '员工'
-					})
-					this.typename = 'getAllygList'
+					this.typename = 'getOtherList'
 				} else if (this.type == 3) {
 					uni.setNavigationBarTitle({
 						title: '共享股东商家'
 					})
+					this.typename = 'getOtherList'
+				} else if (this.type == 4) {
+				 	uni.setNavigationBarTitle({
+				 		title: '高管'
+				 	})
+				 	this.typename = 'getOtherList'
+				 }else if (this.type == 5) {
+					uni.setNavigationBarTitle({
+						title: '员工'
+					})
 					this.typename = 'getAllygList'
 				}
 				this.getList()
@@ -88,10 +149,10 @@
 					url
 				})
 			},
-			gotoDetail() {
+			gotoDetail(item) {
 				// 员工详情
-				if (this.type == 2) {
-					this.navto('/pagesT/unit/ygdetail')
+				if (this.type == 5) {
+					this.navto('/pagesT/unit/ygdetail?id=' + item.id)
 				}
 
 			},
@@ -103,7 +164,8 @@
 				that.loadingType = 'loading'
 				this.$u.api[that.typename]({
 					page: that.page,
-					pagesize: that.limit
+					pageSize: that.limit,
+					type: that.type
 				}).then(res => {
 					console.log(res)
 					that.list = that.list.concat(res.data)
@@ -131,7 +193,7 @@
 	.gq-item {
 		margin: 0 0 20rpx 14rpx;
 		width: 227rpx;
-		height: 351rpx;
+		min-height: 351rpx;
 		background: #FFFFFF;
 		box-shadow: 0px 5rpx 5rpx 0px rgba(35, 24, 21, 0.06);
 		border-radius: 10rpx;

+ 260 - 0
pagesT/unit/officialT.vue

@@ -0,0 +1,260 @@
+<template>
+	<view :class="['qn-page-' + theme]" style="height: 100vh">
+		<view class="content">
+			<view class="navbar">
+				<view v-for="(item, index) in navList" :key="index" class="nav-item"
+					:class="[tabCurrentIndex === index ? 'current' : '']" @click="tabClick(item, index)">
+					{{ item.text }}
+					<view class="current-line primary-btn"></view>
+				</view>
+			</view>
+			<swiper :current="tabCurrentIndex" class="swiper-box" duration="300">
+				<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+					<scroll-view @scrolltolower="getOrderSelect" scroll-y="true" style="height:100%">
+						<u-empty v-if="tabItem.list.length == 0" mode="list"></u-empty>
+						<view class="gq-list">
+							<view class="gq-item" v-for="item in tabItem.list" @click="gotoDetail(item)">
+								<view class="gq-logo">
+									<image :src="item.avatar" mode="" class=""></image>
+								</view>
+								<view class="store-name ellipsis">
+									{{item.name }}
+								</view>
+
+								<view class="info">
+									<view class="info-tit">
+										职务:
+									</view>
+									<view class="info-val">
+										{{item.duties}}
+									</view>
+								</view>
+								<view class="info">
+									<view class="info-tit">
+										联系:
+									</view>
+									<view class="info-val">
+										{{item.phone}}
+									</view>
+								</view>
+								<view class="info">
+									<view class="info-tit">
+										地址:
+									</view>
+									<view class="info-val clamp">
+										{{item.address}}
+									</view>
+								</view>
+
+							</view>
+						</view>
+						<u-loadmore margin-top="20" v-if="!(tabItem.list.length === 0 && tabItem.loaded)"
+							:status="loading_status" />
+					</scroll-view>
+				</swiper-item>
+			</swiper>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				navList: [{
+						state: 1,
+						text: '加盟',
+						loadingType: 'loadmore',
+						page: 1,
+						pageSize: 10,
+						list: [],
+						loaded: false
+					},
+					{
+						state: 2,
+						text: '连锁',
+						loadingType: 'loadmore',
+						page: 1,
+						pageSize: 10,
+						list: [],
+						loaded: false
+					}
+				],
+				tabCurrentIndex: 0,
+			}
+		},
+		onLoad(opt) {
+			this.tabCurrentIndex = +options.state;
+		},
+		onShow() {
+			this.getOrderSelect();
+		},
+		onReachBottom() {
+
+		},
+		onReady() {
+
+		},
+		methods: {
+			// 获取订单列表
+			getOrderSelect(type) {
+				let that = this
+				let item = that.navList[that.tabCurrentIndex]
+				if (type == 'reload') {
+					item.loadingType = 'loadmore'
+					item.list = []
+					item.page = 1
+				}
+				if (type == 'tab' && item.loaded) {
+					return
+				}
+				if (item.loadingType == 'loading' || item.loadingType == 'nomore') {
+					return
+				}
+				item.loadingType = 'loading'
+				that.$u.api.getOtherList({
+					type: item.state,
+					page: item.page,
+					pageSize: item.pageSize,
+					name: ''
+				}).then(({
+					data
+				}) => {
+					item.list = item.list.concat(data)
+					item.page++
+					if (item.pageSize == data.length) {
+						item.loadingType = 'loadmore'
+					} else {
+						item.loadingType = 'nomore'
+					}
+					item.loaded = true
+				})
+			},
+			tabClick(item, index) {
+				this.tabCurrentIndex = index
+				this.getOrderSelect('tab')
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		background: $page-color-base;
+		height: 100vh;
+	}
+
+	.swiper-box {
+		height: calc(100% - 80upx);
+	}
+
+	.list-scroll-content {
+		height: 100%;
+	}
+
+	.navbar {
+		display: flex;
+		height: 88upx;
+		background: #fff;
+		position: relative;
+		z-index: 10;
+		border-bottom: 1upx solid #eee;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 28upx;
+			color: #666666;
+			position: relative;
+			font-weight: 300;
+
+			&.current {
+				font-weight: 500;
+
+				.current-line {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 10upx;
+					transform: translateX(-50%);
+					width: 40upx;
+					height: 6upx;
+					background: $base-btn-bg;
+					border-radius: 6upx;
+					/*border-bottom: 2px solid #F53C28;*/
+				}
+			}
+		}
+	}
+
+	.gq-list {
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: flex-start;
+		// justify-content: space-between;
+		padding: 20rpx 0 20rpx 20rpx;
+	}
+
+	.gq-item {
+		margin: 0 0 20rpx 14rpx;
+		width: 227rpx;
+		min-height: 351rpx;
+		background: #FFFFFF;
+		box-shadow: 0px 5rpx 5rpx 0px rgba(35, 24, 21, 0.06);
+		border-radius: 10rpx;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: space-between;
+		padding: 30rpx 14rpx 20rpx;
+
+		.gq-logo {
+			width: 140rpx;
+			height: 140rpx;
+			border-radius: 50%;
+			border: 1px solid #262261;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+
+			image {
+				width: 135rpx;
+				height: 135rpx;
+				background-color: #eee;
+				border-radius: 50%;
+			}
+		}
+
+		.store-name {
+			padding-top: 10rpx;
+			text-align: center;
+			width: 100%;
+			font-size: 26rpx;
+			font-weight: 500;
+			color: #262261;
+			overflow: hidden;
+		}
+
+		.info {
+			width: 100%;
+			display: flex;
+			padding: 5rpx 0;
+
+			.info-tit {
+				font-size: 18rpx;
+				flex-shrink: 0;
+			}
+
+			.info-val {
+				text-align: center;
+				font-size: 20rpx;
+				width: 140rpx;
+				border-bottom: 1px #C7C7C7 solid;
+			}
+		}
+
+	}
+</style>

+ 66 - 26
pagesT/unit/ygdetail.vue

@@ -1,13 +1,14 @@
 <template>
 	<view class="content">
 		<view class="yg-top">
-			<image src="" mode="" class="yg-img"></image>
+			<image :src="yg_detail.avatar" mode="" class="yg-img"></image>
 			<view class="yg-name">
-				李丹丹
+				{{yg_detail.staffName}}
 			</view>
 			<view class="star-wrap">
-				<u-icon name="star-fill" color="#F3BE69" v-for="item in star*1" class="start" size="20rpx"></u-icon>
-				<u-icon name="star-fill" color="#eee" v-for="itemt in (5-star*1)" class="start" size="20rpx"></u-icon>
+				<u-rate :count="count" v-model="yg_detail.evaluate"  active-color="#F3BE69" inactive-color="#eee" disabled></u-rate>
+				<!-- <u-icon name="star-fill" color="#F3BE69" v-for="item in star*1" class="start" size="20rpx"></u-icon>
+				<u-icon name="star-fill" color="#eee" v-for="itemt in (5-star*1)" class="start" size="20rpx"></u-icon> -->
 			</view>
 		</view>
 		<view class="yg-info">
@@ -19,11 +20,11 @@
 					</view>
 				</view>
 				<view class="info-val">
-					5595
+					{{yg_detail.sold}}
 				</view>
 
 			</view>
-			<view class="info-line">
+			<!-- <view class="info-line">
 				<view class="left-name">
 					<image src="" mode=""></image>
 					<view class="">
@@ -34,7 +35,7 @@
 					2年
 				</view>
 
-			</view>
+			</view> -->
 			<view class="info-line" style="height: auto;border-bottom: none;">
 				<view class="left-name">
 					<image src="" mode=""></image>
@@ -43,31 +44,24 @@
 					</view>
 				</view>
 				<view class="info-val" style="line-height: 1.5;padding-top: 20rpx;">
-					简介的详细内容,员工的服务介绍,优势说明简介。简
-					介的详细内容,员工的服务介绍,优势说明简介。简介的详细内容,员
-					工的服务介绍,优势说明简介。 简介的详细内容,员工的服务介绍,优势说明简介。简
-					介的详细内容,员工的服务介绍,优势说明简介。简介的详细内容,员
-					工的服务介绍,优势说明简介。
+					{{yg_detail.info || '暂无'}}
 				</view>
 			</view>
-
 		</view>
 		<view class="pj-tit">
 			服务评价
 		</view>
 		<scroll-view scroll-y="true" :style="{'height': height}" class="swiper-box">
-			<view class="pj-wrap" v-for="item in pjlist">
+			<u-empty text="暂无数据" mode="data" v-if="list.length == 0 && loaded"></u-empty>
+			<view class="pj-wrap" v-for="item in list">
 				<view class="pj-user">
-					<view class="user-logo">
-						
-					</view>
+					<image :src="item.customer.avatar" mode="" class="user-logo"></image>
 					<view class="user-info">
 						<view class="user-name">
-							李丹丹
+							{{item.customer.name | showName}}
 						</view>
 						<view class="star-wrap">
-							<u-icon name="star-fill" color="#E02E24" v-for="item in star*1" class="start" size="20rpx"></u-icon>
-							<u-icon name="star-fill" color="#999999" v-for="itemt in (5-star*1)" class="start" size="20rpx"></u-icon>
+							<u-rate :count="count" v-model="item.score"  active-color="#F3BE69" inactive-color="#999" disabled></u-rate>
 						</view>
 					</view>
 					<view class="pj-time">
@@ -75,10 +69,10 @@
 					</view>
 				</view>
 				<view class="pj-info">
-					服务很好!!!服务很好!!!服务很好!!!服务很好!!!
-					服务很好!!!
+					{{item.comment}}
 				</view>
 			</view>
+			<u-loadmore :status="loadingType" v-if="!loaded || list.length > 0"/>
 		</scroll-view>
 	</view>
 </template>
@@ -87,13 +81,23 @@
 	export default {
 		data() {
 			return {
+				loaded: false,
+				count: 5,
 				star: 3,
 				height: '',
 				pjlist: 10,
+				ygid: '',
+				yg_detail: {},
+				page:1,
+				pageSize: 10,
+				loadingType: 'loadmore',
+				list: []
 			}
 		},
-		onLoad() {
-
+		onLoad(opt) {
+			this.ygid = opt.id
+			this.getYgdetail()
+			this.getYgPj()
 		},
 		onShow() {
 
@@ -115,8 +119,45 @@
 				fail: res => {}
 			});
 		},
+		filters: {
+			showName(val) {
+				if(val !== '') {
+					let arr = val.split('')
+					return arr[0] + '***'+ arr[arr.length-1]
+				}else {
+					return '佚名'
+				}
+				
+			}
+		},
 		methods: {
-
+			getYgdetail() {
+				this.$u.api.getYgdetail({
+					request_id: this.ygid
+				}).then(({data})=> {
+					this.yg_detail = data
+				})
+			},
+			getYgPj() {
+				if(this.loadingType == 'nomore' || this.loadingType == 'loading') {
+					return
+				}
+				this.loadingType = 'loading'
+				this.$u.api.getYgPj({
+					id: this.ygid, //员工id
+					page: this.page, //分页页码,数字类型
+					pageSize: this.pageSize
+				}).then(({data})=> {
+					this.list = this.list.concat(data)
+					this.page++
+					this.loaded = true
+					if(this.pageSize == data.length) {
+						this.loadingType = 'loadmore'
+					}else {
+						this.loadingType = 'nomore'
+					}
+				})
+			}
 		}
 	}
 </script>
@@ -267,6 +308,5 @@
 		}
 	}
 	.swiper-box {
-		background-color: red;
 	}
 </style>

+ 126 - 0
pagesT/unit/yhk.vue

@@ -0,0 +1,126 @@
+<template>
+	<view :class="['qn-page-' + theme]" style="height: 100vh">
+		<view class="good-list">
+			<view class="good" v-for="item in list" @click="goPage('/pagesT/unit/itemdetail?id=' + item.id + '&isyhk=1')">
+				<image :src="item.image" mode="" class="good-image"></image>
+				<view class="good-name ">
+					<view class="clamp2">
+						{{item.name}}哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈
+					</view>
+				</view>
+				<view class="good-price">
+					<view class="price">
+						{{item.price}}
+					</view>
+					<view class="xl">
+						销量:{{item.sold}}
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-loadmore :status="loadingType" />
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				page: 1,
+				pageSize: 10,
+				loaded: false,
+				loadingType: 'loadmore',
+				list: []
+			}
+		},
+		onLoad(opt) {
+
+		},
+		onShow() {
+			this.getList()
+		},
+		onReachBottom() {
+
+		},
+		onReady() {
+
+		},
+		methods: {
+			getList(type) {
+				let that = this
+
+				if (type == 'tab' && that.loaded) {
+					return
+				}
+				if (that.loadingType == 'loading' || that.loadingType == 'nomore') {
+					return
+				}
+				that.loadingType = 'loading'
+
+				that.$u.api.getYhkList({
+					page: that.page,
+					pageSize: that.pageSize,
+				}).then(({
+					data
+				}) => {
+					that.list = that.list.concat(data)
+					that.page++
+					if (data.length == that.pageSize) {
+						that.loadingType = 'loadmore'
+					} else {
+						that.loadingType = 'nomore'
+					}
+				})
+
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.good-list {
+		display: flex;
+		justify-content: space-between;
+		flex-wrap: wrap;
+		padding: 20rpx 28rpx;
+		.good {
+			width: 336rpx;
+			height: 482rpx;
+			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: #999999;
+				border-radius: 14rpx 14rpx 0 0;
+			}
+
+			.good-name {
+				font-size: 28rpx;
+				font-weight: bold;
+				color: #333333;
+				padding: 0 20rpx;
+			}
+
+			.good-price {
+				display: flex;
+				width: 336rpx;
+				justify-content: space-between;
+				font-size: 28rpx;
+				font-weight: bold;
+				color: #FF1A1A;
+				position: absolute;
+				bottom: 20rpx;
+				padding: 0 20rpx;
+				.xl{
+					font-size: 20rpx;
+					font-weight: bold;
+					color: #999999;
+				}
+			}
+		}
+	}
+</style>

+ 160 - 0
pagesT/user/dyquan.vue

@@ -0,0 +1,160 @@
+<template>
+	<view :class="['qn-page-' + theme]" style="height: 100vh">
+		<view class="content">
+			<view class="dyquan-wrap" v-for="(item,index) in list" :key="index">
+				<view class="showtime">
+					<text class="float_left order-no-text">{{ $_utils.formatDate(item.createTime) }}</text>
+				</view>
+				<view class="item-info">
+					<image :src="item.image" mode=""></image>
+					<view class="info-info">
+						<view class="clamp2">
+							{{item.name}}
+						</view>
+						<view class="info-cs">
+							剩余使用次数:{{item.number}}
+						</view>
+					</view>
+				</view>
+				<view class="btm">
+					<view class="primary-btn btn" @click="goPage('/pagesT/unit/itemdetail?id=' + item.project_id)">
+						立即使用
+					</view>
+				</view>
+			</view>
+
+			<u-loadmore :status="loadingType" />
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				page: 1,
+				pageSize: 10,
+				loaded: false,
+				loadingType: 'loadmore',
+				list: []
+			}
+		},
+		onLoad(opt) {
+
+		},
+		onShow() {
+			this.getList()
+		},
+		onReachBottom() {
+			this.getList()
+		},
+		onReady() {
+
+		},
+		methods: {
+			tabClick(item, index) {
+				this.tabCurrentIndex = index;
+			},
+			getList(type) {
+				let that = this
+				if (type == 'reload') {
+					// item.list
+					return
+				}
+				if (type == 'tab' && that.loaded) {
+					return
+				}
+				if (that.loadingType == 'loading' || that.loadingType == 'nomore') {
+					return
+				}
+				that.loadingType = 'loading'
+
+				that.$u.api.getDyquanList({
+					page: that.page,
+					pageSize: that.pageSize,
+					name: ''
+				}).then(({
+					data
+				}) => {
+					that.list = that.list.concat(data)
+					that.page++
+					if (data.length == that.pageSize) {
+						that.loadingType = 'loadmore'
+					} else {
+						that.loadingType = 'nomore'
+					}
+				})
+
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		background-color:#f8f6f6 ;
+		height: auto;
+		min-height: 100%;
+		
+	}
+	.dyquan-wrap {
+		padding: 20rpx;
+		background-color: #fff;
+		margin-bottom: 15rpx;
+		.showtime {
+			height: 50rpx;
+		}
+		.item-info {
+			width: 750rpx;
+			height: 205rpx;
+			background: #F7F7F7;
+			display: flex;
+			justify-content: flex-start;
+			align-items: center;
+			
+			image {
+				width: 160rpx;
+				height: 160rpx;
+				margin-right: 30rpx;
+			}
+
+			.info-info {
+				height: 160rpx;
+				padding: 15rpx 0;
+				padding-right: 50rpx;
+				font-size: 30rpx;
+				font-weight: 500;
+				color: #666666;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				align-items: flex-start;
+				.info-cs {
+					font-size: 26rpx;
+					font-weight: 500;
+					color: #999999;
+				}
+			}
+		}
+
+		.btm {
+			width: 100%;
+			height: 95rpx;
+			background-color: #fff;
+			display: flex;
+			justify-content: flex-end;
+			align-items: center;
+
+			.btn {
+				width: 144rpx;
+				height: 55rpx;
+				border-radius: 28rpx;
+				font-size: 26rpx;
+				font-weight: 500;
+				color: #FFFFFF;
+				line-height: 55rpx;
+				text-align: center;
+			}
+		}
+	}
+</style>

+ 150 - 0
pagesT/user/myyhk.vue

@@ -0,0 +1,150 @@
+<template>
+	<view :class="['qn-page-' + theme]" style="height: 100vh">
+		<view class="dyquan-wrap" v-for="(item,index) in list" :key="index">
+			<view class="showtime">
+				<text class="float_left order-no-text">{{ $_utils.formatDate(item.createTime) }}</text>
+			</view>
+			<view class="item-info">
+				<image :src="item.image" mode=""></image>
+				<view class="info-info">
+					<view class="clamp2">
+						{{item.card_name}}
+					</view>
+					<view class="info-cs">
+						实付:{{item.pay_price}}
+					</view>
+				</view>
+			</view>
+			<view class="btm">
+				<!-- <view class="primary-btn btn" @click="goPage('/pagesT/unit/item?id=' + item.project_id)">
+					立即使用
+				</view> -->
+			</view>
+		</view>
+		<u-loadmore :status="loadingType" />
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				page: 1,
+				pageSize: 10,
+				loaded: false,
+				loadingType: 'loadmore',
+				list: []
+			}
+		},
+		onLoad(opt) {
+
+		},
+		onShow() {
+			this.getList()
+		},
+		onReachBottom() {
+
+		},
+		onReady() {
+
+		},
+		methods: {
+			getList(type) {
+				let that = this
+
+				if (type == 'tab' && that.loaded) {
+					return
+				}
+				if (that.loadingType == 'loading' || that.loadingType == 'nomore') {
+					return
+				}
+				that.loadingType = 'loading'
+
+				that.$u.api.getMyyhkList({
+					page: that.page,
+					pageSize: that.pageSize,
+				}).then(({
+					data
+				}) => {
+					that.list = that.list.concat(data)
+					that.page++
+					if (data.length == that.pageSize) {
+						that.loadingType = 'loadmore'
+					} else {
+						that.loadingType = 'nomore'
+					}
+				})
+
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		background-color:#f8f6f6 ;
+		height: auto;
+		min-height: 100%;
+		
+	}
+	.dyquan-wrap {
+		padding: 20rpx;
+		background-color: #fff;
+		margin-bottom: 15rpx;
+		.showtime {
+			height: 50rpx;
+		}
+		.item-info {
+			width: 750rpx;
+			height: 205rpx;
+			background: #F7F7F7;
+			display: flex;
+			justify-content: flex-start;
+			align-items: center;
+			
+			image {
+				width: 160rpx;
+				height: 160rpx;
+				margin-right: 30rpx;
+			}
+	
+			.info-info {
+				height: 160rpx;
+				padding: 15rpx 0;
+				padding-right: 50rpx;
+				font-size: 30rpx;
+				font-weight: 500;
+				color: #666666;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+				align-items: flex-start;
+				.info-cs {
+					font-size: 26rpx;
+					font-weight: 500;
+					color: #999999;
+				}
+			}
+		}
+	
+		.btm {
+			width: 100%;
+			height: 40rpx;
+			background-color: #fff;
+			display: flex;
+			justify-content: flex-end;
+			align-items: center;
+	
+			.btn {
+				width: 144rpx;
+				height: 55rpx;
+				border-radius: 28rpx;
+				font-size: 26rpx;
+				font-weight: 500;
+				color: #FFFFFF;
+				line-height: 55rpx;
+				text-align: center;
+			}
+		}
+	}
+</style>

+ 1 - 1
static/css/common.css

@@ -107,7 +107,7 @@ ul {
 }
 
 /*每个页面公共css */
-.ellipsis {
+.ellipsis, .clamp2 {
 	overflow: hidden;
 	text-overflow: ellipsis;
 	display: -webkit-box;