<template>
  <div class="eibs-tab">
    <el-form
      ref="modelForm"
      label-width="150px"
      label-position="right"
      size="small"
      :validate-on-rule-change="false"
      disabled
    >
      <c-row>
        <!-- <div class="infTopBtn">
            <el-button-group>
                <c-button size="small" type="primary" icon="el-icon-arrow-left"></c-button>
                <c-button size="small" type="primary" icon="el-icon-arrow-right"></c-button>
            </el-button-group>
            <c-button size="small" type="primary">Print</c-button>
            <c-button size="small" type="primary">Use</c-button>
            <c-button size="small" type="primary">Loginfo</c-button>
        </div> -->
        <c-col :span="11">
          <c-col :span="24">
            <el-form-item label="业务编号" prop="cpdgrp.rec.ownref">
              <c-fullbox>
                <c-input
                  v-model="model.cpdgrp.rec.ownref"
                  maxlength="16"
                  placeholder="请输入Our Reference"
                >
                </c-input>
                <template slot="footer">
                  <c-button
                    size="small"
                    type="primary"
                    icon="el-icon-search"
                    style="margin: 0px 10px 0 10; padding: 0 12px"
                  ></c-button>
                  <c-button
                    size="small"
                    type="primary"
                    @click="onRecpanGetref"
                    style="margin: 0 0"
                  >
                    获取
                  </c-button>
                </template>
              </c-fullbox>
            </el-form-item>
          </c-col>
        </c-col>
        <c-col :span="11" :offset="1">
          <!-- <c-col :span="10"> -->
          <el-form-item label="Name" prop="cpdgrp.rec.nam">
            <c-input
              v-model="model.cpdgrp.rec.nam"
              maxlength="40"
              placeholder="请输入Name"
            ></c-input>
          </el-form-item>
          <!-- </c-col> -->
          <!-- <c-col :span="10">
          <el-form-item
            label="Drag  Drop Sender"
            prop="recpan.recget.sdamod.dadsnd"
            label-width="120px"
          >
            <c-input
              v-model="model.recpan.recget.sdamod.dadsnd"
              placeholder="请输入Drag  Drop Sender"
            >
            </c-input>
          </el-form-item>
        </c-col> -->
        </c-col>

        <c-col :span="23" style="height: 10px">
          <el-divider></el-divider>
        </c-col>
        <!-- ============middle-left============ -->
        <c-col :span="11">
          <c-col :span="24">
            <el-form-item label="清算编号" prop="cpdgrp.rec.sysno">
              <c-fullbox>
                <c-input
                  v-model="model.cpdgrp.rec.sysno"
                  maxlength="21"
                  placeholder="请输入清算编号"
                ></c-input>
                <template slot="footer">
                  <c-button
                    size="small"
                    type="primary"
                    @click="onRecpanGetinf"
                    style="padding: 0 12px"
                  >
                    Get
                  </c-button>
                </template>
              </c-fullbox>
            </el-form-item>
          </c-col>

          <c-col :span="13">
            <el-form-item label="汇款金额" prop="cpdgrp.cbs.nom1.cur">
              <c-select
                v-model="model.cpdgrp.cbs.nom1.cur"
                style="width: 100%"
                placeholder="请选择币种"
                :code="codes.cur"
              >
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="11">
            <el-form-item label="" label-width="5px" prop="cpdgrp.cbs.max.amt">
              <c-input-currency
                v-model="model.cpdgrp.cbs.max.amt"
                placeholder="请输入汇款金额"
              >
              </c-input-currency>
            </el-form-item>
          </c-col>
          <c-col :span="13">
            <el-form-item label="所属行" prop="cpdgrp.rec.othbch">
              <c-input
                v-model="model.cpdgrp.rec.othbch"
                maxlength="8"
                placeholder="请输入所属行"
              ></c-input>
            </el-form-item>
          </c-col>
          <c-col :span="11">
            <el-form-item
              label="汇款语种"
              prop="recpan.payuil"
              label-width="40%"
            >
              <c-select
                v-model="model.recpan.payuil"
                style="width: 100%"
                placeholder="请选择汇款语种"
              >
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item label="我行费用负担" prop="cpdgrp.rec.detchgcod">
              <c-select
                v-model="model.cpdgrp.rec.detchgcod"
                style="width: 100%"
                placeholder="请选择我行费用负担"
              >
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item label="货物类型" prop="cpdgrp.rec.stagod">
              <c-select
                v-model="model.cpdgrp.rec.stagod"
                style="width: 100%"
                placeholder="请选择货物类型"
                :code="codes.godcod"
              >
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="11">
            <el-form-item label="国外费用" prop="cpdgrp.rec.feecur">
              <c-select
                v-model="model.cpdgrp.rec.feecur"
                style="width: 100%"
                placeholder="请选择币种"
                :code="codes.cur"
              >
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="13">
            <el-form-item label="" label-width="5px" prop="cpdgrp.rec.feeamt">
              <c-input-currency
                v-model="model.cpdgrp.rec.feeamt"
                placeholder="请输入汇款金额"
              >
              </c-input-currency>
            </el-form-item>
          </c-col>
        </c-col>

        <!-- ============middle-right============ -->
        <c-col :span="11" :offset="1">
          <c-col :span="13">
            <el-form-item label="汇款性质" prop="cpdgrp.rec.trntyp">
              <c-select
                v-model="model.cpdgrp.rec.trntyp"
                style="width: 100%"
                placeholder="请选择汇款性质"
                :code="codes.trntyp1"
              >
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="11">
            <el-form-item
              label="汇款方式"
              prop="cpdgrp.rec.paytype"
              label-width="40%"
            >
              <c-select
                v-model="model.cpdgrp.rec.paytype"
                style="width: 100%"
                placeholder="请选择汇款方式"
                :code="codes.paytype1"
              >
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="13">
            <el-form-item label="收款对象" prop="cpdgrp.rec.gors">
              <c-select
                v-model="model.cpdgrp.rec.gors"
                style="width: 100%"
                placeholder="请选择收款对象"
                :code="codes.gors"
              >
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="11">
            <el-form-item
              label="收支类型"
              prop="cpdgrp.rec.sztyp"
              label-width="40%"
            >
              <c-select
                v-model="model.cpdgrp.rec.sztyp"
                style="width: 100%"
                placeholder="请选择收支类型"
                :code="codes.sztyp"
              >
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item label="Uetr" prop="recpan.uetr">
              <c-fullbox>
                <c-input
                  v-model="model.recpan.uetr"
                  maxlength="40"
                  placeholder="请输入Uetr"
                ></c-input>

                <template slot="footer">
                  <c-button
                    size="small"
                    type="primary"
                    @click="onRecpanGetuetr"
                  >
                    Get
                  </c-button>
                </template>
              </c-fullbox>
            </el-form-item>
          </c-col>
          <c-col :span="13">
            <el-form-item label="解付日期" prop="cpdgrp.rec.paydat">
              <c-date-picker
                type="date"
                v-model="model.cpdgrp.rec.paydat"
                style="width: 100%"
                placeholder="请选择解付日期"
              ></c-date-picker>
            </el-form-item>
          </c-col>
          <c-col :span="11">
            <el-form-item
              label="起息日"
              prop="cpdgrp.rec.valdat"
              label-width="40%"
            >
              <c-date-picker
                type="date"
                v-model="model.cpdgrp.rec.valdat"
                style="width: 100%"
                placeholder="请选择起息日"
              ></c-date-picker>
            </el-form-item>
          </c-col>
          <c-col :span="13">
            <el-form-item label="客户类型" prop="cpdgrp.rec.clityp">
              <c-select
                v-model="model.cpdgrp.rec.clityp"
                style="width: 100%"
                placeholder="请选择客户类型"
                :code="codes.clityp"
              >
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="11">
            <el-form-item
              label="报文类型"
              prop="cpdgrp.rec.swftyp"
              label-width="40%"
            >
              <c-select
                v-model="model.cpdgrp.rec.swftyp"
                style="width: 100%"
                placeholder="请选择报文类型"
                :code="codes.swftyp1"
              >
              </c-select>
            </el-form-item>
          </c-col>

          <c-col :span="24">
            <el-form-item>
              <c-checkbox v-model="model.cpdgrp.rec.tsnflg">
                同名划转标志
              </c-checkbox>
            </el-form-item>
          </c-col>
        </c-col>

        <c-col :span="23" style="height: 10px">
          <el-divider></el-divider>
        </c-col>

        <!-- =============左============= -->
        <c-col :span="11">
          <!-- <c-col :span="24">
            <c-ptap
              :model="model"
              :argadr="{
                title: 'Ordering',
                grp: 'cpdgrp',
                rol: 'ori',
              }"
              :noRef="false"
              :onlySearch="false"
              @onAplpDet="onOripDet"
            >
            </c-ptap>
          </c-col> -->
          <c-col :span="24">
            <el-form-item label="Ordering institution (52a)">
              <c-input v-model="model.cpdgrp.ori.ref"></c-input>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <c-ptap
              :model="model"
              :argadr="{
                title: '',
                grp: 'cpdgrp',
                rol: 'orc',
              }"
              :noRef="true"
              :editExtLabel="true"
              :haveAdrLabel="false"
              :isAdrblk="false"
              @onAplpDet="onOripDet"
            >
            </c-ptap>
          </c-col>
          <c-col :span="24">
            <el-form-item label="汇款人" prop="cpdgrp.orc.ref">
              <c-input
                v-model="model.cpdgrp.rec.ref"
                maxlength="35"
                placeholder="请输入汇款人"
              ></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="请输入汇款人账号"
              ></c-input>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <c-ptap
              :model="model"
              :argadr="{
                title: '',
                grp: 'cpdgrp',
                rol: 'orc',
              }"
              :noRef="true"
              :editExtLabel="true"
              :haveAdrLabel="false"
              :isAdrblk="false"
              @onAplpDet="onOrcpDet"
            >
            </c-ptap>
          </c-col>
        </c-col>
        <!-- =============右============= -->
        <c-col :span="11" :offset="1">
          <!-- <c-col :span="24">
            <c-ptap
              :model="model"
              :argadr="{
                title: '发报行',
                grp: 'cpdgrp',
                rol: 'snd',
              }"
              :noRef="true"
              :onlySearch="false"
              @onAplpDet="onSndpDet"
            >
            </c-ptap>
           </c-col> -->
          <c-col :span="24">
            <el-form-item label="发报行" prop="cpdgrp.orc.pts.extkey">
              <c-fullbox>
                <c-input v-model="model.cpdgrp.orc.pts.extkey"></c-input>
                <template slot="footer">
                  <c-button
                    style="margin: 0px 10px 0 10; padding: 0 12px"
                    size="small"
                    type="primary"
                    @click="onSeainf"
                  >
                    <span style="font-family: '宋体'; font-weight: bold"
                      >i</span
                    >
                  </c-button>
                  <c-button
                    style="margin: 0 0"
                    size="small"
                    type="primary"
                    @click="onDetail"
                  >
                    详情
                  </c-button>
                </template>
              </c-fullbox>
            </el-form-item>
          </c-col>
          <c-col :span="24">
            <el-form-item label="" prop="cpdgrp.orc.pts.nam">
              <c-input v-model="model.cpdgrp.orc.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="11">
            <el-form-item label="原始金额" prop="cpdgrp.rec.curf33b">
              <c-select
                v-model="model.cpdgrp.rec.curf33b"
                style="width: 100%"
                placeholder="请选择币种"
                :code="codes.cur"
              >
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="13">
            <el-form-item label="" label-width="5px" prop="cpdgrp.rec.amtf33b">
              <c-input-currency
                v-model="model.cpdgrp.rec.amtf33b"
                placeholder="请输入原始金额"
              >
              </c-input-currency>
            </el-form-item>
          </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="11">
            <el-form-item label="发报行扣费金额" prop="cpdgrp.rec.cur71f">
              <c-select
                v-model="model.cpdgrp.rec.cur71f"
                style="width: 100%"
                placeholder="请选择币种"
                :code="codes.cur"
              >
              </c-select>
            </el-form-item>
          </c-col>
          <c-col :span="13">
            <el-form-item label="" label-width="5px" prop="cpdgrp.rec.amt71f">
              <c-input-currency
                v-model="model.cpdgrp.rec.amt71f"
                placeholder="请输入原始金额"
              >
              </c-input-currency>
            </el-form-item>
          </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-ptap
              :model="model"
              :argadr="{
                title: '收款人',
                grp: 'cpdgrp',
                rol: 'pye',
              }"
              :noRef="true"
              :editExtLabel="true"
              :haveAdrLabel="false"
              :onlySearch="false"
              :isAdrblk="false"
              @onAplpDet="onPyepDet"
            >
            </c-ptap>
          </c-col>
        </c-col>
      </c-row>
    </el-form>
  </div>
</template>
<script>
import Api from "~/service/Api";
import CommonProcess from "~/mixin/CommonProcess";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Infcpd/Event";
import Ptap from "~/views/Public/Ptap";

export default {
  inject: ["root"],
  props: ["model", "codes"],
  mixins: [CommonProcess],
  components: {
    "c-ptap": Ptap,
  },
  data() {
    return {};
  },
  methods: { ...Event, onSeainf() {}, onDetail() {} },
  created: function () {},
};
</script>
<style>
.infTopBtn {
  position: absolute;
  top: 0;
  z-index: 5;
  width: 100%;
  height: 30px;
  padding: 10px 0 10px 30px;
  background-color: #f7faff;
}
</style>
<style scoped>
.el-col >>> .el-divider--horizontal {
  margin-top: 0;
}
</style>