库存状态转换审核后修改简单生产入库二开库存状态字段

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

库存状态转换审核后修改简单生产入库二开库存状态字段

from clr import AddReference

AddReference("System")

AddReference("System.Net.Http")

AddReference("Newtonsoft.Json")

from System.Text import *

from System.Net.Http import HttpClient,StringContent

from Newtonsoft.Json import JsonConvert

AddReference("System")

from System.Net import SecurityProtocolType,ServicePointManager

AddReference("Kingdee.BOS.App")

from Kingdee.BOS.App.Data import DBUtils

def AfterDoOperation(e):

if e.Operation.Operation.upper() == "AUDIT" and e.ExecuteResult:

                no = this.Model.GetValue("fbillno")

                if (e.OperationResult.IsSuccess == True):

                rows=this.Model.GetEntryRowCount("FEntity")

                for i in range(rows):

                FMaterialId = this.Model.GetValue("FMaterialId",i)["id"]

                FLot = this.Model.GetValue("FLot",i)


                #注意 sql换行后可能执行失败

                sql = """/*dialect*/update T_SP_INSTOCKENTRY set F_QJCO_Text = '可用'  from T_SP_INSTOCKENTRY A LEFT JOIN T_BD_LOTMASTER B  ON A.FLot = B.FLotID where A.FMATERIALID = '%s' and B.FNUMBER = '%s' """%(FMaterialId,FLot)

                DBUtils.Execute(this.Context,sql)

#this.View.ShowMessage(sql)


库存状态转换审核后修改简单生产入库二开库存状态字段

from clr import AddReferenceAddReference("System")AddReference("System.Net.Http")AddReference("Newtonsoft.Json")from System.Te...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息