Ver código fonte

乐团改造修改

wolyshaw 4 anos atrás
pai
commit
a7465cc636

+ 5 - 2
src/views/resetTeaming/components/resetPayList.vue

@@ -140,6 +140,7 @@
     >
       <pay-items
         v-if="itemsVisible"
+        ref="payItems"
         :batchNo="viewDetail && viewDetail.batchNo"
         payUserType="STUDENT"
         :teamStatus="teamStatus"
@@ -614,14 +615,16 @@ export default {
       obj.userIdList = this.chioseStudentList.map((stu) => {
         return stu.userId;
       });
-      obj.batchNo = this.batchNo;
+      obj.musicGroupPaymentCalenderId = this.musicGroupPaymentCalenderId;
+      this.$refs.payItems?.getList()
       musicGroupPaymentCalenderDetailBatchAdd(obj).then((res) => {
         if (res.code == 200) {
           this.$message.success("添加成功");
           this.$refs.setStudentFee.clearTable();
           this.payVisible = false;
           this.chioseStudentVisible = false;
-          this.getList();
+          // this.getList();
+
         }
       });
     },

+ 5 - 0
src/views/resetTeaming/components/resetPayListSchool.vue

@@ -258,6 +258,7 @@
     >
       <pay-items
         v-if="itemsVisible"
+        ref="payItems"
         :batchNo="viewDetail && viewDetail.batchNo"
         payUserType="STUDENT"
         :teamStatus="teamStatus"
@@ -306,6 +307,7 @@
                width='800px'>
       <setStudentFee @chioseStudent='chioseStudent'
                      ref='setStudentFee'
+                     :batchNo="batchNo"
                      :musicGroupPaymentCalenderId="musicGroupPaymentCalenderId"
                      @submited="chioseStudentSubmited"
                      :clearTale="clearStduent"></setStudentFee>
@@ -422,6 +424,7 @@ export default {
       chioseStudentVisible: false,
       chioseStudentList: [],
       clearStduent: true,
+      batchNo: "",
       musicGroupPaymentCalenderId: "",
       payOrderTypeLists: payOrderTypeList,
       getMoneyVisible: false
@@ -597,6 +600,7 @@ export default {
         return stu.userId;
       });
       obj.musicGroupPaymentCalenderId = this.musicGroupPaymentCalenderId;
+      this.$refs.payItems?.getList()
       musicGroupPaymentCalenderDetailBatchAdd(obj).then((res) => {
         if (res.code == 200) {
           this.$message.success("添加成功");
@@ -667,6 +671,7 @@ export default {
     },
     openChioseStudent (row) {
       this.chioseStudentVisible = true;
+      this.batchNo = row.batchNo;
       this.musicGroupPaymentCalenderId = row.id;
     },
     async payedSubmited (data) {

+ 5 - 4
src/views/resetTeaming/modals/review-detail.vue

@@ -46,8 +46,9 @@
         </template>
       </el-table-column>
       <el-table-column prop="isStudentOptional"
-                       label="是否免费"
-                       width="100">
+                       label="是否可选"
+                       width="100px">
+                       <template slot-scope="scope">{{scope.row.isStudentOptional ? '是' : '否'}}</template>
       </el-table-column>
       <el-table-column prop="courseTotalMinuties"
                        label="课程总时长(分钟)">
@@ -74,8 +75,8 @@
       <descriptions-item :span="3" v-if="item.payUserType !== 'SCHOOL'"
                          label="缴费日期:">{{ item.startPaymentDate|dayjsFormat }} -
         {{ item.deadlinePaymentDate|dayjsFormat }}</descriptions-item>
-      <descriptions-item :span="3" label="缴费有效期:">{{ item.paymentValidStartDate }} -
-        {{ item.paymentValidEndDate }}</descriptions-item>
+      <descriptions-item :span="3" label="缴费有效期:">{{ item.paymentValidStartDate | dayjsFormat }} -
+        {{ item.paymentValidEndDate | dayjsFormat }}</descriptions-item>
     </descriptions>
     <el-dialog :visible.sync="payVisible"
                :close-on-click-modal="false"

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

@@ -318,13 +318,13 @@ export default {
         money += item.courseCurrentPrice;
       }
       if (this.cycles && this.cycles.length) {
-        const floorMoney = Math.floor(money / this.cycles.length)
-        const remainder = money % this.cycles.length
+        const floorMoney = Math.floor((money * 100) / this.cycles.length)
+        const remainder = (money * 100) % this.cycles.length
         if (this.paymentAmountDisabled) {
           this.cycles = this.cycles.map((item, index) => {
             return {
               ...item,
-              paymentAmount: (index === 0 ? floorMoney + remainder : floorMoney)
+              paymentAmount: (index === 0 ? (floorMoney + remainder) / 100 : (floorMoney / 100))
             }
           })
         } else {