index.vue 1.92 KB
Newer Older
1 2
<template>
  <div class="eContainer">
“yanyuxin” committed
3 4 5 6 7
    <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">
                   <!--trtsel PD000012 Menu -->
           <el-tab-pane :label="$t('trtsel.PD000012')" name="sel">
                <m-sel :model="model" :codes="codes"/>
“yanyuxin” committed
8
           </el-tab-pane>
“yanyuxin” committed
9
       </c-tabs>
10 11 12 13 14 15 16
    </el-form>
  </div>
</template>
<script>
import Api from "~/service/Api"
import CodeTable from "~/config/CodeTable"
import Trtsel from "~/model/Trtsel"
wangren committed
17
import commonProcess from "~/mixin/commonProcess"
18 19 20 21
import Check from "~/model/Trtsel/Check"
import Default from "~/model/Trtsel/Default"
import Pattern from "~/model/Trtsel/Pattern"
import Sel from "./Sel"
“yanyuxin” committed
22

23 24

export default {
“yanyuxin” committed
25
    name: "Trtsel",
26 27 28 29 30 31 32 33
    components:{
        "m-sel" : Sel,
    },
    provide() {
        return {
            root: this
        }
    },
wangren committed
34
    mixins: [commonProcess],    // 里面包含了Default、Check等的公共处理
35 36
    data(){
        return {
37
            tabVal: "sel",
38
            trnName: "trtsel",
“yanyuxin” committed
39
            trnType: "",
40 41 42 43 44 45 46 47 48 49
            model: new Trtsel().data,
            checkRules: Check,
            defaultRules: Default,
            pattern: Pattern,
            rules: null,
            codes: {
            },
        }
    },
    methods:{
“yanyuxin” committed
50 51 52 53 54
        myTabClick(tab){
            this.tabClick(tab)
            /**
            *  do it yourself
            **/
55 56 57 58 59 60 61
        }
    },
    created:async function(){
        console.log("进入trtsel交易");
        let rtnmsg = await this.init({})
        if(rtnmsg.respCode == SUCCESS)
        {
“yanyuxin” committed
62
           this.updateModel(rtnmsg.data)
63 64 65 66 67 68 69 70 71 72 73 74 75
           //TODO 处理数据逻辑

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

</style>