<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">交易历史</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> -->
        <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="tabClick">
        
            <!--PD000021 -->
           <el-tab-pane label="寄单" name="rgfp">
                <c-content>
                    <m-rgfp :model="model" :codes="codes"/>
                </c-content>
           </el-tab-pane>
 
            <!--PD000259 -->
           <el-tab-pane label="寄单1" name="rgfp1">
                <c-content>
                    <m-rgfp1 :model="model" :codes="codes"/>
                </c-content>
           </el-tab-pane>
 
            <!--PD000050 -->
           <el-tab-pane label="指示/不符点" name="dscins">
               <c-content>
                    <m-dscins :model="model" :codes="codes"/>
               </c-content>
           </el-tab-pane>
 
            <!--PD000049 -->
           <el-tab-pane label="单据描述" name="rgfdet">
               <c-content>
                    <m-rgfdet :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>
 
            <!--PD000000 -->
           <el-tab-pane label="费用及账务" name="setpan">
                <!--
                     <m-setpan :model="model" :codes="codes"/>
               -->
               <c-content>
                <m-setpan :model="model" :codes="codes" />
               </c-content>
           </el-tab-pane>
 
            <!--PD000000 -->
           <el-tab-pane label="附言" name="coninfp">
                <c-content>
                    <m-coninfp :model="model" :codes="codes"/>
                </c-content>
           </el-tab-pane>
 
            <!--PD000529 -->
           <el-tab-pane label="报文及面函" name="docpan">
                <c-content>
                    <m-docpan :model="model" :codes="codes"/>
                </c-content>
           </el-tab-pane>
 
            <!--PD000001 -->
           <el-tab-pane label="统一授信" name="limitbody">
                <c-content>
                    <m-limitbody :model="model" :codes="codes"/>
                </c-content>
           </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 Bftsnd from "~/model/Bftsnd";
import CommonProcess from "~/mixin/CommonProcess";
import CommonFuncs from "~/mixin/CommonFuncs";
import Check from "~/model/Bftsnd/Check";
import Default from "~/model/Bftsnd/Default";
import Pattern from "~/model/Bftsnd/Pattern";
import Rgfp from "./Rgfp";
import Rgfp1 from "./Rgfp1";
import Dscins from "./Dscins";
import Rgfdet from "./Rgfdet";
import Detp from "./Detp";

import Engp from "~/views/Public/Engp";
import Setpan from "~/views/Public/Setpan";
import Coninfp from "~/views/Public/Coninfp";
import Docpan from "~/views/Public/Docpan";
import Limitbody from "~/views/Public/Limitbody";



export default {
    name: "Bftsnd",
    components:{
        "m-rgfp" : Rgfp,
        "m-rgfp1" : Rgfp1,
        "m-dscins" : Dscins,
        "m-rgfdet" : Rgfdet,
        "m-engp" : Engp,
        "m-setpan" : Setpan,
        "m-coninfp" : Coninfp,
        "m-docpan" : Docpan,
        "m-limitbody" : Limitbody,
        "m-detp" : Detp,
    },
    provide() {
        return {
            root: this
        }
    },
    mixins: [CommonProcess,CommonFuncs],    // 里面包含了Default、Check等的公共处理
    computed: {},
    data(){
        return {
            tabVal: "",
            trnName: "bftsnd",
            model: new Bftsnd().data,
            checkRules: Check,
            defaultRules: Default,
            pattern: Pattern,
            rules: null,
            codes: { ...CodeTable },
        }
    },
    methods:{
        tabClick(){
        }
    },
    created:async function(){
        console.log("进入bftsnd交易");
        let rtnmsg = await this.init({})
        if(rtnmsg.respCode == SUCCESS)
        {
             this.updateModel(rtnmsg.data)
           //TODO 处理数据逻辑

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

</style>
