Prechádzať zdrojové kódy

Merge branch 'v3' of http://git.jihengcc.cn/starfire/spark-sale into v3

zhangli 2 rokov pred
rodič
commit
778c620995
6 zmenil súbory, kde vykonal 496 pridanie a 87 odobranie
  1. 13 3
      config/api.js
  2. 5 0
      pages.json
  3. 3 3
      pages/report/index.vue
  4. 153 36
      pagesMain/giftApply.vue
  5. 302 0
      pagesMain/reportInfo.vue
  6. 20 45
      pagesMain/venueDetail.vue

+ 13 - 3
config/api.js

@@ -2,10 +2,10 @@
 // const API_BASE = 'http://192.168.1.126:30000'
 //const API_BASE = 'http://192.168.1.117:8089'
 //const API_BASE = 'http://192.168.1.145/newApi'
-const API_BASE = 'http://192.168.1.109/newApi'
+// const API_BASE = 'http://192.168.1.109/newApi'
 // const API_BASE = 'http://192.168.1.117:8089'
 //const API_BASE = 'http://192.168.1.145/newApi'
-//const API_BASE = 'http://192.168.1.117:8089'
+const API_BASE = 'http://192.168.1.117:8089'
 // const API_BASE = 'http://192.168.1.145/newApi'
 
 module.exports = {
@@ -21,6 +21,13 @@ module.exports = {
 	
 	//  获取统计图数据
 	getCensusChart: API_BASE + '/v2/sale/home/getCustomerCreateStatisticsList',
+	//  久未跟进
+	estrangedList: API_BASE + '/v2/sale/center/estrangedList',
+	//  生日提醒
+	birthdayRemind: API_BASE + '/v2/sale/center/birthdayRemind',
+	//  预约记录
+	oneWeekAppointment: API_BASE + '/v2/sale/center/oneWeekAppointment',
+	
 	//  获取附近场馆列表
 	getNearVenueList: API_BASE + '/v2/sale/home/getVenueNearList',
 	//  获取所有场馆列表
@@ -54,7 +61,6 @@ module.exports = {
 	//  提交已报名表单
 	submitEnrolledForm: API_BASE + '/v2/sale/customer/joinCLass',
 
-	
 	//  无效
 	updateCustomerState: API_BASE + '/v2/sale/customer/updateCustomerState',
 	//  提交意向客户表单
@@ -116,4 +122,8 @@ module.exports = {
 	findVenueGiftOneList: API_BASE + '/v2/sale/center/findVenueGiftOneList',
 	// 获取二级礼物
 	findVenueGiftTwoList: API_BASE + '/v2/sale/center/findVenueGiftTwoList',
+	// 赠送
+	giveGiftStudent: API_BASE + '/v2/sale/center/giveGiftStudent',
+	// 不送
+	giveGiftRefuse:  API_BASE + '/v2/sale/center/giveGiftRefuse'
 }

+ 5 - 0
pages.json

@@ -76,6 +76,11 @@
 			"style": {
 				"navigationBarTitleText": ""
 			}
+		},{
+			"path": "reportInfo",
+			"style": {
+				"navigationBarTitleText": ""
+			}
 		},{
 			"path": "allCustomer",
 			"style": {

+ 3 - 3
pages/report/index.vue

@@ -3,7 +3,7 @@
 		<view class="first-content">
 			<view><text style="font-size: 44rpx;font-weight: bold;">客户跟进</text></view>
 			<view class="content-box">
-				<view class="content-info">
+				<view class="content-info" @click.native="goUrl('/pagesMain/reportInfo?type=1&navTitle=久未跟进')">
 					<view class="info-num">{{ info.estranged }}</view>
 					<view class="info-introduce">久未跟进</view>
 					<view class="info-text">长时间未跟进的客户</view>
@@ -13,12 +13,12 @@
 					<view class="info-introduce">即将到期</view>
 					<view class="info-text">会员卡即将过期的会员</view>
 				</view>
-				<view class="content-info">
+				<view class="content-info" @click.native="goUrl('/pagesMain/reportInfo?type=3&navTitle=生日提醒')">
 					<view class="info-num">{{ info.birthdayRemind }}</view>
 					<view class="info-introduce">生日提醒</view>
 					<view class="info-text">即将过生日的会员</view>
 				</view>
-				<view class="content-info">
+				<view class="content-info" @click.native="goUrl('/pagesMain/reportInfo?type=4&navTitle=预约记录')">
 					<view class="info-num">{{ info.oneWeekAppointment }}</view>
 					<view class="info-introduce">预约记录</view>
 					<view class="info-text">预约到店的会员</view>

+ 153 - 36
pagesMain/giftApply.vue

@@ -19,16 +19,15 @@
 									<text class="info-name">{{ site.venueName }}</text>
 								</view>
 								<view class="info-phone">{{ site.className }}</view>
+								<template v-if="site.giftList.length">
+									<view class="info-phone" v-for="(iten, index3) in site.giftList" :key="index3">{{ iten.name }}</view>
+								</template>
 								<view class="info-phone">{{ getStatus(site.approvalStatus) }}</view>
-								<view style="width: 100%;" v-if="site.giftType == 1">
-									<text class="info-phone" style="margin-right: 10px;">{{ site.giftTypeName }}</text>
-									<text class="info-phone">{{ site.giftName }}</text>
-								</view>
 							</view>
 						</view>
-						<view slot="foot" style="text-align: right;"v-if="site.giftType == 0" >
-							<u-button type="warning" :ripple="true" shape="circle" :custom-style="{...handleCustomStyle, marginRight: '5px'}" size="mini" @click="handleGiveClick(site.venueId)">赠送</u-button>
-							<u-button type="warning" :ripple="true" shape="circle" :custom-style="handleCustomStyle" size="mini" @click="handleNoGiveClick">不送</u-button>
+						<view slot="foot" style="text-align: right;" v-if="site.giftType == 0 && site.approvalStatus == 2" >
+							<u-button type="warning" :ripple="true" shape="circle" :custom-style="{...handleCustomStyle, marginRight: '5px'}" size="mini" @click="handleGiveClick(site.id,site.venueId)">赠送</u-button>
+							<u-button type="warning" :ripple="true" shape="circle" :custom-style="handleCustomStyle" size="mini" @click="handleNoGiveClick(site.id)">不送</u-button>
 						</view>
 					</u-card>
 					<u-divider v-if="item.isOver" bg-color="transparent" :style="{paddingTop : item.tableList.length == 0 ? '10px' : ''}">没有更多了</u-divider>
@@ -39,15 +38,30 @@
 		<u-popup v-model="giftShow" mode="center" border-radius="30" width="600rpx" height="500px" >
 			<view class="common-title">礼物</view>
 			<view class="menber-box" style="overflow-y: auto;height:390px;">
-				<view @click="handleOneClick"></view>
+				<u-form :model="form" ref="giftForm" label-width="80">
+					<view style="display:flex;justify-content: space-between;" v-for="(item,index) in formInfo" :key="index">
+						<u-form-item label="商品" :prop="item.signOne" required right-icon="arrow-right" style="width:44%;"  @click.native="handleShowProductClick(index)">
+							<text>{{ item.signOne }}</text>
+						</u-form-item>
+						<u-form-item label="规格" :prop="item.two" required right-icon="arrow-right" style="width:44%;" @click.native="handleShowSpecClick(index)">
+							<text>{{ item.signTwo }}</text>
+						</u-form-item>
+						<u-icon v-if="formInfo.length != 1" name="minus-circle" size="34" @click="handleGiftDelClick(index)"></u-icon>
+					</view>
+					<view style="width:100;display:flex;justify-content: flex-end;">
+						<u-button type="warning"  :ripple="true" size="mini" :custom-style="{ backgroundColor: mainColor }"  @click="handleGiftAddClick">添加</u-button>
+					</view>
+				</u-form>
 			</view>
 			<view class="button-box">
-				<u-button type="warning" shape="circle" :ripple="true" :custom-style="customStyle" @click="recordShow = false">确定</u-button>
+				<u-button type="warning" shape="circle" :ripple="true" :custom-style="customStyle" @click="handleSubmitClick">确定</u-button>
 			</view>
 		</u-popup>
-		<!-- 一级礼物 -->
-		<u-action-sheet :list="oneList" v-model="oneShow" @click="handleSetOneClick"></u-action-sheet>
-		<u-top-tips ref="uTips"></u-top-tips>
+		<!-- 商品 -->
+		<u-picker mode="selector" v-model="productShow" :range="productList" @confirm="handleSetProductClick" title="礼物" range-key="text"></u-picker>
+		<!-- 规格 -->
+		<u-picker mode="selector" v-model="specShow" :range="specList" @confirm="handleSetSpecClick" title="规格" range-key="text"></u-picker>
+		<u-top-tips ref="uTips" z-index="12000"></u-top-tips>
 	</view>
 </template>
 
@@ -58,19 +72,20 @@
 	const NET = require('@/utils/request')
 	const API = require('@/config/api')
 	export default {
-		computed: {
-			...mapGetters([
-				'mainColor',
-				'customStyle',
-				'handleCustomStyle',
-				'handleDefaultCustomStyle',
-			])
-		},
 		data() {
 			return {
-				venueId: '',
+				listId: 0,
+				venueId: 0,
 				// filterText: '',
 				triggered: false,
+				formInfo: [
+					{
+						signOneId: '',
+						signOne: '',
+						signTwoId: '',
+						signTwo: ''
+					}
+				],
 				tabList: [
 				{
 					name: '未赠送',
@@ -93,16 +108,24 @@
 				}],
 				current: 0,
 				swiperCurrent: 0,
+				giftIndex: 0,
 				giftShow: false,
-				oneShow: false,
-				oneList: [],
-				
+				productShow: false,
+				productList: [],
+				specShow: false,
+				specList: [],
 			}
 		},
 		onShow() {
 			this.getData()
 		},
 		computed: {
+			...mapGetters([
+				'mainColor',
+				'customStyle',
+				'handleCustomStyle',
+				'handleDefaultCustomStyle',
+			]),
 			getStatus() {
 				return function(index) {
 					switch (index) {
@@ -123,26 +146,120 @@
 				this.getTableList(1)
 				this.getTableList(2)
 			},
-			handleGiveClick(id) {
+			handleGiveClick(id,venueId) {
 				this.giftShow = true
-				this.venueId = id
+				this.listId = id
+				this.venueId = venueId
 			},
-			handleOneClick() {
-				NET.request(API.findVenueGiftOneListudentPage, {
-					id: thisvenueId
+			handleShowProductClick(index) {
+				this.giftIndex = index
+				NET.request(API.findVenueGiftOneList, {
+					id: this.venueId
 				}, 'POST').then(res => {
-					console.log(res);
+					this.productList = res.data
+					this.productShow = true
 				})
 			},
-			// 赠送
-			handleJumpGiftInfoClick(id) {
-				uni.navigateTo({
-					url: `/pagesMain/giftInfo?id=${id}`
+			handleSetProductClick(index) {
+				this.formInfo[this.giftIndex].signOneId = this.productList[index].id
+				this.formInfo[this.giftIndex].signOne = this.productList[index].text
+			},
+			handleShowSpecClick(index) {
+				this.giftIndex = index
+				if(!this.formInfo[this.giftIndex].signOneId) {
+					this.$refs.uTips.show({
+						title: '请先选择商品',
+						type: 'warning',
+					})
+					return
+				}
+				const giftId = this.formInfo[this.giftIndex].signOneId
+				const venueId = this.venueId
+				NET.request(API.findVenueGiftTwoList, {
+					giftId, venueId
+				}, 'POST').then(res => {
+					this.specList = res.data
+					this.specShow = true
+				})
+			},
+			handleSetSpecClick(index) {
+				this.formInfo[this.giftIndex].signTwoId = this.specList[index].id
+				this.formInfo[this.giftIndex].signTwo = this.specList[index].text
+			},
+			handleGiftAddClick() {
+				this.formInfo.push({
+					signOneId: '',
+					signOne: '',
+					signTwoId: '',
+					signTwo: ''
 				})
 			},
+			handleGiftDelClick(index) {
+				this.formInfo.splice(index,1)
+			},
+			handleSubmitClick() {
+				let flag = true
+				this.formInfo.forEach( item => {
+					if(!item.signOneId) {
+						this.$refs.uTips.show({
+							title: '请选择要赠送的礼物',
+							type: 'warning',
+						})
+						flag = false
+						return 
+					}
+					if(item.signOneId && !item.signTwoId) {
+						this.$refs.uTips.show({
+							title: `请选择商品${item.signOne}的规格`,
+							type: 'warning',
+						})
+						flag = false
+						return 
+					}
+				})
+				if(flag) {
+					const id = this.listId
+					const venueId = this.venueId
+					const giftIds = this.formInfo.filter(item => item.signTwoId != '').map( item => {
+						return item.signTwoId
+					})
+					NET.request(API.giveGiftStudent, {
+						id, venueId, giftIds
+					}, 'POST').then(res => {
+						if(res.status == 10000) {
+							this.$refs.uTips.show({
+								title: res.message,
+								type: 'success',
+							})
+						} else {
+							this.$refs.uTips.show({
+								title: res.message,
+								type: 'warning',
+							})
+						}
+						this.getData()
+						this.giftShow = false
+					})
+				}
+			},
 			// 不送
-			handleNoGiveClick() {
-				console.log('不送');
+			handleNoGiveClick(id) {
+				NET.request(API.giveGiftRefuse, {
+					id
+				}, 'POST').then(res => {
+					if(res.status == 10000) {
+						this.$refs.uTips.show({
+							title: res.message,
+							type: 'success',
+						})
+					} else {
+						this.$refs.uTips.show({
+							title: res.message,
+							type: 'warning',
+						})
+					}
+					this.getData()
+				})
 			},
 			//  获取列表数据
 			getTableList(index) {

+ 302 - 0
pagesMain/reportInfo.vue

@@ -0,0 +1,302 @@
+<template>
+	<view class="content">
+	<!-- 	<view class="filter-box">
+			<u-search placeholder="请输入关键字" v-model="filterText" @search="setFilterText" @custom="setFilterText"></u-search>
+		</view> -->
+		<template v-if="tabList[0].tableList.length">
+			<scroll-view scroll-y class="scroll-box" @scrolltolower="handleLoadMore" :refresher-enabled="true"
+			 :refresher-triggered="triggered" :refresher-threshold="100" refresher-background="white" @refresherrefresh="onRefresh"
+			 @refresherrestore="onRestore">
+				<u-card :show-head="false" :foot-border-top="false" margin="10px 15px" borderRadius="40" :foot-style="{padding: '0 10px 5px 0'}" v-for="(site, index2) in tabList[0].tableList"
+				 :key="index2" class="card-box">
+					<view slot="body" class="card-content">
+						<view class="student-info">
+							<view style="width: 100%;margin-bottom: 5px;">
+								<text class="info-name" style="margin-right: 10px;">{{site.studentName}}</text>
+								<text class="info-name">{{site.fatherName}}</text>
+							</view>
+							<view class="info-phone">{{site.studentPhone}}</view>
+							<view class="info-phone" v-if="getType == 3">生日: {{site.birthday}}</view>
+							<view class="info-phone" v-if="getType == 4">预约时间: {{site.recordTime}}</view>
+						</view>
+					</view>
+					<view slot="foot" style="text-align: right;" v-if="getType == 1">
+						<u-button type="warning" :ripple="true" shape="circle" :custom-style="handleCustomStyle" size="mini" @click="handleRecordClick(site.id)">追踪信息</u-button>
+					</view>
+				</u-card>
+				<u-divider v-if="item.isOver" bg-color="transparent" :style="{paddingTop : tabList[0].tableList.length == 0 ? '10px' : ''}">没有更多了</u-divider>
+			</scroll-view>
+		</template>
+		<template v-else>
+			<u-empty mode="data"></u-empty>
+		</template>
+		<!-- 追踪记录 -->
+		<u-popup v-model="recordShow" mode="center" border-radius="30" width="600rpx" height="500px" >
+			<view class="common-title">追踪记录</view>
+			<view class="menber-box" style="overflow-y: auto;height:390px;">
+				<template v-if="recordList.legnth">
+					<view style="padding:5px; border-bottom:1px solid #aaa;" v-for="(item,index) in recordList">
+						<view>{{ item.content }}</view>
+						<view>{{ item.createTime }}</view>
+					</view>
+				</template>
+				<template v-else>
+					<u-empty mode="data"></u-empty>
+				</template>
+			</view>
+			<view class="button-box">
+				<u-button type="warning" shape="circle" :ripple="true" :custom-style="customStyle" @click="recordShow = false">确定</u-button>
+			</view>
+		</u-popup>
+		<u-top-tips ref="uTips"></u-top-tips>
+	</view>
+</template>
+
+<script>
+	import {
+		mapGetters
+	} from 'vuex'
+	const NET = require('@/utils/request')
+	const API = require('@/config/api')
+	export default {
+		computed: {
+			...mapGetters([
+				'customStyle',
+				'handleCustomStyle',
+			])
+		},
+		data() {
+			return {
+				getType: 0,
+				customerId: '',
+				// filterText: '',
+				triggered: false,
+				tabList: [
+				 {
+					name: '未联系',
+					isOver: false,
+					pageIndex: 1,
+					filterText: '',
+					type: 1,
+					tableList: [],
+				}],
+				// 追踪记录
+				recordShow: false,
+				recordList: []
+			}
+		},
+		onLoad(options) {
+			this.getType = options.type
+			uni.setNavigationBarTitle({
+				title: options.navTitle
+			});
+		},
+		onShow() {
+			this.tabList = Object.assign([], this.$options.data().tabList)
+			this.getTableList()
+		},
+		onReady() {},
+		methods: {
+			//  获取列表数据
+			getTableList() {
+				let rUrl = ''
+				switch (parseInt(this.getType)) {
+					case 1:
+						rUrl = API.estrangedList
+						break
+					case 3:
+						rUrl = API.birthdayRemind
+						break
+					case 4:
+						rUrl = API.oneWeekAppointment
+						break
+				}
+				NET.request(rUrl, {
+					page: 1,
+					size: 100,
+				}, 'POST').then(res => {
+					this.triggered = false
+					this.tabList[0].tableList = res.data
+				})
+			},
+			// 查看追踪记录
+			handleRecordClick(id) {
+				NET.request(API.findResourceRecordList, {
+					id,
+					page:1,
+					size: 100}, 'POST').then(res=> {
+						if(res.status == 10000) {
+							this.recordShow = true
+							this.recordList = res.data
+						} else {
+							this.$refs.uTips.show({
+								title: res.message,
+								type: 'warning',
+							})
+						}
+				}) 
+			},
+			//  设置过滤字段
+			setFilterText(value) {
+				this.tabList[0].filterText = value
+				this.onRefresh()
+			},
+			//  下拉刷新
+			onRefresh() {
+				if (!this.triggered) {
+					this.triggered = true
+					this.tabList[0].isOver = false
+					this.tabList[0].pageIndex = 1
+					this.tabList[0].tableList = []
+					this.getTableList()
+				}
+			},
+			//  重置下拉刷新状态
+			onRestore() {
+				this.triggered = false
+			},
+			//  懒加载
+			handleLoadMore() {
+				if (!this.tabList[0].isOver) {
+					this.tabList[0].pageIndex++
+					this.getTableList()
+				}
+			}
+		},
+	}
+</script>
+
+<style>
+	page {
+		width: 100%;
+		height: 100%;
+		background-color: #f7f7f7;
+	}
+</style>
+<style lang="scss" scoped>
+	@import "@/static/css/themes.scss";
+
+	.content {
+		width: 100%;
+		float: left;
+		
+		.filter-box {
+			height: 48px;
+			padding: 10px 15px;
+			background-color: #FFFFFF;
+		}
+
+		.swiper-box {
+			height: calc(100vh - 82px);
+
+			.swiper-item {
+				height: calc(100vh - 82px);
+
+				.scroll-box {
+					width: 100%;
+					height: calc(100vh - 82px);
+
+					.card-box {
+						.card-content {
+							display: flex;
+							align-items: center;
+
+							.student-info {
+								flex: 1;
+
+								.info-name {
+									// width: 64px;
+									// float: left;
+									line-height: 28px;
+									font-size: 14px;
+									font-weight: bold;
+								}
+
+								.info-type {
+									padding: 0 10px;
+									margin-top: 3px;
+									border-radius: 20px;
+									float: left;
+									line-height: 20px;
+									font-size: 10px;
+									color: #FFFFFF;
+									background-color: #999999;
+								}
+
+								.info-type-active {
+									background-color: $mainColor;
+								}
+
+								.info-phone {
+									font-size: 12px;
+									color: #999999;
+								}
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+	.menber-box {
+		width: 100%;
+		// float: left;
+		padding: 10px 15px;
+		margin-bottom: 10px;
+		
+		.menber-col {
+			width: 100%;
+			padding: 15px;
+			margin-bottom: 10px;
+			display: inline-block;
+			background-color: #FFFFFF;
+			border-radius: 15px;
+			box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.2);
+			position: relative;
+			overflow: hidden;
+			box-sizing: border-box;
+			
+			.menber-label {
+				width: 100%;
+				margin-bottom: 5px;
+				float: left;
+				font-size: 14px;
+				// line-height: 20px;
+			}
+	
+			.menber-num {
+				width: 100%;
+				float: left;
+				font-size: 26px;
+				line-height: 28px;
+				color: $mainColor;
+			}
+	
+			.menber-icon {
+				font-size: 100px;
+				color: $mainColor;
+				position: absolute;
+				right: -5px;
+				bottom: -30px;
+				opacity: 0.5;
+			}
+		}
+	}
+	.common-title {
+		width:100%;
+		text-align: center;
+		font-size: 20px;
+		margin: 10px 0;
+	}
+	.fix-add-icon {
+		position: fixed;
+		bottom: 15px;
+		right: 15px;
+	}
+	.button-box {
+		// width: 100%;
+		padding: 10px 15px;
+		box-sizing: border-box;
+	}
+</style>
+

+ 20 - 45
pagesMain/venueDetail.vue

@@ -32,8 +32,9 @@
 					</view>
 				</view>
 				<view class="class-content" slot="foot" style="padding-bottom: 10px;text-align: right;">
-					<u-button type="default" shape="circle" :ripple="true" :custom-style="handleDefaultCustomStyle" size="mini"
-					 :hair-line="false" plain @click.stop="cardHandle(item, 1)">体验</u-button>
+					<u-button type="warning" shape="circle" :ripple="true" :custom-style="handleCustomStyle" size="mini"
+					 @click.stop="handleAppointmentClick(item.id)">体验</u-button>
+					 			 <!-- @click.stop="cardHandle(item, 1)">体验</u-button> -->
 					<!-- <u-button type="warning" shape="circle" :ripple="true" :custom-style="handleCustomStyle" size="mini" @click.stop="cardHandle(item, 2)">报名</u-button> -->
 				</view>
 			</u-card>
@@ -60,6 +61,7 @@
 				</u-card>
 			</scroll-view>
 		</u-popup>
+		<u-picker v-model="timeShow" mode="time" @confirm="handleChooseTimeClick"></u-picker>
 		<u-top-tips ref="uTips" zIndex="100000"></u-top-tips>
 	</view>
 </template>
@@ -81,7 +83,6 @@
 		},
 		data() {
 			return {
-				userId:'',
 				venueId: '',
 				venueInfo: {
 					url: '',
@@ -98,22 +99,14 @@
 				studentList1: [],
 				subscribeShow: false,
 				studentList2: [],
+				timeShow: false
 			}
 		},
 		onLoad(options) {
-			this.userId = options.userId
 			this.venueId = options.id
 			this.initialize()
 		},
 		onShow() {
-			/*NET.request(API.getEnlistAbleStudent, {}, 'POST').then(res => {
-				this.studentList1 = res.data.row
-			}).catch(error => {
-				this.$refs.uTips.show({
-					title: error.message,
-					type: 'warning',
-				})
-			})*/
 			NET.request(API.getSubscribeAbleList, {}, 'POST').then(res => {
 				this.studentList2 = res.data.row
 			}).catch(error => {
@@ -150,30 +143,6 @@
 				// 	url: '/pagesMember/classDetail?id=' + item.id
 				// });
 			},
-			// 体验
-			cardHandle(item, type) {
-				const classId = parseInt(item.id)
-				const customerId = parseInt(this.$store.state.customerId)
-				NET.request(API.customerAppointment, {
-					classId,
-					customerId
-				}, 'POST').then(res => {
-					this.$refs.uTips.show({
-						title: res.message,
-						type: 'success',
-					})
-					setTimeout(()=> {
-						uni.navigateBack({
-							delta: 2
-						})
-					}, 1000)
-				}).catch(error => {
-					this.$refs.uTips.show({
-						title: error.message,
-						type: 'warning',
-					})
-				})
-			},
 			//  学员报名
 			enlistStudent(item) {
 				NET.request(API.enlistStudent, {
@@ -192,29 +161,35 @@
 					})
 				})
 			},
+			handleAppointmentClick(id) {
+				this.timeShow = true
+				this.classId = id
+			},
+			handleChooseTimeClick(args) {
+				const appointmentDate = args.year + '-' + args.month + '-' + args.day
+				console.log(appointmentDate);
+				this.subscribeStudent(appointmentDate)
+			},
 			//  学员预约
-			subscribeStudent(item) {
+			subscribeStudent(appointmentDate) {
 				NET.request(API.customerAppointment, {
+					venueId: this.venueId,
 					classId: this.classId,
-					studentId: this.userId,
+					customerId: this.$store.state.customerId,
+					appointmentDate
 				}, 'POST').then(res => {
 					this.$refs.uTips.show({
 						title: res.message,
 						type: 'success',
 					})
+					this.timeShow = false
 				}).catch(error => {
 					this.$refs.uTips.show({
 						title: error.message,
 						type: 'warning',
 					})
 				})
-			},
-			//  跳转新增学员表单
-			// goToSubscribelForm() {
-			// 	uni.navigateTo({
-			// 		url: '/pagesMember/subscribelForm'
-			// 	});
-			// },
+			}
 		},
 	}
 </script>