<template>
  <div id="intelligentDockingFollowDetails">
    <el-row>
      <el-col :span="24">
        <el-col :span="24">
          <el-form ref="form" :model="form" label-width="160px">
            <el-form-item label="企业名称：">
              <span>{{ form.company.company_name }}</span>
            </el-form-item>
            <el-form-item label="联系人：">
              <span>{{ form.person }}</span>
            </el-form-item>
            <el-form-item label="融资金额（万元）：">
              <span>{{ form.money }}</span>
            </el-form-item>
            <el-form-item label="对接产品：">
              <span>{{ form.finance_claims.name }}</span>
            </el-form-item>
            <el-form-item label="担保方式：">
              <span>{{ form.dictionary.name }}</span>
            </el-form-item>
            <!--<el-form-item label="融资期限(个月)：">-->
              <!--<span>{{ form.claims_min_term }}个月~{{ form.claims_max_term }}个月</span>-->
            <!--</el-form-item>-->
            <!--<el-form-item label="融资利率：">-->
              <!--<span>{{ form.mongey_min_rate }}%~{{ form.mongey_max_rate }}%</span>-->
            <!--</el-form-item>-->
            <!--<el-form-item label="预计何时有融资需求：">-->
              <!--<span>{{ form.when.name }}</span>-->
            <!--</el-form-item>-->
            <el-form-item label="补充信息：">
              <span>{{ form.additional_information }}</span>
            </el-form-item>
            <el-form-item label="企业信用报告：">
              <!--<span>点击下载</span>-->
            </el-form-item>

            <el-form-item>
              <!--<template slot-scope="scope">-->
              <span v-if="form.follow.creditStatus == '0'">
                <el-button type="primary" @click="shouxin">审核</el-button>
                  <el-button type="danger" size="large" @click.prevent="deleteRow({fid:form.follow._id,intelligentId:form._id,refuse_times:form.refuse_times,uid:form.uid})">拒绝</el-button>
              </span>
              <span v-if="form.follow.creditStatus == '2'">
                <el-button type="primary" @click="shouxin">放款</el-button>
                  <el-button type="danger" size="large" @click.prevent="deleteRow({fid:form.follow._id,intelligentId:form._id,refuse_times:form.refuse_times,uid:form.uid})">拒绝</el-button>
              </span>
              <!--</template>-->
            </el-form-item>
          </el-form>
        </el-col>
      </el-col>
    </el-row>

    <el-row>
      <el-dialog title="分配" :visible.sync="dialogFormVisible2" :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>

    <el-dialog title="拒绝" :visible.sync="dialogFormVisible" :show-close="false" :destroy-on-close="true">
      <el-form :model="dockForm">
        <el-form-item label="拒绝理由">
          <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" v-model="dockForm.reason"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dockOut">取 消</el-button>
        <el-button type="primary" @click="dockDormBtn">确 定</el-button>
      </div>
    </el-dialog>
    <!--<el-dialog title="审核" :visible.sync="shenheDialog" :show-close="false">-->
      <!--&lt;!&ndash;<el-form :model="shenheForm">&ndash;&gt;-->
        <!--&lt;!&ndash;<el-form-item label="备注" :label-width="formLabelWidth">&ndash;&gt;-->
          <!--&lt;!&ndash;<el-input v-model="shenheForm.senhemessage" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }"></el-input>&ndash;&gt;-->
        <!--&lt;!&ndash;</el-form-item>&ndash;&gt;-->
      <!--&lt;!&ndash;</el-form>&ndash;&gt;-->
      <!--<div slot="footer" class="dialog-footer">-->
        <!--<el-button @click="shenheOut">取 消</el-button>-->
        <!--<el-button type="primary" @click="shenheBtn">确 定</el-button>-->
      <!--</div>-->
    <!--</el-dialog>-->

    <!--<el-dialog title="授信" :visible.sync="shouxinDialog" :show-close="false" class="demo-ruleForm">-->
      <!--<el-form :model="shouxinForm" ref="shouxinForm">-->
        <!--<el-form-item-->
          <!--label="授信金额"-->
          <!--prop="money"-->
          <!--:label-width="formLabelWidth"-->
          <!--:rules="[{ required: true, message: '金额不能为空' }, , { type: 'number', message: '金额必须为数字值' }]"-->
        <!--&gt;-->
          <!--<el-input v-model.number="shouxinForm.money" type="text" autocomplete="off" placeholder="请输入授信金额（万元）"></el-input>-->
        <!--</el-form-item>-->
      <!--</el-form>-->
      <!--<div slot="footer" class="dialog-footer">-->
        <!--<el-button @click="shouxinOut">取 消</el-button>-->
        <!--<el-button type="primary" @click="shouxinBtn">确 定</el-button>-->
      <!--</div>-->
    <!--</el-dialog>-->
  </div>
</template>

<script>
export default {
  name: 'intelligentDockingFollowDetails',
  props: {
    form: null,
    // shenheForm: null,
    // shouxinForm: null,

    dialogFormVisible2: null,
    dialogform:null,

    dockForm: null,
  },
  components: {},
  data: () => ({
    // shenheDialog: false,
    // shouxinDialog: false,
    formLabelWidth: '80px',
    dialogFormVisible: false,
  }),
  created() {},
  computed: {},
  methods: {
    shouxin() {
      this.$emit('shouxin');
    },
    quxiao() {
      this.$emit('quxiao');
    },
    queding() {
      this.$emit('queding', { data: this.dialogform });
    },
    deleteRow(val) {
      this.dialogFormVisible = true;
      this.$emit('deleteRow', val);
    },
    // 拒绝提交按钮
    dockDormBtn() {
      this.$emit('dockDormBtn', { data: this.dockForm });
      this.dialogFormVisible = false;
    },
    // 取消
    dockOut() {
      this.dialogFormVisible = false;
      this.$emit('dockOut');
    },
    // // 打开审核
    // shenheBtns() {
    //   this.shenheDialog = true;
    //   this.$emit('shenheBtns');
    // },
    // // 取消审核
    // shenheOut() {
    //   this.shenheDialog = false;
    //   this.$emit('shenheOut');
    // },
    // // 提交审核
    // shenheBtn() {
    //   this.$emit('shenheBtn', { data: this.shenheForm });
    //   this.shenheDialog = false;
    // },
    // // 打开授信
    // shouxinBtns() {
    //   this.shouxinDialog = true;
    //   this.$emit('shouxinBtns');
    // },
    // // 取消授信
    // shouxinOut() {
    //   this.shouxinDialog = false;
    //   this.$emit('shouxinOut');
    // },
    // // 提交授信
    // shouxinBtn() {
    //   this.$emit('shouxinBtn', { data: this.shouxinForm });
    //   this.shouxinDialog = false;
    // },
  },
};
</script>

<style lang="less" scoped>
/deep/.el-dialog__footer {
  text-align: center;
}
</style>
