浏览代码

调整审批界面按钮顺序

huanglc 2 周之前
父节点
当前提交
d86d65419c
共有 1 个文件被更改,包括 11 次插入10 次删除
  1. 11 10
      bpm-core/src/main/java/com/srm/bpm/logic/service/impl/BillBtnLogicImpl.java

+ 11 - 10
bpm-core/src/main/java/com/srm/bpm/logic/service/impl/BillBtnLogicImpl.java

@@ -206,7 +206,7 @@ public class BillBtnLogicImpl implements BillBtnLogic {
206
                                 case approvl:
206
                                 case approvl:
207
                                     btns = Lists.newArrayList(BillBtnConst.BTN_AGREE, BillBtnConst.BTN_TRANSFER, BillBtnConst.BTN_BACK);
207
                                     btns = Lists.newArrayList(BillBtnConst.BTN_AGREE, BillBtnConst.BTN_TRANSFER, BillBtnConst.BTN_BACK);
208
                                     if(isTransferButtonEnabled(processId)){
208
                                     if(isTransferButtonEnabled(processId)){
209
-                                        btns.add(0,BillBtnConst.BTN_TRANSFER_NEW);
209
+                                        btns.add(2,BillBtnConst.BTN_TRANSFER_NEW);
210
                                     }
210
                                     }
211
                                     boolean isRefuseNode = nextNodeHasRefuse(processId, nodeExtend);
211
                                     boolean isRefuseNode = nextNodeHasRefuse(processId, nodeExtend);
212
                                     if (isRefuseNode) {
212
                                     if (isRefuseNode) {
@@ -375,7 +375,7 @@ public class BillBtnLogicImpl implements BillBtnLogic {
375
                         // 如果单子还在审批中,根据流程ID决定是否显示撤销按钮
375
                         // 如果单子还在审批中,根据流程ID决定是否显示撤销按钮
376
                         btns = Lists.newArrayList(BillBtnConst.BTN_TRACK);
376
                         btns = Lists.newArrayList(BillBtnConst.BTN_TRACK);
377
                         if (isRecallButtonEnabled(processId)) {
377
                         if (isRecallButtonEnabled(processId)) {
378
-                            btns.add(BillBtnConst.BTN_CANCEL);
378
+                            btns.add(0,BillBtnConst.BTN_CANCEL);
379
                         }
379
                         }
380
                         break;
380
                         break;
381
                     case DRAFTS:
381
                     case DRAFTS:
@@ -403,7 +403,7 @@ public class BillBtnLogicImpl implements BillBtnLogic {
403
                     case APPROVAL:
403
                     case APPROVAL:
404
                         btns = Lists.newArrayList(BillBtnConst.BTN_TRACK);
404
                         btns = Lists.newArrayList(BillBtnConst.BTN_TRACK);
405
                         if (isRecallButtonEnabled(processId)) {
405
                         if (isRecallButtonEnabled(processId)) {
406
-                            btns.add(BillBtnConst.BTN_CANCEL);
406
+                            btns.add(0,BillBtnConst.BTN_CANCEL);
407
                         }
407
                         }
408
                         break;
408
                         break;
409
                     case REFUSE:
409
                     case REFUSE:
@@ -443,7 +443,7 @@ public class BillBtnLogicImpl implements BillBtnLogic {
443
                         // 如果单子还在审批中,根据流程ID决定是否显示撤销按钮
443
                         // 如果单子还在审批中,根据流程ID决定是否显示撤销按钮
444
                         btns = Lists.newArrayList(BillBtnConst.BTN_TRACK);
444
                         btns = Lists.newArrayList(BillBtnConst.BTN_TRACK);
445
                         if (isRecallButtonEnabled(processId)) {
445
                         if (isRecallButtonEnabled(processId)) {
446
-                            btns.add(BillBtnConst.BTN_CANCEL);
446
+                            btns.add(0,BillBtnConst.BTN_CANCEL);
447
                         }
447
                         }
448
                         break;
448
                         break;
449
                     default:
449
                     default:
@@ -511,15 +511,16 @@ public class BillBtnLogicImpl implements BillBtnLogic {
511
                     final boolean hasRefuse = nextNodeHasRefuse(processId, nodeExtend);
511
                     final boolean hasRefuse = nextNodeHasRefuse(processId, nodeExtend);
512
                     final List<String> btns = Lists.newArrayList(BillBtnConst.BTN_AGREE, BillBtnConst.BTN_BACK);
512
                     final List<String> btns = Lists.newArrayList(BillBtnConst.BTN_AGREE, BillBtnConst.BTN_BACK);
513
                     
513
                     
514
-                    // 根据流程ID决定是否添加撤销按钮
515
-                    if (isRecallButtonEnabled(processId)) {
516
-                        btns.add(0, BillBtnConst.BTN_CANCEL);  // 在同意按钮前添加撤销按钮
517
-                    }
518
-                    
519
                     if (hasRefuse) {
514
                     if (hasRefuse) {
520
                         // 正式自己的待我审批,则显示,审批同意等按钮
515
                         // 正式自己的待我审批,则显示,审批同意等按钮
521
-                        btns.add(2, BillBtnConst.BTN_REFUSE);
516
+                        btns.add(1, BillBtnConst.BTN_REFUSE);
522
                     }
517
                     }
518
+
519
+                    // 根据流程ID决定是否添加撤销按钮
520
+                    if (isRecallButtonEnabled(processId)) {
521
+                        btns.add(BillBtnConst.BTN_CANCEL);  // 在同意按钮前添加撤销按钮
522
+                    }
523
+
523
                     if (!Objects.isNull(nodeExtend.getCountersignFlag()) && nodeExtend.getCountersignFlag().compareTo(1) == 0) {
524
                     if (!Objects.isNull(nodeExtend.getCountersignFlag()) && nodeExtend.getCountersignFlag().compareTo(1) == 0) {
524
                         btns.add(BillBtnConst.BTN_ENDORSE);
525
                         btns.add(BillBtnConst.BTN_ENDORSE);
525
                     }
526
                     }