<template>
  <div class="eibs-tab">

      <c-row>
          <!-- =================顶部====================== -->
          <c-col :span="24">
              <c-col :span="11">
                  <el-form-item label="L/C Reference" prop="ledgrp.rec.ownref">
                      <c-input
                              v-model="model.ledgrp.rec.ownref"
                              maxlength="16"
                              placeholder="请输入L/C Reference"
                      ></c-input>
                  </el-form-item>
              </c-col>
              <c-col :span="11" :offset="2">
                  <el-form-item label="Name" prop="ledgrp.rec.nam">
                      <c-input
                              v-model="model.ledgrp.rec.nam"

                              maxlength="40"
                              placeholder="请输入Name"
                      ></c-input>
                  </el-form-item>
              </c-col>
              <c-col :span="11">
                  <el-form-item label="Transfer Reference" prop="ltdgrp.rec.ownref">
                      <c-input
                              v-model="model.ltdgrp.rec.ownref"
                              maxlength="16"
                              placeholder="请输入Transfer Reference"
                      ></c-input>
                  </el-form-item>
              </c-col>
              <c-col :span="11" :offset="2">
                  <el-form-item label="Name" prop="ltdgrp.rec.nam">
                      <c-input
                              v-model="model.ltdgrp.rec.nam"
                              maxlength="40"
                              placeholder="请输入Name"
                      ></c-input>
                  </el-form-item>
              </c-col>
          </c-col>
      </c-row>
      <el-divider class="el-divider--horizontal" ></el-divider>
      <c-row>
          <c-col :span="24">
              <c-col :span="16">
                    <c-col :span="10">
                        <el-form-item label="L/C Amount" prop="ltdgrp.cbs.nom1.cur">
                            <c-select
                                v-model="model.ltdgrp.cbs.nom1.cur"
                                style="width: 100%"
                                placeholder="请选择cur"
                                :code="codes.cur"
                                >
                            </c-select>
                        </el-form-item>
                    </c-col>

                    <c-col :span="6">
                        <el-form-item label="" label-width="10px" prop="ltdgrp.cbs.nom1.amt">
                            <c-input-currency
                            v-model="model.ltdgrp.cbs.nom1.amt"
                            style="width: 90%"
                            placeholder="请输入Nominal Amount"
                            ></c-input-currency>
                        </el-form-item>
                    </c-col>
                  <c-col :span="2" class="centerLable">
                        <c-checkbox v-model="model.bttp.aammod.addamtflg"
                            >Add. Amount</c-checkbox
                        >
                  </c-col>
              </c-col>
              <c-col :span="8">
                  <el-form-item label="1st Beneficiary" prop="btdgrp.be1.pts.ref">
                      <c-input  v-model="model.btdgrp.be1.pts.ref" maxlength="16"  placeholder="请输入1st Beneficiary"></c-input>
                  </el-form-item>
              </c-col>

              <c-col :span="14">
                  <c-col :span="10">
                      <el-form-item label="Open Amount" prop="ltdgrp.cbs.opn1.cur">
                          <c-select
                                  v-model="model.ltdgrp.cbs.nom1.cur"
                                  style="width: 100%"
                                  placeholder="请选择cur"
                                  :code="codes.cur"
                          >
                          </c-select>
                      </el-form-item>
                  </c-col>

                  <c-col :span="6">
                      <el-form-item label="" label-width="10px" prop="ltdgrp.cbs.opn1.amt">
                          <c-input-currency
                                  v-model="model.ltdgrp.cbs.opn1.amt"
                                  style="width: 90%"
                                  placeholder="请输入Nominal Amount"
                          ></c-input-currency>
                      </el-form-item>
                  </c-col>
              </c-col>
              <c-col :span="10">
                  <el-form-item label="" prop="btdgrp.be1.pts.nam">
                      <c-input  v-model="model.btdgrp.be1.pts.nam" maxlength="40"  placeholder="请输入Name of Party"></c-input>
                  </el-form-item>
              </c-col>

              <c-col :span="16">
                  <c-col :span="16">
                  <el-form-item label="Available with" prop="ltdgrp.avbnam">
                      <c-input
                              v-model="model.ltdgrp.avbnam"
                              maxlength="40"
                              placeholder="请输入Available with"
                      ></c-input>
                  </el-form-item>
                  </c-col>
              </c-col>
              <c-col :span="8">
                  <el-form-item label="2nd Beneficiary" prop="btdgrp.be2.pts.ref">
                      <c-input  v-model="model.btdgrp.be2.pts.ref" maxlength="16"  placeholder="请输入2nd Beneficiary"></c-input>
                  </el-form-item>
              </c-col>
                  <c-col :span="7">
                      <el-form-item label="by" prop="ltdgrp.rec.avbby">
                          <c-select
                                  v-model="model.ltdgrp.rec.avbby"
                                  style="width: 100%"
                                  placeholder="请选择Available by"
                          >
                          </c-select>
                      </el-form-item>
                  </c-col>
                  <c-col :span="7" :pull="2">
                      <el-form-item label="Shipment Date" prop="ltdgrp.rec.shpdat">
                          <c-date-picker
                                  type="date"
                                  v-model="model.ltdgrp.rec.shpdat"
                                  style="width: 100%"
                                  placeholder="请选择Shipment Date"
                          ></c-date-picker>
                      </el-form-item>
                  </c-col>

              <c-col :span="10">
                  <el-form-item label="" prop="btdgrp.be2.pts.nam">
                      <c-input  v-model="model.btdgrp.be2.pts.nam" maxlength="40"  placeholder="请输入Name of Party"></c-input>
                  </el-form-item>
              </c-col>
              </c-col>

          <c-col :span="7">
              <el-form-item label="Date Issued/Form" prop="ltdgrp.rec.opndat">
                  <c-date-picker
                          type="date"
                          v-model="model.ltdgrp.rec.opndat"
                          style="width: 100%"
                          placeholder="请选择Date Issued/Form"
                  ></c-date-picker>
              </el-form-item>
          </c-col>
                  <c-col :span="7" style="margin-left:-15px" :pull="4">
                      <el-form-item label="" prop="ltdgrp.rec.lcrtyp">
                          <c-input
                                  v-model="model.ltdgrp.rec.lcrtyp"
                                  style="width: 100%"
                                  placeholder="请选择Form of L/C"
                          >
                          </c-input>
                      </el-form-item>
                  </c-col>
          <c-col :span="8" :push="2" style="margin-left:15px">
              <el-form-item label="Presenter" prop="btdgrp.prb.pts.ref">
                  <c-input  v-model="model.btdgrp.prb.pts.ref" maxlength="16"  placeholder="请输入Presenting Bank"></c-input>
              </el-form-item>
          </c-col>

                  <c-col :span="7">
                      <el-form-item label="Date / Place of Expiry" prop="ltdgrp.rec.expdat">
                          <c-date-picker
                                  type="date"
                                  v-model="model.ltdgrp.rec.expdat"
                                  style="width: 100%"
                                  placeholder="请选择Date / Place of Expiry"
                          ></c-date-picker>
                      </el-form-item>
                  </c-col>

                  <c-col :span="7" style="margin-left:-15px" :pull="4">
                      <el-form-item label="" prop="ltdgrp.rec.expplc">
                          <c-input
                                  v-model="model.ltdgrp.rec.expplc"
                                  maxlength="29"
                                  style="width: 100%"
                                  placeholder="请输入Date / Place of Expiry"
                          ></c-input>
                      </el-form-item>
                  </c-col>
                      <c-col :span="10" style="margin-left:15px">
                          <el-form-item label="" prop="btdgrp.prb.pts.nam">
                              <c-input  v-model="model.btdgrp.prb.pts.nam" maxlength="40"  placeholder="请输入Name of Party"></c-input>
                          </el-form-item>
                      </c-col>
      </c-row>
          <el-divider class="el-divider--horizontal" ></el-divider>
      <c-row>
          <c-col :span="24">
              <c-col :span="11">
                  <el-form-item label="Document Reference" prop="btdgrp.rec.ownref">
                      <c-input
                              v-model="model.btdgrp.rec.ownref"
                              maxlength="16"
                              placeholder="请输入L/C Reference"
                      ></c-input>
                  </el-form-item>
              </c-col>
              <c-col :span="11" :offset="2">
                  <el-form-item label="Name" prop="btdgrp.rec.nam">
                      <c-input
                              v-model="model.btdgrp.rec.nam"

                              maxlength="40"
                              placeholder="请输入Name"
                      ></c-input>
                  </el-form-item>
              </c-col>
          </c-col>
      </c-row>
      <el-divider class="el-divider--horizontal" ></el-divider>
          <c-col :span="24">
              <c-col :span="11">
                  <c-col :span="24">
                      <el-form-item label="Type of Advice" prop="btdgrp.rec.advtyp">
                          <c-select v-model="model.btdgrp.rec.advtyp" style="width:100%" placeholder="请选择Type of Advice">
                              <el-option v-for="item in codes.advtyp1"
                                         :key="item.value"
                                         :label="item.label"
                                         :value="item.value">
                              </el-option>
                          </c-select>
                      </el-form-item>
                  </c-col>
                  <c-col :span="12">
                      <el-form-item label="Payment advised on" prop="btdgrp.rec.advdat">
                          <c-date-picker type="date"  v-model="model.btdgrp.rec.advdat" style="width:100%"  placeholder="请选择Payment advised on"></c-date-picker>
                      </el-form-item>
                  </c-col>

                  <c-col :span="12">
                      <el-form-item label="Discrep. advised on" prop="btdgrp.rec.disdat">
                          <c-date-picker type="date"  v-model="model.btdgrp.rec.disdat" style="width:100%"  placeholder="请选择Discrep. advised on"></c-date-picker>
                      </el-form-item>
                  </c-col>
                  <c-col :span="20" :offset="4">
                      <c-checkbox v-model="model.btdgrp.rec.dscinsflg">Enter Docs, Discrep. and Instructions</c-checkbox>
                  </c-col>
                  <c-col :span="20" :offset="4">
                      <c-checkbox v-model="model.bttp.setnowflg">setttle now</c-checkbox>
                  </c-col>

                  </c-col>
              <c-col :span="11" offset="1">
                  <c-col :span="24">


                  <c-ptap5
                          :model="model"
                          :argadr="{
                            fieldtit: 'Pres. by(2nd Ben)',
                            title: '',
                            grp: 'btdgrp',
                            rol: 'prb',
                            field: 'docprbrol',
                            }"
                            :noRef="true"
                            :disabled="false"
                            @onSeainf="onSeainf"
                            @onAplpDet="onBenpDet"
                  >
                  </c-ptap5>
                  </c-col>
                  <c-col :span="24">
                      <c-ptap5
                              :model="model"
                              :argadr="{
                                fieldtit: 'Pres. by(1nd Ben)',
                                title: '',
                                grp: 'btdgrp',
                                rol: 'prp',
                                field: 'docprbrolbe1',
                                }"
                              :noRef="true"
                              :disabled="false"
                              @onSeainf="onSeainf"
                              @onAplpDet="onBenpDet"
                      >

                  </c-ptap5>
                  </c-col>
              </c-col>
          </c-col>

  </div>

</template>
<script>
import Api from "~/service/Api"
import CommonProcess from "~/mixin/CommonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Lttdav/Event"
import Ptap from "~/views/Public/Ptap";
import Ptap5 from "~/views/Public/PtapWithRole";

export default {

    components: { "c-ptap5": Ptap5 },
    inject: ['root'],
    props:["model","codes"],
    mixins: [CommonProcess],
    data(){
        return {

        }
    },
    methods:{...Event},
    created:function(){

    }
}
</script>
<style>
    .el-divider--horizontal{

        margin-top: 8px;
        margin-bottom: 8px;
    }
</style>
