瀏覽代碼

fix 回写问题

wolyshaw 4 年之前
父節點
當前提交
2ef3cacc8f
共有 1 個文件被更改,包括 13 次插入2 次删除
  1. 13 2
      src/views/resetTeaming/modals/user-pay-form.vue

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

@@ -80,6 +80,7 @@ import {
   chargeTypeList,
   musicGroupOrganizationCourseSettingsQueryPage,
 } from "@/api/specialSetting";
+import { getMusicGroupPaymentCalenderDetail } from '@/api/buildTeam'
 import {
   musicGroupPaymentCalenderAdd,
   musicGroupPaymentCalenderDetailBatchUpdate,
@@ -200,7 +201,7 @@ export default {
     this.init();
   },
   methods: {
-    init () {
+    async init () {
       this.getCharges();
       if (this.rowDetail) {
         for (const key in paymentTypeFormat) {
@@ -211,13 +212,23 @@ export default {
             }
           }
         }
-        this.form.musicGroupOrganizationCourseSettingId = this.rowDetail.musicGroupOrganizationCourseSettingId;
         this.$set(
           this.other,
           "isGiveMusicNetwork",
           this.rowDetail.isGiveMusicNetwork
         );
         this.$set(this.other, "memo", this.rowDetail.memo);
+        if (this.rowDetail.musicGroupOrganizationCourseSettingId) {
+          this.form.musicGroupOrganizationCourseSettingId = this.rowDetail.musicGroupOrganizationCourseSettingId;
+        } else {
+          try {
+            const res = await getMusicGroupPaymentCalenderDetail({
+              id: this.rowDetail.id
+            })
+            this.eclass = res.data.musicGroupPaymentCalenderCourseSettings
+            this.syncAllMoney()
+          } catch (error) {}
+        }
       }
     },
     formatCourse() {