优化代码 合同支出报错处理 供应商变更改为乙方
This commit is contained in:
parent
cbd1fda133
commit
de4a2d76a6
|
@ -30,8 +30,10 @@ public class ContractFilterPlugin extends AbstractBillPlugIn implements Plugin,
|
|||
BasedataEdit qdlx = this.getControl("treeresourceitem");
|
||||
qdlx.addBeforeF7SelectListener(this);
|
||||
BasedataEdit contractprocess = this.getControl("zcgj_contractprocess");
|
||||
if(contractprocess != null) {
|
||||
contractprocess.addBeforeF7SelectListener(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beforeF7Select(BeforeF7SelectEvent beforeF7SelectEvent) {
|
||||
|
|
|
@ -28,10 +28,10 @@ public class ContractSettleBillPlugin extends AbstractBillPlugIn implements Plug
|
|||
Object changetype = this.getModel().getValue("changetype");
|
||||
if(changetype!=null){
|
||||
if(changetype.toString().equals("03")){
|
||||
this.getView().setVisible(true,"zcgj_parta");
|
||||
this.getView().setVisible(true,"zcgj_partb");
|
||||
this.getView().setVisible(true,"zcgj_otherpart");
|
||||
}else {
|
||||
this.getView().setVisible(false,"zcgj_parta");
|
||||
this.getView().setVisible(false,"zcgj_partb");
|
||||
this.getView().setVisible(false,"zcgj_otherpart");
|
||||
}
|
||||
}
|
||||
|
@ -68,17 +68,17 @@ public class ContractSettleBillPlugin extends AbstractBillPlugIn implements Plug
|
|||
Object contract = this.getModel().getValue("contract");
|
||||
DynamicObject contractInfo = (DynamicObject) contract;
|
||||
String billName = contractInfo.getDataEntityType().getName();
|
||||
DynamicObject zcgjParta = (DynamicObject)this.getModel().getValue("zcgj_parta");
|
||||
DynamicObject zcgjpartb = (DynamicObject)this.getModel().getValue("zcgj_partb");
|
||||
Object zcgjOtherpart = this.getModel().getValue("zcgj_otherpart");
|
||||
if (billName.equals("ec_out_contract_f7")) {
|
||||
QFilter f1 = new QFilter("number", "=", contractInfo.getString("number"));
|
||||
DynamicObject outContractF7 = BusinessDataServiceHelper.loadSingle("ec_out_contract_f7", new QFilter[]{f1});
|
||||
outContractF7.set("parta",zcgjParta);
|
||||
outContractF7.set("partb",zcgjpartb);
|
||||
OperationResult saveOperationResult = SaveServiceHelper.saveOperate("ec_out_contract_f7", new DynamicObject[]{outContractF7}, null);//支出合同F7实体
|
||||
|
||||
QFilter f2 = new QFilter("billno", "=", contractInfo.getString("number"));
|
||||
DynamicObject outContract = BusinessDataServiceHelper.loadSingle("ec_out_contract", new QFilter[]{f2});
|
||||
outContract.set("parta",zcgjParta);
|
||||
outContract.set("partb",zcgjpartb);
|
||||
if(zcgjOtherpart!=null){
|
||||
DynamicObjectCollection otherpart = (DynamicObjectCollection) this.getModel().getValue("zcgj_otherpart");
|
||||
outContract.set("otherpart",otherpart);
|
||||
|
@ -103,10 +103,10 @@ public class ContractSettleBillPlugin extends AbstractBillPlugIn implements Plug
|
|||
Object changetype = this.getModel().getValue("changetype");
|
||||
if(changetype!=null){
|
||||
if(changetype.toString().equals("03")){
|
||||
this.getView().setVisible(true,"zcgj_parta");
|
||||
this.getView().setVisible(true,"zcgj_partb");
|
||||
this.getView().setVisible(true,"zcgj_otherpart");
|
||||
}else {
|
||||
this.getView().setVisible(false,"zcgj_parta");
|
||||
this.getView().setVisible(false,"zcgj_partb");
|
||||
this.getView().setVisible(false,"zcgj_otherpart");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import java.util.Map;
|
|||
public class ResourceFilterExtPlugin extends ResourceItemListPlugin {
|
||||
@Override
|
||||
public void afterBindData(EventObject e) {
|
||||
|
||||
super.afterBindData(e);
|
||||
FormShowParameter formShowParameter = this.getView().getFormShowParameter();
|
||||
Map<String, Object> customParams = formShowParameter.getCustomParams();
|
||||
Object contractType = customParams.get("contractType");
|
||||
|
@ -24,7 +24,7 @@ public class ResourceFilterExtPlugin extends ResourceItemListPlugin {
|
|||
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("cs2")) {//设备采购
|
||||
this.getView().setVisible(true, new String[]{"flexpanelequipment"});
|
||||
this.getView().setVisible(false, new String[]{"flexpanelsub", "flexpanellabour", "flexpanelcomposite", "flexpanelmaterial", "flexpanelturnover","flexpanelother"});
|
||||
this.setResourceTypeStyle("equipment");
|
||||
|
@ -37,7 +37,7 @@ public class ResourceFilterExtPlugin extends ResourceItemListPlugin {
|
|||
}
|
||||
}
|
||||
System.out.println();
|
||||
super.afterBindData(e);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue