<template>
  <c-row>
    <!-- =================================左边================================= -->
    <!-- 1st Advising Bank -->
    <c-col :span="11">
      <c-col :span="24">
        <c-ptap
          :model="model"
          :argadr="{
            title: '第一通知行',
            grp: 'ledgrp',
            rol: 'adv',
          }"
          @onSeainf="onSeainf"
          @onAplpDet="onAdvpDet"
          disabled
          disabledRef
          disabledExtkey
        >
        </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
          >
          </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"
          disabled
          disabledRef
          disabledExtkey
        >
        </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>
</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: '角色',
            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>