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
             cmcBorrow.setManagerUserId(getLoginUser().getUserId());
96
             cmcBorrow.setManagerUserId(getLoginUser().getUserId());
97
             cmcBorrow.setManagerTime(new Date());
97
             cmcBorrow.setManagerTime(new Date());
98
         }
98
         }
99
-        if (cmcBorrow.getZjlComment() != null && cmcBorrow.getCwComment() == null) {
99
+        if (cmcBorrow.getZjlComment() != null && cmcBorrow.getDszComment() == null) {
100
             cmcBorrow.setZjlUserId(getLoginUser().getUserId());
100
             cmcBorrow.setZjlUserId(getLoginUser().getUserId());
101
             cmcBorrow.setZjlTime(new Date());
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
         if (cmcBorrow.getUnionComment() != null && cmcBorrow.getCwComment() == null) {
107
         if (cmcBorrow.getUnionComment() != null && cmcBorrow.getCwComment() == null) {
104
             cmcBorrow.setUnionUserId(getLoginUser().getUserId());
108
             cmcBorrow.setUnionUserId(getLoginUser().getUserId());
105
             cmcBorrow.setUnionTime(new Date());
109
             cmcBorrow.setUnionTime(new Date());

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

1
 package com.ruoyi.web.controller.oa;
1
 package com.ruoyi.web.controller.oa;
2
 
2
 
3
+import java.util.Date;
3
 import java.util.List;
4
 import java.util.List;
4
 import javax.servlet.http.HttpServletResponse;
5
 import javax.servlet.http.HttpServletResponse;
5
 
6
 
78
     @PutMapping
79
     @PutMapping
79
     public AjaxResult edit(@RequestBody CmcBudget cmcBudget)
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
         return toAjax(cmcBudgetService.updateCmcBudget(cmcBudget));
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
 package com.ruoyi.oa.domain;
1
 package com.ruoyi.oa.domain;
2
 
2
 
3
 import java.math.BigDecimal;
3
 import java.math.BigDecimal;
4
+import java.util.Date;
4
 
5
 
6
+import com.fasterxml.jackson.annotation.JsonFormat;
5
 import com.ruoyi.common.core.domain.entity.SysUser;
7
 import com.ruoyi.common.core.domain.entity.SysUser;
6
 import org.apache.commons.lang3.builder.ToStringBuilder;
8
 import org.apache.commons.lang3.builder.ToStringBuilder;
7
 import org.apache.commons.lang3.builder.ToStringStyle;
9
 import org.apache.commons.lang3.builder.ToStringStyle;
119
     /** 审核人 */
121
     /** 审核人 */
120
     private Long auditor;
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
     public void setBudgetId(String budgetId)
140
     public void setBudgetId(String budgetId)
123
     {
141
     {
124
         this.budgetId = budgetId;
142
         this.budgetId = budgetId;
358
     {
376
     {
359
         return approverUser;
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
     @Override
416
     @Override
363
     public String toString() {
417
     public String toString() {

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

217
                 </el-form-item>
217
                 </el-form-item>
218
               </el-col>
218
               </el-col>
219
             </el-row>
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
           </div>
236
           </div>
221
           <!-- 党工团审核 -->
237
           <!-- 党工团审核 -->
222
           <div v-if="form.borrowUsage != 0 && form.borrowUsage != 1">
238
           <div v-if="form.borrowUsage != 0 && form.borrowUsage != 1">
338
       xmUser: '',
354
       xmUser: '',
339
       managerUser: '',
355
       managerUser: '',
340
       zjlUser: '',
356
       zjlUser: '',
357
+      dszUser: '',
341
       unionUser: '',
358
       unionUser: '',
342
       cwUser: '',
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
       loading: true,
368
       loading: true,
351
       detail: {},
369
       detail: {},
381
       formTotal: 0,
399
       formTotal: 0,
382
       flowData: {},
400
       flowData: {},
383
       isProject: true,
401
       isProject: true,
402
+      exceed: false,
384
       deptId: undefined,
403
       deptId: undefined,
385
       dgtLabel: '工会审核意见',
404
       dgtLabel: '工会审核意见',
386
       totalBudget: 0,
405
       totalBudget: 0,
396
       this.managerUser = this.$store.getters.name;
415
       this.managerUser = this.$store.getters.name;
397
       this.managerTime = parseTime(new Date(), '{y}-{m}-{d}')
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
     if (this.taskName == '总经理审核') {
422
     if (this.taskName == '总经理审核') {
404
       this.zjlUser = this.$store.getters.name;
423
       this.zjlUser = this.$store.getters.name;
405
       this.zjlTime = parseTime(new Date(), '{y}-{m}-{d}')
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
     if (this.taskName == '党工团审核') {
430
     if (this.taskName == '党工团审核') {
408
       this.unionUser = this.$store.getters.name;
431
       this.unionUser = this.$store.getters.name;
409
       this.unionTime = parseTime(new Date(), '{y}-{m}-{d}')
432
       this.unionTime = parseTime(new Date(), '{y}-{m}-{d}')
444
             { required: true, message: '请输入部门负责人意见', trigger: 'blur' },
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
       } else if (this.taskName == '分管审核') {
476
       } else if (this.taskName == '分管审核') {
454
         this.rules = {
477
         this.rules = {
455
           managerComment: [
478
           managerComment: [
462
             { required: true, message: '请输入总经理审批意见', trigger: 'blur' }
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
       } else if (this.taskName == '党工团审核') {
494
       } else if (this.taskName == '党工团审核') {
466
         this.rules = {
495
         this.rules = {
467
           unionComment: [
496
           unionComment: [
590
             const params = { taskId: this.taskForm.taskId };
619
             const params = { taskId: this.taskForm.taskId };
591
             getNextFlowNode(params).then(res => {
620
             getNextFlowNode(params).then(res => {
592
               if (this.taskName == '部门审核') {
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
               // else if (this.taskName == '项目部审核') {
645
               // else if (this.taskName == '项目部审核') {
617
               //   getUsersManageLeaderByDept({ deptId: this.form.applyDept }).then(res => {
646
               //   getUsersManageLeaderByDept({ deptId: this.form.applyDept }).then(res => {
618
               //     let userId = res.data[0].userId;
647
               //     let userId = res.data[0].userId;
633
                 })
662
                 })
634
               }
663
               }
635
               else if (this.taskName == '总经理审核') {
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
                 let approvalList = [];
690
                 let approvalList = [];
637
                 getUsersDeptLeaderByDept({ deptId: 106 }).then(res => {
691
                 getUsersDeptLeaderByDept({ deptId: 106 }).then(res => {
638
                   approvalList.push(res.data.userId);
692
                   approvalList.push(res.data.userId);
723
         isShow = true;
777
         isShow = true;
724
       else if (name == '部门审核')
778
       else if (name == '部门审核')
725
         isShow = (this.taskName != '借款申请');
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
       else if (name == '分管审核')
782
       else if (name == '分管审核')
729
         isShow = (this.taskName != '借款申请' && this.taskName != '部门审核' && this.taskName != '项目部审核');
783
         isShow = (this.taskName != '借款申请' && this.taskName != '部门审核' && this.taskName != '项目部审核');
730
       else if (name == '总经理审核')
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
       else if (name == '党工团审核')
788
       else if (name == '党工团审核')
733
         isShow = (this.taskName == '党工团审核' || this.taskName == '财务处理' || this.taskName == '');
789
         isShow = (this.taskName == '党工团审核' || this.taskName == '财务处理' || this.taskName == '');
734
       else if (name == '财务处理')
790
       else if (name == '财务处理')

Loading…
Cancel
Save