createPayment.vue 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <div class="m-container">
  3. <h2>
  4. <el-page-header @back="onCancel" :content="teamName"></el-page-header>
  5. </h2>
  6. <el-tabs v-model.trim="activeIndex"
  7. type="card"
  8. @tab-click="handleClick">
  9. <el-tab-pane label="学员缴费"
  10. v-if="permission('/resetTeaming/teamBaseInfo')"
  11. name="1">
  12. <resetPayList :isNewGropu="true"
  13. :baseInfo="baseInfo" />
  14. </el-tab-pane>
  15. <el-tab-pane label="学校缴费"
  16. v-if="permission('/resetTeaming/resetSound')"
  17. name="2">
  18. <resetPayListSchool :isNewGropu="true"
  19. :baseInfo="baseInfo"
  20. v-if="activeIndex == 2" />
  21. </el-tab-pane>
  22. </el-tabs>
  23. <div style="text-align: right;">
  24. <el-button type="primary" @click="goHome">确定</el-button>
  25. </div>
  26. </div>
  27. </template>
  28. <script>
  29. import resetPayList from "@/views/resetTeaming/components/resetPayList";
  30. import resetPayListSchool from '@/views/resetTeaming/components/resetPayListSchool'
  31. import { permission } from "@/utils/directivePage";
  32. import { getTeamBaseInfo } from "@/api/buildTeam";
  33. export default {
  34. name: 'createPayment',
  35. components: { resetPayList, resetPayListSchool },
  36. data () {
  37. const query = this.$route.query
  38. return {
  39. teamName: query.name,
  40. musicGroupId: query.id,
  41. activeIndex: '1',
  42. baseInfo: {}
  43. };
  44. },
  45. mounted() {
  46. // getTeamBaseInfo
  47. this.getList()
  48. },
  49. methods: {
  50. permission,
  51. handleClick (val) {
  52. this.activeIndex = val.name
  53. },
  54. onCancel() {
  55. this.$store.dispatch('delVisitedViews', this.$route)
  56. this.$router.push({ path: "/business/teamDetail" });
  57. },
  58. async getList() {
  59. await getTeamBaseInfo({ musicGroupId: this.musicGroupId }).then((res) => {
  60. if (res.code == 200) {
  61. this.baseInfo = res.data
  62. }
  63. });
  64. },
  65. goHome () {
  66. this.$store.dispatch('delVisitedViews', this.$route)
  67. this.$router.push({
  68. path: '/business/teamDetail',
  69. })
  70. }
  71. }
  72. }
  73. </script>