From 4fa8cf1240ee3948c9e8e08feaa3ee8426820f51 Mon Sep 17 00:00:00 2001
From: liugongyu <290219706@qq.com>
Date: Tue, 23 Dec 2025 13:24:36 +0800
Subject: [PATCH] 巡查员结束工单
---
common/utils/common.js | 25 +++++++++++++++++++++++++
pages-sub/daily/maintain-manage/add-record.vue | 2 +-
pages-sub/daily/patrol-manage/add-patrol-record.vue | 2 +-
pages-sub/daily/quick-order/add-order.vue | 2 +-
pages-sub/problem/work-order-manage/add-maintain-order.vue | 2 +-
pages-sub/problem/work-order-manage/add-order.vue | 2 +-
pages-sub/problem/work-order-manage/index.vue | 52 ++++++++++++++++++++++++++++++----------------------
pages-sub/problem/work-order-manage/order-detail.vue | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------
8 files changed, 134 insertions(+), 75 deletions(-)
diff --git a/common/utils/common.js b/common/utils/common.js
index 62c134e..c01980e 100644
--- a/common/utils/common.js
+++ b/common/utils/common.js
@@ -40,4 +40,29 @@ export const nextStepMap = {
backShow: false,
renewShow: true
},
+}
+
+// ylTeamLeader 养护组长退回:210
+// ylTeamLeader 养护组长分配:110
+// ylInspectorStart 巡查员结束工单:200
+// ylInspectorStart 巡查员重新发起:100
+// ylWorker 养护员退回 :220
+// ylWorker 养护员实施 :120
+// ylTeamLeaderConfirm 养护组长验收通过: 130
+// ylTeamLeaderConfirm 养护组长验收不通过:230
+// ylInspector 巡查员验收通过:140
+// ylInspector 巡查员验收不通过:240
+
+export const buzStatusMap = {
+ '000' :'巡查员发起',
+ "210" : '养护组长退回',
+ "110" : '养护组长分配',
+ "200" : '巡查员结束工单',
+ "100" : '巡查员重新发起',
+ "220" : '养护员退回',
+ "120" : '养护员实施',
+ "130" : '养护组长验收通过',
+ "230" : '养护组长验收不通过',
+ "140" : '巡查员验收通过',
+ "240" : '巡查员验收不通过',
}
\ No newline at end of file
diff --git a/pages-sub/daily/maintain-manage/add-record.vue b/pages-sub/daily/maintain-manage/add-record.vue
index 21dd307..ab44627 100644
--- a/pages-sub/daily/maintain-manage/add-record.vue
+++ b/pages-sub/daily/maintain-manage/add-record.vue
@@ -302,7 +302,7 @@ export default {
})
setTimeout(() => {
- uni.redirectTo({
+ uni.reLaunch({
url: '/pages-sub/daily/maintain-manage/index'
})
}, 1000)
diff --git a/pages-sub/daily/patrol-manage/add-patrol-record.vue b/pages-sub/daily/patrol-manage/add-patrol-record.vue
index 5a184d9..0610b23 100644
--- a/pages-sub/daily/patrol-manage/add-patrol-record.vue
+++ b/pages-sub/daily/patrol-manage/add-patrol-record.vue
@@ -291,7 +291,7 @@ export default {
// // 延迟跳转(等待提示框显示完成)
setTimeout(() => {
- uni.redirectTo({
+ uni.reLaunch({
url: '/pages-sub/daily/patrol-manage/index'
})
}, 1000)
diff --git a/pages-sub/daily/quick-order/add-order.vue b/pages-sub/daily/quick-order/add-order.vue
index 8a27550..7be7796 100644
--- a/pages-sub/daily/quick-order/add-order.vue
+++ b/pages-sub/daily/quick-order/add-order.vue
@@ -476,7 +476,7 @@ export default {
// 延迟跳转(等待提示框显示完成)
setTimeout(() => {
- uni.redirectTo({
+ uni.reLaunch({
url: '/pages-sub/daily/quick-order/index'
})
}, 1000)
diff --git a/pages-sub/problem/work-order-manage/add-maintain-order.vue b/pages-sub/problem/work-order-manage/add-maintain-order.vue
index c0e3e87..838609c 100644
--- a/pages-sub/problem/work-order-manage/add-maintain-order.vue
+++ b/pages-sub/problem/work-order-manage/add-maintain-order.vue
@@ -770,7 +770,7 @@ const submitWorkOrder = async () => {
// 延迟跳转
setTimeout(() => {
- uni.redirectTo({
+ uni.reLaunch({
url: '/pages-sub/problem/work-order-manage/index'
})
}, 1000)
diff --git a/pages-sub/problem/work-order-manage/add-order.vue b/pages-sub/problem/work-order-manage/add-order.vue
index 4822219..d257d82 100644
--- a/pages-sub/problem/work-order-manage/add-order.vue
+++ b/pages-sub/problem/work-order-manage/add-order.vue
@@ -552,7 +552,7 @@ const submitWorkOrder = async () => {
// 延迟跳转回列表页
setTimeout(() => {
- uni.redirectTo({
+ uni.reLaunch({
url: '/pages-sub/problem/work-order-manage/index'
})
}, 1000)
diff --git a/pages-sub/problem/work-order-manage/index.vue b/pages-sub/problem/work-order-manage/index.vue
index df913ca..faf2ebc 100644
--- a/pages-sub/problem/work-order-manage/index.vue
+++ b/pages-sub/problem/work-order-manage/index.vue
@@ -92,6 +92,10 @@
+ 工单状态:
+ {{buzStatusMap[item.buzStatus] }}
+
+
提交时间:
{{ timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}
@@ -153,6 +157,10 @@
+ 工单状态:
+ {{buzStatusMap[item.buzStatus] }}
+
+
提交时间:
{{ timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}
@@ -189,23 +197,23 @@
maxlength="200"
class="reject-textarea"
/>
-
-
- 上传图片(选填)
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
{
const requestData = {
"returnImgs": rejectImgs.getSuccessImgUrls(), // 改造后:获取上传成功的图片URL
"workerDataId": item.id,
- "taskKey": item.taskKey,
+ "taskKey":'ylInspectorStart',
"taskId": item.taskId,
- "operateType": nextStepMap[item.taskKey].operateTypeNoPass,
+ "operateType": 200,
"agree": 1,
"reason": '结束工单'
};
@@ -546,7 +554,7 @@ const handleAddOrder = () => {
});
};
-// ========== 新增:养护组长验收弹窗事件 ==========
+// ========== 验收弹窗事件 ==========
// 验收弹窗 - 确定按钮(含表单校验)
const handleAcceptModalConfirm = async () => {
// 1. 校验验收原因是否为空
@@ -565,19 +573,19 @@ const handleAcceptModalConfirm = async () => {
let postData = {}
if (currentAcceptItem.value?.taskKey == 'ylTeamLeaderConfirm') { // 养护组长验收
postData = {
- "taskKey": "ylTeamLeaderConfirm",
+ "taskKey": currentAcceptItem.value.taskKey, // ylTeamLeaderConfirm
"workerDataId": currentAcceptItem.value.id,
"taskId": currentAcceptItem.value.taskId,
- "operateType": acceptRadioValue.value == 0 ? nextStepMap['ylTeamLeaderConfirm'].operateTypePass : nextStepMap['ylTeamLeaderConfirm'].operateTypeNoPass,
+ "operateType": acceptRadioValue.value == 0 ? nextStepMap[currentAcceptItem.value.taskKey].operateTypePass : nextStepMap[currentAcceptItem.value.taskKey].operateTypeNoPass,
"reason": acceptReason.value.trim()
}
}
if (currentAcceptItem.value?.taskKey == 'ylInspector') { // 巡查员验收
postData = {
- "taskKey": "ylTeamLeaderConfirm",
+ "taskKey": currentAcceptItem.value.taskKey, //ylInspector
"taskId": currentAcceptItem.value.taskId,
"workerDataId": currentAcceptItem.value.id,
- "operateType": acceptRadioValue.value == 0 ? nextStepMap['ylTeamLeaderConfirm'].operateTypePass : nextStepMap['ylTeamLeaderConfirm'].operateTypeNoPass,
+ "operateType": acceptRadioValue.value == 0 ? nextStepMap[currentAcceptItem.value.taskKey].operateTypePass : nextStepMap[currentAcceptItem.value.taskKey].operateTypeNoPass,
"reason": acceptReason.value.trim(),
"agree": acceptRadioValue.value
}
diff --git a/pages-sub/problem/work-order-manage/order-detail.vue b/pages-sub/problem/work-order-manage/order-detail.vue
index faa4513..abab96b 100644
--- a/pages-sub/problem/work-order-manage/order-detail.vue
+++ b/pages-sub/problem/work-order-manage/order-detail.vue
@@ -43,7 +43,14 @@
-
+
+
+ 工单名称
+
+
+ {{ orderDetail.orderName || '--' }}
+
+
@@ -107,6 +114,13 @@
align="middle"
:border="false"
>
+
+
@@ -117,7 +131,7 @@
共同处理人
- {{ orderDetail.coHandlersName || '--' }}
+ {{ orderDetail.coHandlersName.join(',') || '--' }}
@@ -158,49 +172,52 @@
inactive-color="#999"
class="vertical-steps"
>
-
-
-
-
-
-
- {{ item.name }}
-
- {{ item.tasks && item.tasks[0]?.assigneeUser?.nickname ? '(' + item.tasks[0].assigneeUser.nickname + ')' : '(未知操作人)' }}
-
-
-
-
-
-
-
- 处理时间:{{ timeFormat(item.startTime, 'yyyy-mm-dd hh:MM:ss') }}
- - {{ timeFormat(item.endTime, 'yyyy-mm-dd hh:MM:ss') }}
- (处理中)
-
-
-
- 描述:{{ getLimitReason(item.tasks && item.tasks[0]?.reason) }}
+
+
+
+
+
+
+
+ {{ item.name }}
+
+ {{ item.tasks && item.tasks[0]?.assigneeUser?.nickname ? '(' + item.tasks[0].assigneeUser.nickname + ')' : '(未知操作人)' }}
+
+
+
+
+
+
+
+ 处理时间:{{ timeFormat(item.startTime, 'yyyy-mm-dd hh:MM:ss') }}
+ - {{ timeFormat(item.endTime, 'yyyy-mm-dd hh:MM:ss') }}
+ (处理中)
+
+
+
+ 描述:{{ getLimitReason(item.tasks && item.tasks[0]?.reason) }}
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
-
+
@@ -257,7 +274,12 @@ const activeTopTabClick = async (item: any) => {
console.log(res)
// 关键:格式化数据,补充up-steps要求的title字段
if (res && res.activityNodes && res.activityNodes.length) {
- const formatActivityNodes = res.activityNodes.map(node => ({
+ // 1. 先过滤:剔除 name 为 "结束" 的节点
+ const filteredActivityNodes = res.activityNodes.filter(node => {
+ // 返回 true 保留节点,返回 false 剔除节点
+ return node.name !== '结束';
+ });
+ const formatActivityNodes = filteredActivityNodes.map(node => ({
...node,
title: node.name // 补充强制字段,满足3.3.48版本组件要求
}));
@@ -367,11 +389,15 @@ const getCurrentStepIndex = () => {
const { activityNodes } = processData.value;
if (!activityNodes || !activityNodes.length) return 0;
+ // item.tasks && item.tasks[0]?.assigneeUser?.nickname
// 1. 查找第一个状态为1(处理中)的节点,即为当前步骤
- const processingNodeIndex = activityNodes.findIndex(node => node.status === 1);
- if (processingNodeIndex !== -1) {
- return processingNodeIndex;
- }
+ // const processingNodeIndex = activityNodes.findIndex(node => node.name === '结束');
+ // console.log(processingNodeIndex)
+ // if (processingNodeIndex !== -1) {
+ // return activityNodes.length - 2
+ // }else{
+ // return activityNodes.length - 1
+ // }
// 2. 若没有处理中的节点(全部已完成),则激活最后一个节点
return activityNodes.length - 1;
--
libgit2 0.21.4