Explorar el Código

上课人数提示

Changpeng Duan hace 4 años
padre
commit
d904940b0c
Se han modificado 1 ficheros con 15 adiciones y 0 borrados
  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 (