|  | @@ -0,0 +1,62 @@
 | 
	
		
			
				|  |  | +package fi.ap.formplugin;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import com.alibaba.druid.util.StringUtils;
 | 
	
		
			
				|  |  | +import kd.bos.dataentity.entity.DynamicObject;
 | 
	
		
			
				|  |  | +import kd.bos.form.CloseCallBack;
 | 
	
		
			
				|  |  | +import kd.bos.form.ShowType;
 | 
	
		
			
				|  |  | +import kd.bos.form.StyleCss;
 | 
	
		
			
				|  |  | +import kd.bos.form.events.ClosedCallBackEvent;
 | 
	
		
			
				|  |  | +import kd.bos.form.plugin.AbstractFormPlugin;
 | 
	
		
			
				|  |  | +import kd.bos.report.ReportShowParameter;
 | 
	
		
			
				|  |  | +import kd.sdk.plugin.Plugin;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import java.util.EventObject;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +/**
 | 
	
		
			
				|  |  | + * @author cjz
 | 
	
		
			
				|  |  | + * @date 2024/11/5 15:47
 | 
	
		
			
				|  |  | + * @description:应付挂账跳转到报表
 | 
	
		
			
				|  |  | + */
 | 
	
		
			
				|  |  | +public class FinapbillFormPlugin extends AbstractFormPlugin implements Plugin {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    //初始化自动点击跳转按钮
 | 
	
		
			
				|  |  | +    @Override
 | 
	
		
			
				|  |  | +    public void afterBindData(EventObject e) {
 | 
	
		
			
				|  |  | +        super.afterBindData(e);
 | 
	
		
			
				|  |  | +        Object flag = this.getView().getFormShowParameter().getCustomParam("flag");
 | 
	
		
			
				|  |  | +        Object asstacttype=this.getView().getFormShowParameter().getCustomParam("asstacttype");
 | 
	
		
			
				|  |  | +        //如果为预警跳转的页面则自动点击跳转按钮到报表
 | 
	
		
			
				|  |  | +        if (("1").equals(flag)) {
 | 
	
		
			
				|  |  | +            //获取当前单据
 | 
	
		
			
				|  |  | +            DynamicObject dynamicObject=this.getModel().getDataEntity(true);
 | 
	
		
			
				|  |  | +            Long id=dynamicObject.getLong("id");
 | 
	
		
			
				|  |  | +            ReportShowParameter showParameter = new ReportShowParameter();
 | 
	
		
			
				|  |  | +            //设置参数传给子界面
 | 
	
		
			
				|  |  | +            showParameter.setCustomParam("parentid",id);
 | 
	
		
			
				|  |  | +            showParameter.setCustomParam("flag",flag);
 | 
	
		
			
				|  |  | +            //设置初始化往来类型
 | 
	
		
			
				|  |  | +            showParameter.setCustomParam("q_asstacttype",asstacttype);
 | 
	
		
			
				|  |  | +            showParameter.setFormId("ap_acctagerpt_n");
 | 
	
		
			
				|  |  | +            showParameter.setCaption("账龄分析表");
 | 
	
		
			
				|  |  | +            showParameter.getOpenStyle().setShowType(ShowType.Modal);
 | 
	
		
			
				|  |  | +            StyleCss inlineStyleCss = new StyleCss();
 | 
	
		
			
				|  |  | +            inlineStyleCss.setHeight("1800");
 | 
	
		
			
				|  |  | +            inlineStyleCss.setWidth("1500");
 | 
	
		
			
				|  |  | +            showParameter.getOpenStyle().setInlineStyleCss(inlineStyleCss);
 | 
	
		
			
				|  |  | +            showParameter.setCloseCallBack(new CloseCallBack(this,"ap_acctagerpt_n"));
 | 
	
		
			
				|  |  | +            this.getView().showForm(showParameter);
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    //账龄分析表关闭后,同时关闭应收挂账单
 | 
	
		
			
				|  |  | +    @Override
 | 
	
		
			
				|  |  | +    public void closedCallBack(ClosedCallBackEvent e) {
 | 
	
		
			
				|  |  | +        super.closedCallBack(e);
 | 
	
		
			
				|  |  | +        if (StringUtils.equals("ap_acctagerpt_n",e.getActionId())) {
 | 
	
		
			
				|  |  | +            this.getModel().setDataChanged(false);
 | 
	
		
			
				|  |  | +            this.getView().close();
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +}
 |