BusinessButton.vue 1.21 KB
Newer Older
fukai committed
1 2
<template>
    <div class="bus-button">        
fukai committed
3 4 5 6
            <c-button type="primary" v-on:click="save">提交</c-button>
            <c-button type="primary" v-on:click="pedding">暂存</c-button>
            <c-button type="primary" v-on:click="check">校核</c-button>
            <c-button  v-on:click="exit">退出</c-button>
fukai committed
7 8 9
    </div>
</template>
<script>
fukai committed
10
import commonApi from "~/mixin/commonApi"
fukai committed
11
export default {
fukai committed
12
    props:["$pntvm"],
fukai committed
13
    data(){
fukai committed
14
        return{
fukai committed
15

liuxin committed
16
            
fukai committed
17
        }
fukai committed
18 19
    },
    methods:{
fukai committed
20 21 22 23 24
        async save(){
            console.log(123)
            let vm = this.getVM();
            let result = await vm.save()
            console.log(result)
fukai committed
25
        },
fukai committed
26 27 28
        async pedding(){
            let result = await this.getVM().pedding()
            console.log(result)
fukai committed
29
        },
fukai committed
30 31 32 33 34 35
        async check(){
            let result = await this.getVM().checkAll()
            if(result.respCode != SUCCESS)
            {
                this.$notify.error({title: '错误',message: result.respMsg});
            }
fukai committed
36 37
        },
        exit(){
fukai committed
38 39 40 41
            this.$history.push("/home")
        },
        getVM(){
            return this.$pntvm
fukai committed
42 43 44 45 46
        }
    }
}
</script>
<style>
liuxin committed
47 48
.bus-button {
  text-align: center;
fukai committed
49 50
}
</style>