<template>
  <c-col :span="24">
    <!-- ================底部--左================= -->
    <!--MT103,MT202 COV,MT202,OTHER-->
    <c-col :span="11" style="margin-top: 10px" v-if="model.cpdgrp.rec.swftyp == ''||
    model.cpdgrp.rec.swftyp == '103'||
    model.cpdgrp.rec.swftyp == '202'||
    model.cpdgrp.rec.swftyp == '200'||
    model.cpdgrp.rec.swftyp == 'OTH'">
      <c-col :span="24">
        <el-form-item label="汇款行" prop="cpdgrp.ori.pts.ref">
          <c-input v-model="model.cpdgrp.ori.pts.ref" maxlength="16" placeholder="" disabled></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <!-- <c-col :span="18"> -->
        <c-fullbox>
          <el-form-item label="">
            <c-input v-model="model.cpdgrp.ori.pts.extkey" placeholder="" style="width:100%" @keyup.enter.native="
                showGridPromptDialog('cpdgrp.ori.pts.extkey')
            " disabled></c-input>
          </el-form-item>
          <!-- </c-col>
                <c-col :span="6" style="text-align: right">
                    <el-form-item label="" label-width="15px"> -->
          <!-- <c-col :span="12"> -->
          <template slot="footer">
            <c-button style="margin:0 10px 0 10px;padding: 0 12px;" size="small" type="primary" icon="el-icon-search">
            </c-button>
            <!-- </c-col> -->
            <!-- <c-col :span="12"> -->
            <c-button style="margin:0 0" size="small" type="primary" @click="onSndpDet" disabled>
              详情
            </c-button>
          </template>
          <!-- </c-col> -->
          <!-- </el-form-item> -->
        </c-fullbox>
        <!-- </c-col> -->
      </c-col>

      <c-col :span="24">
        <el-form-item label="">
          <c-input type="textarea" :rows="4" maxlength="140" v-model="model.cpdgrp.ori.pts.adrblk" show-word-limit
            placeholder="请输入地址信息" disabled></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="汇款人" prop="cpdgrp.orc.pts.ref">
          <c-input v-model="model.cpdgrp.orc.pts.ref" maxlength="16" placeholder=""
            :disabled="model.cpdgrp.rec.swftyp =='' "></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="账号" prop="cpdgrp.rec.orcact">
          <c-input v-model="model.cpdgrp.rec.orcact" maxlength="35" placeholder="汇款人账号"
            :disabled="model.cpdgrp.rec.swftyp =='' "></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <c-fullbox>
          <el-form-item label="" prop="cpdgrp.orc.pts.extkey">
            <c-input v-model="model.cpdgrp.orc.pts.extkey" placeholder="请输入汇款人客户号" @keyup.enter.native="
                showGridPromptDialog('cpdgrp.orc.pts.extkey')
            " :disabled="model.cpdgrp.rec.swftyp =='' ">
            </c-input>
          </el-form-item>
          <!-- </c-col>
                <c-col :span="6" style="text-align: right"> -->
          <template slot="footer">
            <c-button style="margin:0 10px 0 10px;padding: 0 12px;" size="small" type="primary" icon="el-icon-search">
            </c-button>

            <c-button style="margin:0 0" size="small" type="primary" @click="onSndpDet"
              :disabled="model.cpdgrp.rec.swftyp =='' ">
              详情
            </c-button>
          </template>
        </c-fullbox>
      </c-col>

      <c-col :span="24">
        <el-form-item label="">
          <c-input type="textarea" :rows="4" maxlength="140" v-model="model.cpdgrp.orc.pts.adrblk" show-word-limit
            placeholder="请输入地址信息" :disabled="model.cpdgrp.rec.swftyp =='' "></c-input>
        </el-form-item>
      </c-col>
    </c-col>

    <!-- ================底部--右================= -->
    <c-col :span="11" :offset="1" v-if="
         model.cpdgrp.rec.swftyp === '' ||
         model.cpdgrp.rec.swftyp === '103'
    " style="margin-top: 10px">
      <c-col :span="24">
        <c-fullbox>
          <el-form-item label="发报行" prop="cpdgrp.snd.pts.extkey">
            <c-input placeholder="请输入发报行" v-model="model.cpdgrp.snd.pts.extkey"
              @keyup.enter.native="showGridPromptDialog('cpdgrp.snd.pts.extkey')"></c-input>
          </el-form-item>

          <template slot="footer">

            <c-button style="margin:0 10px 0 10px;padding: 0 12px;" size="small" type="primary" icon="el-icon-search">
            </c-button>

            <c-button style="margin:0 0" size="small" type="primary" @click="onSndpDet" disabled>
              详情
            </c-button>
          </template>
        </c-fullbox>
      </c-col>

      <c-col :span="24">
        <el-form-item label="" prop="cpdgrp.snd.pts.nam">
          <c-input placeholder="" disabled v-model="model.cpdgrp.snd.pts.nam"></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="指令代码" prop="cpdgrp.rec.f23e">
          <c-input v-model="model.cpdgrp.rec.f23e" maxlength="35" placeholder="请输入指令代码"></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <c-col :span="13">
          <el-form-item label="原始金额" prop="cpdgrp.rec.curf33b">
            <c-select v-model="model.cpdgrp.rec.curf33b" style="width: 100%" placeholder="">
              <el-option v-for="item in codes.currencycode" :key="item.value" :label="item.value+item.label"
                :value="item.value"></el-option>
            </c-select>
          </el-form-item>
        </c-col>
        <c-col :span="11">
          <el-form-item label="" label-width="8px" prop="cpdgrp.rec.amtf33b">
            <c-input v-model="model.cpdgrp.rec.amtf33b" placeholder="请输入原始金额"></c-input>
          </el-form-item>
        </c-col>
      </c-col>

      <c-col :span="24">
        <el-form-item label="汇率" prop="cpdgrp.rec.f36">
          <c-input v-model="model.cpdgrp.rec.f36" placeholder=""></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <c-col :span="13">
          <el-form-item label="发报行扣费金额" prop="cpdgrp.rec.cur71f">
            <c-select v-model="model.cpdgrp.rec.cur71f" placeholder="" style="width: 100%">
              <el-option v-for="item in codes.currencycode" :key="item.value" :label="item.value+item.label"
                :value="item.value"></el-option>
            </c-select>
          </el-form-item>
        </c-col>
        <c-col :span="11">
          <el-form-item label="" label-width="8px" prop="cpdgrp.rec.amt71f">
            <c-input v-model="model.cpdgrp.rec.amt71f" placeholder="请输入发报行扣费金额"></c-input>
          </el-form-item>
        </c-col>
      </c-col>

      <c-col :span="24">
        <el-form-item label="银行操作码" prop="cpdgrp.rec.f23b">
          <c-input v-model="model.cpdgrp.rec.f23b" maxlength="4" placeholder=""></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="账号" prop="cpdgrp.rec.pyeact">
          <c-input v-model="model.cpdgrp.rec.pyeact" maxlength="35" placeholder="请输入账号"></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <c-fullbox>
          <el-form-item label="收款人" prop="cpdgrp.pye.pts.extkey">
            <c-input v-model="model.cpdgrp.pye.pts.extkey" maxlength="14" placeholder="请输入收款人" @keyup.enter.native="
                showGridPromptDialog('cpdgrp.pye.pts.extkey')
            "></c-input>
          </el-form-item>
          <template slot="footer">
            <c-button style="margin:0 10px 0 10px;padding: 0 12px;" size="small" type="primary" icon="el-icon-search">
            </c-button>

            <c-button style="margin:0 0" size="small" type="primary" @click="onSndpDet" disabled>
              详情
            </c-button>
          </template>
        </c-fullbox>
      </c-col>

      <c-col :span="24">
        <el-form-item label="" prop="cpdgrp.pye.pts.adrblk">
          <c-input type="textarea" :rows="4" maxlength="140" v-model="model.cpdgrp.pye.pts.adrblk" show-word-limit
            placeholder="请输入地址信息" disabled></c-input>
        </el-form-item>
      </c-col>
    </c-col>

    <c-col :span="11" :offset="1" v-if="
              model.cpdgrp.rec.swftyp === '202' ||
              model.cpdgrp.rec.swftyp === '200'
    " style="margin-top: 10px">
      <c-col :span="24">
        <c-fullbox>
          <el-form-item label="发报行" prop="cpdgrp.snd.pts.extkey">
            <c-input placeholder="请输入发报行" v-model="model.cpdgrp.snd.pts.extkey"
              @keyup.enter.native="showGridPromptDialog('cpdgrp.snd.pts.extkey')"></c-input>
          </el-form-item>

          <template slot="footer">
            <c-button style="margin:0 10px 0 10px;padding: 0 12px;" size="small" type="primary" icon="el-icon-search">
            </c-button>

            <c-button style="margin:0 0" size="small" type="primary" @click="onSndpDet" disabled>
              详情
            </c-button>
          </template>
        </c-fullbox>
      </c-col>

      <c-col :span="24">
        <el-form-item label="" prop="cpdgrp.snd.pts.adrblk">
          <c-input type="textarea" :rows="4" maxlength="140" show-word-limit placeholder="请输入地址信息"
            v-model="model.cpdgrp.snd.pts.adrblk"></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="收款人" prop="cpdgrp.pye.pts.ref">
          <c-input v-model="model.cpdgrp.pye.pts.ref" maxlength="14" placeholder="请输入收款人"></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="账号" prop="cpdgrp.rec.pyeact">
          <c-input v-model="model.cpdgrp.rec.pyeact" maxlength="35" placeholder="请输入账号"></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <c-fullbox>
          <el-form-item label="收款人" prop="cpdgrp.pye.pts.extkey">
            <c-input v-model="model.cpdgrp.pye.pts.extkey" placeholder="请输入收款人客户号">
            </c-input>
          </el-form-item>
          <template slot="footer">
            <c-button style="margin:0 10px 0 10px;padding: 0 12px;" size="small" type="primary" icon="el-icon-search">
            </c-button>

            <c-button style="margin:0 0" size="small" type="primary" @click="onSndpDet" disabled>
              详情
            </c-button>
          </template>
        </c-fullbox>
      </c-col>

      <c-col :span="24">
        <el-form-item label="" prop="cpdgrp.pye.pts.adrblk">
          <c-input type="textarea" :rows="4" maxlength="140" v-model="model.cpdgrp.pye.pts.adrblk" show-word-limit
            placeholder="请输入地址信息" disabled></c-input>
        </el-form-item>
      </c-col>
    </c-col>

    <c-col :span="11" :offset="1" v-if="model.cpdgrp.rec.swftyp === 'OTH'" style="margin-top: 10px">
      <c-col :span="24">
        <c-fullbox>
          <el-form-item label="发报行" prop="cpdgrp.snd.pts.extkey">
            <c-input placeholder="请输入发报行" v-model="model.cpdgrp.snd.pts.extkey"
              @keyup.enter.native="showGridPromptDialog('cpdgrp.snd.pts.extkey')"></c-input>
          </el-form-item>
          <template slot="footer">
            <c-button style="margin:0 10px 0 10px;padding: 0 12px;" size="small" type="primary" icon="el-icon-search">
            </c-button>

            <c-button style="margin:0 0" size="small" type="primary" @click="onSndpDet" disabled>
              详情
            </c-button>
          </template>
        </c-fullbox>
      </c-col>

      <c-col :span="24">
        <el-form-item label="" prop="cpdgrp.snd.pts.adrblk">
          <c-input type="textarea" :rows="4" maxlength="140" show-word-limit placeholder="请输入地址信息"
            v-model="model.cpdgrp.snd.pts.adrblk"></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="付款详情" prop="cpdgrp.blk.contag70">
          <c-input type="textarea" placeholder="" readonly rows="3" v-model="model.cpdgrp.blk.contag70"></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="收款人Ref." prop="cpdgrp.pye.pts.ref">
          <c-input v-model="model.cpdgrp.pye.pts.ref" maxlength="16" placeholder=""></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="账号" prop="cpdgrp.rec.pyeact">
          <c-input v-model="model.cpdgrp.rec.pyeact" maxlength="35" placeholder="请输入账号"></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <c-fullbox>
          <el-form-item label="" prop="cpdgrp.pye.pts.extkey">
            <c-input v-model="model.cpdgrp.pye.pts.extkey" placeholder="请输入收款人客户号">
            </c-input>
          </el-form-item>
          <template slot="footer">
            <c-button style="margin:0 10px 0 10px;padding: 0 12px;" size="small" type="primary" icon="el-icon-search">
            </c-button>

            <c-button style="margin:0 0" size="small" type="primary" @click="onSndpDet" disabled>
              详情
            </c-button>
          </template>
        </c-fullbox>
      </c-col>

      <c-col :span="24">
        <el-form-item label="" prop="cpdgrp.pye.pts.adrblk">
          <c-input type="textarea" :rows="4" maxlength="140" v-model="model.cpdgrp.pye.pts.adrblk" show-word-limit
            placeholder="请输入地址信息" disabled></c-input>
        </el-form-item>
      </c-col>
    </c-col>
    
    <!--新增-->
    <c-col :span="24">
      <!-- beps121  beps122 beps125 CMT100 PKG001 PKG005 FMT100 hvps111 hvps112 hvps115-->
      <c-col :span="11" v-if="model.cpdgrp.rec.swftyp == 'BEP'||
      model.cpdgrp.rec.swftyp == 'BEQ'||
      model.cpdgrp.rec.swftyp == 'BES'||
      model.cpdgrp.rec.swftyp == 'CIU'||
      model.cpdgrp.rec.swftyp == 'CIV'||
      model.cpdgrp.rec.swftyp == 'CIW'||
      model.cpdgrp.rec.swftyp == 'CMT'||
      model.cpdgrp.rec.swftyp == 'CMY'||
      model.cpdgrp.rec.swftyp == 'CMX'||
      model.cpdgrp.rec.swftyp == 'FMS'||
      model.cpdgrp.rec.swftyp == 'HVP'||
      model.cpdgrp.rec.swftyp == 'HVR'||
      model.cpdgrp.rec.swftyp == 'HVQ'">
        <c-col :span="24">
          <el-form-item label="汇款人名称" prop="cptgrp.cptp.orcnam">
            <c-input v-model="model.cptp.orcnam" type="textarea" maxlength="35"></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="24">
          <el-form-item label="汇款人地址" prop="cptp.orcadr">
            <c-input v-model="model.cptp.orcadr" type="textarea" maxlength="35"></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="24">
          <el-form-item label="收款人名称" prop="cptp.pyenam">
            <c-input v-model="model.cptp.pyenam" type="textarea" maxlength="35"></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="24">
          <el-form-item label="收款人地址" prop="cptp.pyeadr">
            <c-input v-model="model.cptp.pyeadr" type="textarea" maxlength="35"></c-input>
          </el-form-item>
        </c-col>

        <!-- 第十一行 -->
        <c-col :span="24">
          <el-form-item label="账号" prop="">
            <c-input v-model="model.cpdgrp.rec.orcact"></c-input>
          </el-form-item>
        </c-col>
        <!-- 第十二行 -->
        <c-col :span="24">
          <el-form-item label="汇款人" prop="">
            <c-fullbox>
              <c-input v-model="model.cpdgrp.orc.pts.extkey"
                @keyup.enter.native="showGridPromptDialog('cpdgrp.orc.pts.extkey')"></c-input>
              <template slot="footer">
                <c-button type="primary"><span>i</span></c-button>
                <c-button type="primary">Temp.</c-button>
              </template>
            </c-fullbox>
          </el-form-item>
        </c-col>
        <!-- 第十三行 -->
        <c-col :span="24">
          <el-form-item label="" prop="cpdgrp.orc.pts.adrblk">
            <c-input type="textarea" v-model="model.cpdgrp.orc.pts.adrblk" disabled></c-input>
          </el-form-item>
        </c-col>
      </c-col>
      <!--右边-->
      <c-col :span="11" :offset="1" v-if="model.cpdgrp.rec.swftyp=='BEP'||
      model.cpdgrp.rec.swftyp=='BEQ'||
      model.cpdgrp.rec.swftyp=='BES'||
      model.cpdgrp.rec.swftyp=='CMT'||
      model.cpdgrp.rec.swftyp=='CMY'||
      model.cpdgrp.rec.swftyp=='CMX'||
      model.cpdgrp.rec.swftyp=='FMS'||
      model.cpdgrp.rec.swftyp=='HVP'||
      model.cpdgrp.rec.swftyp=='HVR'||
      model.cpdgrp.rec.swftyp=='HVQ'">
        <!-- 第八行 -->
        <c-col :span="24">
          <el-form-item label="接收行名称" prop="">
            <c-input v-model="model.cptp.resbchnam" disabled></c-input>
          </el-form-item>
        </c-col>

        <!-- 第九行 -->
        <c-col :span="24">
          <c-col :span="24">
            <el-form-item label="接收行名称" prop="cptp.resbch">
              <c-input v-model="model.cptp.resbch" disabled></c-input>
            </el-form-item>
          </c-col>
        </c-col>

        <c-col :span="24">
          <el-form-item label="业务种类" prop="cptp.bustyp">
            <c-input v-model="model.cptp.bustyp" disabled></c-input>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <c-col :span="12">
            <el-form-item label="收款人开户行行号名称" prop="cptp.pyebchkey">
              <c-input v-model="model.cptp.pyebchkey" disabled></c-input>
            </el-form-item>
          </c-col>

          <c-col :span="12">
            <el-form-item label="二代模式" prop="">
              <c-button>获取</c-button>
            </el-form-item>
          </c-col>
        </c-col>

        <c-col :span="24">
          <c-col :span="12">
            <el-form-item label="" prop="cptp.pyebchnam">
              <c-input v-model="model.cptp.pyebchnam" disabled></c-input>
            </el-form-item>
          </c-col>
          <c-col :span="12">
            <el-form-item label-width="0" prop="">
              <c-input v-model="model.cptp.secmod" disabled></c-input>
            </el-form-item>
          </c-col>
        </c-col>

        <c-col :span="24">
          <el-form-item label="附言" prop="">
            <c-input v-model="model.cptp.commet"></c-input>
          </el-form-item>
        </c-col>

        <!-- 第十五行 -->
        <c-col :span="24">
          <el-form-item label="账号" prop="cpdgrp.rec.pyeact">
            <c-input v-model="model.cpdgrp.rec.pyeact"></c-input>
          </el-form-item>
        </c-col>
        <!-- 第十六行 -->
        <c-col :span="24">
          <el-form-item label="收款人" prop="">
            <c-fullbox>
              <c-input v-model="model.cpdgrp.pye.pts.extkey"
                @keyup.enter.native="showGridPromptDialog('cpdgrp.pye.pts.extkey')"></c-input>
              <template slot="footer">
                <c-button type="primary">
                  <span style="font-family: '宋体'; font-weight: bold">i</span>
                </c-button>
                <c-button type="primary">Details</c-button>
              </template>
            </c-fullbox>
          </el-form-item>
        </c-col>
        <!-- 第十七行 -->
        <c-col :span="24">
          <el-form-item label="" prop="">
            <c-input type="textarea" v-model="model.cpdgrp.pye.pts.adrblk"></c-input>
          </el-form-item>
        </c-col>
      </c-col>
      <c-col :span="11" :offset="1"
        v-show="model.cpdgrp.rec.swftyp=='CIU'||model.cpdgrp.rec.swftyp=='CIV'||model.cpdgrp.rec.swftyp=='CIW'">
        <!-- 第九行 -->
        <c-col :span="24">
          <el-form-item label="收款直参行号" prop="cptp.reconebch">
            <c-input v-model="model.cptp.reconebch"></c-input>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <el-form-item label="收款直参名称" prop="cptp.reconebchnam">
            <c-input type="textarea" v-model="model.cptp.reconebchnam"></c-input>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <el-form-item label="业务种类" prop="cptp.bustyp">
            <c-select v-model="model.cptp.bustyp">
              <el-option v-for="item in this.bustyp" :key="item.value" :label="item.value + item.label"
                :value="item.value">
              </el-option>
            </c-select>
          </el-form-item>
        </c-col>

        <!-- 第十五行 -->
        <c-col :span="24">
          <el-form-item label="账号" prop="cpdgrp.rec.pyeact">
            <c-input v-model="model.cpdgrp.rec.pyeact"></c-input>
          </el-form-item>
        </c-col>
        <!-- 第十六行 -->
        <c-col :span="24">
          <el-form-item label="收款人" prop="">
            <c-fullbox>
              <c-input v-model="model.cpdgrp.pye.pts.extkey"></c-input>
              <template slot="footer">
                <c-button type="primary"><span style="font-family: '宋体'; font-weight: bold">i</span></c-button>
                <c-button type="primary">Details</c-button>
              </template>
            </c-fullbox>
          </el-form-item>
        </c-col>
        <!-- 第十七行 -->
        <c-col :span="24">
          <el-form-item label="" prop="">
            <c-input type="textarea" v-model="model.cpdgrp.pye.pts.adrblk"></c-input>
          </el-form-item>
        </c-col>
      </c-col>

    </c-col>

    <el-dialog :fullscreen="true" :visible.sync="infptaVisible" top="10vh" width="80%" custom-class="infptaDialog"
      :before-close="handleClose">
      <Infpta></Infpta>
    </el-dialog>
  </c-col>
</template>

<script>
import commonProcess from "~/mixin/commonProcess";

export default {
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [commonProcess],
  data() {
    return {
      infptaVisible: false,
      bustyp: [
        { value: 'GODX', label: '货期贸易' },
        { value: 'STRX', label: '服务贸易' },
        { value: 'CTFX', label: '资本项下' },
        { value: 'FTFX', label: '金融机构头寸调拨' },
        { value: 'BDES', label: '债卷还本利息' },
        { value: 'BPRR', label: '债卷还本金' },
        { value: 'BINP', label: '债卷利息' },
        { value: 'BISF', label: '债卷发行手续费' },
        { value: 'BCAF', label: '债卷兑付手续费' },
        { value: 'CBCF', label: '附息式债卷兑付手续费' },
        { value: 'OTFX', label: '其他' },
      ],
    };
  },
  methods: {
    onSndpDet() {
      this.$emit("onSndpDet");
    },
    onCptpGetInfpta() {
      this.infptaVisible = true;
    },
    handleClose(done) {
      done();
    },
    commonExecuteNotify() {
      this.executeNotify().then((res) => {
        if ((res.respCode == SUCCESS)) {
          Utils.copyValueFromVO(this.model, res.data);
        }
      });
    },
  },
};
</script>

<style>

</style>