<template>
    <div class="eContainer">
        <c-page title="境外主体之间资金划转业务信息(2107)-修改">
            <el-form :model="model" :rules="rules" label-position="left" label-width="120px" ref="modelForm"
                     size="small">
                <c-tabs ref="elment" type="card" v-model="tabVal">
                    <el-tab-pane label="接口数据" name="selection">
                        <m-selection :codes="codes" :model="model"/>
                    </el-tab-pane>
                    <el-tab-pane label="境外主体之间资金划转业务信息(2107)-修改" name="info">
                        <m-info :codes="codes" :model="model" ref="info"/>
                    </el-tab-pane>
                </c-tabs>
            </el-form>
            <div style="text-align: center">
                <c-button :disabled="isDisabled" @click="saveTdm" style="margin-right: 10px" type="primary">提交
                </c-button>
                <c-button :disabled="isDisabled" @click="checkTdm" style="margin-right: 10px" type="primary">检核
                </c-button>
                <c-button @click="exit" style="margin-right: 10px" type="primary">退出</c-button>
            </div>
        </c-page>
    </div>
</template>
<script>
    import Tdmadd from "../../tdm/model"
    import CodeTable from "~/config/CodeTable";
    import Selection from "../../tdm/views/selection.vue"
    import Event from "../event"
    import Check from "../model/check"
    import Info from "./Info"
    import init from "../../../rmbsel/event"

    export default {
        name: "Tdmame",
        components: {
            "m-selection": Selection,
            "m-info": Info,
        },
        mixins: [Event, Check, init], // 里面包含了Default、Check等的公共处理
        computed: {
            isDisabled() {
                return this.model.rmbbut.flg !== 'X';
            },
        },
        provide() {
            return {
                root: this,
            };
        },
        data() {
            return {
                tabVal: "selection",
                trnName: "tdmame",
                model: new Tdmadd().data,
                codes: {
                    ...CodeTable
                }
            }
        },
        created() {
            const inr = this.$route.query.inr;
            this.init(this.trnName, inr);
        },
    }
</script>
<style scoped>
    /deep/ .el-form-item__label {
        padding-left: 10px;
        padding-right: 10px;
        line-height: 20px !important;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
    }
</style>