From 023dbdc7ca07842673a0859b023397f9911fc1f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=9D=96?= Date: Tue, 18 Jun 2024 18:42:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E5=8F=B0=E8=B4=A6=20?= =?UTF-8?q?=E4=B8=8B=E6=8E=A8=E9=A2=84=E4=BB=98=E5=8D=95=20or=20=E5=AF=B9?= =?UTF-8?q?=E5=85=AC=E6=8A=A5=E9=94=80=20or=20=E4=B8=8B=E6=8E=A8=E6=9A=82?= =?UTF-8?q?=E4=BC=B0=E5=8D=95=20=E6=A3=80=E6=9F=A5=E5=BD=92=E6=A1=A3?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E7=9A=84=E6=95=B0=E9=87=8F=EF=BC=8C0?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E6=83=85=E5=86=B5=E4=B8=8D=E5=85=81=E8=AE=B8?= =?UTF-8?q?=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fi/em/plugin/ContractBillExtList.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/shkd-cosmic-debug/src/main/java/shkd/fi/em/plugin/ContractBillExtList.java b/shkd-cosmic-debug/src/main/java/shkd/fi/em/plugin/ContractBillExtList.java index 3688d04..72aefb3 100644 --- a/shkd-cosmic-debug/src/main/java/shkd/fi/em/plugin/ContractBillExtList.java +++ b/shkd-cosmic-debug/src/main/java/shkd/fi/em/plugin/ContractBillExtList.java @@ -25,6 +25,7 @@ import kd.bos.form.control.events.UploadEvent; import kd.bos.form.control.events.UploadListener; import kd.bos.form.events.AfterDoOperationEventArgs; import kd.bos.form.events.BeforeDoOperationEventArgs; +import kd.bos.form.operate.FormOperate; import kd.bos.list.plugin.AbstractListPlugin; import kd.bos.logging.Log; import kd.bos.logging.LogFactory; @@ -78,7 +79,23 @@ public class ContractBillExtList extends AbstractListPlugin implements Plugin, U } public void beforeDoOperation(BeforeDoOperationEventArgs args) { - + FormOperate operate = (FormOperate)args.getSource(); + // 下推预付单 or 对公报销 or 下推暂估单 检查补充附件的数量,0件的情况不允许操作 + if("pushtoprepay".equals(operate.getOperateKey()) + || "publicreimburse".equals(operate.getOperateKey()) + || "pushcostestimatebill".equals(operate.getOperateKey())){ + ListSelectedRowCollection selected = args.getListSelectedData(); + for(ListSelectedRow row : selected) { + List> temp2 = AttachmentServiceHelper.getAttachments("er_contractbill", + row.getPrimaryKeyValue() + "", "shkd_attachmentpanelap"); + if(temp2.size() == 0) { + System.out.println(operate.getOperateKey()); + this.getView().showTipNotification("单据编号:" + row.getBillNo() + ", 请先上传归档附件。"); + args.setCancel(true); + return; + } + } + } } @Override