Просмотр исходного кода

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

修复问题审批页面按钮显示逻辑,增加部门经理级别
优化待办列表复选框显示逻辑,移除部门检查相关条件
huoyi месяцев назад: 2
Родитель
Сommit
ff04d5dd0b
3 измененных файлов с 38 добавлено и 21 удалено
  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
             this.formData.channelName = '';
403
             this.formData.channelName = '';
404
             this.formData.channelCode = '';
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
             console.log('表单已清空,可以继续提交新数据');
424
             console.log('表单已清空,可以继续提交新数据');
407
         },
425
         },
408
         // 检查地点选择
426
         // 检查地点选择

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

@@ -11,8 +11,7 @@
11
                 <u-checkbox-group class="checkbox-group">
11
                 <u-checkbox-group class="checkbox-group">
12
                     <list-card v-for="item in filteredList" :key="item.id" :showChecked="true"
12
                     <list-card v-for="item in filteredList" :key="item.id" :showChecked="true"
13
                         @click="navigateToDetail(item)">
13
                         @click="navigateToDetail(item)">
14
-                        <template #checkbox
15
-                            v-if="canShowCheckbox(item)">
14
+                        <template #checkbox v-if="canShowCheckbox(item)">
16
                             <u-checkbox style="margin-top: 6rpx;" :checked="item.checked" :key="item.id"
15
                             <u-checkbox style="margin-top: 6rpx;" :checked="item.checked" :key="item.id"
17
                                 @change="itemChange(item)" />
16
                                 @change="itemChange(item)" />
18
                         </template>
17
                         </template>
@@ -111,7 +110,7 @@
111
 import HomeContainer from "@/components/HomeContainer.vue";
110
 import HomeContainer from "@/components/HomeContainer.vue";
112
 import HTabs from "@/components/h-tabs/h-tabs.vue";
111
 import HTabs from "@/components/h-tabs/h-tabs.vue";
113
 import { listCheckApprovalCcDetails, listCheckPendingTasks, listCheckFinishedTasks, updateCheckApprovalCcDetails } from "@/api/myToDoList/myToDoList.js"
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
 import { showMessageTabRedDot } from "@/utils/common.js"
114
 import { showMessageTabRedDot } from "@/utils/common.js"
116
 export default {
115
 export default {
117
     components: { HomeContainer, HTabs },
116
     components: { HomeContainer, HTabs },
@@ -168,11 +167,10 @@ export default {
168
     methods: {
167
     methods: {
169
         // 判断是否显示复选框的条件
168
         // 判断是否显示复选框的条件
170
         canShowCheckbox(item) {
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
             selectedItems.forEach(item => {
181
             selectedItems.forEach(item => {
184
                 if (item.instance && item.instance.businessType === 'SEIZURE_REPORT') {
182
                 if (item.instance && item.instance.businessType === 'SEIZURE_REPORT') {
185
                     seizureTaskIds.push(item.id);
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
             return { seizureTaskIds, departmentTaskIds };
191
             return { seizureTaskIds, departmentTaskIds };
@@ -370,13 +369,13 @@ export default {
370
 
369
 
371
                 // 分别调用不同的驳回接口
370
                 // 分别调用不同的驳回接口
372
                 const promises = [];
371
                 const promises = [];
373
-                
372
+
374
                 if (seizureTaskIds.length > 0) {
373
                 if (seizureTaskIds.length > 0) {
375
                     promises.push(approveRejectBatch(seizureTaskIds));
374
                     promises.push(approveRejectBatch(seizureTaskIds));
376
                 }
375
                 }
377
-                
376
+
378
                 if (departmentTaskIds.length > 0) {
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
                 const promises = [];
421
                 const promises = [];
423
-                
422
+
424
                 if (seizureTaskIds.length > 0) {
423
                 if (seizureTaskIds.length > 0) {
425
                     promises.push(approvePassBatch(seizureTaskIds));
424
                     promises.push(approvePassBatch(seizureTaskIds));
426
                 }
425
                 }
427
-                
426
+
428
                 if (departmentTaskIds.length > 0) {
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
                 await Promise.all(promises);
432
                 await Promise.all(promises);
434
 
433
 

Разница между файлами не показана из-за своего большого размера
+ 2 - 2
src/pages/problemRect/index.vue