Explorar el Código

12/04 14:04

11
mo hace 4 años
padre
commit
f18f0092b0

+ 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()