<template>
  <div class="eibs-tab">
      <c-row>
          <c-col :span=24>
            <c-col :span=8>
                <el-form-item label="业务编号" prop="ledgrp.rec.ownref">
                    <c-input  
                        v-model="model.ledgrp.rec.ownref" 
                        maxlength="16"  
                        placeholder="请输入Reference"
                    ></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="3">
                <c-button size="small" type="primary;width:10%" @click="onSeainf">
                    i
                </c-button>
                <!-- <c-button size="small" type="primary"  @click="onRecpanButgetref">
                    Get Ref
                </c-button> -->
                <c-button
                size="small"
                type="primary"
                :disabled="
                    model.ledgrp.ben.pts.adrblk && !model.ledgrp.rec.ownref ? false : true
                "
                @click="onLetpButgetref"
                >
                获取
                </c-button>
            </c-col>
              <!-- <c-col :span="12">
                <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" :offset="1">
                <el-form-item label="概要" prop="ledgrp.rec.nam">
                    <c-input  
                        v-model="model.ledgrp.rec.nam" 
                        maxlength="40"  
                        placeholder="请输入概要"
                    ></c-input>
                </el-form-item>
            </c-col>
        </c-col>         

        <c-col :span="24">
            <c-col :span="11">
                <c-col :span="24">
                    <el-form-item label="转让标志" prop="ledgrp.rec.lcrtyp">
                        <c-select 
                            v-model="model.ledgrp.rec.lcrtyp" 
                            style="width:100%" 
                            placeholder="请选择转让标志">
                        </c-select>
                    </el-form-item>
                </c-col>
                <c-col :span="20">
                    <el-form-item label="经办柜员" prop="recpan.usr.extkey">
                        <c-input  
                            v-model="model.recpan.usr.extkey" 
                            maxlength="8"  
                            placeholder="请输入经办柜员"
                            :disabled="true"
                        ></c-input>
                    </el-form-item>
                </c-col>
                <!-- <c-col :span="4">
                    <c-checkbox v-model="model.ledgrp.rec.collflg">
                        Collateralized L/C
                    </c-checkbox>
                </c-col> -->
                <c-col :span="4" class="centerLable">
                    <c-checkbox :disabled="true" v-model="model.ledgrp.rec.collflg">
                        抵押信用证
                    </c-checkbox>
                </c-col>
                <c-col :span="12">
                    <el-form-item label="信用证金额" prop="ledgrp.cbs.nom1.cur">
                        <c-select 
                            v-model="model.ledgrp.cbs.nom1.cur" 
                            style="width:100%"
                            placeholder="请选择币种"
                        ></c-select>
                    </el-form-item>
                </c-col> 
                <c-col :span="8">
                    <el-form-item label="" label-width="10px" prop="ledgrp.cbs.nom1.amt">
                        <!-- <c-input   -->
                        <c-input-currency  
                            v-model="model.ledgrp.cbs.nom1.amt"  
                            style="text-align: left; width: 100%"
                            placeholder="请输入信用证金额"
                        ></c-input-currency>
                    </el-form-item>
                </c-col>
                <!-- <c-col :span="4">
                    <c-checkbox v-model="model.recpan.aamp.aammod.addamtflg">
                        Add. Amount</c-checkbox>
                </c-col> -->
                <c-col :span="3" :offset="1" class="centerLable">
                    <c-checkbox v-model="model.recpan.aamp.aammod.addamtflg">
                        附加金额
                    </c-checkbox>
                </c-col>
                <c-col :span="12">
                    <el-form-item label="金额浮动  +/-" prop="ledgrp.rec.nomtop">
                        <c-input  
                            v-model="model.ledgrp.rec.nomtop"  
                            placeholder="请输入Amount Tolerance +/-"
                        ></c-input>
                    </el-form-item>
                </c-col>
                <c-col :span="8">
                    <!-- label="Amount Tolerance - Negative" -->
                    <el-form-item label="" label-width="10px" prop="ledgrp.rec.nomton">
                        <c-input  
                            v-model="model.ledgrp.rec.nomton"  
                            placeholder="请输入Amount Tolerance - Negative"
                        ></c-input>
                    </el-form-item>
                </c-col>
                <c-col :span="4" class="centerLable">
                    <c-checkbox v-model="model.ledgrp.rec.inctrf">
                        <!-- Incoming Transfer -->
                        传入传输
                    </c-checkbox>
                </c-col>
            </c-col>
                <!-- <el-form-item label="Beneficiary  Ref." prop="ledgrp.ben.pts.ref">
                    <c-input  v-model="model.ledgrp.ben.pts.ref" maxlength="16"  placeholder="请输入Beneficiary       Ref."></c-input>
                </el-form-item> -->
            <c-col :span="11" :offset="1">
                <c-ptap
                    :model="model"
                    :argadr="{
                    title: '受益人',
                    grp: 'ledgrp',
                    rol: 'ben',
                    }"
                    :disabled="true"
                    @onSeainf="onSeainf"
                    @onAplpDet="onBenpDet"
                >
                </c-ptap>
            </c-col>
        </c-col>

        <c-col :span="24">
            <c-col :span="11">
                <!-- <el-form-item label="Amount Specification" prop="ledgrp.rec.nomspc">
                    <c-select v-model="model.ledgrp.rec.nomspc" style="width:100%" placeholder="请选择Amount Specification">
                    </c-select>
                </el-form-item> -->
                <c-col :span="24">
                    <el-form-item label="适用金额规范" prop="ledgrp.rec.nomspc">
                        <c-select 
                            v-model="model.ledgrp.rec.nomspc" 
                            style="width:100%" 
                            placeholder="请选择适用金额规范"
                        >
                        </c-select>
                    </el-form-item> 
                </c-col>
                <c-col :span="12">
                    <el-form-item label="最大金额" prop="ledgrp.cbs.max.cur">
                        <c-select 
                            v-model="model.ledgrp.cbs.max.cur" 
                            style="width:100%" 
                            placeholder="请选择请选择币种">
                        </c-select>
                    </el-form-item>
                </c-col>
                <c-col :span="12">
                     <!-- label="Maximum Amount" -->
                    <el-form-item label="" label-width="20px" prop="ledgrp.cbs.max.amt">
                        <c-input  
                            v-model="model.ledgrp.cbs.max.amt"  
                            placeholder="请输入最大金额"
                        ></c-input>
                    </el-form-item>
                </c-col>
                <c-col :span="14">
                    <el-form-item label="开证日期" prop="ledgrp.rec.opndat">
                        <c-date-picker 
                            type="date"  
                            v-model="model.ledgrp.rec.opndat" 
                            style="width:100%"  
                            placeholder="请选择开证日期"
                        ></c-date-picker>
                    </el-form-item>
                </c-col>                   
                <c-col :span="10">
                    <el-form-item label="预通知日期" label-width="80px" prop="ledgrp.rec.preadvdt">
                        <c-date-picker 
                            type="date"  
                            v-model="model.ledgrp.rec.preadvdt" 
                            style="width:100%"  
                            placeholder="请选择日期"
                        ></c-date-picker>
                    </el-form-item>
                </c-col>
                <c-col :span="14">
                    <el-form-item label="装运日期" prop="ledgrp.rec.shpdat">
                        <c-date-picker 
                            type="date"  
                            v-model="model.ledgrp.rec.shpdat" 
                            style="width:100%"  
                            placeholder="请选择装运日期"
                        ></c-date-picker>
                    </el-form-item>
                </c-col>               
                <c-col :span="10">
                    <el-form-item label="通知日期" label-width="80px" prop="ledgrp.rec.advdat">
                        <c-date-picker 
                            type="date"  
                            v-model="model.ledgrp.rec.advdat" 
                            style="width:100%"  
                            placeholder="请选择通知日期"
                        ></c-date-picker>
                    </el-form-item>
                </c-col>
            </c-col>

            <c-col :span="11" :offset="1">
                <!-- <el-form-item label="Issuer   Ref." prop="ledgrp.iss.pts.ref">
                    <c-input  v-model="model.ledgrp.iss.pts.ref" maxlength="16"  placeholder="请输入Issuer                Ref."></c-input>
                </el-form-item> -->
                <c-ptap
                    :model="model"
                    :argadr="{
                    title: '开证行',
                    grp: 'ledgrp',
                    rol: 'iss',
                    }"
                    :disabled="true"
                    @onSeainf="onSeainf"
                    @onAplpDet="onIsspDet"
                >
                </c-ptap>
            </c-col>
        </c-col>

        <c-col :span="24">
            <c-col :span="11">
                <c-col :span="14">
                    <el-form-item label="到期日" prop="ledgrp.rec.expdat">
                        <c-date-picker 
                            type="date"  
                            v-model="model.ledgrp.rec.expdat" 
                            style="width:100%"  
                            placeholder="请选择到期日"
                        ></c-date-picker>
                    </el-form-item>
                </c-col>
                <c-col :span="10"> </c-col>
                <c-col :span="24">
                    <el-form-item label="有效地点" prop="ledgrp.rec.expplc">
                        <c-input  
                            v-model="model.ledgrp.rec.expplc" 
                            maxlength="29"  
                            placeholder="请输入有效地点"
                        ></c-input>
                    </el-form-item>
                </c-col> 
                <c-col :span="24">
                    <el-form-item label="确认接收指示" prop="ledgrp.rec.cnfdet">
                        <c-select 
                            v-model="model.ledgrp.rec.cnfdet" 
                            style="width:100%" 
                            placeholder="请选择确认接收指示"
                        ></c-select>
                    </el-form-item>
                </c-col>
                <c-col :span="24">
                    <el-form-item label="适用规则" prop="ledgrp.rec.apprul">
                        <c-select 
                            v-model="model.ledgrp.rec.apprul" 
                            style="width:100%" 
                            placeholder="请选择适用规则"
                        ></c-select>
                    </el-form-item>
                </c-col>
            </c-col>
            
            <c-col :span="11" :offset="1">
                <!-- <el-form-item label="Applicant  Ref." prop="ledgrp.apl.pts.ref">
                    <c-input  v-model="model.ledgrp.apl.pts.ref" maxlength="16"  placeholder="请输入Applicant          Ref."></c-input>
                </el-form-item> -->
                <c-ptap
                    :model="model"
                    :argadr="{
                    title: '申请人',
                    grp: 'ledgrp',
                    rol: 'apl',
                    }"
                    :disabled="true"
                    @onSeainf="onSeainf"
                    @onAplpDet="onAplpDet"
                >
                </c-ptap>
            </c-col>
        </c-col>

        <c-col :span="24">
            <c-col :span="11">
                <c-col :span="24">
                    <el-form-item label="其他规则" prop="ledgrp.rec.apprultxt">
                        <c-input  
                            v-model="model.ledgrp.rec.apprultxt" 
                            maxlength="35"  
                            placeholder="请输入其他规则"
                        ></c-input>
                    </el-form-item>
                </c-col>
                <c-col :span="24">
                    <el-form-item label="分批装运" prop="ledgrp.rec.shppars18">
                        <c-select 
                            v-model="model.ledgrp.rec.shppars18" 
                            style="width:100%" 
                            placeholder="请选择分批装运">
                        </c-select>
                    </el-form-item>
                    <!-- <el-form-item label="Partial Shipment" prop="ledgrp.rec.shppar">
                        <c-select v-model="model.ledgrp.rec.shppar" style="width:100%" placeholder="请选择Partial Shipment">
                        </c-select>
                    </el-form-item> -->
                </c-col>
                <c-col :span="24">
                    <el-form-item label="转运" prop="ledgrp.rec.shptrss18">
                        <c-select 
                            v-model="model.ledgrp.rec.shptrss18" 
                            style="width:100%" 
                            placeholder="请选择转运"
                        ></c-select>
                    </el-form-item>
                </c-col>
            </c-col>

            <c-col :span="11" :offset="1">
                <c-col :span="24" class="centerLable marginLable">
	                <c-checkbox v-model="model.ledgrp.rec.revflg"
                    >Revolving Flag</c-checkbox>
                </c-col>
                <c-col :span="24" class="centerLable marginLable">
                    <!-- Authorization to Debit -->
                    <c-checkbox v-model="model.ledgrp.rec.dbtflg">借记授权书</c-checkbox>
                </c-col>
                <!-- Non-Bank Issuer -->
                <c-col :span="24" class="centerLable marginLable">
	                <c-checkbox v-model="model.ledgrp.rec.nonban"> 非银行发行人</c-checkbox>
                </c-col>
                <!-- Test Key Unconfirmity -->
                <c-col :span="24" class="centerLable marginLable">
	                <c-checkbox v-model="model.ledgrp.rec.teskeyunc">测试密钥</c-checkbox>
                </c-col>
            </c-col>
        </c-col>
    </c-row>                        
       <!-- <c-col :span="12">
        <el-form-item label="Drag  Drop Sender" prop="recpan.recget.sdamod.dadsnd">
            <c-input  v-model="model.recpan.recget.sdamod.dadsnd"  placeholder="请输入Drag  Drop Sender"></c-input>
        </el-form-item>
       </c-col>
                    
       <c-col :span="12">
        <el-form-item label="" prop="recpan.recget.sdamod.seainf">
            <c-input  v-model="model.recpan.recget.sdamod.seainf"  placeholder="请输入"></c-input>
        </el-form-item>
       </c-col>   
                  
       <c-col :span="12">
        <el-form-item label="Drag  Drop Sender" prop="recpan.benp.ptsget.sdamod.dadsnd">
            <c-input  v-model="model.recpan.benp.ptsget.sdamod.dadsnd"  placeholder="请输入Drag  Drop Sender"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="" prop="recpan.usrget.sdamod.seainf">
            <c-input  v-model="model.recpan.usrget.sdamod.seainf"  placeholder="请输入"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="External Key of Address" prop="ledgrp.ben.pts.extkey">
            <c-input  v-model="model.ledgrp.ben.pts.extkey" maxlength="16"  placeholder="请输入External Key of Address"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="" prop="recpan.benp.ptsget.sdamod.seainf">
            <c-input  v-model="model.recpan.benp.ptsget.sdamod.seainf"  placeholder="请输入"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onBenpDet">
            Details
        </c-button>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="名称" prop="ledgrp.ben.namelc">
            <c-input type="textarea" v-model="model.ledgrp.ben.namelc" maxlength="35" show-word-limit placeholder="请输入名称" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Address Block" prop="ledgrp.ben.pts.adrblk">
            <c-input type="textarea" v-model="model.ledgrp.ben.pts.adrblk" maxlength="35" show-word-limit placeholder="请输入Address Block" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Chinese address" prop="ledgrp.ben.dbfadrblkcn">
            <c-input type="textarea" v-model="model.ledgrp.ben.dbfadrblkcn" maxlength="35" show-word-limit placeholder="请输入Chinese address" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
	    <c-checkbox v-model="model.ledgrp.preadvflg">PreAdvice or Notification</c-checkbox>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="地址" prop="ledgrp.ben.adrelc">
            <c-input type="textarea" v-model="model.ledgrp.ben.adrelc" maxlength="35" show-word-limit placeholder="请输入地址" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
	    <c-checkbox v-model="model.ledgrp.rec.resflg">Reserved Contract</c-checkbox>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Drag  Drop Sender" prop="recpan.issp.ptsget.sdamod.dadsnd">
            <c-input  v-model="model.recpan.issp.ptsget.sdamod.dadsnd"  placeholder="请输入Drag  Drop Sender"></c-input>
        </el-form-item>
       </c-col>
                    
       <c-col :span="12">
        <el-form-item label="External Key of Address" prop="ledgrp.iss.pts.extkey">
            <c-input  v-model="model.ledgrp.iss.pts.extkey" maxlength="16"  placeholder="请输入External Key of Address"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="" prop="recpan.issp.ptsget.sdamod.seainf">
            <c-input  v-model="model.recpan.issp.ptsget.sdamod.seainf"  placeholder="请输入"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onIsspDet">
            Details
        </c-button>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="名称" prop="ledgrp.iss.namelc">
            <c-input type="textarea" v-model="model.ledgrp.iss.namelc" maxlength="35" show-word-limit placeholder="请输入名称" ></c-input>
        </el-form-item>
        </c-col>
                  
                  
       <c-col :span="12">
        <el-form-item label="Address Block" prop="ledgrp.iss.pts.adrblk">
            <c-input type="textarea" v-model="model.ledgrp.iss.pts.adrblk" maxlength="35" show-word-limit placeholder="请输入Address Block" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Chinese address" prop="ledgrp.iss.dbfadrblkcn">
            <c-input type="textarea" v-model="model.ledgrp.iss.dbfadrblkcn" maxlength="35" show-word-limit placeholder="请输入Chinese address" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
        <el-form-item label="地址" prop="ledgrp.iss.adrelc">
            <c-input type="textarea" v-model="model.ledgrp.iss.adrelc" maxlength="35" show-word-limit placeholder="请输入地址" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Drag  Drop Sender" prop="recpan.aplp.ptsget.sdamod.dadsnd">
            <c-input  v-model="model.recpan.aplp.ptsget.sdamod.dadsnd"  placeholder="请输入Drag  Drop Sender"></c-input>
        </el-form-item>
       </c-col>
                  
                  
       <c-col :span="12">
        <el-form-item label="External Key of Address" prop="ledgrp.apl.pts.extkey">
            <c-input  v-model="model.ledgrp.apl.pts.extkey" maxlength="16"  placeholder="请输入External Key of Address"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="" prop="recpan.aplp.ptsget.sdamod.seainf">
            <c-input  v-model="model.recpan.aplp.ptsget.sdamod.seainf"  placeholder="请输入"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <c-button size="small" type="primary"  @click="onAplpDet">
            Details
        </c-button>
       </c-col>
                                   
       <c-col :span="12">
        <el-form-item label="名称" prop="ledgrp.apl.namelc">
            <c-input type="textarea" v-model="model.ledgrp.apl.namelc" maxlength="35" show-word-limit placeholder="请输入名称" ></c-input>
        </el-form-item>
        </c-col>
                  
	<c-col :span="12">
	    <span  v-text="model.recpan.oppbnkl"   data-path=".recpan.oppbnkl" > </span>
	</c-col>
                  
       <c-col :span="12">
        <el-form-item label="境内外对手行代码" prop="ledgrp.rec.oppbnk">
            <c-input  v-model="model.ledgrp.rec.oppbnk" maxlength="12"  placeholder="请输入境内外对手行代码"></c-input>
        </el-form-item>
       </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Address Block" prop="ledgrp.apl.pts.adrblk">
            <c-input type="textarea" v-model="model.ledgrp.apl.pts.adrblk" maxlength="35" show-word-limit placeholder="请输入Address Block" ></c-input>
        </el-form-item>
        </c-col>
                  
       <c-col :span="12">
        <el-form-item label="Chinese address" prop="ledgrp.apl.dbfadrblkcn">
            <c-input type="textarea" v-model="model.ledgrp.apl.dbfadrblkcn" maxlength="35" show-word-limit placeholder="请输入Chinese address" ></c-input>
        </el-form-item>
        </c-col>
       <c-col :span="12">
        <el-form-item label="地址" prop="ledgrp.apl.adrelc">
            <c-input type="textarea" v-model="model.ledgrp.apl.adrelc" maxlength="35" show-word-limit placeholder="请输入地址" ></c-input>
        </el-form-item>
        </c-col>
                             
       <c-col :span="12">
        <el-form-item label="Transshipment" prop="ledgrp.rec.shptrs">
            <c-select v-model="model.ledgrp.rec.shptrs" style="width:100%" placeholder="请选择Transshipment">
              </c-select>
        </el-form-item>
       </c-col> -->
  </div>
</template>
<script>
import Api from "~/service/Api"
import CommonProcess from "~/mixin/CommonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Infled/Event"
import Ptap from "~/views/Public/Ptap";

export default {
    components: { "c-ptap": Ptap },
    inject: ['root'],
    props:["model","codes"],
    mixins: [CommonProcess],
    data(){
        return {

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

    }
};
</script>
<style>
    .centerLable {
        margin-left: -10px;
        height: 32px;
        line-height: 32px;
    }
    .marginLable {
        padding-left: 150px;
    }
</style>