From 8b46649aa4e84e217b0278d119db8048c2b05109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=B4=B5=E5=BC=BA?= Date: Fri, 25 Jul 2025 13:46:16 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=EF=BC=9A3.=E6=BD=9C=E5=9C=A8?= =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E6=96=B0=E5=A2=9E=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=BB=84=E7=BB=87=E3=80=81=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=88=86=E7=B1=BB=EF=BC=8C=E8=AE=BE=E7=BD=AE=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E5=92=8C=E5=88=97=E8=A1=A8=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E4=B8=8D=E4=B8=80=E8=87=B4;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../formplugin/TycQzSupplierUSAFormPlugin.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/main/java/shkd/repc/resm/formplugin/TycQzSupplierUSAFormPlugin.java b/main/java/shkd/repc/resm/formplugin/TycQzSupplierUSAFormPlugin.java index 42908e4..cdc6504 100644 --- a/main/java/shkd/repc/resm/formplugin/TycQzSupplierUSAFormPlugin.java +++ b/main/java/shkd/repc/resm/formplugin/TycQzSupplierUSAFormPlugin.java @@ -11,6 +11,7 @@ import kd.repc.common.util.resm.SupplierAptUtils; import kd.repc.common.util.resm.SupplierStrategyUtil; import kd.repc.resm.formplugin.supplier.RegSupplierEdit; +import java.util.EventObject; import java.util.Iterator; import java.util.List; import java.util.stream.Collectors; @@ -18,6 +19,18 @@ import java.util.stream.Collectors; public class TycQzSupplierUSAFormPlugin extends RegSupplierEdit { + @Override + public void afterCreateNewData(EventObject e) { + super.afterCreateNewData(e); + DynamicObjectCollection groupcoll= (DynamicObjectCollection)this.getView().getModel().getValue("group"); + DynamicObject groupInfo = groupcoll.addNew(); + QFilter number = new QFilter("number", QCP.equals, "GYSFL-202411-002"); + DynamicObject[] load = BusinessDataServiceHelper.load("bd_suppliergroup", "id", number.toArray()); + groupInfo.set("fbasedataid", load[0]); + groupcoll.set(0,groupInfo); + this.getView().getModel().setValue("group",groupcoll); + } + @Override protected void beforeBindData_serviceOrgAndGroup() { DynamicObject dataEntity = this.getModel().getDataEntity(); @@ -34,6 +47,8 @@ public class TycQzSupplierUSAFormPlugin extends RegSupplierEdit { } } + + this.getView().setVisible(multipleServiceFlag && visibleFlag, new String[]{"newentry_serviceorg", "deleteentry_serviceorg"}); if (dataEntity.getPkValue() == null || dataEntity.getLong("id") == 0L) { DynamicObject belongOrgEntry = dataEntity.getDynamicObject("serviceorg"); @@ -48,6 +63,7 @@ public class TycQzSupplierUSAFormPlugin extends RegSupplierEdit { DynamicObject[] load1 = BusinessDataServiceHelper.load("bos_org", "id", qFilter.toArray()); if (load1!=null&&load1.length>0) { serviceOrg.set("orgarea", load1[0]); + this.getView().getModel().setValue("serviceorg",load1[0]);//新增默认组织 } DynamicObjectCollection supGroupColl = serviceOrg.getDynamicObjectCollection("supgroup"); DynamicObject supGroup = supGroupColl.addNew();