<template>
  <div class="eContainer">
    <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="tabClick">
        
            <!--内容 -->
           <el-tab-pane label="内容" name="setp">
                <m-setp :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--面函及报文 -->
           <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>
 
            <!--附言 -->
           <el-tab-pane label="附言" name="coninfp">
                <m-coninfp :model="model" :codes="codes"/>
           </el-tab-pane>
           <!--表外信息 -->
           <el-tab-pane label="表外信息" name="engp">
                <m-engp :model="model" :codes="codes" />
           </el-tab-pane>
            <!--费用及账务 -->
           <el-tab-pane label="费用及账务" name="setpan">
                <m-setpan :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--分录信息 -->
           <el-tab-pane label="分录信息" name="glepan">
                <m-glepan :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 Cctset from "~/model/Cctset";
import CommonProcess from "~/mixin/CommonProcess";
import Check from "~/model/Cctset/Check";
import Default from "~/model/Cctset/Default";
import Pattern from "~/model/Cctset/Pattern";
import Setp from "./Setp";
import Docpan from "./Docpan";
import Doctre from "./Doctre";
import Coninfp from "./Coninfp";
import Setpan from "./Setpan";
import Glepan from "./Glepan";
import Engp from "~/views/Public/Engp";

export default {
    name: "Cctset",
    components:{
        "m-setp" : Setp,
	"m-engp": Engp,
        "m-docpan" : Docpan,
        "m-doctre" : Doctre,
        "m-coninfp" : Coninfp,
        "m-setpan" : Setpan,
        "m-glepan" : Glepan,
    },
    provide() {
        return {
            root: this
        }
    },
    mixins: [CommonProcess],    // 里面包含了Default、Check等的公共处理
    data(){
        return {
            tabVal: "",
            trnName: "cctset",
            model: new Cctset().data,
            checkRules: Check,
            defaultRules: Default,
            pattern: Pattern,
            rules: null,
            codes: {
            },
        }
    },
    methods:{
        tabClick(){
        }
    },
    created:async function(){
        console.log("进入cctset交易");
        let rtnmsg = await this.init({})
        if(rtnmsg.respCode == SUCCESS)
        {
           //TODO 处理数据逻辑

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

</style>
