<template>
  <el-form
    label-width="160px"
    :model="form"
    ref="form"
    label-suffix=": "
  >
    <el-form-item
      label="缴费类型"
      prop="leixing"
      :rules="[{required: true, message: '请选择缴费类型', trigger: 'change'}]"
    >
      <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-form-item
      label="是否赠送乐团网管课"
      prop="isGiveMusicNetwork"
      :rules="[{required: true, message: '请选择是否赠送乐团网管课', trigger: 'change'}]"
    >
      <el-radio-group style="width: 100%" v-model="form.isGiveMusicNetwork">
        <el-radio :label="true">是</el-radio>
        <el-radio :label="false">否</el-radio>
      </el-radio-group>
    </el-form-item>
    <el-form-item
      label="备注"
      prop="memo"
      :rules="[{required: true, message: '请输入备注', trigger: 'blur'}]"
    >
      <el-input type="textarea" v-model="form.memo"></el-input>
    </el-form-item>
    <!-- <el-form-item
      label="缴费金额(元)"
      prop="money"
      :rules="[{required: true, message: '请输入缴费金额', trigger: 'blur'}]"
    >
      <el-input-number
        class="number-input"
        v-model="form.money"
        :controls="false"
        :precision="2"
        :min="1"
        placeholder="请输入缴费金额"
      />
    </el-form-item> -->
    <!-- <el-form-item
      label="缴费有效期"
      prop="value2"
      v-if="!isUserType"
      :rules="[{required: true, message: '请选择缴费有效期', trigger: 'blur'}]"
    >
      <el-date-picker
        v-model="form.value2"
        type="daterange"
        style="width: 100%;"
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期">
      </el-date-picker>
    </el-form-item> -->
  </el-form>
</template>
<script>
export default {
  props: ['form', 'isCommon', 'isUserType', 'typeList', 'charges'],
  data() {
    return {
      options: [
        {
          value: 1,
          label: 1
        }
      ],
    }
  },
  mounted() {
    console.log(this.form)
  },
}
</script>
<style lang="less" scoped>
.number-input{
  /deep/ .el-input__inner {
    text-align: left;
  }

  width: 100%;
}
</style>
