Browse Source

借款流程修改前端

lamphua 1 year ago
parent
commit
a7fa118a53

+ 5
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBorrowController.java View File

@@ -96,10 +96,14 @@ public class CmcBorrowController extends BaseController
96 96
             cmcBorrow.setManagerUserId(getLoginUser().getUserId());
97 97
             cmcBorrow.setManagerTime(new Date());
98 98
         }
99
-        if (cmcBorrow.getZjlComment() != null && cmcBorrow.getCwComment() == null) {
99
+        if (cmcBorrow.getZjlComment() != null && cmcBorrow.getDszComment() == null) {
100 100
             cmcBorrow.setZjlUserId(getLoginUser().getUserId());
101 101
             cmcBorrow.setZjlTime(new Date());
102 102
         }
103
+        if (cmcBorrow.getDszComment() != null && cmcBorrow.getCwComment() == null) {
104
+            cmcBorrow.setDszUserId(getLoginUser().getUserId());
105
+            cmcBorrow.setDszTime(new Date());
106
+        }
103 107
         if (cmcBorrow.getUnionComment() != null && cmcBorrow.getCwComment() == null) {
104 108
             cmcBorrow.setUnionUserId(getLoginUser().getUserId());
105 109
             cmcBorrow.setUnionTime(new Date());

+ 9
- 1
oa-back/ruoyi-admin/src/main/java/com/ruoyi/web/controller/oa/CmcBudgetController.java View File

@@ -1,5 +1,6 @@
1 1
 package com.ruoyi.web.controller.oa;
2 2
 
3
+import java.util.Date;
3 4
 import java.util.List;
4 5
 import javax.servlet.http.HttpServletResponse;
5 6
 
@@ -78,7 +79,14 @@ public class CmcBudgetController extends BaseController
78 79
     @PutMapping
79 80
     public AjaxResult edit(@RequestBody CmcBudget cmcBudget)
80 81
     {
81
-        cmcBudget.setAuditor(getLoginUser().getUserId());
82
+        if (cmcBudget.getAuditComment() != null && cmcBudget.getApproveComment() == null) {
83
+            cmcBudget.setAuditor(getLoginUser().getUserId());
84
+            cmcBudget.setAuditTime(new Date());
85
+        }
86
+        if (cmcBudget.getApproveComment() != null) {
87
+            cmcBudget.setApprover(getLoginUser().getUserId());
88
+            cmcBudget.setApproveTime(new Date());
89
+        }
82 90
         return toAjax(cmcBudgetService.updateCmcBudget(cmcBudget));
83 91
     }
84 92
 

+ 54
- 0
oa-back/ruoyi-system/src/main/java/com/ruoyi/oa/domain/CmcBudget.java View File

@@ -1,7 +1,9 @@
1 1
 package com.ruoyi.oa.domain;
2 2
 
3 3
 import java.math.BigDecimal;
4
+import java.util.Date;
4 5
 
6
+import com.fasterxml.jackson.annotation.JsonFormat;
5 7
 import com.ruoyi.common.core.domain.entity.SysUser;
6 8
 import org.apache.commons.lang3.builder.ToStringBuilder;
7 9
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -119,6 +121,22 @@ public class CmcBudget extends BaseEntity
119 121
     /** 审核人 */
120 122
     private Long auditor;
121 123
 
124
+    /** 审批时间 */
125
+    @JsonFormat(pattern = "yyyy-MM-dd")
126
+    @Excel(name = "审批时间", width = 30, dateFormat = "yyyy-MM-dd")
127
+    private Date auditTime;
128
+
129
+    /** 批准时间 */
130
+    @JsonFormat(pattern = "yyyy-MM-dd")
131
+    @Excel(name = "批准时间", width = 30, dateFormat = "yyyy-MM-dd")
132
+    private Date approveTime;
133
+
134
+    @Excel(name = "审批意见")
135
+    private String auditComment;
136
+
137
+    @Excel(name = "批准意见")
138
+    private String approveComment;
139
+
122 140
     public void setBudgetId(String budgetId)
123 141
     {
124 142
         this.budgetId = budgetId;
@@ -358,6 +376,42 @@ public class CmcBudget extends BaseEntity
358 376
     {
359 377
         return approverUser;
360 378
     }
379
+    public void setAuditTime(Date auditTime)
380
+    {
381
+        this.auditTime = auditTime;
382
+    }
383
+
384
+    public Date getAuditTime()
385
+    {
386
+        return auditTime;
387
+    }
388
+    public void setApproveTime(Date approveTime)
389
+    {
390
+        this.approveTime = approveTime;
391
+    }
392
+
393
+    public Date getApproveTime()
394
+    {
395
+        return approveTime;
396
+    }
397
+    public void setAuditComment(String auditComment)
398
+    {
399
+        this.auditComment = auditComment;
400
+    }
401
+
402
+    public String getAuditComment()
403
+    {
404
+        return auditComment;
405
+    }
406
+    public void setApproveComment(String approveComment)
407
+    {
408
+        this.approveComment = approveComment;
409
+    }
410
+
411
+    public String getApproveComment()
412
+    {
413
+        return approveComment;
414
+    }
361 415
 
362 416
     @Override
363 417
     public String toString() {

+ 96
- 40
oa-ui/src/views/flowable/form/finance/borrowForm.vue View File

@@ -217,6 +217,22 @@
217 217
                 </el-form-item>
218 218
               </el-col>
219 219
             </el-row>
220
+            <el-form-item label="董事长批准意见" prop="dszComment">
221
+              <el-input type="textarea" v-model="form.dszComment" placeholder="请输入董事长批准意见" :disabled="taskName != '董事长批准'"
222
+                :autosize="{ minRows: 4 }" />
223
+            </el-form-item>
224
+            <el-row>
225
+              <el-col :span="6" :xs="24" :offset="12">
226
+                <el-form-item label="签名:" label-width="120px" v-if="showFormItem('董事长批准')">
227
+                  <span class="auditor"> {{ form.dszUser ? form.dszUser.nickName : dszUser }} </span>
228
+                </el-form-item>
229
+              </el-col>
230
+              <el-col :span="6">
231
+                <el-form-item label="日期:" label-width="120px" v-if="showFormItem('董事长批准')">
232
+                  <span> {{ form.dszTime ? form.dszTime : dszTime }} </span>
233
+                </el-form-item>
234
+              </el-col>
235
+            </el-row>
220 236
           </div>
221 237
           <!-- 党工团审核 -->
222 238
           <div v-if="form.borrowUsage != 0 && form.borrowUsage != 1">
@@ -338,14 +354,16 @@ export default {
338 354
       xmUser: '',
339 355
       managerUser: '',
340 356
       zjlUser: '',
357
+      dszUser: '',
341 358
       unionUser: '',
342 359
       cwUser: '',
343
-      deptTime: '',
344
-      xmTime: '',
345
-      managerTime: '',
346
-      zjlTime: '',
347
-      unionTime: '',
348
-      lendTime: '',
360
+      deptTime: undefined,
361
+      xmTime: undefined,
362
+      managerTime: undefined,
363
+      zjlTime: undefined,
364
+      dszTime: undefined,
365
+      unionTime: undefined,
366
+      lendTime: undefined,
349 367
       // 遮罩层
350 368
       loading: true,
351 369
       detail: {},
@@ -381,6 +399,7 @@ export default {
381 399
       formTotal: 0,
382 400
       flowData: {},
383 401
       isProject: true,
402
+      exceed: false,
384 403
       deptId: undefined,
385 404
       dgtLabel: '工会审核意见',
386 405
       totalBudget: 0,
@@ -396,14 +415,18 @@ export default {
396 415
       this.managerUser = this.$store.getters.name;
397 416
       this.managerTime = parseTime(new Date(), '{y}-{m}-{d}')
398 417
     }
399
-    if (this.taskName == '项目部审核') {
400
-      this.xmUser = this.$store.getters.name;
401
-      this.xmTime = parseTime(new Date(), '{y}-{m}-{d}')
402
-    }
418
+    // if (this.taskName == '项目部审核') {
419
+    //   this.xmUser = this.$store.getters.name;
420
+    //   this.xmTime = parseTime(new Date(), '{y}-{m}-{d}')
421
+    // }
403 422
     if (this.taskName == '总经理审核') {
404 423
       this.zjlUser = this.$store.getters.name;
405 424
       this.zjlTime = parseTime(new Date(), '{y}-{m}-{d}')
406 425
     }
426
+    if (this.taskName == '董事长批准') {
427
+      this.dszUser = this.$store.getters.name;
428
+      this.dszTime = parseTime(new Date(), '{y}-{m}-{d}')
429
+    }
407 430
     if (this.taskName == '党工团审核') {
408 431
       this.unionUser = this.$store.getters.name;
409 432
       this.unionTime = parseTime(new Date(), '{y}-{m}-{d}')
@@ -444,12 +467,12 @@ export default {
444 467
             { required: true, message: '请输入部门负责人意见', trigger: 'blur' },
445 468
           ],
446 469
         }
447
-      } else if (this.taskName == '项目部审核') {
448
-        this.rules = {
449
-          xmComment: [
450
-            { required: true, message: '请输入项目部校核意见', trigger: 'blur' }
451
-          ]
452
-        }
470
+        // } else if (this.taskName == '项目部审核') {
471
+        //   this.rules = {
472
+        //     xmComment: [
473
+        //       { required: true, message: '请输入项目部校核意见', trigger: 'blur' }
474
+        //     ]
475
+        //   }
453 476
       } else if (this.taskName == '分管审核') {
454 477
         this.rules = {
455 478
           managerComment: [
@@ -462,6 +485,12 @@ export default {
462 485
             { required: true, message: '请输入总经理审批意见', trigger: 'blur' }
463 486
           ]
464 487
         }
488
+      } else if (this.taskName == '董事长审核') {
489
+        this.rules = {
490
+          dszComment: [
491
+            { required: true, message: '请输入董事长审批意见', trigger: 'blur' }
492
+          ]
493
+        }
465 494
       } else if (this.taskName == '党工团审核') {
466 495
         this.rules = {
467 496
           unionComment: [
@@ -590,29 +619,29 @@ export default {
590 619
             const params = { taskId: this.taskForm.taskId };
591 620
             getNextFlowNode(params).then(res => {
592 621
               if (this.taskName == '部门审核') {
593
-                if (this.isProject) {
594
-                  getUsersDeptLeaderByDept({ deptId: 107 }).then(res => {
595
-                    let userId = res.data.userId;
596
-                    this.$set(this.taskForm.variables, "approval", userId);
597
-                    this.$set(this.taskForm.variables, "isProject", this.isProject);
598
-                    complete(this.taskForm).then(response => {
599
-                      this.$modal.msgSuccess(response.msg);
600
-                      this.$emit('goBack')
601
-                    });
622
+                // if (this.isProject) {
623
+                //   getUsersDeptLeaderByDept({ deptId: 107 }).then(res => {
624
+                //     let userId = res.data.userId;
625
+                //     this.$set(this.taskForm.variables, "approval", userId);
626
+                //     this.$set(this.taskForm.variables, "isProject", this.isProject);
627
+                //     complete(this.taskForm).then(response => {
628
+                //       this.$modal.msgSuccess(response.msg);
629
+                //       this.$emit('goBack')
630
+                //     });
631
+                //   });
632
+                // } else {
633
+                getUsersManageLeaderByDept({ deptId: this.form.applyDept }).then(res => {
634
+                  let userId = res.data[0].userId;
635
+                  this.$set(this.taskForm.variables, "approval", userId);
636
+                  // this.$set(this.taskForm.variables, "isProject", this.isProject);
637
+                  complete(this.taskForm).then(response => {
638
+                    this.$modal.msgSuccess(response.msg);
639
+                    this.$emit('goBack')
602 640
                   });
603
-                } else {
604
-                  getUsersManageLeaderByDept({ deptId: this.form.applyDept }).then(res => {
605
-                    let userId = res.data[0].userId;
606
-                    this.$set(this.taskForm.variables, "approval", userId);
607
-                    this.$set(this.taskForm.variables, "isProject", this.isProject);
608
-                    complete(this.taskForm).then(response => {
609
-                      this.$modal.msgSuccess(response.msg);
610
-                      this.$emit('goBack')
611
-                    });
612
-                  })
613
-                }
614
-
641
+                })
615 642
               }
643
+
644
+              // }
616 645
               // else if (this.taskName == '项目部审核') {
617 646
               //   getUsersManageLeaderByDept({ deptId: this.form.applyDept }).then(res => {
618 647
               //     let userId = res.data[0].userId;
@@ -633,6 +662,31 @@ export default {
633 662
                 })
634 663
               }
635 664
               else if (this.taskName == '总经理审核') {
665
+                if (!this.exceed) {
666
+                  let approvalList = [];
667
+                  getUsersDeptLeaderByDept({ deptId: 106 }).then(res => {
668
+                    approvalList.push(res.data.userId);
669
+                    getUsersViceDeptLeaderByDept({ deptId: 106 }).then(res1 => {
670
+                      approvalList.push(res1.data.userId);
671
+                      this.$set(this.taskForm.variables, "approvalList", approvalList);
672
+                      complete(this.taskForm).then(response => {
673
+                        this.$modal.msgSuccess(response.msg);
674
+                        this.$emit('goBack')
675
+                      })
676
+                    })
677
+                  });
678
+                }
679
+                else {
680
+                  getUserByPost({ postName: '董事长' }).then(res => {
681
+                    this.$set(this.taskForm.variables, "approval", res.data[0].userId);
682
+                    complete(this.taskForm).then(response => {
683
+                      this.$modal.msgSuccess(response.msg);
684
+                      this.$emit('goBack')
685
+                    });
686
+                  })
687
+                }
688
+              }
689
+              else if (this.taskName == '董事长批准') {
636 690
                 let approvalList = [];
637 691
                 getUsersDeptLeaderByDept({ deptId: 106 }).then(res => {
638 692
                   approvalList.push(res.data.userId);
@@ -723,12 +777,14 @@ export default {
723 777
         isShow = true;
724 778
       else if (name == '部门审核')
725 779
         isShow = (this.taskName != '借款申请');
726
-      else if (name == '项目部审核')
727
-        isShow = (this.taskName != '借款申请' && this.taskName != '部门审核');
780
+      // else if (name == '项目部审核')
781
+      //   isShow = (this.taskName != '借款申请' && this.taskName != '部门审核');
728 782
       else if (name == '分管审核')
729 783
         isShow = (this.taskName != '借款申请' && this.taskName != '部门审核' && this.taskName != '项目部审核');
730 784
       else if (name == '总经理审核')
731
-        isShow = (this.taskName == '总经理审核' || this.taskName == '财务处理' || this.taskName == '');
785
+        isShow = (this.taskName == '总经理审核' || this.taskName == '董事长批准' || this.taskName == '财务处理' || this.taskName == '');
786
+      else if (name == '董事长批准')
787
+        isShow = (this.taskName == '董事长批准' || this.taskName == '财务处理' || this.taskName == '');
732 788
       else if (name == '党工团审核')
733 789
         isShow = (this.taskName == '党工团审核' || this.taskName == '财务处理' || this.taskName == '');
734 790
       else if (name == '财务处理')

Loading…
Cancel
Save