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