付款收款会计科目过滤
This commit is contained in:
		
							parent
							
								
									785132b439
								
							
						
					
					
						commit
						75e5298a95
					
				| 
						 | 
					@ -0,0 +1,34 @@
 | 
				
			||||||
 | 
					package zcgj.zcdev.zcdev.pr.plugin.form;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import kd.bos.bill.AbstractBillPlugIn;
 | 
				
			||||||
 | 
					import kd.bos.form.control.events.BeforeItemClickEvent;
 | 
				
			||||||
 | 
					import kd.sdk.plugin.Plugin;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.EventObject;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 *  收付款申请单选择合同时项目提醒插件
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					public class ContractSelectProjectPlugin extends AbstractBillPlugIn implements Plugin {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void registerListener(EventObject e) {
 | 
				
			||||||
 | 
					        super.registerListener(e);
 | 
				
			||||||
 | 
					//监听工具栏按钮点击事件
 | 
				
			||||||
 | 
					        this.addItemClickListeners("entrytoolbar");
 | 
				
			||||||
 | 
					        //this.addClickListeners("advcontoolbarap");
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override
 | 
				
			||||||
 | 
					    public void beforeItemClick(BeforeItemClickEvent evt) {
 | 
				
			||||||
 | 
					        //工具栏上的所有按钮的点击都会激活itemClick和beforeItemClick方法,	需	//要开发人员实现不同按钮的逻辑
 | 
				
			||||||
 | 
					        if (evt.getItemKey().equals("selectcontract")) {
 | 
				
			||||||
 | 
					            Object project = this.getModel().getValue("project");
 | 
				
			||||||
 | 
					            if(project == null) {
 | 
				
			||||||
 | 
					                evt.setCancel(true);
 | 
				
			||||||
 | 
					                this.getView().showErrorNotification("请选择项目");
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        super.beforeItemClick(evt);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue