index.vue 2.69 KB
<template>
  <div class="eContainer-search">
    <el-form :model="model" :rules="rules" ref="modelForm" label-width="120px" size="small" :validate-on-rule-change="false">
       <!-- <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="tabClick">-->
        
            <!--PD000001 -->
           <!-- <el-tab-pane label="Diary Selection" name="diaselp"> --> 
               <!-- <c-content> -->
                <m-diaselp :model="model" :codes="codes" ref="diaselp"/>
               <!-- </c-content> -->
           <!-- </el-tab-pane>
       </c-tabs> -->
    </el-form>
  </div>
</template>
<script>
import { getCodetable } from "~/service/business/codeTable"
import CodeTable from "~/config/CodeTable"
import Diasel from "~/model/Diasel"
import commonProcess from "~/mixin/commonProcess"
import Utils from "~/utils/index"
import Check from "~/model/Diasel/Check"
import Default from "~/model/Diasel/Default"
import Pattern from "~/model/Diasel/Pattern"
import Diaselp from "./Diaselp"


export default {
    name: 'Diasel',
    components:{
        "m-diaselp" : Diaselp,
    },
    provide() {
        return {
            root: this
        }
    },
    mixins: [commonProcess],    // 里面包含了Default、Check等的公共处理
    data(){
        return {
            tabVal: "diaselp",
            trnName: "diasel",
            model: new Diasel().data,
            checkRules: Check,
            defaultRules: Default,
            pattern: Pattern,
            rules: null,
            codes: {
                ...CodeTable,
                bustxt:[],
                diatxt:[],
            },
        }
    },
    methods:{
        tabClick(){
        }
    },

    created:async function(){
        console.log("进入diasel交易");
        // 查询码表
        getCodetable({ tbl:'DIATXT',lang:'EN' }).then((res) => {
                if (res.respCode == SUCCESS) {
                  this.codes.diatxt = res.data;
                }
            });
        getCodetable({ tbl:'BUSTXT',lang:'EN' }).then((res) => {
                if (res.respCode == SUCCESS) {
                  this.codes.bustxt = res.data;
                }
            });
         
        /* let rtnmsg = await this.init({})
        if(rtnmsg.respCode == SUCCESS)
        {

           this.$refs.diaselp.stmData.data = rtnmsg.data.dspstm.rows;

        }
        else
        {
            this.$notify.error({title: '错误',message: '服务请求失败!'});
        } */
        const that = this;
        that.init(that.model).then(res => {
            //TODO 处理数据逻辑
            that.model = Utils.copyValueFromVO(that.model, res.data)
            this.$refs.diaselp.handleSearch();
        })
    }
}
</script>
<style>

</style>