Browse Source

vip和乐理课关闭 以及乐理课人数

1
mo 3 years ago
parent
commit
e2e8819ca9

+ 53 - 20
src/views/accompanyManager/accompanyList.vue

@@ -248,9 +248,22 @@
           <el-table-column align="center" label="是否续费" fixed="right">
             <template slot-scope="scope">
               <div>
-                <p v-if="scope.row.type=='FREE'|| scope.row.type=='CARE_PACKAGE' || scope.row.type=='TRIAL' " >免费</p>
-                <p v-if="scope.row.type=='CHARGE'||scope.row.type=='COME_ON_PACKAGE'">
-                   {{ scope.row.beRenewGroupId > 0 ? "续费" : "首充" }}
+                <p
+                  v-if="
+                    scope.row.type == 'FREE' ||
+                    scope.row.type == 'CARE_PACKAGE' ||
+                    scope.row.type == 'TRIAL'
+                  "
+                >
+                  免费
+                </p>
+                <p
+                  v-if="
+                    scope.row.type == 'CHARGE' ||
+                    scope.row.type == 'COME_ON_PACKAGE'
+                  "
+                >
+                  {{ scope.row.beRenewGroupId > 0 ? "续费" : "首充" }}
                 </p>
               </div>
             </template>
@@ -436,7 +449,7 @@ export default {
         practiceGroupType: null,
         groupStatus: null,
       };
-      new Searchs().removeByKey('accompanyList');
+      new Searchs().removeByKey("accompanyList");
       this.search();
     },
     onStudentExport() {
@@ -599,24 +612,44 @@ export default {
       });
     },
     closeCrouse(row) {
-          this.activeRow = row;
-       this.$confirm("请确认是否关闭课程组,关闭后不予退费", "提示", {
+      this.activeRow = row;
+      this.$confirm("请确认是否关闭课程组,关闭后不予退费", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-      }).then(res=>{
-        cancelGroup({
-        groupId: row.id,
-        groupType: "PRACTICE",
-        refundAmount: null,
-      }).then((res) => {
-        if (res.code == 200) {
-          this.$message.success("关闭成功");
-          this.getList();
-          // this.closeVisible = false;
-        }
-      });
-      }).catch(()=>{})
+      })
+        .then((res) => {
+          cancelGroup({
+            groupId: row.id,
+            groupType: "PRACTICE",
+            refundAmount: 0,
+          }).then((res) => {
+            if (res.code == 200) {
+              this.$message.success("关闭成功");
+              this.getList();
+              // this.closeVisible = false;
+            }
+            if (res.code == 206) {
+              this.$confirm(res.msg, "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+              }).then(() => {
+                cancelGroup({
+                  groupId: row.id,
+                  groupType: "PRACTICE",
+                  refundAmount: 0,
+                  confirmReturnActivityGive: true,
+                }).then((res) => {
+                  if (res.code == 200) {
+                    this.$message.success("关闭成功");
+                    this.getList();
+                  }
+                });
+              });
+            }
+          });
+        })
+        .catch(() => {});
 
       // this.closeVisible = true;
     },
@@ -663,7 +696,7 @@ export default {
     newPractice() {
       this.$router.push({
         path: "/business/newPractice",
-        query:{courseType:'PRACTICE'}
+        query: { courseType: "PRACTICE" },
       });
     },
   },

+ 2 - 2
src/views/buildVip/index.vue

@@ -1810,9 +1810,9 @@ export default {
       if (this.isMusicTheory) {
         if (
           this.leftForm.students.length > this.studentLimit ||
-          this.leftForm.students.length < 3
+          this.leftForm.students.length < 1
         ) {
-          this.$message.error(`请选择上课学生为3-${this.studentLimit}人`);
+          this.$message.error(`请选择上课学生为1-${this.studentLimit}人`);
           flag = true;
         }
       } else {

+ 21 - 3
src/views/vipClass/vipDetail/components/vipStudentList.vue

@@ -527,6 +527,24 @@ export default {
           this.$message.success("退学成功");
           this.getStudents();
         }
+        if (res.code == 206) {
+          this.$confirm(res.msg, "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+          }).then(() => {
+            leaveSchool({
+              studentId,
+              vipGroupId,
+              amount,
+              confirmReturnActivityGive: true,
+            }).then((res) => {
+              if (res.code == 200) {
+                this.$message.success("退学成功");
+                this.getStudents();
+              }
+            });
+          });
+        }
       });
     },
     lookFee(scope) {
@@ -685,9 +703,9 @@ export default {
         this.$message.error("请选择一名学生");
         return;
       }
-    let str = ''
+      let str = "";
       let arr = this.deleteList.map((stu) => {
-        str += stu.userName+','
+        str += stu.userName + ",";
         return {
           vipGroupId: this.id,
           studentId: stu.id,
@@ -695,7 +713,7 @@ export default {
           onlineClassesUnitPrice: stu.onlineClassesUnitPrice,
         };
       });
-      str=str.slice(0,str.length-1)
+      str = str.slice(0, str.length - 1);
       // return;
       // let offlineClassesUnitPrice, onlineClassesUnitPrice;
       // this.maskStudentList.forEach((stu) => {