<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">
                    <!--fttfcn PD000001 Cancellation -->
                    <el-tab-pane label="销账" name="canp">
                        <c-content>
                            <m-canp :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 Fttfcn from "../model"
import Canp from "./Canp"
import Setpan from "~/components/business/setmod/views";
import Docpan from "~/components/business/docpan/views";

import operationFunc from "~/mixin/operationFunc";
import commonDepend from "~/mixin/commonDepend";
import event from "../event";
import buildFn from "../event/buildCommons.js";
import Check from "../model/Check.js";


export default {
    name: "Fttfcn",
    components: {
        "m-canp": Canp,
        "m-setpan": Setpan,
        "m-docpan": Docpan,
    },
    provide() {
        return {
            root: this
        }
    },
    mixins: [operationFunc, commonDepend, event, buildFn],    // 里面包含了Default、Check等的公共处理
    data() {
        return {
            tabVal: "canp",
            trnName: "fttfcn",
            trnType: "",
            model: new Fttfcn().data,
            rules: Check,
            codes: { ...CodeTable },
        }
    },
    methods: {
        myTabClick(tab) {
            this.tabClick(tab)
            /**
            *  do it yourself
            **/
        }
    },
    created: async function () {
        console.log("进入fttfcn交易");
        let rtnmsg = {}; // await this.init({})
        if (rtnmsg.respCode == SUCCESS) {
            this.updateModel(rtnmsg.data)
            //TODO 处理数据逻辑

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