<template>
    <div class="eContainer">
        <c-page title="资金拆借登记确认">
            <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">
                    <el-tab-pane label="业务" name="ovwp">
                        <c-content>
                            <m-ovwp :model="model" :codes="codes" />
                        </c-content>
                    </el-tab-pane>
                    <el-tab-pane label="费用/账务" name="setpan">
                        <c-content>
                            <m-setpan :codes="codes" :model="model" />
                        </c-content>
                    </el-tab-pane>
                    <el-tab-pane label="报文/面函" name="docpan">
                        <c-content>
                            <m-docpan :codes="codes" :model="model" />
                        </c-content>
                    </el-tab-pane>
                </c-tabs>
            </el-form>
            <c-function-btn
                :handleCheck="handleCheck"
                :handleStash="handleStash"
                :handleSubmit="handleSubmit"
                @handleSureWarning="handleSureWarning"
                ref="commonBtn"
            ></c-function-btn>
    </c-page>
    </div>
</template>
<script>
import Api from "~/service/Api"
import CodeTable from "~/config/CodeTable"
import commonProcess from "~/mixin/commonProcess"
import Setpan from "~/components/business/setmod/views";
import Docpan from "~/components/business/docpan/views";
import buildFn from "../event/buildCommons.js";

import Fttfcm from "../model";
import operationFunc from "~/mixin/operationFunc";
import commonDepend from "~/mixin/commonDepend";

import event from "../event";
import Check from "../model/Check.js"
// import Default from "../model/Default"
// import Pattern from "../model/Pattern"
import Ovwp from "./Ovwp"


export default {
    name: "Fttfcm",
    components: {
        "m-ovwp": Ovwp,
        "m-setpan": Setpan,
        "m-docpan": Docpan,
    },
    provide() {
        return {
            root: this
        }
    },
    mixins: [commonProcess,operationFunc,commonDepend,event,Check,buildFn],
    data() {
        return {
            tabVal: "ovwp",
            trnName: "fttfcm",
            trnType: "",
            model: new Fttfcm().data,
            rules: Check,
            codes: { ...CodeTable },
        }
    },
    methods: {
        myTabClick(tab) {
            this.tabClick(tab)
            /**
            *  do it yourself
            **/
        }
    },
    created:async function(){
        console.log("进入fttfcm交易.."+this.trnName);
        let params = {
          transName: this.trnName,
          ftdgrp: {
            rec: {
              inr: this.$route.query.inr || "",
            },
          },
        };
        this.init(params)
    }
}
</script>
<style></style>