库存状态转换审核后修改简单生产入库二开库存状态字段
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)
库存状态转换审核后修改简单生产入库二开库存状态字段
本文2024-09-16 18:26:39发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-22178.html