소스 검색

上课人数提示

Changpeng Duan 5 년 전
부모
커밋
d904940b0c
1개의 변경된 파일15개의 추가작업 그리고 0개의 파일을 삭제
  1. 15 0
      pc/src/views/courseEdit.vue

+ 15 - 0
pc/src/views/courseEdit.vue

@@ -954,6 +954,21 @@ export default {
 		// 确认上课
 		confirmBegin() {
 			let that = this;
+			// 根据课程类型提示最大上课人数
+			let ClassType = parseInt(this.$route.query.ClassType);
+			if(ClassType == 1 && this.tableData.length > 30){
+				that.$message.error('团课做多上课人数不应超过30人');
+				return false
+			} 
+			if(ClassType == 2 && this.tableData.length > 16){
+				that.$message.error('2队pk课最多上课人数不应超过16人');
+				return false
+			} 
+			if(ClassType == 3 && this.tableData.length > 24){
+				that.$message.error('2队pk课最多上课人数不应超过24人');
+				return false
+			}
+
 			// 没绑心率带不能开课,预约未到的不管他
 			for (var i = 0; i < this.tableData.length; i++) {
 				if (