<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">
        
            <!--PD000015 -->
           <el-tab-pane label="减额接受" name="accp">
                <m-accp :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000359 -->
           <el-tab-pane label="修改" name="amep">
                <m-amep :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000001 -->
           <el-tab-pane label="内容" name="ovwp">
                <m-ovwp :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000077 -->
           <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>
 
            <!--PD000021 -->
           <el-tab-pane label="历史概要" name="narp">
                <m-narp :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000105 -->
           <el-tab-pane label="服描修改" name="dogpame">
                <m-dogpame :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000110 -->
           <el-tab-pane label="单据修改" name="dorpame">
                <m-dorpame :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000114 -->
           <el-tab-pane label="其他条款修改" name="adcpame">
                <m-adcpame :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000306 -->
           <el-tab-pane label="给P, A, N. 银行指示" name="inspame">
                <m-inspame :model="model" :codes="codes"/>
           </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">
                <m-setpan :model="model" :codes="codes"/>
           </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>
 
            <!--PD000546 -->
           <el-tab-pane label="附件" name="doctre">
                <m-doctre :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD001139 -->
           <el-tab-pane label="试算结果" name="shisuan">
                <m-shisuan :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000452 -->
           <el-tab-pane label="银行明细" name="detp1">
                <m-detp1 :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000488 -->
           <el-tab-pane label="申明" name="stament">
                <m-stament :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000001 -->
           <el-tab-pane label="统一授信" name="limitbody">
                <m-limitbody :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 Ditdla from "~/model/Ditdla"
import CommonProcess from "~/mixin/CommonProcess"
import Check from "~/model/Ditdla/Check"
import Default from "~/model/Ditdla/Default"
import Pattern from "~/model/Ditdla/Pattern"
import Accp from "./Accp"
import Amep from "./Amep"
import Ovwp from "./Ovwp"
import Detp from "./Detp"
import Tk from "./Tk"
import Narp from "./Narp"
import Dogpame from "./Dogpame"
import Dorpame from "./Dorpame"
import Adcpame from "./Adcpame"
import Inspame from "./Inspame"
import Ccvpan from "~/views/Public/Ccvpan"
import Setpan from "~/views/Public/Setpan"
import Coninfp from "./Coninfp"
import Docpan from "~/views/Public/Docpan"
import Doctre from "./Doctre"
import Shisuan from "./Shisuan"
import Detp1 from "./Detp1"
import Stament from "./Stament"
import Limitbody from "./Limitbody"


export default {
    name: "Ditdla",
    components:{
        "m-accp" : Accp,
        "m-amep" : Amep,
        "m-ovwp" : Ovwp,
        "m-detp" : Detp,
        "m-tk" : Tk,
        "m-narp" : Narp,
        "m-dogpame" : Dogpame,
        "m-dorpame" : Dorpame,
        "m-adcpame" : Adcpame,
        "m-inspame" : Inspame,
        "m-ccvpan" : Ccvpan,
        "m-setpan" : Setpan,
        "m-coninfp" : Coninfp,
        "m-docpan" : Docpan,
        "m-doctre" : Doctre,
        "m-shisuan" : Shisuan,
        "m-detp1" : Detp1,
        "m-stament" : Stament,
        "m-limitbody" : Limitbody,
    },
    provide() {
        return {
            root: this
        }
    },
    mixins: [CommonProcess],    // 里面包含了Default、Check等的公共处理
    data(){
        return {
            tabVal: "accp",
            trnName: "ditdla",
            model: new Ditdla().data,
            checkRules: Check,
            defaultRules: Default,
            pattern: Pattern,
            rules: null,
            codes: {
            },
        }
    },
    methods:{
        tabClick(){
        }
    },
    created:async function(){
        console.log("进入ditdla交易");
        let rtnmsg = await this.init({})
        if(rtnmsg.respCode == SUCCESS)
        {
           //TODO 处理数据逻辑

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

</style>
