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