第一种:表单插件
//操作工
DynamicObjectCollection FOperation = dynamicObject["OperatorId"] as DynamicObjectCollection;
//获取单据体操作工id集合
DynamicObjectCollection entryOp =this.View.Model.GetValue("FOperatorId") as DynamicObjectCollection;
if (FOperation.Count > 0)
{
//多选基础资料主键集合
MulBaseDataField mulField = this.View.BusinessInfo.GetField("FOperatorId") as MulBaseDataField;
string[] pkValues = FOperation.Select(p => p[mulField.RefIDDynamicProperty.Name].ToString()).Distinct().ToArray();
////给单据上面的多选基础资料字段B赋值
//this.View.Model.SetValue("FMulBaseB", pkValues, e.Row);
//获取单据体行数
int row_count = this.View.Model.GetEntryRowCount("FEntity");
for (int i = 0; i < row_count; i++)
{
this.View.Model.SetValue("FOperatorId", pkValues, i);
this.View.Model.SetValue("FOperatornumber", FOperation[0]["OperatorId_Id"], i);
}
}
推荐阅读