采购申请单中点击资源编码后弹出的资源清单面板添加过滤

This commit is contained in:
xuhaihui 2025-09-09 16:10:35 +08:00
parent 515b9157e3
commit e9f1227c1e
1 changed files with 21 additions and 13 deletions

View File

@ -21,9 +21,11 @@ public class ResourceFilterExtPlugin extends ResourceItemListPlugin {
// this.getPageCache().put("firstOpen", "false");
this.getPageCache().put("firstOpen","false");
// this.setResourceTypeStyle("material");
Object originFormId = customParams.get("originFormId");//源表单ID
if (originFormId != null && originFormId.equals("ecma_purchaseapply")) {
//采购申请单
this.setResourceTypeStyle("material");
}
// this.afterSelectedTag("material");
// contractType="ck";
@ -71,35 +73,41 @@ public class ResourceFilterExtPlugin extends ResourceItemListPlugin {
// }
}
}
Object originFormId = customParams.get("originFormId");//源表单ID
if (originFormId != null && originFormId.equals("ecma_purchaseapply")) {
//采购申请单
this.getView().setVisible(true, new String[]{"flexpanelmaterial"});
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelturnover", "flexpanelother"});
}
}
@Override
public void registerListener(EventObject e) {
Image subLabel = (Image)this.getView().getControl("sub");
Image subLabel = (Image) this.getView().getControl("sub");
subLabel.addClickListener(this);
Image labourLabel = (Image)this.getView().getControl("labour");
Image labourLabel = (Image) this.getView().getControl("labour");
labourLabel.addClickListener(this);
Image materialLabel = (Image)this.getView().getControl("material");
Image materialLabel = (Image) this.getView().getControl("material");
materialLabel.addClickListener(this);
Image equipmentLabel = (Image)this.getView().getControl("equipment");
Image equipmentLabel = (Image) this.getView().getControl("equipment");
equipmentLabel.addClickListener(this);
Image turnoverLabel = (Image)this.getView().getControl("turnover");
Image turnoverLabel = (Image) this.getView().getControl("turnover");
turnoverLabel.addClickListener(this);
Image otherLabel = (Image)this.getView().getControl("other");
Image otherLabel = (Image) this.getView().getControl("other");
otherLabel.addClickListener(this);
Image compositeLabel = (Image)this.getView().getControl("composite");
Image compositeLabel = (Image) this.getView().getControl("composite");
if (compositeLabel != null) {
compositeLabel.addClickListener(this);
}
Search treeSearch = (Search)this.getView().getControl("treesearchap");
Search treeSearch = (Search) this.getView().getControl("treesearchap");
treeSearch.addEnterListener(this);
Button callbackuploadbtn = (Button)this.getView().getControl("callbackuploadbtn");
Button callbackuploadbtn = (Button) this.getView().getControl("callbackuploadbtn");
if (callbackuploadbtn != null) {
callbackuploadbtn.addUploadListener(this);
}
Button groupUploadButton = (Button)this.getView().getControl("groupuploadbtn");
Button groupUploadButton = (Button) this.getView().getControl("groupuploadbtn");
if (groupUploadButton != null) {
groupUploadButton.addUploadListener(this);
}