<template>
    <c-row>
        <!--=================顶部=================  -->
        <c-col :span="24">
            <c-col :span="8">
                <el-form-item label="单据编号" prop="trdgrp.rec.pntref">
                    <c-input v-model="model.trdgrp.rec.pntref" maxlength="16" disabled placeholder="请输入单据编号"></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="Parent Contract Name" prop="trdgrp.rec.pntnam">
                    <c-input align="middle" v-model="model.trdgrp.rec.pntnam" maxlength="40" disabled placeholder="请输入Parent Contract Name"></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="8">
                <el-form-item label="融资编号" prop="trdgrp.rec.ownref">
                    <c-input v-model="model.trdgrp.rec.ownref" maxlength="16" disabled placeholder="请输入融资编号"></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>
                    <c-button size="small" type="primary" :disabled="this.flag" @click="onTrtpButgetref">
                        Get Ref
                    </c-button>
                </el-form-item>
            </c-col>

            <c-col :span="11">
                <el-form-item label="Name of Loan Contract" prop="trdgrp.rec.nam">
                    <c-input align="middle" v-model="model.trdgrp.rec.nam" maxlength="40" disabled placeholder="请输入Name of Loan Contract"></c-input>
                </el-form-item>
            </c-col>
        </c-col>

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

            <c-col :span="16">
                <el-form-item label="客户经理" prop="trtp.usr.extkey">
                    <c-input v-model="model.trtp.usr.extkey" maxlength="8" placeholder="请输入客户经理"></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="onExtkey">
                        i
                    </c-button>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="开立日期" prop="trdgrp.rec.issdat">
                    <c-date-picker type="date" v-model="model.trdgrp.rec.issdat" style="width: 100%" placeholder="请选择开立日期"></c-date-picker>
                </el-form-item>
            </c-col>
            <c-col :span="18">
                <el-form-item label="融资品种" prop="trdgrp.rec.fintyp">
                    <c-select v-model="model.trdgrp.rec.fintyp" style="width:100%" placeholder="请选择融资品种">
                        <el-option v-for="item in codes.trdfintyp" :key="item.value" :label="item.label" :value="item.value">
                        </el-option>
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="6">
                <c-checkbox v-model="model.trtp.dfflag">同业代付</c-checkbox>
            </c-col>
            <c-col :span="24">
                <el-form-item label="货押标识" prop="trdgrp.rec.guaflg">
                    <c-select v-model="model.trdgrp.rec.guaflg" style="width:40%" placeholder="请选择货押标识">
                        <el-option v-for="item in codes.guaflg" :key="item.value" :label="item.label" :value="item.value">
                        </el-option>
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="Good's Code " prop="trdgrp.rec.stagod">
                    <c-select v-model="model.trdgrp.rec.stagod" style="width:100%" placeholder="请选择Good's Code ">
                        <el-option v-for="item in codes.godcod" :key="item.value" :label="item.label" :value="item.value">
                        </el-option>
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="13">
                <el-form-item label="融资金额" prop="trdgrp.cbs.max.cur">
                    <c-select v-model="model.trdgrp.cbs.max.cur" style="width:100%" placeholder="请选择Currency" @keyup.enter.native="maxCurEvent">
                        <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="11">
                <el-form-item style="text-align: left" label-width="20px" prop="trdgrp.cbs.max.amt">
                    <c-input v-model="model.trdgrp.cbs.max.amt" style="text-align: left; width: 100%" placeholder="请输入融资金额"></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="20">
                <el-form-item label="融资比例" prop="trdgrp.rec.pctfin">
                    <c-input v-model="model.trdgrp.rec.pctfin" style="width: 100%" placeholder="请输入融资比例"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="4">
                <el-form-item label="%">
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="计息周期" prop="trtmod.finmod.intprd">
                    <c-select v-model="model.trtmod.finmod.intprd" style="width:100%" placeholder="请选择计息周期">
                        <el-option v-for="item in codes.intprd" :key="item.value" :label="item.label" :value="item.value"></el-option>
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="利率调整方式" prop="trtmod.finmod.ratchgtyp">
                    <c-select v-model="model.trtmod.finmod.ratchgtyp" style="width:100%" placeholder="请选择利率调整方式">
                        <el-option v-for="item in codes.ratchgtyp" :key="item.value" :label="item.label" :value="item.value"></el-option>
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="开户日期" prop="trdgrp.rec.stttendat">
                    <c-date-picker type="date" v-model="model.trdgrp.rec.stttendat" style="width:100%" placeholder="请选择开户日期"></c-date-picker>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="融资到期日" prop="trdgrp.rec.matdat">
                    <c-date-picker type="date" v-model="model.trdgrp.rec.matdat" style="width:100%" placeholder="请选择融资到期日"></c-date-picker>
                </el-form-item>
            </c-col>
            <c-col :span="18">
                <el-form-item label="基准利率" prop="trdgrp.rec.intrat">
                    <c-input v-model="model.trdgrp.rec.intrat" placeholder="请输入基准利率"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="6">
                <c-button size="small" type="primary" @click="onFinmodButget">
                    Get
                </c-button>
            </c-col>
            <c-col :span="24">
                <el-form-item label="基准利率规则" prop="trtmod.finmod.dinmod.jzllgz">
                    <c-select v-model="model.trtmod.finmod.dinmod.jzllgz" style="width:100%" placeholder="请选择基准利率规则">
                        <el-option v-for="item in codes.jzllgz" :key="item.value" :label="item.label" :value="item.value"></el-option>
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="执行利率" prop="trdgrp.rec.actrat">
                    <c-input v-model="model.trdgrp.rec.actrat" placeholder="请输入执行利率"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="是否定向收付" prop="trdgrp.rec.flowflag">
                    <c-select v-model="model.trdgrp.rec.flowflag" style="width:100%" placeholder="请选择是否定向收付">
                        <el-option v-for="item in codes.flowflag" :key="item.value" :label="item.label" :value="item.value"></el-option>
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="第一还款账号" prop="trtmod.finmod.act1">
                    <c-select v-model="model.trtmod.finmod.act1" style="width:100%" placeholder="请选择第一还款账号">
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="18">
                <el-form-item label="预收息金额" prop="trtmod.finmod.intamt">
                    <c-input v-model="model.trtmod.finmod.intamt" placeholder="请输入预收息金额"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="6">
                <c-button size="small" type="primary" @click="onFinmodButcal">
                    计算
                </c-button>
            </c-col>
            <c-col :span="24">
                <el-form-item label="预扣息方式" prop="trtmod.finmod.inttyp">
                    <c-select v-model="model.trtmod.finmod.inttyp" style="width:100%" placeholder="请选择预扣息方式">
                        <el-option v-for="item in codes.fininttyp" :key="item.value" :label="item.label" :value="item.value"></el-option>
                    </c-select>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="税率" prop="trtmod.finmod.shuilv">
                    <c-input v-model="model.trtmod.finmod.shuilv" placeholder="请输入税率"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="18">
                <el-form-item label="定价审批代码" prop="trtmod.finmod.dinjdm">
                    <c-input v-model="model.trtmod.finmod.dinjdm" maxlength="20" placeholder="请输入定价审批代码"></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="6">
                <c-button size="small" type="primary" @click="onDinmodDget">
                    Get
                </c-button>
            </c-col>
            <c-col :span="24">
                <el-form-item label="市场LPR期限品种" prop="trdgrp.rec.lprtyp">
                    <c-select v-model="model.trdgrp.rec.lprtyp" style="width:100%" placeholder="请选择市场LPR期限品种">
                        <el-option v-for="item in codes.lprtyp" :key="item.value" :label="item.label" :value="item.value"></el-option>
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="审批流程发起标识" prop="trtmod.finmod.dinmod.rmbsbs">
                    <c-select v-model="model.trtmod.finmod.dinmod.rmbsbs" style="width:100%" placeholder="请选择审批流程发起标识">
                        <el-option v-for="item in codes.jzllgz" :key="item.value" :label="item.label" :value="item.value"></el-option>
                    </c-select>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="发票类型" prop="trdgrp.rec.invtyp">
                    <c-select v-model="model.trdgrp.rec.invtyp" style="width:100%" placeholder="请选择发票类型">
                        <el-option v-for="item in codes.invtyp" :key="item.value" :label="item.label" :value="item.value"></el-option>
                    </c-select>
                </el-form-item>
            </c-col>

        </c-col>
        <!--=================中部-右=================  -->
        <c-col :span="11" :offset="1">
            <c-col :span="24">
                <el-form-item label="融资客户参考号" prop="trdgrp.fip.pts.ref">
                    <c-input v-model="model.trdgrp.fip.pts.ref" maxlength="16" placeholder="请输入融资客户参考号"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="16">
                <el-form-item label="Extkey" prop="trdgrp.fip.pts.extkey">
                    <c-input id="extkey" v-model="model.trdgrp.fip.pts.extkey" maxlength="16" placeholder="请输入External Key of Address" @keyup.enter.native="showGridPromptDialog('trdgrp.fip.pts.extkey')"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="8">
                <el-form-item label="" label-width="8px">
                    <c-button size="small" type="primary;width:10%" @click="onSeainf('trdgrp.fip.pts.extkey')">i</c-button>
                    <c-button size="small" type="primary" @click="onFippDet">
                        Details
                    </c-button>
                </el-form-item>
            </c-col>
            <!--
            <c-col :span="12">
                <el-form-item label="" prop="trtp.fipp.ptsget.sdamod.seainf">
                    <c-input v-model="model.trtp.fipp.ptsget.sdamod.seainf" placeholder="请输入"></c-input>
                </el-form-item>
            </c-col>    -->
            <!--
            <c-col :span="24">
                <el-form-item label="名称" prop="trdgrp.fip.namelc">
                    <c-input type="textarea" v-model="model.trdgrp.fip.namelc" maxlength="35" show-word-limit placeholder="请输入名称"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="地址" prop="trdgrp.fip.adrelc">
                    <c-input type="textarea" v-model="model.trdgrp.fip.adrelc" maxlength="35" show-word-limit placeholder="请输入地址"></c-input>
                </el-form-item>
            </c-col>    -->
            <c-col :span="24">
                <el-form-item label="Address Block" prop="trdgrp.fip.pts.adrblk">
                    <c-input type="textarea" :rows="3" v-model="model.trdgrp.fip.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="trdgrp.fip.dbfadrblkcn">
                    <c-input type="textarea" v-model="model.trdgrp.fip.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="trtmod.finmod.fincod">
                    <c-input v-model="model.trtmod.finmod.fincod" maxlength="17" placeholder="请输入借据号"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="14">
                <el-form-item label="计息日期" prop="trtmod.finmod.intdat">
                    <c-input v-model="model.trtmod.finmod.intdat" maxlength="2" placeholder="请输入计息日期"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="10">
                <c-checkbox v-model="model.trtmod.finmod.wjdkfl">是否到期主动扣收款</c-checkbox>
            </c-col>
            <c-col :span="24">
                <el-form-item label="利率调整周期" prop="trtmod.finmod.ratchgprd">
                    <c-select v-model="model.trtmod.finmod.ratchgprd" style="width:100%" placeholder="请选择利率调整周期">
                        <el-option v-for="item in codes.ratchgprd" :key="item.value" :label="item.label" :value="item.value"></el-option>
                    </c-select>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="利率调整月日数" prop="trtmod.finmod.ratchgdat">
                    <c-input v-model="model.trtmod.finmod.ratchgdat" maxlength="4" placeholder="请输入利率调整月日数"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="融资天数" prop="trdgrp.rec.tenday">
                    <c-input v-model="model.trdgrp.rec.tenday" style="width:100%" placeholder="请输入融资天数"></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="宽限期" prop="trtmod.finmod.graday">
                    <c-input v-model="model.trtmod.finmod.graday" style="width:100%" placeholder="请输入宽限期"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="浮动方式" prop="trtmod.finmod.flttyp">
                    <c-select v-model="model.trtmod.finmod.flttyp" style="width:100%" placeholder="请选择浮动方式">
                        <el-option v-for="item in codes.flttyp" :key="item.value" :label="item.label" :value="item.value"></el-option>
                    </c-select>
                </el-form-item>
            </c-col>

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

            <c-col :span="24">
                <el-form-item label="逾期计息方式" prop="trtmod.finmod.ovdinttyp">
                    <c-select v-model="model.trtmod.finmod.ovdinttyp" style="width:100%" placeholder="请选择逾期计息方式">
                        <el-option v-for="item in codes.ovdinttyp" :key="item.value" :label="item.label" :value="item.value"></el-option>
                    </c-select>
                </el-form-item>
            </c-col>

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

                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="第三方还款方式" prop="trtmod.finmod.acttyp">
                    <c-select v-model="model.trtmod.finmod.acttyp" style="width:100%" placeholder="请选择第三方还款方式">
                        <el-option v-for="item in codes.acttyp" :key="item.value" :label="item.label" :value="item.value"></el-option>
                    </c-select>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="入账机构" prop="trtmod.finmod.accbch">
                    <c-select v-model="model.trtmod.finmod.accbch" style="width:100%" placeholder="请选择入账机构">
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="第三方还款账号" prop="trtmod.finmod.act3">
                    <c-select v-model="model.trtmod.finmod.act3" style="width:100%" placeholder="请选择第三方还款账号">
                    </c-select>
                </el-form-item>
            </c-col>
            <c-col :span="12">
                <span v-text="model.trntyp" data-path=".trntyp"> </span>
            </c-col>
            <c-col :span="12">
                <el-form-item label="交易性质" prop="trdgrp.rec.trntyp">
                    <c-input v-model="model.trdgrp.rec.trntyp" maxlength="6" placeholder="请输入交易性质"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="12">
                <c-button size="small" type="primary" icon="el-icon-search" @click="onCodselSelbut">
                    ?
                </c-button>
            </c-col>

            <c-col :span="24">
                <el-form-item label="利息付款账号" prop="trtmod.finmod.intact">
                    <c-input v-model="model.trtmod.finmod.intact" style="width:100%" placeholder="请选择利息付款账号">
                    </c-input>
                </el-form-item>
            </c-col>
            <c-col :span="12">
                <span v-text="model.oppacc" data-path=".oppacc"> </span>
            </c-col>

            <c-col :span="24">
                <el-form-item label="对方账号" prop="trdgrp.rec.oppacc">
                    <c-input v-model="model.trdgrp.rec.oppacc" maxlength="35" placeholder="请输入对方账号"></c-input>
                </el-form-item>
            </c-col>

            <c-col :span="24">
                <el-form-item label="贸易合同号" prop="trdgrp.rec.mycontno">
                    <c-input v-model="model.trdgrp.rec.mycontno" maxlength="35" placeholder="请输入贸易合同号"></c-input>
                </el-form-item>
            </c-col>
            <c-col :span="24">
                <el-form-item label="外币贷款专户清单" prop="trtp.act">
                    <c-select v-model="model.trtp.act" style="width:100%" placeholder="请选择外币贷款专户清单">
                    </c-select>
                </el-form-item>
            </c-col>
        </c-col>
    </c-row>
</template>
<script>
    import Api from "~/service/Api";
    import CommonProcess from "~/mixin/CommonProcess";
    import CodeTable from "~/config/CodeTable";
    import Event from "~/model/Trtopn/Event";
    import Utils from "~/utils";

    export default {
      inject: ["root"],
      props: ["model", "codes"],
      mixins: [CommonProcess],
      data() {
        return {};
      },
      methods: { ...Event },
      created: function() {}
    };
</script>
<style>
</style>
