<template>
  <div class="eibs-tab">
  <c-row>
    <!-- left -->
    <c-col :span="11">
      <c-col :span="24">
        <c-ptap
          :model="model"
          :argadr="{
            title: '1st Advising Bank',
            grp: 'ledgrp',
            rol: 'adv',
          }"
          disabled
          @onSeainf="onSeainf"
          @onAplpDet="onAdvpDet"
        >
        </c-ptap>
      </c-col>

      <c-col :span="24">
        <c-ptap
          :model="model"
          :argadr="{
            title: '2nd Advising Bank',
            grp: 'ledgrp',
            rol: 'a2b',
          }"
          @onSeainf="onSeainf"
          @onAplpDet="onA2bpDet"
        >
        </c-ptap>
      </c-col>

      <c-col :span="24">
        <el-form-item label="Confirm. Instruct. to 2nd Adv. Bank" prop="ledgrp.rec.cnfins">
          <c-select
            v-model="model.ledgrp.rec.cnfins"
            style="width: 100%"
            placeholder="Please select Confirm. Instruct. to 2nd Adv. Bank"
            :code="codes.cnfflg1"
            disabled
          >
          </c-select>
        </el-form-item>
      </c-col>

      <c-col :span="24" style="margin-left: 150px">
          <c-checkbox v-model="model.ledgrp.rec.aplbnkdirsnd"
            >Send Directly</c-checkbox
          >
        </c-col>
    </c-col>

    <!-- right -->
    <c-col :span="11" :offset="1">
      <c-col :span="24">
        <c-ptap
          :model="model"
          :argadr="{
            title: 'Applicant\'s Bank',
            grp: 'ledgrp',
            rol: 'apb',
          }"
          @onSeainf="onSeainf"
          @onAplpDet="onApbpDet"
        >
        </c-ptap>
      </c-col>

      <c-col :span="24">
        <c-ptap
          :model="model"
          :argadr="{
            title: 'Reimbursement Bank',
            grp: 'ledgrp',
            rol: 'rmb',
          }"
          @onSeainf="onSeainf"
          @onAplpDet="onRmbpDet"
        >
        </c-ptap>
      </c-col>

      <c-col :span="24">
        <c-ptap
          :model="model"
          :argadr="{
            title: 'Confirmation Bank',
            grp: 'ledgrp',
            rol: 'con',
          }"
          :onlySearch="true"
          @onSeainf="onSeainf"
          @onAplpDet="onRmbpDet"
        >
        </c-ptap>
      </c-col>
      <c-col :span="24">
        <el-form-item label="Confirmation Name" prop="ledgrp.con.pts.nam">
          <c-input
            v-model="model.ledgrp.con.pts.nam"
            maxlength="40"
            placeholder="Please input Confirmation Name"
            disabled
          ></c-input>
        </el-form-item>
      </c-col>
    </c-col>
     <!-- =============================底部表格========================= -->
    <c-edit-table :model="model" v-bind="ptsaddg">
      <el-table-column label="操作" align="center">
        <template slot-scope="scope">
          <el-button
            size="mini"
            @click="handleEdit(scope.$index, scope.row)"
            type="primary"
            >详情</el-button
          >
        </template>
      </el-table-column>
    </c-edit-table>
  </c-row>
  </div>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable";
import Ptap from "~/views/Public/Ptap";
import Event from "~/model/Letopn/Event";

export default {
  inject: ["root"],
  components: { "c-ptap": Ptap },
  props: ["model", "codes"],
  mixins: [commonProcess],
  data() {
    return {
      ptsaddg: {
        columns: [
          {
            title: "Role",
            width: "120px",
            dataIndex: "rol",
            show: "select",
          },
          {
            title: "Party",
            width: "180px",
            dataIndex: "ptyextkey",
            show: "input",
          },
          {
            title: "Name of Party",
            width: "300px",
            dataIndex: "nam",
          },
          {
            title: "Reference for Address",
            width: "300px",
            dataIndex: "ref",
          },
        ],
        urls: "letp.ptsaddp.ptsaddg",
      },
    };
  },
  methods: {
    ...Event,
    handleEdit() {
      console.log("1111测试");
    },
  },
  created: function () {},
};
</script>
<style>
</style>