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

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

      <!-- Confirm. Instruct. -->
      <c-col :span="24">
        <el-form-item label="第二通知行确认指令" prop="ledgrp.rec.cnfins">
          <c-select
            v-model="model.ledgrp.rec.cnfins"
            style="width: 100%"
            placeholder="第二通知行确认指令"
            :code="codes.cnfflg1"
            :disabled="model.ledgrp.a2b.pts.extkey==''"
          >
          </c-select>
        </el-form-item>
      </c-col>
    </c-col>

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

      <!-- Send Directly to Applicant's Bank -->
      <c-col :span="24">
        <c-checkbox v-model="model.ledgrp.rec.aplbnkdirsnd" style="margin-left:150px;"
          >直接发送至申请银行</c-checkbox
        >
      </c-col>

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

      <!-- Confirmation  Bank -->
      <c-col :span="24">
        <c-ptap
          :model="model"
          :argadr="{
            title: '保兑行',
            grp: 'ledgrp',
            rol: 'con',
          }"
          :onlySearch="true"
          @onSeainf="onSeainf"
          @onAplpDet="onConpDet"
        >
        </c-ptap>
      </c-col>
      <c-col :span="24">
        <el-form-item label="" prop="ledgrp.con.pts.nam">
          <c-input
            v-model="model.ledgrp.con.pts.nam"
            maxlength="40"
            placeholder="请输入Name of Party"
            disabled
          ></c-input>
        </el-form-item>
      </c-col>
    </c-col>

        <!-- =============================底部表格========================= -->
    <c-edit-table :model="model" v-bind="ptsaddg">
      <el-table-column label="操作" text-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>
    <!-- <c-col :span="12">
      <el-form-item label="1st Advising Bank" prop="ledgrp.adv.pts.ref">
        <c-input
          v-model="model.ledgrp.adv.pts.ref"
          maxlength="16"
          placeholder="请输入1st Advising Bank"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="Applicant's Bank" prop="ledgrp.apb.pts.ref">
        <c-input
          v-model="model.ledgrp.apb.pts.ref"
          maxlength="16"
          placeholder="请输入Applicant's Bank"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item
        label="Drag  Drop Sender"
        prop="letp.advp.ptsget.sdamod.dadsnd"
      >
        <c-input
          v-model="model.letp.advp.ptsget.sdamod.dadsnd"
          placeholder="请输入Drag  Drop Sender"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item
        label="Drag  Drop Sender"
        prop="letp.apbp.ptsget.sdamod.dadsnd"
      >
        <c-input
          v-model="model.letp.apbp.ptsget.sdamod.dadsnd"
          placeholder="请输入Drag  Drop Sender"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item
        label="External Key of Address"
        prop="ledgrp.adv.pts.extkey"
      >
        <c-input
          v-model="model.ledgrp.adv.pts.extkey"
          maxlength="16"
          placeholder="请输入External Key of Address"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="" prop="letp.advp.ptsget.sdamod.seainf">
        <c-input
          v-model="model.letp.advp.ptsget.sdamod.seainf"
          placeholder="请输入"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <c-button size="small" type="primary" @click="onAdvpDet">
        Details
      </c-button>
    </c-col>

    <c-col :span="12">
      <el-form-item
        label="External Key of Address"
        prop="ledgrp.apb.pts.extkey"
      >
        <c-input
          v-model="model.ledgrp.apb.pts.extkey"
          maxlength="16"
          placeholder="请输入External Key of Address"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="" prop="letp.apbp.ptsget.sdamod.seainf">
        <c-input
          v-model="model.letp.apbp.ptsget.sdamod.seainf"
          placeholder="请输入"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <c-button size="small" type="primary" @click="onApbpDet">
        Details
      </c-button>
    </c-col>

    <c-col :span="12">
      <el-form-item label="名称" prop="ledgrp.adv.namelc">
        <c-input
          type="textarea"
          v-model="model.ledgrp.adv.namelc"
          maxlength="35"
          show-word-limit
          placeholder="请输入名称"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="名称" prop="ledgrp.apb.namelc">
        <c-input
          type="textarea"
          v-model="model.ledgrp.apb.namelc"
          maxlength="35"
          show-word-limit
          placeholder="请输入名称"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <c-checkbox v-model="model.ledgrp.rec.aplbnkdirsnd"
        >Send Directly to Applicant's Bank</c-checkbox
      >
    </c-col>

    <c-col :span="12">
      <el-form-item label="Address Block" prop="ledgrp.adv.pts.adrblk">
        <c-input
          type="textarea"
          v-model="model.ledgrp.adv.pts.adrblk"
          maxlength="35"
          show-word-limit
          placeholder="请输入Address Block"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="Chinese address" prop="ledgrp.adv.dbfadrblkcn">
        <c-input
          type="textarea"
          v-model="model.ledgrp.adv.dbfadrblkcn"
          maxlength="35"
          show-word-limit
          placeholder="请输入Chinese address"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="Address Block" prop="ledgrp.apb.pts.adrblk">
        <c-input
          type="textarea"
          v-model="model.ledgrp.apb.pts.adrblk"
          maxlength="35"
          show-word-limit
          placeholder="请输入Address Block"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="Chinese address" prop="ledgrp.apb.dbfadrblkcn">
        <c-input
          type="textarea"
          v-model="model.ledgrp.apb.dbfadrblkcn"
          maxlength="35"
          show-word-limit
          placeholder="请输入Chinese address"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="地址" prop="ledgrp.adv.adrelc">
        <c-input
          type="textarea"
          v-model="model.ledgrp.adv.adrelc"
          maxlength="35"
          show-word-limit
          placeholder="请输入地址"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="地址" prop="ledgrp.apb.adrelc">
        <c-input
          type="textarea"
          v-model="model.ledgrp.apb.adrelc"
          maxlength="35"
          show-word-limit
          placeholder="请输入地址"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="2nd Advising Bank" prop="ledgrp.a2b.pts.ref">
        <c-input
          v-model="model.ledgrp.a2b.pts.ref"
          maxlength="16"
          placeholder="请输入2nd Advising Bank"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="Reimbursement Bank" prop="ledgrp.rmb.pts.ref">
        <c-input
          v-model="model.ledgrp.rmb.pts.ref"
          maxlength="16"
          placeholder="请输入Reimbursement Bank"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item
        label="Drag  Drop Sender"
        prop="letp.a2bp.ptsget.sdamod.dadsnd"
      >
        <c-input
          v-model="model.letp.a2bp.ptsget.sdamod.dadsnd"
          placeholder="请输入Drag  Drop Sender"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item
        label="Drag  Drop Sender"
        prop="letp.rmbp.ptsget.sdamod.dadsnd"
      >
        <c-input
          v-model="model.letp.rmbp.ptsget.sdamod.dadsnd"
          placeholder="请输入Drag  Drop Sender"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item
        label="External Key of Address"
        prop="ledgrp.a2b.pts.extkey"
      >
        <c-input
          v-model="model.ledgrp.a2b.pts.extkey"
          maxlength="16"
          placeholder="请输入External Key of Address"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="" prop="letp.a2bp.ptsget.sdamod.seainf">
        <c-input
          v-model="model.letp.a2bp.ptsget.sdamod.seainf"
          placeholder="请输入"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <c-button size="small" type="primary" @click="onA2bpDet">
        Details
      </c-button>
    </c-col>

    <c-col :span="12">
      <el-form-item
        label="External Key of Address"
        prop="ledgrp.rmb.pts.extkey"
      >
        <c-input
          v-model="model.ledgrp.rmb.pts.extkey"
          maxlength="16"
          placeholder="请输入External Key of Address"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="" prop="letp.rmbp.ptsget.sdamod.seainf">
        <c-input
          v-model="model.letp.rmbp.ptsget.sdamod.seainf"
          placeholder="请输入"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <c-button size="small" type="primary" @click="onRmbpDet">
        Details
      </c-button>
    </c-col>

    <c-col :span="12">
      <el-form-item label="名称" prop="ledgrp.a2b.namelc">
        <c-input
          type="textarea"
          v-model="model.ledgrp.a2b.namelc"
          maxlength="35"
          show-word-limit
          placeholder="请输入名称"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="名称" prop="ledgrp.rmb.namelc">
        <c-input
          type="textarea"
          v-model="model.ledgrp.rmb.namelc"
          maxlength="35"
          show-word-limit
          placeholder="请输入名称"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="Address Block" prop="ledgrp.a2b.pts.adrblk">
        <c-input
          type="textarea"
          v-model="model.ledgrp.a2b.pts.adrblk"
          maxlength="35"
          show-word-limit
          placeholder="请输入Address Block"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="Chinese address" prop="ledgrp.a2b.dbfadrblkcn">
        <c-input
          type="textarea"
          v-model="model.ledgrp.a2b.dbfadrblkcn"
          maxlength="35"
          show-word-limit
          placeholder="请输入Chinese address"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="Address Block" prop="ledgrp.rmb.pts.adrblk">
        <c-input
          type="textarea"
          v-model="model.ledgrp.rmb.pts.adrblk"
          maxlength="35"
          show-word-limit
          placeholder="请输入Address Block"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="Chinese address" prop="ledgrp.rmb.dbfadrblkcn">
        <c-input
          type="textarea"
          v-model="model.ledgrp.rmb.dbfadrblkcn"
          maxlength="35"
          show-word-limit
          placeholder="请输入Chinese address"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="地址" prop="ledgrp.a2b.adrelc">
        <c-input
          type="textarea"
          v-model="model.ledgrp.a2b.adrelc"
          maxlength="35"
          show-word-limit
          placeholder="请输入地址"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="地址" prop="ledgrp.rmb.adrelc">
        <c-input
          type="textarea"
          v-model="model.ledgrp.rmb.adrelc"
          maxlength="35"
          show-word-limit
          placeholder="请输入地址"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="Confirm. Instruct." prop="ledgrp.rec.cnfins">
        <c-select
          v-model="model.ledgrp.rec.cnfins"
          style="width: 100%"
          placeholder="请选择Confirm. Instruct."
        >
        </c-select>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="Confirmation  Bank" prop="ledgrp.con.pts.ref">
        <c-input
          v-model="model.ledgrp.con.pts.ref"
          maxlength="16"
          placeholder="请输入Confirmation  Bank"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item
        label="Drag  Drop Sender"
        prop="letp.conp.ptsget.sdamod.dadsnd"
      >
        <c-input
          v-model="model.letp.conp.ptsget.sdamod.dadsnd"
          placeholder="请输入Drag  Drop Sender"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item
        label="External Key of Address"
        prop="ledgrp.con.pts.extkey"
      >
        <c-input
          v-model="model.ledgrp.con.pts.extkey"
          maxlength="16"
          placeholder="请输入External Key of Address"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <el-form-item label="" prop="letp.conp.ptsget.sdamod.seainf">
        <c-input
          v-model="model.letp.conp.ptsget.sdamod.seainf"
          placeholder="请输入"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="12">
      <c-button size="small" type="primary" @click="onConpDet">
        Details
      </c-button>
    </c-col>

    <c-col :span="12">
      <el-form-item label="Name of Party" prop="ledgrp.con.pts.nam">
        <c-input
          v-model="model.ledgrp.con.pts.nam"
          maxlength="40"
          placeholder="请输入Name of Party"
        ></c-input>
      </el-form-item>
    </c-col>

    <c-col :span="24">
      <div class="e-table-wrapper">
        <el-table :data="model.letp.ptsaddp.ptsaddg" style="width: 100%">
          <el-table-column prop="rol" label="角色" sortable width="100">
          </el-table-column>
          <el-table-column prop="ptyextkey" label="机构" sortable width="100">
          </el-table-column>
          <el-table-column prop="nam" label="" sortable width="100">
          </el-table-column>
          <el-table-column prop="ref" label="名称" sortable width="100">
          </el-table-column>
        </el-table> 
        <el-pagination
          layout="prev, pager, next"
          :total="pager.letp_ptsaddp_ptsaddg.total"
        >
        </el-pagination> 
      </div>
    </c-col>-->
  </div>
</template>
<script>
import Api from '~/service/Api'
import commonProcess from '~/mixin/commonProcess'
import CodeTable from '~/config/CodeTable'
import Event from '~/model/Letdrw/Event'
import Ptap from "~/views/Public/Ptap";

export default {
  inject: ["root"],
  components: { "c-ptap": Ptap },
  props: ["model", "codes"],
  mixins: [commonProcess],
  data() {
    return {
      ptsaddg: {
        columns: [
          {
            title: "角色",
            width: "120px",
            dataIndex: "rol",
            show: "select",
          },
          {
            title: "机构实体",
            width: "180px",
            dataIndex: "ptyextkey",
            show: "input",
          },
          {
            title: "名称",
            width: "300px",
            dataIndex: "nam",
          },
          {
            title: "参考地址",
            width: "300px",
            dataIndex: "ref",
          },
        ],
        urls: "letp.ptsaddp.ptsaddg",
      },
    };
  },
  methods: {
    ...Event,
    handleEdit() {
      console.log("1111测试");
    },
  },
  created: function () {},
};
</script>
<style>
</style>