From aeaa780f5f1463ec2f31caa878d999d4969e9c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=B0=8F=E4=BC=9F?= Date: Mon, 12 May 2025 13:58:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=98=E6=AC=BE=E7=94=B3=E8=AF=B7=E5=8D=95?= =?UTF-8?q?=20=E5=80=99=E8=A1=A5=E5=8F=91=E7=A5=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/SupplementInvoiceBillPlugin.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/SupplementInvoiceBillPlugin.java b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/SupplementInvoiceBillPlugin.java index 8b931fe..e2400f8 100644 --- a/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/SupplementInvoiceBillPlugin.java +++ b/code/zcdev/zcgj-zcdev-zcdev-pr/src/main/java/zcgj/zcdev/zcdev/pr/plugin/form/SupplementInvoiceBillPlugin.java @@ -190,7 +190,12 @@ public class SupplementInvoiceBillPlugin extends PaymentApplyEditUI { this.getModel().setValue("oftaxinvoiceamount", invoice.getBigDecimal("totaloftaxamount"), rowIndex); this.getModel().setValue("unapplyinvoftaxamt", invoice.getBigDecimal("unapplyamount"), rowIndex); this.getModel().setValue("unapplyinvtax", invoice.getBigDecimal("unapplyinvtax"), rowIndex); - this.getModel().setValue("applyinvoftaxamt", invoice.getBigDecimal("unapplyamount"), rowIndex); + if(rows.size() == 1) { + this.setSingleApplyinvoftaxamt(); + }else { + this.getModel().setValue("applyinvoftaxamt", invoice.getBigDecimal("unapplyamount"), rowIndex); + } + invArr[index++] = invoice; invoice.set("isclaimed", true); int upCurIndex = this.getModel().getEntryCurrentRowIndex("entryentity"); @@ -200,7 +205,7 @@ public class SupplementInvoiceBillPlugin extends PaymentApplyEditUI { invoice.set("connecttype", "contract"); } - this.setSingeapplyinvoftaxamt(); + // this.setApplyAmtByInvoice(this.getModel().getEntryCurrentRowIndex("entryentity")); log.info("SupplementInvoiceBillPlugin:发票保存"); @@ -209,7 +214,7 @@ public class SupplementInvoiceBillPlugin extends PaymentApplyEditUI { this.setEnableByInvoice1(); } - private void setSingeapplyinvoftaxamt() { + private void setSingleApplyinvoftaxamt() { int rowCount = this.getModel().getEntryRowCount("subentryentity");//获取子单据分录行数 log.info("SupplementInvoiceBillPlugin:子单据体分录行数:"+rowCount); EntryGrid grid = (EntryGrid)this.getView().getControl("entryentity");//获取单据体控件-合同付款信息 @@ -218,9 +223,10 @@ public class SupplementInvoiceBillPlugin extends PaymentApplyEditUI { DynamicObject rowEntity = this.getModel().getEntryRowEntity("entryentity", entity_rows[0]);//获取对应行的单据体 BigDecimal applyoftaxamount = rowEntity.getBigDecimal("thisapplyoftax");//获取单据体对应的 本次申请金额 log.info("SupplementInvoiceBillPlugin:选中的单据体的申请金额数量:" + applyoftaxamount); - if(rowCount==1){ - this.getModel().setValue("applyinvoftaxamt", applyoftaxamount,0); - } + this.getModel().setValue("applyinvoftaxamt", applyoftaxamount,0); +// if(rowCount==1){ +// this.getModel().setValue("applyinvoftaxamt", applyoftaxamount,0); +// } } protected void setEnableByInvoice1() {