插件中(表单插件)调用批号规则获取批号并填入单据中方法。
/// <summary>
/// 表单插件中调用批号规则获取批号方法,ctx上下文,view this.View,flotkey 批号字段标识,lotorm批号字段绑定实体属性 引用Kingdee.K3.SCM.ServiceHelper,Kingdee.BOS.Core
/// </summary>
/// <param name="ctx"></param>
/// <param name="view"></param>
/// <param name="flotkey"></param>
/// <param name="lotorm"></param>
public void GetFlotBill(Context ctx, IBillView view, string flotkey, string lotorm)
{
LotField lotField = view.Model.BusinessInfo.GetField(flotkey) as LotField;
ExtendedDataEntitySet extendedDataEntitySet = new ExtendedDataEntitySet();
extendedDataEntitySet.Parse(new Kingdee.BOS.Orm.DataEntity.DynamicObject[] { view.Model.DataObject }, view.Model.BusinessInfo);
ExtendedDataEntity[] array = extendedDataEntitySet.FindByEntityKey(lotField.EntityKey);
CodeAppResult codeAppResult = StockServiceHelper.GenerateLotMasterByCodeRule(ctx, view.Model.BillBusinessInfo, lotField, array);
var flots = codeAppResult.CodeNumbers;
Entity entity = view.Model.BusinessInfo.GetEntryEntity(lotField.EntityKey);
for (int i = 0; i < flots.Count; i++)
{
if (!flots[i].Value.IsNullOrEmptyOrWhiteSpace())
{
Kingdee.BOS.Orm.DataEntity.DynamicObject obj = view.Model.GetEntityDataObject(entity, i);
obj[lotorm + "_Text"] = flots[i].Value[0];
}
}
view.UpdateView(lotField.EntityKey);
}
view this.View,flotkey 批号字段标识 这个是什么啊,, 我要传入什么参数
插件中(表单插件)调用批号规则获取批号并填入单据中方法。
本文2024-09-16 17:22:20发表“云星空知识”栏目。
本文链接:https://wenku.my7c.com/article/kingdee-k3cloud-15287.html