This commit is contained in:
Vinjor 2024-10-24 15:06:24 +08:00
parent ab53c2c1ba
commit 0c9005bc07
2 changed files with 72 additions and 10 deletions

View File

@ -12,7 +12,8 @@
</view>
<image style="width: 48rpx;height: 48rpx" src="/static/icons/more.png" mode="aspectFita"></image>
</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>
<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="orderCountItem">
<text class="label">维修中</text>
<text class="value">4</text>
<text class="value">{{ bossNum.workingNum }}</text>
</view>
<view class="line"></view>
<view class="orderCountItem">
<text class="label">已完成</text>
<text class="value">6</text>
<text class="value">{{ bossNum.doneNum }}</text>
</view>
</view>
<view class="todoListBox">
@ -157,6 +158,11 @@ export default {
},
//
serviceNum:0,
//
bossNum:{
workingNum:0,
doneNum:0
},
defaultAvatar: require('@/static/icons/avatar.png')
}
},
@ -186,6 +192,9 @@ export default {
}else if(this.userInfo.roleCodes.includes('service_advisor')){
//
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
}
})
},
/**
* 服务顾问的角度查待处理的配件申请单数量
*/

View File

@ -13,6 +13,7 @@
<view class="flagBody">
<text>{{ ticketInfo.ticketsStatus == '02' ? '已完成' : ticketInfo.statusStr }}</text>
<text class="flagDesc" v-if="nowRepair.repairItemId">当前工单维修项目{{ nowRepair.itemName }}</text>
<text class="flagDesc" v-if="ticketInfo.nowRepairName">当前处理人{{ ticketInfo.nowRepairName }}</text>
</view>
</template>
</view>
@ -424,15 +425,40 @@ export default {
}else if("done"==this.nowChooseOperate){
//
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()
uni.showToast({
title: '操作成功',
icon: 'none'
})
if("done"==this.nowChooseOperate){
//
if("done"==this.nowChooseOperate || "check"==this.nowChooseOperate){
//|
setTimeout(() => {
uni.navigateBack()
},500)
@ -445,8 +471,6 @@ export default {
})
},500)
}
console.error("result",result);
} catch (error) {
console.error(error);
}
@ -459,6 +483,15 @@ export default {
if(this.loginUser.roleCodes.includes("service_advisor")){
//
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")){
//
@ -467,6 +500,12 @@ export default {
if(this.loginUser.roleCodes.includes("general_inspection")){
//
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")){
//
@ -508,8 +547,8 @@ export default {
console.log(e)
this.content[e.index].active = !e.item.active
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.$refs.popup.open("bottom")
}else if("start" == e.item.code){