Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
		
						commit
						13d14d5152
					
				| 
						 | 
					@ -5,11 +5,14 @@ import kd.bos.bill.BillShowParameter;
 | 
				
			||||||
import kd.bos.bill.OperationStatus;
 | 
					import kd.bos.bill.OperationStatus;
 | 
				
			||||||
import kd.bos.dataentity.entity.DynamicObject;
 | 
					import kd.bos.dataentity.entity.DynamicObject;
 | 
				
			||||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
 | 
					import kd.bos.dataentity.entity.DynamicObjectCollection;
 | 
				
			||||||
 | 
					import kd.bos.dataentity.entity.ILocaleString;
 | 
				
			||||||
import kd.bos.dataentity.metadata.IDataEntityProperty;
 | 
					import kd.bos.dataentity.metadata.IDataEntityProperty;
 | 
				
			||||||
 | 
					import kd.bos.entity.datamodel.IDataModel;
 | 
				
			||||||
import kd.bos.entity.datamodel.events.ChangeData;
 | 
					import kd.bos.entity.datamodel.events.ChangeData;
 | 
				
			||||||
import kd.bos.entity.datamodel.events.PropertyChangedArgs;
 | 
					import kd.bos.entity.datamodel.events.PropertyChangedArgs;
 | 
				
			||||||
import kd.bos.form.IClientViewProxy;
 | 
					import kd.bos.form.IClientViewProxy;
 | 
				
			||||||
import kd.bos.form.control.AttachmentPanel;
 | 
					import kd.bos.form.control.AttachmentPanel;
 | 
				
			||||||
 | 
					import kd.bos.form.control.Label;
 | 
				
			||||||
import kd.bos.form.control.events.AttachmentOperaClickListener;
 | 
					import kd.bos.form.control.events.AttachmentOperaClickListener;
 | 
				
			||||||
import kd.bos.form.events.AfterDoOperationEventArgs;
 | 
					import kd.bos.form.events.AfterDoOperationEventArgs;
 | 
				
			||||||
import kd.bos.form.field.BasedataEdit;
 | 
					import kd.bos.form.field.BasedataEdit;
 | 
				
			||||||
| 
						 | 
					@ -22,6 +25,12 @@ import kd.bos.orm.query.QCP;
 | 
				
			||||||
import kd.bos.orm.query.QFilter;
 | 
					import kd.bos.orm.query.QFilter;
 | 
				
			||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
 | 
					import kd.bos.servicehelper.BusinessDataServiceHelper;
 | 
				
			||||||
import kd.bos.servicehelper.user.UserServiceHelper;
 | 
					import kd.bos.servicehelper.user.UserServiceHelper;
 | 
				
			||||||
 | 
					import kd.fi.er.business.bean.CostDeptF7ChangePram;
 | 
				
			||||||
 | 
					import kd.fi.er.business.servicehelper.CoreBaseBillServiceHelper;
 | 
				
			||||||
 | 
					import kd.fi.er.business.utils.ErCommonUtils;
 | 
				
			||||||
 | 
					import kd.fi.er.business.utils.ErCostCenterUtil;
 | 
				
			||||||
 | 
					import kd.fi.er.business.utils.ErEntityTypeUtils;
 | 
				
			||||||
 | 
					import kd.fi.er.business.utils.ErStdConfig;
 | 
				
			||||||
import kd.sdk.plugin.Plugin;
 | 
					import kd.sdk.plugin.Plugin;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.ArrayList;
 | 
					import java.util.ArrayList;
 | 
				
			||||||
| 
						 | 
					@ -87,6 +96,10 @@ public class PaymentApplicationPlugin extends AbstractBillPlugIn implements Atta
 | 
				
			||||||
            if (costDept != null) {
 | 
					            if (costDept != null) {
 | 
				
			||||||
                setOrg(costDept);
 | 
					                setOrg(costDept);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					            String propName = e.getProperty().getName();
 | 
				
			||||||
 | 
					            ChangeData[] valueSet = e.getChangeSet();
 | 
				
			||||||
 | 
					            Object propValue = valueSet[0].getNewValue();
 | 
				
			||||||
 | 
					            costDeptChange(propName,(DynamicObject)propValue);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -198,4 +211,40 @@ public class PaymentApplicationPlugin extends AbstractBillPlugIn implements Atta
 | 
				
			||||||
                new QFilter("number", QCP.equals, viewParent.getString("number"))});
 | 
					                new QFilter("number", QCP.equals, viewParent.getString("number"))});
 | 
				
			||||||
        this.getModel().setValue("zcgj_org", bos_adminorg);//所属组织
 | 
					        this.getModel().setValue("zcgj_org", bos_adminorg);//所属组织
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //获取费用承担公司
 | 
				
			||||||
 | 
					    protected void costDeptChange(String propName, DynamicObject costDept) {
 | 
				
			||||||
 | 
					        if (costDept != null) {
 | 
				
			||||||
 | 
					            IDataModel model = this.getModel();
 | 
				
			||||||
 | 
					            this.refreshBaseInfoLabel(propName, costDept);
 | 
				
			||||||
 | 
					            DynamicObject company = (DynamicObject)model.getValue("zcgj_org");
 | 
				
			||||||
 | 
					            DynamicObject costCompany = (DynamicObject)model.getValue("zcgj_costcompany");
 | 
				
			||||||
 | 
					            CostDeptF7ChangePram costDeptF7ChangePram = new CostDeptF7ChangePram(Boolean.TRUE, costDept, costCompany, company);
 | 
				
			||||||
 | 
					            Long costCompanyId = CoreBaseBillServiceHelper.getAccountOrgId(costDeptF7ChangePram);//获取费用承担公司
 | 
				
			||||||
 | 
					            model.setValue("zcgj_costcompany", costCompanyId);
 | 
				
			||||||
 | 
					            this.getView().updateView("zcgj_costcompany");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private boolean isShowTypeExceptionBill() {
 | 
				
			||||||
 | 
					        String entryName = this.getView().getEntityId();
 | 
				
			||||||
 | 
					        return ErEntityTypeUtils.isApplyProjectBill(entryName) || ErEntityTypeUtils.isCostEstimateBill(entryName) || ErEntityTypeUtils.isApplyPayBill(entryName) || ErEntityTypeUtils.isPrePayBill(entryName) || ErEntityTypeUtils.isRepaymentBill(entryName) || ErEntityTypeUtils.isShareBill(entryName) || ErEntityTypeUtils.isWithholdingBill(entryName);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    protected void refreshBaseInfoLabel(String propName, Object propValue) {
 | 
				
			||||||
 | 
					        String propStr = null;
 | 
				
			||||||
 | 
					        if (propValue instanceof DynamicObject) {
 | 
				
			||||||
 | 
					            ILocaleString name = ((DynamicObject)propValue).getLocaleString("name");
 | 
				
			||||||
 | 
					            propStr = name.getLocaleValue();
 | 
				
			||||||
 | 
					        } else if (propValue instanceof String) {
 | 
				
			||||||
 | 
					            propStr = (String)propValue;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        Label propControl = (Label)this.getControl(propName + "V");
 | 
				
			||||||
 | 
					        if (propControl != null) {
 | 
				
			||||||
 | 
					            propControl.setText(propStr);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue