1
This commit is contained in:
parent
ab53c2c1ba
commit
0c9005bc07
@ -12,7 +12,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<image style="width: 48rpx;height: 48rpx" src="/static/icons/more.png" mode="aspectFita"></image>
|
<image style="width: 48rpx;height: 48rpx" src="/static/icons/more.png" mode="aspectFita"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="body-top-grid">
|
<!-- 服务顾问才能开单-->
|
||||||
|
<view class="body-top-grid" v-if="userInfo.roleCodes.includes('service_advisor')">
|
||||||
<view v-for="(item, index) in menuList" :key="index" class="body-top-item" @click="gotoPage(item)">
|
<view v-for="(item, index) in menuList" :key="index" class="body-top-item" @click="gotoPage(item)">
|
||||||
<view>
|
<view>
|
||||||
<view class="title">{{ item.title }}</view>
|
<view class="title">{{ item.title }}</view>
|
||||||
@ -64,12 +65,12 @@
|
|||||||
<view class="orderCount" v-if="userInfo.roleCodes.includes('general_inspection') || userInfo.roleCodes.includes('weixiu')">
|
<view class="orderCount" v-if="userInfo.roleCodes.includes('general_inspection') || userInfo.roleCodes.includes('weixiu')">
|
||||||
<view class="orderCountItem">
|
<view class="orderCountItem">
|
||||||
<text class="label">维修中</text>
|
<text class="label">维修中</text>
|
||||||
<text class="value">4</text>
|
<text class="value">{{ bossNum.workingNum }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
<view class="orderCountItem">
|
<view class="orderCountItem">
|
||||||
<text class="label">已完成</text>
|
<text class="label">已完成</text>
|
||||||
<text class="value">6</text>
|
<text class="value">{{ bossNum.doneNum }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="todoListBox">
|
<view class="todoListBox">
|
||||||
@ -157,6 +158,11 @@ export default {
|
|||||||
},
|
},
|
||||||
//服务顾问待处理数量
|
//服务顾问待处理数量
|
||||||
serviceNum:0,
|
serviceNum:0,
|
||||||
|
//总检查看维修中、已完成的工单数量
|
||||||
|
bossNum:{
|
||||||
|
workingNum:0,
|
||||||
|
doneNum:0
|
||||||
|
},
|
||||||
defaultAvatar: require('@/static/icons/avatar.png')
|
defaultAvatar: require('@/static/icons/avatar.png')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -186,6 +192,9 @@ export default {
|
|||||||
}else if(this.userInfo.roleCodes.includes('service_advisor')){
|
}else if(this.userInfo.roleCodes.includes('service_advisor')){
|
||||||
//服务顾问
|
//服务顾问
|
||||||
this.getServiceTodo()
|
this.getServiceTodo()
|
||||||
|
}else if(this.userInfo.roleCodes.includes('weixiu') ||this.userInfo.roleCodes.includes('general_inspection')){
|
||||||
|
//总检或管理员
|
||||||
|
this.getBossTodo()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -274,6 +283,20 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 从总检的角度差维修中、已完成的工单数量
|
||||||
|
*/
|
||||||
|
getBossTodo(){
|
||||||
|
request({
|
||||||
|
url: '/admin-api/repair/tickets/getBossNum',
|
||||||
|
method: 'get',
|
||||||
|
}).then((res) => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.bossNum = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 服务顾问的角度查待处理的配件申请单数量
|
* 服务顾问的角度查待处理的配件申请单数量
|
||||||
*/
|
*/
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
<view class="flagBody">
|
<view class="flagBody">
|
||||||
<text>{{ ticketInfo.ticketsStatus == '02' ? '已完成' : ticketInfo.statusStr }}</text>
|
<text>{{ ticketInfo.ticketsStatus == '02' ? '已完成' : ticketInfo.statusStr }}</text>
|
||||||
<text class="flagDesc" v-if="nowRepair.repairItemId">当前工单维修项目:{{ nowRepair.itemName }}</text>
|
<text class="flagDesc" v-if="nowRepair.repairItemId">当前工单维修项目:{{ nowRepair.itemName }}</text>
|
||||||
|
<text class="flagDesc" v-if="ticketInfo.nowRepairName">当前处理人:{{ ticketInfo.nowRepairName }}</text>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
@ -424,15 +425,40 @@ export default {
|
|||||||
}else if("done"==this.nowChooseOperate){
|
}else if("done"==this.nowChooseOperate){
|
||||||
//移交总检
|
//移交总检
|
||||||
const result = await saveTicketsRecords(this.ticketInfo.id, '03',this.nowRepair.repairItemId,"03","sgwczj","维修完成移交总检",fileStr,"02","");
|
const result = await saveTicketsRecords(this.ticketInfo.id, '03',this.nowRepair.repairItemId,"03","sgwczj","维修完成移交总检",fileStr,"02","");
|
||||||
//
|
}else if("check"==this.nowChooseOperate){
|
||||||
|
//总检拍照
|
||||||
|
let dataObj = {
|
||||||
|
id: this.ticketInfo.id,
|
||||||
|
remark: "车辆总检",
|
||||||
|
image: fileStr
|
||||||
|
}
|
||||||
|
request({
|
||||||
|
url: '/admin-api/repair/tickets/inspection',
|
||||||
|
method: 'POST',
|
||||||
|
data:dataObj
|
||||||
|
}).then((res) => {
|
||||||
|
})
|
||||||
|
}else if("out"==this.nowChooseOperate){
|
||||||
|
//出厂检验
|
||||||
|
let dataObj = {
|
||||||
|
id: this.ticketInfo.id,
|
||||||
|
remark: "车辆出厂检验",
|
||||||
|
image: fileStr
|
||||||
|
}
|
||||||
|
request({
|
||||||
|
url: '/admin-api/repair/tickets/confirm',
|
||||||
|
method: 'POST',
|
||||||
|
data:dataObj
|
||||||
|
}).then((res) => {
|
||||||
|
})
|
||||||
}
|
}
|
||||||
this.$refs.popup.close()
|
this.$refs.popup.close()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '操作成功',
|
title: '操作成功',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
if("done"==this.nowChooseOperate){
|
if("done"==this.nowChooseOperate || "check"==this.nowChooseOperate){
|
||||||
//移交总检需要返回
|
//移交总检需要返回| 总检拍照后需要返回
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
},500)
|
},500)
|
||||||
@ -445,8 +471,6 @@ export default {
|
|||||||
})
|
})
|
||||||
},500)
|
},500)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.error("result",result);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
@ -459,6 +483,15 @@ export default {
|
|||||||
if(this.loginUser.roleCodes.includes("service_advisor")){
|
if(this.loginUser.roleCodes.includes("service_advisor")){
|
||||||
//服务顾问
|
//服务顾问
|
||||||
this.canOpenCus = true
|
this.canOpenCus = true
|
||||||
|
if(this.ticketInfo.nowRepairId==this.loginUser.id && "05"==this.ticketInfo.ticketsStatus){
|
||||||
|
//当前用户就是处理人,可以进行出厂检验 和通知客户取车
|
||||||
|
this.content.push({
|
||||||
|
text: '出厂检验', active: false,code:"out"
|
||||||
|
})
|
||||||
|
this.content.push({
|
||||||
|
text: '通知取车', active: false,code:"callCus"
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(this.loginUser.roleCodes.includes("weixiu")){
|
if(this.loginUser.roleCodes.includes("weixiu")){
|
||||||
//维修管理员
|
//维修管理员
|
||||||
@ -467,6 +500,12 @@ export default {
|
|||||||
if(this.loginUser.roleCodes.includes("general_inspection")){
|
if(this.loginUser.roleCodes.includes("general_inspection")){
|
||||||
//维修总检
|
//维修总检
|
||||||
this.canOpenCus = true
|
this.canOpenCus = true
|
||||||
|
if(this.ticketInfo.nowRepairId==this.loginUser.id && "05"==this.ticketInfo.ticketsStatus){
|
||||||
|
//当前用户就是处理人,可以进行总检拍照
|
||||||
|
this.content.push({
|
||||||
|
text: '总检拍照', active: false,code:"check"
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(this.loginUser.roleCodes.includes("repair_staff")){
|
if(this.loginUser.roleCodes.includes("repair_staff")){
|
||||||
//维修工角色
|
//维修工角色
|
||||||
@ -508,8 +547,8 @@ export default {
|
|||||||
console.log(e)
|
console.log(e)
|
||||||
this.content[e.index].active = !e.item.active
|
this.content[e.index].active = !e.item.active
|
||||||
this.nowChooseOperate = e.item.code
|
this.nowChooseOperate = e.item.code
|
||||||
if("working"==e.item.code || "done_half"==e.item.code || "done"==e.item.code || "other"==e.item.code){
|
if("working"==e.item.code || "done_half"==e.item.code || "done"==e.item.code || "other"==e.item.code || "check"==e.item.code || "out"==e.item.code){
|
||||||
//维修过程中拍照上传、阶段完成、移交其他班组、移交总检
|
//维修过程中拍照上传、阶段完成、移交其他班组、移交总检、出厂检验
|
||||||
this.fileList=[]
|
this.fileList=[]
|
||||||
this.$refs.popup.open("bottom")
|
this.$refs.popup.open("bottom")
|
||||||
}else if("start" == e.item.code){
|
}else if("start" == e.item.code){
|
||||||
|
Loading…
Reference in New Issue
Block a user