合同过滤
This commit is contained in:
parent
0bbf0a2447
commit
c288a28fe1
|
@ -2,6 +2,7 @@ package zcgj.zcdev.zcdev.pr.plugin.form;
|
|||
|
||||
import kd.bos.bill.AbstractBillPlugIn;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.form.FormShowParameter;
|
||||
import kd.bos.form.field.BasedataEdit;
|
||||
import kd.bos.form.field.events.BeforeF7SelectEvent;
|
||||
import kd.bos.form.field.events.BeforeF7SelectListener;
|
||||
|
@ -26,12 +27,15 @@ public class ContractFilterPlugin extends AbstractBillPlugIn implements Plugin,
|
|||
//给物品基础资料添加beforef7Select事件监听
|
||||
BasedataEdit supplies = this.getControl("contracttype");
|
||||
supplies.addBeforeF7SelectListener(this);
|
||||
BasedataEdit qdlx = this.getControl("treeresourceitem");
|
||||
qdlx.addBeforeF7SelectListener(this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeF7Select(BeforeF7SelectEvent beforeF7SelectEvent) {
|
||||
if (beforeF7SelectEvent.getProperty().getName().equals("contracttype")) {
|
||||
String name1 = beforeF7SelectEvent.getProperty().getName();
|
||||
if (name1.equals("contracttype")) {
|
||||
// int row = beforeF7SelectEvent.getRow();
|
||||
// if (this.getModel().getValue("contracttype") != null) {
|
||||
//判断当前支出还是收入
|
||||
|
@ -55,6 +59,14 @@ public class ContractFilterPlugin extends AbstractBillPlugIn implements Plugin,
|
|||
showParameter.getListFilterParameter().getQFilters().add(qFilter);
|
||||
//设置F7列表左树的过滤条件
|
||||
showParameter.getTreeFilterParameter().getQFilters().add(treeFilter);
|
||||
} else if (name1.equals("treeresourceitem")) {
|
||||
FormShowParameter showParameter = beforeF7SelectEvent.getFormShowParameter();
|
||||
Object contType = this.getModel().getValue("contracttype");
|
||||
if(contType!=null){
|
||||
DynamicObject contractType = (DynamicObject)contType;
|
||||
showParameter.setCustomParam("contractType",contractType.getString("number"));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package zcgj.zcdev.zcdev.pr.plugin.form;
|
||||
|
||||
import kd.bos.form.FormShowParameter;
|
||||
import kd.ec.basedata.formplugin.ResourceFilterPlugin;
|
||||
|
||||
import java.util.EventObject;
|
||||
import java.util.Map;
|
||||
|
||||
public class ResourceFilterExtPlugin extends ResourceFilterPlugin {
|
||||
@Override
|
||||
public void afterBindData(EventObject e) {
|
||||
super.afterBindData(e);
|
||||
FormShowParameter formShowParameter = this.getView().getParentView().getFormShowParameter();
|
||||
Map<String, Object> customParams = formShowParameter.getCustomParams();
|
||||
// customParams.get("contractType")
|
||||
System.out.println();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue