<template>
  <el-form
    label-width="160px"
    :model="form"
    ref="form"
    label-suffix=": "
  >
    <el-form-item
      label="缴费类型"
      prop="leixing"
      :rules="[{required: true, message: '请选择缴费类型', trigger: 'change'}]"
      v-if="typeof paymentType === 'undefined'"
    >
      <el-radio-group style="width: 100%" v-model="form.leixing">
        <el-radio label="1">乐团课程</el-radio>
        <el-radio label="2">临时加课</el-radio>
      </el-radio-group>
    </el-form-item>
    <!-- <el-form-item
      label="乐团模式"
      prop="moshi"
      v-if="isCommon"
      :rules="[{required: true, message: '请选择乐团模式', trigger: 'change'}]"
    >
      <el-select
        style="width: 100%!important;"
        v-model="form.moshi"
        placeholder="请选择乐团模式"
        @change="$listeners.getCharges"
      >
        <el-option
          v-for="item in typeList"
          :key="item.id"
          :label="item.name"
          :value="item.id">
        </el-option>
      </el-select>
    </el-form-item> -->
    <el-form-item
      label="收费标准"
      prop="musicGroupOrganizationCourseSettingId"
      v-if="isCommon"
      :rules="[{required: true, message: '请选择收费标准', trigger: 'change'}]"
    >
      <el-select style="width: 100%!important;" v-model="form.musicGroupOrganizationCourseSettingId" placeholder="请选择收费标准">
        <el-option
          v-for="item in charges"
          :key="item.id"
          :label="item.name"
          :value="item.id">
        </el-option>
      </el-select>
    </el-form-item>
    <el-alert
      :closable="false"
      style="margin-left: 160px;width: auto;"
      v-if="paymentType != 0 && isCommon"
      type="warning">
      <template #title>
        <p>该乐团为3.0模式，若需创建其他模式的收费标准，请先乐团基本信息的乐团模式
          <strong style="font-weight: 600;margin-left: 10px;cursor: pointer;" @click="$listeners.changeActive({name: '1'})">立即修改>></strong>
      </p>
      </template>
    </el-alert>
  </el-form>
</template>
<script>
export default {
  props: ['form', 'isCommon', 'isUserType', 'typeList', 'charges', 'paymentType'],
  mounted() {
    console.log(this.form)
  },
}
</script>
<style lang="less" scoped>
.number-input{
  /deep/ .el-input__inner {
    text-align: left;
  }

  width: 100%;
}
</style>
