<template>
  <div id="claimForm">
    <el-row>
      <el-col :span="24" class="form">
        <el-form :model="ruleForm" v-if="ruleForm[0].jg_pro_id == 0" ref="ruleForm" label-width="200px" class="demo-ruleForm">
          <el-form-item label="融资金额（万元）：">
            <span>{{ ruleForm[0].money }}</span>
          </el-form-item>
          <el-form-item label="融资用途：">
            <span>{{ ruleForm[0].use }}</span>
          </el-form-item>
          <el-form-item label="期望利率范围：">
            <span>{{ ruleForm[0].mongey_min_rate }}%~{{ ruleForm[0].mongey_max_rate }}%</span>
          </el-form-item>
          <el-form-item label="期望融资期限(个月)：">
            <span>{{ ruleForm[0].claims_min_term }}个月~{{ ruleForm[0].claims_max_term }}个月</span>
          </el-form-item>
          <el-form-item label="担保方式：">
            <span>{{ ruleForm[0].hyname }}</span>
          </el-form-item>
          <el-form-item label="项目情况：">
            <span>{{ ruleForm[0].project_status }}</span>
          </el-form-item>
          <!--<el-form-item label="辅助资料（点击查看）：">-->
            <!--<el-link :href="ruleForm[0].cdata" :underline="false">{{ ruleForm[0].cdata }}</el-link>-->
          <el-form-item label="资料（企业报告）：">
            <el-link :href="'https://jlxwjr.jljrkg.com/files/financial/custom/20200510160327.docx'" :underline="false">企业报告导出模板-长春企业 </el-link>
          </el-form-item>
          <el-form-item v-if="saw == '1'">
            <el-button type="primary" size="small" @click="fallow">分配</el-button>
          </el-form-item>
          <el-form-item v-else>
            <el-button type="info" size="small">已分配</el-button>
          </el-form-item>
        </el-form>
        <!---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->
        <el-form :model="ruleForm" :rules="rules" v-else ref="ruleForm" label-width="200px" class="demo-ruleForm">
          <el-form-item label="融资金额（万元）：">
            <span>{{ ruleForm[0].money }}</span>
          </el-form-item>
          <el-form-item label="融资用途：">
            <span>{{ ruleForm[0].use }}</span>
          </el-form-item>
          <el-form-item label="期望利率范围：">
            <span>{{ ruleForm[0].mongey_min_rate }}%~{{ ruleForm[0].mongey_max_rate }}%</span>
          </el-form-item>
          <el-form-item label="期望融资期限(个月)：">
            <span>{{ ruleForm[0].claims_min_term }}个月~{{ ruleForm[0].claims_max_term }}个月</span>
          </el-form-item>
          <el-form-item label="担保方式：">
            <span>{{ ruleForm[0].hyname }}</span>
          </el-form-item>
          <el-form-item label="项目情况：">
            <span>{{ ruleForm[0].project_status }}</span>
          </el-form-item>
          <!--<el-form-item label="辅助资料（点击查看）：">-->
            <!--<el-link :href="ruleForm[0].cdata" :underline="false">{{ ruleForm[0].cdata }}</el-link>-->
          <el-form-item label="资料（企业报告）：">
            <el-link :href="'https://jlxwjr.jljrkg.com/files/financial/custom/20200510160327.docx'" :underline="false">企业报告导出模板-长春企业 </el-link>
          </el-form-item>
          <el-form-item label="定向产品名称：">
            <span>{{ ruleForm[0].jgpronew.name }}</span>
          </el-form-item>
          <el-form-item label="定向产品利率范围：">
            <span>{{ ruleForm[0].jgpronew.mongey_min_rate }}%~{{ ruleForm[0].jgpronew.mongey_max_rate }}%</span>
          </el-form-item>
          <el-form-item label="定向产品融资期限（个月）：">
            <span>{{ ruleForm[0].jgpronew.claims_min_term }}个月~{{ ruleForm[0].jgpronew.claims_max_term }}个月</span>
          </el-form-item>
          <el-form-item v-if="saw == 1">
            <el-button type="primary" size="small" @click="fallow">分配</el-button>
          </el-form-item>
          <el-form-item v-else>
            <el-button type="info" size="small">已分配</el-button>
          </el-form-item>
        </el-form>
      </el-col>
    </el-row>
    <el-dialog title="分配" :visible.sync="dialogFormVisible" :show-close="false">
      <el-form :model="zhipaiform">
        <el-form-item label="客户经理">
          <el-select v-model="zhipaiform.uuid" placeholder="请选客户经理">
            <el-option v-for="(item, index) in jlList" :key="index" :label="item.name" :value="item.id"> </el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="quxiao">取 消</el-button>
        <el-button type="primary" @click="zhipaiformBtn">确 定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: 'claimForm',
  props: {
    ruleForm: null,
    charList: null,
    saw: null,
    dialogFormVisible: null,
    zhipaiform: null,
    jlList: null,
  },
  components: {},
  data: () => ({}),
  created() {},
  computed: {},
  methods: {
    fallow() {
      this.$emit('fallow');
    },
    zhipaiformBtn() {
      this.$emit('zhipaiformBtn', { data: this.zhipaiform });
    },
    quxiao() {
      this.$emit('quxiao');
    },
  },
};
</script>

<style lang="less" scoped>
.form {
  padding: 0 200px 0 0;
}
</style>
