<template>
  <c-page title="进口信用证开立">
     <div class="eContainer">
          <c-function-btn
               :handleSubmit="handleSubmit"
               :handleCheck="handleCheck"
               :handleStash="handleStash"
               >
               <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>
               <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="160px" 
               size="small" 
               label-position="left" 
               :validate-on-rule-change="false"
               >
               <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="tabClick">
               
                    <!--PD000001 -->
                    <el-tab-pane label="Overview" name="ovwp">
                         <c-content>
                              <m-ovwp :model="model" :codes="codes"/>
                         </c-content>
                    </el-tab-pane>
          
                    <!--PD000001 -->
                    <el-tab-pane 
                         v-if="model.litp.aamp.aammod.addamtflg"
                         label="Additional Amount" name="aamp">
                         <m-aamp :model="model" :codes="codes"/>
                    </el-tab-pane>
          
                    <!--PD000077 -->
                    <el-tab-pane label="Details" name="detp">
                         <c-content>
                              <m-detp :model="model" :codes="codes"/>
                         </c-content>
                    </el-tab-pane>
          
                    <!--PD000042 -->
                    <el-tab-pane label="Parties" name="ptyp">
                         <c-content>
                              <m-ptyp :model="model" :codes="codes"/>
                         </c-content>
                    </el-tab-pane>
          
                    <!--PD000057 -->
                    <el-tab-pane label="Goods" name="dogp">
                         <c-content>
                              <m-dogp :model="model" :codes="codes"/>
                         </c-content>
                    </el-tab-pane>
          
                    <!--PD000060 -->
                    <el-tab-pane label="Documents" name="dorp">
                         <c-content>
                              <m-dorp :model="model" :codes="codes"/>
                         </c-content>
                    </el-tab-pane>
          
                    <!--PD000073 -->
                    <el-tab-pane label="Additional Conditions" name="adcp">
                         <c-content>
                              <m-adcp :model="model" :codes="codes"/>
                         </c-content>
                    </el-tab-pane>
          
                    <!--PD000027 -->
                    <el-tab-pane label="Liability" name="engp">
                         <c-content>
                              <m-engp :model="model" :codes="codes"/>
                         </c-content>
                    </el-tab-pane>
          
                    <!--PD000001 -->
                    <el-tab-pane label="Cash Cover" name="ccvpan">
                         <m-ccvpan :model="model" :codes="codes"/>
                    </el-tab-pane>
          
                    <!--PD000000 -->
                    <el-tab-pane label="Settlement" name="setpan">
                         <c-content>
                              <m-setpan :model="model" :codes="codes"/>
                         </c-content>
                    </el-tab-pane>
          
                    <!--PD000001 -->
                    <el-tab-pane label="Bookings" name="glepan">
                         <m-glepan :model="model" :codes="codes"/>
                    </el-tab-pane>
          
                    <!--PD000510 -->
                    <el-tab-pane label="备查表" name="addbcb">
                         <m-addbcb :model="model" :codes="codes"/>
                    </el-tab-pane>
          
                    <!--PD000000 -->
                    <el-tab-pane label="Completion" name="coninfp">
                         <m-coninfp :model="model" :codes="codes"/>
                    </el-tab-pane>
          
                    <!--PD000529 -->
                    <el-tab-pane label="Messages" name="docpan">
                         <m-docpan :model="model" :codes="codes"/>
                    </el-tab-pane>
          
                    <!--PD000546 -->
                    <!-- <el-tab-pane label="Attachments" name="doctre">
                         <m-doctre :model="model" :codes="codes"/>
                    </el-tab-pane> -->
          
                    <!--PD000002 -->
                    <el-tab-pane label="跨境人民币申报" name="cnyp">
                         <m-cnyp :model="model" :codes="codes"/>
                    </el-tab-pane>
          
                    <!--PD000110 -->
                    <el-tab-pane label="2106银行跟单结算及表外融资" name="libp">
                         <m-libp :model="model" :codes="codes"/>
                    </el-tab-pane>
                              
                    <!--PD000346 -->
                    <el-tab-pane
                         v-if="model.lidgrp.rec.spcrcbflg" 
                         label="Special Paymt. Cond. Bank only" name="spcrcvp">
                         <m-spcrcvp :model="model" :codes="codes"/>
                    </el-tab-pane>
          
                    <!--PD000347 -->
                    <el-tab-pane 
                         v-if="model.lidgrp.rec.spcbenflg"
                         label="Special Paymt. Cond. Beneficiary" name="spcbenp">
                         <m-spcbenp :model="model" :codes="codes"/>
                    </el-tab-pane>
          
                    <!--PD000115 -->
                    <el-tab-pane label="Addtional Info" name="namp">
                         <m-namp :model="model" :codes="codes"/>
                    </el-tab-pane>
          
                    <!--PD000001 -->
                    <el-tab-pane label="统一授信" name="limitbody">
                         <m-limitbody :model="model" :codes="codes"/>
                    </el-tab-pane>
          
                    <!--PD001033 -->
                    <!--
                    <el-tab-pane label="Diary Selection" name="diaselp">
                         <m-diaselp :model="model" :codes="codes"/>
                    </el-tab-pane>-->
          
                    <!--PD001003 -->
                    <!--
                    <el-tab-pane label="Diaries in Transactions" name="diapan">
                         <m-diapan :model="model" :codes="codes"/>
                    </el-tab-pane>
                    -->
               </c-tabs>
          </el-form>
          <c-grid-ety-prompt-dialog ref="etyDialog" :promptData="promptData" v-on:select-ety="selectEty">
		</c-grid-ety-prompt-dialog>
     </div>
  </c-page>
</template>
<script>
import Api from "~/service/Api"
import CodeTable from "~/config/CodeTable"
import Litopn from "~/model/Litopn"
import CommonProcess from "~/mixin/CommonProcess"
import CommonFuncs from "~/mixin/CommonFuncs"
import Check from "~/model/Litopn/Check"
import Default from "~/model/Litopn/Default"
import Pattern from "~/model/Litopn/Pattern"
import Ovwp from "./Ovwp"
import Aamp from "./Aamp"
import Detp from "./Detp"
import Ptyp from "./Ptyp"
import Dogp from "./Dogp"
import Dorp from "./Dorp"
import Adcp from "./Adcp"
//import Engp from "./Engp"
//import Ccvpan from "./Ccvpan"
//import Setpan from "./Setpan"
//import Glepan from "./Glepan"
import Addbcb from "./Addbcb"
//import Coninfp from "./Coninfp"
//import Docpan from "./Docpan"
import Doctre from "./Doctre"
import Cnyp from "./Cnyp"
import Libp from "./Libp"
import Namp from "./Namp"
import Limitbody from "./Limitbody"
import Spcrcvp from "./Spcrcvp"
import Spcbenp from "./Spcbenp"
import Diaselp from "./Diaselp"
import Diapan from "./Diapan"

import Ccvpan from "~/views/Public/Ccvpan"
import Coninfp from "~/views/Public/Coninfp";
import Setpan from "~/views/Public/Setpan";
import Docpan from "~/views/Public/Docpan";
//import Doctre from "~/views/Public/Doctre"
import Engp from "~/views/Public/Engp";
import Glepan from "~/views/Public/Glepan";


export default {
    components:{
        "m-ovwp" : Ovwp,
        "m-aamp" : Aamp,
        "m-detp" : Detp,
        "m-ptyp" : Ptyp,
        "m-dogp" : Dogp,
        "m-dorp" : Dorp,
        "m-adcp" : Adcp,
        "m-engp" : Engp,
        "m-ccvpan" : Ccvpan,
        "m-setpan" : Setpan,
        "m-glepan" : Glepan,
        "m-addbcb" : Addbcb,
        "m-coninfp" : Coninfp,
        "m-docpan" : Docpan,
        "m-doctre" : Doctre,
        "m-cnyp" : Cnyp,
        "m-libp" : Libp,
        "m-namp" : Namp,
        "m-limitbody" : Limitbody,
        "m-spcrcvp" : Spcrcvp,
        "m-spcbenp" : Spcbenp,
        "m-diaselp" : Diaselp,
        "m-diapan" : Diapan,
    },
    provide() {
        return {
            root: this
        }
    },
    mixins: [CommonProcess,CommonFuncs],    // 里面包含了Default、Check等的公共处理
    data(){
        return {
            tabVal: "ovwp",
            trnName: "litopn",
            model: new Litopn().data,
            checkRules: Check,
            defaultRules: Default,
            pattern: Pattern,
            rules: null,
            codes: {
            },
        }
    },
    methods:{
        tabClick(){
        }
    },
    created:async function(){
        console.log("进入litopn交易");
        let rtnmsg = await this.init({})
        if(rtnmsg.respCode == SUCCESS)
        {
           //TODO 处理数据逻辑

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

</style>
