优化代码
This commit is contained in:
parent
e0c6e8ab2e
commit
3fc910857d
|
@ -29,7 +29,8 @@ public class ContractFilterPlugin extends AbstractBillPlugIn implements Plugin,
|
||||||
supplies.addBeforeF7SelectListener(this);
|
supplies.addBeforeF7SelectListener(this);
|
||||||
BasedataEdit qdlx = this.getControl("treeresourceitem");
|
BasedataEdit qdlx = this.getControl("treeresourceitem");
|
||||||
qdlx.addBeforeF7SelectListener(this);
|
qdlx.addBeforeF7SelectListener(this);
|
||||||
|
BasedataEdit contractprocess = this.getControl("zcgj_contractprocess");
|
||||||
|
contractprocess.addBeforeF7SelectListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -67,6 +68,17 @@ public class ContractFilterPlugin extends AbstractBillPlugIn implements Plugin,
|
||||||
showParameter.setCustomParam("contractType",contractType.getString("number"));
|
showParameter.setCustomParam("contractType",contractType.getString("number"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else if (name1.equals("zcgj_contractprocess")) {
|
||||||
|
String name = this.getModel().getDataEntity().getDataEntityType().getName();
|
||||||
|
if(name.equals("ec_in_contract")){
|
||||||
|
Object project = this.getModel().getValue("project");
|
||||||
|
if(project!=null){
|
||||||
|
DynamicObject projectInfo = (DynamicObject)project;
|
||||||
|
QFilter qFilter = new QFilter("project.id", QCP.equals, projectInfo.getLong("id"));
|
||||||
|
ListShowParameter showParameter = (ListShowParameter) beforeF7SelectEvent.getFormShowParameter();
|
||||||
|
showParameter.getListFilterParameter().getQFilters().add(qFilter);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -18,7 +18,7 @@ import java.util.EventObject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单据界面插件
|
* 单据界面插件
|
||||||
* 收入合同结算供应商变更插件
|
* 支出合同结算供应商变更插件
|
||||||
*/
|
*/
|
||||||
public class ContractSettleBillPlugin extends AbstractBillPlugIn implements Plugin {
|
public class ContractSettleBillPlugin extends AbstractBillPlugIn implements Plugin {
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,8 @@ public class EcContractFromPlugin extends AbstractBillPlugIn implements Plugin {
|
||||||
// this.getModel().setValue("zcgj_pjnhbhshte", amount);
|
// this.getModel().setValue("zcgj_pjnhbhshte", amount);
|
||||||
// this.getModel().setValue("zcgj_pjnhse", rate);
|
// this.getModel().setValue("zcgj_pjnhse", rate);
|
||||||
} else if (name.equals("zcgj_pjnhbhshte")) {
|
} else if (name.equals("zcgj_pjnhbhshte")) {
|
||||||
Object zcgjPjnhhshte = this.getModel().getValue("zcgj_pjnhbhshte");
|
// Object zcgjPjnhhshte = this.getModel().getValue("zcgj_pjnhbhshte");
|
||||||
|
Object zcgjPjnhhshte = changeData.getNewValue();
|
||||||
System.out.println();
|
System.out.println();
|
||||||
if (zcgjPjnhhshte != null) {
|
if (zcgjPjnhhshte != null) {
|
||||||
amount = new BigDecimal(zcgjPjnhhshte.toString());
|
amount = new BigDecimal(zcgjPjnhhshte.toString());
|
||||||
|
@ -57,6 +58,7 @@ public class EcContractFromPlugin extends AbstractBillPlugIn implements Plugin {
|
||||||
rate = ofamount.subtract(amount);
|
rate = ofamount.subtract(amount);
|
||||||
// this.getModel().setValue("zcgj_pjnhhshte", ofamount);
|
// this.getModel().setValue("zcgj_pjnhhshte", ofamount);
|
||||||
// this.getModel().setValue("zcgj_pjnhse", rate);
|
// this.getModel().setValue("zcgj_pjnhse", rate);
|
||||||
|
dataEntity.set("zcgj_pjnhbhshte", amount);
|
||||||
dataEntity.set("zcgj_pjnhhshte", ofamount);
|
dataEntity.set("zcgj_pjnhhshte", ofamount);
|
||||||
dataEntity.set("zcgj_pjnhse", rate);
|
dataEntity.set("zcgj_pjnhse", rate);
|
||||||
}else if (name.equals("zcgj_yjhshtsr")) {
|
}else if (name.equals("zcgj_yjhshtsr")) {
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
package zcgj.zcdev.zcdev.pr.plugin.form;
|
package zcgj.zcdev.zcdev.pr.plugin.form;
|
||||||
|
|
||||||
|
import kd.bos.entity.tree.TreeNode;
|
||||||
import kd.bos.form.FormShowParameter;
|
import kd.bos.form.FormShowParameter;
|
||||||
|
import kd.bos.form.IPageCache;
|
||||||
|
import kd.bos.form.control.TreeView;
|
||||||
|
import kd.ec.basedata.common.enums.ResourceTypeEnum;
|
||||||
import kd.ec.basedata.formplugin.ResourceFilterPlugin;
|
import kd.ec.basedata.formplugin.ResourceFilterPlugin;
|
||||||
|
import kd.ec.basedata.formplugin.ResourceItemListPlugin;
|
||||||
|
|
||||||
import java.util.EventObject;
|
import java.util.EventObject;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
public class ResourceFilterExtPlugin extends ResourceFilterPlugin {
|
public class ResourceFilterExtPlugin extends ResourceItemListPlugin {
|
||||||
@Override
|
@Override
|
||||||
public void afterBindData(EventObject e) {
|
public void afterBindData(EventObject e) {
|
||||||
super.afterBindData(e);
|
super.afterBindData(e);
|
||||||
|
@ -17,14 +22,21 @@ public class ResourceFilterExtPlugin extends ResourceFilterPlugin {
|
||||||
if (contractType.toString().equals("wzcg")) {//物资采购
|
if (contractType.toString().equals("wzcg")) {//物资采购
|
||||||
this.getView().setVisible(true, new String[]{"flexpanelmaterial"});
|
this.getView().setVisible(true, new String[]{"flexpanelmaterial"});
|
||||||
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelturnover","flexpanelother"});
|
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelturnover","flexpanelother"});
|
||||||
|
this.setResourceTypeStyle("material");
|
||||||
|
this.afterSelectedTag("material");
|
||||||
} else if (contractType.toString().equals("sbcg")) {//设备采购
|
} else if (contractType.toString().equals("sbcg")) {//设备采购
|
||||||
this.getView().setVisible(true, new String[]{"flexpanelequipment"});
|
this.getView().setVisible(true, new String[]{"flexpanelequipment"});
|
||||||
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelmaterial", "flexpanelturnover","flexpanelother"});
|
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")) {//产出物
|
}else if (contractType.toString().equals("qtcc") || contractType.toString().equals("lwlcc")) {//产出物
|
||||||
this.getView().setVisible(true, new String[]{"flexpanelturnover"});
|
this.getView().setVisible(true, new String[]{"flexpanelturnover"});
|
||||||
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelmaterial","flexpanelother"});
|
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelequipment", "flexpanelmaterial","flexpanelother"});
|
||||||
|
this.setResourceTypeStyle("turnover");
|
||||||
|
this.afterSelectedTag("turnover");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
System.out.println();
|
System.out.println();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue