From e4bae3c6097e3814277681bfac1a51253806af43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BE=9A=E8=B1=86=E8=B1=86?= <13356128+sunandmoon60@user.noreply.gitee.com> Date: Thu, 21 Aug 2025 10:57:40 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=BF=94=E5=88=A9=E8=A7=84=E5=88=99=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/conm/RebateRulesBillPlugin.java | 40 +++++++++++++------ .../conm/purconmAddRebateRulesPlugin.java | 14 ++----- 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/lc123/cloud/app/plugin/form/conm/RebateRulesBillPlugin.java b/lc123/cloud/app/plugin/form/conm/RebateRulesBillPlugin.java index 18a8b3d..95975b7 100644 --- a/lc123/cloud/app/plugin/form/conm/RebateRulesBillPlugin.java +++ b/lc123/cloud/app/plugin/form/conm/RebateRulesBillPlugin.java @@ -9,6 +9,7 @@ import kd.bos.dataentity.utils.StringUtils; import kd.bos.entity.param.CustomParam; import kd.bos.form.FormShowParameter; import kd.bos.form.control.events.ItemClickEvent; +import kd.bos.form.events.AfterDoOperationEventArgs; import kd.bos.logging.Log; import kd.bos.logging.LogFactory; import kd.bos.orm.query.QCP; @@ -33,6 +34,19 @@ public class RebateRulesBillPlugin extends AbstractBillPlugIn implements Plugin this.addItemClickListeners("tbmain"); } + @Override + public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) { + super.afterDoOperation(afterDoOperationEventArgs); + String itemKey = afterDoOperationEventArgs.getOperateKey(); + if (StringUtils.equals("donothing", itemKey)) { + DynamicObject dataEntity = this.getModel().getDataEntity(true); + HashMap map = new HashMap<>(); + map.put("tqq9_pur_rebate", dataEntity); + this.getView().returnDataToParent(map); + this.getView().close(); + } + } + @Override public void afterCreateNewData(EventObject e) { // 获取当前页面的FormShowParameter对象 @@ -78,16 +92,18 @@ public class RebateRulesBillPlugin extends AbstractBillPlugIn implements Plugin } - @Override - public void itemClick(ItemClickEvent evt) { - super.itemClick(evt); - String itemKey = evt.getItemKey(); - if (StringUtils.equals("tqq9_confirm", itemKey)) { - DynamicObject dataEntity = this.getModel().getDataEntity(true); - HashMap map = new HashMap<>(); - map.put("tqq9_pur_rebate", dataEntity); - this.getView().returnDataToParent(map); - this.getView().close(); - } - } +// @Override +// public void itemClick(ItemClickEvent evt) { +// super.itemClick(evt); +// String itemKey = evt.getItemKey(); +// if (StringUtils.equals("tqq9_confirm", itemKey)) { +// DynamicObject dataEntity = this.getModel().getDataEntity(true); +// HashMap map = new HashMap<>(); +// map.put("tqq9_pur_rebate", dataEntity); +// this.getView().returnDataToParent(map); +// this.getView().close(); +// } +// } + + } \ No newline at end of file diff --git a/lc123/cloud/app/plugin/form/conm/purconmAddRebateRulesPlugin.java b/lc123/cloud/app/plugin/form/conm/purconmAddRebateRulesPlugin.java index 3d2cb6a..7502db2 100644 --- a/lc123/cloud/app/plugin/form/conm/purconmAddRebateRulesPlugin.java +++ b/lc123/cloud/app/plugin/form/conm/purconmAddRebateRulesPlugin.java @@ -48,20 +48,12 @@ public class purconmAddRebateRulesPlugin extends AbstractFormPlugin implements P public void itemClick(ItemClickEvent evt) { super.itemClick(evt); String itemKey = evt.getItemKey(); - if ("tqq9_pur_rebate".equals(itemKey)) { + if (StringUtils.equals("tqq9_rebate_addrow", itemKey)) { BillShowParameter param = new BillShowParameter(); param.setFormId("tqq9_pur_rebate"); param.setCustomParam("purcontract_billno", this.getModel().getValue("billno")); param.setCustomParam("purcontract_supplier", this.getModel().getValue("supplier")); - param.setCloseCallBack(new CloseCallBack(this, "rebateSync")); - param.getOpenStyle().setShowType(ShowType.Modal); - this.getView().showForm(param); - } else if (StringUtils.equals("tqq9_rebate_addrow", itemKey)) { - BillShowParameter param = new BillShowParameter(); - param.setFormId("tqq9_pur_rebate"); - param.setCustomParam("purcontract_billno", this.getModel().getValue("billno")); - param.setCustomParam("purcontract_supplier", this.getModel().getValue("supplier")); - param.setCustomParam("purcontract_tqq9_dxpp", this.getModel().getValue("tqq9_dxpp")); + param.setCustomParam("purcontract_tqq9_dxpp", this.getModel().getValue("tqq9_dxpp")); param.setCloseCallBack(new CloseCallBack(this, "entry_rebateSync")); param.getOpenStyle().setShowType(ShowType.Modal); this.getView().showForm(param); @@ -78,7 +70,6 @@ public class purconmAddRebateRulesPlugin extends AbstractFormPlugin implements P public void closedCallBack(ClosedCallBackEvent closedCallBackEvent) { super.closedCallBack(closedCallBackEvent); IDataModel model = this.getModel(); - IFormView view = this.getView(); String actionId = closedCallBackEvent.getActionId(); Object returnData = closedCallBackEvent.getReturnData(); if (returnData != null) { @@ -139,6 +130,7 @@ public class purconmAddRebateRulesPlugin extends AbstractFormPlugin implements P model.setValue("tqq9_creatuser", creator, size - 1);//创建人 model.setValue("tqq9_creatdate", createtime, size - 1);//创建时间 model.setValue("tqq9_lastdate", tqq9_lastdate, size - 1);//最后一次执行时间 + model.setValue("tqq9_pur_rebate", dynamicObject, size - 1);//返利规则 } } this.getView().updateView();