index.vue 2.69 KB
Newer Older
wangguangchao committed
1
<template>
潘际乾 committed
2
  <div class="eContainer-search">
3
    <el-form :model="model" :rules="rules" ref="modelForm" label-width="120px" size="small" :validate-on-rule-change="false">
wangguangchao committed
4
       <!-- <c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="tabClick">-->
wangguangchao committed
5 6
        
            <!--PD000001 -->
wangguangchao committed
7
           <!-- <el-tab-pane label="Diary Selection" name="diaselp"> --> 
liushikai committed
8
               <!-- <c-content> -->
9
                <m-diaselp :model="model" :codes="codes" ref="diaselp"/>
liushikai committed
10
               <!-- </c-content> -->
wangguangchao committed
11 12
           <!-- </el-tab-pane>
       </c-tabs> -->
wangguangchao committed
13 14 15 16
    </el-form>
  </div>
</template>
<script>
潘际乾 committed
17
import { getCodetable } from "~/service/business/codeTable"
wangguangchao committed
18 19
import CodeTable from "~/config/CodeTable"
import Diasel from "~/model/Diasel"
wangren committed
20
import commonProcess from "~/mixin/commonProcess"
21
import Utils from "~/utils/index"
wangguangchao committed
22 23 24 25 26 27 28
import Check from "~/model/Diasel/Check"
import Default from "~/model/Diasel/Default"
import Pattern from "~/model/Diasel/Pattern"
import Diaselp from "./Diaselp"


export default {
潘际乾 committed
29
    name: 'Diasel',
wangguangchao committed
30 31 32 33 34 35 36 37
    components:{
        "m-diaselp" : Diaselp,
    },
    provide() {
        return {
            root: this
        }
    },
wangren committed
38
    mixins: [commonProcess],    // 里面包含了Default、Check等的公共处理
wangguangchao committed
39 40
    data(){
        return {
41
            tabVal: "diaselp",
wangguangchao committed
42 43 44 45 46 47 48
            trnName: "diasel",
            model: new Diasel().data,
            checkRules: Check,
            defaultRules: Default,
            pattern: Pattern,
            rules: null,
            codes: {
49 50 51
                ...CodeTable,
                bustxt:[],
                diatxt:[],
wangguangchao committed
52 53 54 55 56 57 58
            },
        }
    },
    methods:{
        tabClick(){
        }
    },
59

wangguangchao committed
60 61
    created:async function(){
        console.log("进入diasel交易");
62
        // 查询码表
潘际乾 committed
63
        getCodetable({ tbl:'DIATXT',lang:'EN' }).then((res) => {
64 65 66 67
                if (res.respCode == SUCCESS) {
                  this.codes.diatxt = res.data;
                }
            });
潘际乾 committed
68
        getCodetable({ tbl:'BUSTXT',lang:'EN' }).then((res) => {
69 70 71 72 73
                if (res.respCode == SUCCESS) {
                  this.codes.bustxt = res.data;
                }
            });
         
74
        /* let rtnmsg = await this.init({})
wangguangchao committed
75 76
        if(rtnmsg.respCode == SUCCESS)
        {
77

78
           this.$refs.diaselp.stmData.data = rtnmsg.data.dspstm.rows;
wangguangchao committed
79 80 81 82 83

        }
        else
        {
            this.$notify.error({title: '错误',message: '服务请求失败!'});
84 85 86 87 88 89 90
        } */
        const that = this;
        that.init(that.model).then(res => {
            //TODO 处理数据逻辑
            that.model = Utils.copyValueFromVO(that.model, res.data)
            this.$refs.diaselp.handleSearch();
        })
wangguangchao committed
91 92 93 94 95 96
    }
}
</script>
<style>

</style>