a
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
import clr
|
||||
clr.AddReference("System")
|
||||
clr.AddReference("Kingdee.BOS")
|
||||
clr.AddReference("Kingdee.BOS.Core")
|
||||
clr.AddReference("Kingdee.BOS.DataEntity")
|
||||
clr.AddReference("Kingdee.BOS.App")
|
||||
clr.AddReference("Kingdee.BOS.Contracts")
|
||||
clr.AddReference("Kingdee.BOS.ServiceHelper")
|
||||
|
||||
from System import *
|
||||
from Kingdee.BOS.App.Data import*
|
||||
from Kingdee.BOS.Core.DynamicForm import*
|
||||
from Kingdee.BOS.Core.DynamicForm.PlugIn.Args import*
|
||||
from Kingdee.BOS.Core.List.PlugIn import*
|
||||
from Kingdee.BOS.Orm.DataEntity import*
|
||||
from Kingdee.BOS.Util import*
|
||||
from Kingdee.BOS import*
|
||||
|
||||
def AfterCreateNewData(e):
|
||||
details = this.View.BusinessInfo.GetEntity("FTreeEntity")
|
||||
if details != None:
|
||||
entrys = this.View.Model.GetEntityDataObject(details)
|
||||
if entrys != None and entrys.Count > 0:
|
||||
rowIndex = 0
|
||||
count = entrys.Count
|
||||
while count > rowIndex:
|
||||
this.View.InvokeFieldUpdateService("FBomId",rowIndex)
|
||||
rowIndex += 1
|
||||
# for entry in entrys:
|
||||
# rowIndex = this.View.Model.GetRowIndex(details, entry)
|
||||
# this.View.InvokeFieldUpdateService("FBomId",rowIndex)
|
||||
# bomObj = entry["BomId"]
|
||||
# mjdzdzId = bomObj["FMJDZDZID"]
|
||||
# this.View.Model.SetValue("FMJDZDZID",mjdzdzId)
|
||||
|
||||
def BarItemClick(e):
|
||||
if e.BarItemKey == "tbUpdMJCPDZDZID":
|
||||
MJIDObj = this.View.Model.GetValue("F_PAEZ_BASE")
|
||||
MATERIALID = this.View.Model.GetValue("FMATERIALID")
|
||||
mjId = MJIDObj["id"]
|
||||
cpId = MATERIALID["id"]
|
||||
sql ="""/*dialect*/
|
||||
select
|
||||
cast(b.FBZCL as real) as FBZCL
|
||||
,a.F_PAEZ_TEXT
|
||||
,a.F_PAEZ_TEXT1
|
||||
,b.Fjtbz
|
||||
,b.Fmjsmzq
|
||||
,b.Fmjqs
|
||||
,a.FMJID
|
||||
,b.FCPID
|
||||
,b.FEntryId
|
||||
from hw_mjcpdzb a
|
||||
inner join hw_mjcpdzbs b on a.FID = b.FID
|
||||
where a.FMJID = {0} and b.FCPID={1}
|
||||
""".format(mjId,cpId)
|
||||
# raise Exception(sql)
|
||||
dbList = DBUtils.ExecuteDynamicObject(this.Context,sql);
|
||||
if dbList.Count > 0:
|
||||
data = dbList[0]
|
||||
this.View.Model.SetValue("FMJDZDZID",data["FEntryId"])
|
||||
Reference in New Issue
Block a user