物料清单复制新增时,不携带源单生效日期,赋值当前日期。

栏目:云星空知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:4

物料清单复制新增时,不携带源单生效日期,赋值当前日期。

#物料清单复制新增时,默认生效日期为当前日期

# -*- 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")

物料清单复制新增时,不携带源单生效日期,赋值当前日期。

#物料清单复制新增时,默认生效日期为当前日期# -*- coding:utf-8 -*-import clrimport sysclr.AddReference('Kingdee.BOS.App')clr.A...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息