فهرست منبع

Merge branch 'yuetuan' into online

wolyshaw 4 سال پیش
والد
کامیت
4102d1e1ef

+ 1 - 3
src/views/auditList/index.vue

@@ -154,9 +154,7 @@
               <el-button v-permission="'helpCenterContent/modify'"
                          @click="lookDetail(scope.row)"
                          type="text">
-                            <template slot-scope="scope">
-                              {{(scope.row.auditStatus === 'AUDITING' ? '审核' : '查看')}}
-                            </template>
+                            {{(scope.row.auditStatus === 'AUDITING' ? '审核' : '查看')}}
                          </el-button>
             </template>
           </el-table-column>

+ 1 - 3
src/views/resetTeaming/modals/extra-class.vue

@@ -176,14 +176,12 @@ export default {
   },
   computed: {
     list() {
+      console.log(this.form)
       return {
         form: this.form
       }
     }
   },
-  mounted() {
-    console.log(this.clearable)
-  },
   methods: {
     change(val) {
       this.$listeners.moneyChange()

+ 1 - 1
src/views/resetTeaming/modals/review-detail.vue

@@ -35,7 +35,7 @@
               class="alert"
               type="info">
     </el-alert>
-    <descriptions :column="3">
+    <descriptions :column="3" v-if="musicGroupPaymentCalenderCourseSettingName">
       <descriptions-item label="收费标准:">{{
         musicGroupPaymentCalenderCourseSettingName
       }}</descriptions-item>

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

@@ -19,7 +19,7 @@
     <el-form-item
       label="收费标准"
       prop="musicGroupOrganizationCourseSettingId"
-      v-if="isCommon"
+      v-if="isCommon && form.musicGroupOrganizationCourseSettingId != 0 && !this.rowDetail"
       :rules="[{required: true, message: '请选择收费标准', trigger: 'change'}]"
     >
       <el-select style="width: 100%!important;" v-model="form.musicGroupOrganizationCourseSettingId" placeholder="请选择收费标准">
@@ -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 - 11
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" />
@@ -191,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();
   },
@@ -213,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,

+ 26 - 12
src/views/teamDetail/components/modals/create-user-pay.vue

@@ -67,6 +67,7 @@
       :isUserType="true"
       :isCommon="false"
       :isDisabled="true"
+      :courseUnitPriceSettingsByType="organizationCourseUnitPriceSettingsByType"
       @moneyChange="syncAllMoney"
     />
     <el-alert title="缴费设置" :closable="false" class="alert" type="info">
@@ -76,7 +77,7 @@
       :isUserType="true"
       :form.sync="cycle"
       :isCommon="false"
-      :isDisabled="false"
+      :isDisabled="true"
     />
     <div slot="footer" class="dialog-footer">
       <el-button @click="$listeners.close">取 消</el-button>
@@ -89,15 +90,17 @@ import paymentCycle from "../../../resetTeaming/modals/payment-cycle";
 import extraClass from "../../../resetTeaming/modals/extra-class";
 import { musicGroupPaymentCalenderAdd } from '../../../resetTeaming/api'
 import { queryRemainCourseTypeDuration } from '../../api'
-import { getTimes } from "@/utils";
+import { courseType } from '@/constant'
+import { getTimes, objectToOptions } from "@/utils";
 export default {
-  props: ["snapList", "highList", "mixList", "signList", 'createdUserId', 'organizationCourseUnitPriceSettings', 'musicGroupId'],
+  props: ["snapList", "highList", "mixList", "signList", 'createdUserId', 'organizationCourseUnitPriceSettings', 'musicGroupId', 'baseInfo'],
   components: {
     paymentCycle,
     extraClass
   },
   data() {
     return {
+      courseTypeOptions: courseType,
       ids: '',
       form: {
         signClass: '',
@@ -107,15 +110,7 @@ export default {
       },
       cycle: {},
       eclass: [],
-    }
-  },
-  computed: {
-    organizationCourseUnitPriceSettingsByType() {
-      const _ = {}
-      for (const item of this.organizationCourseUnitPriceSettings) {
-        _[item.courseType] = item
-      }
-      return _
+      organizationCourseUnitPriceSettingsByType: {},
     }
   },
   watch: {
@@ -131,6 +126,12 @@ export default {
     'form.snapClass'() {
       this.classChange()
     },
+    baseInfo() {
+      this.formatCourse()
+    }
+  },
+  mounted() {
+    this.formatCourse()
   },
   methods: {
     addExtraClass() {
@@ -153,6 +154,19 @@ export default {
       this.eclass[index] = null;
       this.eclass = this.eclass.filter((item) => !!item);
     },
+    formatCourse() {
+      const organId = this.baseInfo?.organId
+      const chargeTypeId = this.baseInfo?.chargeTypeId
+      const _ = {}
+      const list = (this.organizationCourseUnitPriceSettings || [])
+        .filter(item => organId && organId == item.organId && chargeTypeId && chargeTypeId == item.chargeTypeId)
+      for (const item of list) {
+        _[item.courseType] = item
+      }
+      console.log(_)
+      this.organizationCourseUnitPriceSettingsByType = _
+      return _
+    },
     async classChange() {
       try {
         const ids = [this.form.signClass, this.form.mixClass, this.form.highClass, ...this.form.snapClass].filter(item => !!item).join(',')

+ 24 - 13
src/views/teamDetail/components/studentList.vue

@@ -700,19 +700,24 @@
                    @click="submitAddVisit">确 定</el-button>
       </span>
     </el-dialog>
-    <el-dialog title="选择班级"
-               destroy-on-close
-               width="700px"
-               :visible.sync="createUserPayVisible">
-      <createUserPay :signList="signList"
-                     :mixList="mixList"
-                     :highList="highList"
-                     :snapList="snapList"
-                     :musicGroupId="this.teamid"
-                     :organizationCourseUnitPriceSettings="organizationCourseUnitPriceSettings"
-                     :createdUserId="createdUserId"
-                     @submited="getList"
-                     @close="createUserPayVisible = false" />
+    <el-dialog
+      title="选择班级"
+      destroy-on-close
+      width="700px"
+      :visible.sync="createUserPayVisible"
+    >
+      <createUserPay
+        :signList="signList"
+        :mixList="mixList"
+        :highList="highList"
+        :snapList="snapList"
+        :musicGroupId="this.teamid"
+        :organizationCourseUnitPriceSettings="organizationCourseUnitPriceSettings"
+        :createdUserId="createdUserId"
+        :baseInfo="baseInfo"
+        @submited="getList"
+        @close="createUserPayVisible = false"
+      />
     </el-dialog>
   </div>
 </template>
@@ -726,6 +731,7 @@ import {
   findSubjectPlan,
   getGoods,
   getSubject,
+  getMusicGroup,
   getMusicGroupAllClass,
   StudentFeeIsLock,
   updateStudentFee
@@ -758,6 +764,7 @@ export default {
       quitVisible: false, // 退团信息确认的弹窗
       studentClassVisible: false, // 学员所在班级弹窗
       addStudentVisible: false, //新增学员弹窗
+      teamid: '',
       topFrom: {
         // 顶部的禁选框集合
         expect: "2", // 预期招生
@@ -785,6 +792,7 @@ export default {
       classMask: {
         studentName: ""
       },
+      baseInfo: {},
       searchLsit: [],
       tableList: [], //
       rules: {
@@ -980,6 +988,9 @@ export default {
       //     this.signList = res.data;
       //   }
       // })
+      // 获取乐团基本信息
+      getMusicGroup({ musicGroupId: this.teamid })
+        .then(res => this.baseInfo = res.data)
       // 获取乐团所有合奏课
       getMusicGroupAllClass({ musicGroupId: this.teamid }).then(res => {
         if (res.code == 200) {