lhl 2 years ago
parent
commit
5e1a103707

BIN
baseinfo/480.9.png


BIN
baseinfo/720.9.png


BIN
baseinfo/logo.png


BIN
baseinfo/np.keystore


BIN
baseinfo/下载页.png


BIN
baseinfo/启动图1080.9.png


+ 2 - 0
baseinfo/证书信息.txt

@@ -0,0 +1,2 @@
+别名:np.com
+密码:112233

+ 50 - 0
common/http.api.js

@@ -450,6 +450,56 @@ const install = (Vue, vm) => {
 		//财务类型列表(不含分页)
 		getAllFinanceTypeNoPage: (id, params = '') => vm.$u.get(
 			`/Finance/FinanceType/getAllFinanceTypeNoPage/${id}`, params),
+		// 消耗品列表
+		getXhpList:(params = '') => vm.$u.get(`/Stock/Consume/list`, params),
+		// 员工列表Department/ApiStaff/staffAll
+		getYgList:(params = '') => vm.$u.post(`/Department/ApiStaff/staffAll`, params),
+		//员工详情
+		getYgdetail:(params = '') => vm.$u.post(`/Department/staff/getStaffInfo`, params),
+		// 员工评价列表
+		getYgPj:(params = '') => vm.$u.post(`/shop/ApiShopSubscribe/comment_list`, params),
+		// 员工提成查询
+		getYgTc:(params = '') => vm.$u.post(`/Department/Staff/getAllStaffRewardDesc`, params),
+		//考勤列表
+		getKqList:(params = '') => vm.$u.get(`/Department/ApiStaff/ExaminationRecord`, params),
+		//Department/ApiStaff/ExaminationDetails
+		ExaminationDetails:(params = '') => vm.$u.get(`/Department/ApiStaff/ExaminationDetails`, params),
+		//
+		scheduling_details:(params = '') => vm.$u.post(`/Department/ApiStaff/scheduling_details`, params),
+		// 预约项目列表
+		getYyItemList:(params = '') => vm.$u.post(`/shop/ShopProject/list`, params),
+		//获取门店列表
+		getStoreList:(params = '') => vm.$u.post(`/Shop/Shop/getShopByStaff `, params),
+		getAllygList: (params = '') => vm.$u.get(`/Department/ApiStaff/staffAll`, params),
+		//选择时间员工 
+		getTimeYgList: (params = '') => vm.$u.post(`/shop/ApiShopProject/choice`, params),
+		//员工预约时间
+		getYgYyTimeArea: (params = '') => vm.$u.post(`/shop/ApiShopProject/choice_time`, params),
+		//添加预约订单
+		addYyItem:(params = '') => vm.$u.post(`/shop/ShopSubscribe/add`, params),
+		// 员工提成提现
+		addReflectDetail:(params = '') => vm.$u.post(`/Department/ApiStaff/addReflectDetail`, params),
+		//业绩纪录
+		StaffLadder:(params = '') => vm.$u.post(`/Department/StaffLadder/list`, params),
+		//店员转介绍Department/ApiStaff/Referral
+		referral:(params = '') => vm.$u.post(`/Department/ApiStaff/Referral`, params),
+		//Department/ApiStaff/list
+		getYgYyList:(params = '') => vm.$u.get(`/Department/ApiStaff/list`, params),
+		//增加预约订单项目Department/ApiStaff/addProject
+		addProject:(params = '') => vm.$u.post(`/Department/ApiStaff/addProject`, params),
+		//完成预约订单
+		completeYy:(params = '') => vm.$u.post(`/Department/ApiStaff/complete`, params),
+		//
+		getYyOrderDetail:(params = '') => vm.$u.get(`/shop/ApiShopSubscribe/details`, params),
+		//获取员工股权列表
+		getYgGqList:(params = '') => vm.$u.get(`/Department/ApiStaff/stock_list`, params),
+		//提现股权
+		txGq:(params = '') => vm.$u.get(`/Department/ApiStaff/StockWithdrawal`, params),
+		// 员工提现列表
+		ygTxList:(params = '') => vm.$u.post(`/Department/ApiStaff/getWithdrawal`, params),
+		//Department/Staff/updateStaff
+		setYgInfo:(id,params = '')=> vm.$u.post(`/Department/Staff/updateStaff/${id}`, params)
+		
 	};
 }
 

+ 2 - 2
common/http.interceptor.js

@@ -14,12 +14,11 @@ const install = (Vue, vm) => {
 	});
 	// 请求拦截,配置Token等参数
 	Vue.prototype.$u.http.interceptor.request = (config) => {
-		console.log(config.url,config)
 		// 登录token
 		config.header.Authorization = vm.$store.state.token;
 		// 企业Token
 		config.header.Token = vm.$store.state.enToken;
-
+		console.log(config,'请求')
 		// 方式一,存放在vuex的token,假设使用了uView封装的vuex方式,见:https://uviewui.com/components/globalVariable.html
 		// config.header.token = vm.token;
 
@@ -37,6 +36,7 @@ const install = (Vue, vm) => {
 	}
 	// 响应拦截,判断状态码是否通过
 	Vue.prototype.$u.http.interceptor.response = (res) => {
+		console.log(res)
 		uni.hideNavigationBarLoading();
 		uni.stopPullDownRefresh()
 		// 如果把originalData设置为了true,这里得到将会是服务器返回的所有的原始数据

+ 35 - 0
common/utils.js

@@ -211,3 +211,38 @@ export const unique = (arr = [], property = []) => {
 	}
 	return arr;
 };
+
+/**
+ * @description 时间格式化  时间戳转换为时间
+ * @param date
+ * @param fmt
+ * @return {*}
+ */
+export function formatDate(date, fmt) {
+	if (!date) {
+		return ''
+	}
+	// if (typeof date !== 'string') {
+	//   return ''
+	// }
+	date *= (date.toString().length === 10 ? 1000 : 1)
+	let _date = new Date(date)
+	let _fmt = fmt || 'yyyy-MM-dd hh:mm:ss'
+	let o = {
+		'M+': _date.getMonth() + 1,
+		'd+': _date.getDate(),
+		'h+': _date.getHours(),
+		'm+': _date.getMinutes(),
+		's+': _date.getSeconds()
+	}
+	if (/(y+)/.test(_fmt)) {
+		_fmt = _fmt.replace(RegExp.$1, (_date.getFullYear() + '').substr(4 - RegExp.$1.length))
+	}
+	for (let k in o) {
+		if (new RegExp('(' + k + ')').test(_fmt)) {
+			_fmt = _fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k])
+				.length)))
+		}
+	}
+	return _fmt
+}

+ 88 - 62
components/Tabbar/index.vue

@@ -1,74 +1,100 @@
 <template>
-	<u-tabbar :value="value" :list="tabbar_list" active-color="#4076D6" inactive-color="#B8C0C8" :border-top="false"></u-tabbar>
+	<u-tabbar :value="value" :list="tabbar_list" active-color="#4076D6" inactive-color="#B8C0C8" :border-top="false">
+	</u-tabbar>
 </template>
 
 <script>
-import indexIcon from '../../static/Tar_bar_slices/index.png'
-import indexIconFill from '../../static/Tar_bar_slices/index-fill.png'
-import orderIcon from '../../static/Tar_bar_slices/order.png'
-import orderIconFill from '../../static/Tar_bar_slices/order-fill.png'
-import goodsIcon from '../../static/Tar_bar_slices/goods.png'
-import goodsIconFill from '../../static/Tar_bar_slices/goods-fill.png'
-import userIcon from '../../static/Tar_bar_slices/user.png'
-import userIconFill from '../../static/Tar_bar_slices/user-fill.png'
-import myIcon from '../../static/Tar_bar_slices/my.png'
-import myIconFill from '../../static/Tar_bar_slices/my-fill.png'
-export default {
-	model: {
-		props: 'value'
-	},
-	props: {
-		value: {
-			type: Number,
-			default: 0
-		}
-	},
-	computed: {
-		tabbar_list() {
-			return [
-				{
-					iconPath: indexIcon,
-					selectedIconPath: indexIconFill,
-					text: '工作台',
-					customIcon: false,
-					pagePath: '/pages/index/index'
-				},
-				{
-					iconPath: orderIcon,
-					selectedIconPath: orderIconFill,
-					text: '订单',
-					customIcon: false,
-					pagePath: '/pages/order/index'
-				},
-				{
-					iconPath: goodsIcon,
-					selectedIconPath: goodsIconFill,
-					text: '商品',
-					customIcon: false,
-					pagePath: '/pages/goods/index'
-				},
-				{
-					iconPath: userIcon,
-					selectedIconPath: userIconFill,
-					text: '客户',
-					customIcon: false,
-					pagePath: '/pages/customer/CustomerList'
-				},
-				{
-					iconPath: myIcon,
-					selectedIconPath: myIconFill,
-					text: '我的',
-					customIcon: false,
-					pagePath: '/pages/user/index'
+	import indexIcon from '../../static/Tar_bar_slices/index.png'
+	import indexIconFill from '../../static/Tar_bar_slices/index-fill.png'
+	import orderIcon from '../../static/Tar_bar_slices/order.png'
+	import orderIconFill from '../../static/Tar_bar_slices/order-fill.png'
+	import goodsIcon from '../../static/Tar_bar_slices/goods.png'
+	import goodsIconFill from '../../static/Tar_bar_slices/goods-fill.png'
+	import userIcon from '../../static/Tar_bar_slices/user.png'
+	import userIconFill from '../../static/Tar_bar_slices/user-fill.png'
+	import myIcon from '../../static/Tar_bar_slices/my.png'
+	import myIconFill from '../../static/Tar_bar_slices/my-fill.png'
+	export default {
+		model: {
+			props: 'value'
+		},
+		props: {
+			value: {
+				type: Number,
+				default: 0
+			}
+		},
+		computed: {
+			tabbar_list() {
+				let roleType = uni.getStorageSync('roleType')
+				if (roleType == 2) {
+					return [{
+							iconPath: indexIcon,
+							selectedIconPath: indexIconFill,
+							text: '工作台',
+							customIcon: false,
+							pagePath: '/pages/index/index'
+						}, {
+							iconPath: userIcon,
+							selectedIconPath: userIconFill,
+							text: '客户',
+							customIcon: false,
+							pagePath: '/pages/customer/CustomerList'
+						},
+						{
+							iconPath: myIcon,
+							selectedIconPath: myIconFill,
+							text: '我的',
+							customIcon: false,
+							pagePath: '/pages/user/index'
+						}
+					]
+				}else {
+					return [{
+							iconPath: indexIcon,
+							selectedIconPath: indexIconFill,
+							text: '工作台',
+							customIcon: false,
+							pagePath: '/pages/index/index'
+						},
+						{
+							iconPath: orderIcon,
+							selectedIconPath: orderIconFill,
+							text: '订单',
+							customIcon: false,
+							pagePath: '/pages/order/index'
+						},
+						{
+							iconPath: goodsIcon,
+							selectedIconPath: goodsIconFill,
+							text: '商品',
+							customIcon: false,
+							pagePath: '/pages/goods/index'
+						},
+						{
+							iconPath: userIcon,
+							selectedIconPath: userIconFill,
+							text: '客户',
+							customIcon: false,
+							pagePath: '/pages/customer/CustomerList'
+						},
+						{
+							iconPath: myIcon,
+							selectedIconPath: myIconFill,
+							text: '我的',
+							customIcon: false,
+							pagePath: '/pages/user/index'
+						}
+					];
 				}
-			];
+				
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style>
-	.u-tabbar__content__item__text .u-line-1{
+	.u-tabbar__content__item__text .u-line-1 {
 		font-size: 20rpx !important;
 	}
 </style>

+ 98 - 84
components/its-calendar/its-calendar.vue

@@ -1,30 +1,20 @@
 <template>
 	<view>
 		<view class="calendar">
-			<scroll-view scroll-x="true" class="top-wrap" >
-				<view class="time-wrap" v-for="(dayitem,dayindex) in dayArr" :key="dayindex" :class="{'action':day_index ==dayindex }" @click.stop="dayList(dayitem,dayindex)">
+			<scroll-view scroll-x="true" class="top-wrap">
+				<view class="time-wrap" v-for="(dayitem,dayindex) in dayArr" :key="dayindex"
+					:class="{'action':day_index ==dayindex }" @click.stop="dayList(dayitem,dayindex)">
 					<text class="time-val">{{dayitem.days}}</text>
 					<text class="time-xq">{{dayitem.weeks}}</text>
 				</view>
 			</scroll-view>
-			<!-- <view class="calendar_day">
-				
-				<view class="day_x" :style="{'color': (day_index == index ? '#FE3B3C' : '')}"
-					v-for="(item, index) in dayArr" :key="index" @click.stop="dayList(item,index)">
-					<view class="day_x_a">{{item.weeks}}</view>
-					<view class="day_x_b">{{item.days}}</view>
-				</view>
-			</view> -->
 			<view scroll-y class="calendar_time">
 				<view class="time_x" :class="host_index == item.timeStamp ? 'time_x_sty' : ''"
 					v-for="(item, index) in hostArr[day_index]" :key="index"
-					@click="nowTimes < item.timeStamp ? hosts(item) : ''"
-					:style="{'color': (nowTimes > item.timeStamp ? '#999999' : '')}">{{item.hours}}</view>
+					@click="hosts(item)"
+					>{{item.hours}}</view>
 			</view>
 		</view>
-		<!-- <view class="sub" @click="sub()">
-			立即预约
-		</view> -->
 	</view>
 </template>
 
@@ -44,6 +34,12 @@
 				default: 30
 			},
 		},
+		watch: {
+			sta_num(xin,low) {
+				console.log('改变了')
+				this.sxym()
+			}
+		},
 		data() {
 			return {
 				dayArr: [],
@@ -55,74 +51,85 @@
 			}
 		},
 		mounted() {
-			let dateArr = [];
-			let today = new Date();
-			let nowTime = today.getTime() // 当前时间戳
-			this.nowTimes = parseInt(nowTime / 1000)
-			for (let i = 0; i < 10; 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); // 当前月份
-				let day = (newDate.getDate()) > 9 ? newDate.getDate() : "0" + newDate.getDate(); //当前日期
-				let backTime = newDate.getTime(); // 几天后时间戳
-				let backDays = newDate.getDay();// 几天后周几
-				let remTime = (backTime - nowTime) / 1000; // 距离今天几天
-				let week = '';
-				// if (remTime == 0) {
-				// 	week = "今天"
-				// } else if (remTime == 86400) {
-				// 	week = "明天"
-				// } else if (remTime == 172800) {
-				// 	week = "后天"
-				// } else {
-					if (backDays == 0) {
-						week = "周日";
-					} else if (backDays == 1) {
-						week = "周一";
-					} else if (backDays == 2) {
-						week = "周二";
-					} else if (backDays == 3) {
-						week = "周三";
-					} else if (backDays == 4) {
-						week = "周四";
-					} else if (backDays == 5) {
-						week = "周五";
-					} else if (backDays == 6) {
-						week = "周六";
-					}
-				// }
-				// let fullDate = `${month}-${day}`;
-				let fullDate = `${day}`;
-				let ass = {
-					weeks: week,
-					days: fullDate
-				};
-				dateArr.push(ass);
-			}
-			this.dayArr = dateArr;
-
-			let timeArr = [];
-			for (let i = 0; i < 5; 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;
-				let endTime = this.end_num * 60 * 60 + as;
-				let int = this.int_num * 60;
-				let timeArr_s = [];
-				for (staTime; staTime < endTime - int; staTime + int) {
-					staTime = staTime + int;
-					let hours = this.times(staTime);
-					let asb = {
-						hours,
-						timeStamp: staTime
-					};
-					timeArr_s.push(asb);
-				}
-				timeArr.push(timeArr_s);
-			}
-			this.hostArr = timeArr;
+			this.sxym()
 		},
 		methods: {
+			sxym() {
+				console.log('执行获取',this.sta_num,this.end_num)
+				try{
+					let dateArr = [];
+					let today = new Date();
+					let nowTime = today.getTime() // 当前时间戳
+					this.nowTimes = parseInt(nowTime / 1000)
+					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); // 当前月份
+						let day = (newDate.getDate()) > 9 ? newDate.getDate() : "0" + newDate.getDate(); //当前日期
+						let backTime = newDate.getTime(); // 几天后时间戳
+						let backDays = newDate.getDay(); // 几天后周几
+						let remTime = (backTime - nowTime) / 1000; // 距离今天几天
+						let week = '';
+						// if (remTime == 0) {
+						// 	week = "今天"
+						// } else if (remTime == 86400) {
+						// 	week = "明天"
+						// } else if (remTime == 172800) {
+						// 	week = "后天"
+						// } else {
+						if (backDays == 0) {
+							week = "周日";
+						} else if (backDays == 1) {
+							week = "周一";
+						} else if (backDays == 2) {
+							week = "周二";
+						} else if (backDays == 3) {
+							week = "周三";
+						} else if (backDays == 4) {
+							week = "周四";
+						} else if (backDays == 5) {
+							week = "周五";
+						} else if (backDays == 6) {
+							week = "周六";
+						}
+						// }
+						// let fullDate = `${month}-${day}`;
+						let fullDate = `${day}`;
+						let ass = {
+							weeks: week,
+							days: fullDate
+						};
+						dateArr.push(ass);
+					}
+					this.dayArr = dateArr;
+					
+					let timeArr = [];
+					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;
+						let endTime = this.end_num * 60 * 60 + as;
+						let int = this.int_num * 60;
+						let timeArr_s = [];
+						for (staTime; staTime < endTime - int; staTime + int) {
+							staTime = staTime + int;
+							let hours = this.times(staTime);
+							let asb = {
+								hours,
+								timeStamp: staTime
+							};
+							timeArr_s.push(asb);
+						}
+						timeArr.push(timeArr_s);
+					}
+					this.hostArr = timeArr;
+					console.log(this.hostArr,'hostArr')
+				}catch(e){
+					//TODO handle the exception
+					console.log(e)
+				}
+				
+			},
 			// 点击日期
 			dayList(e, index) {
 				this.day_index = index;
@@ -160,7 +167,7 @@
 				m = m < 10 ? ('0' + m) : m; //分钟补0
 				return h + ':' + m;
 			},
-			time(data, type){
+			time(data, type) {
 				let date = new Date(data * 1000);
 				//时间戳为10位需*1000,时间戳为13位的话不需乘1000
 				let y = date.getFullYear();
@@ -257,12 +264,14 @@
 		font-size: 36rpx;
 		// background-color: #FE3B3C;
 	}
+
 	.top-wrap {
-		
+
 		white-space: nowrap;
 		width: 700rpx;
 		// height: 100rpx;
-		padding:20rpx 0;
+		padding: 20rpx 0;
+
 		.time-wrap {
 			margin: auto 15rpx;
 			display: inline-block;
@@ -272,22 +281,27 @@
 			line-height: 63rpx;
 			text-align: center;
 			background-color: #FDF9FA;
+
 			.time-xq {
 				font-size: 22rpx;
 				font-weight: 500;
 				color: #999999;
 			}
+
 			.time-val {
 				font-size: 32rpx;
 				font-weight: bold;
 				color: #333333;
 			}
 		}
+
 		.action {
 			background-color: #262261;
+
 			.time-xq {
 				color: #FDF9FA;
 			}
+
 			.time-val {
 				color: #FDF9FA;
 			}

+ 14 - 5
manifest.json

@@ -1,9 +1,9 @@
 {
-    "name" : "店铺管理",
-    "appid" : "__UNI__BA71A93",
+    "name" : "后台管理",
+    "appid" : "__UNI__F844DCC",
     "description" : "",
-    "versionName" : "1.2.0",
-    "versionCode" : 120,
+    "versionName" : "1.0.1",
+    "versionCode" : 101,
     "transformPx" : false,
     "app-plus" : {
         "nvueCompiler" : "uni-app",
@@ -47,7 +47,8 @@
                     "NSLocationWhenInUseUsageDescription" : "需要您的同意,才能在使用期间访问您的地理位置,获取当前您的地理位置",
                     "NSLocationAlwaysUsageDescription" : "需要您的同意,才能在使用期间访问您的地理位置,获取当前您的地理位置",
                     "NSLocationAlwaysAndWhenInUseUsageDescription" : "需要您的同意,才能在使用期间访问您的地理位置,获取当前您的地理位置"
-                }
+                },
+                "dSYMs" : false
             },
             "sdkConfigs" : {
                 "maps" : {
@@ -91,6 +92,14 @@
                         "spotlight@3x" : "unpackage/res/icons/120x120.png"
                     }
                 }
+            },
+            "splashscreen" : {
+                "androidStyle" : "common",
+                "android" : {
+                    "hdpi" : "baseinfo/480.9.png",
+                    "xhdpi" : "baseinfo/720.9.png",
+                    "xxhdpi" : "baseinfo/启动图1080.9.png"
+                }
             }
         },
         "splashscreen" : {

+ 7 - 1
pages.json

@@ -816,11 +816,17 @@
 					}
 				},
 				{
-					"path": "yg/fcxq",
+					"path": "yg/txxq",
 					"style": {
 						"navigationBarTitleText": "分成详情"
 					}
 				},
+				{
+					"path": "yg/setInfo",
+					"style": {
+						"navigationBarTitleText": "设置个人信息"
+					}
+				},
 				{
 					"path": "goods/xhplist",
 					"style": {

+ 1 - 0
pages/enterprise/index.vue

@@ -47,6 +47,7 @@ export default {
 		async goShop(row) {
 			this.$store.commit('commit_enToken', row.token);
 			this.$store.commit('commit_enterprise', row);
+			console.log(row.roleType,'row.roleType++++')
 			await this.getAclList(row.roleType);
 			await this.getStaffByToken(row.roleType);
 			this.goPage('/pages/index/index','switchTab')

+ 126 - 70
pages/index/index.vue

@@ -2,13 +2,13 @@
 	<view class="home">
 		<view class="top_view">
 			<u-navbar :title-bold="true" :border-bottom="false"
-				:background="{ background: `rgba(64, 118, 214, ${scroll_top / 100})` }" :is-back="false" title=" ">
+				:background="{ background: `rgba(14, 9, 21, ${scroll_top / 100})` }" :is-back="false" title=" ">
 				<view class="title">{{ enterprise.enterpriseName || '工作台' }}</view>
 			</u-navbar>
 			<!-- <uniStatusBar></uniStatusBar> -->
 			<!-- <view class="title">{{ enterprise.enterpriseName || '--' }}</view> -->
 			<view class="user_img clearfix">
-				<view class="img">
+				<view class="img" @click="setYg()">
 					<image :src="enterprise.logo" mode="aspectFill"></image>
 					<span class="img_title">{{ userInfo.name }}</span>
 				</view>
@@ -98,17 +98,17 @@
 			</view>
 		</view> -->
 		<!-- 内容 -->
-		<view class="content">
+		<view class="content" >
 			<!-- 工作台 -->
-			<view class="content_main" style="margin-top: 0;">
+			<view class="content_main" style="margin-top: 0;" v-if="roleType == 2">
 				<view class="content_top clearfix"
 					style="background: linear-gradient(270deg, #FDFFFE 0%, #EAFEEE 100%);">
 					<image src="../../static/img/ic-work.png" class="img"></image>
 					<text class="title-text">工作台</text>
-					<view class="edit-btn float_right" @click="goPage('/pages/app/index')">
+					<!-- <view class="edit-btn float_right" @click="goPage('/pages/app/index')">
 						<u-icon name="edit-pen-fill" color="#4076D6" label-color="#4076D6" size="28" label="编辑"
 							label-size="28"></u-icon>
-					</view>
+					</view> -->
 				</view>
 				<view class="cont">
 					<swiper class="swiper" indicator-color="#B8C0C8" indicator-active-color="#4076D6" :autoplay="false"
@@ -128,15 +128,15 @@
 					</swiper>
 				</view>
 			</view>
-			<view class="content_main" style="margin-top: 0;">
+			<view class="content_main" style="margin-top: 0;" v-if="roleType != 2">
 				<view class="content_top clearfix"
 					style="background: linear-gradient(270deg, #FDFFFE 0%, #EAFEEE 100%);">
 					<image src="../../static/img/ic-work.png" class="img"></image>
 					<text class="title-text">工作台</text>
-					<view class="edit-btn float_right" @click="goPage('/pages/app/index')">
+					<!-- <view class="edit-btn float_right" @click="goPage('/pages/app/index')">
 						<u-icon name="edit-pen-fill" color="#4076D6" label-color="#4076D6" size="28" label="编辑"
 							label-size="28"></u-icon>
-					</view>
+					</view> -->
 				</view>
 				<view class="cont">
 					<swiper class="swiper" indicator-color="#B8C0C8" indicator-active-color="#4076D6" :autoplay="false"
@@ -156,7 +156,7 @@
 					</swiper>
 				</view>
 			</view>
-			<view class="content_main" v-if="$accessCheck($Access.overview)">
+			<view class="content_main" v-if="$accessCheck($Access.overview) && roleType != 2">
 				<view class="content_top">
 					<image src="../../static/img/ic-jy.png" class="img" mode="aspectFill"></image>
 					<text class="title-text">经营概况</text>
@@ -228,7 +228,7 @@
 				</view>
 			</view>
 			<!-- 	订单概况 -->
-			<view class="content_main" v-if="$accessCheck($Access.overview)">
+			<view class="content_main" v-if="$accessCheck($Access.overview) && roleType != 2">
 				<view class="content_top clearfix"
 					style="background: linear-gradient(270deg, #FFFFFF 0%, #FDF6E8 100%); ">
 					<view class="float_left">
@@ -303,7 +303,7 @@
 				</view>
 			</view>
 			<!-- 近7日交易统计图 -->
-			<view class="content_main" v-if="$accessCheck($Access.overview)">
+			<view class="content_main" v-if="$accessCheck($Access.overview) && roleType != 2">
 				<view class="content_top" style="background: linear-gradient(270deg, #FDFFFF 0%, #EAFAFE 100%);">
 					<image src="../../static/img/ic-jyh2.png" class="img" style="vertical-align: middle;"></image>
 					<text class="title-text">近7日交易趋势</text>
@@ -314,7 +314,7 @@
 				</view>
 			</view>
 			<!-- tab -->
-			<view class="content_main" v-if="$accessCheck($Access.overview)">
+			<view class="content_main" v-if="$accessCheck($Access.overview) && roleType != 2">
 				<view class="content_top tabs-ul">
 					<ul class="ul_tag">
 						<li v-for="(item, index) in tag" :key="index" @click="changeTag(item.value)" class="ul_tag_item"
@@ -366,9 +366,11 @@
 							<li class="clearfix progress-li" v-for="(item, index) in ranking.customerRanking"
 								:key="index">
 								<view style="width: 450rpx;border: 0;" class="float_left label ellipsis">
-									{{ item.customerName }}</view>
+									{{ item.customerName }}
+								</view>
 								<view style="width: 200rpx;text-align: left;" class="float_right num">
-									{{ item.numberOrMoney }}</view>
+									{{ item.numberOrMoney }}
+								</view>
 							</li>
 						</ul>
 						<ul class="progress-ul" v-if="rank_on === 4">
@@ -377,18 +379,19 @@
 								<view style="width: 450rpx;border: 0;" class="float_left label">{{ item.supplierName }}
 								</view>
 								<view style="width: 200rpx;text-align: left;" class="float_right num">
-									{{ item.numberOrMoney }}</view>
+									{{ item.numberOrMoney }}
+								</view>
 							</li>
 						</ul>
 					</view>
 				</view>
 			</view>
 			<!-- 员工订单 -->
-			<view class="ygdd">
+			<view class="ygdd" v-if="ygYyList.length > 0">
 				<view class="dd-tit">
 					<view class="tit-left">
 						<view class="sx">
-							
+
 						</view>
 						<view class="">
 							我的订单
@@ -399,36 +402,36 @@
 						<image src="../../static/img/down-right-w.png" mode=""></image>
 					</view>
 				</view>
-				<view class="dd-wrap">
+				<view class="dd-wrap" v-for="yyitem in ygYyList" @click="goPage('/pagesS/order/orderinfo?id=' + yyitem.id)">
 					<view class="dd-id-status">
 						<view class="dd-stata">
-								待服务
+							{{yyitem.status == 1 ? '已完成': '待服务'}}
 						</view>
 						<view class="dd-id">
-							ddddadfasfdasdf-adfas
+							{{yyitem.order_id}}
 						</view>
 						<view class="dd-status">
 							已预约
 						</view>
 					</view>
 					<view class="dd-info" style="margin-top: 20rpx;">
-							客服名称<text>小圆</text>
+						客户名称<text>{{yyitem.customer}}</text>
 					</view>
 					<view class="dd-info">
-							下单时间<text>2022-11-03 9:30~10:30</text>
+						下单时间<text>{{$utils.formatDate(yyitem.createTime)}}</text>
 					</view>
 					<view class="dd-info">
-							预约时间<text class="chs" style="color:#FF5600;">2022-11-03 9:30~10:30</text>
+						预约时间<text class="chs" style="color:#FF5600;">{{$utils.formatDate(yyitem.time)}}</text>
 					</view>
 					<view class="dd-btm">
 						<view class="btm-price">
-							订单金额: <text>¥2400</text>
+							订单金额: <text>¥{{yyitem.to_price}}</text>
 						</view>
-						<view class="btm-btn">
+						<view class="btm-btn" @click.stop="goCall(yyitem.customer_mobile)">
 							联系客户
 						</view>
 					</view>
-					<view class="add-dd" @click="goPage('/pagesS/order/addorder')">
+					<view class="add-dd" @click.stop="goPage('/pagesS/order/addorder?id=' + yyitem.id)" v-if="yyitem.status == 0">
 						<image src="../../static/img/add-dd.png" mode=""></image>
 						<view class="">
 							添加项目
@@ -528,45 +531,46 @@
 							access: 'salesRanking'
 						},
 						{
-							url: '/pagesS/yg/dkdetail',
+							url: '/pagesS/yg/dkdetail?type=yg',
 							label: '考勤记录',
-							icon: 'custom-icon-paihangbang',
-							color: '#f29611',
+							icon: 'custom-icon-liulanjilu-tianchong',
+							color: '#7747EE',
 							access: 'salesRanking'
 						},
 						{
 							url: '/pagesS/yg/gqdetail',
 							label: '股权管理',
-							icon: 'custom-icon-piliangxiadan',
-							color: '#f29611',
+							icon: 'custom-icon-group_fill',
+							color: '#4076D6',
 							access: 'OrderAdd'
 						},
 						{
 							url: '/pagesS/yg/yjjl',
 							label: '业绩奖励',
-							icon: 'custom-icon-piliangxiadan',
-							color: '#f29611',
+							icon: 'custom-icon-xiaoshouyuce',
+							color: '#5c6aff',
 							access: 'OrderAdd'
 						},
 						{
-							url: '/pagesS/yg/gztx',
+							// url: '/pagesS/yg/gztx',
+							url: '/pagesS/yg/gzdetail?type=yg',
 							label: '工资提现',
-							icon: 'custom-icon-piliangxiadan',
-							color: '#f29611',
+							icon: 'custom-icon-mingxi',
+							color: '#5c6aff',
 							access: 'OrderAdd'
 						},
 						{
-							url: '/pagesS/yg/ygdetail',
+							url: '/pagesS/yg/ygdetail?type=yg',
 							label: '我的评价',
-							icon: 'custom-icon-piliangxiadan',
-							color: '#f29611',
+							icon: 'custom-icon-quehuoshangpinshu',
+							color: '#5c6aff',
 							access: 'OrderAdd'
 						},
 						{
 							url: '/pagesS/yg/myteam',
 							label: '我的转介绍',
-							icon: 'custom-icon-piliangxiadan',
-							color: '#f29611',
+							icon: 'custom-icon-tiaobodanguanli',
+							color: '#7747EE',
 							access: 'OrderAdd'
 						}
 					]
@@ -582,55 +586,57 @@
 						{
 							url: '/pagesT/customer/selCustomert',
 							label: '客户拜访',
-							icon: 'custom-icon-fuwu',
-							color: '#f29611',
+							icon: 'custom-icon-baifang',
+							color: '#5c6aff',
 							access: 'CustomerListvisitedLogs'
 						},
 						{
 							url: '/pagesS/goods/xhplist',
 							label: '消耗品管理',
-							icon: 'custom-icon-fuwu',
+							icon: 'custom-icon-shangpin2',
 							color: '#f29611',
 							access: 'CustomerListvisitedLogs'
 						},
 						{
 							url: '/pagesS/goods/valetbuy',
 							label: '代客预约',
-							icon: 'custom-icon-fuwu',
-							color: '#f29611',
+							icon: 'custom-icon-tuikuan',
+							color: '#e8443c',
 							access: 'CustomerListvisitedLogs'
 						},
 						{
 							url: '/pagesS/yg/dklist',
 							label: '员工打卡',
-							icon: 'custom-icon-fuwu',
-							color: '#f29611',
+							icon: 'custom-icon-liulanjilu-tianchong',
+							color: '#7747EE',
 							access: 'CustomerListvisitedLogs'
 						},
 						{
 							url: '/pagesS/yg/yglist?type=yg',
 							label: '门店员工',
-							icon: 'custom-icon-fuwu',
-							color: '#f29611',
+							icon: 'custom-icon-quehuoshangpinshu',
+							color: '#5c6aff',
 							access: 'CustomerListvisitedLogs'
 						},
 						{
 							url: '/pagesS/yg/yglist?type=gz',
 							label: '工资表',
-							icon: 'custom-icon-fuwu',
-							color: '#f29611',
+							icon: 'custom-icon-yue',
+							color: '#7747EE',
 							access: 'CustomerListvisitedLogs'
 						},
 						{
 							url: '/pages/order/OrderAdd',
 							label: '代客下单',
-							icon: 'custom-icon-piliangxiadan',
-							color: '#f29611',
+							icon: 'custom-icon-shoukuandanguanli',
+							color: '#5c6aff',
 							access: 'OrderAdd'
 						}
 					]
 				],
-				scroll_top: 0
+				scroll_top: 0,
+				ygYyList: [],
+				roleType: 1,
 			};
 		},
 		onPageScroll(e) {
@@ -664,7 +670,12 @@
 			await this.getBasicSetup();
 		},
 		async onShow() {
+			this.roleType = uni.getStorageSync('roleType')
+			if(this.roleType == 2) {
+				this.getYgYyList()
+			}
 			// await this.getCommonAppInfo();
+			
 		},
 		async onPullDownRefresh() {
 			await this.overview();
@@ -673,6 +684,31 @@
 		},
 		onShareAppMessage(res) {},
 		methods: {
+			setYg() {
+				let roleType = uni.getStorageSync('roleType')
+				if(roleType == 2) {
+					this.goPage('/pagesS/yg/setInfo')
+				}
+			},
+			goCall(phone) {
+				console.log(phone,'打电话');
+				uni.makePhoneCall({
+					phoneNumber: phone
+				})
+			},
+			getYgYyList() {
+				this.$u.api.getYgYyList({
+					"page": 1, //分页页码,数字类型
+					"pageSize": 3,
+					"name": "", //搜索条件
+					"type": ''
+				}).then(({
+					data
+				}) => {
+					console.log(data, '员工订单')
+					this.ygYyList = data
+				})
+			},
 			...mapActions({
 				logout: 'logout'
 			}),
@@ -801,7 +837,8 @@
 
 	.home {
 		font-family: DIN-Medium;
-
+		height: 100vh;
+		background-color: #0e0915;
 		.top_bottom {
 			width: 686rpx;
 			margin: 0 auto;
@@ -849,7 +886,7 @@
 		.top_view {
 			padding: 0 32rpx 164rpx;
 			// height: calc(500rpx + var(--status-bar-height));
-			background: linear-gradient(#4076d6, #4076d6, #4076d6, #4076d6, #f5f5f6 100%);
+			// background: linear-gradient(#4076d6, #4076d6, #4076d6, #4076d6, #f5f5f6 100%);
 
 			.title {
 				padding-left: 32rpx;
@@ -860,7 +897,6 @@
 
 			.user_img {
 				margin-top: 52rpx;
-
 				.img {
 					float: left;
 
@@ -1272,24 +1308,30 @@
 			border-radius: 12rpx;
 		}
 	}
+
 	.ygdd {
 		width: 100%;
 		background-color: #0c0a16;
 		padding-bottom: 20rpx;
+
 		.dd-tit {
 			padding: 0 37rpx;
 			height: 95rpx;
 			display: flex;
 			justify-content: space-between;
 			align-items: center;
-			.tit-left, .tit-right {
+
+			.tit-left,
+			.tit-right {
 				display: flex;
 				align-items: center;
 			}
+
 			.tit-left {
 				color: #e3c4a5;
 				font-size: 30rpx;
 				font-weight: bold;
+
 				.sx {
 					background-color: #e3c4a5;
 					width: 7rpx;
@@ -1298,16 +1340,19 @@
 					margin-right: 20rpx;
 				}
 			}
+
 			.tit-right {
 				font-size: 24rpx;
 				font-weight: 500;
 				color: #FFFFFF;
+
 				image {
 					width: 22rpx;
 					height: 22rpx;
 				}
 			}
 		}
+
 		.dd-wrap {
 			margin: auto;
 			width: 713rpx;
@@ -1317,6 +1362,7 @@
 			padding-top: 35rpx;
 			position: relative;
 			margin-bottom: 27rpx;
+
 			.dd-id-status {
 				height: 40rpx;
 				display: flex;
@@ -1324,6 +1370,7 @@
 				width: 100%;
 				font-size: 24rpx;
 				padding: 0 23rpx 0 43rpx;
+
 				.dd-stata {
 					flex-shrink: 0;
 					width: 123rpx;
@@ -1332,67 +1379,76 @@
 					border-radius: 5rpx;
 					text-align: center;
 					line-height: 39rpx;
-					
+
 					font-weight: 400;
 					color: #FFFFFF;
 				}
+
 				.dd-id {
 					margin-left: 15rpx;
 					flex-grow: 1;
 					color: #1e395a;
-					
+
 				}
+
 				.dd-status {
 					flex-shrink: 0;
 					font-weight: 400;
 					color: #FCA930;
 				}
 			}
+
 			.dd-info {
 				font-size: 28rpx;
 				font-weight: 500;
 				color: #A0A0A0;
 				padding-left: 42rpx;
+
 				text {
 					padding-left: 32rpx;
 					font-size: 26rpx;
 					font-weight: 500;
 					color: #173456;
 				}
-				
+
 			}
+
 			.dd-btm {
 				position: absolute;
 				bottom: 0;
 				height: 90rpx;
 				width: 713rpx;
-				background: linear-gradient(to right,#fbf5eb,#ffffff);
+				background: linear-gradient(to right, #fbf5eb, #ffffff);
 				border-radius: 0 0 20rpx 20rpx;
 				display: flex;
 				justify-content: space-between;
 				align-items: center;
 				padding: 0 20rpx 0 42rpx;
+
 				.btm-price {
 					font-size: 26rpx;
 					color: #56687f;
+
 					text {
-						color:#ff1e00 ;
+						color: #ff1e00;
 					}
 				}
+
 				.btm-btn {
 					width: 126rpx;
 					height: 48rpx;
 					line-height: 48rpx;
-					background:#ebccae;
+					background: #ebccae;
 					border-radius: 10rpx;
 					font-size: 24rpx;
 					font-weight: 400;
 					color: #0C0A15;
 					text-align: center;
-					
+
 				}
-				
+
 			}
+
 			.add-dd {
 				position: absolute;
 				bottom: 90rpx;
@@ -1403,15 +1459,15 @@
 				font-weight: 500;
 				color: #FF5600;
 				text-align: center;
+
 				image {
 					display: block;
 					margin: auto;
 					width: 36rpx;
 					height: 45rpx;
 				}
-				
+
 			}
 		}
 	}
-	
 </style>

+ 16 - 17
pages/login/index.vue

@@ -3,7 +3,7 @@
 		<!-- 商户管理端登录 -->
 		<view class="login_bg" v-if="login_type === 'system'">
 			<image src="../../static/img/login-bg.jpg" mode="scaleToFill"></image>
-			<view class="login-title">商户管理端</view>
+			<view class="login-title">后台管理端</view>
 			<view class="login_content">
 				<view class="login_info">
 					<text class="login_tip" v-if="!forgetPwd_istrue">登录</text>
@@ -32,7 +32,7 @@
 				</view>
 				<view class="login_bottom clearfix" v-if="!forgetPwd_istrue">
 					<!-- <text class="password float_left" @click="forgetPwd_istrue=true">忘记密码?</text> -->
-					<text class="password float_left" @click="login('test')">体验一下</text>
+					<!-- <text class="password float_left" @click="login('test')">体验一下</text> -->
 					<view class="btn float_right" @click="login()">
 						<u-loading :show="is_loading" color="#ffffff" mode="flower"></u-loading>
 						<text>登录</text>
@@ -79,21 +79,16 @@ export default {
 			console.log('登录')
 			let mobile = '';
 			let password = '';
-			if (test) {
-				mobile = '18888888888';
-				password = '123456';
-			} else {
-				if (!this.mobile) {
-					this.$u.toast('请输入登录账号');
-					return;
-				}
-				if (!this.password) {
-					this.$u.toast('请输入密码');
-					return;
-				}
-				mobile = this.mobile;
-				password = this.password;
+			if (!this.mobile) {
+				this.$u.toast('请输入登录账号');
+				return;
+			}
+			if (!this.password) {
+				this.$u.toast('请输入密码');
+				return;
 			}
+			mobile = this.mobile;
+			password = this.password;
 
 			this.is_loading = true;
 			let params = {
@@ -106,13 +101,16 @@ export default {
 			this.$u.api
 				.login(params)
 				.then(res => {
+					console.log(res,'登录返回++++++')
 					this.is_loading = false;
 					this.$store.commit('commit_token', res.data.token);
 					this.$store.commit('commit_hasLogin', true);
 
 					if (res.data.enterprise.length > 1) {
+						uni.setStorageSync('roleType',1)
 						this.goPage('/pages/enterprise/index');
 					} else if (res.data.enterprise.length === 1) {
+						uni.setStorageSync('roleType',2)
 						this.goShop(res.data.enterprise[0]);
 					} else {
 						this.$u.toast('抱歉当前账号没有企业');
@@ -155,9 +153,10 @@ export default {
 		},
 		async getStaffByToken(roleType) {
 			await this.$u.api.getStaffByToken(roleType).then(res => {
+				console.log(res,'roleType++++++++++++')
 				this.$store.commit('commit_userInfo', {
 					...res.data,
-					name: res.data.name || this.mobile || '18888888888'
+					name: res.data.name || this.mobile || '暂无'
 				});
 			});
 		}

+ 389 - 24
pagesS/goods/valetbuy.vue

@@ -11,7 +11,7 @@
 				<!-- 商品详情 -->
 				<view class="good-wrap" v-else>
 					<view class="good" v-for="goodsitem in xmlist">
-						<image src="" mode="" class="good-img"></image>
+						<image :src="goodsitem.image" mode="" class="good-img"></image>
 						<view class="good-info">
 							<view class="good-name clamp2">
 								{{goodsitem.name}}
@@ -29,6 +29,12 @@
 				</view>
 				<input type="text" placeholder="请输入留言内容" class="ly-right" v-model="mjly">
 			</view>
+			<view class="mjly">
+				<view class="ly-left">
+					优惠价格
+				</view>
+				<input type="digit" placeholder="请输入优惠价格" class="ly-right" v-model="yhjg">
+			</view>
 			
 		</view>
 		<view class="mj-info" @click="goPage('/pagesT/customer/selCustomer')">
@@ -46,28 +52,70 @@
 				<input type="number" placeholder="请填写联系方式" class="ly-right" v-model="customerData.mobile" @click.stop="">
 			</view>
 		</view>
-		<!-- 指派 -->
-		<scroll-view scroll-x="true" class="zp-wrap">
-			<view class="zp-item" v-for="item in 10">
-				<image src="" mode="" class="zp-logo"></image>
-				<view class="zp-name">随机指派</view>
+		<!-- 选择门店 -->
+		<view class="sc-md">
+			<view class="sc-tip">
+				选择门店
 			</view>
-		</scroll-view>
+			<view class="store-info" @click="openStoreChoose" v-if="choose_store">
+				<image :src="choose_store.logo" mode="" class="store-logo"></image>
+				<view class="info">
+					<view class="store-name">
+						{{choose_store.name}}
+					</view>
+					<view class="store-address" v-if="choose_store.area">
+						{{choose_store.area.provinceName + choose_store.area.cityName + choose_store.area.districtName +  choose_store.area.address}}
+					</view>
+				</view>
+				<view class="float_right"><text class="ibonfont ibonjinru"></text></view>
+			</view>
+		</view>
+		<!-- 门店列表弹出层 -->
+		
+
 		<!-- 预约 -->
-			<its-calendar :sta_num="8" :end_num="23" :int_num="30" @getTime="getTime"></its-calendar>
+		<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)"
+				: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>
 		<!-- 填充 -->
 		<view class="" style="height: 110rpx;"></view>
 		<view class="tj-dd">
 			<view class="">
-				<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>
+				<text style="font-size: 26rpx;color: #999;">实际支付:</text>
+				<text style="color: #CE372E;font-size: 44rpx;font-weight: bold;padding-left: 10rpx;" class="rmb">{{(all_price*1-yhjg*1).toFixed(2)}}</text>
 			</view>
-			<view class="tj-btn">
+			<view class="tj-btn" :class="{'canpay': canpay}" @click="canpay?submitt(): ''">
 				提交
 			</view>
 		</view>
+		<!-- 门店选择弹窗 -->
+		<u-popup v-model="store_choose_show" mode="bottom" @close="close" @open="open" border-radius="14">
+			<view>
+				<scroll-view scroll-y="true" class="store-list" @scrolltolower="getStoreList()">
+					<view class="store-info " :class="{'choose-stroe': storeitem.id == choose_store.id}"
+						v-for="(storeitem,storeindex) in store.list" @click="chooseStore(storeitem)">
+						<image :src="storeitem.logo" mode="" class="store-logo"></image>
+						<view class="info">
+							<view class="store-name">
+								{{storeitem.name}}
+							</view>
+							<view class="store-address" v-if="storeitem.area">
+								{{storeitem.area.provinceName + storeitem.area.cityName + storeitem.area.districtName +  storeitem.area.address}}
+							</view>
+						</view>
+						<view class="float_right"></text></view>
+					</view>
+					<u-loadmore :status="store.loadingType" />
+				</scroll-view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
@@ -79,16 +127,112 @@
 		},
 		data() {
 			return {
+				pay_price: '',
+				yhjg: 0,
+				canpay: false,
+				choose_time: '',
+				choose_time_detail: '',
+				store: {
+					page: 1,
+					page_size: 10,
+					list: [],
+					loadingType: 'loadmore',
+					loaded: false,
+				},
+				choose_store: {},
+				yg: {
+					page: 1,
+					page_size: 10,
+					list: [],
+					loadingType: 'loadmore',
+					loaded: false,
+				},
+				choose_yg: {
+					
+				},
+				timed: false, //是否选择完时间
+				store_choose_show: false, //门店选择弹出层开关
 				xmlist: [],
 				mjly: '',
 				customerData: {}
 			}
 		},
+		computed: {
+			all_price() {
+				let price = 0
+				if(this.xmlist.length > 0) {
+					this.xmlist.forEach(item => {
+						price +=item.price*1
+					})
+					
+				}
+				return price.toFixed(2)	
+				
+			},
+			project_id() {
+				let dd = ''
+				if(this.xmlist.length > 0) {
+					this.xmlist.forEach(item => {
+						dd = dd + item.id + ','
+					})
+					
+				}
+				return dd
+			}
+		},
+		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
+					}
+					this.end_time = end[0] * 1
+					console.log(this.start_time)
+				} else {
+					this.start_time = 0
+					this.end_time = 24
+					console.log(this.start_time)
+				}
+				if (this.choose_time != '' && this.choose_time) {
+					console.log(this.choose_time, 'this.choose_time ')
+					this.getYgList('reload')
+				}
+			},
+			choose_time(newval, oldval) {
+				console.log('时间改变')
+				this.getYgList('reload')
+				
+			},
+			choose_yg(newval, oldval) {
+				if (newval.staffName && newval.uid != 0) {
+					console.log('调查choose_yg')
+					this.getYgYyTimeArea()
+				} else {
+					if (newval.staffName == '随机指派' && this.choose_time) {
+						this.canpay = true
+					}
+				}
+		
+			},
+			choose_time_detail(newval, oldval) {
+				console.log(this.choose_yg,'this.choose_yg+++++++++');
+				if (this.choose_store && this.choose_yg.uid && this.choose_yg.uid != 0) {
+					console.log('调查choose_time_detail')
+					this.getYgYyTimeArea()
+				}
+			}
+		},
 		onLoad() {
 
 		},
 		onShow() {
 			console.log(this.customerData)
+			this.getStoreList()
 		},
 		onReachBottom() {
 
@@ -97,24 +241,148 @@
 
 		},
 		methods: {
+			submitt() {
+				
+				let data = {
+					"uid": this.choose_yg.uid, //店员userCenterId
+					"customer_id": this.customerData.id,
+					"project": this.project_id.slice(0,this.project_id.length-1),
+					"discount_price": this.yhjg,
+					"time": this.choose_time + ' ' + this.choose_time_detail,
+					"remarks": this.mjly,
+				}
+				this.canpay = false
+				this.$u.api.addYyItem(data).then(({data})=> {
+					this.$u.toast('创建成功!');
+					setTimeout(() => {
+						uni.navigateBack()
+					}, 1500);
+				}).catch(err => {
+					this.canpay = true
+				})
+			},
+			cannot(title = '该员工不在工作时间') {
+				 // this.$u.toast(title);
+				this.canpay = true
+			},
+			//获取员工列表
+			getYgList(type) {
+				let item = this.yg
+				if (type == 'reload') {
+					item.list = []
+					item.loadingType = 'loadmore'
+				}
+				if (item.loadingType == 'loading' || item.loadingType == 'nomore') {
+					return
+				}
+				item.loadingType = 'loading'
+				this.$u.api.getTimeYgList({
+					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'
+				})
+			},
 			chooseGoods() {
 				uni.navigateTo({
 					url: '/pagesS/goods/yygoods'
 				})
-				this.xmlist = [{
-					name: '线雕提拉术',
-					id: 1,
-					price: '1100'
-				},
-				{
-					name: '减肥大计划',
-					id: 1,
-					price: '1200'
-				}]
 			},
 			getTime(e) {
 				console.log(e);
-			}
+				this.timed = true
+				this.choose_time = e.time.split(' ')[0]
+				this.choose_time_detail = e.time.split(' ')[1]
+			
+			},
+			// 打开门店选择
+			openStoreChoose() {
+				console.log('打开门店选择')
+				this.store_choose_show = true
+			},
+			//选择门店
+			chooseStore(item) {
+				this.choose_store = item
+				this.close()
+			},
+			// 获取门店列表
+			getStoreList() {
+				console.log('获取门店列表')
+				let item = this.store
+				if (item.loadingType == 'loading' || item.loadingType == 'nomore') {
+					return
+				}
+				item.loadingType = 'loading'
+				this.$u.api.getStoreList({
+					page: item.page,
+					pageSize: item.page_size,
+				}).then(({
+					data
+				}) => {
+					console.log(data, '门店列表')
+					item.list = item.list.concat(data)
+					console.log(data,'列表+++++++');
+					if (item.page == 1) {
+						this.choose_store = item.list[0]
+						console.log(this.choose_store,'this.choose_store')
+					}
+					item.page++
+					if (item.page_size == data.length) {
+						item.loadingType = 'loadmore'
+					} else {
+						item.loadingType = 'nomore'
+					}
+			
+				})
+			},
+			close() {
+				this.store_choose_show = false
+			},
+			open() {
+			},
+			choosYg(item) {
+				this.choose_yg = item
+			},
+			//判断是否能预约员工
+			getYgYyTimeArea() {
+				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[0], worktime[1])
+					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++) {
+							if (that.choose_time_detail == data.reserved[i]) {
+								console.log('该员工已有预约')
+								that.cannot('该员工已有预约')
+								break
+							}
+						}
+					}
+			
+				})
+			},
 		}
 	}
 </script>
@@ -220,6 +488,9 @@
 		width: 750rpx;
 		height: 216rpx;
 		white-space: nowrap;
+	
+	
+	
 		.zp-item {
 			display: inline-block;
 			margin-right: 15rpx;
@@ -229,6 +500,7 @@
 			// background: #E02020;
 			background-color: #fff;
 			border-radius: 10rpx;
+	
 			.zp-logo {
 				display: block;
 				width: 106rpx;
@@ -237,7 +509,9 @@
 				border-radius: 50%;
 				background-color: #999999;
 			}
+	
 			.zp-name {
+				margin-top: 15rpx;
 				width: 100%;
 				text-align: center;
 				font-size: 30rpx;
@@ -245,6 +519,15 @@
 				color: #333333;
 			}
 		}
+	
+		.choose {
+			background-color: #262261 !important;
+	
+			.zp-name {
+				color: #fff !important;
+			}
+	
+		}
 	}
 	.tj-dd {
 		width: 750rpx;
@@ -261,7 +544,8 @@
 			height: 75rpx;
 			line-height: 75rpx;
 			color: #fff;
-			background-color: #d84840;
+			
+			background-color: #999;
 			border-radius: 10rpx;
 			text-align: center;
 			font-size: 28rpx;
@@ -276,4 +560,85 @@
 			font-size: 30rpx;
 		}
 	}
+	// 门店
+	.sc-md {
+		margin: 20rpx auto;
+		width: 712rpx;
+		height: 210rpx;
+		background: #FFFFFF;
+		border-radius: 10rpx;
+	
+		.sc-tip {
+			padding-left: 20rpx;
+			line-height: 70rpx;
+			width: 712rpx;
+			height: 70rpx;
+			background: #e9e8ef;
+			border-radius: 10rpx 10rpx 0px 0px;
+			font-size: 26rpx;
+			font-weight: 500;
+			color: #262261;
+		}
+	
+	
+	}
+	
+	.store-info {
+		display: flex;
+		justify-content: flex-start;
+		align-items: center;
+		height: 140rpx;
+		padding: 0 30rpx 0 20rpx;
+	
+		.store-logo {
+			width: 61rpx;
+			height: 61rpx;
+			background-color: #eee;
+			border-radius: 50%;
+		}
+	
+		.info {
+			flex-grow: 1;
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			padding: 0 40rpx 0 20rpx;
+	
+			.store-name {
+				font-size: 25rpx;
+				font-weight: 500;
+				color: #333333;
+			}
+	
+			.store-address {
+				margin-top: 15rpx;
+				font-size: 22rpx;
+				font-weight: 500;
+				color: #999999;
+			}
+		}
+	
+	}
+	
+	.store-list {
+		min-height: 280rpx;
+		max-height: 450rpx;
+		width: 750upx;
+		padding-top: 1rpx;
+		background-color: #fff;
+	
+		.store-info {
+			width: 712rpx;
+			margin: 20rpx auto;
+			border: 1px solid #aaa;
+			border-radius: 20rpx;
+		}
+	
+		.choose-stroe {
+			border: 2px solid #262261;
+		}
+	}
+	.canpay {
+		background-color: #d84840 !important;
+	}
 </style>

+ 47 - 24
pagesS/goods/xhplist.vue

@@ -12,14 +12,14 @@
 					<view class="gq-list">
 						<view class="gq-item" v-for="item in tabItem.list">
 							<view class="gq-logo">
-								<image src="" mode="" class=""></image>
+								<image :src="item.image" mode="" class=""></image>
 							</view>
 							<view class="info">
 								<view class="info-tit">
 									名称:
 								</view>
 								<view class="info-val">
-									创始人
+									{{item.name}}
 								</view>
 							</view>
 							<view class="info">
@@ -27,7 +27,7 @@
 									ID:
 								</view>
 								<view class="info-val">
-									创始人
+									{{item.id}}
 								</view>
 							</view>
 							<view class="info">
@@ -35,7 +35,7 @@
 									出仓时间:
 								</view>
 								<view class="info-val">
-									创始人
+									{{$utils.formatDate(item.createTime).split(' ')[0]}}
 								</view>
 							</view>
 							<view class="info">
@@ -43,7 +43,7 @@
 									门店:
 								</view>
 								<view class="info-val">
-									创始人
+									{{item.shop_name}}
 								</view>
 							</view>
 							<view class="info">
@@ -51,7 +51,15 @@
 									调拨人:
 								</view>
 								<view class="info-val">
-									创始人
+									{{item.mobile}}
+								</view>
+							</view>
+							<view class="info" v-if="tabCurrentIndex == 1">
+								<view class="info-tit">
+									核销人:
+								</view>
+								<view class="info-val">
+									{{item.write_mobile}}
 								</view>
 							</view>
 						</view>
@@ -72,20 +80,20 @@
 				tabCurrentIndex: 0,
 				height: '',
 				navlist: [{
-						status: 0,
+						status: 1,
 						title: '使用中',
-						list: 10,
+						list: [],
 						page: 1,
-						limit: 10,
+						pageSize: 10,
 						loaded: false,
 						loadingType: 'loadmore'
 					},
 					{
-						status: 1,
+						status: 2,
 						title: '已使用',
 						list: [],
 						page: 1,
-						limit: 10,
+						pageSize: 10,
 						loaded: false,
 						loadingType: 'loadmore'
 					}
@@ -96,7 +104,7 @@
 
 		},
 		onShow() {
-
+			this.loadData()
 		},
 		onReachBottom() {
 
@@ -118,27 +126,42 @@
 		methods: {
 			tabClick(index) {
 				this.tabCurrentIndex = index;
-				this.loadData('tab')
+				this.loadData('tab');
 			},
 			loadData(type) {
-				let that = this
-				let index = that.tabCurrentIndex
-				let item = that.navlist[index]
+				let that = this;
+				let index = that.tabCurrentIndex;
+				let item = that.navlist[index];
 				if (type == 'reload') {
-					item.loaded = false
-					item.loadingType = 'loadmore'
-					item.page = 1
-					item.list = []
+					item.loaded = false;
+					item.loadingType = 'loadmore';
+					item.page = 1;
+					item.list = [];
+					
 				}
 				if (type == 'tab' && item.loaded) {
-					return
+					return;
 				}
 				if (item.loadingType == 'loading' || item.loadingType == 'nomore') {
-					return
+					return;
 				}
 
-				item.loadingType = 'loading'
-
+				item.loadingType = 'loading';
+				that.$u.api.getXhpList({
+					page: item.page, //分页页码,数字类型
+					pageSize: item.pageSize,
+					status: item.status, //状态 1正常0禁用
+				}).then(({data})=> {
+					console.log(data);
+					item.list = item.list.concat(data);
+					item.page++;
+					if(data.length == item.pageSize) {
+						item.loadingType = 'loadmore';
+					}else {
+						item.loadingType = 'nomore';
+					}
+					item.loaded = true;
+				})
 
 			},
 		}

+ 31 - 33
pagesS/goods/yygoods.vue

@@ -2,10 +2,10 @@
 	<view class="content">
 		<checkbox-group>
 			<view class="good" v-for="item in list">
-				<image src="" mode="" class="good-img"></image>
+				<image :src="item.image" mode="" class="good-img"></image>
 				<view class="good-info">
 					<view class="good-tit clamp2">
-						涅槃旗下官方正品线雕提拉术
+						{{item.name}}
 					</view>
 					<view class="good-tip">
 						随时随地 预约服务
@@ -14,7 +14,7 @@
 						已售1000件
 					</view>
 					<view class="good-price">
-						34 <text class="ot-price"></text>
+						{{item.price}} <text class="ot-price">¥{{item.ot_price}}</text>
 					</view>
 				</view>
 				<checkbox :checked="item.isCheck" class="good-check" :value="item.id" @click="changeCheck(item)"/>
@@ -36,38 +36,24 @@
 			return {
 				loadingType: 'loadmore',
 				page: 1,
-				limit: 10,
+				pageSize: 10,
 				loaded: false,
-				list: [
-					{
-						id:1,
-						isCheck: false
-					},
-					{
-						id:2,
-						isCheck: false
-					},
-					{
-						id:2,
-						isCheck: false
-					},
-					{
-						id:2,
-						isCheck: false
-					},
-					
-					{
-						id:2,
-						isCheck: false
-					}
-				]
+				list: []
+			}
+		},
+		computed: {
+			chooseList() {
+				let arr =  this.list.filter((item)=> {
+					return item.isCheck == true
+				})
+				return arr
 			}
 		},
 		onLoad() {
 
 		},
 		onShow() {
-			// this.getList()
+			this.getList()
 		},
 		onReachBottom() {
 			// this.getList()
@@ -77,10 +63,14 @@
 		},
 		methods: {
 			addGood() {
+				
+				this._prePage().xmlist = this.chooseList
+				console.log(this.chooseList)
 				uni.navigateBack()
 			},
 			changeCheck(item) {
 				item.isCheck = !item.isCheck
+				
 				console.log(this.list)
 			},
 			getList() {
@@ -90,17 +80,21 @@
 				}
 				that.loadingType = 'loading'
 				
-				getYyGoods({
+				this.$u.api.getYyItemList({
 					page: that.page,
-					limit: that.limit,
+					pageSize: that.pageSize,
 				}).then(res => {
-					that.list = that.list.concat(res.data.list)
+					that.list = that.list.concat(res.data.map(item => {
+						item.isCheck = false
+						return item
+					}))
 					that.page++
-					if(that.limit == res.data.list.length ) {
+					if(that.pageSize == res.data.length ) {
 						that.loadingType = 'loadmore'
 					}else {
 						that.loadingType = 'nomore'
 					}
+					that.loaded = true
 				})
 			}
 		}
@@ -164,7 +158,11 @@
 					color: #fd463e;
 				}
 				text {
-					
+					padding-left: 15rpx;
+					font-size: 26rpx;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #999999;
 				}
 			}
 		}

+ 112 - 222
pagesS/order/addorder.vue

@@ -1,63 +1,32 @@
 <template>
 	<view class="content">
-		<view class="navbar">
-			<view v-for="(item, index) in navlist" :key="index" class="nav-item"
-				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.title }}</view>
-		</view>
-		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300" disable-touch>
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navlist" :key="tabIndex">
-				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData" :style="{ height: height }">
-					<!-- 空白页 -->
-					<u-empty text="暂无数据" mode="list" v-if="tabItem.loaded && tabItem.list.length == 0"></u-empty>
-
-					<!-- 订单列表 -->
-					<view class="good" v-for="item in tabItem.list">
-						<image src="" mode="" class="good-img"></image>
-						<view class="good-info">
-							<view class="good-tit clamp2">
-								涅槃旗下官方正品线雕提拉术
-							</view>
-							<view class="good-tip">
-								随时随地 预约服务
-							</view>
-							<view class="good-buy">
-								已售1000件
-							</view>
-							<view class="good-price">
-								34 <text class="ot-price"></text>
-							</view>
-						</view>
-						<view class="add-jian-wrap">
-							<image src="../../static/img/jian.png" mode="" v-if="nun > 0" @click="jian()"></image>
-							<input type="number" class="input" v-model="nun" v-if="nun > 0" disabled>
-							<image src="../../static/img/add.png" mode="" @click="add()"></image>
-						</view>
+		<checkbox-group>
+			<view class="good" v-for="item in list">
+				<image :src="item.image" mode="" class="good-img"></image>
+				<view class="good-info">
+					<view class="good-tit clamp2">
+						{{item.name}}
 					</view>
-					<u-loadmore :status="tabItem.loadingType" />
-					<view class="tc" style="height: 100rpx;"></view>
-					
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-		<view class="sub-btn">
-			<view class="sub-info">
-				合计:<input type="number" >
-			</view>
-			<view class="sub" @click="sub">
-				结算(2)
+					<view class="good-tip">
+						随时随地 预约服务
+					</view>
+					<view class="good-buy">
+						已售{{item.sold}}件
+					</view>
+					<view class="good-price">
+						{{item.price}} <text class="ot-price">¥{{item.ot_price}}</text>
+					</view>
+				</view>
+				<checkbox :checked="item.isCheck" class="good-check" :value="item.id" @click="changeCheck(item)"/>
 			</view>
+		</checkbox-group>
+			<u-loadmore :status="loadingType" />
+		<view class="" style="height: 120rpx;">
+			
+		</view>
+		<view class="sub-btn" @click="addGood">
+			确认添加
 		</view>
-		<u-modal
-			v-model="tip_show"
-			@confirm="ok()"
-			@cancel="cancel()"
-			:show-cancel-button="true"
-			cancel-text="取消"
-			confirm-text="确认"
-			content="确认添加这些商品吗"
-			title="确认"
-			confirm-color="#FF5454"
-		></u-modal>
 	</view>
 </template>
 
@@ -65,140 +34,99 @@
 	export default {
 		data() {
 			return {
-				tip_show: false,
-				nun: 0,
-				height: '',
-				tabCurrentIndex: 0,
-				navlist: [{
-						status: 0,
-						title: '服务项目',
-						list: 10,
-						page: 1,
-						limit: 10,
-						loaded: false,
-						loadingType: 'loadmore'
-					},
-					{
-						status: 1,
-						title: '实体商品',
-						list: [],
-						page: 1,
-						limit: 10,
-						loaded: false,
-						loadingType: 'loadmore'
-					}
-				]
+				loadingType: 'loadmore',
+				page: 1,
+				pageSize: 10,
+				loaded: false,
+				list: [],
+				id: '',
+			}
+		},
+		computed: {
+			chooseList() {
+				let arr =  this.list.filter((item)=> {
+					return item.isCheck == true
+				})
+				return arr
+			},
+			choose_id() {
+				let dd = ''
+				if(this.chooseList.length > 0) {
+					this.chooseList.forEach(item => {
+						dd = dd + item.id + ','
+					})
+					
+				}
+				return dd
 			}
 		},
 		onLoad(opt) {
-
+			this.id = opt.id
 		},
 		onShow() {
-
+			this.getList()
 		},
 		onReachBottom() {
-
+			// this.getList()
 		},
 		onReady() {
-			var _this = this;
-			uni.getSystemInfo({
-				success: resu => {
-					const query = uni.createSelectorQuery();
-					query.select('.swiper-box').boundingClientRect();
-					query.exec(function(res) {
-						_this.height = resu.windowHeight - res[0].top + 'px';
-						console.log('打印页面的剩余高度', _this.height);
-					});
-				},
-				fail: res => {}
-			});
+
 		},
 		methods: {
-			// 减少商品
-			jian() {
-				this.nun--
-			},
-			// 增加商品
-			add() {
-				this.nun++
+			addGood() {
+				if(this.choose_id == '') {
+					this.$u.toast('请选择要添加的项目');
+				}
+				let res = {
+					"id": this.id, //id
+					"projectId": this.choose_id.slice(0,this.choose_id.length-1), //项目id
+					}
+				// console.log(res,'tijiao')
+				this.$u.api.addProject(res).then(({data}) => {
+					this.$u.toast('添加成功');
+					setTimeout(()=> {
+						uni.navigateBack()
+					},1000)
+				})
+				
 			},
-			//顶部tab点击
-			tabClick(index) {
-				this.tabCurrentIndex = index;
-				// this.loadData('tab')
+			changeCheck(item) {
+				item.isCheck = !item.isCheck
+				
+				console.log(this.list)
 			},
-			// 获取数据
-			loadData(type) {
+			getList() {
 				let that = this
-				let index = that.tabCurrentIndex
-				let item = that.navlist[index]
-				if (type == 'reload') {
-					item.loaded = false
-					item.loadingType = 'more'
-					item.page = 1
-					item.list = []
-				}
-				if (type == 'tab' && item.loaded) {
-					return
-				}
-				if (item.loadingType == 'loading' || item.loadingType == 'noMore') {
+				if(that.loadingType == 'nomore' || that.loadingType == 'loading') {
 					return
 				}
-
-				item.loadingType = 'loading'
-
-
-			},
-			sub() {
-				this.tip_show = true
-			},
-			ok() {
-				
-			},
-			cancel() {
+				that.loadingType = 'loading'
 				
+				this.$u.api.getYyItemList({
+					page: that.page,
+					pageSize: that.pageSize,
+				}).then(res => {
+					that.list = that.list.concat(res.data.map(item => {
+						item.isCheck = false
+						return item
+					}))
+					that.page++
+					if(that.pageSize == res.data.length ) {
+						that.loadingType = 'loadmore'
+					}else {
+						that.loadingType = 'nomore'
+					}
+					that.loaded = true
+				})
 			}
 		}
 	}
 </script>
 
 <style lang="scss">
-	.navbar {
-		display: flex;
-		height: 88rpx;
-		padding: 0 5px;
-		background: #fff;
-		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-		position: relative;
-		z-index: 10;
-
-		.nav-item {
-			flex: 1;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			height: 100%;
-			font-size: 15px;
-			color: #999999;
-			position: relative;
-
-			&.current {
-				color: #FD463E;
-
-				&:after {
-					content: '';
-					position: absolute;
-					left: 50%;
-					bottom: 0;
-					transform: translateX(-50%);
-					width: 44px;
-					height: 0;
-					border-bottom: 2px solid #FD463E;
-				}
-			}
-		}
+	.content {
+		padding-top: 1rpx;
 	}
-
 	.good {
 		width: 690rpx;
 		margin: 20rpx auto;
@@ -208,31 +136,6 @@
 		background-color: #fff;
 		border-radius: 20rpx;
 		position: relative;
-		.add-jian-wrap {
-			position: absolute;
-			// top: ;
-			bottom: 30rpx;
-			right: 50rpx;
-			width: 150rpx;
-			height: 44rpx;
-			display: flex;
-			align-items: center;
-			justify-content: flex-end;
-			image {
-				width: 44rpx;
-				height: 44rpx;
-				flex-shrink: 0;
-			}
-			.input {
-				// display: flex;
-				text-align: center;
-				line-height: 44rpx;
-				flex-grow: 1;
-				font-size: 36rpx;
-				font-weight: bold;
-				color: #333333;
-			}
-		}
 		.good-check {
 			position: absolute;
 			bottom: 20rpx;
@@ -277,43 +180,30 @@
 					color: #fd463e;
 				}
 				text {
-					
+					padding-left: 15rpx;
+					font-size: 26rpx;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #999999;
 				}
 			}
-			
 		}
 		
 	}
 	.sub-btn {
-		width: 750rpx;
-		height: 100rpx;
-		background: #FFFFFF;
+		width: 616rpx;
+		height: 74rpx;
+		background: #4D74CF;
+		border-radius: 15rpx;
+		font-size: 30rpx;
+		font-weight: bold;
+		color: #FFFFFF;
+		text-align: center;
+		line-height: 74rpx;
 		position: fixed;
-		bottom: 0;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		padding: 0 30rpx;
-		.sub-info {
-			display: flex;
-			justify-content: flex-start;
-			align-items: center;
-			input {
-				color: #FF4C4C;
-				font-size: 32rpx;
-				font-weight: bold;
-			}
-		}
-		.sub {
-			width: 220rpx;
-			height: 80rpx;
-			line-height: 80rpx;
-			background: #FF4C4C;
-			border-radius: 40rpx;
-			font-size: 32rpx;
-			font-weight: bold;
-			color: #FFFFFF;
-			text-align: center;
-		}
+		bottom: 45rpx;
+		left: 0;
+		right: 0;
+		margin: auto;
 	}
-</style>
+</style>

+ 67 - 24
pagesS/order/allorder.vue

@@ -11,49 +11,51 @@
 					<u-empty text="暂无数据" mode="list" v-if="tabItem.loaded && tabItem.list.length == 0"></u-empty>
 
 					<!-- 订单列表 -->
-					<view class="dd-wrap" v-for="item in tabItem.list" :key="item">
+					<view class="dd-wrap" v-for="yyitem in tabItem.list" @click="goPage('/pagesS/order/orderinfo?id=' + yyitem.id)">
 						<view class="dd-id-status">
 							<view class="dd-stata">
-								待服务
+								{{yyitem.status == 1 ?'已完成': '待服务'}}
 							</view>
 							<view class="dd-id">
-								ddddadfasfdasdf-adfas
+								{{yyitem.order_id}}
 							</view>
 							<view class="dd-status">
 								已预约
 							</view>
 						</view>
 						<view class="dd-info" style="margin-top: 20rpx;">
-							客服名称<text>小圆</text>
+							客户名称<text>{{yyitem.customer}}</text>
 						</view>
 						<view class="dd-info">
-							下单时间<text>2022-11-03 9:30~10:30</text>
+							下单时间<text>{{$utils.formatDate(yyitem.createTime)}}</text>
 						</view>
 						<view class="dd-info">
-							预约时间<text class="chs" style="color:#FF5600;">2022-11-03 9:30~10:30</text>
+							预约时间<text class="chs" style="color:#FF5600;">{{$utils.formatDate(yyitem.time)}}</text>
 						</view>
 						<view class="dd-btm">
 							<view class="btm-price">
-								订单金额: <text>¥2400</text>
+								订单金额: <text>¥{{yyitem.to_price}}</text>
 							</view>
-							<view class="btm-btn btm-btn-lx">
+							<view class="btm-btn btm-btn-lx" @click.stop="goCall(yyitem.customer_mobile)">
 								联系客户
 							</view>
-							<view class="btm-btn btm-btn-sm">
-								扫码完成
+							<view class="btm-btn btm-btn-sm" @click.stop="wcdd(yyitem)" v-if="yyitem.status == 0">
+								完成订单
 							</view>
 						</view>
-						<!-- <view class="add-dd">
+						<view class="add-dd" @click.stop="goPage('/pagesS/order/addorder?id=' + yyitem.id)" v-if="yyitem.status == 0">
 							<image src="../../static/img/add-dd.png" mode=""></image>
 							<view class="">
 								添加项目
 							</view>
-						</view> -->
+						</view>
 					</view>
 					<u-loadmore :status="tabItem.loadingType" />
 				</scroll-view>
 			</swiper-item>
 		</swiper>
+		<u-modal :show-cancel-button="true" confirm-color="#3b73de" v-model="modal_show" :content="content"
+			@confirm="confirmEdit" @cancel="cancelEdit"></u-modal>
 	</view>
 </template>
 
@@ -61,43 +63,46 @@
 	export default {
 		data() {
 			return {
+				modal_show: false,
+				content: '确认订单已完成?',
 				height: '',
 				tabCurrentIndex: 0,
 				navlist: [{
-						status: 0,
+						status: '',
 						title: '全部',
-						list: 10,
+						list: [],
 						page: 1,
-						limit: 10,
+						pageSize: 10,
 						loaded: false,
 						loadingType: 'loadmore'
 					},
 					{
-						status: 1,
+						status: 2,
 						title: '待服务',
 						list: [],
 						page: 1,
-						limit: 10,
+						pageSize: 10,
 						loaded: false,
 						loadingType: 'loadmore'
 					},
 					{
-						status: 2,
+						status: 3,
 						title: '已完成',
 						list: [],
 						page: 1,
-						limit: 10,
+						pageSize: 10,
 						loaded: false,
 						loadingType: 'loadmore'
 					}
-				]
+				],
+				wcid: '',
 			}
 		},
 		onLoad(opt) {
 
 		},
 		onShow() {
-
+			this.loadData()
 		},
 		onReachBottom() {
 
@@ -117,10 +122,32 @@
 			});
 		},
 		methods: {
+			goCall(phone) {
+				uni.makePhoneCall({
+					phoneNumber:phone+''
+				})
+			},
+			wcdd(item) {
+				this.wcid = item.id
+				this.modal_show = true
+			},
+			confirmEdit(e) {
+				// console.log(e,'确认')
+				this.$u.api.completeYy({
+					id: this.wcid
+				}).then(({data})=> {
+					this.$u.toast('订单完成');
+					this.loadData('reload')
+				})
+			},
+			cancelEdit(e) {
+				// console.log(e,'失败')
+				this.wcid = ''
+			},
 			//顶部tab点击
 			tabClick(index) {
 				this.tabCurrentIndex = index;
-				// this.loadData('tab')
+				this.loadData('tab')
 			},
 			// 获取数据
 			loadData(type) {
@@ -136,12 +163,28 @@
 				if (type == 'tab' && item.loaded) {
 					return
 				}
-				if (item.loadingType == 'loading' || item.loadingType == 'noMore') {
+				if (item.loadingType == 'loading' || item.loadingType == 'nomore') {
 					return
 				}
 
 				item.loadingType = 'loading'
-
+				that.$u.api.getYgYyList({
+					page: item.page, //分页页码,数字类型
+					pageSize: item.pageSize,
+					name: "", //搜索条件
+					type: item.status
+				}).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
+				})
 
 			},
 		}

+ 246 - 4
pagesS/order/orderinfo.vue

@@ -1,6 +1,87 @@
 <template>
 	<view class="content">
-		
+		<view class="" style="background-color: #4076d6;height: 100rpx;">
+			
+		</view>
+		<view class="good-info-wrap">
+			<view class="good-list">
+				<!-- 商品详情 -->
+				<view class="good-wrap">
+					<view class="good" v-for="goodsitem in order_detail.project">
+						<image :src="goodsitem.image" mode="" class="good-img"></image>
+						<view class="good-info">
+							<view class="good-name clamp2">
+								{{goodsitem.name}}
+							</view>
+							<view class="good-price">
+								{{goodsitem.price}}
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="mjly">
+				<view class="ly-left">
+					买家留言
+				</view>
+				<view class="ly-right">
+					{{order_detail.remarks || '无'}}
+				</view>
+			</view>
+			<view class="mjly" v-if="order_detail.staff">
+				<view class="ly-left">
+					预约员工
+				</view>
+				<view class="ly-right">
+					{{order_detail.staff.staffName || ''}}
+				</view>
+			</view>
+			<view class="mjly">
+				<view class="ly-left">
+					预约时间
+				</view>
+				<view class="ly-right">
+					{{$utils.formatDate(order_detail.time)}}
+				</view>
+			</view>
+			<view class="mjly">
+				<view class="ly-left">
+					商品总价
+				</view>
+				<view class="ly-right">
+					¥{{order_detail.to_price}}
+				</view>
+			</view>
+			<view class="mjly">
+				<view class="ly-left">
+					优惠金额
+				</view>
+				<view class="ly-right">
+					¥{{order_detail.discount_price}}
+				</view>
+			</view>
+			<view class="mjly">
+				<view class="ly-left">
+					实际支付
+				</view>
+				<view class="ly-right">
+					¥{{order_detail.pay_price}}
+				</view>
+			</view>
+		</view>
+		<view class="btm" v-if="order_detail.id">
+			<view class="btn" @click="goCall()">
+				联系客户
+			</view>
+			<view class="btn" @click="goPage('/pagesS/order/addorder?id=' + order_detail.id)" v-if="order_detail.status == 0">
+				添加项目
+			</view>
+			<view class="btn" @click="wcdd()" v-if="order_detail.status == 0">
+				完成订单
+			</view>
+		</view>
+		<u-modal :show-cancel-button="true" confirm-color="#3b73de" v-model="modal_show" :content="content"
+			@confirm="confirmEdit" @cancel="cancelEdit"></u-modal>
 	</view>
 </template>
 
@@ -8,14 +89,18 @@
 	export default {
 		data() {
 			return {
+				order_detail: {},
+				modal_show: false,
+				content: '确认订单已完成?',
 				
 			}
 		},
 		onLoad(opt) {
-	
+			this.id = opt.id
+			
 		},
 		onShow() {
-
+this.getYyOrderDetai()
 		},
 		onReachBottom() {
 
@@ -24,10 +109,167 @@
 			
 		},
 		methods: {
+			goCall() {
+				uni.makePhoneCall({
+					phoneNumber: this.order_detail.customer.mobile
+				})
+			},
+			getYyOrderDetai() {
+				this.$u.api.getYyOrderDetail({
+					id: this.id
+				}).then(({data})=> {
+					this.order_detail = data
+				})
+			},
+			wcdd() {
+				console.log('点击完成');
+				this.modal_show = true
+			},
+			confirmEdit(e) {
+				// console.log(e,'确认')
+				this.$u.api.completeYy({
+					id: this.order_detail.id
+				}).then(({data})=> {
+					this.$u.toast('订单完成');
+					this.getYyOrderDetai()
+				})
+			},
+			cancelEdit(e) {
+				// console.log(e,'失败')
+				// this.wcid = ''
+			},
 		}
 	}
 </script>
 
 <style lang="scss">
-
+.good-info-wrap {
+		margin:-50rpx auto 20rpx;
+		width: 712rpx;
+		min-height: 285rpx;
+		background: #FFFFFF;
+		border-radius: 10rpx;
+		padding:10rpx 20rpx;
+		.good-list {
+			min-height: 177rpx;
+			width: 100%;
+			
+			.good-wrap {
+				min-height: 177rpx;
+				.good {
+					height: 177rpx;
+					border-bottom: 1px solid #f7f8fa;
+					display: flex;
+					justify-content: flex-start;
+					align-items: center;
+					.good-info {
+						height: 177rpx;
+						width: 365rpx;
+						padding:25rpx 0 25rpx 20rpx;
+						display: flex;
+						flex-direction: column;
+						justify-content: space-between;
+						align-items: flex-start;
+						.good-name {
+							font-size: 26rpx;
+							font-weight: 500;
+							color: #333333;
+						}
+						.good-price {
+							margin-top: 20rpx;
+							font-size: 34rpx;
+							font-weight: bold;
+							color: #CE372E;
+							&::before {
+								content: '¥';
+								font-size: 24rpx;
+								color: #CE372E;
+							}
+						}
+					}
+					.good-img {
+						width: 133rpx;
+						height: 133rpx;
+						border-radius: 10rpx;
+						background-color: #eee;
+					}
+				}
+			}
+			.empty {
+				// display: ;
+				font-size: 28rpx;
+				height: 177rpx;
+				background-color: #ecf1f7;
+				text-align: center;
+				line-height: 177rpx;
+				color: #4472bd;
+				border-radius: 10rpx;
+			}
+		}
+		
+	}
+	.mjly {
+		height: 100rpx;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		font-size: 26rpx;
+		.ly-left {
+			font-weight: 500;
+			color: #000;
+			
+		}
+		.ly-right {
+			width: 400rpx;
+			text-align: right;
+		}
+		image {
+			width: 15rpx;
+			height: 28rpx;
+		}
+	}
+	.sc-md {
+		margin: 20rpx auto;
+		width: 712rpx;
+		height: 210rpx;
+		background: #FFFFFF;
+		border-radius: 10rpx;
+	
+		.sc-tip {
+			padding-left: 20rpx;
+			line-height: 70rpx;
+			width: 712rpx;
+			height: 70rpx;
+			background: #e9e8ef;
+			border-radius: 10rpx 10rpx 0px 0px;
+			font-size: 26rpx;
+			font-weight: 500;
+			color: #262261;
+		}
+	
+	
+	}
+	.btm {
+		width: 750rpx;
+		position: fixed;
+		bottom: 0;
+		height: 100rpx;
+		display: flex;
+		justify-content: flex-end;
+		padding: 0 34rpx;
+		align-items: center;
+		background-color: #fff;
+		.btn {
+			width: 157rpx;
+			height: 60rpx;
+			background: #4076D6;
+			border-radius: 30rpx;
+			font-size: 26rpx;
+			font-weight: 500;
+			color: #FFFFFF;
+			text-align: center;
+			line-height: 60rpx;
+			margin-left: 10rpx;
+		}
+	}
 </style>

+ 264 - 71
pagesS/yg/dkdetail.vue

@@ -5,55 +5,57 @@
 				本月统计
 			</view>
 			<view class="top-right">
-				<view class="">
-					{{showdate}}月
+				<view class="select-time">
+					<picker mode="date" @change="bindDateChange" fields="month">
+						<view class="uni-input">{{showdate}}</view>
+					</picker>
+					<image src="../../static/img/downjian.png" mode="widthFix"></image>
 				</view>
-				<!-- <image src="../../static/img/downxia.png" mode=""></image> -->
 			</view>
 		</view>
 		<view class="dk-info">
 			<view class="dk-day big">
 				<view class="dk-left">
-					20
+					{{dk_detail.clock_in}}
 				</view>
 				<view class="dk-center">
 					/
 				</view>
 				<view class="dk-right err">
-					20
+					{{dk_detail.no_clocking}}
 				</view>
 			</view>
 			<view class="dk-tit">
 				<view class="dk-left">
-					正常天
+					需要打卡次
 				</view>
 				<view class="dk-center">
 					/
 				</view>
 				<view class="dk-right">
-					异常天
+					缺卡次
 				</view>
 			</view>
 			<view class="dk-detail">
 				<view class="detail-item green">
 					<view class="">
-						20
+						{{dk_detail.normal}}
 					</view>
 					<view class="item-tit">
-						打卡(次)
+						正常打卡(次)
 					</view>
 				</view>
 				<view class="detail-item">
 					<view class="">
-						20
+						{{dk_detail.early}}
 					</view>
 					<view class="item-tit">
-						未打卡(次)
+						早退(次)
 					</view>
 				</view>
 				<view class="detail-item">
 					<view class="err">
-						20
+						{{dk_detail.late}}
 					</view>
 					<view class="item-tit">
 						迟到(次)
@@ -62,84 +64,79 @@
 			</view>
 		</view>
 		<scroll-view scroll-y="true" class="yg-list" :style="{'height': height}">
-			<template  v-for="item in list">
+			<template v-for="item in list">
 				<view class="yg-wrap">
 					<view class="yg-name">
-						{{item.name}}
+						{{ item.time + ' '+ item.name}}
 					</view>
-					<view class="dk-status" :class="{'err': item.qknum > 0 }" @click="openDetail(item)">
-						{{item.qknum > 0 ? `缺卡${item.qknum}次`: '正常'}}<image :src="item.open? '../../static/img/downup.png': '../../static/img/downxia.png' " mode="" ></image>
+					<view class="dk-status" :class="{'err': item.status == -1 }" @click="openDetail(item)">
+						{{item.status == 0 ? '正常': (item.status == -1 ? '异常': '正常')}}
+						<image :src="item.open? '../../static/img/downup.png': '../../static/img/downxia.png' " mode="">
+						</image>
 					</view>
 				</view>
-				<view class="info-info" v-if="item.open">
-					<view class="base-left">
-						<view class="">
-							08:30
-						</view>
-						<view class="jg">
-							
-						</view>
-						<view class="">
-							17:30
-						</view>
-					</view>
-					<view class="base-right">
-						<view class="right-item up">
-							<view class="item-tit">
-								上班
-							</view>
-							<view class="">
-								考勤机下班打卡(17:02)
+				<template v-if="item.open">
+					<view class="info-info">
+						<view class="base-left">
+							<view class="left-wrap" style="height: 267rpx;" v-for="itemt in item.time_slot">
+								<view class="">
+									{{itemt[0]}}
+								</view>
+								<view class="jg">
+
+								</view>
+								<view class="">
+									{{itemt[1]}}
+								</view>
 							</view>
 						</view>
-						<view class="right-item">
-							<view class="item-tit">
-								下班
-							</view>
-							<view class="">
-								考勤机下班打卡(17:02)
+						<view class="base-right">
+							<view class="right-item" v-for="(clockitem,clockindex) in item.clock"
+								:class="{err: clockitem.timeResult != 'Normal' && clockitem.timeResult != 'wks','hui': clockitem.timeResult== 'wks'}">
+								<view class="item-tit">
+									{{(clockindex%2 == 0) ? '上班':'下班'}}
+								</view>
+								<view class="" v-if="clockitem.timeResult != 'wks'">
+									{{showDkTime(clockitem)}}
+								</view>
 							</view>
 						</view>
 					</view>
-				</view>
+				</template>
+
 			</template>
-			
+
 		</scroll-view>
 	</view>
 </template>
 
 <script>
+	import dkdetailVue from './dkdetail.vue';
 	export default {
 		data() {
 			return {
-				showdate: new Date().getMonth() + 1,
+				id: '',
+				dk_detail: {},
+				showdate: '',
 				height: '',
 				list: [
-					{
-						id: 1,
-						name: '狗强',
-						sstatus: 0,
-						xstatus: 0,
-						open: false,
-						qknum: 0,
-					},
-					{
-						id: 1,
-						name: '狗虎',
-						sstatus: 1,
-						xstatus: 1,
-						qknum: 2,
-						open: false,
-					}
+
 				]
 			}
 		},
-		onLoad() {
+		onLoad(opt) {
 
-		},
-		onShow() {
+			if (opt.type) {
+				this.id = this.$store.state.userInfo.staffId
 
+				console.log(this.$store.state.userInfo)
+				this.getTime()
+			} else {
+				this.id = opt.id
+				this.getTime()
+			}
 		},
+		onShow() {},
 		onReachBottom() {
 
 		},
@@ -157,9 +154,153 @@
 			});
 		},
 		methods: {
+			showDkTime(item) {
+				// Normal:正常
+				// Early:早退
+				// Late:迟到
+				// SeriousLate:严重迟到
+				// Absenteeism:旷工迟到
+				//NotSigned : 未打卡
+				let str = ''
+				switch (item.timeResult) {
+					case 'NotSigned':
+						str = '缺卡'
+						break;
+					case 'Normal':
+						str = '考勤机打卡(' + item.userCheckTime.split(' ')[1] + ')(正常打卡)'
+						break;
+					case 'Early':
+						str = '考勤机打卡(' + item.userCheckTime.split(' ')[1] + ')(早退)'
+						break;
+					case 'Late':
+						str = '考勤机打卡(' + item.userCheckTime.split(' ')[1] + ')(迟到)'
+						break;
+					case 'SeriousLate':
+						str = '考勤机打卡(' + item.userCheckTime.split(' ')[1] + ')(严重迟到)'
+						break;
+					case 'Absenteeism':
+						str = '考勤机打卡(' + item.userCheckTime.split(' ')[1] + ')(旷工迟到)'
+						break;
+					default:
+						str = ''
+						// break;
+				}
+				return str
+			},
 			openDetail(item) {
 				item.open = !item.open
-			}
+			},
+			getTopDetail() {
+				this.$u.api.ExaminationDetails({
+					staffId: this.id,
+					month: this.showdate //选择月份
+				}).then(({
+					data
+				}) => {
+					console.log(data)
+					this.dk_detail = data
+				})
+			},
+			getBtmDetail() {
+				this.$u.api.scheduling_details({
+					month: this.showdate,
+					staffId: this.id,
+				}).then(({
+					data
+				}) => {
+					this.list = []
+					console.log('拿到打卡数据', data)
+					this.list = data.reverse().map(item => {
+						item.open = false
+						let dk = item.time_slot.length
+						let dkLength = dk * 2
+						// 没有开始打卡
+						if (item.status == 0) {
+							try {
+								// console.log(item.clock.length,'item.clock.length')
+								if (item.clock) {
+									if (item.clock.length < dkLength) {
+										for (let i = 0; i < dkLength; i++) {
+											console.log('进入到了这里')
+											if (!item.clock[i]) {
+												item.clock[i] = {
+													baseCheckTime: "",
+													userCheckTime: "",
+													timeResult: "wks"
+												}
+											}
+											console.log(item.clock, 'item.clock')
+										}
+									}
+
+								} else {
+									item.clock = []
+									for (let i = 0; i < dkLength; i++) {
+										item.clock[i] = {
+											baseCheckTime: "",
+											userCheckTime: "",
+											timeResult: "wks"
+										}
+									}
+								}
+
+							} catch (e) {
+								//TODO handle the exception
+								console.log(e, '错误')
+							}
+
+						}
+						// 打卡了但是异常
+						if (item.status == -1) {
+							// 一天全没打卡
+							if (!item.clock) {
+								item.clock = []
+								for (let i = 0; i < dkLength; i++) {
+									item.clock[i] = {
+										baseCheckTime: "",
+										userCheckTime: "",
+										timeResult: "NotSigned"
+									}
+								}
+							}
+							// 打了但没打完
+							if (item.clock.length < dkLength) {
+								for (let i = 0; i < dkLength; i++) {
+									if (!item.clock[i]) {
+										item.clock[i] = {
+											baseCheckTime: "",
+											userCheckTime: "",
+											timeResult: "NotSigned"
+										}
+									}
+
+								}
+							}
+						}
+						if (item.status == 1) {
+
+						}
+						return item
+					})
+					// console.log(res,'data')
+				})
+			},
+			// 选择年月
+			bindDateChange(e) {
+				let time = e.detail.value.split('-')
+				this.showdate = time[0] + '-' + time[1]
+				this.getTopDetail()
+				this.getBtmDetail()
+			},
+			// 获取当前年月
+			getTime() {
+				let date = new Date()
+				let M = (date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : ('0' + (date.getMonth() + 1))
+				console.log(M)
+				this.showdate = date.getFullYear() + '-' + M
+				this.getTopDetail()
+				this.getBtmDetail()
+			},
 		}
 	}
 </script>
@@ -168,6 +309,11 @@
 	.err {
 		color: #E05742;
 	}
+
+	.hui {
+		color: #aaa;
+	}
+
 	.select-top {
 		width: 100%;
 		height: 100rpx;
@@ -205,6 +351,7 @@
 		align-items: center;
 		background-color: #fff;
 		margin-bottom: 20rpx;
+
 		.big {
 			font-size: 46rpx !important;
 			font-weight: 800;
@@ -212,7 +359,7 @@
 			margin-bottom: 10rpx;
 		}
 
-		
+
 
 		.dk-day,
 		.dk-tit {
@@ -263,9 +410,11 @@
 
 		}
 	}
+
 	.yg-list {
 		background-color: #fff;
 		width: 100%;
+
 		.yg-wrap {
 			display: flex;
 			justify-content: space-between;
@@ -276,12 +425,13 @@
 			font-size: 28rpx;
 			font-weight: bold;
 			color: #000000;
-			.yg-name {
-				
-			}
+
+			.yg-name {}
+
 			.dk-status {
 				display: flex;
 				align-items: center;
+
 				image {
 					width: 19rpx;
 					height: 11rpx;
@@ -290,15 +440,18 @@
 			}
 		}
 	}
+
 	.info-info {
-		width:100%;
-		height: 267rpx;
+		width: 100%;
+		// height: 267rpx;
 		background-color: #f8f8f8;
 		display: flex;
+
 		.base-left {
 			flex-shrink: 0;
 			width: 180rpx;
 			height: 100%;
+			// height: 267rpx;
 			display: flex;
 			flex-direction: column;
 			justify-content: center;
@@ -306,6 +459,14 @@
 			font-size: 30rpx;
 			font-weight: 800;
 			color: #000000;
+
+			.left-wrap {
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
+			}
+
 			.jg {
 				width: 5rpx;
 				height: 75rpx;
@@ -313,22 +474,54 @@
 				margin: 20rpx 0;
 			}
 		}
+
 		.base-right {
 			flex-grow: 1;
 			width: 100%;
+
+			.right-wrap {
+				// height: 135rpx;
+			}
+
 			.up {
 				border-bottom: 1px solid #E4E4E4;
 			}
+
 			.right-item {
-				height: 50%;
+				// height: 50%;
+				height: 135rpx;
 				padding-top: 30rpx;
 				font-size: 26rpx;
 				font-weight: 500;
+				border-bottom: 1px solid #E4E4E4;
+
+				&:last-of-type {
+					border-bottom: none;
+				}
+
 				.item-tit {
 					font-size: 30rpx;
 					font-weight: 800;
 				}
+
 			}
 		}
 	}
+
+	.select-time {
+		position: absolute;
+		top: 30rpx;
+		right: 30rpx;
+		font-size: 28rpx;
+		font-weight: 500;
+		color: #000;
+		display: flex;
+		align-items: center;
+		font-weight: bold;
+
+		image {
+			width: 17rpx;
+			margin-left: 10rpx;
+		}
+	}
 </style>

+ 74 - 21
pagesS/yg/dklist.vue

@@ -5,13 +5,15 @@
 				本月统计
 			</view>
 			<view class="top-right">
-				<view class="">
-					{{showdate}}月
+				<view class="select-time">
+					<picker mode="date" @change="bindDateChange" fields="month">
+						<view class="uni-input">{{showdate}}</view>
+					</picker>
+					<image src="../../static/img/downjian.png" mode="widthFix"></image>
 				</view>
-				<!-- <image src="../../static/img/downxia.png" mode=""></image> -->
 			</view>
 		</view>
-		<view class="dk-info">
+		<!-- <view class="dk-info">
 			<view class="dk-day big">
 				<view class="dk-left">
 					20
@@ -60,14 +62,16 @@
 					</view>
 				</view>
 			</view>
-		</view>
+		</view> -->
 		<scroll-view scroll-y="true" class="yg-list" :style="{'height': height}">
-			<view class="yg-wrap" v-for="item in 20">
+			<view class="yg-wrap" v-for="item in list">
 				<view class="yg-name">
-					李丹丹
+					{{item.staffName}}
 				</view>
-				<view class="dk-status" @click="goDetail()">
-					正常<image src="../../static/img/downright.png" mode=""></image>
+				<view class="dk-status" @click="goPage('/pagesS/yg/dkdetail?id=' + item.id)"
+					:class="{'err': item.abnormal != 0}">
+					{{item.abnormal == 0? '正常': '异常'}}
+					<image src="../../static/img/downright.png" mode=""></image>
 				</view>
 			</view>
 		</scroll-view>
@@ -78,15 +82,16 @@
 	export default {
 		data() {
 			return {
-				showdate: new Date().getMonth() + 1,
+				showdate: '',
 				height: '',
+				list: []
 			}
 		},
 		onLoad() {
 
 		},
 		onShow() {
-
+			this.getTime()
 		},
 		onReachBottom() {
 
@@ -105,11 +110,36 @@
 			});
 		},
 		methods: {
-			goDetail() {
-				uni.navigateTo({
-					url: '/pagesS/yg/dkdetail'
+			getKqList() {
+				this.$u.api.getKqList({
+					month: this.showdate //选择月份
+				}).then(({
+					data
+				}) => {
+					console.log(data, 'getKqList')
+					this.list = data
 				})
-			}
+			},
+			// 选择年月
+			bindDateChange(e) {
+				let time = e.detail.value.split('-')
+				this.showdate = time[0] + '-' + time[1]
+				this.getKqList()
+			},
+			// 获取当前年月
+			getTime() {
+				let date = new Date()
+				try {
+					let M = (date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : ('0' + (date.getMonth() + 1))
+					console.log(M)
+					this.showdate = date.getFullYear() + '-' + M
+					this.getKqList()
+				} catch (e) {
+					//TODO handle the exception
+					console.log(e);
+				}
+
+			},
 		}
 	}
 </script>
@@ -143,6 +173,10 @@
 		}
 	}
 
+	.err {
+		color: #E05742;
+	}
+
 	.dk-info {
 		height: 326rpx;
 		width: 100%;
@@ -152,6 +186,7 @@
 		align-items: center;
 		background-color: #fff;
 		margin-bottom: 20rpx;
+
 		.big {
 			font-size: 46rpx !important;
 			font-weight: 800;
@@ -159,9 +194,7 @@
 			margin-bottom: 10rpx;
 		}
 
-		.err {
-			color: #E05742;
-		}
+
 
 		.dk-day,
 		.dk-tit {
@@ -212,9 +245,11 @@
 
 		}
 	}
+
 	.yg-list {
 		background-color: #fff;
 		width: 100%;
+
 		.yg-wrap {
 			display: flex;
 			justify-content: space-between;
@@ -225,12 +260,13 @@
 			font-size: 28rpx;
 			font-weight: bold;
 			color: #000000;
-			.yg-name {
-				
-			}
+
+			.yg-name {}
+
 			.dk-status {
 				display: flex;
 				align-items: center;
+
 				image {
 					width: 11rpx;
 					height: 19rpx;
@@ -239,4 +275,21 @@
 			}
 		}
 	}
+
+	.select-time {
+		position: absolute;
+		top: 30rpx;
+		right: 30rpx;
+		font-size: 28rpx;
+		font-weight: 500;
+		color: #000;
+		display: flex;
+		align-items: center;
+		font-weight: bold;
+
+		image {
+			width: 17rpx;
+			margin-left: 10rpx;
+		}
+	}
 </style>

+ 0 - 139
pagesS/yg/fcxq.vue

@@ -1,139 +0,0 @@
-<template>
-	<view class="content">
-		<view class="order-item" v-for="(item, index) in list" :key="index">
-			<image src="" mode="" class="logo"></image>
-			<view class="title-box">
-				<view class="title clamp2">
-					<!-- <text>{{ item.mark }}</text> -->
-					全勤奖励全勤奖励全勤奖励全勤奖励全勤奖励全勤
-					全勤奖励全勤奖励全勤奖励全勤奖励全勤奖励全勤
-				</view>
-				<view class="time">
-					<!-- <text>{{ item.create_time }}</text> -->
-					458.0
-				</view>
-			</view>
-			<view class="money" @click="goPage('/pagesS/yg/fcxq')">
-				分成:<view>{{ 1 }}</view>
-			</view>
-		</view>
-		<u-loadmore :status="loadingType" />
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				loadingType: 'loadmore',
-				list: 9,
-				page: 1,
-				limit: 10
-			}
-		},
-		onLoad(opt) {
-
-		},
-		onShow() {
-			// this.getData()
-		},
-		onReachBottom() {
-			// this.getData()
-		},
-		onReady() {
-
-		},
-		methods: {
-			getData() {
-				let that = this
-				if (that.loadingType == 'nomore' || that.loadingType == 'loading') {
-					return
-				}
-				that.loadingType = 'loading'
-				getFc({
-
-				}).then(res => {
-
-
-					that.page++
-					if (that.limit == res.data.list.length) {
-						that.loadingType = 'loadmore'
-					} else {
-						that.loadingType = 'nomore'
-					}
-				})
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.order-item {
-		height: 207rpx;
-		width: 100%;
-		background-color: #fff;
-		padding: 30rpx 30rpx;
-		line-height: 1.5;
-		display: flex;
-		align-items: center;
-		border-bottom: 1rpx solid #F0F0F0;
-
-		.logo {
-			flex-shrink: 0;
-			margin-right: 20rpx;
-			width: 147rpx;
-			height: 147rpx;
-			border-radius: 20rpx;
-			background-color: #eee;
-		}
-
-		.title-box {
-			height: 100%;
-			flex-grow: 1;
-			padding-right: 50rpx;
-			display: flex;
-			flex-direction: column;
-			justify-content: space-between;
-			align-items: flex-start;
-
-			.title {
-				font-size: 30rpx;
-				color: #333333;
-			}
-
-			.time {
-				font-size: 36rpx;
-				font-weight: bold;
-				color: #E02020;
-
-				&::before {
-					content: '¥';
-					font-size: 24rpx;
-				}
-			}
-		}
-
-		.money {
-			flex-shrink: 0;
-			padding: 8rpx 12rpx;
-			background: #FEE1D7;
-			border-radius: 5px;
-			color: #fd5b23;
-			font-size: 26rpx;
-			text-align: right;
-			display: flex;
-			align-items: center;
-			justify-content: flex-end;
-
-			image {
-				width: 10rpx;
-				height: 20rpx;
-				margin-left: 15rpx;
-			}
-
-			.status {
-				color: #AEAEAE;
-			}
-		}
-	}
-</style>

+ 40 - 33
pagesS/yg/gqdetail.vue

@@ -8,7 +8,7 @@
 				<image src="../../static/img/downjian.png" mode="widthFix"></image>
 			</view> -->
 			<view class="top-val">
-				300
+				{{userInfo.use_stock|| '0'}}
 			</view>
 			<view class="top-tit">
 				当前股权
@@ -31,16 +31,16 @@
 					累计总股权
 				</view>
 				<view class="sz-val">
-					200
+					{{userInfo.cumulative_stock_right || '0'}}
 				</view>
 			</view>
 			<view class="jg"></view>
 			<view class="sz-item">
 				<view class="sz-tit">
-					业绩股权
+					累计使用股权
 				</view>
 				<view class="sz-val">
-					200
+					{{userInfo.used_stock || '0'}}
 				</view>
 			</view>
 		</view>
@@ -58,17 +58,14 @@
 					<view class="order-item" v-for="(item, index) in tabItem.list" :key="index">
 						<view class="title-box">
 							<view class="title">
-								<!-- <text>{{ item.mark }}</text> -->
-								全勤奖励全勤奖励全勤奖励全勤奖励全勤奖励全勤
+								{{item.mark}}
 							</view>
 							<view class="time">
-								<!-- <text>{{ item.create_time }}</text> -->
-								2022-12-1 09:30
+								{{$utils.formatDate(item.createTime)}}
 							</view>
 						</view>
 						<view class="money">
-							<!-- <view>{{ (item.pm == 0 ? '-' : '+') + item.number }}</view> -->
-							+200
+							{{item.pm == 1? '+': '-'}}{{item.number}}
 						</view>
 					</view>
 					<u-loadmore :status="tabItem.loadingType" />
@@ -83,24 +80,25 @@
 		data() {
 			return {
 				// showdate: '',
+				userInfo: {},
 				tabCurrentIndex: 0,
 				height: '',
 				id: '',
 				navlist: [{
-						status: 0,
+						status: 1,
 						title: '收入',
 						list: [],
 						page: 1,
-						limit: 10,
+						pageSize: 10,
 						loaded: false,
 						loadingType: 'loadmore'
 					},
 					{
-						status: 1,
+						status: 2,
 						title: '扣除',
 						list: [],
 						page: 1,
-						limit: 10,
+						pageSize: 10,
 						loaded: false,
 						loadingType: 'loadmore'
 					}
@@ -108,18 +106,11 @@
 			}
 		},
 		onLoad(opt) {
-			if (opt.id) {
-				this.id = opt.id
-			}
-			if (opt.name) {
-				uni.setNavigationBarTitle({
-					title: opt.name + '的工资'
-				})
-			}
-			// this.getTime()
+
 		},
 		onShow() {
-
+			this.getCustomerInfo()
+			this.loadData()
 		},
 		onReachBottom() {
 
@@ -151,12 +142,15 @@
 
 				this.loadData('reload')
 			},
-			// 获取当前年月
-			// getTime() {
-			// 	let date = new Date()
-			// 	this.showdate = date.getFullYear() + '年' + (date.getMonth() + 1) + '月'
-			// 	this.loadData()
-			// },
+			getCustomerInfo() {
+				this.$u.api.getYgdetail({
+					request_id: this.$store.state.userInfo.staffId
+				}).then(({
+					data
+				}) => {
+					this.userInfo = data
+				})
+			},
 			// 获取数据
 			loadData(type) {
 				let that = this
@@ -164,19 +158,32 @@
 				let item = that.navlist[index]
 				if (type == 'reload') {
 					item.loaded = false
-					item.loadingType = 'more'
+					item.loadingType = 'loadmore'
 					item.page = 1
 					item.list = []
 				}
 				if (type == 'tab' && item.loaded) {
 					return
 				}
-				if (item.loadingType == 'loading' || item.loadingType == 'noMore') {
+				if (item.loadingType == 'loading' || item.loadingType == 'nomore') {
 					return
 				}
 
 				item.loadingType = 'loading'
-
+				that.$u.api.getYgGqList({
+					page: item.page,
+					pageSize: item.pageSize,
+					pm: item.status
+				}).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
+				})
 
 			},
 		}

+ 62 - 12
pagesS/yg/gqtx.vue

@@ -2,14 +2,14 @@
 	<view class="content">
 		<view class="tx-wrap">
 			<view class="tx-tit">
-				提现股权
+				提现股权至提成
 			</view>
 			<input type="digit" v-model="txnum" placeholder="请输入提现股权" class="tx-inp" placeholder-class="tx-inp-p">
 			<view class="gq-detail">
 				<view class="">
-					可提现: (股权)
+					可提现: {{userInfo.use_stock }}(股权)
 				</view>
-				<view class="right" @click="">
+				<view class="right" @click="txnum = userInfo.use_stock">
 					全部提现
 				</view>
 			</view>
@@ -24,14 +24,16 @@
 	export default {
 		data() {
 			return {
-txnum: ''
+				txnum: '',
+				userInfo:{},
+				txloading: 'loading',
 			}
 		},
 		onLoad() {
 
 		},
 		onShow() {
-
+			this.getCustomerInfo()
 		},
 		onReachBottom() {
 
@@ -41,8 +43,50 @@ txnum: ''
 		},
 		methods: {
 			gqtx() {
-				
-			}
+				let that = this
+				if(this.txloading == 'loading') {
+					return
+				}
+				if(this.txnum == '') {
+					return this.$u.toast('请输入提现股权') 
+				}
+				if(this.txnum == 0) {
+					return this.$u.toast('提现股权不能为零') 
+				}
+				if(this.txnum*1 > this.userInfo.use_stock*1) {
+					return this.$u.toast('股权不足') 
+				}
+				this.txloading = 'loading'
+				this.$u.api.txGq({
+					number: this.txnum
+				}).then(({data})=> {
+					// uni.showToast({
+					// 	title:'提现成功',
+					// 	icon: 'success',
+					// 	duration: 2000
+					// }) 
+					// this.getCustomerInfo()
+					this.$u.toast('提现成功') 
+					setTimeout(()=> {
+						that.getCustomerInfo()
+					},1500)
+				}).catch(err => {
+					this.txloading = 'no'
+				})
+			},
+			getCustomerInfo() {
+				this.$u.api.getYgdetail({
+					request_id: this.$store.state.userInfo.staffId
+				}).then(({
+					data
+				}) => {
+					this.userInfo = data
+					if(!this.userInfo.use_stock) {
+						this.userInfo.use_stock = 0
+					}
+					this.txloading = 'no'
+				})
+			},
 		}
 	}
 </script>
@@ -51,6 +95,7 @@ txnum: ''
 	.content {
 		padding-top: 1rpx;
 	}
+
 	.tx-wrap {
 		width: 700rpx;
 		// height: 420rpx;
@@ -58,6 +103,7 @@ txnum: ''
 		margin: 19rpx auto;
 		background-color: #fff;
 		border-radius: 20rpx;
+
 		// display: flex;
 		// flex-direction: color;
 		.tx-tit {
@@ -69,6 +115,7 @@ txnum: ''
 			border-bottom: 1px solid #eee;
 			line-height: 87rpx;
 		}
+
 		.tx-inp {
 			display: block;
 			width: 660rpx;
@@ -80,21 +127,24 @@ txnum: ''
 			border-bottom: 1rpx solid #eee;
 			margin: auto;
 		}
+
 		.tx-inp-p {
 			font-size: 36rpx;
 		}
+
 		.gq-detail {
 			display: flex;
 			justify-content: space-between;
-			padding:20rpx;
+			padding: 20rpx;
 			font-size: 28rpx;
-			.left {
-				
-			}
+
+			.left {}
+
 			.right {
 				color: #d74f3a;
 			}
 		}
+
 		.tx-btn {
 			width: 660rpx;
 			height: 70rpx;
@@ -107,4 +157,4 @@ txnum: ''
 			border-radius: 35rpx;
 		}
 	}
-</style>
+</style>

+ 128 - 31
pagesS/yg/gzdetail.vue

@@ -8,19 +8,31 @@
 				<image src="../../static/img/downjian.png" mode="widthFix"></image>
 			</view>
 			<view class="top-val">
-				300
+				{{yg_detail.reward || '0'}}
 			</view>
 			<view class="top-tit">
-				本月收入
+				当前提成
+			</view>
+			<view class="top-btn">
+				<view class="left" @click="goPage('/pagesS/yg/txxq')">
+					提现记录
+				</view>
+				<view class="center">
+					
+				</view>
+				<view class="right" @click="goPage('/pagesS/yg/gztq?id=' + id)">
+					提成提现
+				</view>
 			</view>
 		</view>
+		
 		<view class="sz-wrap">
 			<view class="sz-item">
 				<view class="sz-tit">
-					上月收入
+					累计收入
 				</view>
 				<view class="sz-val">
-					200
+					{{sr|| '0'}}
 				</view>
 			</view>
 			<view class="jg">
@@ -28,10 +40,10 @@
 			</view>
 			<view class="sz-item">
 				<view class="sz-tit">
-					累计收入
+					累计支出
 				</view>
 				<view class="sz-val">
-					200
+					{{zc || '0'}}
 				</view>
 			</view>
 		</view>
@@ -41,7 +53,8 @@
 		</view>
 		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300" disable-touch>
 			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navlist" :key="tabIndex">
-				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData" :style="{ height: height }">
+				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData"
+					:style="{ height: height }">
 					<!-- 空白页 -->
 					<u-empty text="暂无数据" mode="list" v-if="tabItem.loaded && tabItem.list.length == 0"></u-empty>
 
@@ -50,16 +63,16 @@
 						<view class="title-box">
 							<view class="title">
 								<!-- <text>{{ item.mark }}</text> -->
-								全勤奖励全勤奖励全勤奖励全勤奖励全勤奖励全勤
+								{{item.title}}
 							</view>
 							<view class="time">
 								<!-- <text>{{ item.create_time }}</text> -->
-								2022-12-1 09:30
+								{{$utils.formatDate(item.createTime)}}
 							</view>
 						</view>
 						<view class="money">
 							<!-- <view>{{ (item.pm == 0 ? '-' : '+') + item.number }}</view> -->
-							+200
+							{{tabCurrentIndex == 0? '+': '-'}}{{item.amount}}
 						</view>
 					</view>
 					<u-loadmore :status="tabItem.loadingType" />
@@ -78,39 +91,42 @@
 				height: '',
 				id: '',
 				navlist: [{
-						status: 0,
+						status: 5,
 						title: '收入',
 						list: [],
 						page: 1,
-						limit: 10,
+						pageSize: 10,
 						loaded: false,
 						loadingType: 'loadmore'
 					},
 					{
-						status: 1,
+						status: 4,
 						title: '扣除',
 						list: [],
 						page: 1,
-						limit: 10,
+						pageSize: 10,
 						loaded: false,
 						loadingType: 'loadmore'
 					}
-				]
+				],
+				star: '',
+				end: '',
+				sr: '',
+				zc: '',
+				yg_detail: {}
 			}
 		},
 		onLoad(opt) {
 			if (opt.id) {
 				this.id = opt.id
+			}else {
+				this.id = this.$store.state.userInfo.staffId
 			}
-			if (opt.name) {
-				uni.setNavigationBarTitle({
-					title: opt.name + '的工资'
-				})
-			}
-			this.getTime()
+			
 		},
 		onShow() {
-
+			this.getTime()
+			this.getYgdetail()
 		},
 		onReachBottom() {
 
@@ -139,37 +155,96 @@
 			bindDateChange(e) {
 				let time = e.detail.value.split('-')
 				this.showdate = time[0] + '年' + time[1] + '月'
-
+				this.star =  this.getFirstDayOfMonth(time[0],time[1])
+				this.end =  this.getLastDayOfMonth(time[0],time[1])
 				this.loadData('reload')
 			},
 			// 获取当前年月
 			getTime() {
 				let date = new Date()
 				this.showdate = date.getFullYear() + '年' + (date.getMonth() + 1) + '月'
-				this.loadData()
+				// console.log(this.getFirstDayOfMonth(date.getFullYear(),date.getMonth() + 1),'开始时间')
+				// console.log(this.getLastDayOfMonth(date.getFullYear(),date.getMonth() + 1))
+				this.star = this.getFirstDayOfMonth(date.getFullYear(),date.getMonth() + 1)
+				this.end = this.getLastDayOfMonth(date.getFullYear(),date.getMonth() + 1)
+				this.loadData('reload')
 			},
 			// 获取数据
 			loadData(type) {
 				let that = this
 				let index = that.tabCurrentIndex
 				let item = that.navlist[index]
-				if (type == 'reload') {
+				if (type == 'reload' || type == 'tab') {
 					item.loaded = false
-					item.loadingType = 'more'
+					item.loadingType = 'loadmore'
 					item.page = 1
 					item.list = []
 				}
-				if (type == 'tab' && item.loaded) {
-					return
-				}
-				if (item.loadingType == 'loading' || item.loadingType == 'noMore') {
+				if (item.loadingType == 'loading' || item.loadingType == 'nomore') {
 					return
 				}
 
 				item.loadingType = 'loading'
+				that.$u.api.getYgTc({
+					staffId: that.id,
+					type: item.status,
+					page: item.page,
+					pageSize: item.pageSize,
+					star: that.star,
+					end: that.end //搜索结束时间
+				}).then(res => {
+					item.list = item.list.concat(res.data)
+					item.page++
+					that.sr = res.sr
+					that.zc = res.zc
+					if (item.pageSize == res.data.length) {
+						item.loadingType = 'loadmore'
+					} else {
+						item.loadingType = 'nomore'
+					}
+					item.loaded = true
+				})
 
-
 			},
+			getFirstDayOfMonth(year, month) {
+				// return new Date(year, month-1, 1);
+				let data = new Date(year, month - 1, 1);
+				return data.getTime()/1000
+				// return (
+				// 	data.getFullYear() +
+				// 	"-" +
+				// 	(data.getMonth() + 1 > 9 ?
+				// 		data.getMonth() + 1 :
+				// 		"0" + (data.getMonth() + 1)) +
+				// 	"-" +
+				// 	(data.getDate() > 9 ? data.getDate() : "0" + data.getDate())
+				// );
+			},
+			//结束日期
+			getLastDayOfMonth(year, month) {
+				let data = new Date(year, month, 0);
+				console.log('结束',data.getTime())
+				return data.getTime()/1000
+				// return (
+				// 	data.getFullYear() +
+				// 	"-" +
+				// 	(data.getMonth() + 1 > 9 ?
+				// 		data.getMonth() + 1 :
+				// 		"0" + (data.getMonth() + 1)) +
+				// 	"-" +
+				// 	(data.getDate() > 9 ? data.getDate() : "0" + data.getDate())
+				// );
+			},
+			getYgdetail() {
+				this.$u.api.getYgdetail({
+					request_id: this.id
+				}).then(({data})=> {
+					this.yg_detail = data
+					uni.setNavigationBarTitle({
+						title: this.yg_detail.staffName + '的提成'
+					})
+				})
+			}
 		}
 	}
 </script>
@@ -336,4 +411,26 @@
 		background: #ffffff;
 		height: 100%;
 	}
+	.top-btn {
+		margin-top: 20rpx;
+		width: 100%;
+		display: flex;
+		justify-content: space-between;
+		padding: 0 50rpx;
+		font-size: 30rpx;
+		font-weight: bold;
+		color: #FFFFFF;
+		.right {
+			text-align: right;
+		}
+		.left {
+			text-align: left;
+		}
+		.center {
+			text-align: center;
+		}
+		view {
+			width: 33.3%;
+		}
+	}
 </style>

+ 382 - 171
pagesS/yg/gztq.vue

@@ -1,219 +1,430 @@
 <template>
-	<view class="content">
-
-		<view class="row top">
-			<view class="tit">
-				可提现金额
+	<!-- 申请提现 -->
+	<view class="Withdrawal">
+		<view class="w-view w-channel clearfix" @click="openPay">
+			<view class="float_left">转出方式</view>
+			<view class="float_right">
+				<text v-if="cash_out_form.reflectType">{{ cash_out_form.reflectType }}</text>
+				<text v-else class="w-input-place">请选择</text>
+				<text class="ibonfont ibonjinru"></text>
 			</view>
-			<view class="input price">
-				1000.10
+		</view>
+		<view class="w-view clearfix" v-if="cash_out_form.reflectType">
+			<view class="float_left">姓名</view>
+			<view class="float_right">
+				<input type="text" placeholder-class="w-input-place" placeholder="请输入真实姓名" class="w-input"
+					v-model="cash_out_form.reflectInfo.name" />
 			</view>
 		</view>
-
-		<view class="row top">
-			<view class="tit">
-				提现到
+		<block v-if="cash_out_form.reflectType === '微信钱包'">
+			<view class="w-view clearfix">
+				<view class="float_left">微信账号</view>
+				<view class="float_right">
+					<input placeholder-class="w-input-place" class="w-input" placeholder="请输入微信账号" type="text"
+						v-model="cash_out_form.reflectInfo.account" />
+				</view>
 			</view>
-			<view class="select-time">
-				<picker mode="selector" @change="bindTypeChange" fields="month" :range="typeList" range-key="name">
-					<view class="input" style="min-width: 400rpx;text-align: right;">{{typename}}</view>
-				</picker>
+		</block>
+		<block v-if="cash_out_form.reflectType === '支付宝'">
+			<view class="w-view clearfix">
+				<view class="float_left">支付宝账号</view>
+				<view class="float_right">
+					<input placeholder-class="w-input-place" class="w-input" placeholder="请输入支付宝账号" type="text"
+						v-model="cash_out_form.reflectInfo.account" />
+				</view>
 			</view>
-		</view>
-		<view class="top row">
-			<view class="tit">
-				申请提现金额
+		</block>
+		<block v-if="cash_out_form.reflectType === '银行卡'">
+			<view class="w-view clearfix">
+				<view class="float_left">开户银行</view>
+				<view class="float_right">
+					<input placeholder-class="w-input-place" placeholder="请输入开户银行" class="w-input" type="text"
+						v-model="cash_out_form.reflectInfo.bankName" />
+				</view>
 			</view>
-			<input class="input price" type="digit" v-model="txnum" placeholder="请输入金额" placeholder-class="placeholder" />
-		</view>
-		<view class="gq-detail">
-			<view class="">
-				<!-- 可提现: (股权) -->
+			<view class="w-view clearfix">
+				<view class="float_left">银行卡号</view>
+				<view class="float_right">
+					<input placeholder-class="w-input-place" placeholder="请输入银行卡号" class="w-input" type="number"
+						v-model="cash_out_form.reflectInfo.account" />
+				</view>
 			</view>
-			<view class="right" @click="">
-				全部提现
+			<view class="w-view clearfix">
+				<view class="float_left">确认卡号</view>
+				<view class="float_right"><input placeholder-class="w-input-place" placeholder="请再次输入银行卡号"
+						class="w-input" type="text" v-model="agin_card_num" /></view>
+			</view>
+		</block>
+		<view class="w-view w-money">
+			<view class="w-tit">
+				<text>提现金额</text>
+				<text class="w-tit-r">最少提现金额{{ min_money }}元</text>
+			</view>
+			<view class="w-money-input-view">
+				<text class="rmb-ic">¥</text>
+				<input class="w-money-input" type="number" v-model="cash_out_form.money" />
 			</view>
 		</view>
-		<view class="" style="height: 20rpx;background-color: #f7f7f7;"></view>
-		<view class="row" v-if="type == 'alipay'">
-			<text class="tit">姓名</text>
-			<input class="input" type="text" v-model="ali_people" placeholder="请输入支付宝姓名"
-				placeholder-class="placeholder" />
-		</view>
-		<view class="row" v-if="type == 'alipay'">
-			<text class="tit">支付宝账号</text>
-			<input class="input" type="text" v-model="alipay_code" placeholder="请输入支付宝账号"
-				placeholder-class="placeholder" />
-		</view>
-		<view class="row" v-if="type == 'bank'">
-			<text class="tit">姓名</text>
-			<input class="input" type="text" v-model="bank_people" placeholder="请输入银行卡姓名"
-				placeholder-class="placeholder" />
-		</view>
-		<view class="row" v-if="type == 'bank'">
-			<text class="tit">银行卡号</text>
-			<input class="input" type="text" v-model="bank_code" placeholder="请输入银行卡号"
-				placeholder-class="placeholder" />
-		</view>
-
-		<view class="row" v-if="type == 'bank'">
-			<text class="tit">手机号</text>
-			<input class="input" type="text" v-model="phone" placeholder="请输入银行卡姓名" placeholder-class="placeholder" />
-		</view>
-		<view class="row" v-if="type == 'bank'">
-			<text class="tit">所属银行</text>
-			<input class="input" type="text" v-model="bank_name" placeholder="请输入所属银行"
-				placeholder-class="placeholder" />
+		<view class="clearfix w-tip">
+			<view class="float_left">
+				<text>可提现:¥{{ userInfo.reward }}</text>
+				<!-- <text>(手续费:10%)</text> -->
+			</view>
+			<view class="float_right primary-color" @click="allWitjdrawal">全部提现</view>
 		</view>
-		<view class="sub-btn">
-			提交申请
+		<view class="w-btn w-btn-on" @click="withdrawalsAdd">
+			<u-loading :show="isLoding"></u-loading>
+			<text style="margin-left: 10rpx;">提现</text>
 		</view>
+		<u-popup mode="bottom" v-model="payPop" :border-radius="12">
+			<view class="pay-pop-view">
+				<view class="pay-sel-title clearfix">
+					<text class="float_left">提现方式</text>
+					<text class="float_right ibonfont ibonguanbi1" @click="closePayPop"></text>
+				</view>
+				<view class="pay-ul">
+					<view class="pay-li" @click="paymentChange('微信钱包')">
+						<text class="ibonfont ibonweixinzhifu"></text>
+						<view class="pay-name clearfix">
+							<text class="float_left">微信钱包</text>
+							<text class="float_right ibonfont primary-color"
+								:class="[cash_out_form.reflectType === '微信钱包' ? 'ibonxuanze_xuanzhong' : 'ibonxuanze']"></text>
+						</view>
+					</view>
+					<view class="pay-li" @click="paymentChange('支付宝')">
+						<text class="ibonfont ibonumidd17"></text>
+						<view class="pay-name clearfix">
+							<text class="float_left">支付宝</text>
+							<text class="float_right ibonfont primary-color"
+								:class="[cash_out_form.reflectType === '支付宝' ? 'ibonxuanze_xuanzhong' : 'ibonxuanze']"></text>
+						</view>
+					</view>
+					<view class="pay-li" @click="paymentChange('银行卡')">
+						<text class="ibonfont ibonyinhangqia"></text>
+						<view class="pay-name clearfix">
+							<text class="float_left">银行卡</text>
+							<text class="float_right ibonfont primary-color"
+								:class="[cash_out_form.reflectType === '银行卡' ? 'ibonxuanze_xuanzhong' : 'ibonxuanze']"></text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
 <script>
+	// import { getOpenid } from '@/access/common.js';
 	export default {
 		data() {
 			return {
-				typename: '银行卡',
-				typeList: [{
-						state: 'bank',
-						name: '银行卡'
+				min_money: 1, // 最少提现
+				isLoding: false,
+				payPop: false,
+				cash_out_form: {
+					customerId: '',
+					reflectType: '', //提现方式
+					money: 0, // 输入提现金额
+					reflectInfo: {
+						name: '', // 提现者姓名
+						account: '', // 提现账号
+						bankName: '' //银行名称
 					},
-					{
-						state: 'alipay',
-						name: '支付宝'
-					}
-				],
-				txnum: '',
-				ali_people: '',
-				loading: false,
-				phone: '',
-				weixin_no: '',
-				type: 'bank', //提现方式
-				money: '0.00', //可提现金额
-				freeze: '0.0', //冻结金额
-				withdrawal: '', //提现金额
-				minPrice: '', //最少提现金额
-				aliData: {},
-				bankData: {},
-				weixin: {},
-				alipay_code: '',
-				alipay_name: '',
-				bank_code: '',
-				bank_people: '',
-				bank_name: '',
-				bank_belonging: '',
-				jftype: 0,
-			}
+					remark: ''
+				},
+				agin_card_num: '', //确认卡号
+				userInfo: {},
+				id: '',
+			};
 		},
-		onLoad() {
-
+		onLoad(opt) {
+			this.id = opt.id
+			
 		},
 		onShow() {
-
-		},
-		onReachBottom() {
-
-		},
-		onReady() {
-
+			this.getCustomerInfo();
 		},
 		methods: {
-			bindTypeChange(e) {
-				let index = e.detail.value
-
-				this.typename = this.typeList[index].name
-				this.type = this.typeList[index].state
+			// 获取用户信息
+			getCustomerInfo() {
+				this.$u.api.getYgdetail({
+					request_id: this.id
+				}).then(({
+					data
+				}) => {
+					this.userInfo = data
+				})
+			},
+			// 申请提现
+			withdrawalsAdd() {
+				if (this.cash_out_form.reflectType === '支付宝') {
+					if (!this.$u.trim(this.cash_out_form.reflectInfo.name)) {
+						this.$u.toast('请输入您的真实姓名');
+						return;
+					}
+					if (!this.$u.trim(this.cash_out_form.reflectInfo.account)) {
+						this.$u.toast('请输入您的支付宝账号');
+						return;
+					}
+				} else if (this.cash_out_form.reflectType === '银行卡') {
+					if (!this.$u.trim(this.cash_out_form.reflectInfo.name)) {
+						this.$u.toast('请输入您的真实姓名');
+						return;
+					}
+					if (!this.$u.trim(this.cash_out_form.reflectInfo.bankName)) {
+						this.$u.toast('请选择银行名称');
+						return;
+					}
+					if (!this.$u.trim(this.cash_out_form.reflectInfo.account)) {
+						this.$u.toast('请输入您的银行账号');
+						return;
+					}
+					if (!this.$u.trim(this.agin_card_num)) {
+						this.$u.toast('请再次输入您的银行账号');
+						return;
+					}
+					if (this.agin_card_num !== this.cash_out_form.reflectInfo.account) {
+						this.$u.toast('确认卡号与银行卡号不一致');
+						return;
+					}
+				} else {
+					if (!this.$u.trim(this.cash_out_form.reflectInfo.name)) {
+						this.$u.toast('请输入您的真实姓名');
+						return;
+					}
+					if (!this.$u.trim(this.cash_out_form.reflectInfo.account)) {
+						this.$u.toast('请输入您的微信手机号');
+						return;
+					}
+					if (!this.$u.trim(this.cash_out_form.reflectInfo.account)) {
+						this.$u.toast('请输入您的微信账号');
+						return;
+					}
+				}
+				if (!this.cash_out_form.money) {
+					this.$u.toast('请输入要提现金额');
+					return;
+				}
+				if (Number(this.cash_out_form.money) < this.min_money) {
+					this.$u.toast('最低提现金额为' + this.min_money + '元');
+					return;
+				}
+				if (Number(this.cash_out_form.money) > Number(this.userInfo.reward)) {
+					this.$u.toast('可提现金额不足');
+					return;
+				}
+				let data = {
+					...this.cash_out_form,
+					customerId: this.userInfo.id
+				}
+				this.isLoding = true;
+				this.$u.api
+					.addReflectDetail({
+						...this.cash_out_form,
+						staffId: this.userInfo.id,
+					})
+					.then(res => {
+						this.isLoding = false;
+						this.$u.toast('提现申请成功');
+						setTimeout(res => {
+							// this.goPage('/pages/user/user', 'switchTab');
+							uni.navigateBack()
+						}, 2000);
+					})
+					.catch(res => {
+						this.isLoding = false;
+					});
+			},
+			// 全部提现按钮点击事件
+			allWitjdrawal() {
+				this.cash_out_form.money = this.userInfo.reward;
+			},
+			// 自动提现
+			paymentChange(val) {
+				this.cash_out_form.reflectType = val;
+				this.closePayPop();
+			},
+			closePayPop() {
+				this.payPop = false;
+				this.cash_out_form.reflectInfo.account = '';
+				this.cash_out_form.reflectInfo.bankName = '';
+			},
+			openPay() {
+				this.payPop = true;
 			}
 		}
-	}
+	};
 </script>
 
 <style lang="scss">
-	page {
-		height: auto;
-		min-height: 100%;
-		background-color: #fff;
-	}
+	.Withdrawal {
+		width: 702upx;
+		margin: 20upx auto;
+		padding: 0 24upx 50upx;
+		background-color: #ffffff;
+		font-size: 28upx;
 
-	.row {
-		margin: auto;
-		width: 710rpx;
-		height: 90rpx;
-		display: flex;
-		justify-content: space-between;
-		padding: 0 20rpx;
-		border-bottom: 1rpx solid #eeee;
-		background-color: #fff;
-		align-items: center;
-		font-size: 28rpx;
-		color: #000;
-
-		.tit {
-			width: 200rpx;
-			flex-shrink: 0;
-		}
+		.w-view {
+			border-bottom: 1px solid #f5f5f5;
+			padding: 24upx 0;
 
-		.input {
-			flex-grow: 1;
-			font-size: 28rpx;
-			font-weight: bold;
-		}
+			.ibonjinru {
+				font-size: 28upx;
+				color: #666;
+				height: 32upx;
+				margin-left: 10upx;
+			}
+
+			.w-input {
+				width: 480rpx;
+			}
+
+			.w-input-place {
+				color: #b0b3bf;
+				font-size: 26upx;
+			}
 
-		.placeholder {
-			font-size: 28rpx;
-			color: #999;
+			.w-tit {
+				.w-tit-r {
+					margin-left: 10upx;
+					font-size: 24upx;
+					color: #b0b3bf;
+				}
+			}
 		}
-	}
 
-	.sub-btn {
-		width: 670rpx;
-		line-height: 88rpx;
-		background: #FF4C4C;
-		border-radius: 10rpx;
-		text-align: center;
-		font-size: 32rpx;
-		font-weight: 500;
-		color: #FFFFFF;
-		margin: 120rpx auto 0;
-	}
+		.w-money {
+			.w-money-input-view {
+				padding-top: 40upx;
 
-	.top {
-		height: 110rpx;
+				.rmb-ic {
+					font-size: 60upx;
+					font-weight: bold;
+					display: inline-block;
+					vertical-align: middle;
+					height: 70upx;
+				}
 
-		.tit {
-			font-size: 32rpx;
-			font-weight: 500;
-			color: #333333;
+				.w-money-input {
+					display: inline-block;
+					width: 580upx;
+					height: 70upx;
+					font-size: 60upx;
+					padding-left: 20upx;
+					font-weight: bold;
+					vertical-align: middle;
+					padding-top: 6rpx;
+				}
+			}
 		}
 
-		.price {
-			font-size: 48rpx;
-			font-weight: bold;
-			color: #333333;
-			text-align: right;
+		.w-tip {
+			font-size: 24upx;
+			padding: 20upx 0 50upx;
 		}
-		input {
-			font-size: 42rpx;
-			font-weight: 500;
+
+		.w-btn {
+			margin: 0 auto;
+			width: 660upx;
+			line-height: 70upx;
+			height: 70upx;
+			color: #666;
+			text-align: center;
+			font-size: 28upx;
+			border-radius: 70upx;
+			background-color: #eee;
 		}
 
-		.placeholder {
-			font-size: 32rpx;
-			font-weight: 500;
+		.w-btn-on {
+			color: #fff;
+			background-color: #fe582e;
 		}
 	}
-	.gq-detail {
-		display: flex;
-		justify-content: space-between;
-		padding:20rpx 40rpx;
-		font-size: 28rpx;
-		.left {
-			
+
+	.pay-pop-view {
+		background-color: #ffffff;
+		border-top-left-radius: 12upx;
+		border-top-right-radius: 12upx;
+		padding-bottom: 40upx;
+		font-size: 28upx;
+
+		.pay-sel-title {
+			padding: 0 30upx;
+			line-height: 88upx;
+			font-weight: bold;
+			font-size: 32upx;
+
+			.ibonfont {
+				color: #999;
+				font-weight: 400;
+				width: 50rpx;
+				text-align: center;
+				font-size: 24rpx;
+			}
+		}
+
+		.pay-btn {
+			width: 690upx;
+			height: 80upx;
+			line-height: 80upx;
+			color: #fff;
+			font-size: 32upx;
+			text-align: center;
+			margin: 20upx auto 0;
+			border-radius: 80upx;
 		}
-		.right {
-			color: #d74f3a;
+
+		.pay-ul {
+			.pay-tip {
+				font-size: 24upx;
+				color: #999999;
+				line-height: 32upx;
+				padding: 20upx 30upx 0;
+			}
+
+			.pay-li {
+				line-height: 100upx;
+
+				.ibonfont {
+					padding-left: 30upx;
+					font-size: 46upx;
+					vertical-align: middle;
+					margin-right: 24upx;
+				}
+
+				.ibonweixinzhifu {
+					color: #04be02;
+				}
+
+				.ibonumidd17 {
+					color: #108ee9;
+				}
+
+				.ibonyinhangqia {
+					color: #f2b844;
+				}
+
+				.pay-name {
+					width: 650upx;
+					display: inline-block;
+					padding-right: 30upx;
+					vertical-align: middle;
+					border-bottom: 1px solid #f5f5f5;
+
+					.ibonxuanze,
+					.ibonxuanze_xuanzhong {
+						margin-right: 0;
+						padding-left: 0;
+						font-size: 38upx;
+					}
+				}
+			}
+
+			.pay-li:last-child {
+				.pay-name {
+					border-bottom: 0 none;
+				}
+			}
 		}
 	}
 </style>

+ 2 - 2
pagesS/yg/gztx.vue

@@ -164,14 +164,14 @@
 				let item = that.navlist[index]
 				if (type == 'reload') {
 					item.loaded = false
-					item.loadingType = 'more'
+					item.loadingType = 'loadmore'
 					item.page = 1
 					item.list = []
 				}
 				if (type == 'tab' && item.loaded) {
 					return
 				}
-				if (item.loadingType == 'loading' || item.loadingType == 'noMore') {
+				if (item.loadingType == 'loading' || item.loadingType == 'nomore') {
 					return
 				}
 

+ 38 - 24
pagesS/yg/myteam.vue

@@ -8,7 +8,7 @@
 				<image src="../../static/img/downjian.png" mode="widthFix"></image>
 			</view> -->
 			<view class="top-val">
-				300
+				{{count}}
 			</view>
 			<view class="top-tit">
 				转介绍人数
@@ -47,21 +47,21 @@
 
 					<!-- 订单列表 -->
 					<view class="order-item" v-for="(item, index) in tabItem.list" :key="index">
-						<image src="" mode="" class="logo"></image>
+						<image :src="item.avatar" mode="" class="logo"></image>
 						<view class="title-box">
 							<view class="title">
 								<!-- <text>{{ item.mark }}</text> -->
-								全勤奖励全勤奖励全勤奖励全勤奖励全勤奖励全勤
+								{{item.name}}
 							</view>
 							<view class="time">
 								<!-- <text>{{ item.create_time }}</text> -->
-								2022-12-1 09:30
+								{{$utils.formatDate(item.createTime)}}
 							</view>
 						</view>
-						<view class="money" @click="goPage('/pagesS/yg/fcxq')">
+						<!-- <view class="money" @click="goPage('/pagesS/yg/fcxq')">
 							<view>{{ (item.pm == 0 ? '-' : '+') + 1500 }}</view>
 							<image src="../../static/img/downright.png" mode=""></image>
-						</view>
+						</view> -->
 					</view>
 					<u-loadmore :status="tabItem.loadingType" />
 				</scroll-view>
@@ -74,6 +74,7 @@
 	export default {
 		data() {
 			return {
+				count: 0,
 				showdate: '',
 				tabCurrentIndex: 0,
 				height: '',
@@ -81,9 +82,9 @@
 				navlist: [{
 						status: 0,
 						title: '收入',
-						list: 9,
+						list: [],
 						page: 1,
-						limit: 10,
+						pageSize: 100,
 						loaded: false,
 						loadingType: 'loadmore'
 					},
@@ -92,26 +93,17 @@
 						title: '扣除',
 						list: [],
 						page: 1,
-						limit: 10,
+						pageSize: 100,
 						loaded: false,
 						loadingType: 'loadmore'
 					}
 				]
 			}
 		},
-		onLoad(opt) {
-			if (opt.id) {
-				this.id = opt.id
-			}
-			if (opt.name) {
-				uni.setNavigationBarTitle({
-					title: opt.name + '的工资'
-				})
-			}
-			this.getTime()
-		},
-		onShow() {
+		onLoad(opt) {},
 
+		onShow() {
+			this.loadData()
 		},
 		onReachBottom() {
 
@@ -156,19 +148,35 @@
 				let item = that.navlist[index]
 				if (type == 'reload') {
 					item.loaded = false
-					item.loadingType = 'more'
+					item.loadingType = 'loadmore'
 					item.page = 1
 					item.list = []
 				}
 				if (type == 'tab' && item.loaded) {
 					return
 				}
-				if (item.loadingType == 'loading' || item.loadingType == 'noMore') {
+				if (item.loadingType == 'loading' || item.loadingType == 'nomore') {
 					return
 				}
 
 				item.loadingType = 'loading'
-
+				that.$u.api.referral({
+					page: item.page,
+					pageSize: item.pageSize
+				}).then(res => {
+					that.count = res.count
+					if (res.data.length > 0) {
+						item.list = item.list.concat(res.data)
+					}
+					item.page++
+					item.loaded = true
+					if (item.pageSize == res.data.length) {
+						item.loadingType = 'loadmore'
+					} else {
+						item.loadingType = 'nomore'
+					}
+					that.count = res.count
+				})
 
 			},
 		}
@@ -297,9 +305,11 @@
 		margin-top: 20rpx;
 		padding: 0 20rpx;
 		background-color: #fff;
+
 		.order-item:last-child {
 			margin-bottom: 60rpx;
 		}
+
 		.order-item {
 			width: 100%;
 			// background-color: red;
@@ -308,6 +318,7 @@
 			display: flex;
 			align-items: center;
 			border-bottom: 1rpx solid #F0F0F0;
+
 			.logo {
 				flex-shrink: 0;
 				margin-right: 20rpx;
@@ -316,6 +327,7 @@
 				border-radius: 50%;
 				background-color: #eee;
 			}
+
 			.title-box {
 				flex-grow: 1;
 				padding-right: 50rpx;
@@ -339,11 +351,13 @@
 				display: flex;
 				align-items: center;
 				justify-content: flex-end;
+
 				image {
 					width: 10rpx;
 					height: 20rpx;
 					margin-left: 15rpx;
 				}
+
 				.status {
 					color: #AEAEAE;
 				}

+ 222 - 0
pagesS/yg/setInfo.vue

@@ -0,0 +1,222 @@
+<template>
+	<view class="detail-view">
+		<u-form label-width="140" :model="add_form" ref="uForm">
+			<view class="form-model-view">
+				<u-form-item label-position="top" label="头像" prop="avatar">
+					<upload :images="add_form.avatar ? [add_form.avatar] : []" @handleRemove="imgRemove"
+						@uploadSuccess="uploadSuccess" />
+				</u-form-item>
+				<u-form-item required label="名称" prop="staffName">
+					<u-input v-model="add_form.staffName" placeholder="请输入姓名" />
+				</u-form-item>
+				<!-- <u-form-item required label="UID" prop="staffName">
+					<u-input v-model="add_form.staffName" placeholder="请输入姓名" />
+				</u-form-item> -->
+				<u-form-item label-position="top" label="简介" prop="info">
+					<u-input v-model="add_form.info" type="textarea" placeholder="请输入简介" />
+				</u-form-item>
+			</view>
+		</u-form>
+		<view class="detail-bottom">
+			<view class="handel-btn" @click="submit">提交</view>
+		</view>
+<!-- 		<SelDeparment v-model="show_department" @confirm="departmentConfirm" @cancel="departmentCancel" />
+		<RegionSel v-model="region_show" @confirm="regionConfirm" @cancel="regionCancel" />
+		<u-picker @confirm="birthdayConfirm" mode="time" v-model="time_show"></u-picker> -->
+	</view>
+</template>
+
+<script>
+	import upload from '@/components/qiniu/QiniuUpload.vue';
+	import SelDeparment from '@/components/SelDepartment.vue';
+	import RegionSel from '@/components/region/RegionSel.vue';
+	export default {
+		components: {
+			upload,
+			SelDeparment,
+			RegionSel
+		},
+		data() {
+			return {
+				region_show: false,
+				time_show: false,
+				show_department: false,
+				shopData: '',
+				staffData: '',
+				reservoirData: '',
+				customerTypeData: '',
+				reservoir_name: '',
+				shop_name: '',
+				type_name: '',
+				department_name: '',
+				region_name: '',
+				birthday: '',
+				rules: {
+					staffName: [{
+						required: true,
+						message: '请输入姓名',
+						trigger: 'blur,change'
+					}],
+					avatar: [{
+						required: true,
+						message: '请上传头像',
+						trigger: 'blur,change'
+					}],
+					info: [{
+						required: true,
+						message: '请输入简介',
+						trigger: 'blur,change'
+					}]
+				},
+				isEvidence: '', // 是否必填营业执照
+				add_form: {
+					staffName: '',
+					info: '',
+					avatar: ''
+				},
+				customer_id: ''
+			};
+		},
+		watch: {
+			// reservoirData(val) {
+			// 	if (val) {
+			// 		this.add_form.reservoirId = val.id;
+			// 		this.reservoir_name = val.reservoirName;
+			// 	}
+			// },
+			// shopData(val) {
+			// 	if (val) {
+			// 		this.add_form.shopId = val.id;
+			// 		this.shop_name = val.name;
+			// 	}
+			// },
+			// customerTypeData(val) {
+			// 	if (val) {
+			// 		this.add_form.type = val.id;
+			// 		this.type_name = val.name;
+			// 		this.isEvidence = val.isEvidence;
+			// 	}
+			// },
+			// staffData(val) {
+			// 	if (val) {
+			// 		this.add_form.salesManId = val.id;
+			// 		this.add_form.salesManCode = val.staffCode;
+			// 		this.add_form.salesManName = val.staffName;
+			// 	}
+			// }
+		},
+		onLoad(options) {
+			this.getUserInfo()
+		},
+		methods: {
+			getUserInfo() {
+				this.$u.api.getStaffInfo(this.$store.state.userInfo.staffId).then(({
+					data
+				}) => {
+					this.add_form.info = data.info
+					this.add_form.avatar = data.avatar
+					this.add_form.departmentId = data.departmentId
+					this.add_form.staffName = data.staffName
+					this.add_form.roleId = data.roleId
+					this.add_form.mobile = data.mobile
+					this.add_form.email = data.email
+					this.add_form.staffCode = data.staffCode
+					this.add_form.sex = data.sex
+					this.add_form.age = data.age / 1000
+					this.add_form.education = data.education // 学历
+					this.add_form.departmentPidPath = data.departmentPidPath // 添加部门id的数组
+					this.add_form.rolePidPath = data.rolePidPath // 添加角色id的数组
+					this.add_form.dataField = data.dataField
+				})
+			},
+			// const params = {
+			//   departmentId: this.form.departmentId,
+			//   staffName: this.form.staffName,
+			//   roleId: this.form.roleId,
+			//   mobile: this.form.mobile,
+			//   email: this.form.email,
+			//   staffCode: this.form.staffCode,
+			//   sex: this.form.sex,
+			//   age: this.form.age / 1000,
+			//   education: this.form.education, // 学历
+			//   departmentPidPath: this.form.departmentPidPath, // 添加部门id的数组
+			//   rolePidPath: this.form.rolePidPath, // 添加角色id的数组
+			//   dataField: this.form.dataField,
+			// };
+			// if (this.id) {
+			//   target = await updateStaff(this.id, params);
+			// } else {
+			//   target = await addStaff(params);
+			// }
+			// const data = target;
+
+			submit() {
+				this.$refs.uForm.validate(valid => {
+					if (valid) {
+						this.$u.api.setYgInfo(this.$store.state.userInfo.staffId, {
+								...this.add_form
+							})
+							.then(res => {
+								let userInfo = this.$store.state.userInfo
+								userInfo.name = this.add_form.staffName
+								
+								this.$store.commit('commit_userInfo', userInfo);
+								this.$u.toast('修改成功');
+								setTimeout(res => {
+									uni.navigateBack();
+								}, 1500);
+							});
+					}
+				});
+			},
+			regionConfirm(val) {
+				this.add_form.provinceCode = val[0].value;
+				this.add_form.cityCode = val[1].value;
+				this.add_form.districtCode = val[2].value;
+				// 联系方式
+				this.add_form.contact.provinceCode = val[0].value;
+				this.add_form.contact.cityCode = val[1].value;
+				this.add_form.contact.districtCode = val[2].value;
+				let name = '';
+				val.forEach(item => {
+					name += item.label;
+				});
+				this.region_name = name;
+			},
+			regionCancel(val) {
+				this.region_show = false;
+			},
+			departmentConfirm(val) {
+				this.add_form.departmentId = val[val.length - 1].value;
+				this.department_name = val[val.length - 1].label;
+				this.add_form.salesManId = '';
+				this.add_form.salesManCode = '';
+				this.add_form.salesManName = '';
+			},
+			departmentCancel(val) {
+				this.show_department = false;
+			},
+			openSel(key) {
+				this[key] = true;
+			},
+			// 图片上传成功
+			uploadSuccess(imgUrl) {
+				this.add_form.avatar = imgUrl;
+			},
+			//移除图片
+			imgRemove(arr) {
+				this.add_form.extend.license = '';
+			},
+			birthdayConfirm(val) {
+				this.add_form.birthday = val.timestamp;
+				this.birthday = val.year + '-' + val.month + '-' + val.day;
+			}
+		},
+		// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
+		// onReady() {
+		// 	this.$refs.uForm.setRules(this.rules);
+		// }
+	};
+</script>
+
+<style></style>

+ 272 - 0
pagesS/yg/txxq.vue

@@ -0,0 +1,272 @@
+<template>
+	<view class="content">
+		<view class="navbar">
+			<view v-for="(item, index) in navlist" :key="index" class="nav-item"
+				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.title }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300" disable-touch>
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navlist" :key="tabIndex" :style="{ height: height }">
+				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="getData" :style="{ height: height }">
+					<!-- 空白页 -->
+					<u-empty text="暂无数据" mode="list" v-if="tabItem.loaded && tabItem.list.length == 0"></u-empty>
+
+					<!-- 订单列表 -->
+					<view class="order-item" v-for="(item, index) in tabItem.list" :key="index">
+						<view class="title-box">
+							<view class="title">
+								提现金额:{{(item.money*1).toFixed(2)}}({{item.reflectType}})
+							</view>
+							<view class="title">
+								提现账号:{{item.reflectInfo.name}}({{item.reflectInfo.account}})
+							</view>
+							<view class="time">
+								{{$utils.formatDate(item.createTime)}}
+							</view>
+						</view>
+						<view class="money">
+							{{item.reflectStatus == 3?"无效":(item.reflectStatus == 4?"未打款":"已打款")}}
+						</view>
+					</view>
+					<u-loadmore :status="tabItem.loadingType" v-if="!(tabItem.loaded && tabItem.list.length == 0)"/>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				height: '',
+				tabCurrentIndex: 0,
+				navlist: [{
+						status: 1,
+						title: '未审核',
+						list: [],
+						page: 1,
+						pageSize: 10,
+						loaded: false,
+						loadingType: 'loadmore'
+					},
+					{
+						status: 2,
+						title: '已审核',
+						list: [],
+						page: 1,
+						pageSize: 10,
+						loaded: false,
+						loadingType: 'loadmore'
+					}
+				]
+			}
+		},
+		onLoad(opt) {
+
+		},
+		onShow() {
+			this.getData()
+		},
+		onReachBottom() {
+			// this.getData()
+		},
+		onReady() {
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-box').boundingClientRect();
+					query.exec(function(res) {
+						_this.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		methods: {
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+				this.getData('tab')
+			},
+			getData(type) {
+				let that = this
+				let item = that.navlist[that.tabCurrentIndex]
+				if(type == 'tab') {
+					item.loadingType = 'loadmore'
+					item.list = []
+					item.page = 1
+					item.loaded = false
+				}
+				if (item.loadingType == 'nomore' || item.loadingType == 'loading') {
+					return
+				}
+				item.loadingType = 'loading'
+				that.$u.api.ygTxList({
+					page: item.page,
+					pageSize: item.pageSize,
+					auditStatus: item.status
+				}).then(res => {
+					item.list = item.list.concat(res.data)
+
+					item.page++
+					if (item.limit == res.data.length) {
+						item.loadingType = 'loadmore'
+					} else {
+						item.loadingType = 'nomore'
+					}
+					item.loaded = true
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	// .order-item {
+	// 	height: 207rpx;
+	// 	width: 100%;
+	// 	background-color: #fff;
+	// 	padding: 30rpx 30rpx;
+	// 	line-height: 1.5;
+	// 	display: flex;
+	// 	align-items: center;
+	// 	border-bottom: 1rpx solid #F0F0F0;
+
+	// 	.logo {
+	// 		flex-shrink: 0;
+	// 		margin-right: 20rpx;
+	// 		width: 147rpx;
+	// 		height: 147rpx;
+	// 		border-radius: 20rpx;
+	// 		background-color: #eee;
+	// 	}
+
+	// 	.title-box {
+	// 		height: 100%;
+	// 		flex-grow: 1;
+	// 		padding-right: 50rpx;
+	// 		display: flex;
+	// 		flex-direction: column;
+	// 		justify-content: space-between;
+	// 		align-items: flex-start;
+
+	// 		.title {
+	// 			font-size: 30rpx;
+	// 			color: #333333;
+	// 		}
+
+	// 		.time {
+	// 			font-size: 36rpx;
+	// 			font-weight: bold;
+	// 			color: #E02020;
+
+	// 			&::before {
+	// 				content: '¥';
+	// 				font-size: 24rpx;
+	// 			}
+	// 		}
+	// 	}
+
+	// 	.money {
+	// 		flex-shrink: 0;
+	// 		padding: 8rpx 12rpx;
+	// 		background: #FEE1D7;
+	// 		border-radius: 5px;
+	// 		color: #fd5b23;
+	// 		font-size: 26rpx;
+	// 		text-align: right;
+	// 		display: flex;
+	// 		align-items: center;
+	// 		justify-content: flex-end;
+
+	// 		image {
+	// 			width: 10rpx;
+	// 			height: 20rpx;
+	// 			margin-left: 15rpx;
+	// 		}
+
+	// 		.status {
+	// 			color: #AEAEAE;
+	// 		}
+	// 	}
+	// }
+	.swiper-box {
+		background-color: #fff;
+		.order-item:last-child {
+			margin-bottom: 60rpx;
+		}
+	
+		.order-item {
+			width: 100%;
+			// background-color: red;
+			padding: 20rpx 30rpx;
+			line-height: 1.5;
+			display: flex;
+			align-items: center;
+	
+			.title-box {
+				flex-grow: 1;
+				padding-right: 50rpx;
+	
+				.title {
+					font-size: 30rpx;
+					color: #333333;
+				}
+	
+				.time {
+					font-size: 26rpx;
+					color: #AEAEAE;
+				}
+			}
+	
+			.money {
+				color: #fd5b23;
+				font-size: 26rpx;
+				text-align: right;
+	
+				.status {
+					color: #AEAEAE;
+				}
+			}
+		}
+	}
+
+	.navbar {
+		// margin-top: 20rpx;
+		display: flex;
+		height: 88rpx;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: #999999;
+			position: relative;
+
+			&.current {
+				color: #000;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid #fe5b38;
+				}
+			}
+		}
+	}
+</style>

+ 75 - 29
pagesS/yg/ygdetail.vue

@@ -1,29 +1,30 @@
 <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">
 			<view class="info-line">
 				<view class="left-name">
-					<image src="" mode=""></image>
+					<image src="https://api.liuniukj.com/img/user/ljfw.png" mode=""></image>
 					<view class="">
 						累计服务
 					</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,51 +35,44 @@
 					2年
 				</view>
 
-			</view>
+			</view> -->
 			<view class="info-line" style="height: auto;border-bottom: none;">
 				<view class="left-name">
-					<image src="" mode=""></image>
+					<image src="https://api.liuniukj.com/img/user/ygjj.png" mode=""></image>
 					<view class="">
 						员工简介
 					</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">
-						2022-07-06
+						{{$utils.formatDate(item.createTime)}}
 					</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,29 @@
 	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) {
+			if(opt.type) {
+				this.ygid = this.$store.state.userInfo.staffId
+			}else {
+				this.ygid = opt.id
+				
+			}
+			this.getYgdetail()
+			this.getYgPj()
+			
 		},
 		onShow() {
 
@@ -115,8 +125,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 +314,5 @@
 		}
 	}
 	.swiper-box {
-		background-color: red;
 	}
 </style>

+ 26 - 12
pagesS/yg/yglist.vue

@@ -1,12 +1,12 @@
 <template>
 	<view class="content">
 		<view class="gq-list">
-			<view class="gq-item" v-for="item in list" @click="goDetail()">
+			<view class="gq-item" v-for="item in list" @click="goDetail(item)">
 				<view class="gq-logo">
 					<image src="" mode="" class=""></image>
 				</view>
 				<view class="store-name">
-					阿洋阿强啊
+					{{item.staffName}}
 				</view>
 				<template v-if="type == 'gz'">
 					<view class="info">
@@ -14,15 +14,15 @@
 							电话:
 						</view>
 						<view class="info-val">
-							创始人
+							{{item.mobile}}
 						</view>
 					</view>
 					<view class="info">
 						<view class="info-tit">
-							工资
+							提成
 						</view>
 						<view class="info-val">
-							¥创始人
+							¥{{(item.reward*1).toFixed(2)}}
 						</view>
 					</view>
 				</template>
@@ -32,7 +32,7 @@
 							职务:
 						</view>
 						<view class="info-val">
-							创始人
+							{{item.departmentName}}
 						</view>
 					</view>
 					<view class="info">
@@ -40,7 +40,7 @@
 							工号:
 						</view>
 						<view class="info-val">
-							创始人
+							{{item.staffCode}}
 						</view>
 					</view>
 				</template>
@@ -56,9 +56,9 @@
 			return {
 				loadingType: 'loadmore',
 				type: '',
-				list: 15,
+				list: [],
 				page: 1,
-				limit: 24,
+				pageSize: 24,
 				loaded: false,
 			}
 		},
@@ -105,13 +105,27 @@
 				}
 
 				that.loadingType = 'loading'
-
+					
+					
+				that.$u.api.getYgList({
+					page: that.page,
+					pageSize: that.pageSize
+				}).then(({data}) => {
+					that.list = that.list.concat(data)
+					that.page++
+					if(that.pageSize == data.length) {
+						that.loadingType = 'loadmore'
+					}else {
+						that.loadingType = 'nomore'
+					}
+					that.loaded = true
+				})
 
 			},
-			goDetail() {
+			goDetail(item) {
 				let that = this
 				uni.navigateTo({
-					url: that.type == 'gz' ? '/pagesS/yg/gzdetail': '/pagesS/yg/ygdetail'
+					url: that.type == 'gz' ? ('/pagesS/yg/gzdetail?id=' + item.id): ('/pagesS/yg/ygdetail?id=' + item.id)
 				})
 			}
 		}

+ 346 - 6
pagesS/yg/yjjl.vue

@@ -1,6 +1,76 @@
 <template>
 	<view class="content">
+		<view class="user-top">
+			<!-- <view class="select-time">
+				<picker mode="date" @change="bindDateChange" fields="month">
+					<view class="uni-input">{{showdate}}</view>
+				</picker>
+				<image src="../../static/img/downjian.png" mode="widthFix"></image>
+			</view> -->
+			<view class="top-val">
+				{{userInfo.order_count}}
+			</view>
+			<view class="top-tit">
+				本月订单数量
+			</view>
+		</view>
+		<!-- <view class="sz-wrap">
+			<view class="sz-item">
+				<view class="sz-tit">
+					上月收入
+				</view>
+				<view class="sz-val">
+					200
+				</view>
+			</view>
+			<view class="jg">
 
+			</view>
+			<view class="sz-item">
+				<view class="sz-tit">
+					累计收入
+				</view>
+				<view class="sz-val">
+					200
+				</view>
+			</view>
+		</view> -->
+		<!-- <view class="navbar">
+			<view v-for="(item, index) in navlist" :key="index" class="nav-item"
+				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.title }}</view>
+		</view> -->
+		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300" disable-touch>
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navlist" :key="tabIndex">
+				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<u-empty text="暂无数据" mode="list" v-if="tabItem.loaded && tabItem.list.length == 0"></u-empty>
+
+					<!-- 订单列表 -->
+					<view class="order-item" v-for="(item, index) in tabItem.list" :key="index">
+						<image src="https://api.liuniukj.com/img/admin/ywc.png" mode="" class="logo"  v-if="userInfo.order_count*1 >= item.number*1"></image>
+						<image src="https://api.liuniukj.com/img/admin/dwc.png" mode="" class="logo" v-else></image>
+						<!-- <image src="" mode="" class="logo"></image> -->
+						<view class="title-box">
+							<view class="title">
+								<!-- <text>{{ item.mark }}</text> -->
+								{{item.name}}
+							</view>
+							<view class="time">
+								<!-- <text>{{ item.create_time }}</text> -->
+								<!-- 2022-12-1 09:30 -->
+								奖励股权{{item.number}}
+							</view>
+						</view>
+						<view class="money">
+							{{(userInfo.order_count*1 >= item.number*1 )? "已完成": '未完成'}}
+							<!-- <view>{{ (item.pm == 0 ? '-' : '+') + 1500 }}</view>
+							<image src="../../static/img/downright.png" mode=""></image> -->
+						</view>
+					</view>
+					<u-loadmore :status="tabItem.loadingType" />
+				</scroll-view>
+			</swiper-item>
+		</swiper>
 	</view>
 </template>
 
@@ -8,26 +78,296 @@
 	export default {
 		data() {
 			return {
-
+				userInfo: {},
+				showdate: '',
+				tabCurrentIndex: 0,
+				height: '',
+				id: '',
+				navlist: [{
+						status: 0,
+						title: '收入',
+						list: [],
+						page: 1,
+						pageSize: 100,
+						loaded: false,
+						loadingType: 'loadmore'
+					},
+					{
+						status: 1,
+						title: '扣除',
+						list: [],
+						page: 1,
+						pageSize: 10,
+						loaded: false,
+						loadingType: 'loadmore'
+					}
+				]
 			}
 		},
-		onLoad() {
-
+		onLoad(opt) {
+			
 		},
 		onShow() {
-
+			this.getCustomerInfo()
 		},
 		onReachBottom() {
 
 		},
 		onReady() {
-
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-box').boundingClientRect();
+					query.exec(function(res) {
+						_this.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
 		},
 		methods: {
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+				this.loadData('tab')
+			},
+			// 选择年月
+			bindDateChange(e) {
+				let time = e.detail.value.split('-')
+				this.showdate = time[0] + '年' + time[1] + '月'
+
+				this.loadData('reload')
+			},
+			// 获取当前年月
+			getTime() {
+				let date = new Date()
+				this.showdate = date.getFullYear() + '年' + (date.getMonth() + 1) + '月'
+				this.loadData()
+			},
+			// 获取数据
+			loadData(type) {
+				let that = this
+				let index = that.tabCurrentIndex
+				let item = that.navlist[index]
+				if (type == 'reload') {
+					item.loaded = false
+					item.loadingType = 'more'
+					item.page = 1
+					item.list = []
+				}
+				if (type == 'tab' && item.loaded) {
+					return
+				}
+				if (item.loadingType == 'loading' || item.loadingType == 'nomore') {
+					return
+				}
 
+				item.loadingType = 'loading'
+				this.$u.api.StaffLadder({
+					page: item.page,
+					pageSize: item.pageSize
+				}).then(({data})=> {
+					item.list = data
+					item.loaded = true
+					item.loadingType = 'nomore'
+				})
+
+			},
+			getCustomerInfo() {
+				this.$u.api.getYgdetail({
+					request_id: this.$store.state.userInfo.staffId
+				}).then(({
+					data
+				}) => {
+					this.userInfo = data
+					this.loadData()
+				})
+				
+			},
 		}
 	}
 </script>
 
 <style lang="scss">
-</style>
+	.user-top {
+		width: 100%;
+		height: 400rpx;
+		background-color: #4075d6;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		padding-bottom: 60rpx;
+
+		// position: relative;
+		.top-tit {
+			font-size: 30rpx;
+			font-weight: bold;
+			color: #FFFFFF;
+		}
+
+		.top-val {
+			font-size: 72rpx;
+			font-weight: 500;
+			color: #FFFFFF;
+		}
+
+		.select-time {
+			position: absolute;
+			top: 30rpx;
+			right: 30rpx;
+			font-size: 26rpx;
+			font-weight: 500;
+			color: #fff;
+			display: flex;
+			align-items: center;
+
+			image {
+				width: 17rpx;
+				margin-left: 10rpx;
+			}
+		}
+	}
+
+	.sz-wrap {
+		width: 670rpx;
+		height: 186rpx;
+		background: #FFFFFF;
+		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+		border-radius: 20rpx;
+		margin: -90rpx auto 20rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+
+		.jg {
+			width: 2rpx;
+			height: 74rpx;
+			background: #DCDFE6;
+		}
+
+		.sz-item {
+			width: 330rpx;
+			height: 100%;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			justify-content: center;
+			font-size: 30rpx;
+			font-weight: bold;
+
+			.sz-tit {
+				color: #999999;
+
+			}
+
+			.sz-val {
+				margin-top: 30rpx;
+				color: #181818;
+			}
+		}
+	}
+
+	.navbar {
+		margin-top: 20rpx;
+		display: flex;
+		height: 88rpx;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: #999999;
+			position: relative;
+
+			&.current {
+				color: #000;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid #fe5b38;
+				}
+			}
+		}
+	}
+
+	//列表
+	.swiper-box {
+		margin-top: 20rpx;
+		padding: 0 20rpx;
+		background-color: #fff;
+		.order-item:last-child {
+			margin-bottom: 60rpx;
+		}
+		.order-item {
+			width: 100%;
+			// background-color: red;
+			padding: 20rpx 30rpx;
+			line-height: 1.5;
+			display: flex;
+			align-items: center;
+			border-bottom: 1rpx solid #F0F0F0;
+			.logo {
+				flex-shrink: 0;
+				margin-right: 20rpx;
+				width: 45rpx;
+				height: 45rpx;
+				border-radius: 50%;
+				background-color: #eee;
+			}
+			.title-box {
+				flex-grow: 1;
+				padding-right: 50rpx;
+
+				.title {
+					font-size: 30rpx;
+					color: #333333;
+				}
+
+				.time {
+					font-size: 26rpx;
+					color: #AEAEAE;
+				}
+			}
+
+			.money {
+				color: #AEAEAE;
+				min-width: 150rpx;
+				font-size: 26rpx;
+				text-align: right;
+				display: flex;
+				align-items: center;
+				justify-content: flex-end;
+				image {
+					width: 10rpx;
+					height: 20rpx;
+					margin-left: 15rpx;
+				}
+				.status {
+					color: #AEAEAE;
+				}
+			}
+		}
+	}
+
+	.list-scroll-content {
+		background: #ffffff;
+		height: 100%;
+	}
+</style>