合同默认合同号,以及甲方和核算组织的联动关系
This commit is contained in:
parent
b5736b4254
commit
4a6c59da22
|
@ -0,0 +1,59 @@
|
|||
package shkd.fi.er.plugin.formplugin;
|
||||
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
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.PropertyChangedArgs;
|
||||
import kd.bos.form.plugin.AbstractFormPlugin;
|
||||
|
||||
import java.util.EventObject;
|
||||
|
||||
/**
|
||||
* @projectName: shkd-cosmic-root-project
|
||||
* @package: shkd.fi.er.plugin.opplugin
|
||||
* @className: ContractbillFromPlugin
|
||||
* @author: wenyx
|
||||
* @description: TODO
|
||||
* @date: 2024/5/27 16:09
|
||||
* @version: 1.0
|
||||
*/
|
||||
public class ContractbillFromPlugin extends AbstractFormPlugin {
|
||||
|
||||
@Override
|
||||
public void afterCreateNewData(EventObject e) {
|
||||
super.afterCreateNewData(e);
|
||||
IDataModel model = this.getModel();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterBindData(EventObject e) {
|
||||
super.afterBindData(e);
|
||||
IDataModel model = this.getModel();
|
||||
DynamicObject dataEntity = model.getDataEntity();
|
||||
String billno = dataEntity.getString("billno");
|
||||
String contractcode = dataEntity.getString("contractcode");
|
||||
if(contractcode.isEmpty()){
|
||||
model.setValue("contractcode",billno);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void propertyChanged(PropertyChangedArgs e) {
|
||||
super.propertyChanged(e);
|
||||
IDataModel model = this.getModel();
|
||||
String name = e.getProperty().getName();
|
||||
ChangeData[] changeSet = e.getChangeSet();
|
||||
ChangeData changeData = changeSet[0];
|
||||
|
||||
|
||||
switch (name){
|
||||
case "contractparty" :
|
||||
DynamicObject newValue = (DynamicObject)changeData.getNewValue();
|
||||
this.getModel().setValue("costcompany",newValue);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue