<template>
  <div class="eibs-tab">
    <c-row>
      <c-col :span="24">
        <c-col :span="12">
          <c-col :span="24">
            <el-form-item label="Applicant Ref." prop="gidgrp.apc.pts.ref">
              <c-input
                v-model="model.gidgrp.apc.pts.ref"
                maxlength="16"
                placeholder="请输入Applicant Ref."
              ></c-input>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item label="Applicant" prop="gidgrp.apc.pts.extkey">
              <c-fullbox>
                <c-input
                  v-model="model.gidgrp.apc.pts.extkey"
                  maxlength="16"
                  placeholder="请输入External Key of Address"
                  @keyup.enter.native="
                    showGridPromptDialog(`gidgrp.apc.pts.extkey`)
                  "
                ></c-input>
                <template slot="footer">
                  <c-button
                    style="margin: 0 10px 0 10px; padding: 0 12px"
                    size="small"
                    type="primary"
                  >
                    <span style="font-family: '宋体'; font-weight: bold"
                      >i</span
                    >
                  </c-button>
                  <c-button size="small" type="primary" @click="onApcpDet">
                    Details
                  </c-button>
                </template>
              </c-fullbox>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item label="地址名称" prop="gidgrp.apc.pts.adrblk">
              <c-input
                :disabled="model.gidgrp.apc.pts.abrblk!=''"
                rows="4"
                type="textarea"
                v-model="model.gidgrp.apc.pts.adrblk"
                maxlength="140"
                show-word-limit
                placeholder="请输入地址名称"
              ></c-input>
            </el-form-item>
          </c-col>

          <c-col :span="24">
            <el-form-item label="Obligor Ref." prop="gidgrp.ctc.pts.ref">
              <c-input
                v-model="model.gidgrp.ctc.pts.ref"
                maxlength="16"
                placeholder="请输入Obligor Ref."
              ></c-input>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item label="Obligor" prop="gidgrp.ctc.pts.extkey">
              <c-fullbox>
                <c-input
                  v-model="model.gidgrp.ctc.pts.extkey"
                  maxlength="16"
                  placeholder="请输入External Key of Address"
                  @keyup.enter.native="
                    showGridPromptDialog(`gidgrp.ctc.pts.extkey`)
                  "
                ></c-input>
                <template slot="footer">
                  <c-button
                    style="margin: 0 10px 0 10px; padding: 0 12px"
                    size="small"
                    type="primary"
                  >
                    <span style="font-family: '宋体'; font-weight: bold"
                      >i</span
                    >
                  </c-button>
                  <c-button size="small" type="primary" @click="onCtcpDet">
                    Details
                  </c-button>
                </template>
              </c-fullbox>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item label="地址名称" prop="gidgrp.ctc.pts.adrblk">
              <c-input
                rows="4"
                type="textarea"
                v-model="model.gidgrp.ctc.pts.adrblk"
                maxlength="140"
                show-word-limit
                placeholder="请输入地址名称"
              ></c-input>
            </el-form-item>
          </c-col>

          <c-col :span="24">
            <el-form-item
              label="Int. Beneficiary Ref."
              prop="gidgrp.bec.pts.ref"
            >
              <c-input
                v-model="model.gidgrp.bec.pts.ref"
                maxlength="16"
                placeholder="请输入Int. Beneficiary Ref."
              ></c-input>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item label="Int. Beneficiary" prop="gidgrp.bec.pts.extkey">
              <c-fullbox>
                <c-input
                  v-model="model.gidgrp.bec.pts.extkey"
                  maxlength="16"
                  placeholder="请输入External Key of Address"
                  @keyup.enter.native="
                    showGridPromptDialog(`gidgrp.bec.pts.extkey`)
                  "
                ></c-input>
                <template slot="footer">
                  <c-button
                    style="margin: 0 10px 0 10px; padding: 0 12px"
                    size="small"
                    type="primary"
                  >
                    <span style="font-family: '宋体'; font-weight: bold"
                      >i</span
                    >
                  </c-button>
                  <c-button size="small" type="primary" @click="onBecpDet">
                    Details
                  </c-button>
                </template>
              </c-fullbox>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item label="地址名称" prop="gidgrp.bec.pts.adrblk">
              <c-input
                :disabled="model.gidgrp.bec.pts.adrblk != ''"
                rows="4"
                type="textarea"
                v-model="model.gidgrp.bec.pts.adrblk"
                maxlength="140"
                show-word-limit
                placeholder="请输入地址名称"
              ></c-input>
            </el-form-item>
          </c-col>
        </c-col>
        <c-col :span="11" :offset="1">
          <c-col :span="24">
            <el-form-item label="Issuing Bnak's Ref." prop="gidgrp.iss.pts.ref">
              <c-input
                v-model="model.gidgrp.iss.pts.ref"
                maxlength="16"
                placeholder="请输入Issuing Bnak's Ref."
              ></c-input>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item label="Issuing Bank" prop="gidgrp.iss.pts.extkey">
              <c-fullbox>
                <c-input
                  v-model="model.gidgrp.iss.pts.extkey"
                  maxlength="16"
                  placeholder="请输入External Key of Address"
                  @keyup.enter.native="
                    showGridPromptDialog(`gidgrp.iss.pts.extkey`)
                  "
                ></c-input>
                <template slot="footer">
                  <c-button
                    style="margin: 0 10px 0 10px; padding: 0 12px"
                    size="small"
                    type="primary"
                  >
                    <span style="font-family: '宋体'; font-weight: bold"
                      >i</span
                    >
                  </c-button>
                  <c-button
                    :disabled="model.gidgrp.iss.pts.adrblk==''"
                    size="small"
                    type="primary"
                    @click="onIsspDet"
                  >
                    Details
                  </c-button>
                </template>
              </c-fullbox>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item label="地址名称" prop="gidgrp.iss.pts.adrblk">
              <c-input
                disabled
                rows="4"
                type="textarea"
                v-model="model.gidgrp.iss.pts.adrblk"
                maxlength="140"
                show-word-limit
                placeholder="请输入地址名称"
                @change="issChange"
              ></c-input>
            </el-form-item>
          </c-col>

          <c-col :span="24">
            <el-form-item
              label="Ultimate Ben Bank Ref."
              prop="gidgrp.ben.pts.ref"
            >
              <c-input
                v-model="model.gidgrp.ben.pts.ref"
                maxlength="16"
                placeholder="请输入Ultimate Ben Bank Ref."
              ></c-input>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item
              label="Ultimate Ben Bank"
              prop="gidgrp.ben.pts.extkey"
            >
              <c-fullbox>
                <c-input
                  v-model="model.gidgrp.ben.pts.extkey"
                  maxlength="16"
                  placeholder="请输入External Key of Address"
                  @keyup.enter.native="
                    showGridPromptDialog(`gidgrp.ben.pts.extkey`)
                  "
                ></c-input>
                <template slot="footer">
                  <c-button
                    style="margin: 0 10px 0 10px; padding: 0 12px"
                    size="small"
                    type="primary"
                  >
                    <span style="font-family: '宋体'; font-weight: bold"
                      >i</span
                    >
                  </c-button>
                  <c-button
                    :disabled="model.gidgrp.ben.pts.adrblk==''"
                    size="small"
                    type="primary"
                    @click="onBenpDet"
                  >
                    Details
                  </c-button>
                </template>
              </c-fullbox>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item label="地址名称" prop="gidgrp.ben.pts.adrblk">
              <c-input
                :disabled="
                  model.gidgrp.bec.pts.adrblk == '' ||
                  model.gidgrp.ben.pts.adrblk != '' ||
                  model.gidgrp.rec.legfrm == ''
                "
                rows="4"
                type="textarea"
                v-model="model.gidgrp.ben.pts.adrblk"
                maxlength="140"
                show-word-limit
                placeholder="请输入地址名称"
              ></c-input>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item
              label="Avail. with Bank Ref."
              prop="gidgrp.avc.pts.ref"
            >
              <c-input
                disabled
                v-model="model.gidgrp.avc.pts.ref"
                maxlength="16"
                placeholder="请输入Avail. with Bank Ref."
              ></c-input>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item
              label="External Key of Address"
              prop="gidgrp.avc.pts.extkey"
            >
              <c-fullbox>
                <c-input
                  disabled
                  v-model="model.gidgrp.avc.pts.extkey"
                  maxlength="16"
                  placeholder="请输入External Key of Address"
                ></c-input>
                <template slot="footer">
                  <c-button
                    style="margin: 0 10px 0 10px; padding: 0 12px"
                    size="small"
                    type="primary"
                    icon="el-icon-search"
                    @click="onSeainf(`gidgrp.avc.pts.extkey`)"
                  >
                  </c-button>
                  <c-button size="small" type="primary" @click="onAvcpDet">
                    Details
                  </c-button>
                </template>
              </c-fullbox>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item label="Name of Party" prop="gidgrp.avc.pts.nam">
              <c-input
                disabled
                v-model="model.gidgrp.avc.pts.nam"
                maxlength="40"
                placeholder="请输入Name of Party"
              ></c-input>
            </el-form-item>
          </c-col>
        </c-col>
      </c-col>
    </c-row>
  </div>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Getopn/Event";
import Ptap from "~/views/Public/Ptap";
import Utils from "~/utils";

export default {
  components: { "c-ptap": Ptap },
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [commonProcess],
  data() {
    return {};
  },
  methods: {
    ...Event,
    async issChange() {
      let rtnmsg = await this.executeDefault("gidgrp.bec.pts.adrblk");
      if (rtnmsg.respCode == SUCCESS) {
        Utils.updateModel(this.model, rtnmsg.data);
      }
    },
  },
  created: function () {},
};
</script>
<style>
</style>