<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">
        
            <!--PD000034 -->
           <el-tab-pane label="收款" name="setp">
            <c-content>
                <m-setp :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">
            <c-content>
                <m-setpan :model="model" :codes="codes"/>
            </c-content>
           </el-tab-pane>
 
            <!--PD000001 -->
           <el-tab-pane label="分录" name="glepan">
            <c-content>
                <m-glepan :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 Bftset from "~/model/Bftset";
import CommonProcess from "~/mixin/CommonProcess";
import CommonFuncs from "~/mixin/CommonFuncs";
import Check from "~/model/Bftset/Check";
import Default from "~/model/Bftset/Default";
import Pattern from "~/model/Bftset/Pattern";
import Setp from "./Setp";
import Detp from "./Detp";

import Glepan from "~/views/Public/Glepan";
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: "Bftset",
    components:{
        "m-setp" : Setp,
        "m-engp" : Engp,
        "m-setpan" : Setpan,
        "m-glepan" : Glepan,
        "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: "setp",
            trnName: "bftset",
            model: new Bftset().data,
            checkRules: Check,
            defaultRules: Default,
            pattern: Pattern,
            rules: null,
            codes: { ...CodeTable },
        }
    },
    methods:{
        tabClick(){
        }
    },
    created:async function(){
        console.log("进入bftset交易");
        let rtnmsg = await this.init({})
        if(rtnmsg.respCode == SUCCESS)
        {
             this.updateModel(rtnmsg.data)
           //TODO 处理数据逻辑

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

</style>
