瀏覽代碼

续费过滤可选课程

wolyshaw 4 年之前
父節點
當前提交
d2a2a8547a

+ 1 - 1
src/views/resetTeaming/components/resetPayList.vue

@@ -328,7 +328,7 @@
     <el-dialog
       :title="payFormTitle"
       :visible.sync="userVisible"
-      width="800px"
+      width="830px"
 
     >
       <userPayForm

+ 1 - 1
src/views/resetTeaming/components/resetPayListSchool.vue

@@ -303,7 +303,7 @@
     <el-dialog
       :title="payFormTitle"
       :visible.sync="userVisible"
-      width="800px"
+      width="830px"
 
     >
       <userPayForm

+ 8 - 2
src/views/resetTeaming/modals/user-pay-form.vue

@@ -171,7 +171,7 @@ export default {
       if (val === "1") {
         this.eclass = [];
       } else if (val === "2") {
-        this.eclass = [{}];
+        this.eclass = [];
       }
     },
     "form.musicGroupOrganizationCourseSettingId"(val) {
@@ -253,7 +253,10 @@ export default {
         const eclas = this.chargesById[
           this.form.musicGroupOrganizationCourseSettingId
         ];
-        this.eclass = eclas?.details || [{}];
+        this.eclass = eclas?.details.filter(item => {
+          console.log({...item}, this.paymentType)
+          return !item.isStudentOptional || this.paymentType !== undefined
+        }) || [{}];
 
         this.syncAllMoney();
       } catch (error) {}
@@ -296,6 +299,9 @@ export default {
           }
         });
       }
+      if (this.eclass.length < 1) {
+        return this.$message.error('请至少选择一条加课信息')
+      }
       if (valided.length === forms.length) {
         const { paymentDate, paymentValid, leixing, ...rest } = {
           ...this.form,

+ 12 - 1
src/views/teamDetail/components/modals/classroom-setting.vue

@@ -59,7 +59,7 @@
           :key="key"
         >
           <template #title>
-            <p>{{courseTypeListByName[key]}}, 可排课时长{{musicCourseSettings[key]}}分钟</p>
+            <p class="title">{{courseTypeListByName[key]}}, <span>可排课时长{{musicCourseSettings[key]}}分钟</span></p>
           </template>
           <courseItem
             :surplustime="surplustime[key]"
@@ -253,6 +253,8 @@ export default {
           } catch (error) {
             console.log(error)
           }
+        } else {
+          this.$message.error('请先填写所有表单')
         }
       })
     },
@@ -268,4 +270,13 @@ export default {
     display: block;
     text-align: right;
   }
+  .title{
+    font-size: 16px;
+    padding: 10px;
+    font-weight: normal;
+    >span{
+      color: tomato;
+      font-size: 14px;
+    }
+  }
 </style>