EAS学习笔记--单据头锁定性及值更新事件
一、单据头的值锁定方法
在onload方法中设置,属性可以在设计建模查询属性界面找到对应的name。单据体可以双击单据体在KDTable设计器中找到对应的属性和方法名
```
@Override
public void onLoad() throws Exception {
super.onLoad();
//设置单据头的锁定性
//设置控件非必录
this.prmtstorageOrgUnit.setRequired(false);
//设置控件不可用
this.prmtstorageOrgUnit.setEnabled(false);
//设置控件不可见
this.prmtstorageOrgUnit.setVisible(false);
//设置单据体的锁定性
//设置单据体控件不可用
this.kdtEntrys.getColumn("unit").getStyleAttributes().setLocked(true);
}
```
二、单据头的值更新事件
单据头的值监听写在onload方法里
```
@Override
public void onLoad() throws Exception {
super.onLoad();
//单据头值更新
this.pkdoneDate.addDataChangeListener(new DataChangeListener() {
public void dataChanged(DataChangeEvent e) {
try {
pkdoneDate_Changed();
}
catch (Exception exc) {
handUIException(exc);
}
}
});
}
```
三、单据体分录值监听
```
@Override
public void onLoad() throws Exception {
super.onLoad();
//分录值更新事件
kdtEntrys.addKDTEditListener(new KDTEditAdapter(){
public void editStopped(KDTEditEvent e){
try {
//写自己的处理方法
kdEntrysChanged(e);
} catch (Exception exc) {
handUIException(exc);
}
}
});
}
```
EAS学习笔记--单据头锁定性及值更新事件
本文2024-09-16 22:04:17发表“eas cloud知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-eas-45743.html