<template>
<c-page title="进口代收付款">
  <div class="eContainer">
         <c-function-btn :handleSubmit="handleSubmit" :handleCheck="handleCheck" :handleStash="handleStash">
                    
      </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">
        
            <!--PD000005 -->
           <el-tab-pane label="Settle BC " name="bctsus">
                <m-bctsus :model="model" :codes="codes"/>
           </el-tab-pane>
 
            <!--PD000018 -->
           <el-tab-pane label="Instructions" name="detp">
                <m-detp :model="model" :codes="codes"/>
           </el-tab-pane>
  
            <!--PD000260 -->
           <el-tab-pane label="Parties" name="ptyp">
           <c-content>
                <m-ptyp :model="model" :codes="codes"/>
            </c-content>
           </el-tab-pane>

            <!--PD000027 -->
           <el-tab-pane label="Liability" name="engp">
                <m-engp :model="model" :codes="codes"/>
           </el-tab-pane>
           
            <!--PD000000 -->
           <el-tab-pane label="Settlement" name="setpan">
                <m-setpan :model="model" :codes="codes"/>
           </el-tab-pane>
 
           <el-tab-pane label="Bookings" name="glepan">
                <m-glepan :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>

           <el-tab-pane label="Attachments" name="doctre">
                <m-doctre :model="model" :codes="codes"/>
           </el-tab-pane>

            <el-tab-pane label="外管信息" name="wg">
                <m-wg :model="model" :codes="codes"/>
           </el-tab-pane>

         
           <el-tab-pane v-if="model.bopmod.basflg" label="对外付款/承兑通知书-基础信息" name="basp">
                <m-basp :model="model" :codes="codes"/>
           </el-tab-pane>
          
           <el-tab-pane label="跨境人名币申报" name="cnyp">
                <m-cnyp :model="model" :codes="codes"/>
           </el-tab-pane>

           <el-tab-pane label="资本项目" name="cfactlp">
                <m-cfactlp :model="model" :codes="codes"/>
           </el-tab-pane>

           <el-tab-pane label="统一授信" name="limitbody">
                <m-limitbody :model="model" :codes="codes"/>
           </el-tab-pane>

           <el-tab-pane label="Payment 400 RMI " name="det400">
                <m-det400 :model="model" :codes="codes"/>
           </el-tab-pane>

           <el-tab-pane label="Payment 202 RMI " name="det202cv">
                <m-det202cv :model="model" :codes="codes"/>
           </el-tab-pane>

       </c-tabs>
    </el-form>
  </div>
  </c-page>
</template>
<script>
import Api from "~/service/Api"
import CodeTable from "~/config/CodeTable"
import Bctset from "~/model/Bctset"
import commonProcess from "~/mixin/commonProcess"
import commonFuncs from "~/mixin/commonFuncs"
import Check from "~/model/Bctset/Check"
import Default from "~/model/Bctset/Default"
import Pattern from "~/model/Bctset/Pattern"
import Bctsus from "./Bctsus"
import Detp from "./Detp"
import Shpdet from "./Shpdet"
import Ptyp from "./Ptyp"
import Wg from "./Wg"
import Basp from "./Basp"
import Cnyp from "./Cnyp"
import Cfactlp from "./Cfactlp"
import Det400 from "./Det400"
import Det202cv from "./Det202cv"

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 Doctre from "~/views/Public/Doctre"
import Limitbody from "~/views/Public/Limitbody"
import Glepan from "~/views/Public/Glepan"

export default {
    name: "Bctset",
    components:{
        "m-bctsus" : Bctsus,
        "m-detp" : Detp,
        "m-setpan" : Setpan,
        "m-shpdet" : Shpdet,
        "m-ptyp" : Ptyp,
        "m-basp" : Basp,
        "m-engp" : Engp,
        "m-coninfp" : Coninfp,
        "m-docpan" : Docpan,
        "m-doctre" : Doctre,
        "m-wg": Wg,
        "m-cnyp": Cnyp,
        "m-cfactlp": Cfactlp,
        "m-det400": Det400,
        "m-det202cv": Det202cv,
        "m-limitbody":Limitbody,
        "m-glepan":Glepan,
    },
    provide() {
        return {
            root: this
        }
    },
    mixins: [commonProcess,commonFuncs],    // 里面包含了Default、Check等的公共处理
    data(){
        return {
            tabVal: "bctsus",
            trnName: "bctset",
            model: new Bctset().data,
            checkRules: Check,
            defaultRules: Default,
            pattern: Pattern,
            rules: null,
            codes: {...CodeTable
            },
        }
    },
    methods:{
    },
    created:async function(){
        console.log("进入bctset交易");
        let rtnmsg = await this.init({})
        if(rtnmsg.respCode == SUCCESS)
        {
           //TODO 处理数据逻辑
          this.updateModel(rtnmsg.data);
        }
        else
        {
            this.$notify.error({title: '错误',message: '服务请求失败！'});
        }
    }
}
</script>
<style>

</style>
