<template>
  <div id="followForm">
    <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="'https://jlxwjr.jljrkg.com/files/financial/custom/20200510160327.docx'" :underline="false">企业报告导出模板-长春企业 </el-link>
          </el-form-item>
          <el-form-item v-if="orcredit == 0">
            <el-button type="primary" size="large" @click="shouxin()">通过</el-button>
            <el-button type="danger" size="large" @click="deleteRow()">拒绝</el-button>
          </el-form-item>
          <el-form-item v-if="orcredit == 2">
            <el-button type="primary" size="large" @click="shouxin()">放款</el-button>
            <el-button type="danger" size="large" @click="deleteRow()">拒绝</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="'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="orcredit == 0">
            <el-button type="primary" size="large" @click="shouxin()">通过</el-button>
            <el-button type="danger" size="large " @click="deleteRow()">拒绝</el-button>
          </el-form-item>
          <el-form-item v-if="orcredit == 2">
            <el-button type="primary" size="large" @click="shouxin()">放款</el-button>
            <el-button type="danger" size="large" @click="deleteRow()">拒绝</el-button>
          </el-form-item>
        </el-form>
      </el-col>
    </el-row>
    <el-row>
      <el-dialog title="分配" :visible.sync="dialogFormVisible" :show-close="false" width="30%">
        <el-form :model="dialogform">
          <el-form-item label="放款额度" :label-width="formLabelWidth">
            <el-input  style="width: 50%" v-model="dialogform.money" autocomplete="off"></el-input>万元
          </el-form-item>
          <el-form-item label="放款产品" :label-width="formLabelWidth">
            <el-input style="width: 50%" v-model="dialogform.sxcpname" autocomplete="off"></el-input>
          </el-form-item>
          <el-form-item label="放款期限" :label-width="formLabelWidth">
            <el-input style="width: 50%" v-model="dialogform.sxhowlong" autocomplete="off"></el-input>个月
          </el-form-item>
          <el-form-item label="放款利率" :label-width="formLabelWidth">
            <el-input style="width: 50%" v-model="dialogform.sxcplilue" autocomplete="off"></el-input>%
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="quxiao">取 消</el-button>
          <el-button type="primary" @click="queding">确 定</el-button>
        </div>
      </el-dialog>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'followForm',
  props: {
    ruleForm: null,
    charList: null,
    orcredit: null,
    dialogFormVisible: null,
    dialogform:null,
  },
  components: {},
  data: () => ({}),
  created() {},
  computed: {},
  methods: {
    shouxin() {
      this.$emit('shouxin');
    },
    quxiao() {
      this.$emit('quxiao');
    },
    queding() {
      this.$emit('queding', { data: this.dialogform });
    },
    deleteRow(){
      this.$emit('deleteRow');
    }
  },
};
</script>

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