单据新加查询自定义
金蝶云社区-赵金鼎
赵金鼎
0人赞赏了该文章 1,306次浏览 未经作者许可,禁止转载编辑于2016年08月04日 09:53:39

自己在查询中自定义了一个地方。

,在ListUI中添加代码如下:

/*
* 查询对话框
*/
protected CommonQueryDialog initCommonQueryDialog()
{
CommonQueryDialog dialog = super.initCommonQueryDialog();
try {
dialog.addUserPanel(getUserPanel());
dialog.setShowFilter(true);
dialog.setShowSorter(true);
dialog.setHeight(380);
dialog.setWidth(600);
dialog.setTitle("客户自定义过滤框");
} catch (Exception e) {
handUIException(e);
}
return dialog;
}
/*
* 自定义查询界面
*/

CustomerQueryPanel userPanel;//自己添加
protected CustomerQueryPanel getUserPanel() throws Exception {
if (this.userPanel == null)
this.userPanel = new PurRegOrderQuery();
userPanel.onLoad();
return this.userPanel;
}
//设置列表界面的默认过滤条件,可用来过滤列表数据, 也可以直接设置 mainQuery的值实现过滤
protected EntityViewInfo getInitDefaultSolution() {

EntityViewInfo ev = new EntityViewInfo();

PurRegOrderQuery queryUI = null;//本来是OtherBillQueryUI

try {

queryUI = new PurRegOrderQuery();

queryUI.onLoad();

} catch (Exception e) {

handUIException(e);

}

ev.setFilter(queryUI.getFilterInfo());

return ev;

}


//设置是否在调入列表界面之前先出过滤框

protected boolean initDefaultFilter()
{

return false;

}

但是在实际过程中无法使用,不起作用,问一下到底是不是还需要写后台代码,求代码!!!

1111.png(72.85KB)