nc 自定义参照 以及如何在编辑后事件中添加条件

1.首先需要在数据库中注册一条数据

数据库注册
参照类编辑完后,需要到数据库bd_refinfo表中注册参照类信息。数据库注册SQL语句如下:

INSERT INTO bd_refinfo (code, dr, isneedpara, isspecialref, metadatatypename, modulename, name, para1, para2, para3, pk_refinfo, refclass, refsystem, reftype, reserv1, reserv2, reserv3, resid, residpath, ts, wherepart) VALUES ('jzse_record9', 0, null, null, 'TrainContractVO', 'jzpm', 'ZCC项目档案', null, null, null, 'JZPMY90000000000SE45', 'nc.ui.jzpm.jzse0545.ref.ZCCProjectRef', null, 1, null, null, null, 'ZCC项目档案', null, '2013-12-24 09:00:21', null )

关键字段:

code:参照编码,需要唯一。

dr:逻辑删除标记,0表示逻辑未删除

metadatatypename:实体名称

modulename:模块名称

name:参照名称

refclass:编辑参照类的具体描述。包名+类名

reftype:参照类型,0为列表参照,1为树型参照,2为树表型参照(左树右表)

INSERT INTO bd_refinfo (code, dr, isneedpara, isspecialref, metadatatypename, modulename, name, para1, para2, para3, pk_refinfo, refclass, refsystem, reftype, reserv1, reserv2, reserv3, resid, residpath, ts, wherepart) VALUES ('PRSTypeRef', 0, null, null, 'cmpricestrategytype', 'cm', '价格策略类型', null, null, null, 'TRPMY90000000000CM45', 'nc.ui.cm.cmpricestrategytype.ref.PRSTypeRef', null, 0, null, null, null, 

注意code 最好是模板类型编码(就是模板初始化时选模板时可以看见)
2.在模板初始化时,添加字段

高级属性中 数据类型为参照

然后在类型设置中选择参照 可以直接复制参照名 也可以自己枚举选

注意 向导生成的字段不可编辑

3.添加刷选字段 bacthnum2是表中字段

UIRefPane refpane = (UIRefPane) e.getBillCardPanel().getBodyItem("bacthnum2").getComponent();
refpane.getRefModel().addWherePart(" and pk_onhanddim in (select  pk_onhanddim  from ic_onhandnum where nonhandnum>0) and cmaterialoid='"+pk_material+"' "); 

原文链接:https://blog.csdn.net/wqy123123wqy/article/details/53898359

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值