var grid = this.View.GetControl<EntryGrid>("F_XDUA_SubEntity_yiu");//单据体
var selectedRowCount = grid.GetSelectedRows();
ListSelBillShowParameter billShowParameter = new ListSelBillShowParameter();
billShowParameter.IsShowApproved = true;
billShowParameter.IsShowFilter = false;
billShowParameter.MultiSelect = true;
billShowParameter.ParentPageId = this.View.PageId;
//billShowParameter.FormId = "STK_Inventory";
billShowParameter.FormId = "STK_Inventory";
billShowParameter.Width = 1500;
billShowParameter.IsLookUp = true;
this.View.ShowForm((DynamicFormShowParameter)billShowParameter, (Action<Kingdee.BOS.Core.DynamicForm.FormResult>)(result =>
{
object returnData = result.ReturnData;
if (!(returnData is ListSelectedRowCollection))
return;
ListSelectedRowCollection source = returnData as ListSelectedRowCollection;
foreach (ListSelectedRow item in source)
{
int wlId = Convert.ToInt32(item.DataRow["FMaterialId_Id"]);//物料ID //
DynamicObject model = Utiles.LoadDynamicObject(this.Context, "BD_MATERIAL", $"FMasterId='{wlId}'");
int lotId = Convert.ToInt32(item.DataRow["FLot_Id"]);//LotID
DynamicObject model2 = Utiles.LoadDynamicObject(this.Context, "BD_BatchMainFile", $"FLOTID='{lotId}'");
this.View.Model.SetValue("F_TZWLBM", model, selectedRowCount[0]);
this.View.Model.SetValue("F_TZWLBM_Id", model["Id"], selectedRowCount[0]);
this.View.Model.SetValue("F_PH", model2["Number"], selectedRowCount[0]);
}
}));
推荐阅读