Ver Fonte

修改bug

zzp há 2 anos atrás
pai
commit
ebca569c87

+ 18 - 10
pages/index/index.vue

@@ -108,6 +108,7 @@
 					nickName: '',
 					userName: '',
 					phone: '',
+					flag: ''
 				},
 				navbarList: [
 					{
@@ -119,17 +120,18 @@
 						'title': '线索',
 						'imgPath': thread,
 						'path': '/pagesMain/threadList'
-					},
-					{
-						'title': '公海',
-						'imgPath': business,
-						'path': '/pagesMain/businessList'
-					},
-					// {
-					// 	'title': '占位',
-					// 	'imgPath': empty,
-					// }
+					}
 				],
+				// 公海 
+				business: {
+					'title': '公海',
+					'imgPath': business,
+					'path': '/pagesMain/businessList'
+				},
+				empty: {
+					'title': '占位',
+					'imgPath': empty
+				},
 				// 简报
 				bulletinList: [{
 					name: '团队简报'
@@ -171,8 +173,14 @@
 			this.cHeight = uni.upx2px(500);
 		},
 		onShow() {
+			this.navbarList = Object.assign([],this.$options.data().navbarList)
 			if (uni.getStorageSync('userData')) {
 				this.userData = uni.getStorageSync('userData')
+				if(uni.getStorageSync('userData').flag) {
+					this.navbarList.push(this.business)
+				} else {
+					this.navbarList.push(this.empty)
+				}
 			}
 			uni.getLocation({
 				type: 'wgs84',

+ 4 - 0
pages/login/index.vue

@@ -89,6 +89,8 @@
 							nickName: res.data.nickName,
 							userName: res.data.username,
 							phone: res.data.phone,
+							// 是否为销售经理
+							flag: res.data.flag
 						}
 					})
 					uni.reLaunch({
@@ -142,6 +144,8 @@
 							nickName: res.data.nickName,
 							userName: res.data.username,
 							phone: res.data.phone,
+							// 是否为销售经理
+							flag: res.data.flag
 						}
 					})
 					uni.reLaunch({

+ 32 - 52
pagesEnroll/enrolledForm.vue

@@ -15,7 +15,7 @@
 			</u-form-item> -->
 			<u-form-item label="订单号" prop="orderNo" required>
 				<view style="display: flex;">
-					<u-input v-model="form.orderNo" placeholder="请选择订单号" style="flex: 1;" />
+					<u-input v-model="form.orderNo" placeholder="请选择订单号" style="flex: 1;" @blur="handleInputBlur"  />
 					<u-icon name="scan" size="60" style="margin-left: 5px;" @click="scanQRCode"></u-icon>
 				</view>
 			</u-form-item>
@@ -245,27 +245,6 @@
 		onReady() {
 			this.form.coachName = uni.getStorageSync('userData').nickName
 			this.getAllVenueData()
-			// this.$refs.form.setRules(this.rules);
-			//  获取班级列表
-			// NET.request(API.getClassList, {
-			// 	page: 1,
-			// 	size: 1000,
-			// }, 'POST').then(res => {
-			// 	this.classList = res.data.row
-			// }).catch(error => {
-			// 	this.$refs.uTips.show({
-			// 		title: error.message,
-			// 		type: 'warning',
-			// 	})
-			// })
-			// NET.request(API.getPayTypeList, {}, 'POST').then(res => {
-			// 	this.payTypeList = res.data
-			// }).catch(error => {
-			// 	this.$refs.uTips.show({
-			// 		title: error.message,
-			// 		type: 'warning',
-			// 	})
-			// })
 		},
 		watch: {
 			'form.payTypeId' (newData,oldData) {
@@ -283,44 +262,45 @@
 					this.form.payTypeId.splice(itemIndex, 1)
 				}
 			},
+			handleInputBlur(e) {
+				this.getQrCodeData(e)
+			},
 			//  扫码二维码
 			scanQRCode() {
 				uni.scanCode({
 					onlyFromCamera: true,
 					success: (res) => {
-						NET.request(API.getQrCodeInfo, {
-							orderNo: res.result
-						}, 'POST').then(res => {
-							this.form.parentsName = res.data.parentsName
-							this.form.studentId = res.data.studentId
-							this.form.studentName = res.data.studentName
-							this.form.sex = res.data.sex
-							this.form.age = res.data.age
-							this.form.birthday = res.data.birthday
-							this.form.phone = res.data.phone
-							this.cardList = res.data.cards
-							// if (res.data.payTypeId) {
-							// 	let payType = this.payTypeList.find(site => site.id == res.data.payTypeId)
-							// 	this.form.payTypeId = res.data.payTypeId
-							// 	this.form.payTypeName = payType.name
-							// 	this.form.payTypeCode = payType.other
-							// }
-							if (res.data.imageFileId) {
-								this.form.imageFileId = res.data.imageFileId
-								this.fileList = [{
-									url: res.data.imageFileUrl
-								}]
-							}
-							this.form.orderNo = res.data.orderNo
-						}).catch(error => {
-							this.$refs.uTips.show({
-								title: error.message,
-								type: 'warning',
-							})
-						})
+						this.getQrCodeData(res.result)
 					}
 				});
 			},
+			//  获取订单信息
+			getQrCodeData(orderNo) {
+				NET.request(API.getQrCodeInfo, {
+					orderNo
+				}, 'POST').then(res => {
+					this.form.parentsName = res.data.parentsName
+					this.form.studentId = res.data.studentId
+					this.form.studentName = res.data.studentName
+					this.form.sex = res.data.sex
+					this.form.age = res.data.age
+					this.form.birthday = res.data.birthday
+					this.form.phone = res.data.phone
+					this.cardList = res.data.cards
+					if (res.data.imageFileId) {
+						this.form.imageFileId = res.data.imageFileId
+						this.fileList = [{
+							url: res.data.imageFileUrl
+						}]
+					}
+					this.form.orderNo = res.data.orderNo
+				}).catch(error => {
+					this.$refs.uTips.show({
+						title: error.message,
+						type: 'warning',
+					})
+				})
+			},
 			//  文件上传成功回调
 			uploadSuccess(res, index, lists, name) {
 				if (name == 1) {

+ 2 - 1
pagesEnroll/intentionForm.vue

@@ -82,7 +82,7 @@
 					phone: '',
 					source: '',
 					intendRemark: '',
-					saleIsMeFlag: '',
+					saleIsMeFlag: true,
 					remark: ''
 				},
 				signShow: false,
@@ -179,6 +179,7 @@
 			this.$refs.form.setRules(this.rules);
 		},
 		methods: {
+			// 单选
 			handleCheckChange(e) {
 				this.form.saleIsMeFlag = e.value
 			},

+ 1 - 1
pagesEnroll/venueDetail.vue

@@ -32,7 +32,7 @@
 					</view>
 				</view>
 				<view class="class-content" slot="foot" style="padding-bottom: 10px;text-align: right;">
-					<u-button type="warning" shape="circle" :ripple="true" :custom-style="handleCustomStyle" size="mini">详情</u-button>
+					<u-button type="warning" shape="circle" :ripple="true" :custom-style="handleCustomStyle" size="mini" @click="goToClassDetail(item)">详情</u-button>
 				</view>
 			</u-card>
 		</view>

+ 17 - 25
pagesMain/customerInfo.vue

@@ -46,16 +46,18 @@
 			</view>
 		</u-popup>
 		<!-- 追踪记录 -->
-		<u-popup v-model="recordShow" mode="center" border-radius="30" width="600rpx">
+		<u-popup v-model="recordShow" mode="center" border-radius="30" width="600rpx" height="500px" >
 			<view class="common-title">追踪记录</view>
-			<view class="menber-box">
-				<view style="margin-bottom: 5px;" v-for="(item,index) in recordList">{{ index+1 }} : {{ item.content }}</view>
-				<view style="height:20px;"></view>
+			<view class="menber-box" style="overflow-y: auto;height:390px;">
+				<view style="padding:5px; border-bottom:1px solid #aaa;" v-for="(item,index) in recordList">
+					<view>{{ item.content }}</view>
+					<view>{{ item.createTime }}</view>
+				</view>
 			</view>
-			<view class="menber-box">
+			<view class="button-box">
 				<u-button type="warning" shape="circle" :ripple="true" :custom-style="customStyle" @click="recordShow = false">确定</u-button>
 			</view>
-		</u-popup
+		</u-popup>
 		<u-top-tips ref="uTips"></u-top-tips>
 	</view>
 </template>
@@ -160,14 +162,15 @@
 										title: '添加成功',
 										type: 'success',
 									})
-									this.invalidShow = false
+									
 								} else {
 									this.$refs.uTips.show({
 										title: error.message,
 										type: 'warning',
 									})
-									this.invalidShow = false
 								}
+								this.invalidShow = false
+								this.invalidForm.content = ''
 							}
 						)
 					}
@@ -213,14 +216,11 @@
 	
 	.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;
@@ -231,34 +231,26 @@
 			
 			.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;
+		padding: 10px 0;
+	}
+	.button-box {
+		// width: 100%;
+		padding: 10px 15px;
+		box-sizing: border-box;
 	}
 </style>

+ 11 - 8
pagesMain/threadList.vue

@@ -14,16 +14,18 @@
 					 :key="index2" class="card-box" @click="goToOrderList(site)">
 						<view slot="body" class="card-content">
 							<view class="student-info">
-								<view class="info-name">{{site.studentName}}</view>
-								<!-- <view class="info-type" :class="site.status == 1 ? 'info-type-active' : ''">{{site.status == 0 ? '未报名' : '已报名'}}</view> -->
-								<view class="info-name">{{site.parentName}}</view>
+								<view style="width: 100%;">
+									<text class="info-name" style="margin-right: 10px;">{{site.studentName}}</text>
+									<!-- <view class="info-type" :class="site.status == 1 ? 'info-type-active' : ''">{{site.status == 0 ? '未报名' : '已报名'}}</view> -->
+									<text class="info-name">{{site.parentName}}</text>
+								</view>
 								<view class="info-phone">{{site.parentPhone}}</view>
 							</view>
 							<!-- <u-image width="28px" height="28px" :src="site.type == 2 ? iconPath1 : iconPath2"></u-image> -->
 						</view>
 						<view slot="foot" style="text-align: right;">
 							<u-button type="warning" :ripple="true" shape="circle" :custom-style="{...handleCustomStyle, marginRight: '5px'}" size="mini" @click="handleUpdateClick(site)">修改</u-button>
-							<u-button type="warning" :ripple="true" shape="circle" :custom-style="handleCustomStyle" size="mini" @click="handleJumpSubscribeClick">预约体验</u-button>
+							<u-button type="warning" :ripple="true" shape="circle" :custom-style="handleCustomStyle" size="mini" @click="handleJumpSubscribeClick(site)">预约体验</u-button>
 						</view>
 					</u-card>
 					<u-divider v-if="item.isOver" bg-color="transparent" :style="{paddingTop : item.tableList.length == 0 ? '10px' : ''}">没有更多了</u-divider>
@@ -227,7 +229,8 @@
 				});
 			},
 			//  跳转场馆列表
-			handleJumpSubscribeClick() {
+			handleJumpSubscribeClick(item) {
+				this.$store.commit("changeCustomerId", item.id)
 				uni.navigateTo({
 					url: '/pagesMain/venueMore'
 				});
@@ -275,8 +278,8 @@
 								flex: 1;
 
 								.info-name {
-									width: 64px;
-									float: left;
+									// width: 64px;
+									// float: left;
 									line-height: 28px;
 									font-size: 14px;
 									font-weight: bold;
@@ -299,7 +302,7 @@
 
 								.info-phone {
 									width: calc(100% - 64px);
-									float: left;
+									// float: left;
 									line-height: 28px;
 									font-size: 12px;
 									color: #999999;

+ 19 - 23
pagesMain/venueDetail.vue

@@ -151,29 +151,25 @@
 				// });
 			},
 			//  弹出
-			// cardHandle(item, type) {
-			// 	this.classId = item.id
-			// 	NET.request(API.customerAppointment, {
-			// 		classId: this.classId,
-			// 		customerId: this.userId,
-			// 	}, 'POST').then(res => {
-			// 		this.subscribeShow = false
-			// 		this.$refs.uTips.show({
-			// 			title: res.message,
-			// 			type: 'success',
-			// 		})
-			// 	}).catch(error => {
-			// 		this.$refs.uTips.show({
-			// 			title: error.message,
-			// 			type: 'warning',
-			// 		})
-			// 	})
-			// 	/*if (type == 1) {
-			// 		this.subscribeShow = true
-			// 	} else {
-			// 		this.enlistShow = true
-			// 	}*/
-			// },
+			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.subscribeShow = false
+					this.$refs.uTips.show({
+						title: res.message,
+						type: 'success',
+					})
+				}).catch(error => {
+					this.$refs.uTips.show({
+						title: error.message,
+						type: 'warning',
+					})
+				})
+			},
 			//  学员报名
 			enlistStudent(item) {
 				NET.request(API.enlistStudent, {

BIN
static/images/business.png


BIN
static/images/client.png


BIN
static/images/thread.png


+ 5 - 3
store/index.js

@@ -21,11 +21,13 @@ const store = new Vuex.Store({ //  全局变量定义
 			padding: '0 15px',
 			borderColor: '#ff6e3e',
 		},
+		// 客户id
+		customerId: ''
 	},
 	mutations: {
-		//  例子
-		test(state, provider) {
-			//  state.mainColor = '';
+		// 修改客户id
+		changeCustomerId(state, id) {
+			 state.customerId = id
 		}
 	},
 	getters: {