SVN-Revision: r658
This commit is contained in:
cyf
2025-06-03 01:23:03 +00:00
parent 4bb27aa7f2
commit d239cbc4d8
+4 -32
View File
@@ -91,6 +91,8 @@ namespace Lskj.ProductiSched
foreach (DataRow item in detailsTab.Rows)
{
GridDetailModel detailModel = new GridDetailModel(item, null, GridCustomColumnStruct.BaseDetailGridView);
DataTable gridColumns = ReportImpl.GetReportDetailColumns(DataModel.TopSysModel.ModuleCode, item["id"] + "");//获取报表明细列
detailModel.GridColumns = gridColumns;
if (detailModel.Orderid == -1)//序号为-1固定配置右键
{
string moduleCode = detailModel.UnionModule;
@@ -917,7 +919,7 @@ namespace Lskj.ProductiSched
private string GetSearchSql(GridDetailModel model, DataRow rowItem, bool isLeft = false)
{
string fieldName = !string.IsNullOrEmpty(model.UnionParentField) && rowItem.Table.Columns.Contains(model.UnionParentField) ? model.UnionParentField : DataModel.TopModuleModel.ParmaryKey;
string sqlValue = model.IsReadOnly || model.IsChart ? model.DetailSql : DataModel.RightModuleModel.MenuSql;
string sqlValue = model.Orderid == -1 ? DataModel.RightModuleModel.MenuSql: model.IsReadOnly || model.IsChart ? model.DetailSql : model.SystemModel.MenuSql;
sqlValue = ReplaceHelper.ReplaceRowParam(rowItem, sqlValue);
DataRow row = TreeMultiHeader ? treebandGcTop.GetViewFocusedDataRow() : bandGcTop.GetViewFocusedDataRow();
if (row != null && isLeft)
@@ -2471,34 +2473,4 @@ namespace Lskj.ProductiSched
// 对每个动态日期列,从 dtPlan 中查找 billdocument_id 在 keyValues 内,
// 且 ShowDay 等于当前列名的记录,将 amount 累加后再乘以系数
foreach (string dateCol in dateColumns)
{
decimal sumAmount = planRows
.Where(pr => keyValues.Contains(pr.BillId) && pr.ShowDay == dateCol)
.Sum(pr => pr.Amount);
// 乘以系数得到实际值
newRow[dateCol] = sumAmount * coefficient;
}
dtC.Rows.Add(newRow);
}
return dtC;
}
catch (Exception)
{
return default;
}
}
/// <summary>
/// 纠正输入异常
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnInvalidValueException(object sender, InvalidValueExceptionEventArgs e)
{
if (e.Value.Equals(""))
{
e.ExceptionMode = ExceptionMode.Ignore;
}
}
}
}
foreach (stri