소스 검색

Merge branch 'Nov16thResetMusic' into online

mo 4 년 전
부모
커밋
8e855253da

+ 8 - 12
src/views/teamDetail/componentCourse/compoundClass.vue

@@ -213,16 +213,6 @@ export default {
   },
   methods: {
     submitResetClass () {
-        console.log(this.idList)
-        let arr = this.idList.split(',')
-        for(let i in arr){
-          if(arr[i] == this.id){
-            arr.splice(i,1)
-          }
-        }
-        let ids = arr.splite(',')
-        console.log(ids)
-        return 
       let maskForm = this.maskForm;
       if (!maskForm.startTime || !maskForm.endTime) {
         this.$message.error("请填写开始时间或结束时间");
@@ -238,7 +228,13 @@ export default {
           if (teachingTeacherIdList.length <= 0) {
             let teachingTeacherIdList = null;
           }
-        
+             let arr = this.idList.split(',')
+        for(let i in arr){
+          if(arr[i] == this.id){
+            arr.splice(i,1)
+          }
+        }
+        let ids = arr.join(',')
           let obj = {
             actualTeacherId: maskForm.teacher,
             startClassTimeStr: maskForm.startTime,
@@ -250,7 +246,7 @@ export default {
             groupType: maskForm.groupType,
             schoolId: this.maskForm.address,
             teachMode: this.maskForm.teachMode,
-            mergeCourseIds:this.idList
+            mergeCourseIds:ids
           };
           courseMerge(obj).then(res => {
             if (res.code == 200) {

+ 9 - 2
src/views/teamDetail/components/modals/class-pay-list-item.vue

@@ -187,13 +187,15 @@ export default {
       //   return this.$message.error("请至少选择一条加课信息");
       // }
       if (valided.length === forms.length) {
-        // 说明验证通过
-        const { leixing, ...rest } = {
+        if(Object.keys(this.payItem).length > 0){
+           const { leixing, ...rest } = {
           ...this.form,
           ...this.other,
           musicGroupPaymentCalenderCourseSettingsList: this.corusePayList,
         };
+
         if (this.$refs.cycle) {
+
           const {
             paymentDate,
             paymentValid,
@@ -224,6 +226,11 @@ export default {
           musicGroupId: this.musicGroupId,
         };
         return data;
+        }else{
+          return null
+        }
+        // 说明验证通过 
+       
       } else {
         this.$message.error("请填写必要信息");
         return null;

+ 3 - 4
src/views/teamDetail/components/modals/class-pay-list.vue

@@ -101,16 +101,15 @@ export default {
     gotoLast() {
       const forms = this.getForms();
       let musicGroupPaymentCalenderDtos = []
-      let flag = false
+      // 判断有没有缴费项目(因为又可能没有)
+      // let flag = false
       for (const form of forms) {
          let data =  form.getData()
         if(data){
           musicGroupPaymentCalenderDtos.push(data)
-        }else{
-          flag = true
+
         }
       }
-      if(flag)return;
       // 弹出最后一页
       this.musicGroupPaymentCalenderDtos = musicGroupPaymentCalenderDtos
       this.init()