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

    <!-- =================顶部====================== -->
    <c-row>
        <!--line1-->
        <c-col :span="24">
            <c-col :span="11">
                <el-form-item label="Parent Contract" prop="bpdgrp.rec.pntref" style="width: 100%">
                    <c-fullbox>
                        <c-input v-model="model.bpdgrp.rec.pntref" maxlength="16" placeholder="请输入Reference" disabled></c-input>
                        <template slot="footer">
                            <c-button style="margin: 0 10px 0 10px; padding: 0 12px" size="small" type="primary" @click="onSeainf">
                                <span style="font-family: '宋体'; font-weight: bold">i</span>
                            </c-button>
                        </template>
                    </c-fullbox>
                </el-form-item>
            </c-col>

            <c-col :span="1">
                <el-form-item label="" prop="" style="width: 100%">

                </el-form-item>
            </c-col>

            <c-col :span="12">
                <el-form-item label="Name" prop="bpdgrp.rec.pntnam" style="width: 100%">
                    <c-fullbox>
                        <c-input v-model="model.bpdgrp.rec.pntnam" maxlength="16" placeholder="" disabled></c-input>
                        <template slot="footer"> </template>
                    </c-fullbox>
                </el-form-item>
            </c-col>
        </c-col>

        <!--line2-->
        <c-col :span="24">
            <c-col :span="11">
                <el-form-item label="Finance Reference" prop="bpdgrp.rec.ownref" style="width: 100%">
                    <c-fullbox>
                        <c-input v-model="model.bpdgrp.rec.ownref" maxlength="16" placeholder="请输入Reference" disabled></c-input>
                        <template slot="footer">
                            <c-button style="margin: 0 10px 0 10px; padding: 0 12px" size="small" type="primary" @click="onSeainf">
                                <span style="font-family: '宋体'; font-weight: bold">i</span>
                            </c-button>
                        </template>
                    </c-fullbox>
                </el-form-item>

            </c-col>

            <c-col :span="1">
                <el-form-item label="" prop="" style="width: 100%">

                </el-form-item>
            </c-col>

            <c-col :span="12">
                <el-form-item label="Name" prop="bpdgrp.rec.nam" style="width: 100%">
                    <c-fullbox>
                        <c-input v-model="model.bpdgrp.rec.nam" maxlength="16" placeholder="" disabled></c-input>
                        <template slot="footer"> </template>
                    </c-fullbox>
                </el-form-item>
            </c-col>
        </c-col>

        <!--line3-->
        <c-col :span="24">
            <c-col :span="11">
                <el-form-item label="Purchase Agreement" prop="bptp.fpdgrp.rec.ownref" style="width: 100%">
                    <c-fullbox>
                        <c-input v-model="model.bptp.fpdgrp.rec.ownref" maxlength="16" placeholder="请输入Reference" disabled></c-input>
                        <template slot="footer">
                            <c-button style="margin: 0 10px 0 10px; padding: 0 12px" size="small" type="primary" @click="onSeainf">
                                <span style="font-family: '宋体'; font-weight: bold">i</span>
                            </c-button>
                        </template>
                    </c-fullbox>
                </el-form-item>
            </c-col>

            <c-col :span="1">
                <el-form-item label="" prop="" style="width: 100%">

                </el-form-item>
            </c-col>

            <c-col :span="12">
                <el-form-item label="Name" prop="bptp.fpdgrp.rec.nam" style="width: 100%">
                    <c-fullbox>
                        <c-input v-model="model.bptp.fpdgrp.rec.nam" maxlength="16" placeholder="" disabled></c-input>
                        <template slot="footer"> </template>
                    </c-fullbox>
                </el-form-item>
            </c-col>
        </c-col>
    </c-row>

    <!-- =================中部====================== -->
    <c-row>
        <!------------左部------------->
        <c-col :span="12">

            <!------line1------->
            <c-row>

                <c-col :span="12">
                    <el-form-item label="Responsible User" prop="bptp.usr.extkey" style="width: 100%">
                        <c-fullbox>
                            <c-input v-model="model.bptp.usr.extkey" maxlength="8" placeholder="" disabled></c-input>
                            <template slot="footer">
                                <c-button style="margin: 0 10px 0 10px; padding: 0 12px" size="small" type="primary" @click="onSeainf">
                                    <span style="font-family: '宋体'; font-weight: bold">i</span>
                                </c-button>
                            </template>
                        </c-fullbox>
                    </el-form-item>
                </c-col>

                <c-col :span="12">
                    <el-form-item label="Mortgage Flag" prop="bpdgrp.rec.guaflg" style="width: 100%">
                        <c-fullbox>
                            <c-select v-model="model.bpdgrp.rec.guaflg" style="width: 100%" maxlength="16" placeholder="">
                                <el-option v-for="item in codes.guaflg" :key="item.value" :label="item.label" :value="item.value">
                                </el-option>
                            </c-select>

                            <template slot="footer"> </template>
                        </c-fullbox>
                    </el-form-item>
                </c-col>
            </c-row>

            <!------line2------->
            <c-row>
                <c-col :span="12">
                    <el-form-item label="Finance Type" prop="bpdgrp.rec.fintyp" style="width: 100%">
                        <c-fullbox>
                            <c-select v-model="model.bpdgrp.rec.fintyp" style="width: 100%" maxlength="16" placeholder="">
                                <el-option v-for="item in codes.fintyp_bpd" :key="item.value" :label="item.label" :value="item.value">
                                </el-option>
                            </c-select>

                            <template slot="footer"> </template>
                        </c-fullbox>
                    </el-form-item>
                </c-col>

                <c-col :span="12">
                    <el-form-item label="Discount Type" prop="bptp.distyp" style="width: 100%" v-if="
                model.bpdgrp.rec.fintyp == 'D' || model.bpdgrp.rec.fintyp == 'T'
              ">
                        <c-fullbox>
                            <c-select v-model="model.bptp.distyp" style="width: 100%" maxlength="16" placeholder="">
                                <el-option v-for="item in codes.distyp" :key="item.value" :label="item.label" :value="item.value">
                                </el-option>
                            </c-select>

                            <template slot="footer"> </template>
                        </c-fullbox>
                    </el-form-item>
                </c-col>

                <c-col :span="12">
                    <el-form-item label="Purchase Type" prop="bptp.purtyp" v-if="
                model.bpdgrp.rec.fintyp == 'P' || model.bpdgrp.rec.fintyp == 'M'
              ">
                        <c-select v-model="model.bptp.purtyp" style="width: 100%" placeholder=" ">
                            <el-option v-for="item in codes.purtyp" :key="item.value" :label="item.label" :value="item.value">
                            </el-option>
                        </c-select>
                    </el-form-item>
                </c-col>
            </c-row>

            <!------line3------->
            <c-row>
                <c-col :span="12" >
                    <el-form-item label="Currency" prop="bpdgrp.cbs.max.cur">
                        <c-input v-model="model.bpdgrp.cbs.max.cur" maxlength="3" placeholder="请输入Currency"></c-input>
                    </el-form-item>
                </c-col>

                <c-col :span="12">
                    <el-form-item label="融资金额" prop="bpdgrp.cbs.max.amt">
                        <c-input v-model="model.bpdgrp.cbs.max.amt" placeholder="请输入融资金额"></c-input>
                    </el-form-item>
                </c-col>

            </c-row>

            <!------line4------->
            <c-row>
                <c-col :span="12">
                    <el-form-item label="借据号" prop="bpdgrp.rec.finact">
                        <c-select v-model="model.bpdgrp.rec.finact" style="width:100%" placeholder="请选择借据号">
                        </c-select>
                    </el-form-item>
                </c-col>

                <c-col :span="8">
                    <el-form-item label="Percentage" prop="bpdgrp.rec.pctfin">
                        <c-input v-model="model.bpdgrp.rec.pctfin" placeholder="请输入Percentage"></c-input>
                    </el-form-item>
                </c-col>
            </c-row>

            <!------line5------->
            <c-row>
                <c-col :span="12">
                    <el-form-item label="Open Date" prop="bpdgrp.rec.opndat">
                        <c-date-picker type="date" v-model="model.bpdgrp.rec.opndat" style="width:100%" placeholder="请选择Open Date"></c-date-picker>
                    </el-form-item>
                </c-col>

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

            <!------line6------->
            <c-row>
                <c-col :span="24">
                    <el-form-item label="修改类型" prop="ametyp">
                        <c-select v-model="model.ametyp" style="width:100%" placeholder="请选择修改类型">
                        </c-select>
                    </el-form-item>
                </c-col>
            </c-row>

        </c-col>

        <!------------右部------------->
        <c-col :span="12">
            <!------line1------->
            <c-row>

                <c-col :span="24">
                    <c-ptap :model="model" :argadr="{
                        title: '融资客户',
                        grp: 'bpdgrp',
                        rol: 'fia',
                        }" :disabled="true" :isAdrblk="true" @onSeainf="onSeainf" @onFiapDet="onFiapDet">
                    </c-ptap>
                </c-col>

            </c-row>

            <!------line2------->
            <c-row>
                <c-col :span="12">
                    <el-form-item label="New Advance Type" prop="fintyp">
                        <c-select v-model="model.fintyp" style="width:100%" placeholder="请选择New Advance Type">
                        </c-select>
                    </el-form-item>
                </c-col>

                <c-col :span="12">
                    <el-form-item label="Discount Type" prop="distyp">
                        <c-select v-model="model.distyp" style="width:100%" placeholder="请选择Discount Type">
                        </c-select>
                    </el-form-item>
                </c-col>
            </c-row>
        </c-col>

    </c-row>

    <!-- =================下部====================== -->
    <c-row>
        <!------------左部------------->
        <c-col :span="12">

            <!------line1------->
            <c-row>
                <c-col :span="24">
                    <el-form-item label="借据号" prop="bpdgrp.rec.fincod">
                        <c-input v-model="model.bpdgrp.rec.fincod" maxlength="17" placeholder="请输入借据号"></c-input>
                    </el-form-item>
                </c-col>
            </c-row>

            <!------line2------->
            <c-row>
                <c-col :span="24">
                    <el-form-item label="计息周期" prop="bptmod.finmod.intprd">
                        <c-select v-model="model.bptmod.finmod.intprd" style="width:100%" placeholder="请选择计息周期">
                        </c-select>
                    </el-form-item>
                </c-col>
            </c-row>

            <!------line3------->
            <c-row>
                <c-col :span="24">
                    <el-form-item label="利率调整方式" prop="bptmod.finmod.ratchgtyp">
                        <c-select v-model="model.bptmod.finmod.ratchgtyp" style="width:100%" placeholder="">
                        </c-select>
                    </el-form-item>
                </c-col>
            </c-row>

            <!------line4------->
            <c-row>
                <c-col :span="24">
                    <el-form-item label="新到期日" prop="matdat">
                        <c-date-picker type="date" v-model="model.matdat" style="width:100%" placeholder=""></c-date-picker>
                    </el-form-item>
                </c-col>
            </c-row>

            <!------line5------->
            <c-row>
                <c-col :span="24">
                    <el-form-item label="基准利率规则" prop="bptmod.finmod.dinmod.jzllgz">
                        <c-select v-model="model.bptmod.finmod.dinmod.jzllgz" style="width:100%" placeholder="">
                        </c-select>
                    </el-form-item>
                </c-col>
            </c-row>

            <!------line6------->
            <c-row>
                <c-col :span="12">
                    <el-form-item label="基准利率" prop="bpdgrp.rec.intrat">
                        <c-input v-model="model.bpdgrp.rec.intrat" placeholder=""></c-input>
                    </el-form-item>
                </c-col>

                <c-col :span="12">
                    <span v-text="model.conrat" data-path=".conrat"> </span>
                </c-col>

                <c-col :span="12">
                    <el-form-item label="参考指标" prop="bpdgrp.rec.conrat">
                        <c-input v-model="model.bpdgrp.rec.conrat" placeholder=""></c-input>
                    </el-form-item>
                </c-col>

            </c-row>

            <!------line7------->
            <c-row>
                <c-col :span="24">
                    <el-form-item label="Total Rate" prop="bpdgrp.rec.tolrat">
                        <c-input v-model="model.bpdgrp.rec.tolrat" placeholder=""></c-input>
                    </el-form-item>
                </c-col>
            </c-row>

            <!------line8------->
            <c-row>
                <c-col :span="24">
                    <el-form-item label="第一还款账号" prop="bptmod.finmod.act1">
                        <c-select v-model="model.bptmod.finmod.act1" style="width:100%" placeholder="">
                        </c-select>
                    </el-form-item>
                </c-col>
            </c-row>

        </c-col>

        <!------------右部------------->
        <c-col :span="12">
            <!------line1------->
            <c-row>

                <c-col :span="24">
                    <el-form-item label="融资账号" prop="bpdgrp.rec.finact">
                        <c-input v-model="model.bpdgrp.rec.finact" maxlength="21" placeholder="请输入借据号"></c-input>
                    </el-form-item>
                </c-col>

            </c-row>

            <!------line2------->
            <c-row>
                <c-col :span="12">
                    <el-form-item label="计息日期" prop="bptmod.finmod.intdat">
                        <c-input v-model="model.bptmod.finmod.intdat" maxlength="2" placeholder="请输入计息日期"></c-input>
                    </el-form-item>
                </c-col>

                <c-col :span="12">
                    <c-checkbox v-model="model.bptmod.finmod.wjdkfl">是否到期主动扣收款</c-checkbox>
                </c-col>
            </c-row>

            <!------line3------->
            <c-row>
                <c-col :span="12">
                    <el-form-item label="利率调整周期" prop="bptmod.finmod.ratchgprd">
                        <c-select v-model="model.bptmod.finmod.ratchgprd" style="width:100%" placeholder="">
                        </c-select>
                    </el-form-item>
                </c-col>

                <c-col :span="12">
                    <el-form-item label="利率调整月日数" prop="bptmod.finmod.ratchgdat">
                        <c-input v-model="model.bptmod.finmod.ratchgdat" maxlength="4" placeholder="利率调整月日数"></c-input>
                    </el-form-item>
                </c-col>
            </c-row>

            <!------line4------->
            <c-row>
                <c-col :span="12">
                    <el-form-item label="Interest Days" prop="bpdgrp.rec.intday">
                        <c-input v-model="model.bpdgrp.rec.intday" placeholder="请输入Interest Days"></c-input>
                    </el-form-item>
                </c-col>

                <c-col :span="12">
                    <el-form-item label="宽限期" prop="bptmod.finmod.graday">
                        <c-input v-model="model.bptmod.finmod.graday" placeholder="请输入宽限期"></c-input>
                    </el-form-item>
                </c-col>
            </c-row>

            <!------line5------->
            <c-row>
                <c-col :span="12">
                    <el-form-item label="浮动方式" prop="bptmod.finmod.flttyp">
                        <c-select v-model="model.bptmod.finmod.flttyp" style="width:100%" placeholder="请选择浮动方式">
                        </c-select>
                    </el-form-item>
                </c-col>

                <c-col :span="12">
                    <el-form-item label="浮动值" prop="bptmod.finmod.fltval">
                        <c-input v-model="model.bptmod.finmod.fltval" placeholder="请输入浮动值"></c-input>
                    </el-form-item>
                </c-col>
            </c-row>

            <!------line6------->
            <c-row>
                <c-col :span="12">
                    <el-form-item label="执行利率" prop="bptmod.finmod.ovdinttyp">
                        <c-select v-model="model.bptmod.finmod.ovdinttyp" style="width:100%" placeholder="请选择执行利率">
                        </c-select>
                    </el-form-item>
                </c-col>

                <c-col :span="12">
                    <el-form-item label="罚息比率" prop="bptmod.finmod.ovdintrat">
                        <c-input v-model="model.bptmod.finmod.ovdintrat" placeholder="请输入罚息比率"></c-input>
                    </el-form-item>
                </c-col>
            </c-row>

            <!------line7------->
            <c-row>
                <c-col :span="24">
                    <el-form-item label="第三方还款方式" prop="bptmod.finmod.acttyp">
                        <c-select v-model="model.bptmod.finmod.acttyp" style="width:100%" placeholder="请选择第三方还款方式">
                        </c-select>
                    </el-form-item>
                </c-col>
            </c-row>

            <!------line8------->
            <c-row>
                <c-col :span="24">
                    <el-form-item label="第三方还款账号" prop="bptmod.finmod.act3">
                        <c-select v-model="model.bptmod.finmod.act3" style="width:100%" placeholder="第三方还款账号">
                        </c-select>
                    </el-form-item>
                </c-col>
            </c-row>

        </c-col>
    </c-row>

</div>
</template>

<script>
import Api from "~/service/Api"
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Bptame/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>

</style>
