Sfoglia il codice sorgente

Merge branch 'Nov16thResetMusic' into online

wolyshaw 4 anni fa
parent
commit
065ec7d51f

+ 1 - 0
debug.log

@@ -0,0 +1 @@
+[1207/094223.177:ERROR:directory_reader_win.cc(43)] FindFirstFile: 系统找不到指定的路径。 (0x3)

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

@@ -51,6 +51,7 @@
       <template v-if="isUserType && paymentType == '0'">
         <el-form ref="payment" :model="payment">
           <el-form-item
+            label-width="160px"
             label="缴费方式"
             prop="paymentPattern"
             :rules="[{required: true, message: '请选择缴费方式', trigger: 'change'}]"
@@ -314,17 +315,28 @@ export default {
     },
     syncAllMoney () {
       let money = 0;
+      let first = 0
+      let other = 0
       for (const item of this.eclass) {
         money += item.courseCurrentPrice;
+        if (this.cycles && this.cycles.length) {
+          if (item.isStudentOptional) {
+            first += (item.courseCurrentPrice * 100)
+          } else {
+            const floorMoney = Math.floor((item.courseCurrentPrice * 100) / this.cycles.length)
+            const remainder = (item.courseCurrentPrice * 100) % this.cycles.length
+            console.log(remainder, item.courseCurrentPrice, this.cycles.length)
+            first += floorMoney + remainder
+            other += floorMoney
+          }
+        }
       }
       if (this.cycles && 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) / 100 : (floorMoney / 100))
+              paymentAmount: (index === 0 ? first / 100 : (other / 100))
             }
           })
         } else {

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

@@ -325,7 +325,7 @@ export default {
                 obj.classGroupIds = this.classIdList;
                 obj.studentIds = this.studentSubmitedData.seleched;
                 obj.classGroupStudents = this.classGroupStudents
-                console.log(obj);
+                // console.log(obj);
                 await mergeClassSplitClassAffirm(obj);
                 let grend = this.$parent.$parent.$parent.$parent.$parent.$parent
                   .$parent;