修改按钮权限和展示
This commit is contained in:
parent
091f3f7665
commit
04881395b4
@ -41,18 +41,22 @@
|
||||
<el-table-column label="手机号" align="center" prop="userMobile" width="180"/>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
<!-- 都有 -->
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
|
||||
>查看
|
||||
</el-button>
|
||||
<!-- 维修工才有 -->
|
||||
<el-button
|
||||
v-if="(scope.row.ticketsWorkStatus === '01' && userRole === 'repair_staff') && nowUser.id === scope.row.nowRepairId"
|
||||
size="mini" type="text" icon="el-icon-check" @click="handleTake(scope.row)">
|
||||
接单
|
||||
</el-button>
|
||||
<!-- 服务顾问才有 -->
|
||||
<el-button v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '01'" size="mini"
|
||||
type="text" icon="el-icon-check" @click="handleNotify(scope.row)">
|
||||
通知施工
|
||||
</el-button>
|
||||
<!-- 服务顾问、总检、班组长才有 -->
|
||||
<el-button v-if="(userRole !== 'repair_staff' && scope.row.ticketsWorkStatus !== '01') || (userRole === 'repair_staff' && leader && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus !== '04')" @click="handleReTake(scope.row)" size="mini" type="text" icon="el-icon-refresh"
|
||||
>{{ userRole === 'general_inspection' ? "内返派工" : "修改派工" }}
|
||||
</el-button>
|
||||
@ -60,27 +64,39 @@
|
||||
@command="(command) => handleCommand(command, scope.$index, scope.row)">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<!-- 权限控制 -->
|
||||
<el-dropdown-item command="handleRemove" size="mini" type="text" icon="el-icon-remove" v-hasPermi="['repair:tkm:remove']">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<!-- 权限控制 -->
|
||||
<el-dropdown-item command="handleVoid" v-hasPermi="['repair:tkm:void']" size="mini" type="text" icon="el-icon-delete">
|
||||
作废
|
||||
</el-dropdown-item>
|
||||
<!-- 权限控制 -->
|
||||
<el-dropdown-item command="handleEditTicket" v-hasPermi="['repair:tkm:edit']" size="mini" type="text" icon="el-icon-setting">
|
||||
编辑工单
|
||||
</el-dropdown-item>
|
||||
<!-- 权限控制 -->
|
||||
<el-dropdown-item command="handleEditRecord" size="mini" type="text" icon="el-icon-refresh" v-hasPermi="['repair:tkm:editRecord']">
|
||||
维修记录设置
|
||||
</el-dropdown-item>
|
||||
<!-- 权限控制 -->
|
||||
<el-dropdown-item command="handleProgress" size="mini" type="text" icon="el-icon-s-operation" v-hasPermi="['repair:tkm:progress']">
|
||||
维修项目进度
|
||||
</el-dropdown-item>
|
||||
<!-- 维修工才有 -->
|
||||
<el-dropdown-item command="handleGet" size="mini" type="text" icon="el-icon-document-add" v-if="userRole === 'repair_staff'">
|
||||
申请配件
|
||||
</el-dropdown-item>
|
||||
<!-- 维修工才有 -->
|
||||
<el-dropdown-item command="handleRecordOne" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'repair_staff' && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus === '04'">
|
||||
开始施工
|
||||
</el-dropdown-item>
|
||||
<!-- 维修工才有 -->
|
||||
<el-dropdown-item command="handleRecordTwo" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'repair_staff' && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus === '04'">
|
||||
过程记录
|
||||
</el-dropdown-item>
|
||||
<!-- 维修工才有 -->
|
||||
<el-dropdown-item command="handleRecordThree" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'repair_staff' && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus === '04'">
|
||||
施工完成
|
||||
</el-dropdown-item>
|
||||
@ -174,9 +190,6 @@ export default {
|
||||
name: "TicketManagerItem",
|
||||
components: {EditTickets, RecordSetting, UpdateRecord, TWOperate, UpdateRepair, TicketsShow},
|
||||
props: {
|
||||
isFinish: {
|
||||
type: Boolean,
|
||||
},
|
||||
userRole: {
|
||||
type: String,
|
||||
default: '',
|
||||
@ -193,7 +206,7 @@ export default {
|
||||
pageSize: 10,
|
||||
ticketNo: null,
|
||||
searchTimeArray: [],
|
||||
isFinish: this.isFinish ? "1" : "0",
|
||||
selectType: this.isType
|
||||
},
|
||||
showSearch: true,
|
||||
loading: false,
|
||||
@ -234,9 +247,6 @@ export default {
|
||||
},
|
||||
async listTickets() {
|
||||
try {
|
||||
if (this.userRole === 'general_inspection' && this.queryParams.isFinish !== '1'){
|
||||
this.queryParams['selectType'] = 'all'
|
||||
}
|
||||
this.loading = true
|
||||
const res = await getPageType(this.queryParams)
|
||||
if (res.data) {
|
||||
|
25
src/views/repair/tickets/Components/TicketProgress.vue
Normal file
25
src/views/repair/tickets/Components/TicketProgress.vue
Normal file
@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "TicketProgress",
|
||||
data(){
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async open(id){
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
@ -1,11 +1,14 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="activeTab">
|
||||
<el-tab-pane label="待完成工单" name="unFinish">
|
||||
<TicketManagerItem :is-finish="false" :user-role="userRole"/>
|
||||
<el-tab-pane label="全部工单" name="finish">
|
||||
<TicketManagerItem :is-type="'all'" :user-role="userRole"/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="已完成工单" name="finish">
|
||||
<TicketManagerItem :is-finish="true" :user-role="userRole"/>
|
||||
<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"/>
|
||||
@ -16,12 +19,6 @@
|
||||
<el-tab-pane label="退料确认" name="finishBackWares" v-if="userRole === 'repair_staff'">
|
||||
<GetAndBackWares :type="false" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :label="userRole === 'service_advisor' ? '可交车工单' : '待总检工单'" name="unInspection" v-if="userRole !== 'repair_staff'">
|
||||
<TicketFinishManager :user-role="userRole" />
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="退料申请单" name="backApply">-->
|
||||
<!-- <TicketWares :type="false" :user-role="userRole"/>-->
|
||||
<!-- </el-tab-pane>-->
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
@ -38,7 +35,7 @@ export default {
|
||||
components: {TicketFinishManager, GetAndBackWares, TicketWares, TicketManagerItem},
|
||||
data() {
|
||||
return {
|
||||
activeTab: 'unFinish',
|
||||
activeTab: 'finish',
|
||||
userRole: "",
|
||||
exportRole:[3, 4]
|
||||
}
|
||||
|
@ -41,24 +41,36 @@
|
||||
<el-table-column label="手机号" align="center" prop="userMobile" width="180"/>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="200">
|
||||
<template slot-scope="scope">
|
||||
<!-- 都有 -->
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
|
||||
>查看
|
||||
</el-button>
|
||||
<el-button @click="handleEdit(scope.row)" v-if="userRole === 'service_advisor'" size="mini" type="text" icon="el-icon-setting">
|
||||
编辑工单
|
||||
</el-button>
|
||||
<el-button v-if="userRole === 'service_advisor'" size="mini" type="text" icon="el-icon-refresh" @click="handleEditRecord(scope.row)">
|
||||
维修记录设置
|
||||
</el-button>
|
||||
<el-button v-if="!(userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '03')" size="mini" type="text" icon="el-icon-edit-outline" @click="handleDispose(scope.row)">
|
||||
<!-- 能查到数据就能处理 -->
|
||||
<el-button v-if="scope.row.ticketsWorkStatus !== '03'" size="mini" type="text" icon="el-icon-edit-outline" @click="handleDispose(scope.row)">
|
||||
处理
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh" v-if="scope.row.ticketsWorkStatus !== '03'" @click="handleReTake(scope.row)">
|
||||
<el-dropdown
|
||||
@command="(command) => handleCommand(command, scope.$index, scope.row)">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<!-- 能查到就可以操作 -->
|
||||
<el-dropdown-item command="handleReTake" size="mini" type="text" icon="el-icon-refresh">
|
||||
{{userRole === 'service_advisor' ? "修改派工" : "内返派工"}}
|
||||
</el-button>
|
||||
<el-button size="mini" @click="noticeCus(scope.row)" type="text" icon="el-icon-finished" v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '03'">
|
||||
</el-dropdown-item>
|
||||
<!-- 权限控制 -->
|
||||
<el-dropdown-item command="handleEdit" size="mini" type="text" icon="el-icon-setting" v-hasPermi="['repair:tkm:edit']">
|
||||
编辑工单
|
||||
</el-dropdown-item>
|
||||
<!-- 权限控制 -->
|
||||
<el-dropdown-item command="handleEditRecord" size="mini" type="text" icon="el-icon-refresh" v-hasPermi="['repair:tkm:editRecord']">
|
||||
维修记录设置
|
||||
</el-dropdown-item>
|
||||
<!-- 服务顾问才有 -->
|
||||
<el-dropdown-item command="noticeCus" type="text" icon="el-icon-finished" v-if="userRole === 'service_advisor' && scope.row.ticketsWorkStatus === '03'">
|
||||
通知客户取车
|
||||
</el-button>
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -296,6 +308,22 @@ export default {
|
||||
handleEditRecord(row){
|
||||
this.$refs.recordSet.open(row.id)
|
||||
},
|
||||
handleCommand(command, index, row){
|
||||
switch (command){
|
||||
case 'handleReTake':
|
||||
this.handleReTake(row)
|
||||
break
|
||||
case 'handleEdit':
|
||||
this.handleEdit(row)
|
||||
break
|
||||
case 'handleEditRecord':
|
||||
this.handleEditRecord(row)
|
||||
break
|
||||
case 'noticeCus':
|
||||
this.noticeCus(row)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user