Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/master'

xuhao 5 mesiacov pred
rodič
commit
5c7134a4e8

+ 30 - 0
src/main/java/fi/em/formPlugin/SalaryClickPlugin.java

@@ -0,0 +1,30 @@
+package fi.em.formPlugin;
+
+import kd.bos.bill.OperationStatus;
+import kd.bos.context.RequestContext;
+import kd.bos.form.control.Button;
+import kd.bos.form.events.AfterDoOperationEventArgs;
+import kd.bos.form.plugin.AbstractFormPlugin;
+import kd.bos.url.UrlService;
+
+import java.util.EventObject;
+
+/**
+ * @author cjz
+ * @date 2024/11/15 11:51
+ * @description:薪酬发放计提,调用附件上传按钮
+ */
+public class SalaryClickPlugin extends AbstractFormPlugin {
+
+    @Override
+    public void afterBindData(EventObject e) {
+        super.afterBindData(e);
+        //新增或可编辑状态
+        if(OperationStatus.ADDNEW.equals(getView().getFormShowParameter().getStatus())||OperationStatus.EDIT.equals(getView().getFormShowParameter().getStatus())){
+            RequestContext ctx = RequestContext.get();
+            String clientPath = UrlService.getDomainContextUrlByTenantCode(ctx.getTenantCode());//拿到完整的客户端网址
+            String jspath = clientPath+"/public/thirdjs/salaryupload.js";
+            this.getView().executeClientCommand("loadThirdPartyJS",jspath);
+        }
+    }
+}

+ 4 - 20
src/main/java/fi/em/formPlugin/SalaryDistributeEditPlugin.java

@@ -156,10 +156,6 @@ public class SalaryDistributeEditPlugin extends AbstractListPlugin implements Pl
                 }else {
                     this.setVieeVisible(nckd_generalemployees);
                 }
-                RequestContext ctx = RequestContext.get();
-                String clientPath = UrlService.getDomainContextUrlByTenantCode(ctx.getTenantCode());//拿到完整的客户端网址
-                String jspath = clientPath+"/public/thirdjs/salaryupload.js";
-                this.getView().executeClientCommand("loadThirdPartyJS",jspath);
             }
             //分录类型为薪酬明细(内退)
             if (entrytype.equals("B")) {
@@ -170,10 +166,6 @@ public class SalaryDistributeEditPlugin extends AbstractListPlugin implements Pl
                 }else {
                     this.setVieeVisible(nckd_earlyretired);
                 }
-                RequestContext ctx = RequestContext.get();
-                String clientPath = UrlService.getDomainContextUrlByTenantCode(ctx.getTenantCode());//拿到完整的客户端网址
-                String jspath = clientPath+"/public/thirdjs/salaryupload.js";
-                this.getView().executeClientCommand("loadThirdPartyJS",jspath);
             }
             //分录类型为薪酬明细退休
             if (entrytype.equals("C")) {
@@ -184,10 +176,6 @@ public class SalaryDistributeEditPlugin extends AbstractListPlugin implements Pl
                 }else {
                     this.setVieeVisible(nckd_retired);
                 }
-                RequestContext ctx = RequestContext.get();
-                String clientPath = UrlService.getDomainContextUrlByTenantCode(ctx.getTenantCode());//拿到完整的客户端网址
-                String jspath = clientPath+"/public/thirdjs/salaryupload.js";
-                this.getView().executeClientCommand("loadThirdPartyJS",jspath);
             }
             //分录类型为人力薪酬
             if (entrytype.equals("D")) {
@@ -198,10 +186,6 @@ public class SalaryDistributeEditPlugin extends AbstractListPlugin implements Pl
                 }else {
                     this.setVieeVisible(nckd_pay);
                 }
-                RequestContext ctx = RequestContext.get();
-                String clientPath = UrlService.getDomainContextUrlByTenantCode(ctx.getTenantCode());//拿到完整的客户端网址
-                String jspath = clientPath+"/public/thirdjs/salaryupload.js";
-                this.getView().executeClientCommand("loadThirdPartyJS",jspath);
             }
             //分录类型为人力薪酬(内退)
             if (entrytype.equals("E")) {
@@ -214,10 +198,10 @@ public class SalaryDistributeEditPlugin extends AbstractListPlugin implements Pl
                 }
             }
 
-            RequestContext ctx = RequestContext.get();
-            String clientPath = UrlService.getDomainContextUrlByTenantCode(ctx.getTenantCode());//拿到完整的客户端网址
-            String jspath = clientPath+"/public/thirdjs/salaryupload.js";
-            this.getView().executeClientCommand("loadThirdPartyJS",jspath);
+//            RequestContext ctx = RequestContext.get();
+//            String clientPath = UrlService.getDomainContextUrlByTenantCode(ctx.getTenantCode());//拿到完整的客户端网址
+//            String jspath = clientPath+"/public/thirdjs/salaryupload.js";
+//            this.getView().executeClientCommand("loadThirdPartyJS",jspath);
         }
     }