<template>
  <div class="app-container">
    <el-form
      :inline="true"
      ref="form"
      :model="form"
      :rules="rules"
      label-width="auto"
      style="margin-top: 20px"
      disabled
    >
      <el-row>
        <el-col :span="8">
          <el-form-item
            label="还款明细编号:"
            prop="zfcName"
          >
            <el-input
              v-model="form.zfrPayNumber"
            /> </el-form-item
        ></el-col>
        <el-col :span="8"
          > <el-form-item
            label="最终付款方:"
            prop="core"
          >
            <el-input
              v-model="form.core"
            /> </el-form-item
        ></el-col>
        <el-col :span="8">
           <el-form-item
            label="还款承诺函编号:"
            prop="zfiPaymentNumber"
          >
            <el-input
              v-model="form.zfiPaymentNumber"
            /> </el-form-item
        ></el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
           <el-form-item
            label="付款承诺日期:"
            prop="zfrRepaymentDate"
          >
            <el-input
              v-model="form.zfrRepaymentDate"
            /> </el-form-item
        ></el-col>
        <el-col :span="8">
           <el-form-item
            label="承诺付款金额:"
            prop="zfrLoanAmount"
          >
            <el-input
              v-model="form.zfrLoanAmount"
            /> </el-form-item
        ></el-col>
        <el-col :span="8">
           <el-form-item
            label="融信产品:"
            prop="zfpName"
          >
            <el-input
              v-model="form.zfpName"
            /> </el-form-item
        ></el-col>
      </el-row>
      <el-row>
        <el-col :span="8">
           <el-form-item
            label="承诺付款账户:"
            prop="zfpcrAccount"
          >
            <el-input
              v-model="form.zfpcrAccount"
            /> </el-form-item
        ></el-col>
        <el-col :span="8">
           <el-form-item
            label="付款账户开户行:"
            prop="zfpcrAccountBank"
          >
            <el-input
              v-model="form.zfpcrAccountBank"
            /> </el-form-item
        ></el-col>
        <el-col :span="8">
           <el-form-item
            label="还款状态:"
            prop="zfrApplyStatus"
          >
            <el-input
              v-model="form.zfrApplyStatus"
            /> </el-form-item
        ></el-col>
      </el-row>
      <el-table v-loading="loading" :data="list" border>
      <!-- <el-table-column label="序号" type="index" width="50" align="center">
        <template slot-scope="scope">
          <span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
        </template>
      </el-table-column>      -->
      <el-table-column label="收款账户" align="center" prop="zfrCollectionAccount" :show-overflow-tooltip="true"/> 
      <el-table-column label="收款账户户名" align="center" prop="supplier" :show-overflow-tooltip="true"/>
      <el-table-column label="收款金额" align="center" prop="zfrLoanAmount" :show-overflow-tooltip="true" />
      </el-table>
    </el-form>
  </div>
</template>

<script>
import { getRepayment } from "@/api/service/repayment/repayment";
export default {
  name: "detailRepayment",
  components: {},
  data() {
    return {
      disabled: false,
      // 日期范围
      dateRange: [],
      // 选中数组
      ids: [],
      // 弹出层标题
      title: "",
      // 总条数
      total: 0,
      // 是否显示弹出层
      open: false,
      list:[],
      // 表单参数
      form: {},
      queryParams: {
        pageNum: 1,
        pageSize: 10,
      },
      options: [],
      value: [],
      loading: false,
      // 表单校验
      rules: {
      },
    };
  },
  created() {
    const zfrId = this.$route.params && this.$route.params.zfrId;
    this.reset();
    getRepayment(zfrId).then((response)=>{
        debugger
        this.form = response.data[0];
        this.list = response.data;
        console.log(this.list);
    })
  },
  activated() {
    this.reset();
    //this.getList();
  },
  methods: {
    reset(){
      this.form = {
      };
       this.resetForm("form");
    },
    // 取消按钮
    cancel() {
      this.reset();
      this.$store.dispatch("tagsView/delView", this.$route);
      this.$router.go(-1);
      this.open = false;
    },
  },
};
</script>
<style>
.single-select-table thead .el-table-column--selection .cell {
  display: none;
}

</style>
