Explorar el Código

修复显示问题

wolyshaw hace 4 años
padre
commit
77cf15aeb7

+ 2 - 2
src/views/resetTeaming/modals/user-baseinfo.vue

@@ -34,7 +34,7 @@
     <el-alert
       :closable="false"
       style="margin-left: 160px;width: auto;"
-      v-if="paymentType != 0 && isCommon"
+      v-if="paymentType != 0 && isCommon && !rowDetail"
       type="warning">
       <template #title>
         <p>该乐团为{{chargeTypeName}}模式,若需创建其他模式的收费标准,请先修改乐团基本信息中的乐团模式
@@ -46,7 +46,7 @@
 </template>
 <script>
 export default {
-  props: ['form', 'isCommon', 'isUserType', 'typeList', 'charges', 'paymentType', 'chargeTypeName'],
+  props: ['form', 'isCommon', 'isUserType', 'typeList', 'charges', 'paymentType', 'chargeTypeName', 'rowDetail'],
   mounted() {
 
   },

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

@@ -12,6 +12,7 @@
                   @changeActive="changeActive"
                   :typeList="typeList"
                   :charges="charges"
+                  :rowDetail="rowDetail"
                   :chargeTypeName="chargeTypeName"
                   :paymentType="paymentType"
                   ref="base" />
@@ -182,7 +183,6 @@ export default {
         const res = await queryByMusicGroupOrganizationCourseSettingsId({
           id: val
         })
-        console.log(res.data)
         this.eclass = res.data.filter(item => {
           return !item.isStudentOptional || this.paymentType !== undefined
         }) || [{}];
@@ -192,17 +192,6 @@ export default {
     },
   },
   mounted () {
-    if (this.rowDetail) {
-      for (const key in paymentTypeFormat) {
-        if (paymentTypeFormat.hasOwnProperty(key)) {
-          const item = paymentTypeFormat[key];
-          if (item === this.rowDetail.paymentType) {
-            console.log(key)
-            this.paymentType = key
-          }
-        }
-      }
-    }
     this.formatCourse()
     this.init();
   },
@@ -214,6 +203,14 @@ export default {
     init () {
       this.getCharges();
       if (this.rowDetail) {
+        for (const key in paymentTypeFormat) {
+          if (paymentTypeFormat.hasOwnProperty(key)) {
+            const item = paymentTypeFormat[key];
+            if (item === this.rowDetail.paymentType) {
+              this.paymentType = key
+            }
+          }
+        }
         this.form.musicGroupOrganizationCourseSettingId = this.rowDetail.musicGroupOrganizationCourseSettingId;
         this.$set(
           this.other,