<template>
<c-page title="出口融资修改">

    <div class="eContainer">

        <!-- <c-bus-button :$pntvm="this"></c-bus-button> -->
        <c-function-btn :handleSubmit="handleSubmit" :handleCheck="handleCheck" :handleStash="handleStash">
            <el-button size="small">备忘录</el-button>
            <el-button size="small" @click="setDraggableContent('cms', '影像信息')">影像信息</el-button>
            <!-- <el-button size="small">保存模板</el-button> -->
            <!-- <el-button size="small">使用模板</el-button> -->
            <el-button size="small">制裁信息</el-button>
            <!-- <el-button size="small">拆分报文</el-button> -->
            <el-button size="small">智能提示</el-button>
        </c-function-btn>

        <el-form :model="model" :rules="rules" ref="modelForm" label-width="150px" label-position="right" size="small" :validate-on-rule-change="false">
            <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="myTabClick">

                <!--PD000296 -->
                <el-tab-pane label="融资修改" name="bptame">
                    <c-content>
                        <m-bptame :model="model" :codes="codes" />
                    </c-content>
                </el-tab-pane>

                <!--PD000101 
                <el-tab-pane label="福费廷" name="urpp" v-if="model.bpdgrp.rec.fintyp=='F'||model.bpdgrp.rec.fintyp=='U'||model.bpdgrp.rec.fintyp=='G'||model.bpdgrp.rec.fintyp=='V'">
                    <c-content>
                        <m-urpp :model="model" :codes="codes" />
                    </c-content>
                </el-tab-pane>
                -->

                <!--PD000012 
                <el-tab-pane label="基本信息" name="ovwp">
                    <c-content>
                        <m-ovwp :model="model" :codes="codes" />
                    </c-content>
                </el-tab-pane>
                -->

                <!--PD000027 -->
                <el-tab-pane label="或有" name="engp">
                    <c-content>
                        <m-engp :model="model" :codes="codes" />
                    </c-content>
                </el-tab-pane>

                <!--PD000001 
                <el-tab-pane label="保证金" name="ccvpan">
                    <m-ccvpan :model="model" :codes="codes" />
                </el-tab-pane>
                -->

                <!--PD000000 -->
                <el-tab-pane label="费用及账务" name="setpan">
                    <c-content>
                        <m-setpan :model="model" :codes="codes" />
                    </c-content>
                </el-tab-pane>

                <!--PD000001 -->
                <el-tab-pane label="分录" name="glepan">
                    <c-content>
                        <m-glepan :model="model" :codes="codes" />
                    </c-content>
                </el-tab-pane>

                <!--PD000005 
                <el-tab-pane label="PD000005" name="syswrndisplay">
                    <m-syswrndisplay :model="model" :codes="codes" />
                </el-tab-pane>
                -->

                <!--PD000000 -->
                <el-tab-pane label="附言" name="coninfp">
                    <c-content>
                        <m-coninfp :model="model" :codes="codes" />
                    </c-content>
                </el-tab-pane>

                <!--PD000010 
                <el-tab-pane label="PD000010" name="coninftag">
                    <m-coninftag :model="model" :codes="codes" />
                </el-tab-pane>
                -->

                <!--PD000529 -->
                <el-tab-pane label="面函" name="docpan">
                    <c-content>
                        <m-docpan :model="model" :codes="codes" />
                    </c-content>
                </el-tab-pane>

                <!--PD000546 -->
                <el-tab-pane label="附件" name="doctre">
                    <c-content>
                        <m-doctre :model="model" :codes="codes" />
                    </c-content>
                </el-tab-pane>

                <!--
                <el-tab-pane label="PD000001" name="dtetag">
                    <m-dtetag :model="model" :codes="codes" />
                </el-tab-pane>

                <el-tab-pane label="PD000204" name="cips">
                    <m-cips :model="model" :codes="codes" />
                </el-tab-pane>

                <el-tab-pane label="PD000449" name="cips2">
                    <m-cips2 :model="model" :codes="codes" />
                </el-tab-pane>

                <el-tab-pane label="PD000450" name="cips3">
                    <m-cips3 :model="model" :codes="codes" />
                </el-tab-pane>

                <el-tab-pane label="PD000001" name="fecp">
                    <m-fecp :model="model" :codes="codes" />
                </el-tab-pane>

                <el-tab-pane label="PD000005" name="cfap">
                    <m-cfap :model="model" :codes="codes" />
                </el-tab-pane>

                <el-tab-pane label="PD000001" name="dinpan">
                    <m-dinpan :model="model" :codes="codes" />
                </el-tab-pane>
                -->

                <!--PD000001 -->
                <el-tab-pane label="授信额度" name="limitbody">
                    <c-content>
                        <m-limitbody :model="model" :codes="codes" />
                    </c-content>
                </el-tab-pane>

                <!--PD001139
                <el-tab-pane label="PD001139" name="shisuan">
                    <m-shisuan :model="model" :codes="codes" />
                </el-tab-pane>

                <el-tab-pane label="PD000001" name="conp">
                    <m-conp :model="model" :codes="codes" />
                </el-tab-pane>
                 -->

            </c-tabs>
        </el-form>
    </div>

</c-page>
</template>

<script>
import Api from "~/service/Api";
import Utils from "~/utils/index";
import CodeTable from "~/config/CodeTable";

import Bptame from "~/model/Bptame";
import commonProcess from "~/mixin/commonProcess";
import commonFuncs from "~/mixin/commonFuncs";
import Check from "~/model/Bptame/Check";
import Default from "~/model/Bptame/Default";
import Pattern from "~/model/Bptame/Pattern";

import Bptamep from "./Bptame";
import Urpp from "./Urpp";
import Ovwp from "./Ovwp";
import Engp from "~/views/Public/Engp";
import Ccvpan from "~/views/Public/Ccvpan";
import Setpan from "~/views/Public/Setpan";
import Glepan from "~/views/Public/Glepan";
//import Syswrndisplay from "./Syswrndisplay"
import Coninfp from "~/views/Public/Coninfp";
//import Coninftag from "./Coninftag";
import Docpan from "~/views/Public/Docpan";
import Doctre from "~/views/Public/Doctre";
//import Dtetag from "./Dtetag"
//import Cips from "./Cips"
//import Cips2 from "./Cips2"
//import Cips3 from "./Cips3"
//import Fecp from "./Fecp"
//import Cfap from "./Cfap"
//import Dinpan from "./Dinpan"
import Limitbody from "~/views/Public/Limitbody";
//import Shisuan from "./Shisuan"
//import Conp from "./Conp"

export default {
    name: "Bptame",
    components: {
        "m-bptame": Bptamep,
        "m-urpp": Urpp,
        "m-ovwp": Ovwp,
        "m-engp": Engp,
        "m-ccvpan": Ccvpan,
        "m-setpan": Setpan,
        "m-glepan": Glepan,
        //"m-syswrndisplay": Syswrndisplay,
        "m-coninfp": Coninfp,
        //"m-coninftag": Coninftag,
        "m-docpan": Docpan,
        "m-doctre": Doctre,
        //"m-dtetag": Dtetag,
        //"m-cips": Cips,
        //"m-cips2": Cips2,
        //"m-cips3": Cips3,
        //"m-fecp": Fecp,
        //"m-cfap": Cfap,
        //"m-dinpan": Dinpan,
        "m-limitbody": Limitbody,
        //"m-shisuan": Shisuan,
        //"m-conp": Conp,
    },
    provide() {
        return {
            root: this
        }
    },
    mixins: [commonProcess, commonFuncs], // 里面包含了Default、Check等的公共处理
    computed: {},
    data() {
        return {
            tabVal: "bptame",
            trnName: "bptame",
            model: new Bptame().data,
            checkRules: Check,
            defaultRules: Default,
            pattern: Pattern,
            rules: null,
            codes: {
                ...CodeTable,
            },
        }
    },
    methods: {
        myTabClick(tab) {
            this.tabClick(tab)
            /**
             *  do it yourself
             **/
        }
    },
    created: async function () {
        console.log("进入bptame交易");
        let rtnmsg = await this.init(this.$route.query)
        if (rtnmsg.respCode == SUCCESS) {
            //更新数据
            Utils.copyValueFromVO(this.model, rtnmsg.data);
            if (this.isInDisplay) {
                this.restoreDisplay();
            }

        } else {
            this.$notify.error({
                title: '错误',
                message: '服务请求失败！'
            });
        }
    }
}
</script>

<style>

</style>
