package tqq9.lc123.cloud.app.plugin.form.sys; import kd.bos.bill.AbstractBillPlugIn; import kd.bos.dataentity.entity.DynamicObject; import kd.bos.dataentity.utils.StringUtils; import kd.bos.form.FormShowParameter; import kd.bos.form.control.AttachmentPanel; import kd.bos.form.events.AfterDoOperationEventArgs; import kd.sdk.plugin.Plugin; import java.util.EventObject; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 附件上传界面插件 */ public class upattAchmentBillPlugin extends AbstractBillPlugIn implements Plugin { @Override public void registerListener(EventObject e) { super.registerListener(e); this.addItemClickListeners("tqq9_toolbarap"); } /** * 由商品批次注册证管理界面跳转此界面,选择附件后回传相关信息 */ @Override public void afterDoOperation(AfterDoOperationEventArgs afterDoOperationEventArgs) { super.afterDoOperation(afterDoOperationEventArgs); String itemKey = afterDoOperationEventArgs.getOperateKey(); if (StringUtils.equals("donothing", itemKey)) { FormShowParameter formShowParameter = this.getView().getFormShowParameter(); String buttontype = formShowParameter.getCustomParam("buttontype").toString(); String id = formShowParameter.getCustomParam("id").toString(); AttachmentPanel tqq9_attachmentpanelap = this.getView().getControl("tqq9_attachmentpanelap"); List> attachmentData = tqq9_attachmentpanelap.getAttachmentData(); HashMap map = new HashMap<>(); map.put("attachmentData", attachmentData); map.put("buttontype", buttontype); map.put("id", id); this.getView().returnDataToParent(map); this.getView().close(); } } }