瀏覽代碼

修改合同撤回之后无法提交的bug,新增删除流程同时删除数据的功能

余思翰 11 月之前
父節點
當前提交
7f7aaa9d15

+ 1632
- 1142
oa-back/sql/cmc_oa(小余测试数据).sql
文件差異過大導致無法顯示
查看文件


+ 6
- 0
oa-ui/src/api/oa/contract/contractComment.js 查看文件

@@ -1,3 +1,9 @@
1
+/*
2
+ * @Author: ysh
3
+ * @Date: 2024-03-18 09:05:41
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-06-13 17:03:49
6
+ */
1 7
 import request from '@/utils/request'
2 8
 
3 9
 // 查询cmc合同意见列表

+ 1
- 1
oa-ui/src/components/FileUpload/index.vue 查看文件

@@ -50,7 +50,7 @@ export default {
50 50
     // 大小限制(MB)
51 51
     fileSize: {
52 52
       type: Number,
53
-      default: 5,
53
+      default: 50,
54 54
     },
55 55
     // 文件类型, 例如['png', 'jpg', 'jpeg']
56 56
     fileType: {

+ 38
- 0
oa-ui/src/utils/deleteResource.js 查看文件

@@ -0,0 +1,38 @@
1
+import request from '@/utils/request'
2
+
3
+const apiEndpoints = [
4
+  {
5
+    procDefName: '承接合同评审',
6
+    apiUrl: [
7
+      '/oa/contract/:id',
8
+      '/oa/contractComment/:id',
9
+      '/oa/contractMeeting/:id',
10
+      '/oa/contractPayment/:id',
11
+    ]
12
+  }
13
+]
14
+
15
+// 编写一个方法来处理删除请求,并同时发送所有API请求  
16
+export async function deleteResources(procDefName, id) {  
17
+  // 查找对应的API端点  
18
+  const endpoint = apiEndpoints.find(endpoint => endpoint.procDefName === procDefName);  
19
+  if (!endpoint) {  
20
+    throw new Error(`No API endpoints found for process definition: ${procDefName}`);  
21
+  }  
22
+    
23
+  // 构建所有请求的Promise数组  
24
+  const deletePromises = endpoint.apiUrl.map(apiUrl => {  
25
+    // 替换URL中的:id占位符  
26
+    const url = apiUrl.replace(':id', id);  
27
+    // 发送DELETE请求并返回Promise  
28
+    return request.delete(url)  
29
+  });  
30
+    
31
+  // 等待所有请求完成  
32
+  try {  
33
+    return await Promise.all(deletePromises);  
34
+    console.log('删除完成!');  
35
+  } catch (error) {  
36
+    console.error('One or more deletion requests failed:', error);  
37
+  }  
38
+} 

+ 0
- 1
oa-ui/src/views/file/filesProject/achievement.vue 查看文件

@@ -559,7 +559,6 @@ export default {
559 559
         return delAchievement(this.ids);
560 560
       }).then(() => {
561 561
         this.getAchiList();
562
-        debugger
563 562
         this.ids = [];
564 563
         this.$modal.msgSuccess("删除成功");
565 564
       }).catch(() => { });

+ 27
- 24
oa-ui/src/views/flowable/form/budget/addBudget.vue 查看文件

@@ -2,14 +2,13 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-25 15:05:59
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-06-12 16:03:19
5
+ * @LastEditTime: 2024-06-13 15:53:25
6 6
 -->
7 7
 <template>
8 8
   <div>
9 9
     <div>
10
-        <el-alert v-if="reBackDescription != ''" title="预算被退回" type="warning" show-icon
11
-          :description="reBackDescription">
12
-        </el-alert>
10
+      <el-alert v-if="reBackDescription != ''" title="预算被退回" type="warning" show-icon :description="reBackDescription">
11
+      </el-alert>
13 12
       <div class="header">
14 13
         <div class="title">
15 14
           <div class="title-text">新增预算</div>
@@ -39,10 +38,10 @@
39 38
             </el-form-item>
40 39
             <el-form-item label="项目负责人:" prop="projectLeader">
41 40
               {{
42
-          projectForm.projectLeaderUser
43
-            ? projectForm.projectLeaderUser.nickName
44
-            : ""
45
-        }}
41
+        projectForm.projectLeaderUser
42
+          ? projectForm.projectLeaderUser.nickName
43
+          : ""
44
+      }}
46 45
             </el-form-item>
47 46
             <el-form-item label="项目类型:" prop="projectType">
48 47
               {{ projectForm.projectType }}
@@ -80,7 +79,7 @@
80 79
               </table>
81 80
             </el-form-item>
82 81
             <el-form-item label="甲方单位:">
83
-              {{ projectForm.partyA }}
82
+              {{ projectForm.partyA ? projectForm.partyA.partyAName : '' }}
84 83
             </el-form-item>
85 84
             <el-form-item label="联系人:">
86 85
               {{ projectForm.contactPerson }}
@@ -107,8 +106,8 @@
107 106
             <el-breadcrumb-item>{{ projectForm.projectNumber }}</el-breadcrumb-item>
108 107
             <el-breadcrumb-item>{{ projectForm.projectName }}</el-breadcrumb-item>
109 108
             <el-breadcrumb-item>{{ projectForm.projectLeaderUser
110
-          ? projectForm.projectLeaderUser.nickName
111
-          : "" }}</el-breadcrumb-item>
109
+        ? projectForm.projectLeaderUser.nickName
110
+        : "" }}</el-breadcrumb-item>
112 111
           </el-breadcrumb>
113 112
           <el-form ref="form2" :model="peopleForm" style="padding: 20px 100px 0">
114 113
             <!-- 选择人员 -->
@@ -252,8 +251,8 @@
252 251
             <el-breadcrumb-item>{{ projectForm.projectNumber }}</el-breadcrumb-item>
253 252
             <el-breadcrumb-item>{{ projectForm.projectName }}</el-breadcrumb-item>
254 253
             <el-breadcrumb-item>{{ projectForm.projectLeaderUser
255
-          ? projectForm.projectLeaderUser.nickName
256
-          : "" }}</el-breadcrumb-item>
254
+        ? projectForm.projectLeaderUser.nickName
255
+        : "" }}</el-breadcrumb-item>
257 256
           </el-breadcrumb>
258 257
           <el-breadcrumb separator-class="el-icon-arrow-right" style="margin: 15px 0">
259 258
             <el-breadcrumb-item>间接成本小计</el-breadcrumb-item>
@@ -352,8 +351,8 @@
352 351
             <el-breadcrumb-item>{{ projectForm.projectNumber }}</el-breadcrumb-item>
353 352
             <el-breadcrumb-item>{{ projectForm.projectName }}</el-breadcrumb-item>
354 353
             <el-breadcrumb-item>{{ projectForm.projectLeaderUser
355
-          ? projectForm.projectLeaderUser.nickName
356
-          : "" }}</el-breadcrumb-item>
354
+        ? projectForm.projectLeaderUser.nickName
355
+        : "" }}</el-breadcrumb-item>
357 356
           </el-breadcrumb>
358 357
           <el-breadcrumb separator-class="el-icon-arrow-right" style="margin: 15px 0">
359 358
             <el-breadcrumb-item>间接成本小计</el-breadcrumb-item>
@@ -374,7 +373,7 @@
374 373
         <div class="btn">
375 374
           <el-button @click="activeStep -= 1" :disabled="activeStep == 0 || activeStep == 4">上一步</el-button>
376 375
           <el-button @click="confirmStep" type="primary" v-if="activeStep < 4">下一步</el-button>
377
-          <el-button @click="submitComplete" type="primary" v-if="activeStep == 4">完成</el-button>
376
+          <el-button @click="submitComplete" type="primary" v-if="activeStep == 4">提交流程</el-button>
378 377
         </div>
379 378
       </div>
380 379
 
@@ -552,8 +551,11 @@ export default {
552 551
     getAlter() {
553 552
       const params = { procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }
554 553
       flowRecordFull(params).then(res => {
555
-        if(res.data.flowList)
556
-          this.reBackDescription = res.data.flowList[1].comment.type + ':' + res.data.flowList[1].comment.comment
554
+        if (res.data.flowList) {
555
+          if (res.data.flowList.length > 1 && res.data.flowList[1].comment && res.data.flowList[1].comment.type == '退回意见') {
556
+            this.reBackDescription = res.data.flowList[1].comment.type + ':' + res.data.flowList[1].comment.comment
557
+          }
558
+        }
557 559
       })
558 560
     },
559 561
     // 初始化预算表,先从后台查询是否有数据
@@ -570,8 +572,10 @@ export default {
570 572
             listBudgetStaff({ budgetId }),
571 573
           ]);
572 574
         }
573
-      }).then(([response1, response2, response3, response4]) => {
574
-        if (response1.rows) {
575
+        return Promise.resolve([])
576
+      }).then(responses => {
577
+        const [response1 = null, response2 = null, response3 = null, response4 = null] = responses;
578
+        if (response1 && response1.rows) {
575 579
           this.chooseCar = response1.rows
576 580
           for (let car of this.chooseCar) {
577 581
             car.licensePlate = car.car.licensePlate
@@ -579,7 +583,7 @@ export default {
579 583
             car.brand = car.car.brand
580 584
           }
581 585
         }
582
-        if (response2.rows) {
586
+        if (response2 && response2.rows) {
583 587
           this.chooseDevice = response2.rows;
584 588
           for (let device of this.chooseDevice) {
585 589
             device.brand = device.device.brand
@@ -588,10 +592,10 @@ export default {
588 592
             device.series = device.device.series
589 593
           }
590 594
         }
591
-        if (response3.rows) {
595
+        if (response3 && response3.rows) {
592 596
           this.contentList = response3.rows;
593 597
         }
594
-        if (response4.rows) {
598
+        if (response4 && response4.rows) {
595 599
           this.chooseUser = response4.rows;
596 600
           for (let user of this.chooseUser) {
597 601
             user.nickName = this.getUserName(user.userId)
@@ -773,7 +777,6 @@ export default {
773 777
       updateBudget(form);
774 778
       delBudgetStaff(form.budgetId).then(res => {
775 779
         for (let user of form.chooseUser) {
776
-
777 780
           addBudgetStaff(user);
778 781
         }
779 782
       });

+ 46
- 32
oa-ui/src/views/flowable/form/budget/budgetInfo.vue 查看文件

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-04-03 16:28:09
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-06-12 18:26:04
5
+ * @LastEditTime: 2024-06-13 13:50:24
6 6
 -->
7 7
 <template>
8 8
   <div class="main">
@@ -374,11 +374,11 @@
374 374
 </template>
375 375
 
376 376
 <script>
377
-import { listBudget,updateBudget } from "@/api/oa/budget/budget";
378
-import { listBudgetCar,updateBudgetCar } from "@/api/oa/budget/budgetCar";
379
-import { listBudgetDevice,updateBudgetDevice } from "@/api/oa/budget/budgetDevice";
380
-import { listBudgetSettle,updateBudgetSettle } from "@/api/oa/budget/budgetSettle";
381
-import { listBudgetStaff,updateBudgetStaff } from "@/api/oa/budget/budgetStaff";
377
+import { listBudget, updateBudget } from "@/api/oa/budget/budget";
378
+import { listBudgetCar, updateBudgetCar } from "@/api/oa/budget/budgetCar";
379
+import { listBudgetDevice, updateBudgetDevice } from "@/api/oa/budget/budgetDevice";
380
+import { listBudgetSettle, updateBudgetSettle } from "@/api/oa/budget/budgetSettle";
381
+import { listBudgetStaff, updateBudgetStaff } from "@/api/oa/budget/budgetStaff";
382 382
 import { listProjectWork } from "@/api/oa/project/projectWork";
383 383
 import { mapGetters } from 'vuex';
384 384
 import { getProject } from "@/api/oa/project/project";
@@ -489,20 +489,20 @@ export default {
489 489
         this.workContentList = res.rows;
490 490
       })
491 491
     },
492
-    confirmSucess(taskName) {
492
+   confirmSucess(taskName) {
493 493
       const params = { taskId: this.taskForm.taskId };
494 494
       if (taskName == '预算审核') {
495 495
         this.updateBudgetForm();
496
-        // getNextFlowNode(params).then(res => {
497
-        //   getUsersManageLeader({ userId: this.budgetForm.compiler }).then(res => {
498
-        //     let userId = res.data.userId;
499
-        //     this.$set(this.taskForm.variables, "approval", userId);
500
-        //     complete(this.taskForm).then(response => {
501
-        //       this.$modal.msgSuccess(response.msg);
502
-        //       this.$emit("goBack");
503
-        //     });
504
-        //   });
505
-        // });
496
+        getNextFlowNode(params).then(res => {
497
+          getUsersManageLeader({ userId: this.budgetForm.compiler }).then(res => {
498
+            let userId = res.data.userId;
499
+            this.$set(this.taskForm.variables, "approval", userId);
500
+            complete(this.taskForm).then(response => {
501
+              this.$modal.msgSuccess(response.msg);
502
+              this.$emit("goBack");
503
+            });
504
+          });
505
+        });
506 506
       } else if (taskName == '预算批准') {
507 507
         getNextFlowNode(params).then(res => {
508 508
           complete(this.taskForm).then(response => {
@@ -513,24 +513,34 @@ export default {
513 513
       }
514 514
     },
515 515
     updateBudgetForm() {
516
-      console.log(this.budgetForm);
517
-      console.log(this.chooseUser);
518
-      console.log(this.chooseDevice);
519
-      console.log(this.chooseCar);
520
-      updateBudget(this.budgetForm);
521
-      for(let car of this.chooseCar){
522
-        updateBudgetCar(car)
523
-      }
524
-      for(let device of this.chooseDevice){
525
-        updateBudgetDevice(device)
526
-      }
527
-      for(let user of this.chooseUser){
528
-        updateBudgetStaff(user)
516
+      updateBudget(this.budgetForm).then(res => {
517
+        this.updateBudgetSubItem(this.chooseCar, updateBudgetCar);
518
+        this.updateBudgetSubItem(this.chooseDevice, updateBudgetDevice);
519
+        this.updateBudgetSubItem(this.chooseUser, updateBudgetStaff);
520
+        this.updateBudgetSubItem(this.workList, updateBudgetSettle, this.showSuccessMessage);
521
+      });
522
+    },
523
+    updateBudgetSubItem(items, updateFunction, onSuccess) {
524
+      // 假设所有更新都成功  
525
+      let allUpdatesSuccessful = true;
526
+      // 遍历项目数组,并对每个项目调用更新函数  
527
+      for (let item of items) {
528
+        try {
529
+          updateFunction(item);
530
+        } catch (error) {
531
+          // 如果有任何更新失败,设置标志并可能记录错误  
532
+          allUpdatesSuccessful = false;
533
+          console.error('更新失败:', error);
534
+        }
529 535
       }
530
-      for(let work of this.workList){
531
-        updateBudgetSettle(work)
536
+      // 如果所有更新都成功,调用onSuccess回调函数  
537
+      if (allUpdatesSuccessful && typeof onSuccess === 'function') {
538
+        onSuccess();
532 539
       }
533 540
     },
541
+    showSuccessMessage() {
542
+      this.$message.success('预算更新成功!')
543
+    },
534 544
     // 计算作业结算金额
535 545
     computeWorkSettle(work) {
536 546
       let workload = Number(work.workload);
@@ -538,6 +548,10 @@ export default {
538 548
       let coefficient = Number(work.coefficient);
539 549
       if (!isNaN(workload) && !isNaN(price) && !isNaN(coefficient)) {
540 550
         let result = workload * price * coefficient;
551
+        if (result < 600) {
552
+          result = 600
553
+          this.$message.warning('不足600,按600算')
554
+        }
541 555
         this.$set(work, 'settle', result.toFixed(2));
542 556
         this.computedSettleExpense();
543 557
         this.computedDirectExpense();

+ 137
- 69
oa-ui/src/views/flowable/form/business/contractForm.vue 查看文件

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-05-10 15:31:57
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-06-11 17:11:58
5
+ * @LastEditTime: 2024-06-13 16:12:41
6 6
 -->
7 7
 <template>
8 8
   <div class="app-container">
@@ -21,7 +21,8 @@
21 21
                     }}</el-descriptions-item>
22 22
                   <el-descriptions-item label="项目来源" label-class-name="my-label">{{ getProjectSource(chooseTender)
23 23
                     }}</el-descriptions-item>
24
-                  <el-descriptions-item label="招标业主" label-class-name="my-label">{{ chooseTender.partyA
24
+                  <el-descriptions-item label="招标业主" label-class-name="my-label">{{ chooseTender.partyA ?
25
+      chooseTender.partyA.partyAName : ''
25 26
                     }}</el-descriptions-item>
26 27
                   <el-descriptions-item label="联系人" label-class-name="my-label">{{ chooseTender.aPerson
27 28
                     }}</el-descriptions-item>
@@ -113,7 +114,8 @@
113 114
                   </el-select>
114 115
                 </td>
115 116
                 <td>
116
-                  <el-input-number :controls="false" style="width: 60px" v-model="work.workload" clearable :disabled="taskName != '合同拟稿'"></el-input-number>
117
+                  <el-input-number :controls="false" style="width: 60px" v-model="work.workload" clearable
118
+                    :disabled="taskName != '合同拟稿'"></el-input-number>
117 119
                 </td>
118 120
                 <td>
119 121
                   <el-date-picker style="width: 140px" v-model="work.deadline" value-format="yyyy-MM-dd" type="date"
@@ -148,16 +150,16 @@
148 150
                   {{ index + 1 }}
149 151
                 </td>
150 152
                 <td>
151
-                  <el-input v-model="payment.paymentCondition" type="textarea" clearable
152
-                    :autosize="{ minRows: 4 }" :disabled="taskName != '合同拟稿'"></el-input>
153
+                  <el-input v-model="payment.paymentCondition" type="textarea" clearable :autosize="{ minRows: 4 }"
154
+                    :disabled="taskName != '合同拟稿'"></el-input>
153 155
                 </td>
154 156
                 <td>
155 157
                   <el-input-number style="width:100px" :controls="false" v-model="payment.paymentPercentage" clearable
156 158
                     :disabled="taskName != '合同拟稿'" @change="calculatePaymentAmount(payment)"></el-input-number>
157 159
                 </td>
158 160
                 <td>
159
-                  <el-input-number style="width:150px" :controls="false" :precision="2" v-model="payment.paymentAmount" clearable
160
-                    :disabled="taskName != '合同拟稿'"></el-input-number>
161
+                  <el-input-number style="width:150px" :controls="false" :precision="2" v-model="payment.paymentAmount"
162
+                    clearable :disabled="taskName != '合同拟稿'"></el-input-number>
161 163
                 </td>
162 164
                 <td>
163 165
                   <el-date-picker style="width: 140px" v-model="payment.paymentTime" value-format="yyyy-MM-dd"
@@ -178,7 +180,8 @@
178 180
               :disabled="taskName != '合同拟稿'"></el-button>
179 181
           </el-form-item>
180 182
           <el-form-item label="合同备注" prop="remark">
181
-            <el-input v-model="form.remark" :autosize="{ minRows: 4 }" type="textarea" placeholder="请输入合同备注" :disabled="taskName != '合同拟稿'" />
183
+            <el-input v-model="form.remark" :autosize="{ minRows: 4 }" type="textarea" placeholder="请输入合同备注"
184
+              :disabled="taskName != '合同拟稿'" />
182 185
           </el-form-item>
183 186
           <el-row>
184 187
             <el-col :span="6" :xs="24" :offset="12">
@@ -268,8 +271,8 @@
268 271
                   <span> {{ comment.commentTime }} </span>
269 272
                 </td>
270 273
                 <td>
271
-                  <el-button type="danger" icon="el-icon-minus" size="mini" circle @click="deletCommentItem(index)"
272
-                    :disabled="taskName != '合同拟稿'"></el-button>
274
+                  <el-button type="text" style="color: #F56C6C;" size="mini" @click="deletCommentItem(index)"
275
+                    :disabled="taskName != '合同拟稿'">删除行</el-button>
273 276
                 </td>
274 277
               </tr>
275 278
             </table>
@@ -367,7 +370,8 @@
367 370
             </el-date-picker>
368 371
           </el-form-item>
369 372
           <el-form-item label="签订备注" prop="signRemark">
370
-            <el-input v-model="form.signRemark" type="textarea" :autosize="{ minRows: 4 }" placeholder="请输入签订备注" :disabled="taskName != '合同签订'" />
373
+            <el-input v-model="form.signRemark" type="textarea" :autosize="{ minRows: 4 }" placeholder="请输入签订备注"
374
+              :disabled="taskName != '合同签订'" />
371 375
           </el-form-item>
372 376
           <el-form-item label="签订扫描件" prop="signScan">
373 377
             <!-- <el-input v-model="form.signScan" placeholder="请输入签订扫描件" :disabled="taskName != '合同签订'" /> -->
@@ -430,8 +434,8 @@ import { listProject, getProject } from "@/api/oa/project/project";
430 434
 import { listDept } from '@/api/system/dept'
431 435
 import { listUser } from '@/api/system/user'
432 436
 import { listContract, getContract, delContract, addContract, updateContract } from "@/api/oa/contract/contract";
433
-import { listContractWork, addContractWork } from "@/api/oa/contract/contractWork";
434
-import { listContractPayment, addContractPayment } from "@/api/oa/contract/contractPayment";
437
+import { listContractWork, addContractWork, delContractWork } from "@/api/oa/contract/contractWork";
438
+import { listContractPayment, addContractPayment, delContractPayment } from "@/api/oa/contract/contractPayment";
435 439
 import { listContractComment, addContractComment, updateContractComment } from "@/api/oa/contract/contractComment";
436 440
 import { getContractMeeting, addContractMeeting, updateContractMeeting } from "@/api/oa/contract/contractMeeting";
437 441
 import { listProjectContract, addProjectContract } from "@/api/oa/contract/projectContract";
@@ -465,7 +469,7 @@ export default {
465 469
       type: Boolean,
466 470
       default: false
467 471
     },
468
-    flowDisabled:{
472
+    flowDisabled: {
469 473
       type: Boolean,
470 474
       default: true
471 475
     }
@@ -594,7 +598,7 @@ export default {
594 598
     this.getDeptList();
595 599
     this.getTenderList();
596 600
     this.getUserList();
597
-    if(this.flowDisabled){
601
+    if (this.flowDisabled) {
598 602
       flowXmlAndNode({ procInsId: this.taskForm.procInsId, deployId: this.taskForm.deployId }).then(res => {
599 603
         this.flowData = res.data;
600 604
       })
@@ -661,18 +665,56 @@ export default {
661 665
               this.paymentList = res.rows;
662 666
           });
663 667
           listContractComment({ contractId: this.taskForm.formId }).then(res => {
664
-            if (res.rows)
668
+            if (res.rows && res.rows.length != 0) {
665 669
               this.commentList = res.rows;
666
-            for (let comment of this.commentList) {
667
-              if (comment.commentTime == undefined) {
668
-                if (comment.userId != this.$store.getters.userId) {
669
-                  comment.commentUser = undefined;
670
-                }
671
-                else {
672
-                  comment.commentTime = parseTime(new Date(), '{y}-{m}-{d}');
670
+              for (let comment of this.commentList) {
671
+                if (comment.commentTime == undefined) {
672
+                  if (comment.userId != this.$store.getters.userId) {
673
+                    comment.commentUser = undefined;
674
+                  }
675
+                  else {
676
+                    comment.commentTime = parseTime(new Date(), '{y}-{m}-{d}');
677
+                  }
673 678
                 }
674 679
               }
680
+            } else {
681
+              this.commentList = [
682
+                {
683
+                  deptId: 105,
684
+                  userId: '',
685
+                  comment: '',
686
+                  document: '',
687
+                  commentTime: undefined
688
+                },
689
+                {
690
+                  deptId: 110,
691
+                  userId: '',
692
+                  comment: '',
693
+                  document: '',
694
+                  commentTime: undefined
695
+                },
696
+                {
697
+                  deptId: 107,
698
+                  userId: '',
699
+                  comment: '',
700
+                  document: '',
701
+                  commentTime: undefined
702
+                },
703
+                {
704
+                  deptId: 106,
705
+                  userId: '',
706
+                  comment: '',
707
+                  document: '',
708
+                  commentTime: undefined
709
+                },
710
+              ]
711
+              for (let comment of this.commentList) {
712
+                getUsersDeptLeaderByDept({ deptId: comment.deptId }).then(res => {
713
+                  comment.userId = res.data.userId;
714
+                })
715
+              }
675 716
             }
717
+
676 718
           });
677 719
           getContractMeeting(this.taskForm.formId).then(res => {
678 720
             if (res.data) {
@@ -756,7 +798,11 @@ export default {
756 798
       return true;
757 799
     },
758 800
     getProjectSource(chooseTender) {
759
-      return chooseTender.partyA.indexOf('中国电建集团成都勘测设计研究院有限公司') != -1 ? '院内' : '院外';
801
+      const TARGET_COMPANY = '中国电建集团成都勘测设计研究院有限公司';
802
+      if (!chooseTender || !chooseTender.partyA || !chooseTender.partyA.partyAName) {
803
+        return '';
804
+      }
805
+      return chooseTender.partyA.partyAName.includes(TARGET_COMPANY) ? '院内' : '院外';
760 806
     },
761 807
     addWorkList() {
762 808
       this.workList.push({
@@ -910,11 +956,12 @@ export default {
910 956
       this.$refs["form"].validate(valid => {
911 957
         if (valid) {
912 958
           if (this.formTotal != 0) {
913
-            updateContract(this.form).then(response => {
914
-              this.$modal.msgSuccess("修改成功");
915
-              this.open = false;
916
-            });
917 959
             const params = { taskId: this.taskForm.taskId };
960
+            this.updateContractData();
961
+            if (this.taskName == '合同拟稿') {
962
+              this.firstGetNextFlow();
963
+              return
964
+            }
918 965
             getNextFlowNode(params).then(res => {
919 966
               if (this.taskName == '分管审核') {
920 967
                 complete(this.taskForm).then(response => {
@@ -975,47 +1022,7 @@ export default {
975 1022
                 for (let projectId of this.projectContractForm.projectIds) {
976 1023
                   addProjectContract({ projectId: projectId, contractId: this.form.contractId });
977 1024
                 }
978
-                const params = { taskId: this.taskForm.taskId };
979
-                getNextFlowNode(params).then(res => {
980
-                  if (this.commentOpen == false && this.meetingOpen == false) {
981
-                    getUsersManageLeader({ userId: this.$store.getters.userId }).then(res => {
982
-                      let userId = res.data.userId;
983
-                      this.$set(this.taskForm.variables, "approval", userId);
984
-                      this.$set(this.taskForm.variables, "commentType", '0');
985
-                      complete(this.taskForm).then(response => {
986
-                        this.$modal.msgSuccess(response.msg);
987
-                        this.$emit('goBack')
988
-                      });
989
-                    })
990
-                  }
991
-                  else if (this.commentOpen == true && this.meetingOpen == false) {
992
-                    let approvalList = [];
993
-                    for (let comment of this.commentList) {
994
-                      comment.contractId = this.form.contractId
995
-                      addContractComment(comment);
996
-                      approvalList.push(comment.userId)
997
-                    }
998
-                    this.$set(this.taskForm.variables, "approvalList", approvalList);
999
-                    this.$set(this.taskForm.variables, "commentType", '2');
1000
-                    complete(this.taskForm).then(response => {
1001
-                      this.$modal.msgSuccess(response.msg);
1002
-                      this.$emit('goBack')
1003
-                    });
1004
-                  }
1005
-                  else if (this.commentOpen == false && this.meetingOpen == true) {
1006
-                    this.meetingForm.contractId = this.form.contractId;
1007
-                    let formData = new FormData();
1008
-                    let jsonForm = JSON.stringify(this.meetingForm);
1009
-                    formData.append("form", jsonForm);
1010
-                    addContractMeeting(formData);
1011
-                    this.$set(this.taskForm.variables, "approval", this.meetingForm.hostId);
1012
-                    this.$set(this.taskForm.variables, "commentType", '1');
1013
-                    complete(this.taskForm).then(response => {
1014
-                      this.$modal.msgSuccess(response.msg);
1015
-                      this.$emit('goBack')
1016
-                    });
1017
-                  }
1018
-                })
1025
+                this.firstGetNextFlow();
1019 1026
               } else {
1020 1027
                 this.$message.error("新增失败,请确认合同编码是否唯一");
1021 1028
               }
@@ -1024,6 +1031,67 @@ export default {
1024 1031
         }
1025 1032
       });
1026 1033
     },
1034
+    updateContractData() {
1035
+      updateContract(this.form).then(response => {
1036
+        this.$modal.msgSuccess("数据添加成功");
1037
+        this.open = false;
1038
+        delContractWork(this.form.contractId).then(res => {
1039
+          for (let work of this.workList) {
1040
+            work.contractId = this.form.contractId
1041
+            addContractWork(work);
1042
+          }
1043
+        })
1044
+        delContractPayment(this.form.contractId).then(res => {
1045
+          for (let payment of this.paymentList) {
1046
+            payment.contractId = this.form.contractId
1047
+            addContractPayment(payment);
1048
+          }
1049
+        })
1050
+      });
1051
+    },
1052
+    firstGetNextFlow() {
1053
+      const params = { taskId: this.taskForm.taskId };
1054
+      getNextFlowNode(params).then(res => {
1055
+        if (this.commentOpen == false && this.meetingOpen == false) {
1056
+          getUsersManageLeader({ userId: this.$store.getters.userId }).then(res => {
1057
+            let userId = res.data.userId;
1058
+            this.$set(this.taskForm.variables, "approval", userId);
1059
+            this.$set(this.taskForm.variables, "commentType", '0');
1060
+            complete(this.taskForm).then(response => {
1061
+              this.$modal.msgSuccess(response.msg);
1062
+              this.$emit('goBack')
1063
+            });
1064
+          })
1065
+        }
1066
+        else if (this.commentOpen == true && this.meetingOpen == false) {
1067
+          let approvalList = [];
1068
+          for (let comment of this.commentList) {
1069
+            comment.contractId = this.form.contractId
1070
+            addContractComment(comment);
1071
+            approvalList.push(comment.userId)
1072
+          }
1073
+          this.$set(this.taskForm.variables, "approvalList", approvalList);
1074
+          this.$set(this.taskForm.variables, "commentType", '2');
1075
+          complete(this.taskForm).then(response => {
1076
+            this.$modal.msgSuccess(response.msg);
1077
+            this.$emit('goBack')
1078
+          });
1079
+        }
1080
+        else if (this.commentOpen == false && this.meetingOpen == true) {
1081
+          this.meetingForm.contractId = this.form.contractId;
1082
+          let formData = new FormData();
1083
+          let jsonForm = JSON.stringify(this.meetingForm);
1084
+          formData.append("form", jsonForm);
1085
+          addContractMeeting(formData);
1086
+          this.$set(this.taskForm.variables, "approval", this.meetingForm.hostId);
1087
+          this.$set(this.taskForm.variables, "commentType", '1');
1088
+          complete(this.taskForm).then(response => {
1089
+            this.$modal.msgSuccess(response.msg);
1090
+            this.$emit('goBack')
1091
+          });
1092
+        }
1093
+      })
1094
+    },
1027 1095
     getContractPath(val) {
1028 1096
       let arr = val.split('/upload')
1029 1097
       this.form.contractDocument = arr[1]

+ 1
- 1
oa-ui/src/views/flowable/form/components/chooseTender.vue 查看文件

@@ -25,7 +25,7 @@
25 25
       <!-- <el-table-column type="selection" width="50" align="center" :reserve-selection="true" /> -->
26 26
       <el-table-column label="投标项目名称" align="center" key="projectName" prop="projectName"
27 27
         :show-overflow-tooltip="true"  width="170px" />
28
-      <el-table-column label="招标业主" align="center" prop="partyA" min-width="100px" />
28
+      <el-table-column label="招标业主" align="center" prop="partyA.partyAName" min-width="100px" />
29 29
       <el-table-column label="招标代理" align="center" prop="agent" min-width="100px" />
30 30
       <el-table-column label="招标地点" align="center" prop="place" min-width="100px" />
31 31
       <el-table-column label="业主预算" align="center" prop="budget" min-width="100px" />

+ 4
- 2
oa-ui/src/views/flowable/form/oa/carForm.vue 查看文件

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-02-29 11:44:28
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-06-05 16:05:20
5
+ * @LastEditTime: 2024-06-13 14:19:03
6 6
 -->
7 7
 
8 8
 <template>
@@ -522,7 +522,6 @@ export default {
522 522
         }
523 523
         else {
524 524
           getUsersDeptLeader({ userId: this.$store.getters.userId }).then(res => {
525
-            debugger
526 525
             if (res.data) {
527 526
               this.$set(this.taskForm.variables, "approval", res.data.userId);
528 527
               complete(this.taskForm).then(response => {
@@ -706,4 +705,7 @@ export default {
706 705
   width: 100px;
707 706
   background: #E1F3D8;
708 707
 }
708
+::v-deep .el-textarea.is-disabled .el-textarea__inner {
709
+  color: #121212 !important;
710
+}
709 711
 </style>

+ 4
- 2
oa-ui/src/views/flowable/form/oa/deviceForm.vue 查看文件

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-07 13:44:39
4
- * @LastEditors: wrh
5
- * @LastEditTime: 2024-06-12 17:16:48
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-06-13 14:19:38
6 6
 -->
7 7
 
8 8
 <template>
@@ -533,6 +533,7 @@ export default {
533 533
 </script>
534 534
 
535 535
 <style lang="scss" scoped>
536
+@import "@/assets/styles/element-reset.scss";
536 537
 ::v-deep .el-input.is-disabled .el-input__inner {
537 538
   color: #121212 !important;
538 539
 }
@@ -540,4 +541,5 @@ export default {
540 541
 ::v-deep .el-textarea.is-disabled .el-textarea__inner {
541 542
   color: #121212 !important;
542 543
 }
544
+
543 545
 </style>

+ 6
- 5
oa-ui/src/views/flowable/form/projectProcess/addproject.vue 查看文件

@@ -1,8 +1,8 @@
1 1
 <!--
2 2
  * @Author: ysh
3 3
  * @Date: 2024-03-18 11:00:04
4
- * @LastEditors: wrh
5
- * @LastEditTime: 2024-06-12 15:55:43
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-06-13 18:42:56
6 6
 -->
7 7
 <template>
8 8
   <div class="project-wrapper">
@@ -15,7 +15,7 @@
15 15
             <el-input v-model="addForm.projectNumber"></el-input>
16 16
           </el-form-item>
17 17
         </el-col>
18
-        <el-col :span="12" v-if="addForm.projectSource == 0">
18
+        <el-col :span="12" v-if="addForm.projectSource == '0'">
19 19
           <el-form-item label="合同编码:">
20 20
             <el-input v-model="contractCode" disabled></el-input>
21 21
           </el-form-item>
@@ -26,7 +26,7 @@
26 26
             <el-input v-model="addForm.projectName"></el-input>
27 27
           </el-form-item>
28 28
         </el-col>
29
-        <el-col :span="12" v-if="addForm.projectSource == 0">
29
+        <el-col :span="12" v-if="addForm.projectSource == '0'">
30 30
           <el-form-item label="合同编号:">
31 31
             <el-input v-model="contractNumber" disabled></el-input>
32 32
           </el-form-item>
@@ -104,7 +104,7 @@
104 104
                 :autosize="{ minRows: 4, maxRows: 10 }"></el-input>
105 105
             </td>
106 106
             <td>
107
-              <el-button type="danger" icon="el-icon-minus" size="mini" circle @click="deletWorkItem(index)"></el-button>
107
+              <el-button type="text" style="color:#F56C6C" size="mini" @click="deletWorkItem(index)">删除行</el-button>
108 108
             </td>
109 109
           </tr>
110 110
         </table>
@@ -262,6 +262,7 @@ export default {
262 262
 
263 263
     getProjectInfo() {
264 264
       getProject(this.taskForm.formId).then(res => {
265
+        console.log(res.data);
265 266
         this.addForm = res.data;
266 267
       })
267 268
     },

+ 15
- 6
oa-ui/src/views/flowable/form/projectProcess/inProgress.vue 查看文件

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-04-15 09:35:41
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-06-04 16:58:07
5
+ * @LastEditTime: 2024-06-13 14:39:00
6 6
 -->
7 7
 <template>
8 8
   <div>
@@ -15,7 +15,8 @@
15 15
       <el-form ref="progress" :model="form" :disabled="disabled" label-width="100px">
16 16
         <el-form-item label="参与人员:">
17 17
           <el-select v-model="participates" multiple disabled style="width:84%">
18
-            <el-option v-for="item in $store.state.user.userList" :label="item.nickName" :value="item.userId" :key="item.userId">
18
+            <el-option v-for="item in $store.state.user.userList" :label="item.nickName" :value="item.userId"
19
+              :key="item.userId">
19 20
             </el-option>
20 21
           </el-select>
21 22
           <el-button class="ml10" @click="openPeople = true" type="primary" size="mini" icon="el-icon-plus"></el-button>
@@ -24,7 +25,8 @@
24 25
         <el-form-item label="驾驶员:">
25 26
           <el-tooltip class="item" effect="dark" content="直接获取用车申请中的驾驶员,若无驾驶员,则需要先提交项目的用车申请" placement="top-end">
26 27
             <el-select v-model="form.drivers" multiple disabled style="width:90%">
27
-              <el-option v-for="item in $store.state.user.userList" :label="item.nickName" :value="item.userId" :key="item.userId">
28
+              <el-option v-for="item in $store.state.user.userList" :label="item.nickName" :value="item.userId"
29
+                :key="item.userId">
28 30
               </el-option>
29 31
             </el-select>
30 32
           </el-tooltip>
@@ -349,9 +351,16 @@ export default {
349 351
       this.form.participates = this.participates.join(',')
350 352
       updateProject(this.form).then(res => {
351 353
         this.$message.success("保存成功");
352
-        this.form.cars = (this.form.cars.split(',')).map(Number);
353
-        this.form.drivers = (this.form.drivers.split(',')).map(Number);
354
-        this.form.devices = (this.form.devices.split(',')).map(Number);
354
+        if (this.form.cars && this.form.cars.trim() !== '') {
355
+          this.form.cars = (this.form.cars.split(',')).map(item => Number(item.trim()));
356
+          // 使用 trim() 来移除每个元素前后的空格(如果有的话)  
357
+        }
358
+        if (this.form.drivers && this.form.drivers.trim() !== '') {
359
+          this.form.drivers = (this.form.drivers.split(',')).map(item => Number(item.trim()));
360
+        }
361
+        if (this.form.devices && this.form.devices.trim() !== '') {
362
+          this.form.devices = (this.form.devices.split(',')).map(item => Number(item.trim()));
363
+        }
355 364
       });
356 365
     },
357 366
     // 查询车辆列表

+ 2
- 2
oa-ui/src/views/flowable/form/projectProcess/index.vue 查看文件

@@ -2,7 +2,7 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-02-27 14:49:15
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-05-31 14:33:25
5
+ * @LastEditTime: 2024-06-13 18:38:04
6 6
 -->
7 7
 
8 8
 <template>
@@ -11,7 +11,7 @@
11 11
       <el-col :span="18" :xs="24">
12 12
         <el-tabs tabPosition="left" type="card" class="tabs-border" v-model="activeName">
13 13
           <el-tab-pane label="项目登记" name="项目登记">
14
-            <addproject :taskForm="taskForm" :disabled="taskName != '项目登记'" @goBack="goBack"></addproject>
14
+            <addproject :taskForm="taskForm" :taskName="taskName" :disabled="taskName != '项目登记'" @goBack="goBack"></addproject>
15 15
           </el-tab-pane>
16 16
           <el-tab-pane label="项目安排" name="项目安排">
17 17
             <arrangeProject :taskForm="taskForm" :disabled="taskName != '项目安排'" @goBack="goBack"></arrangeProject>

+ 20
- 84
oa-ui/src/views/flowable/form/technicalForm.vue 查看文件

@@ -53,7 +53,7 @@
53 53
             </el-col>
54 54
           </el-row>
55 55
           <el-form-item label="技术安排意见" prop="planComment">
56
-            <el-input type="textarea" v-model="form.planComment" placeholder="请输入技术安排意见"
56
+            <el-input type="textarea" v-model="form.planComment" :autosize="{ minRows: 4 }" placeholder="请输入技术安排意见"
57 57
               :disabled="taskName != '技术安排'" />
58 58
           </el-form-item>
59 59
           <el-row>
@@ -87,7 +87,7 @@
87 87
             </div>
88 88
           </el-form-item>
89 89
           <el-form-item label="方案说明" prop="designDescription">
90
-            <el-input type="textarea" v-model="form.designDescription" placeholder="请输入方案说明"
90
+            <el-input type="textarea" v-model="form.designDescription" :autosize="{ minRows: 4 }" placeholder="请输入方案说明"
91 91
               :disabled="taskName != '方案上传'" />
92 92
           </el-form-item>
93 93
           <el-row>
@@ -121,7 +121,7 @@
121 121
             </div>
122 122
           </el-form-item>
123 123
           <el-form-item label="技术部审核意见" prop="technicalComment">
124
-            <el-input type="textarea" v-model="form.technicalComment" placeholder="请输入技术审核意见"
124
+            <el-input type="textarea" v-model="form.technicalComment" :autosize="{ minRows: 4 }" placeholder="请输入技术审核意见"
125 125
               :disabled="taskName != '技术审核'" />
126 126
           </el-form-item>
127 127
           <el-row>
@@ -154,7 +154,7 @@
154 154
             </div>
155 155
           </el-form-item>
156 156
           <el-form-item label="总工程师审核意见" prop="manageComment">
157
-            <el-input type="textarea" v-model="form.manageComment" placeholder="请输入总工审核意见"
157
+            <el-input type="textarea" v-model="form.manageComment" :autosize="{ minRows: 4 }" placeholder="请输入总工审核意见"
158 158
               :disabled="taskName != '总工审核'" />
159 159
           </el-form-item>
160 160
           <el-row>
@@ -270,7 +270,8 @@ export default {
270 270
       // 表单参数
271 271
       form: {},
272 272
       formTotal: 0,
273
-      flowData: {}
273
+      flowData: {},
274
+      isDocumentValid: true
274 275
     };
275 276
   },
276 277
   created() {
@@ -315,12 +316,6 @@ export default {
315 316
             { required: true, message: '请选择质量检查员', trigger: 'change' },
316 317
           ],
317 318
         }
318
-      } else if (this.taskName == '方案上传') {
319
-        this.rules = {
320
-          technicalDocument: [
321
-            { required: true, message: '请上传技术方案', trigger: 'blur' }
322
-          ]
323
-        }
324 319
       } else if (this.taskName == '技术审核') {
325 320
         this.rules = {
326 321
           technicalComment: [
@@ -404,11 +399,6 @@ export default {
404 399
         return arr[arr.length - 1];
405 400
       }
406 401
     },
407
-    // 取消按钮
408
-    cancel() {
409
-      this.open = false;
410
-      this.reset();
411
-    },
412 402
     isEmptyObject(obj) {
413 403
       for (var key in obj) {
414 404
         if (obj.hasOwnProperty(key)) {
@@ -417,61 +407,23 @@ export default {
417 407
       }
418 408
       return true;
419 409
     },
420
-    // 表单重置
421
-    reset() {
422
-      this.form = {
423
-        technicalId: null,
424
-        projectId: null,
425
-        technicalDirector: null,
426
-        technicalDesigner: null,
427
-        technicalPlanner: null,
428
-        planComment: null,
429
-        qualityInspector: null,
430
-        technicalTime: null,
431
-        technicalDocument: null,
432
-        designDescription: null,
433
-        technicalComment: null,
434
-        manageComment: null,
435
-        technicalUploadTime: null,
436
-        techApprovalTime: null,
437
-        manageApprovalTime: null
438
-      };
439
-      this.resetForm("form");
440
-    },
441
-    /** 搜索按钮操作 */
442
-    handleQuery() {
443
-      this.queryParams.pageNum = 1;
444
-      this.getList();
445
-    },
446
-    /** 重置按钮操作 */
447
-    resetQuery() {
448
-      this.resetForm("queryForm");
449
-      this.handleQuery();
450
-    },
451
-    // 多选框选中数据
452
-    handleSelectionChange(selection) {
453
-      this.ids = selection.map(item => item.technicalId)
454
-      this.single = selection.length !== 1
455
-      this.multiple = !selection.length
456
-    },
457
-    /** 新增按钮操作 */
458
-    handleAdd() {
459
-      this.reset();
460
-      this.open = true;
461
-      this.title = "添加cmc技术交底";
462
-    },
463
-    /** 修改按钮操作 */
464
-    handleUpdate(row) {
465
-      this.reset();
466
-      const technicalId = row.technicalId || this.ids
467
-      getTechnical(technicalId).then(response => {
468
-        this.form = response.data;
469
-        this.open = true;
470
-        this.title = "修改cmc技术交底";
471
-      });
410
+    validateDocument(doc) {
411
+      // 这里添加你的验证逻辑  
412
+      // 例如,检查tenderId是否为空或者是否符合其他规则  
413
+      if (!doc || doc.trim() === '') {
414
+        this.$message.error('请上传技术方案');
415
+        return false;
416
+      }
417
+      return true;
472 418
     },
473 419
     /** 提交按钮 */
474 420
     submitForm() {
421
+      if (this.taskName == '方案上传') {
422
+        this.isDocumentValid = this.validateDocument(this.form.technicalDocument);
423
+        if (!this.isDocumentValid) {
424
+          return;
425
+        }
426
+      }
475 427
       this.$refs["form"].validate(valid => {
476 428
         if (valid) {
477 429
           if (this.formTotal != 0) {
@@ -529,22 +481,6 @@ export default {
529 481
         }
530 482
       });
531 483
     },
532
-    /** 删除按钮操作 */
533
-    handleDelete(row) {
534
-      const technicalIds = row.technicalId || this.ids;
535
-      this.$modal.confirm('是否确认删除cmc技术交底编号为"' + technicalIds + '"的数据项?').then(function () {
536
-        return delTechnical(technicalIds);
537
-      }).then(() => {
538
-        this.getList();
539
-        this.$modal.msgSuccess("删除成功");
540
-      }).catch(() => { });
541
-    },
542
-    /** 导出按钮操作 */
543
-    handleExport() {
544
-      this.download('oa/technical/export', {
545
-        ...this.queryParams
546
-      }, `technical_${new Date().getTime()}.xlsx`)
547
-    },
548 484
     showFormItem(name) {
549 485
       let isShow = false;
550 486
       if (name == '技术安排')

+ 29
- 9
oa-ui/src/views/flowable/task/myProcess/index.vue 查看文件

@@ -2,7 +2,13 @@
2 2
  * @Author: ysh
3 3
  * @Date: 2024-01-03 09:23:11
4 4
  * @LastEditors: Please set LastEditors
5
- * @LastEditTime: 2024-06-06 15:45:51
5
+ * @LastEditTime: 2024-06-13 18:24:59
6
+-->
7
+<!--
8
+ * @Author: ysh
9
+ * @Date: 2024-01-03 09:23:11
10
+ * @LastEditors: Please set LastEditors
11
+ * @LastEditTime: 2024-06-13 17:23:42
6 12
 -->
7 13
 <template>
8 14
   <div class="app-container">
@@ -63,8 +69,8 @@
63 69
           <el-button @click="handleFlowRecord(scope.row)" type="text" size="small">办理进度</el-button>
64 70
           <el-button @click="handleFlowNote(scope.row)" type="text" size="small">表单信息</el-button>
65 71
           <!-- <el-button @click="handleStop(scope.row)" type="text" size="small">取消申请</el-button> -->
66
-          <el-button @click="handleDelete(scope.row)" style="color:#F56C6C" type="text" size="small" :disabled="beDeleted(scope.row)"
67
-            v-hasPermi="['system:deployment:remove']">删除</el-button>
72
+          <el-button @click="handleDelete(scope.row)" style="color:#F56C6C" type="text" size="small"
73
+            :disabled="beDeleted(scope.row)" v-hasPermi="['system:deployment:remove']">取消流程</el-button>
68 74
         </template>
69 75
       </el-table-column>
70 76
     </el-table>
@@ -74,7 +80,8 @@
74 80
 
75 81
     <!-- 发起流程 -->
76 82
     <el-dialog :title="title" :visible.sync="open" width="400px" append-to-body>
77
-      <progress-tree :definitionList="definitionList" @confirm="handleStartProcess"  @close="open =false"></progress-tree>
83
+      <progress-tree :definitionList="definitionList" @confirm="handleStartProcess"
84
+        @close="open = false"></progress-tree>
78 85
       <!-- <el-form :model="queryProcessParams" ref="queryProcessForm" :inline="true" v-show="showSearch" label-width="68px">
79 86
         <el-form-item label="名称" prop="name">
80 87
           <el-input v-model="queryProcessParams.name" placeholder="请输入名称" clearable size="small"
@@ -135,6 +142,7 @@ import RowDetail from './send/rowDetail.vue'
135 142
 import ProgressTree from './progressTree.vue';
136 143
 import { getProcessVariables } from "@/api/flowable/definition";
137 144
 import conditionDisplay from '@/views/flowable/form/components/conditionDisplay.vue'
145
+import { deleteResources } from "@/utils/deleteResource"
138 146
 export default {
139 147
   name: "Deploy",
140 148
   components: {
@@ -452,17 +460,29 @@ export default {
452 460
     /** 删除按钮操作 */
453 461
     handleDelete(row) {
454 462
       const ids = row.procInsId || this.ids;// 暂不支持删除多个流程
455
-      this.$confirm('删除后,流程将会取消,是否确定删除?', "警告", {
463
+      this.$confirm('是否确定取消流程?', "警告", {
456 464
         confirmButtonText: "确定",
457 465
         cancelButtonText: "取消",
458 466
         type: "warning"
459 467
       }).then(() => {
460
-        return delDeployment(ids);
461
-      }).then(() => {
462
-        this.getList();
463
-        this.$modal.msgSuccess("删除成功");
468
+        getProcessVariables(row.taskId).then(res => {
469
+          if (res.data) {
470
+            let delId = res.data.formId;
471
+            this.deleteDataByUrl(row.procDefName, delId)
472
+          }
473
+          return delDeployment(ids);
474
+        }).then(() => {
475
+          this.getList();
476
+          this.$modal.msgSuccess("流程取消成功");
477
+        })
464 478
       })
465 479
     },
480
+    deleteDataByUrl(procDefName, id) {
481
+      switch (procDefName) {
482
+        case '承接合同评审':
483
+          return deleteResources(procDefName, id)
484
+      }
485
+    },
466 486
     // 子流程不可以删除
467 487
     beDeleted(row) {
468 488
       if (row.procDefName == '项目预算' || row.procDefName == '技术交底' || row.procDefName == '安全交底' || row.finishTime != null) {

+ 4
- 4
oa-ui/src/views/oa/project/info.vue 查看文件

@@ -473,16 +473,16 @@ export default {
473 473
               this.deptLeaderList.push(res.data.nickName);
474 474
             })
475 475
           }
476
-          if (this.project.devices) {
476
+          if (this.project.devices && this.project.devices.trim() !== '') {
477 477
             this.devices = (this.project.devices.split(',')).map(Number)
478 478
           }
479
-          if (this.project.cars) {
479
+          if (this.project.cars && this.project.cars.trim() !== '') {
480 480
             this.cars = (this.project.cars.split(',')).map(Number)
481 481
           }
482
-          if (this.project.drivers) {
482
+          if (this.project.drivers && this.project.drivers.trim() !== '') {
483 483
             this.drivers = (this.project.drivers.split(',')).map(Number)
484 484
           }
485
-          if (this.project.participates) {
485
+          if (this.project.participates && this.project.participates.trim() !== '') {
486 486
             this.participates = (this.project.participates.split(',')).map(Number)
487 487
           }
488 488
         }

Loading…
取消
儲存