wolyshaw hace 4 años
padre
commit
65405b142e

+ 1 - 1
src/constant/index.js

@@ -57,7 +57,7 @@ export const genderType = {
 
 export const paymentPatternType = {
   0: '按月',
-  1: '按',
+  1: '按学期',
   2: '一次性',
 }
 

+ 14 - 7
src/views/resetTeaming/components/resetPayList.vue

@@ -23,6 +23,7 @@
                 :data="tableList">
         <el-table-column align="center"
                          prop="startPaymentDate"
+                         width="120"
                          label="缴费开始日期">
           <template slot-scope="scope">
             <div>
@@ -31,6 +32,7 @@
           </template>
         </el-table-column>
         <el-table-column align="center"
+                         width="120"
                          prop="deadlinePaymentDate"
                          label="缴费结束日期">
 
@@ -42,6 +44,7 @@
         </el-table-column>
         <el-table-column align="center"
                          prop="expectNum"
+                         width="120"
                          label="预计缴费人数"></el-table-column>
         <el-table-column align="center"
                          prop="paymentPattern"
@@ -54,6 +57,7 @@
         </el-table-column>
         <el-table-column align="center"
                          prop="paymentValidStartDate"
+                         width="150"
                          label="缴费有效期开始日期">
           <template slot-scope="scope">
             <div>
@@ -63,6 +67,7 @@
         </el-table-column>
         <el-table-column align="center"
                          prop="paymentValidEndDate"
+                         width="150"
                          label="缴费有效期结束日期">
           <template slot-scope="scope">
             <div>
@@ -72,22 +77,24 @@
         </el-table-column>
         <el-table-column align="center"
                          prop="actualNum"
+                         width="120"
                          label="实际缴费人数"></el-table-column>
         <el-table-column align="center"
-                         prop="type"
-                         label="状态">
+                         prop="status"
+                         label="缴费状态">
           <template slot-scope="scope">
             <div>
-              {{scope.row.type | paymentType}}
+              {{scope.row.status | paymentType}}
             </div>
           </template>
         </el-table-column>
         <el-table-column align="center"
-                         prop="type"
-                         label="缴费状态">
+                         prop="isGiveMusicNetwork"
+                         width="120"
+                         label="是否赠送网管课">
           <template slot-scope="scope">
             <div>
-              {{scope.row.paymentStatus | paymentListStatus}}
+              {{scope.row.isGiveMusicNetwork ? '是' : '否'}}
             </div>
           </template>
         </el-table-column>
@@ -303,7 +310,7 @@ export default {
       payFormType: 'user',
       userVisible: false,
       schoolVisible: false,
-      reviewVisible: true,
+      reviewVisible: false,
       searchForm: {
         search: null
       },

+ 8 - 1
src/views/resetTeaming/components/strudentPayInfo.vue

@@ -386,6 +386,12 @@ export default {
     this.init();
   },
   activated () {
+    this.teamid = this.$route.query.id;
+    findSound({ musicGroupId: this.teamid }).then(res => {
+      if (res.code == 200) {
+        this.soundList = res.data;
+      }
+    });
     this.init();
   },
   methods: {
@@ -489,6 +495,7 @@ export default {
       })
     },
     addStudentBtn () {
+      console.log('musicGroupId:', this.teamid, 'musicGroupPaymentCalenderId:', this.id)
       // 获取无缴费学员
       queryCanAddStudent({ musicGroupId: this.teamid, musicGroupPaymentCalenderId: this.id }).then(res => {
         if (res.code == 200) {
@@ -666,4 +673,4 @@ export default {
     margin-right: 20px;
   }
 }
-</style>
+</style>

+ 5 - 0
src/views/resetTeaming/modals/extra-class.vue

@@ -87,6 +87,7 @@
             :prop="'form.' + scope.$index + '.courseCurrentPrice'"
             :rules="{ required: true, message: '请输入现价', trigger: 'blur' }"
           >
+            <!-- $listeners.moneyChange -->
             <el-input-number
               size="small"
               style="width: 90%!important;"
@@ -95,6 +96,7 @@
               :controls="false"
               :precision="0"
               :min="1"
+              @change="change"
               placeholder="请输入现价"
             />
           </el-form-item>
@@ -159,6 +161,9 @@ export default {
     }
   },
   methods: {
+    change(val) {
+      this.$listeners.moneyChange()
+    },
     getOldMoney(index) {
       return numeral(this.list.form[index].courseTotalMinuties * this.list.form[index].unitPrice).format('0,0.00')
     }

+ 20 - 1
src/views/resetTeaming/modals/user-pay-form.vue

@@ -28,6 +28,7 @@
         ref="eclass"
         @create="addExtraClass"
         @remove="removeExtraClass"
+        @moneyChange="syncAllMoney"
       />
     </template>
     <extraClass
@@ -37,6 +38,7 @@
       :isCommon="isCommon"
       @create="addExtraClass"
       @remove="removeExtraClass"
+      @moneyChange="syncAllMoney"
     />
     <template>
       <el-alert
@@ -90,6 +92,13 @@ import extraClass from './extra-class'
 import classrooms from './classrooms'
 import otherform from './other'
 
+const paymentTypeFormat = {
+  0: 'MUSIC_RENEW',
+  1: 'ADD_COURSE',
+  2: 'MUSIC_RENEW',
+  3: 'MUSIC_APPLY',
+}
+
 export default {
   props: ['type', 'musicGroupId', 'baseInfo', 'paymentType'],
   components: {
@@ -142,6 +151,7 @@ export default {
       this.cycles = [{}]
       this.collapse = [0]
       this.cycle = {}
+      this.cycle.money = ''
       if (this.form.leixing === '1') {
         this.eclass = []
       } else if (this.form.leixing === '2') {
@@ -151,12 +161,21 @@ export default {
     },
     'form.musicGroupOrganizationCourseSettingId'() {
       this.eclass = this.chargesById[this.form.musicGroupOrganizationCourseSettingId]?.details || []
+      this.syncAllMoney()
     }
   },
   mounted() {
     this.getCharges()
   },
   methods: {
+    syncAllMoney() {
+      let money = 0
+      for (const item of this.eclass) {
+        money += item.courseCurrentPrice
+      }
+      this.$set(this.cycle, 'money', money)
+      return money
+    },
     async getChargeTypeList() {
       try {
         const res = await chargeTypeList({
@@ -218,7 +237,7 @@ export default {
         const { paymentDate, paymentValid, leixing, ...rest } = {...this.form, ...this.other, ...this.cycle, musicGroupPaymentCalenderCourseSettingsList: this.eclass}
         const data = {
           ...rest,
-          paymentType: (this.paymentType == 0 ? this.paymentType : leixing),
+          paymentType: paymentTypeFormat[(this.paymentType == 0 ? this.paymentType : leixing)],
           musicGroupId: this.musicGroupId,
           ...getTimes(paymentDate, ['startPaymentDate', 'deadlinePaymentDate']),
           ...getTimes(paymentValid, ['paymentValidStartDate', 'paymentValidEndDate']),