Browse Source

处理冲突

zhangli 2 years ago
parent
commit
dfa74ee695

+ 7 - 2
config/api.js

@@ -1,9 +1,13 @@
 // const API_BASE = 'https://xinghuolanqiu.com/newApi'
+
 //const API_BASE = 'http://192.168.1.126:30000'
-const API_BASE = 'http://www.jihengcc.cn:17080/newApi'
+//const API_BASE = 'http://www.jihengcc.cn:17080/newApi'
 
 // const API_BASE = 'http://192.168.1.117:8089'
 
+// const API_BASE = 'http://192.168.1.126:30000'
+const API_BASE = 'http://192.168.1.117:8089'
+
 module.exports = {
 	//  微信授权登录
 	wxLogin: API_BASE + '/v2/coach/login/wxLogin',
@@ -53,7 +57,8 @@ module.exports = {
 	stuRenewalCardList: API_BASE + '	/v2/sale/class/stuRenewalCardList',
 	// 班级详情->续费卡->确认
 	openRenewalCard: API_BASE + '	/v2/sale/class/openRenewalCard',
-	
+	//  班级详情-> 病假结束确认
+	leaveLessonsEndOk: API_BASE + '/v2/sale/class/leaveLessonsEndOk',
 	//  获取消息通知列表
 	getMessageList: API_BASE + '/v2/coach/message/getMessageList',
 	//  消息请假同意

+ 50 - 5
pagesClass/classDetail.vue

@@ -38,9 +38,8 @@
 			</view>
 		</u-card>
 		<u-card :title="'事假(' + getStudentsNumber(2) + ')'" title-size="32" margin="0px 0px 10px 0px" :head-style="cardStyle">
-			<u-grid :col="3" slot="body" :border="false">
+			<u-grid :col="3" slot="body" :border="false" v-if="classInfo.studentLeaveRecordList.length">
 				<u-grid-item v-for="(item, index) in classInfo.studentLeaveRecordList" :key="index" :custom-style="gridCustomStyle">
-				<!-- 	<view class="class-student-col" :class="item.agreeType == 1 ? 'student-active' : ''" @click="handleleaveClick(item.leaveRecordId)"> -->
 						<view class="class-student-col" @click="handleleaveClick(item)">
 						{{item.name}}
 						<u-icon :name="item.agreeType == 1 ?  'bookmark-fill' : 'bookmark'" :color="mainColor" size="48"></u-icon>
@@ -48,8 +47,18 @@
 				</u-grid-item>
 			</u-grid>
 		</u-card>
-		<u-card :title="'续费卡(' + getStudentsNumber(3) + ')'" title-size="32" margin="0px 0px 10px 0px" :head-style="cardStyle">
-			<u-grid :col="3" slot="body" :border="false">
+		<u-card :title="'病假结束确认(' + getStudentsNumber(3) + ')'" title-size="32" margin="0px 0px 10px 0px" :head-style="cardStyle">
+			<u-grid :col="3" slot="body" :border="false" v-if="classInfo.studentLeaveList.length">
+				<u-grid-item v-for="(item, index) in classInfo.studentLeaveList" :key="index" :custom-style="gridCustomStyle">
+						<view class="class-student-col" @click="handleOtherClick(item)">
+						{{item.name}}
+						<u-icon :name="item.agreeType == 1 ?  'bookmark-fill' : 'bookmark'" :color="mainColor" size="48"></u-icon>
+					</view>
+				</u-grid-item>
+			</u-grid>
+		</u-card>
+		<u-card :title="'续费卡(' + getStudentsNumber(4) + ')'" title-size="32" margin="0px 0px 10px 0px" :head-style="cardStyle">
+			<u-grid :col="3" slot="body" :border="false"  v-if="classInfo.studentRenewList.length">
 				<u-grid-item v-for="(item, index) in classInfo.studentRenewList" :key="index" :custom-style="gridCustomStyle">
 					<view class="class-student-col" :class="item.state ? 'student-active' : ''" @click="handleVtCardClick(item)">
 						{{item.name}}
@@ -94,6 +103,12 @@
 				<u-button type="warning" shape="circle" :ripple="true" :custom-style="customStyle" @click="handleAgreeClick">同意</u-button>
 			</view>
 		</u-popup>
+		<!-- 病假确认 -->
+		<u-modal v-model="leaveOtherShow" content="提示" show-cancel-button @confirm="handleEndClick">
+			<view style="text-align: center;margin: 10px 0;">
+				是否确认{{ studentName }}的病假结束?
+			</view>
+		</u-modal>
 		<!-- 续费卡 -->
 		<u-popup v-model="vtCardShow" mode="center" border-radius="30" width="600rpx">
 			<view class="common-title">续费卡</view>
@@ -132,6 +147,7 @@
 			return {
 				classId: '',
 				studentId: '',
+				studentName: '',
 				classInfo: {
 					name: '',
 					classStartDate: '',
@@ -164,6 +180,7 @@
 				},
 				leaveShow: false,
 				leaveForm: {},
+				leaveOtherShow: false,
 				vtCardShow: false,
 				vtCardId: '',
 				vtCardValue: '',
@@ -172,10 +189,11 @@
 		},
 		onLoad(options) {
 			this.classId = options.id
+		},
+		onShow() {
 			this.initialize()
 			this.getClassShow()
 		},
-		onReady() {},
 		onPullDownRefresh() {
 			this.initialize()
 			this.getClassShow()
@@ -269,9 +287,36 @@
 					case 2: 
 						return this.classInfo.studentLeaveRecordList.length
 					case 3:
+							return this.classInfo.studentLeaveList.length
+					case 4:
 						return this.classInfo.studentRenewList.length
 				}
 			},
+			handleOtherClick(item) {
+				this.studentId = item.id
+				this.studentName = item.name
+				this.leaveOtherShow = true
+			},
+			// 病假知晓
+			handleEndClick() {
+				NET.request(API.leaveLessonsEndOk,{
+					classId:parseInt(this.classId), studentId:parseInt(this.studentId)
+				},'POST').then(res=> {
+					if(res.status == 10000) {
+						this.$refs.uTips.show({
+							title: res.message,
+							type: 'success',
+						})
+						this.initialize()
+						this.getClassShow()
+					} else {
+						this.$refs.uTips.show({
+							title: res.message,
+							type: 'warning',
+						})
+					}
+				})
+			},
 			// 事假信息
 			handleleaveClick(item) {
 				if(item.agreeType == 1) return

+ 1 - 1
pagesClass/courseForm.vue

@@ -2,7 +2,7 @@
 	<view class="content">
 		<u-form :model="form" ref="form" label-width="140">
 			<u-form-item label="记录内容" prop="content" required>
-				<u-input v-model="form.content" placeholder="请输入记录内容" type="textarea" auto-height />
+				<u-input v-model="form.content" placeholder="请输入记录内容" type="text" />
 			</u-form-item>
 			<u-form-item label="上传附件" label-position="top">
 				<u-upload max-count="5" :multiple="false" :action="uploadUrl" :header="uploadHeader" @on-success="uploadSuccess"

+ 6 - 3
pagesClass/updateClassForm.vue

@@ -238,10 +238,13 @@
 								title: '提交成功',
 								type: 'success',
 							})
+							// setTimeout(() => {
+							// 	uni.reLaunch({
+							// 		url: '/pagesClass/classList' 
+							// 	})
+							// }, 1000)
 							setTimeout(() => {
-								uni.reLaunch({
-									url: '/pagesClass/classList' 
-								})
+								uni.navigateBack({})
 							}, 1000)
 						}).catch(error => {
 							this.$refs.uTips.show({

+ 1 - 1
pagesMain/evaluateDetail.vue

@@ -7,7 +7,7 @@
 			<view class="card-content" slot="body">
 				<view v-if="evaluateInfo.evaluateDetailResult.length==0" style="padding-bottom: 20rpx;">
 					暂无数据
-				<view>
+				</view>
 				<view class="evaluate-list" v-for="(item, index) in evaluateInfo.evaluateDetailResult" :key="index">
 					<view class="evaluate-info">
 						<view class="evaluate-name">{{item.name}}</view>

+ 1 - 1
pagesMain/studentInfo.vue

@@ -63,9 +63,9 @@
 			this.id = options.id
 			this.type = options.type
 			this.classId = options.classId
-			this.initialize()
 		},
 		onShow() {
+			this.initialize()
 			this.isOver = false
 			this.pageIndex = 1
 			this.tableList = []