Commit 3ddb854c227bdada6aeb15a4d331a194c2db0d8a

Authored by 刘淇
1 parent d9752a1e

全域巡查员

pages-sub/problem/regional-order-manage/add-patrol-order.vue
@@ -352,9 +352,11 @@ const submitWorkOrder = async () => { @@ -352,9 +352,11 @@ const submitWorkOrder = async () => {
352 reason: '重新提交工单', 352 reason: '重新提交工单',
353 ...commonSubmitData 353 ...commonSubmitData
354 } 354 }
355 - res = await qyUniversalApproval(renewSubmitData) 355 + if (userStore.userInfo?.roles.includes('patrol_global')) { // 全域巡查员
  356 + await qyUniversalApproval(renewSubmitData)
  357 + }
356 } else { 358 } else {
357 - res = await qyWorkorderCreate(commonSubmitData) 359 + await qyWorkorderCreate(commonSubmitData)
358 } 360 }
359 361
360 uni.hideLoading() 362 uni.hideLoading()
pages-sub/problem/regional-order-manage/index.vue
@@ -101,6 +101,7 @@ @@ -101,6 +101,7 @@
101 <view class="u-line-1 u-body-value">{{ timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view> 101 <view class="u-line-1 u-body-value">{{ timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
102 </view> 102 </view>
103 <!-- 操作按钮行 --> 103 <!-- 操作按钮行 -->
  104 +
104 <view class="u-body-item u-flex common-justify-between common-item-center mt-20"> 105 <view class="u-body-item u-flex common-justify-between common-item-center mt-20">
105 <up-button type="warning" size="mini" @click="handleReject(item)" 106 <up-button type="warning" size="mini" @click="handleReject(item)"
106 v-show="nextStepMap[item.taskKey].backShow">回退 107 v-show="nextStepMap[item.taskKey].backShow">回退
@@ -379,6 +380,7 @@ const queryList = async (pageNo, pageSize) =&gt; { @@ -379,6 +380,7 @@ const queryList = async (pageNo, pageSize) =&gt; {
379 // ========== 事件处理 ========== 380 // ========== 事件处理 ==========
380 // 标签页切换 381 // 标签页切换
381 const handleTabChange = (item) => { 382 const handleTabChange = (item) => {
  383 + orderList.value = [];
382 console.log(item) 384 console.log(item)
383 activeTab.value = item.index; 385 activeTab.value = item.index;
384 paging.value?.reload(); // 切换标签页刷新列表 386 paging.value?.reload(); // 切换标签页刷新列表
@@ -490,36 +492,15 @@ const handleProcess = async (item) =&gt; { @@ -490,36 +492,15 @@ const handleProcess = async (item) =&gt; {
490 paging.value?.reload(); // 刷新列表 492 paging.value?.reload(); // 刷新列表
491 } 493 }
492 494
493 - if (nextStepMap[item.taskKey]?.name == '养护员待实施') {  
494 - // ① 生成唯一临时key(和重新提交工单逻辑一致,避免冲突)  
495 - const tempKey = `maintain_order_${Date.now()}_${Math.floor(Math.random() * 10000)}`;  
496 - // ② 存储完整item到本地缓存(同步存储,确保立即生效)  
497 - try {  
498 - uni.setStorageSync(tempKey, item);  
499 - } catch (error) {  
500 - console.error('存储养护工单数据失败:', error);  
501 - uni.showToast({title: '数据存储异常,无法跳转', icon: 'none'});  
502 - return;  
503 - }  
504 - // ③ URL仅传递临时key(可选:携带必要简单参数,方便目标页面快速使用)  
505 - uni.navigateTo({  
506 - url: `/pages-sub/problem/regional-order-manage/add-maintain-order?tempKey=${tempKey}`  
507 - })  
508 - }  
509 - // 养护组长验收 - 打开弹窗  
510 - if (nextStepMap[item.taskKey]?.name == '养护组长验收') {  
511 - currentAcceptItem.value = item; // 存储当前工单信息  
512 - acceptReason.value = ''; // 清空上次的验收原因  
513 - acceptRadioValue.value = '0'; // 重置默认选中“通过”  
514 - acceptModalShow.value = true; // 显示验收弹窗  
515 - }  
516 - // 巡查员验收 - 打开弹窗  
517 - if (nextStepMap[item.taskKey]?.name == '巡查员验收') { 495 +
  496 + // 验收 - 打开弹窗
  497 + if (nextStepMap[item.taskKey]?.name == '巡查员验收' || nextStepMap[item.taskKey]?.name == '养护组长验收') {
518 currentAcceptItem.value = item; // 存储当前工单信息 498 currentAcceptItem.value = item; // 存储当前工单信息
519 acceptReason.value = ''; // 清空上次的验收原因 499 acceptReason.value = ''; // 清空上次的验收原因
520 acceptRadioValue.value = '0'; // 重置默认选中“通过” 500 acceptRadioValue.value = '0'; // 重置默认选中“通过”
521 acceptModalShow.value = true; // 显示验收弹窗 501 acceptModalShow.value = true; // 显示验收弹窗
522 } 502 }
  503 +
523 // 发起人确认 504 // 发起人确认
524 if (nextStepMap[item.taskKey]?.name == '发起人确认') { 505 if (nextStepMap[item.taskKey]?.name == '发起人确认') {
525 console.log(item) 506 console.log(item)
pages-sub/problem/work-order-manage/index.vue
@@ -375,6 +375,7 @@ const queryList = async (pageNo, pageSize) =&gt; { @@ -375,6 +375,7 @@ const queryList = async (pageNo, pageSize) =&gt; {
375 // ========== 事件处理 ========== 375 // ========== 事件处理 ==========
376 // 标签页切换 376 // 标签页切换
377 const handleTabChange = (item) => { 377 const handleTabChange = (item) => {
  378 + orderList.value = [];
378 console.log(item) 379 console.log(item)
379 activeTab.value = item.index; 380 activeTab.value = item.index;
380 paging.value?.reload(); // 切换标签页刷新列表 381 paging.value?.reload(); // 切换标签页刷新列表