张晓波
2023-09-19 164694c47c35d6654df69b533e8dbf8b5423efc5
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
<template>
  <div class="main">
    <div class="main_tabs">
      <el-tabs v-model="activeName" @tab-click="handleClick">
            <el-tab-pane label="库存管理" name="first">
                <auxiliary-invent ref="Invent"></auxiliary-invent> 
            </el-tab-pane>
            <el-tab-pane label="入库记录" name="second">
                <auxiliary-income ref="Income"></auxiliary-income>
            </el-tab-pane>
            <el-tab-pane label="出库记录" name="third">
                <auxiliary-cost ref="Costs"></auxiliary-cost>
            </el-tab-pane>
            <el-tab-pane label="校正记录" name="fourth">
                <auxiliary-check ref="checks"></auxiliary-check>
            </el-tab-pane>
            <el-tab-pane label="辅材种类" name="five">
                <auxiliary-type ref="Auxiliary"></auxiliary-type>
            </el-tab-pane>
        </el-tabs>
    </div>
  </div>
</template>
<script>
import AuxiliaryInvent from './components/AuxiliaryInvent.vue'//库存管理
import AuxiliaryIncome from './components/AuxiliaryIncome.vue'//入库记录
import AuxiliaryCost from './components/AuxiliaryCost.vue'//出库记录
import AuxiliaryCheck from './components/AuxiliaryCheck.vue'//校正记录
import AuxiliaryType from './components/AuxiliaryType.vue'//辅材种类
export default {
    components:{
        AuxiliaryInvent,
        AuxiliaryIncome,
        AuxiliaryCost,
        AuxiliaryCheck,
        AuxiliaryType
    },
    data(){
        return{
            activeName:'first'
        }
    },
    mounted(){
        this.$refs.Invent.searchButtonInfo(true);
    },
    methods:{
        //切换界面
        handleClick(tab){
            switch(tab.name){
                case 'second':
                    this.$refs.Income.searchButtonInfo(true);
                    this.$refs.Income.getNameList()
                    break;
                case 'third':
                    this.$refs.Costs.searchButtonInfo(true);
                    this.$refs.Costs.getNameList()
                    break;
                case 'fourth':
                    this.$refs.checks.searchButtonInfo(true);
                    break;
                case 'five':
                    this.$refs.Auxiliary.searchButtonInfo(true);
                    this.$refs.Auxiliary.getAllTypes();
                    break;
                default:
                    this.$refs.Invent.searchButtonInfo(true);
            }
        },
    }
}
</script>
<style scoped lang="scss">
@import'@/style/layout-main.scss';
/deep/ .el-tabs__content{
    position: static;
}
 
/deep/.main {
  background: none;
}
</style>