(二开)工序计划列表显示领料状态二开方案
1. 扩展“工序计划”元数据,增加领料状态字段
2. 在列表插件中注册Python脚本,实现取数和加载逻辑
参考Python脚本如下:
clr.AddReference("Kingdee.BOS.ServiceHelper")
from Kingdee.BOS.ServiceHelper import *
def FormatCellValue(args):
if ("FPickMtrlStatus".Equals(args.Header.RealKey)):
dyo = (args.DataRow).DynamicObject
planId = dyo["FID"]
sql="SELECT e.FPICKMTRLSTATUS FROM T_PRD_MOENTRY_Q e INNER JOIN T_SFC_OPERPLANNING p ON p.FMOENTRYID=e.FENTRYID WHERE p.FID="+planId.ToString()
pickMtrlStatus = DBServiceHelper.ExecuteScalar(this.Context, sql, "1")
if ("1".Equals(pickMtrlStatus)):
pickMtrlStatus = "未领料"
if ("2".Equals(pickMtrlStatus)):
pickMtrlStatus = "部分领料"
if ("3".Equals(pickMtrlStatus)):
pickMtrlStatus = "全部领料"
if ("4".Equals(pickMtrlStatus)):
pickMtrlStatus = "超额领料"
args.FormateValue = pickMtrlStatus
(二开)工序计划列表显示领料状态二开方案
本文2024-09-16 17:48:28发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-18074.html