<template>
  <div class="eContainer">
    <el-form :model="model" :rules="rules" ref="modelForm" label-width="200px" size="small">
       <c-tabs v-model="activeName" ref="elment" type="card" @tab-click="tabClick" >
        
            <!--PD000001 -->
           <el-tab-pane label="内容" name="ovwp">
                <m-ovwp :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000275 -->
           <el-tab-pane label="明细" name="detp">
                <m-detp :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000342 -->
           <el-tab-pane label="条款" name="tk">
                <m-tk :model="model" :codes="codes"/>
           </el-tab-pane>

           <!--PD000027 -->
           <el-tab-pane label="或有" name="engp" v-if="model.lidgrp.cbs.nom1.amt!=''">
                <m-engp :model="model" :codes="codes"/>
           </el-tab-pane>

           <!--PD000000 -->
           <el-tab-pane label="结算" name="setpan">
                <m-setpan :model="model" :codes="codes"/>
           </el-tab-pane>

           <el-tab-pane label="分录" name="glepan">
           </el-tab-pane>

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

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

           <el-tab-pane label="附件信息" name="doctre">
                <m-doctre :model="model" :codes="codes"/>
           </el-tab-pane>

            <!--PD000361 -->
           <el-tab-pane label="Mt799" name="mt799">
                <m-mt799 :model="model" :codes="codes"/>
           </el-tab-pane>

           <el-tab-pane label="账户概况" name="actlst">
                <m-actlst :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000065 -->
           <!-- <el-tab-pane label="PD000065" name="rbip">
                <m-rbip :model="model" :codes="codes"/>
           </el-tab-pane> -->
 
            <!--PD000077 -->
           <!-- <el-tab-pane label="PD000077" name="detp">
                <m-detp :model="model" :codes="codes"/>
           </el-tab-pane> -->
 
            <!--PD000361 -->
           <!-- <el-tab-pane label="PD000361" name="mt799">
                <m-mt799 :model="model" :codes="codes"/>
           </el-tab-pane>
  -->
            <!--PD000019 -->
           <!-- <el-tab-pane label="PD000019" name="litbenl1">
                <m-litbenl1 :model="model" :codes="codes"/>
           </el-tab-pane> -->
 
            <!--PD000021 -->
           <!-- <el-tab-pane label="PD000021" name="litapll1">
                <m-litapll1 :model="model" :codes="codes"/>
           </el-tab-pane> -->
 
            <!--PD000020 -->
           <!-- <el-tab-pane label="PD000020" name="litrmbl1">
                <m-litrmbl1 :model="model" :codes="codes"/>
           </el-tab-pane> -->
 
 
            <!--PD000510 -->
           <!-- <el-tab-pane label="PD000510" name="addbcb">
                <m-addbcb :model="model" :codes="codes"/>
           </el-tab-pane> -->
 
            
 
            <!--PD000001 -->
           <!-- <el-tab-pane label="PD000001" name="ccvpan">
                <m-ccvpan :model="model" :codes="codes"/>
           </el-tab-pane> -->
       </c-tabs>
    </el-form>
  </div>
</template>
<script>
import Api from "~/service/Api"
import CodeTable from "~/config/CodeTable"
import Ditopn from "~/model/Ditopn"
import CommonProcess from "~/mixin/CommonProcess"
import Pattern from "~/model/Ditopn/Pattern"
import Ovwp from "./Ovwp"
import Revp from "./Revp"
import Tk from "./Tk"
import Rbip from "./Rbip"
import Detp from "./Detp"
import Mt799 from "./Mt799"
import Litbenl1 from "./Litbenl1"
import Litapll1 from "./Litapll1"
import Litrmbl1 from "./Litrmbl1"
import Setpan from "./Setpan"
import Engp from "./Engp"
import Addbcb from "./Addbcb"
import Docpan from "./Docpan"
import Coninfp from "./Coninfp"
import Ccvpan from "./Ccvpan"
import Doctre from "./Doctre.vue"
import Actlst from "./Actlst.vue"


export default {
    components:{
        "m-ovwp" : Ovwp,
        "m-revp" : Revp,
        "m-tk" : Tk,
        "m-rbip" : Rbip,
        "m-detp" : Detp,
        "m-mt799" : Mt799,
        "m-litbenl1" : Litbenl1,
        "m-litapll1" : Litapll1,
        "m-litrmbl1" : Litrmbl1,
        "m-setpan" : Setpan,
        "m-engp" : Engp,
        "m-addbcb" : Addbcb,
        "m-docpan" : Docpan,
        "m-coninfp" : Coninfp,
        "m-ccvpan" : Ccvpan,
        "m-doctre" : Doctre,
        "m-actlst" : Actlst
    },
    provide() {
        return {
            root: this
        }
    },
    mixins: [CommonProcess],    // 里面包含了Default、Check等的公共处理
    data(){
        return {
            activeName: "ovwp",
            model:new Ditopn().data,
            // defaultRule:Default,
            // rules:this.mergeRules(Pattern,Check),
            rules:Pattern,
            codes:{
            },
        }
    },
    methods:{
        tabClick(){
        }
    },
    created:async function(){
        console.log("进入ditopn交易");
        let rtnmsg = await Api.post("ditopn/init",{params:{}})
        if(rtnmsg.retcod == SUCCESS)
        {
           //TODO 处理数据逻辑

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