59 lines
2.0 KiB
Vue
59 lines
2.0 KiB
Vue
<template>
|
|
<div class="app-container">
|
|
<el-tabs v-model="activeTab">
|
|
<el-tab-pane label="全部工单" name="finish">
|
|
<TicketManagerItem :is-type="'all'" :user-role="userRole"/>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="待处理工单" name="unFinish" v-if="userRole === 'repair_staff'">
|
|
<TicketManagerItem :is-type="'waiting'" :user-role="userRole"/>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="待处理工单" name="unInspection" v-if="userRole !== 'repair_staff'">
|
|
<TicketFinishManager :user-role="userRole" />
|
|
</el-tab-pane>
|
|
<el-tab-pane label="配件申请单" name="getApply" v-if="userRole !== 'repair_staff'">
|
|
<TicketWares :type="true" :user-role="userRole"/>
|
|
</el-tab-pane>
|
|
<el-tab-pane name="finishGetWares" label="领料确认" v-if="userRole === 'repair_staff'">
|
|
<GetAndBackWares :type="true" />
|
|
</el-tab-pane>
|
|
<el-tab-pane label="退料确认" name="finishBackWares" v-if="userRole === 'repair_staff'">
|
|
<GetAndBackWares :type="false" />
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import TicketManagerItem from "@/views/repair/tickets/Components/TicketManagerItem.vue";
|
|
import {getUserRole} from "@/api/repair/tickets/Tickets";
|
|
import TicketWares from "@/views/repair/tickets/Components/TicketWares.vue";
|
|
import GetAndBackWares from "@/views/repair/tickets/form/GetAndBackWares.vue";
|
|
import TicketFinishManager from "@/views/repair/tickets/form/TicketFinishManager.vue";
|
|
|
|
export default {
|
|
name: "TicketManager",
|
|
components: {TicketFinishManager, GetAndBackWares, TicketWares, TicketManagerItem},
|
|
data() {
|
|
return {
|
|
activeTab: 'finish',
|
|
userRole: "",
|
|
exportRole:[3, 4]
|
|
}
|
|
},
|
|
created() {
|
|
this.judgeUserRole()
|
|
},
|
|
methods: {
|
|
// 获得当前登录用户的角色信息
|
|
async judgeUserRole(){
|
|
const res = await getUserRole()
|
|
this.userRole = res.data
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
|
|
</style>
|