python表单插件:双击单据编号,打开单据原创
3人赞赏了该文章
520次浏览
编辑于2024年02月18日 08:23:44
场景:
字段存储了另一单据类型的单据编号,实现双击打开指定单据
import clr clr.AddReference("System") clr.AddReference("System.Core") clr.AddReference("Kingdee.BOS") clr.AddReference('Kingdee.BOS.App') clr.AddReference("Kingdee.BOS.Core") clr.AddReference("Kingdee.BOS.DataEntity") clr.AddReference("Kingdee.BOS.Contracts") from Kingdee.BOS import * from Kingdee.BOS.App.Data import * from Kingdee.BOS.JSON import * from Kingdee.BOS.Core import * from Kingdee.BOS.Core.Const import * from Kingdee.BOS.Core.Bill import * from Kingdee.BOS.Core.List import * from Kingdee.BOS.Log import * from System import * from System.Collections.Generic import * from System.Linq import * def EntityRowDoubleClick(e): fldKey=e.ColKey.ToUpperInvariant(); if fldKey=="F_XVKJ_MUNO": bilno =str(this.Model.GetValue("F_XVKJ_muno",e.Row)) showParam = BillShowParameter() #根据单据编号获取单据内码 sql="SELECT FID FROM T_SAL_QUOTATION with(nolock) WHERE FBILLNO='"+bilno+"'" bilid=str(DBUtils.ExecuteScalar(this.Context,sql,None)) #this.View.ShowMessage(bilid) showParam.PKey=bilid showParam.OpenStyle.ShowType = ShowType.MainNewTabPage showParam.PageId = Guid.NewGuid().ToString() showParam.FormId = "SAL_QUOTATION" showParam.Status = OperationStatus.EDIT this.View.ShowForm(showParam)
赞 3
3人点赞
还没有人点赞,快来当第一个点赞的人吧!
打赏
0人打赏
还没有人打赏,快来当第一个打赏的人吧!
推荐阅读