<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" @click="setDraggableContent('cms', '影像信息')">影像信息</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="myTabClick">
        
            <!--PD000020 -->
           <el-tab-pane label="融资详情" name="bptopn">
               <c-content>
                <m-bptopn :model="model" :codes="codes"/>
               </c-content>
           </el-tab-pane>
 
            <!--PD000101 -->
           <el-tab-pane label="福费廷" name="urpp" v-if="model.bpdgrp.rec.fintyp=='F'||model.bpdgrp.rec.fintyp=='U'||model.bpdgrp.rec.fintyp=='G'||model.bpdgrp.rec.fintyp=='V'">
                <c-content>
                <m-urpp :model="model" :codes="codes"/>
           </c-content>
           </el-tab-pane>
 
            <!--PD000012 -->
           <el-tab-pane label="基本信息" name="ovwp" v-if="1==0">
                <c-content>
                <m-ovwp :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>
 
            <!--PD000001 -->
           <el-tab-pane label="保证金" name="ccvpan" v-if="1==0">
                <c-content>
                <m-ccvpan :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>
 
            <!--PD000005 -->
           <el-tab-pane label="提示信息" name="syswrndisplay">
                <c-content>
                <m-syswrndisplay :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>
 
            <!--PD000010 -->
           <el-tab-pane label="Incoming Tag 72/79" name="coninftag">
               <c-content>
                <m-coninftag :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>
 
            <!--PD000546 -->
           <el-tab-pane label="附件" name="doctre">
                <c-content>
                <m-doctre :model="model" :codes="codes"/>
           </c-content>
           </el-tab-pane>
 
          
 
            <!--PD000004 -->
           <el-tab-pane label="融资款项" name="rzkx">
               <c-content>
                <m-rzkx :model="model" :codes="codes"/>
           </c-content>
           </el-tab-pane>
 
            <!--PD000006 -->
           <el-tab-pane label="外管信息" name="wg">
                <c-content>
                <m-wg :model="model" :codes="codes"/>
           </c-content>
           </el-tab-pane>
 
            <!--PD000005 -->
           <el-tab-pane label="国内外汇贷款数据采集" name="cfap">
                <c-content>
                <m-cfap :model="model" :codes="codes"/>
           </c-content>
           </el-tab-pane>
 
            <!--PD000001 -->
           <el-tab-pane label="定价系统" name="dinpan">
                <c-content>
                <m-dinpan :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>
 
            <!--PD000001 -->
           <el-tab-pane label="国内外汇贷款－签约信息" name="conp">
                <c-content>
                <m-conp :model="model" :codes="codes"/>
           </c-content>
           </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 Utils from "~/utils/index";
import CodeTable from "~/config/CodeTable";

import Bptopn from "~/model/Bptopn";
import commonProcess from "~/mixin/commonProcess";
import commonFuncs from "~/mixin/commonFuncs";
import Check from "~/model/Bptopn/Check";
import Default from "~/model/Bptopn/Default";
import Pattern from "~/model/Bptopn/Pattern";

import Bptopnp from "./Bptopn";
import Urpp from "./Urpp";
import Ovwp from "./Ovwp";
import Engp from "~/views/Public/Engp";
import Ccvpan from "~/views/Public/Ccvpan";
import Setpan from "~/views/Public/Setpan";
import Glepan from "~/views/Public/Glepan";
import Syswrndisplay from "./Syswrndisplay";
import Coninfp from "~/views/Public/Coninfp";
import Coninftag from "./Coninftag";
import Docpan from "~/views/Public/Docpan";
import Doctre from "~/views/Public/Doctre";
import Rzkx from "./Rzkx";
import Wg from "./Wg";
import Cfap from "./Cfap";
import Dinpan from "./Dinpan";
import Limitbody from "~/views/Public/Limitbody";
import Conp from "./Conp";


export default {
    name: "Bptopn",
    components:{
        "m-bptopn" : Bptopnp,
        "m-urpp" : Urpp,
        "m-ovwp" : Ovwp,
        "m-engp" : Engp,
        "m-ccvpan" : Ccvpan,
        "m-setpan" : Setpan,
        "m-glepan" : Glepan,
        "m-syswrndisplay" : Syswrndisplay,
        "m-coninfp" : Coninfp,
        "m-coninftag" : Coninftag,
        "m-docpan" : Docpan,
        "m-doctre" : Doctre,
        "m-docpan" : Docpan,
        "m-rzkx" : Rzkx,
        "m-wg" : Wg,
        "m-cfap" : Cfap,
        "m-dinpan" : Dinpan,
        "m-limitbody" : Limitbody,
        "m-conp" : Conp,
    },
    provide() {
        return {
            root: this
        }
    },
    mixins: [commonProcess,commonFuncs],    // 里面包含了Default、Check等的公共处理
    computed: {},
    data(){
        return {
            tabVal: "bptopn",
            trnName: "bptopn",
            model: new Bptopn().data,
            checkRules: Check,
            defaultRules: Default,
            pattern: Pattern,
            rules: null,
            codes: {
                 ...CodeTable,
            },
        }
    },
    methods:{
        myTabClick(tab){
            this.tabClick(tab)
            /**
            *  do it yourself
            **/
        }
    },
    created: async function() {
    console.log("进入bptopn交易");
    let rtnmsg = await this.init(this.$route.query);
    if (rtnmsg.respCode == SUCCESS) {
      //更新数据
      Utils.copyValueFromVO(this.model, rtnmsg.data);
      if (this.isInDisplay) {
        this.restoreDisplay();
      }
    } else {
      this.$notify.error({ title: "错误", message: "服务请求失败！" });
    }
  },
  watch: {
    
  },

}
</script>
<style>

</style>
