Bläddra i källkod

fix: 修复表单重置后检查主管和整改期限未正确重置的问题

修复问题审批页面按钮显示逻辑,增加部门经理级别
优化待办列表复选框显示逻辑,移除部门检查相关条件
huoyi 2 månader sedan
förälder
incheckning
ff04d5dd0b
3 ändrade filer med 38 tillägg och 21 borttagningar
  1. 18 0
      src/pages/checklist/index.vue
  2. 18 19
      src/pages/myToDoList/index.vue
  3. 2 2
      src/pages/problemRect/index.vue

+ 18 - 0
src/pages/checklist/index.vue

@@ -403,6 +403,24 @@ export default {
403 403
             this.formData.channelName = '';
404 404
             this.formData.channelCode = '';
405 405
 
406
+            // 如果被检查主管有值,重新执行handlecheckedDepartmentIdChange
407
+            if (this.formData.checkedDepartmentId) {
408
+                this.handlecheckedDepartmentIdChange({
409
+                    detail: {
410
+                        value: [{
411
+                            text: this.formData.checkedDepartmentName,
412
+                            value: this.formData.checkedDepartmentId
413
+                        }]
414
+                    }
415
+                });
416
+            }
417
+
418
+            // 重新赋值整改期限(当前时间加4天)
419
+            const currentDate = new Date();
420
+            currentDate.setDate(currentDate.getDate() + 4);
421
+            const fourDaysLater = currentDate.toISOString().replace('T', ' ').substring(0, 19);
422
+            this.formData.rectificationDeadline = fourDaysLater;
423
+
406 424
             console.log('表单已清空,可以继续提交新数据');
407 425
         },
408 426
         // 检查地点选择

+ 18 - 19
src/pages/myToDoList/index.vue

@@ -11,8 +11,7 @@
11 11
                 <u-checkbox-group class="checkbox-group">
12 12
                     <list-card v-for="item in filteredList" :key="item.id" :showChecked="true"
13 13
                         @click="navigateToDetail(item)">
14
-                        <template #checkbox
15
-                            v-if="canShowCheckbox(item)">
14
+                        <template #checkbox v-if="canShowCheckbox(item)">
16 15
                             <u-checkbox style="margin-top: 6rpx;" :checked="item.checked" :key="item.id"
17 16
                                 @change="itemChange(item)" />
18 17
                         </template>
@@ -111,7 +110,7 @@
111 110
 import HomeContainer from "@/components/HomeContainer.vue";
112 111
 import HTabs from "@/components/h-tabs/h-tabs.vue";
113 112
 import { listCheckApprovalCcDetails, listCheckPendingTasks, listCheckFinishedTasks, updateCheckApprovalCcDetails } from "@/api/myToDoList/myToDoList.js"
114
-import { approvePassBatch, approveRejectBatch,rectifyApprovePass,rectifyApproveReject } from "@/api/approve/approve.js";
113
+import { approvePassBatch, approveRejectBatch, rectifyApprovePass, rectifyApproveReject } from "@/api/approve/approve.js";
115 114
 import { showMessageTabRedDot } from "@/utils/common.js"
116 115
 export default {
117 116
     components: { HomeContainer, HTabs },
@@ -168,11 +167,10 @@ export default {
168 167
     methods: {
169 168
         // 判断是否显示复选框的条件
170 169
         canShowCheckbox(item) {
171
-      
172
-            return ((item.instance && item.instance.businessType === 'SEIZURE_REPORT') || 
173
-                   (item.instance && item.instance.businessType === 'DEPARTMENT_CHECK' && 
174
-                    this.userInfoRoles.includes('jingli'))) && 
175
-                   this.currentTab === 'todo';
170
+            //    (item.instance && item.instance.businessType === 'DEPARTMENT_CHECK' && 
171
+            //     this.userInfoRoles.includes('jingli'))
172
+            return (item.instance && item.instance.businessType === 'SEIZURE_REPORT') &&
173
+                this.currentTab === 'todo';
176 174
         },
177 175
 
178 176
         // 根据任务类型分组
@@ -183,10 +181,11 @@ export default {
183 181
             selectedItems.forEach(item => {
184 182
                 if (item.instance && item.instance.businessType === 'SEIZURE_REPORT') {
185 183
                     seizureTaskIds.push(item.id);
186
-                } else if (item.instance && item.instance.businessType === 'DEPARTMENT_CHECK' && 
187
-                          this.userInfoRoles.includes('jingli')) {
188
-                    departmentTaskIds.push(item.id);
189
-                }
184
+                } 
185
+                // else if (item.instance && item.instance.businessType === 'DEPARTMENT_CHECK' &&
186
+                //     this.userInfoRoles.includes('jingli')) {
187
+                //     departmentTaskIds.push(item.id);
188
+                // }
190 189
             });
191 190
 
192 191
             return { seizureTaskIds, departmentTaskIds };
@@ -370,13 +369,13 @@ export default {
370 369
 
371 370
                 // 分别调用不同的驳回接口
372 371
                 const promises = [];
373
-                
372
+
374 373
                 if (seizureTaskIds.length > 0) {
375 374
                     promises.push(approveRejectBatch(seizureTaskIds));
376 375
                 }
377
-                
376
+
378 377
                 if (departmentTaskIds.length > 0) {
379
-                    promises.push(rectifyApproveReject({taskIdList: departmentTaskIds}));
378
+                    promises.push(rectifyApproveReject({ taskIdList: departmentTaskIds, comment: '审批驳回' }));
380 379
                 }
381 380
 
382 381
                 // 等待所有接口调用完成
@@ -420,15 +419,15 @@ export default {
420 419
 
421 420
                 // 分别调用不同的通过接口
422 421
                 const promises = [];
423
-                
422
+
424 423
                 if (seizureTaskIds.length > 0) {
425 424
                     promises.push(approvePassBatch(seizureTaskIds));
426 425
                 }
427
-                
426
+
428 427
                 if (departmentTaskIds.length > 0) {
429
-                    promises.push(rectifyApprovePass({ taskIdList: departmentTaskIds }));
428
+                    promises.push(rectifyApprovePass({ taskIdList: departmentTaskIds, comment: '审批通过' }));
430 429
                 }
431
-debugger
430
+
432 431
                 // 等待所有接口调用完成
433 432
                 await Promise.all(promises);
434 433
 

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 2 - 2
src/pages/problemRect/index.vue