<style>
  .pintuan-share .box {
    border-top: 1px solid #E8EAEE;
    border-left: 1px solid #E8EAEE;
    border-right: 1px solid #E8EAEE;
    padding: 16px;
  }

</style>
<template>
  <div>
    <el-form-item label="是否开启分销佣金" prop="individual_share" size="small">
      <el-switch :active-value="1" :inactive-value="0" v-model="msg.individual_share">
      </el-switch>
    </el-form-item>
    <template v-if="msg.individual_share == 1">
      <!-- <el-form-item label="分销类型" prop="attr_setting_type" v-if="cForm.use_attr == 1 && ruleForm.type == 'goods'">
        <el-radio v-model="ruleForm.attr_setting_type" :label="0">普通设置</el-radio>
        <el-radio v-model="ruleForm.attr_setting_type" :label="1">详细设置</el-radio>
      </el-form-item> -->
      <el-form-item label="分销佣金类型" prop="share_type" size="small">
        <el-radio v-model="msg.share_type" :label="0">固定金额</el-radio>
        <el-radio v-model="msg.share_type" :label="1">百分比</el-radio>
      </el-form-item>
      <!-- <template v-if="sign !== 'pintuan'">
        <app-goods-share v-model="ruleForm" :is_mch="is_mch" :attr-groups="attrGroups"
          :attr_setting_type="cForm.attr_setting_type" :share_type="ruleForm.share_type" :use_attr="ruleForm.use_attr"
          :sign="sign" pintuan_sign="单独购买"></app-goods-share>
      </template>
      <template v-if="sign === 'pintuan' && cForm.is_alone_buy == 1">
        <app-goods-share v-model="ruleForm" :is_mch="is_mch" :attr-groups="attrGroups"
          :attr_setting_type="ruleForm.attr_setting_type" :share_type="ruleForm.share_type"
          :use_attr="ruleForm.use_attr" :sign="sign" pintuan_sign="单独购买"></app-goods-share>
      </template> -->
      <el-form-item>
        <div class="pintuan-share">
          <el-card>
            <div slot="header" class="clearfix">
              <div class="box">
                <div style="display:inline-block;">
                  <el-tag type="danger">3人团</el-tag>
                </div>
                <label style="margin-bottom:0;padding:18px 10px;">批量设置</label>
                <el-select placeholder="请选择层级" v-model="fenxiao" style="width:130px;" size="small">
                  <el-option label="一级分销" :value="1"></el-option>
                  <el-option label="二级分销" :value="2"></el-option>
                </el-select>
                <el-input type="text" size="small" style="width:150px;margin-top:5px;">
                  <el-button slot="append">元</el-button>
                </el-input>
                <el-button size="small" type="primary">设置</el-button>
              </div>
              <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%;border:1px solid #E8EAEE"
                @selection-change="handleSelectionChange">
                <el-table-column type="selection" width="55">
                </el-table-column>
                <el-table-column label="等级名称" prop="leval" width="100">
                </el-table-column>
                <el-table-column label="一级分销" width="576">
                  <template slot-scope="scope">
                    <el-input type="text" size="small" v-model="scope.row.yiji">
                      <el-button slot="append">元</el-button>
                    </el-input>  
                  </template>
                </el-table-column>
                <el-table-column label="二级分销" width="575">
                  <template slot-scope="scope">
                    <el-input type="text" size="small" v-model="scope.row.erji">
                      <el-button slot="append">元</el-button>
                    </el-input>  
                  </template>
                </el-table-column>
              </el-table>
            </div>
          </el-card>
        </div>
      </el-form-item>
    </template>
  </div>
</template>
<script>
  export default {
    props: {

    },
    data() {
      return {
        fenxiao:0,
        msg: {
          individual_share: 1,
          share_type: 0
        },
        tableData:[
          {
            leval:'默认等级',
            yiji:0,
            erji:3
          }
        ]
      };
    },
    created() {

    },
    methods: {
      handleSelectionChange(){

      }
    },
    mounted() {

    },
    computed: {

    },
  };

</script>
