From 07988ee7dfce607bd0e40dace9909ebbbc04ed6e Mon Sep 17 00:00:00 2001 From: zengweihai Date: Thu, 18 Jul 2024 16:47:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E7=99=BB=E8=AE=B0=E6=89=93?= =?UTF-8?q?=E5=BC=80=E7=99=BB=E8=AE=B0=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../formplugin/ContractbillFromPlugin.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/shkd-cosmic-debug/src/main/java/shkd/fi/er/plugin/formplugin/ContractbillFromPlugin.java b/shkd-cosmic-debug/src/main/java/shkd/fi/er/plugin/formplugin/ContractbillFromPlugin.java index a082d02..95b8677 100644 --- a/shkd-cosmic-debug/src/main/java/shkd/fi/er/plugin/formplugin/ContractbillFromPlugin.java +++ b/shkd-cosmic-debug/src/main/java/shkd/fi/er/plugin/formplugin/ContractbillFromPlugin.java @@ -8,11 +8,15 @@ import kd.bos.entity.datamodel.events.AfterDeleteRowEventArgs; import kd.bos.entity.datamodel.events.BeforeDeleteRowEventArgs; import kd.bos.entity.datamodel.events.ChangeData; import kd.bos.entity.datamodel.events.PropertyChangedArgs; +import kd.bos.form.FormShowParameter; +import kd.bos.form.ShowType; +import kd.bos.form.control.Control; import kd.bos.form.field.BasedataEdit; import kd.bos.form.field.ItemClassEdit; import kd.bos.form.field.events.BeforeF7SelectEvent; import kd.bos.form.field.events.BeforeF7SelectListener; import kd.bos.form.plugin.AbstractFormPlugin; +import kd.bos.list.ListFilterParameter; import kd.bos.list.ListShowParameter; import kd.bos.orm.query.QCP; import kd.bos.orm.query.QFilter; @@ -46,6 +50,7 @@ public class ContractbillFromPlugin extends AbstractFormPlugin implements Before if (edit != null){ edit.addBeforeF7SelectListener(this); } + this.addClickListeners("shkd_look"); } @Override @@ -72,6 +77,24 @@ public class ContractbillFromPlugin extends AbstractFormPlugin implements Before } } + @Override + public void click(EventObject evt) { + super.click(evt); + Control source = (Control) evt.getSource(); + String key = source.getKey(); + if ("shkd_look".equals(key)){ + ListShowParameter lsp = new ListShowParameter(); + lsp.setBillFormId("er_contractbill"); + String billno = (String) this.getModel().getValue("billno"); + QFilter numberQF = new QFilter("billno", QCP.equals, billno); + ListFilterParameter listFilterParameter = new ListFilterParameter(); + listFilterParameter.setFilter(numberQF); + lsp.setListFilterParameter(listFilterParameter); + lsp.getOpenStyle().setShowType(ShowType.MainNewTabPage); + this.getView().showForm(lsp); + } + } + @Override public void propertyChanged(PropertyChangedArgs e) { super.propertyChanged(e);