<template>
  <div class="eibs">
    <c-row>
      <!-- =================================左边================================= -->
      <!-- 第一通知行 -->
      <c-col :span="12" style="padding-right: 20px;">
        <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>

        <!-- 第二通知行 -->
        <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="12" style="padding-left: 20px;">
        <!-- 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>

        <el-form-item label="" prop="ledgrp.rec.aplbnkdirsnd" class="checkbox-left">
          <c-checkbox v-model="model.ledgrp.rec.aplbnkdirsnd"
            >直接发送至申请银行</c-checkbox
          >
        </el-form-item>

        <!-- 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="请输入"
              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>
  </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: '角色',
            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>