<template>
  <div class="pay-container">
    <el-tabs v-model.trim="activeIndex"
             type="card"
             @tab-click="handleClick">
      <el-tab-pane label="学员缴费"
                   v-if="permission('/resetTeaming/teamBaseInfo')"
                   name="1">
        <resetPayList :isNewGropu="true"
                      :baseInfo="baseInfo" />
      </el-tab-pane>
      <el-tab-pane label="学校缴费"
                   v-if="permission('/resetTeaming/resetSound')"
                   name="2">
        <resetPayListSchool :isNewGropu="true"
                            :baseInfo="baseInfo"
                            v-if="activeIndex == 2" />
      </el-tab-pane>
    </el-tabs>

    <div class="btnWrap">
      <div class="PrevBtn"
           @click="goback">上一步</div>
      <!--  v-if="teamStatus != 'teamAudit'" -->
      <div class="submitBtn"
           @click="goHome">确定</div>
    </div>
  </div>
</template>
<script>
// import { payOrderTypeList}  from "@/utils/searchArray";
import resetPayList from "@/views/resetTeaming/components/resetPayList";
import resetPayListSchool from '@/views/resetTeaming/components/resetPayListSchool'
import { permission } from '@/utils/directivePage'
export default {
  props: ["baseInfo"],
  components: { resetPayList, resetPayListSchool },
  data () {
    return {
      activeIndex: '1',
    };
  },
  created () {
    console.log(this.baseInfo)
  },
  methods: {
    goback () {
      this.$emit("chiosetab", 1);
    },
    submitAudit () {
      let teamId = this.$route.query.id;
    },
    handleClick (val) {
      this.activeIndex = val.name
    },
    permission (str) {
      return permission(str)
    },
    goHome () {
      let query = this.$route.query
      this.$router.push({
        path: '/business/teamDetail',
        query: {
          ...query
        }
      })
    }
  },
};
</script>
<style lang="scss" scoped>
.btnWrap {
  margin-top: 40px;
  .PrevBtn {
    background-color: #13817a;
    width: 120px;
  }
  .submitBtn {
    background-color: #13817a;
    width: 120px;
  }
}
</style>