李旭东
2023-11-03 a07b4b6ff1c98dcf81338bb45d59308db7c058a9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<template>
  <div class="main">
    <div class="main_tabs">
      <el-tabs v-model="activeName" @tab-click="handleClick">
            <el-tab-pane label="库存管理" name="first">
                <mixing-invent ref="inventm"></mixing-invent> 
            </el-tab-pane>
            <el-tab-pane label="入库记录" name="second">
                <mixing-income ref="incomem"></mixing-income>
            </el-tab-pane>
            <el-tab-pane label="消耗记录" name="third">
                <mixing-cost ref="costsm"></mixing-cost>
            </el-tab-pane>
            <el-tab-pane label="校正记录" name="four">
                <mixing-check ref="checkm"></mixing-check>
            </el-tab-pane>
            <el-tab-pane label="原料实际放量" name="five">
                <real-raw ref="realRaws"></real-raw>
            </el-tab-pane>
            <el-tab-pane label="搅拌站消耗" name="six">
                <mixing-expend ref="expendm"></mixing-expend>
            </el-tab-pane>
        </el-tabs>
    </div>
  </div>
</template>
<script>
import MixingInvent from './components/MixingInvent.vue'//库存管理
import MixingIncome from './components/MixingIncome.vue'//入库记录
import MixingCost from './components/MixingCost.vue'//消耗记录
import MixingCheck from './components/MixingCheck.vue'//校正记录
import RealRaw from './components/RealRaw.vue'//原料实际放量
import MixingExpend from './components/MixingExpend.vue'//搅拌站消耗
export default {
    components:{
        MixingInvent,
        MixingIncome,
        MixingCost,
        MixingCheck,
        RealRaw,
        MixingExpend
    },
    data(){
        return{
            activeName:'first'
        }
    },
    mounted(){
        this.$refs.inventm.searchButtonInfo(true);
        this.$refs.inventm.getDictNames()
    },
    methods:{
        //切换界面
        handleClick(tab){
            switch(tab.name){
                case 'second':
                    this.$refs.incomem.searchButtonInfo(true);
                    this.$refs.incomem.getDictNames()
                    break;
                case 'third':
                    this.$refs.costsm.searchButtonInfo(true);
                    this.$refs.costsm.getDictNames()
                    this.$refs.costsm.getAllProjects()
                    break;
                case 'four':
                    this.$refs.checkm.searchButtonInfo(true);
                    this.$refs.checkm.getDictNames()
                    break;
                case 'five':
                    this.$refs.realRaws.setFormProps();
                    this.$refs.realRaws.getLists();
                    this.$refs.realRaws.getMaterialNames();
                    break;
                case 'six':
                    this.$refs.expendm.searchButtonInfo(true);
                    break;
                default:
                    this.$refs.inventm.searchButtonInfo(true);
            }
        },
    }
}
</script>
<style scoped lang="scss">
@import'@/style/layout-main.scss';
/deep/ .el-tabs__content{
    position: static;
}
 
/deep/.main {
  background: none;
}
</style>