服务顾问只能编辑除配件外的工单信息,仓库只能编辑配件信息(isFinish=0)
This commit is contained in:
parent
c2fbaeb2fa
commit
12916957f6
@ -39,7 +39,7 @@
|
||||
<el-table-column label="车牌号" align="center" prop="carNo" width="180"/>
|
||||
<el-table-column label="车系" align="center" prop="carBrandName" 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" v-if="userRole !== 'repair_warehouse'">
|
||||
<template slot-scope="scope">
|
||||
<!-- 都有 -->
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
|
||||
@ -104,6 +104,16 @@
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="200" v-if="userRole === 'repair_warehouse'">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
|
||||
>查看
|
||||
</el-button>
|
||||
<el-button v-hasPermi="['repair:tkm:edit']" size="mini" type="text" icon="el-icon-setting" @click="handleEditTicket(scope.row)">
|
||||
编辑工单
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs v-model="activeTab">
|
||||
<el-tabs v-model="activeTab" v-if="userRole !== 'repair_warehouse'">
|
||||
<el-tab-pane label="全部工单" name="finish">
|
||||
<TicketManagerItem :is-type="'all'" :user-role="userRole"/>
|
||||
</el-tab-pane>
|
||||
@ -20,6 +20,11 @@
|
||||
<GetAndBackWares :type="false" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-tabs v-model="activeTab" v-if="userRole === 'repair_warehouse'">
|
||||
<el-tab-pane label="未结束工单" name="finish">
|
||||
<TicketManagerItem :is-type="'waiting'" :user-role="userRole"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -162,7 +162,7 @@
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<el-card class="box-card" v-if="userRole !== 'repair_warehouse'">
|
||||
<!-- 卡片头 -->
|
||||
<div slot="header" class="clearfix">
|
||||
<i class="el-icon-plus"/>
|
||||
@ -178,13 +178,13 @@
|
||||
<TicketItemShow :is-edit="true" :list="projects" list-type="project" @remove="handleRemove" @success="open"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<el-card class="box-card" v-if="!(userRole === 'service_advisor')">
|
||||
<!-- 卡片头 -->
|
||||
<div slot="header" class="clearfix">
|
||||
<i class="el-icon-plus"/>
|
||||
<span>配件信息</span>
|
||||
<div style="float: right; padding: 3px 0">
|
||||
<el-switch v-if="wares.length > 0"
|
||||
<el-switch v-if="wares.length > 0 && userRole !== 'repair_warehouse'"
|
||||
v-model="info.partShow"
|
||||
active-text="客户可见"
|
||||
inactive-text="客户不可见"
|
||||
@ -203,7 +203,7 @@
|
||||
<TicketItemShow :is-edit="true" :list="wares" list-type="ware" @remove="handleRemove" @success="open"/>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="box-card">
|
||||
<el-card class="box-card" v-if="userRole !== 'repair_warehouse'">
|
||||
<!-- 卡片头 -->
|
||||
<div slot="header" class="clearfix">
|
||||
<i class="el-icon-plus"/>
|
||||
@ -290,7 +290,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getTicketsById, updateShow, addItems, updateTicket} from "@/api/repair/tickets/Tickets";
|
||||
import {getTicketsById, updateShow, addItems, updateTicket, getUserRole} from "@/api/repair/tickets/Tickets";
|
||||
import {removeItemById} from "@/api/repair/tickets/TicketsItem";
|
||||
import TicketItemShow from "@/views/repair/tickets/Components/TicketItemShow.vue";
|
||||
import other from "@/views/repair/other/index.vue";
|
||||
@ -333,6 +333,7 @@ export default {
|
||||
threePackMoney: 0,
|
||||
confirmFaultMoney: 0,
|
||||
},
|
||||
userRole: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -348,10 +349,16 @@ export default {
|
||||
this.wares = data.filter(item => item.ware)
|
||||
this.others = data.filter(item => item.other)
|
||||
this.info = res.data
|
||||
await this.judgeUserRole()
|
||||
} finally {
|
||||
this.loadingInstance.close()
|
||||
}
|
||||
},
|
||||
// 获得当前登录用户的角色信息
|
||||
async judgeUserRole(){
|
||||
const res = await getUserRole()
|
||||
this.userRole = res.data
|
||||
},
|
||||
async changeShow(){
|
||||
try {
|
||||
await updateShow(this.info.id, this.info.partShow)
|
||||
|
Loading…
Reference in New Issue
Block a user