Jelajahi Sumber

乐团调整

wolyshaw 4 tahun lalu
induk
melakukan
e2bd94f652

+ 8 - 0
src/constant/index.js

@@ -70,3 +70,11 @@ export const paymentType = {
   0: '续费',
   1: '报名',
 }
+
+export const payStatus = {
+  AUDITING: '审核中',
+  REJECT: '拒绝',
+  NO: '未开启缴费',
+  OPEN: '开启缴费',
+  OVER: '缴费已结束',
+}

+ 6 - 1
src/utils/vueFilter.js

@@ -1,7 +1,7 @@
 import Vue from 'vue'
 import dayjs from 'dayjs'
 import numeral from 'numeral'
-import { feeProject, feeType, saleType } from '../constant'
+import { feeProject, feeType, saleType, payStatus } from '../constant'
 
 // 合并数组
 Vue.filter('joinArray', (value, type) => {
@@ -282,6 +282,11 @@ Vue.filter('returnStatus', value => {
   return template[value]
 })
 
+// 缴费状态
+Vue.filter('payTypeStatus', val => {
+  return payStatus[val]
+})
+
 // 性别
 Vue.filter('sex', value => {
   let template = ['女', '男']

+ 14 - 0
src/views/resetTeaming/api.js

@@ -12,3 +12,17 @@ export const musicGroupPaymentCalenderAdd = data => request2({
   data,
   method: 'post',
 })
+
+export const musicGroupPaymentCalenderView = data => request2({
+  url: '/api-web/musicGroupPaymentCalender/auditListDetail',
+  data: {},
+  params: data,
+  method: 'get',
+})
+
+export const getMusicGroupStu = data => request2({
+  url: '/api-web/studentRegistration/getMusicGroupStu',
+  data: {},
+  params: data,
+  method: 'get',
+})

+ 38 - 12
src/views/resetTeaming/components/resetPayList.vue

@@ -84,7 +84,7 @@
                          label="缴费状态">
           <template slot-scope="scope">
             <div>
-              {{scope.row.status | paymentType}}
+              {{scope.row.status | payTypeStatus}}
             </div>
           </template>
         </el-table-column>
@@ -227,17 +227,21 @@
       </div>
     </el-dialog>
     <el-dialog
-      title="审核"
+      title="查看"
       :visible.sync="reviewVisible"
       width="800px"
       destroy-on-close
     >
-      <review
+      <reviewDetail
         @close="reviewVisible = false"
         @submited="getList"
-        :data="{}"
+        :detail="viewDetail"
         :musicGroupId="$route.query.id"
+        destroy-on-close
       />
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="reviewVisible = false">关闭</el-button>
+      </div>
     </el-dialog>
     <el-dialog
       :title="payFormTitle"
@@ -247,7 +251,7 @@
     >
       <userPayForm
         @close="userVisible = false"
-        @submited="getList"
+        @submited="payedSubmited"
         :type="payFormType"
         :baseInfo="baseInfo"
         :musicGroupId="$route.query.id"
@@ -267,6 +271,8 @@
     </el-dialog>
     <el-dialog title="学员选择"
                :visible.sync="chioseStudentVisible"
+               destroy-on-close
+               append-to-body
                width='800px'>
       <setStudentFee @chioseStudent='chioseStudent'
                      ref='setStudentFee'
@@ -291,11 +297,12 @@ import dayjs from 'dayjs'
 import QRCode from 'qrcodejs2'
 import { vaildStudentUrl } from '@/utils/validate'
 import { addMusicGroupPaymentCalender, getMusicGroupPaymentCalender, resetMusicGroupPaymentCalender, delMusicGroupPaymentCalender } from "@/api/buildTeam";
-import { musicGroupPaymentCalenderQueryPage } from '../api'
+import { musicGroupPaymentCalenderQueryPage, getMusicGroupStu } from '../api'
 import setStudentFee from './studentPayBase'
 import userPayForm from '../modals/user-pay-form'
 import schoolPayForm from '../modals/school-pay-form'
 import review from '../modals/review'
+import reviewDetail from '../modals/review-detail'
 export default {
   props: ['baseInfo'],
   components: {
@@ -303,10 +310,12 @@ export default {
     setStudentFee,
     userPayForm,
     schoolPayForm,
-    review
+    review,
+    reviewDetail
   },
   data () {
     return {
+      musicGroupStu: [],
       payFormType: 'user',
       userVisible: false,
       schoolVisible: false,
@@ -314,6 +323,7 @@ export default {
       searchForm: {
         search: null
       },
+      viewDetail: null,
       tableList: [{}],
       rules: {
         // 分页规则
@@ -354,9 +364,8 @@ export default {
   //生命周期 - 创建完成(可以访问当前this实例)
   created () { },
   //生命周期 - 挂载完成(可以访问DOM元素)
-  mounted () {
+  async mounted () {
     // 获取分部
-
     this.init();
 
   },
@@ -369,7 +378,13 @@ export default {
     this.init();
   },
   methods: {
-    init () {
+    async init () {
+      try {
+        const res = await getMusicGroupStu({
+          musicGroupId: this.$route.query.id,
+        })
+        console.log(res)
+      } catch (error) {}
       this.getList()
     },
     newUserPay() {
@@ -381,7 +396,7 @@ export default {
       this.userVisible = true
     },
     getList () {
-      musicGroupPaymentCalenderQueryPage({ page: this.rules.page, rows: this.rules.limit, musicGroupId: this.$route.query.id }).then(res => {
+      return musicGroupPaymentCalenderQueryPage({ page: this.rules.page, rows: this.rules.limit, musicGroupId: this.$route.query.id }).then(res => {
         if (res.code == 200) {
           this.rules.total = res.data.total
           this.tableList = res.data.rows;
@@ -393,6 +408,12 @@ export default {
         this.payForm.paymentValidEndDate = null
       }
     },
+    async payedSubmited() {
+      try {
+        await this.getList()
+        this.chioseStudentVisible = true
+      } catch (error) {}
+    },
     onCreateQRCode () { // 生成报名二维码
       this.qrcodeStatus = true
       let id = this.$route.query.id
@@ -452,7 +473,12 @@ export default {
     lookDetail (row) {
       let query = this.$route.query
       this.$route.query.paymentId = row.id;
-      this.$router.push({ path: '/business/strudentPayInfo', query })
+      this.viewDetail = row
+      if (row.payUserType === 'SCHOOL') {
+        this.reviewVisible = row
+      } else {
+        this.$router.push({ path: '/business/strudentPayInfo', query })
+      }
     },
     setStudentPay () {
       let query = this.$route.query

+ 2 - 2
src/views/resetTeaming/modals/payment-cycle.vue

@@ -8,12 +8,12 @@
   >
     <el-form-item
       label="缴费金额(元)"
-      prop="money"
+      prop="paymentAmount"
       :rules="[{required: true, message: '请输入缴费金额', trigger: 'blur'}]"
     >
       <el-input-number
         class="number-input"
-        v-model="form.money"
+        v-model="form.paymentAmount"
         :controls="false"
         :precision="2"
         :min="1"

+ 128 - 0
src/views/resetTeaming/modals/review-detail.vue

@@ -0,0 +1,128 @@
+<template>
+  <div>
+    <el-alert
+      title="申请信息"
+      :closable="false"
+      class="alert"
+      type="info">
+    </el-alert>
+    <descriptions :column="3">
+      <descriptions-item label="分部名称:">{{auditDto.organName}}</descriptions-item>
+      <descriptions-item label="乐团名称:">{{auditDto.musicGroupName}}</descriptions-item>
+      <descriptions-item label="乐团编号:">{{auditDto.musicGroupId}}</descriptions-item>
+      <descriptions-item label="申请时间:">{{auditDto.paymentType}}</descriptions-item>
+      <descriptions-item label="申请类型:">申请类型</descriptions-item>
+      <descriptions-item label="订单类型:">订单类型</descriptions-item>
+      <descriptions-item label="学员数量:">{{studentNum}}</descriptions-item>
+    </descriptions>
+    <el-alert
+      title="课程信息"
+      :closable="false"
+      class="alert"
+      type="info">
+    </el-alert>
+    <descriptions :column="3">
+      <descriptions-item label="收费标准:">{{auditDto.musicGroupPaymentCalenderId}}</descriptions-item>
+    </descriptions>
+      <el-table
+        :data="[]"
+        stripe
+        style="width: 100%">
+        <el-table-column
+          prop="date"
+          label="课程类型"
+          width="120">
+        </el-table-column>
+        <el-table-column
+          prop="name"
+          label="是否免费"
+          width="100">
+        </el-table-column>
+        <el-table-column
+          prop="address"
+          label="课程总时长(分钟)">
+        </el-table-column>
+        <el-table-column
+          prop="address"
+          label="现价(元)">
+        </el-table-column>
+        <el-table-column
+          prop="address"
+          label="原价(元)">
+        </el-table-column>
+      </el-table>
+    <el-alert
+      title="缴费周期"
+      :closable="false"
+      class="alert"
+      type="info">
+    </el-alert>
+    <descriptions :column="2">
+      <descriptions-item label="缴费金额:">{{auditDto.paymentAmount}}</descriptions-item>
+      <descriptions-item label="缴费方式:">{{auditDto.paymentType}}</descriptions-item>
+      <descriptions-item label="缴费日期:">{{auditDto.paymentValidStartDate}} - {{auditDto.paymentValidEndDate}}</descriptions-item>
+      <descriptions-item label="缴费有效期:">缴费有效期</descriptions-item>
+    </descriptions>
+    <el-alert
+      title="其他"
+      :closable="false"
+      class="alert"
+      type="info">
+    </el-alert>
+    <descriptions :column="2">
+      <descriptions-item label="是否赠送乐团网管课:">{{detail.isGiveMusicNetwork ? '是' : '否'}}</descriptions-item>
+      <descriptions-item label="备注:">{{detail.memo}}</descriptions-item>
+    </descriptions>
+  </div>
+</template>
+<script>
+import Vue from 'vue'
+import { musicGroupPaymentCalenderView } from '../api'
+import descriptions from '@/components/Descriptions'
+Vue.use(descriptions)
+const initData = {
+  auditDto: {},
+  musicGroupPaymentCalenderCourseSettings: [],
+  simpleUserDto: [],
+  studentNum: 0,
+}
+export default {
+  props: ['detail'],
+  data() {
+    return {
+      ...initData,
+    }
+  },
+  async mounted() {
+    try {
+      const res = await musicGroupPaymentCalenderView({
+        calenderId: this.detail.id,
+        musicGroupId: this.detail.musicGroupId,
+      })
+      for (const key in initData) {
+        if (initData.hasOwnProperty(key)) {
+          this[key] = res.data[key]
+        }
+      }
+    } catch (error) {}
+  },
+}
+</script>
+<style lang="less" scoped>
+  .alert{
+    margin: 10px 0;
+  }
+  // /deep/ .description-view{
+  //   border: none;
+  //     .description-tr{
+  //       border-bottom: none;
+  //     }
+  //     .description-label{
+  //       border-right: none;
+  //       background-color: transparent;
+  //     }
+  //     .description-content{
+  //       border-right: none;
+  //     }
+  // }
+</style>

+ 9 - 92
src/views/resetTeaming/modals/review.vue

@@ -1,78 +1,8 @@
 <template>
   <div>
-    <el-alert
-      title="申请信息"
-      :closable="false"
-      class="alert"
-      type="info">
-    </el-alert>
-    <descriptions :column="3">
-      <descriptions-item label="分部名称:">分部名称</descriptions-item>
-      <descriptions-item label="乐团名称:">乐团名称</descriptions-item>
-      <descriptions-item label="乐团编号:">乐团编号</descriptions-item>
-      <descriptions-item label="申请时间:">申请时间</descriptions-item>
-      <descriptions-item label="申请类型:">申请类型</descriptions-item>
-      <descriptions-item label="订单类型:">订单类型</descriptions-item>
-      <descriptions-item label="学员数量:">学员数量</descriptions-item>
-    </descriptions>
-    <el-alert
-      title="课程信息"
-      :closable="false"
-      class="alert"
-      type="info">
-    </el-alert>
-    <descriptions :column="3">
-      <descriptions-item label="收费标准:">收费标准</descriptions-item>
-    </descriptions>
-      <el-table
-        :data="[]"
-        stripe
-        style="width: 100%">
-        <el-table-column
-          prop="date"
-          label="课程类型"
-          width="120">
-        </el-table-column>
-        <el-table-column
-          prop="name"
-          label="是否免费"
-          width="100">
-        </el-table-column>
-        <el-table-column
-          prop="address"
-          label="课程总时长(分钟)">
-        </el-table-column>
-        <el-table-column
-          prop="address"
-          label="现价(元)">
-        </el-table-column>
-        <el-table-column
-          prop="address"
-          label="原价(元)">
-        </el-table-column>
-      </el-table>
-    <el-alert
-      title="缴费周期"
-      :closable="false"
-      class="alert"
-      type="info">
-    </el-alert>
-    <descriptions :column="2">
-      <descriptions-item label="缴费金额:">缴费金额</descriptions-item>
-      <descriptions-item label="缴费方式:">缴费方式</descriptions-item>
-      <descriptions-item label="缴费日期:">缴费日期</descriptions-item>
-      <descriptions-item label="缴费有效期:">缴费有效期</descriptions-item>
-    </descriptions>
-    <el-alert
-      title="其他"
-      :closable="false"
-      class="alert"
-      type="info">
-    </el-alert>
-    <descriptions :column="2">
-      <descriptions-item label="是否赠送乐团网管课:">缴费金额</descriptions-item>
-      <descriptions-item label="备注:">缴费方式</descriptions-item>
-    </descriptions>
+    <reviewDetail
+      :detail="detail"
+    />
     <el-alert
       title="审核意见"
       :closable="false"
@@ -100,10 +30,13 @@
 </template>
 <script>
 import Vue from 'vue'
-import descriptions from '@/components/Descriptions'
-Vue.use(descriptions)
+import reviewDetail from './review-detail'
+
 export default {
-  props: ['data'],
+  props: ['detail'],
+  components: {
+    reviewDetail
+  },
   data() {
     return {
       remark: ''
@@ -124,20 +57,4 @@ export default {
     display: block;
     text-align: right;
   }
-  .alert{
-    margin: 10px 0;
-  }
-  /deep/ .description-view{
-    border: none;
-      .description-tr{
-        border-bottom: none;
-      }
-      .description-label{
-        border-right: none;
-        background-color: transparent;
-      }
-      .description-content{
-        border-right: none;
-      }
-  }
 </style>

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

@@ -93,10 +93,10 @@ import classrooms from './classrooms'
 import otherform from './other'
 
 const paymentTypeFormat = {
-  0: 'MUSIC_RENEW',
-  1: 'ADD_COURSE',
-  2: 'MUSIC_RENEW',
-  3: 'MUSIC_APPLY',
+  0: 'MUSIC_APPLY',
+  1: 'MUSIC_RENEW',
+  2: 'ADD_COURSE',
+  3: 'ADD_STUDENT',
 }
 
 export default {
@@ -160,7 +160,8 @@ export default {
       }
     },
     'form.musicGroupOrganizationCourseSettingId'() {
-      this.eclass = this.chargesById[this.form.musicGroupOrganizationCourseSettingId]?.details || []
+      const eclas = this.chargesById[this.form.musicGroupOrganizationCourseSettingId]
+      this.eclass = eclas?.details || []
       this.syncAllMoney()
     }
   },
@@ -224,7 +225,6 @@ export default {
     },
     async submit() {
       const forms = this.getForms()
-      console.log(forms)
       const valided = []
       for (const form of forms) {
         form.validate(valid => {
@@ -242,10 +242,10 @@ export default {
           ...getTimes(paymentDate, ['startPaymentDate', 'deadlinePaymentDate']),
           ...getTimes(paymentValid, ['paymentValidStartDate', 'paymentValidEndDate']),
         }
-        console.log(data)
         try {
           await musicGroupPaymentCalenderAdd(data)
-          // this.nextVisible = true
+          this.$listeners.close()
+          this.$listeners.submited()
         } catch (error) {}
       }
     }

+ 10 - 10
src/views/teamDetail/components/studentList.vue

@@ -349,7 +349,7 @@
                             placeholder="选择日期"></el-date-picker>
           </el-col>
         </el-form-item>
-        <br />
+        <!-- <br />
         <el-form-item label="单技班">
           <el-select v-model.trim="maskForm.signClass"
                      filterable
@@ -359,8 +359,8 @@
                        :value="item.id"
                        :label="item.name"></el-option>
           </el-select>
-        </el-form-item>
-        <el-form-item label="合奏班">
+        </el-form-item> -->
+        <!-- <el-form-item label="合奏班">
           <el-select v-model.trim="maskForm.mixClass"
                      filterable
                      clearable>
@@ -369,8 +369,8 @@
                        :value="item.id"
                        :label="item.name"></el-option>
           </el-select>
-        </el-form-item>
-        <el-form-item label="基础技能班">
+        </el-form-item> -->
+        <!-- <el-form-item label="基础技能班">
           <el-select v-model.trim="maskForm.highClass"
                      filterable
                      clearable>
@@ -379,8 +379,8 @@
                        :value="item.id"
                        :label="item.name"></el-option>
           </el-select>
-        </el-form-item>
-        <el-form-item label="临时班">
+        </el-form-item> -->
+        <!-- <el-form-item label="临时班">
           <el-select v-model.trim="maskForm.snapClass"
                      filterable
                      clearable
@@ -390,7 +390,7 @@
                        :value="item.id"
                        :label="item.name"></el-option>
           </el-select>
-        </el-form-item>
+        </el-form-item> -->
         <!-- <el-form-item label="线上基础技能班">
           <el-select v-model.trim="maskForm.highonline"
                      filterable
@@ -487,7 +487,7 @@
             </el-form-item>
           </el-col>
         </el-form-item> -->
-        <el-alert
+        <!-- <el-alert
           title="缴费周期设置"
           :closable="false"
           class="alert"
@@ -519,7 +519,7 @@
           size="small"
           style="width: 100%;margin: 20px 0;"
           @click="addCycle"
-        >新增缴费周期</el-button>
+        >新增缴费周期</el-button> -->
       </el-form>
       <div slot="footer"
            class="dialog-footer">