物料清单复制新增时,不携带源单生效日期,赋值当前日期。
#物料清单复制新增时,默认生效日期为当前日期
# -*- coding:utf-8 -*-
import clr
import sys
clr.AddReference('Kingdee.BOS.App')
clr.AddReference('Kingdee.BOS')
clr.AddReference('Kingdee.BOS.Core')
clr.AddReference('System.Drawing')
clr.AddReference("Kingdee.BOS.ServiceHelper")
from System import *
from System.Collections.Generic import *
from System.Threading import *
from Kingdee.BOS.Core import *
from System import DateTime
from Kingdee.BOS.Core.Bill import *
from Kingdee.BOS.Core.Bill.PlugIn import *
from Kingdee.BOS.Core.DynamicForm import *
from Kingdee.BOS.App.Data import DBUtils
from Kingdee.BOS.App.Data import DataReaderEnumerable
from Kingdee.BOS.Core.List import *
from Kingdee.BOS.Core.List.PlugIn import *
from Kingdee.BOS.Core.Metadata import *
from Kingdee.BOS.ServiceHelper import *
from System.Collections.Generic import *
def OnLoad(e):
RowCount = this.Model.GetEntryRowCount("FTreeEntity") #获取子项明细标识
NowDatetime=DateTime.Now.ToShortDateString() #获取当前日期
#this.View.ShowMessage(NowDatetime)
DOCUMENTSTATUS=this.Model.GetValue("FDOCUMENTSTATUS") #获取数据状态
if DOCUMENTSTATUS=="Z": #当单据状态为暂存时,
for i in range(RowCount):
this.Model.SetValue("FEFFECTDATE",NowDatetime,i) #给生效日期赋值
this.View.UpdateView("FEFFECTDATE")
物料清单复制新增时,不携带源单生效日期,赋值当前日期。
本文2024-09-16 17:42:52发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-17480.html