张晓波
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">
                <invent-manage ref="invent"></invent-manage> 
            </el-tab-pane>
            <el-tab-pane label="入库记录" name="second">
                <income-record ref="income"></income-record>
            </el-tab-pane>
            <el-tab-pane label="消耗记录" name="third">
                <cost-record ref="costs"></cost-record>
            </el-tab-pane>
            <el-tab-pane label="校正记录" name="fourth">
                <check-record ref="checks"></check-record>
            </el-tab-pane>
            <el-tab-pane label="钢筋类型" name="five">
                <rebar-type ref="rebar"></rebar-type>
            </el-tab-pane>
        </el-tabs>
    </div>
  </div>
</template>
<script>
import InventManage from './components/InventManage.vue'//库存管理
import IncomeRecord from './components/IncomeRecord.vue'//入库记录
import CostRecord from './components/CostRecord.vue'//消耗记录
import CheckRecord from './components/CheckRecord.vue'//校正记录
import RebarType from './components/RebarType.vue'//钢筋类型
export default {
    components:{
        InventManage,
        IncomeRecord,
        CostRecord,
        CheckRecord,
        RebarType
    },
    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);
                    this.$refs.checks.getNameList()
                    break;
                case 'five':
                    this.$refs.rebar.searchButtonInfo(true);
                    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>