<template>
    <div class="eibs-tab">
        <el-row>
            <c-col :span="12">
                <el-form-item label="Transfer Reference" prop="ltdgrp.rec.ownref">
                    <c-input  v-model="model.ltdgrp.rec.ownref" maxlength="16" style="width: 50%"  placeholder="请输入Transfer Reference"></c-input>
                    <c-button size="small" type="primary;width:10%" @click="onSeainf">i</c-button>
                </el-form-item>
            </c-col>

            <c-col :span="12">
                <el-form-item label="L/C Reference" prop="ledgrp.rec.ownref">
                    <c-input  v-model="model.ledgrp.rec.ownref" maxlength="16" style="width: 50%"  placeholder="请输入L/C Reference"></c-input>
                    <c-button size="small" type="primary;width:10%" @click="onSeainf">i</c-button>
                </el-form-item>
            </c-col>
        </el-row>
        <el-divider class="el-divider--horizontal" ></el-divider>
        <el-row>
            <c-col :span="12">
                <el-form-item label="Doc. Set Reference" prop="btdgrp.rec.ownref">
                    <c-input  v-model="model.btdgrp.rec.ownref" maxlength="16" style="width: 50%"  placeholder="请输入Doc. Set Reference"></c-input>
                    <c-button size="small" type="primary;width:10%" @click="onSeainf">i</c-button>
                </el-form-item>
            </c-col>

            <c-col :span="12">
                <el-form-item label="" prop="btdgrp.rec.nam">
                    <c-input  v-model="model.btdgrp.rec.nam" maxlength="40"  placeholder="请输入Name of Bill Contract"></c-input>
                </el-form-item>
            </c-col>
        </el-row>
        <el-divider class="el-divider--horizontal" ></el-divider>
        <el-row>
            <c-col :span="5">
                <el-form-item label="Document Amount" prop="btdgrp.cbs.max.cur">
                    <c-select disabled v-model="model.btdgrp.cbs.max.cur"
                              style="width: 100%"
                              placeholder="请选择Currency"><!--@keyup.enter.native="nom1CurEvent"-->
                        <el-option v-for="item in codes.cur"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value">
                        </el-option>
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="5">
                <el-form-item
                        style="text-align: left"
                        label-width="20px"
                        prop="btdgrp.cbs.max.amt"
                >
                    <c-input-currency
                            v-model="model.btdgrp.cbs.max.amt"
                            style="text-align: left; width: 100%"
                            placeholder="Document Amount"
                    ></c-input-currency>
                </el-form-item>
            </c-col>
            <c-col :span="1">
                <c-checkbox v-model="model.bttp.aammod.addamtflg">Add. Amount</c-checkbox>
            </c-col>
            <c-col :span="10" offset="1">
                <el-form-item label="1st Beneficiary Ref." 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>
        </el-row>

        <el-row>
            <c-col :span="5">
                <el-form-item label="Open Amount" prop="btdgrp.cbs.opn1.cur">
                    <c-select disabled v-model="model.btdgrp.cbs.opn1.cur"
                              style="width: 100%"
                              placeholder="请选择Currency"><!--@keyup.enter.native="nom1CurEvent"-->
                        <el-option v-for="item in codes.cur"
                                   :key="item.value"
                                   :label="item.label"
                                   :value="item.value">
                        </el-option>
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="5">
                <el-form-item
                        style="text-align: left"
                        label-width="20px"
                        prop="btdgrp.cbs.opn1.amt"
                >
                    <c-input-currency
                            v-model="model.btdgrp.cbs.opn1.am"
                            style="text-align: left; width: 100%"
                            placeholder="Balance Amount"
                    ></c-input-currency>
                </el-form-item>
            </c-col>
            <c-col :span="12" offset="2">
                <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>
        </el-row>

        <el-row>
            <c-col :span="10">
                <el-form-item label="Document Type" prop="btdgrp.rec.doctypcod">
                    <c-input  v-model="model.btdgrp.rec.doctypcod" maxlength="1"  placeholder="请输入Document Type"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="10" offset="2">
                <el-form-item label="2nd Beneficiary Ref." 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>
        </el-row>

        <el-row>
            <c-col :span="8">
                <el-form-item label="Maturity Date" prop="btdgrp.rec.matdat">
                    <c-date-picker type="date"  v-model="model.btdgrp.rec.matdat" style="width:100%"  placeholder="请选择Maturity Date"></c-date-picker>
                </el-form-item>
            </c-col>
            <c-col :span="12" offset="4">
                <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>
        </el-row>

        <el-row>
            <c-col :span="8">
                <el-form-item label="Presentation Date" prop="btdgrp.rec.predat">
                    <c-date-picker type="date"  v-model="model.btdgrp.rec.predat" style="width:100%"  placeholder="请选择Presentation Date"></c-date-picker>
                </el-form-item>
            </c-col>

            <c-col :span="10" offset="4">
                <el-form-item label="Presenting Bank Ref." 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>

        </el-row>

        <el-row>
            <c-col :span="12">
                <el-form-item label="Document Set Status" prop="btdgrp.rec.docsta">
                    <c-input  v-model="model.btdgrp.rec.docsta" maxlength="40"  placeholder="请输入Document Set Status"></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="12">
                <el-form-item label="" prop="btdgrp.prb.pts.nam">
                    <c-input  v-model="model.btdgrp.prb.pts.nam" maxlength="40"  placeholder="Name of Presenting Bank"></c-input>
                </el-form-item>
            </c-col>
        </el-row>
        <el-divider class="el-divider--horizontal" ></el-divider>
        <el-row>
            <c-col :span="9">
                <el-form-item label="Document Set Number" prop="btdgrp.rec.ownref">
                    <c-input  v-model="model.btdgrp.rec.ownref" maxlength="16"  placeholder="请输入Document Set Number"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="12" offset="3">
                <el-form-item label="" prop="btdgrp.rec.nam">
                    <c-input  v-model="model.btdgrp.rec.nam" maxlength="40"  placeholder="请输入Name of Bill Contract"></c-input>
                </el-form-item>
            </c-col>
        </el-row>
        <el-divider class="el-divider--horizontal" ></el-divider>

        <!-- ====================左边======================= -->
        <c-col :span="11">
            <c-col :span="11">
                <el-form-item label="1st Ben Document Amount" prop="btdgrp.cbs.max.cur">
                    <c-select disabled v-model="model.btdgrp.cbs.max.cur"
                                  style="width: 100%"
                                  placeholder="请选择Currency"><!--@keyup.enter.native="nom1CurEvent"-->
                        <el-option v-for="item in codes.cur"
                                       :key="item.value"
                                       :label="item.label"
                                       :value="item.value">
                        </el-option>
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="10">
                <el-form-item
                        style="text-align: left"
                        label-width="20px"
                        prop="btdgrp.cbs.max.amt">
                    <c-input-currency
                            v-model="model.btdgrp.cbs.max.amt"
                            style="text-align: left; width: 100%"
                            placeholder="Document Amount"
                    ></c-input-currency>
                </el-form-item>
            </c-col>

            <c-col :span="11">
                <el-form-item label="Additional Amount" prop="btdgrp.cbs.max2.cur">
                    <c-select disabled v-model="model.btdgrp.cbs.max2.cur"
                              style="width: 100%"
                              placeholder="请选择Currency"><!--@keyup.enter.native="nom1CurEvent"-->
                        <el-option v-for="item in codes.cur"
                                   :key="item.value"
                                   :label="item.label"
                                   :value="item.value">
                        </el-option>
                    </c-select>
                </el-form-item>
            </c-col>

            <c-col :span="10">
                <el-form-item
                        style="text-align: left"
                        label-width="20px"
                        prop="btdgrp.cbs.max2.amt">
                    <c-input-currency
                            v-model="model.btdgrp.cbs.max2.amt"
                            style="text-align: left; width: 100%"
                            placeholder="Additional Amount"
                    ></c-input-currency>
                </el-form-item>
            </c-col>

            <c-col :span="11">
                <el-form-item label="2nd Ben Document Amount" prop="btdgrp.cbs.opnbe1amt.cur">
                    <c-select disabled v-model="model.btdgrp.cbs.opnbe1amt.cur"
                              style="width: 100%"
                              placeholder="请选择Currency"><!--@keyup.enter.native="nom1CurEvent"-->
                        <el-option v-for="item in codes.cur"
                                   :key="item.value"
                                   :label="item.label"
                                   :value="item.value">
                        </el-option>
                    </c-select>
                </el-form-item>
            </c-col>

            <c-col :span="10">
                <el-form-item
                        style="text-align: left"
                        label-width="20px"
                        prop="btdgrp.be2amt">
                    <c-input-currency
                            v-model="model.btdgrp.be2amt"
                            style="text-align: left; width: 100%"
                            placeholder="Additional Amount"
                    ></c-input-currency>
                </el-form-item>
            </c-col>

            <c-col :span="11">
                <el-form-item label="Additional Amount" prop="btdgrp.cbs.opnbe1amt2.cur">
                    <c-select disabled v-model="model.btdgrp.cbs.opnbe1amt2.cur"
                              style="width: 100%"
                              placeholder="请选择Currency"><!--@keyup.enter.native="nom1CurEvent"-->
                        <el-option v-for="item in codes.cur"
                                   :key="item.value"
                                   :label="item.label"
                                   :value="item.value">
                        </el-option>
                    </c-select>
                </el-form-item>
            </c-col>

            <c-col :span="10">
                <el-form-item
                        style="text-align: left"
                        label-width="20px"
                        prop="btdgrp.be2amt2">
                    <c-input-currency
                            v-model="model.btdgrp.be2amt2"
                            style="text-align: left; width: 100%"
                            placeholder="Additional Amount"
                    ></c-input-currency>
                </el-form-item>
            </c-col>

            <c-col :span="11">
                <el-form-item label="DIFF. 1st BEN Document" prop="btdgrp.cbs.opnbe1amt.cur">
                    <c-select disabled v-model="model.btdgrp.cbs.opnbe1amt.cur"
                              style="width: 100%"
                              placeholder="请选择Currency"><!--@keyup.enter.native="nom1CurEvent"-->
                        <el-option v-for="item in codes.cur"
                                   :key="item.value"
                                   :label="item.label"
                                   :value="item.value">
                        </el-option>
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="10">
                <el-form-item
                        style="text-align: left"
                        label-width="20px"
                        prop="btdgrp.cbs.opnbe1amt.amt">
                    <c-input-currency
                            v-model="model.btdgrp.cbs.opnbe1amt.amt"
                            style="text-align: left; width: 100%"
                            placeholder="Additional Amount"
                    ></c-input-currency>
                </el-form-item>
            </c-col>

            <c-col :span="11">
                <el-form-item label="Additional Amount" prop="btdgrp.cbs.opnbe1amt2.cur">
                    <c-select disabled v-model="model.btdgrp.cbs.opnbe1amt2.cur"
                              style="width: 100%"
                              placeholder="请选择Currency"><!--@keyup.enter.native="nom1CurEvent"-->
                        <el-option v-for="item in codes.cur"
                                   :key="item.value"
                                   :label="item.label"
                                   :value="item.value">
                        </el-option>
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="10">
                <el-form-item
                        style="text-align: left"
                        label-width="20px"
                        prop="btdgrp.cbs.opnbe1amt2.amt">
                    <c-input-currency
                            v-model="model.btdgrp.cbs.opnbe1amt2.amt"
                            style="text-align: left; width: 100%"
                            placeholder="Additional Amount"
                    ></c-input-currency>
                </el-form-item>
            </c-col>
        </c-col>>
        <!-- ========================右边======================= -->
        <c-col :span="11" :offset="1">
            <c-col :span="18">
                <el-form-item label="Date of Receipt (1st Ben.)" prop="btdgrp.rec.rcvdatbe1">
                    <c-date-picker type="date"  v-model="model.btdgrp.rec.rcvdatbe1" style="width:100%"  placeholder="请选择Date of Receipt (1st Ben.)"></c-date-picker>
                </el-form-item>
            </c-col>

            <c-col :span="18">
                <el-form-item label="Order Date (1st Ben.)" prop="btdgrp.rec.orddatbe1">
                    <c-date-picker type="date"  v-model="model.btdgrp.rec.orddatbe1" style="width:100%"  placeholder="请选择Order Date (1st Ben.)"></c-date-picker>
                </el-form-item>
            </c-col>

            <c-col :span="17" :offset="10">
                <c-checkbox v-model="model.btdgrp.rec.dscinsflg">Enter Docs, Discrep. and Instructions</c-checkbox>
            </c-col>
            <c-col :span="24">
                <c-ptap5
                        :model="model"
                        :argadr="{
                        fieldtit: 'Payee for',
                        title: '1st Ben-Side',
                        grp: 'btdgrp',
                        rol: 'prp',
                        field: 'docprbrolbe1',
                        }"
                        :disabled="true"
                        @onSeainf="onSeainf"
                        @onAplpDet="onBenpDet"
                >
                </c-ptap5>
            </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/Bttdck/Event"
    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: 3px;
        margin-bottom: 8px;
    }

    .rule-input >>> .el-form-item__label {
        font-size: 15px;
        text-align: left;
        color: #303133;
        padding: 0;
    }
    .el-form-item__label {
        white-space: pre-wrap;
        text-align: center;
        label-position: top;
    }

</style>