This commit is contained in:
2025-05-07 20:08:40 +08:00
parent f8fa1681df
commit a4976430a8
9 changed files with 549 additions and 215 deletions

View File

@@ -1492,5 +1492,30 @@ namespace Pilot_KD_Parino.Common
throw new ArgumentException("数字超出范围");
}
}
public static string CreateAutoWrireRecord3(Context ctx, string FOrgId, List<CombinaAddClass1> DATA1, CombinaAddSK DATA2)
{
string FBILLNO;
string FID;
// 构建一个IBillView实例通过此实例可以方便的填写
IBillView billView = CommonHelper.CreateBillView(ctx, "VRYF_FHTZDHXJL");
// billView.CreateNewModelData();
((IBillViewService)billView).LoadData();
// 触发插件的OnLoad事件
// 组织控制基类插件在OnLoad事件中对主业务组织改变是否提示选项进行初始化。
// 如果不触发OnLoad事件会导致主业务组织赋值不成功
DynamicFormViewPlugInProxy eventProxy = billView.GetService<DynamicFormViewPlugInProxy>();
eventProxy.FireOnLoad();
CreateAutoWrireRecordData2(billView, ctx, FOrgId, DATA1, DATA2);
OperateOption saveOption = OperateOption.Create();
Form form = billView.BillBusinessInfo.GetForm();
if (form.FormIdDynamicProperty != null)
{
form.FormIdDynamicProperty.SetValue(billView.Model.DataObject, form.Id);
}
//保存工程项目
CommonHelper.SaveBill(ctx, billView, saveOption, true, out FID, out FBILLNO);
return FBILLNO;
}
}
}