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

        <!-- =================顶部====================== -->
        <c-col :span="24">
            <c-col :span="8">
                <el-form-item label="Reference" prop="bcdgrp.rec.ownref">
                    <c-input v-model="model.bcdgrp.rec.ownref" maxlength="16" placeholder="请输入Reference"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="4">
                <el-form-item label="" label-width="15px">
                    <c-button size="small" type="primary;width:10%" @click="onSeainf">i</c-button>
                </el-form-item>
            </c-col>
            <c-col :span="11">
                <el-form-item label="Name" prop="bcdgrp.rec.nam">
                    <c-input v-model="model.bcdgrp.rec.nam" maxlength="40" placeholder="请输入Name"></c-input>
                </el-form-item>
            </c-col>
        </c-col>
        <!-- ====================左边======================= -->
        <c-col :span="11">
            <c-col :span="24">
                <c-col :span="16">
                    <el-form-item label="Responsible User" prop="bctp.usr.extkey">
                        <c-input v-model="model.bctp.usr.extkey" style="width: 100%" maxlength="8"
                            placeholder="请输入Responsible User"></c-input>
                    </el-form-item>
                </c-col>

                <c-col :span="4">
                    <el-form-item label="" label-width="15px">
                        <c-button size="small" style="text-align: left" type="primary;width:10%" @click="onSeainf">i
                        </c-button>
                    </el-form-item>
                </c-col>
            </c-col>
            <c-col :span="24">
                <c-col :span="12">
                    <el-form-item label="Document Amount" prop="bcdgrp.cbs.max.cur">
                        <c-select v-model="model.bcdgrp.cbs.max.cur" style="width:100%" placeholder="CUR">
                        </c-select>
                    </el-form-item>
                </c-col>

                <c-col :span="12">
                    <el-form-item label="" style="text-align: left" label-width="20px" prop="bcdgrp.cbs.max.amt">
                        <c-input v-model="model.bcdgrp.cbs.max.amt" placeholder="请输入Document Amount"></c-input>
                    </el-form-item>
                </c-col>
            </c-col>
            <c-col :span="24">
                <c-col :span="12">
                    <el-form-item label="Open Amount" prop="bcdgrp.cbs.opn1.cur">
                        <c-select v-model="model.bcdgrp.cbs.opn1.cur" style="width:100%" placeholder="CUR">
                        </c-select>
                    </el-form-item>
                </c-col>

                <c-col :span="12">
                    <el-form-item label="" style="text-align: left" label-width="20px" prop="bcdgrp.cbs.opn1.amt">
                        <c-input v-model="model.bcdgrp.cbs.opn1.amt" placeholder="请输入Open Amount"></c-input>
                    </el-form-item>
                </c-col>
            </c-col>
            <c-col :span="24">
                <el-form-item label="Docs received on" prop="bcdgrp.rec.rcvdat">
                    <c-date-picker type="date" v-model="model.bcdgrp.rec.rcvdat" style="width:50%"
                        placeholder="Docs received on"></c-date-picker>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="Date of Remittance Lt." prop="bcdgrp.rec.predat">
                    <c-date-picker type="date" v-model="model.bcdgrp.rec.predat" style="width:50%"
                        placeholder="Date of Remittance Lt."></c-date-picker>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="Advised on" prop="bcdgrp.rec.advdat">
                    <c-date-picker type="date" v-model="model.bcdgrp.rec.advdat" style="width:50%"
                        placeholder="Advised on"></c-date-picker>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="Collection Condition" prop="bcdgrp.rec.doctypcod">
                    <c-select v-model="model.bcdgrp.rec.doctypcod" style="width:100%"
                        placeholder="请选择Collection Condition">
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="Maturity Date" prop="bcdgrp.rec.matdat">
                    <c-date-picker type="date" v-model="model.bcdgrp.rec.matdat" style="width:50%"
                        placeholder="Maturity Date"></c-date-picker>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="发票类型" prop="bcdgrp.rec.invtyp">
                    <c-select v-model="model.bcdgrp.rec.invtyp" style="width:100%" placeholder="请选择发票类型">
                    </c-select>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <c-col :span="12">
                    <el-form-item label="Tenor Specification" prop="bcdgrp.rec.matpercnt">
                        <c-input v-model="model.bcdgrp.rec.matpercnt" placeholder="Tenor Specification"></c-input>
                    </el-form-item>
                </c-col>

                <c-col :span="12">
                    <el-form-item label="" style="text-align: left" label-width="20px" prop="bcdgrp.rec.matpertyp">
                        <c-select v-model="model.bcdgrp.rec.matpertyp" style="width:50%"
                            placeholder="Days/Months or Years for Maturity Period">
                        </c-select>
                    </el-form-item>
                </c-col>
            </c-col>
            <c-col :span="24">
                <el-form-item label="Tenor Starting from" prop="bcdgrp.rec.matperbeg">
                    <c-select v-model="model.bcdgrp.rec.matperbeg" style="width:100%"
                        placeholder="请选择Tenor Starting from">
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="Maturity Text" prop="bcdgrp.blk.bcgdet">
                    <c-input type="textarea" v-model="model.bcdgrp.blk.bcgdet" maxlength="45" show-word-limit
                        placeholder="请输入Maturity Text"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <c-col :span="11">
                    <c-checkbox v-model="model.bcdgrp.rec.resflg">Reserved Contract</c-checkbox>
                </c-col>
                <c-col :span="11">
                    <c-checkbox v-model="model.bcdgrp.rec.dftgarflg">Draft to be Guaranteed</c-checkbox>
                </c-col>
            </c-col>
            <c-col :span="24">
                <c-checkbox v-model="model.bcdgrp.rec.oridre">Send Original Documents to Drawee</c-checkbox>
            </c-col>
            <c-col :span="24">
                <c-checkbox v-model="model.bcdgrp.blk.bcgdetflg">BC Tenor Details modified</c-checkbox>
            </c-col>

            <c-edit-table :model="model"  v-bind="ptsaddg">
            </c-edit-table>

        </c-col>
        <!-- ====================右边======================= -->
        <c-col :span="11" :offset="1">
            <c-col :span="24">
                <el-form-item label="Drawee" prop="bcdgrp.dre.pts.ref">
                    <c-input v-model="model.bcdgrp.dre.pts.ref" maxlength="16" placeholder="请输入Drawee           参考号">
                    </c-input>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <c-col :span="16">
                    <el-form-item label="External Key of Address" prop="bcdgrp.dre.pts.extkey">
                        <c-input v-model="model.bcdgrp.dre.pts.extkey" maxlength="16"
                            placeholder="请输入External Key of Address">
                        </c-input>
                    </el-form-item>
                </c-col>
                <c-col :span="8">
                    <el-form-item label="" label-width="15px">
                        <c-button size="small" type="primary" @click="onSeainf" icon="el-icon-search">
                        </c-button>
                        <c-button size="small" type="primary" @click="onDrepDet">
                            详情
                        </c-button>
                    </el-form-item>
                </c-col>
            </c-col>

            <c-col :span="24">
                <el-form-item label="名称" prop="bcdgrp.dre.namelc">
                    <c-input type="textarea" v-model="model.bcdgrp.dre.namelc" maxlength="35" show-word-limit
                        placeholder="请输入名称"></c-input>
                </el-form-item>
            </c-col>

            <!--<c-col :span="24">
                <el-form-item label="Address Block" prop="bcdgrp.dre.pts.adrblk">
                    <c-input type="textarea" v-model="model.bcdgrp.dre.pts.adrblk" maxlength="35" show-word-limit
                        placeholder="请输入Address Block"></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="Chinese address" prop="bcdgrp.dre.dbfadrblkcn">
                    <c-input type="textarea" v-model="model.bcdgrp.dre.dbfadrblkcn" maxlength="35" show-word-limit
                        placeholder="请输入Chinese address"></c-input>
                </el-form-item>
            </c-col>-->

            <c-col :span="24">
                <el-form-item label="地址" prop="bcdgrp.dre.adrelc">
                    <c-input type="textarea" v-model="model.bcdgrp.dre.adrelc" maxlength="35" show-word-limit
                        placeholder="请输入地址"></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="Remitting Bank" prop="bcdgrp.rmi.pts.ref">
                    <c-input v-model="model.bcdgrp.rmi.pts.ref" maxlength="16" placeholder="请输入Remitting Bank">
                    </c-input>
                </el-form-item>
            </c-col>

            <c-col :span="16">
                <el-form-item label="External Key of Address" prop="bcdgrp.rmi.pts.extkey">
                    <c-input v-model="model.bcdgrp.rmi.pts.extkey" maxlength="16"
                        placeholder="请输入External Key of Address">
                    </c-input>
                </el-form-item>
            </c-col>

            <c-col :span="8">
                <el-form-item label="" label-width="15px">
                    <c-button size="small" type="primary" @click="onSeainf" icon="el-icon-search">
                    </c-button>
                    <c-button size="small" type="primary" @click="onRmipDet">
                        详情
                    </c-button>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="名称" prop="bcdgrp.rmi.namelc">
                    <c-input type="textarea" v-model="model.bcdgrp.rmi.namelc" maxlength="35" show-word-limit
                        placeholder="请输入名称"></c-input>
                </el-form-item>
            </c-col>

            <!--<c-col :span="24">
                <el-form-item label="Address Block" prop="bcdgrp.rmi.pts.adrblk">
                    <c-input type="textarea" v-model="model.bcdgrp.rmi.pts.adrblk" maxlength="35" show-word-limit
                        placeholder="请输入Address Block"></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="Chinese address" prop="bcdgrp.rmi.dbfadrblkcn">
                    <c-input type="textarea" v-model="model.bcdgrp.rmi.dbfadrblkcn" maxlength="35" show-word-limit
                        placeholder="请输入Chinese address"></c-input>
                </el-form-item>
            </c-col>-->


            <c-col :span="24">
                <el-form-item label="地址" prop="bcdgrp.rmi.adrelc">
                    <c-input type="textarea" v-model="model.bcdgrp.rmi.adrelc" maxlength="35" show-word-limit
                        placeholder="请输入地址"></c-input>
                </el-form-item>
            </c-col>


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


            <c-col :span="16">
                <el-form-item label="External Key of Address" prop="bcdgrp.drr.pts.extkey">
                    <c-input v-model="model.bcdgrp.drr.pts.extkey" maxlength="16"
                        placeholder="请输入External Key of Address">
                    </c-input>
                </el-form-item>
            </c-col>

            <c-col :span="8">
                <el-form-item label="" label-width="15px">
                    <c-button size="small" type="primary" @click="onSeainf" icon="el-icon-search">
                    </c-button>
                    <c-button size="small" type="primary" @click="onDrrpDet">
                        详情
                    </c-button>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="名称" prop="bcdgrp.drr.namelc">
                    <c-input type="textarea" v-model="model.bcdgrp.drr.namelc" maxlength="35" show-word-limit
                        placeholder="请输入名称"></c-input>
                </el-form-item>
            </c-col>

            <!--<c-col :span="24">
                <el-form-item label="Address Block" prop="bcdgrp.drr.pts.adrblk">
                    <c-input type="textarea" v-model="model.bcdgrp.drr.pts.adrblk" maxlength="35" show-word-limit
                        placeholder="请输入Address Block"></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="Chinese address" prop="bcdgrp.drr.dbfadrblkcn">
                    <c-input type="textarea" v-model="model.bcdgrp.drr.dbfadrblkcn" maxlength="35" show-word-limit
                        placeholder="请输入Chinese address"></c-input>
                </el-form-item>
            </c-col>-->

            <c-col :span="24">
                <el-form-item label="地址" prop="bcdgrp.drr.adrelc">
                    <c-input type="textarea" v-model="model.bcdgrp.drr.adrelc" maxlength="35" show-word-limit
                        placeholder="请输入地址"></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="Country or region Code" prop="bcdgrp.rec.stacty">
                    <c-select v-model="model.bcdgrp.rec.stacty" style="width:100%"
                        placeholder="请选择Country or region Code">
                    </c-select>
                </el-form-item>
            </c-col>

            <!--<c-col :span="24">
                <span v-text="model.bctp.sblx" data-path=".bctp.sblx"> </span>
            </c-col>-->

            <!--<c-col :span="24">
                <span v-text="model.bctp.acttyplab" data-path=".bctp.acttyplab"> </span>
            </c-col>-->

            <c-col :span="24">
                <el-form-item label="款项去向" prop="bctp.acttyp">
                    <c-select v-model="model.bctp.acttyp" style="width:100%" placeholder="款项去向">
                    </c-select>
                </el-form-item>
            </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/Bctame/Event"

    export default {
        inject: ['root'],
        props: ["model", "codes"],
        mixins: [CommonProcess],
        data() {
            return {
                ptsaddg: {
                    columns: [{
                            title: "1st",
                            width: "40px",
                            dataIndex: "cmail1",
                            show: "input",
                        },
                        {
                            title: "2nd",
                            width: "40px",
                            dataIndex: "cmail2",
                            show: "input",
                        },
                        {
                            title: "Documnet",
                            width: "120px",
                            dataIndex: "document",
                            show: "select",
                        },
                    ],
                    urls: "bctp.docgrdm.docgrd",
                },
            }
        },
        methods: {
            ...Event
        },
        created: function () {

        }
    }
</script>
<style>

</style>