优化代码
This commit is contained in:
parent
de4a2d76a6
commit
7eb7bc216b
|
@ -18,24 +18,29 @@ public class ResourceFilterExtPlugin extends ResourceItemListPlugin {
|
|||
FormShowParameter formShowParameter = this.getView().getFormShowParameter();
|
||||
Map<String, Object> customParams = formShowParameter.getCustomParams();
|
||||
Object contractType = customParams.get("contractType");
|
||||
if (contractType != null) {
|
||||
if (contractType.toString().equals("wzcg")) {//物资采购
|
||||
this.getView().setVisible(true, new String[]{"flexpanelmaterial"});
|
||||
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelturnover","flexpanelother"});
|
||||
this.setResourceTypeStyle("material");
|
||||
this.afterSelectedTag("material");
|
||||
} else if (contractType.toString().equals("cs2")) {//设备采购
|
||||
this.getView().setVisible(true, new String[]{"flexpanelequipment"});
|
||||
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelmaterial", "flexpanelturnover","flexpanelother"});
|
||||
this.setResourceTypeStyle("equipment");
|
||||
this.afterSelectedTag("equipment");
|
||||
}else if (contractType.toString().equals("qtcc") || contractType.toString().equals("lwlcc")) {//产出物
|
||||
this.getView().setVisible(true, new String[]{"flexpanelturnover"});
|
||||
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelmaterial","flexpanelother"});
|
||||
this.setResourceTypeStyle("turnover");
|
||||
this.afterSelectedTag("turnover");
|
||||
String firstOpen = this.getPageCache().get("firstOpen");
|
||||
if (firstOpen != null) {
|
||||
this.getPageCache().put("firstOpen", "false");
|
||||
if (contractType != null) {
|
||||
if (contractType.toString().equals("wzcg")) {//物资采购
|
||||
this.getView().setVisible(true, new String[]{"flexpanelmaterial"});
|
||||
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelturnover","flexpanelother"});
|
||||
this.setResourceTypeStyle("material");
|
||||
this.afterSelectedTag("material");
|
||||
} else if (contractType.toString().equals("cs2")) {//设备采购
|
||||
this.getView().setVisible(true, new String[]{"flexpanelequipment"});
|
||||
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelmaterial", "flexpanelturnover","flexpanelother"});
|
||||
this.setResourceTypeStyle("equipment");
|
||||
this.afterSelectedTag("equipment");
|
||||
}else if (contractType.toString().equals("qtcc") || contractType.toString().equals("lwlcc")) {//产出物
|
||||
this.getView().setVisible(true, new String[]{"flexpanelturnover"});
|
||||
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelmaterial","flexpanelother"});
|
||||
this.setResourceTypeStyle("turnover");
|
||||
this.afterSelectedTag("turnover");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println();
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue