From 35312eb62b1339cebd065e0b2731f8ec6390408f Mon Sep 17 00:00:00 2001 From: zhangzhiguo <421587375@qq.com> Date: Tue, 26 Aug 2025 14:07:49 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B5=84=E9=87=91=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E4=BB=98=E6=AC=BE=E5=A4=84=E7=90=86=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zcdev/fs/plugin/operate/CasPaybillToEcFundPlanApplyOp.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/operate/CasPaybillToEcFundPlanApplyOp.java b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/operate/CasPaybillToEcFundPlanApplyOp.java index d2b6023..b12ffd7 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/operate/CasPaybillToEcFundPlanApplyOp.java +++ b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/operate/CasPaybillToEcFundPlanApplyOp.java @@ -62,7 +62,7 @@ public class CasPaybillToEcFundPlanApplyOp extends AbstractOperationServicePlugI String typeString = ""; if(settletype!=null){ String type = settletype.getString("number"); - if("002".equals(type)){ //司库-对公 + if("002".equals(type) || "JSFS04".equals(type)){ //司库-对公/电汇 //现金 typeString = "XJ"; }else if("JSFS07".equals(type)){ //银行承兑汇票 From 920644b29e3af9e9702bd426b463946b59f0c8b8 Mon Sep 17 00:00:00 2001 From: zhangzhiguo <421587375@qq.com> Date: Tue, 26 Aug 2025 14:08:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=AF=B9=E5=85=AC=E6=8A=A5=E9=94=80?= =?UTF-8?q?=E5=8D=95=E6=97=A0=E5=90=88=E5=90=8C=E4=BB=98=E6=AC=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/form/CostcompanyDefaultPlugin.java | 3 +- .../PublicreimbursebillNoContractPlugin.java | 105 ++++++++++++++---- 2 files changed, 85 insertions(+), 23 deletions(-) diff --git a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/CostcompanyDefaultPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/CostcompanyDefaultPlugin.java index b28beff..fc9d454 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/CostcompanyDefaultPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/CostcompanyDefaultPlugin.java @@ -60,7 +60,8 @@ public class CostcompanyDefaultPlugin extends AbstractBillPlugIn implements Plu }else if("er_publicreimbursebill".equals(billFormId)){ //对公报销单隐藏 个人 Object company = this.getModel().getValue("costcompany");//核算组织 - if(company!=null) { + boolean isec=(boolean)this.getModel().getValue("zcgj_isec"); + if(company!=null && !isec) { DynamicObject companyObj = (DynamicObject) company; Long companyId = companyObj.getLong("id"); if (OrgCheckUtils.isKS(companyId)) { diff --git a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/PublicreimbursebillNoContractPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/PublicreimbursebillNoContractPlugin.java index 57e3974..2b11f8d 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/PublicreimbursebillNoContractPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-fs/src/main/java/zcgj/zcdev/zcdev/fs/plugin/form/PublicreimbursebillNoContractPlugin.java @@ -4,6 +4,7 @@ import kd.bos.bill.AbstractBillPlugIn; import kd.bos.bill.BillShowParameter; import kd.bos.bill.OperationStatus; import kd.bos.dataentity.entity.DynamicObject; +import kd.bos.dataentity.entity.DynamicObjectCollection; import kd.bos.dataentity.entity.LocaleString; import kd.bos.dataentity.metadata.IDataEntityProperty; import kd.bos.dataentity.resource.ResManager; @@ -14,10 +15,13 @@ import kd.bos.form.ClientProperties; import kd.bos.form.FormShowParameter; import kd.bos.form.control.AttachmentPanel; import kd.bos.form.control.EntryGrid; +import kd.bos.form.control.events.ItemClickEvent; import kd.bos.form.events.AfterDoOperationEventArgs; import kd.bos.form.events.PreOpenFormEventArgs; import kd.bos.form.events.SetFilterEvent; import kd.bos.form.field.BasedataEdit; +import kd.bos.form.field.ComboEdit; +import kd.bos.form.field.ComboItem; import kd.bos.form.field.RefBillEdit; import kd.bos.form.field.events.BeforeF7SelectEvent; import kd.bos.form.field.events.BeforeF7SelectListener; @@ -63,6 +67,7 @@ public class PublicreimbursebillNoContractPlugin extends AbstractBillPlugIn impl this.getView().setFormTitle(new LocaleString("无合同付款申请单")); this.getModel().setValue("zcgj_nocontract","NOCONTRACT"); this.getView().setEnable(false,"zcgj_nocontract"); + this.getView().setVisible(false,"zcgj_nocontract"); //修改单据体高级面板字段名称 Map cyf = new HashMap(); @@ -72,6 +77,15 @@ public class PublicreimbursebillNoContractPlugin extends AbstractBillPlugIn impl this.getView().updateControlMetadata("advconap", cyf1);//参数1:单据体标识 this.getView().updateView("advconap"); + String eEcpaytype = (String) this.getModel().getValue("zcgj_ecpaytype"); + List comboList = new ArrayList<>(); + if("DG".equals(eEcpaytype)){ + comboList.add(new ComboItem(new LocaleString("供应商"), "bd_supplier")); + }else if("DS".equals(eEcpaytype)){ + comboList.add(new ComboItem(new LocaleString("个人"), "er_payeer")); + } + ComboEdit comboEdit = getView().getControl("payertype"); + comboEdit.setComboItems(comboList); } BillShowParameter bsp=(BillShowParameter)this.getView().getFormShowParameter(); if(bsp.getStatus()!=OperationStatus.ADDNEW){ @@ -86,10 +100,12 @@ public class PublicreimbursebillNoContractPlugin extends AbstractBillPlugIn impl this.getModel().setValue("zcgj_ec_project", project[0]); } } + List comboList = new ArrayList<>(); + comboList.add(new ComboItem(new LocaleString("供应商"), "bd_supplier")); + //comboList.add(new ComboItem(new LocaleString("个人"), "er_payeer")); + ComboEdit comboEdit = getView().getControl("payertype"); + comboEdit.setComboItems(comboList); } - /* EntryGrid entryGrid = this.getControl("writeoffmoney"); - entryGrid.setColumnProperty("advconap", - ClientProperties.Header, new LocaleString("冲预付"));*/ } } @@ -137,7 +153,27 @@ public class PublicreimbursebillNoContractPlugin extends AbstractBillPlugIn impl this.getModel().setValue("zcgj_ec_project", project[0]); } } + }else if(name.equals("zcgj_ecpaytype")){ + ChangeData changeData = e.getChangeSet()[0]; + String ecpaytype = (String)changeData.getNewValue(); + DynamicObjectCollection accountentry = this.getModel().getDataEntity().getDynamicObjectCollection("accountentry"); + accountentry.clear(); + DynamicObject dynamicObject = accountentry.addNew(); + + List comboList = new ArrayList<>(); + if("DG".equals(ecpaytype)){ + comboList.add(new ComboItem(new LocaleString("供应商"), "bd_supplier")); + dynamicObject.set("payertype","bd_supplier"); + }else if("DS".equals(ecpaytype)){ + comboList.add(new ComboItem(new LocaleString("个人"), "er_payeer")); + dynamicObject.set("payertype","er_payeer"); + } + ComboEdit comboEdit = getView().getControl("payertype"); + comboEdit.setComboItems(comboList); + + this.getView().updateView("accountentry"); } + } } @@ -151,6 +187,9 @@ public class PublicreimbursebillNoContractPlugin extends AbstractBillPlugIn impl RefBillEdit zcgj_maintenanceack = this.getView().getControl("zcgj_maintenanceack");//设备维修确认单 zcgj_maintenanceack.addBeforeF7SelectListener(this); + + this.addItemClickListeners("receiveentrytoolbar");//收款信息 增行 + } } @@ -163,35 +202,57 @@ public class PublicreimbursebillNoContractPlugin extends AbstractBillPlugIn impl if("zcgj_materialinbill".equals(propertyName)){ //费用承担公司过滤 DynamicObject billpayerid = (DynamicObject)this.getModel().getValue("billpayerid"); DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany"); - if(billpayerid!=null && costcompany!=null){ + List qFilter = new ArrayList<>(); + if(billpayerid!=null ){ Long payerid = billpayerid.getLong("id"); - Long companyId = costcompany.getLong("id"); - List qFilter = new ArrayList<>(); qFilter.add(new QFilter("supplier", QCP.equals, payerid)); - qFilter.add(new QFilter("fiaccountorg", QCP.equals, companyId)); - qFilter.add(new QFilter("billstatus", QCP.equals, "C")); - formShowParameter.getListFilterParameter().setQFilters(qFilter); - }else{ - this.getView().showTipNotification("费用承担公司或往来单位不能为空"); - beforeF7SelectEvent.setCancel(true); } + if(costcompany!=null){ + Long companyId = costcompany.getLong("id"); + qFilter.add(new QFilter("fiaccountorg", QCP.equals, companyId)); + } + qFilter.add(new QFilter("billstatus", QCP.equals, "C")); + formShowParameter.getListFilterParameter().setQFilters(qFilter); }else if("zcgj_maintenanceack".equals(propertyName)){ DynamicObject billpayerid = (DynamicObject)this.getModel().getValue("billpayerid"); DynamicObject costcompany = (DynamicObject)this.getModel().getValue("costcompany"); - if(billpayerid!=null && costcompany!=null){ + List qFilter = new ArrayList<>(); + if(billpayerid!=null){ Long payerid = billpayerid.getLong("id"); - Long companyId = costcompany.getLong("id"); - List qFilter = new ArrayList<>(); qFilter.add(new QFilter("entryentity.zcgj_supplier", QCP.equals, payerid)); - qFilter.add(new QFilter("zcgj_accountorg", QCP.equals, companyId)); - qFilter.add(new QFilter("zcgj_maintype", QCP.equals, "10")); - qFilter.add(new QFilter("billstatus", QCP.equals, "C")); - formShowParameter.getListFilterParameter().setQFilters(qFilter); - }else{ - this.getView().showTipNotification("费用承担公司或往来单位不能为空"); - beforeF7SelectEvent.setCancel(true); + } + if(costcompany!=null){ + Long companyId = costcompany.getLong("id"); + qFilter.add(new QFilter("zcgj_accountorg", QCP.equals, companyId)); + } + + qFilter.add(new QFilter("zcgj_maintype", QCP.equals, "10")); + qFilter.add(new QFilter("billstatus", QCP.equals, "C")); + formShowParameter.getListFilterParameter().setQFilters(qFilter); + } } + @Override + public void itemClick(ItemClickEvent evt) { + super.itemClick(evt); + //付款计划增行 + if (evt.getItemKey().equals("addaccount1")) { + String zcgjEcpaytype = (String) this.getModel().getValue("zcgj_ecpaytype"); + String payertype = ""; + if("DG".equals(zcgjEcpaytype)){ + payertype = "bd_supplier"; + }else if("DS".equals(zcgjEcpaytype)){ + payertype = "er_payeer"; + } + //收款人类型设置默认值 + DynamicObjectCollection dynamicObjectCollection = this.getModel().getDataEntity(true).getDynamicObjectCollection("accountentry"); + if(!dynamicObjectCollection.isEmpty()){ + DynamicObject dynamicObject = dynamicObjectCollection.get(dynamicObjectCollection.size() - 1); + dynamicObject.set("payertype",payertype); + this.getView().updateView("accountentry"); + } + } + } }