<template>
  <div class="eibs-tab" style="">
    <c-col :span="24">
      <c-col :span="11">
        <c-col :span="24">
          <el-form-item label="信用证参考号" prop="dedgrp.rec.ownref">
            <c-fullbox>
              <c-input
                v-model="model.dedgrp.rec.ownref"
                maxlength="16"
                placeholder="请输入信用证参考号"
                disabled
              ></c-input>
              <template slot="footer">
                <c-button style="padding: 0 14px" size="small" type="primary">
                  <span
                    style="
                      font-size: 15px;
                      font-family: '宋体';
                      font-weight: bold;
                    "
                    >i</span
                  >
                </c-button>
              </template>
            </c-fullbox>
          </el-form-item>
        </c-col>
        <!-- <c-col :span="1" style="text-align: right;margin-left:10px">
                    <c-button
                        style="margin:0;padding: 0 14px;"
                        size="small"
                        type="primary"
                    >
                    <span style="font-size:15px;font-family:'宋体';font-weight:bold">i</span>
                    </c-button>
                </c-col> -->
      </c-col>

      <c-col :span="11" :offset="1">
        <c-col :span="12">
          <el-form-item label="信用证余额" prop="dedgrp.cbs.opn1.cur">
            <c-input
              v-model="model.dedgrp.cbs.opn1.cur"
              maxlength="3"
              placeholder="请输入Currency"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="" prop="dedgrp.cbs.opn1.amt" label-width="2%">
            <c-input
              v-model="model.dedgrp.cbs.opn1.amt"
              placeholder="请输入Balance"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>
    </c-col>

    <c-col :span="24" style="height: 24px; margin-top: -10px">
      <el-form-item label="单据信息" class="messageLabel"> </el-form-item>
    </c-col>
    <c-col :span="24" style="height: 0px">
      <el-divider></el-divider>
    </c-col>

    <c-col :span="11" style="margin-top: 10px">
      <c-col :span="24">
        <c-col :span="22">
          <el-form-item label="单据参考号" prop="bfdgrp.rec.ownref">
            <c-input
              v-model="model.bfdgrp.rec.ownref"
              maxlength="16"
              placeholder="请输入单据参考号"
            ></c-input>
          </el-form-item>
        </c-col>
        <c-col :span="2" style="text-align: right">
          <c-button
            style="margin: 0; padding: 0 14px"
            size="small"
            type="primary"
          >
            <span
              style="font-size: 15px; font-family: '宋体'; font-weight: bold"
              >i</span
            >
          </c-button>
        </c-col>
      </c-col>
    </c-col>

    <c-col :span="11" :offset="1" style="margin-top: 10px">
      <el-form-item label="单据摘要" prop="bfdgrp.rec.nam">
        <c-input
          v-model="model.bfdgrp.rec.nam"
          maxlength="40"
          placeholder="请输入Name of Bill Contract"
          disabled
        ></c-input>
      </el-form-item>
    </c-col>

    <!-- ==========middle-left======== -->
    <c-col :span="11">
      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="单据金额" prop="bfdgrp.cbs.max.cur">
            <c-select
              v-model="model.bfdgrp.cbs.max.cur"
              placeholder="请选择单据金额"
              disabled
            >
            </c-select>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="" prop="bfdgrp.cbs.max.amt" label-width="2%">
            <c-input
              v-model="model.bfdgrp.cbs.max.amt"
              placeholder="请输入单据金额"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>

      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="单据余额" prop="bfdgrp.cbs.opn1.cur">
            <c-select
              v-model="model.bfdgrp.cbs.opn1.cur"
              placeholder="请选择单据余额"
              disabled
            ></c-select>
          </el-form-item>
        </c-col>
        <c-col :span="12">
          <el-form-item label="" prop="bfdgrp.cbs.opn1.amt" label-width="2%">
            <c-input
              v-model="model.bfdgrp.cbs.opn1.amt"
              placeholder="请输入Balance"
              disabled
            ></c-input>
          </el-form-item>
        </c-col>
      </c-col>
      <c-col :span="24">
        <c-col :span="24">
          <el-form-item label="远期单据到期日" prop="bfdgrp.rec.matdat">
            <c-date-picker
              type="date"
              v-model="model.bfdgrp.rec.matdat"
              style="width: 100%"
              placeholder="请选择远期单据到期日"
            ></c-date-picker>
          </el-form-item>
        </c-col>
      </c-col>

      <c-col :span="24">
        <c-col :span="12">
          <el-form-item label="到单日期" prop="bfdgrp.rec.rcvdat">
            <c-date-picker
              type="date"
              v-model="model.bfdgrp.rec.rcvdat"
              style="width: 100%"
              placeholder="请选择到单日期"
            ></c-date-picker>
          </el-form-item>
        </c-col>
        <c-col :span="1"> &nbsp; </c-col>
        <c-col :span="11">
          <el-form-item label="提示日期" prop="bfdgrp.rec.predat">
            <c-date-picker
              type="date"
              v-model="model.bfdgrp.rec.predat"
              style="width: 100%"
              placeholder="请选择提示日期"
            ></c-date-picker>
          </el-form-item>
        </c-col>
      </c-col>
      <c-col :span="24">
        <el-form-item label="单据类型" prop="bfdgrp.rec.doctypcod">
          <c-select
            v-model="model.bfdgrp.rec.doctypcod"
            style="width: 100%"
            placeholder="请选择单据类型"
          >
            <el-option
              v-for="item in codes.bedtyp"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </c-select>
          <!--
            <c-select v-model="model.ditp.doctypcod" :code="code.bedtyp" />
-->
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <el-form-item label="单据状态" prop="bfdgrp.rec.docsta">
          <!--
            <c-input  v-model="model.bfdgrp.rec.docsta" maxlength="40"  placeholder="请输入单据状态"></c-input>
            -->
          <c-select
            v-model="model.bfdgrp.rec.docsta"
            style="width: 100%"
            placeholder="请选择单据状态"
            disabled
          >
            <el-option
              v-for="item in codes.docsta"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </c-select>
        </el-form-item>
      </c-col>
    </c-col>
    <!-- ==========middle-right======== -->
    <c-col :span="11" :offset="1">
      <c-col :span="24">
        <el-form-item label="交单人" prop="bfdgrp.prb.pts.ref">
          <c-input
            v-model="model.bfdgrp.prb.pts.ref"
            maxlength="16"
            placeholder="请输入交单人"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="" prop="bfdgrp.prb.pts.nam">
          <c-input
            v-model="model.bfdgrp.prb.pts.nam"
            maxlength="40"
            placeholder="请输入交单人名称"
            disabled
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="开证行" prop="dedgrp.rec.kzref">
          <c-input
            v-model="model.dedgrp.rec.kzref"
            maxlength="35"
            placeholder="请输入开证行行号"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="" prop="bfdgrp.iss.pts.nam">
          <c-input
            v-model="model.bfdgrp.iss.pts.nam"
            maxlength="40"
            placeholder="请输入开证行名称"
            disabled
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="申请人" prop="bfdgrp.apl.pts.ref">
          <c-input
            v-model="model.bfdgrp.apl.pts.ref"
            maxlength="16"
            placeholder="请输入申请人"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="" prop="bfdgrp.apl.pts.nam">
          <c-input
            v-model="model.bfdgrp.apl.pts.nam"
            maxlength="40"
            placeholder="请输入申请人名称"
            disabled
          ></c-input>
        </el-form-item>
      </c-col>
    </c-col>

    <!--头部end-->
    <c-col :span="24" style="height: 24px; margin-top: -10px">
      <el-form-item label="寄单信息" class="messageLabel"> </el-form-item>
    </c-col>
    <c-col :span="24" style="height: 0px">
      <el-divider></el-divider>
    </c-col>
    <!--左边start-->
    <c-col :span="11">
      <c-col :span="24" style="margin-top: 10px">
        <el-form-item label="付款人" prop="bfdgrp.rec.payrol">
          <c-select
            v-model="model.bfdgrp.rec.payrol"
            style="width: 100%"
            placeholder="请选择付款人"
          >
          </c-select>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <el-form-item label="BIC" prop="bfdgrp.oth.pts.extkey">
          <c-input
            v-model="model.bfdgrp.oth.pts.extkey"
            maxlength="16"
            placeholder="请输入BIC"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="联行行号" prop="bfdgrp.oth.pts.bankno">
          <c-input
            v-model="model.bfdgrp.oth.pts.bankno"
            maxlength="20"
            placeholder="请输入联行行号"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="联行名称" prop="bfdgrp.oth.pts.jigomc">
          <c-input
            type="textarea"
            v-model="model.bfdgrp.oth.pts.jigomc"
            maxlength="35"
            show-word-limit
            placeholder="请输入联行名称"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="联行地址" prop="bfdgrp.oth.pts.dizhii">
          <c-input
            type="textarea"
            v-model="model.bfdgrp.oth.pts.dizhii"
            maxlength="35"
            show-word-limit
            placeholder="请输入地址"
          ></c-input>
        </el-form-item>
      </c-col>

      <c-col :span="12">
        <el-form-item label="到单日期" prop="bfdgrp.rec.rcvdat">
          <c-date-picker
            type="date"
            v-model="model.bfdgrp.rec.rcvdat"
            style="width: 100%"
            placeholder="请选择到单日期"
          ></c-date-picker>
        </el-form-item>
      </c-col>

      <c-col :span="12">
        <el-form-item label="装运日期" prop="bfdgrp.rec.shpdat">
          <c-date-picker
            type="date"
            v-model="model.bfdgrp.rec.shpdat"
            style="width: 100%"
            placeholder="请选择装运日期"
          ></c-date-picker>
        </el-form-item>
      </c-col>

      <c-col :span="12">
        <el-form-item label="寄单日期" prop="bfdgrp.rec.predat">
          <c-date-picker
            type="date"
            v-model="model.bfdgrp.rec.predat"
            style="width: 100%"
            placeholder="请选择寄单日期"
          ></c-date-picker>
        </el-form-item>
      </c-col>

      <c-col :span="12">
        <el-form-item label="远期单据到期日" prop="bfdgrp.rec.matdat">
          <c-date-picker
            type="date"
            v-model="model.bfdgrp.rec.matdat"
            style="width: 100%"
            placeholder="请选择远期单据到期日"
          ></c-date-picker>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="远期单据到期时间" prop="bfdgrp.blk.matper">
          <c-input
            type="textarea"
            v-model="model.bfdgrp.blk.matper"
            maxlength="65"
            show-word-limit
            placeholder="请输入远期单据到期时间"
          ></c-input>
        </el-form-item>
      </c-col> </c-col
    ><!--左边end-->
    <!--右边start-->
    <c-col :span="11" :offset="1">
      <c-col :span="24" style="margin-top: 10px">
        <el-form-item label="交单人" prop="bfdgrp.rec.docprbrol">
          <c-select
            v-model="model.bfdgrp.rec.docprbrol"
            style="width: 100%"
            placeholder="请选择交单人"
          >
          </c-select>
        </el-form-item>
      </c-col>
      <!--
      <c-ptapdome
        :disabledjigomc="true"
        :model="model"
        :argadr="{
          title: '交单人',
          grp: 'bfdgrp',
          rol: 'prb',
        }"
        :isPrb="true"
      >
      </c-ptapdome>
      -->
      <c-ptap
        :model="model"
        :argadr="{
          title: '交单人',
          grp: 'bfdgrp',
          rol: 'prb',
        }"
        :disabled="true"
        :isAdrblk="false"
        @onSeainf="onSeainf"
        @onPrbpDet="onPrbpDet"
      >
      </c-ptap>
      <!--
      <c-col :span="24">
        <el-form-item label="" prop="bfdgrp.prb.pts.extkey">
          <c-fullbox>
            <c-input
              v-model="model.bfdgrp.prb.pts.extkey"
              maxlength="16"
              placeholder="请输入交单人"
            ></c-input>
            <template slot="footer">
              <c-button
                style="margin: 0px 10px 0 10; padding: 0 12px"
                size="small"
                type="primary"
                @click="onBFDSeainf"
              >
                <span style="font-family: '宋体'; font-weight: bold">i</span>
              </c-button>
              <c-button size="small" type="primary" @click="onPrbpDet">
                Details
              </c-button>
            </template>
          </c-fullbox>
        </el-form-item>
      </c-col>

      <c-col :span="24">
        <el-form-item label="名称" prop="bfdgrp.prb.namelc">
          <c-input
            type="textarea"
            v-model="model.bfdgrp.prb.namelc"
            maxlength="35"
            show-word-limit
            placeholder="请输入名称"
          ></c-input>
        </el-form-item>
      </c-col>
      <c-col :span="24">
        <el-form-item label="地址" prop="bfdgrp.prb.adrelc">
          <c-input
            type="textarea"
            v-model="model.bfdgrp.prb.adrelc"
            maxlength="35"
            show-word-limit
            placeholder="请输入地址"
          ></c-input>
        </el-form-item>
      </c-col>
-->
      <c-col :span="24">
        <c-checkbox v-model="model.ameadrflg"
          >Ammendment Ben. or Iss. Address</c-checkbox
        >
      </c-col>
    </c-col>
    <!--右边end-->
    <c-col :span="24" style="height: 24px">
      <el-form-item label="待还融资" class="messageLabel"> </el-form-item>
    </c-col>
    <c-col :span="24" style="height: 0px">
      <el-divider></el-divider>
    </c-col>
    <c-col :span="24" :offset="0">
      <div class="e-table-wrapper">
        <c-table
          :data="model.bftp.docgrdm.docgrdp"
          style="width: 100%"
          :paginationShow="false"
        >
          <el-table-column prop="cmail1" label="1st" width="auto">
          </el-table-column>
          <el-table-column prop="cmail2" label="2nd." width="auto">
          </el-table-column>
          <el-table-column prop="docnam" label="Document" width="auto">
          </el-table-column>
        </c-table>
      </div>
    </c-col>
  </div>
  <!--</div>-->
</template>
<script>
import Api from "~/service/Api";
import CommonProcess from "~/mixin/CommonProcess";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Bftsnd/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 },
  created: function () {},
};
</script>
<style scoped>
.el-checkbox {
  text-align: left;
  margin-right: 0;
}
.formItemLabel >>> .el-form-item__label {
  text-align: left;
  font-weight: bold;
}
.el-col >>> .el-divider--horizontal {
  margin-top: 1px;
}
.messageLabel >>> .el-form-item__label {
  text-align: left;
  font-weight: bold;
  font-size: 12px;
}
</style>
