SVN-Revision: r395
This commit is contained in:
wyf
2025-03-26 03:14:05 +00:00
parent 6351f33c68
commit a9438b900a
+8 -38
View File
@@ -86,7 +86,7 @@ namespace Lskj.ProductiSched
{ {
foreach (DataRow item in detailsTab.Rows) foreach (DataRow item in detailsTab.Rows)
{ {
GridDetailModel detailModel = new GridDetailModel(item,null, GridCustomColumnStruct.BaseDetailGridView); GridDetailModel detailModel = new GridDetailModel(item, null, GridCustomColumnStruct.BaseDetailGridView);
if (detailModel.Orderid == -1)//序号为-1固定配置右键 if (detailModel.Orderid == -1)//序号为-1固定配置右键
{ {
string moduleCode = detailModel.UnionModule; string moduleCode = detailModel.UnionModule;
@@ -106,7 +106,7 @@ namespace Lskj.ProductiSched
} }
tabBottom.Model = DataModel.TopSysModel; tabBottom.Model = DataModel.TopSysModel;
tabBottom.InitTabPages(detailsTablist); tabBottom.InitTabPages(detailsTablist);
this.isAddBottom = detailsTablist.Where(o => o.displayMode != 1 && o.rightVisible != 1 && o.Orderid == -2).ToList().Count>0; this.isAddBottom = detailsTablist.Where(o => o.displayMode != 1 && o.rightVisible != 1 && o.Orderid == -2).ToList().Count > 0;
//if (detailsTab.Rows.Count > 1) //if (detailsTab.Rows.Count > 1)
//{ //{
@@ -783,7 +783,7 @@ namespace Lskj.ProductiSched
/// <para>修改备注:</para> /// <para>修改备注:</para>
/// <para>版本:1.0</para> /// <para>版本:1.0</para>
/// </summary> /// </summary>
public void SetDetailGridDataSource(DataRow rowItem,XtraTabPage tabPage = null) public void SetDetailGridDataSource(DataRow rowItem, XtraTabPage tabPage = null)
{ {
if (tabPage != null) if (tabPage != null)
{ {
@@ -801,7 +801,7 @@ namespace Lskj.ProductiSched
} }
} }
protected void SetTabPageDataSource(XtraTabPage tabPage,DataRow rowItem) protected void SetTabPageDataSource(XtraTabPage tabPage, DataRow rowItem)
{ {
GridDetailModel model = this.tabBottom.GetGridDetailModel(tabPage); GridDetailModel model = this.tabBottom.GetGridDetailModel(tabPage);
if (model.Orderid == -2) return; if (model.Orderid == -2) return;
@@ -1095,7 +1095,7 @@ namespace Lskj.ProductiSched
{ {
LabelDateEdit labelDateEdit = baseUserControl as LabelDateEdit; LabelDateEdit labelDateEdit = baseUserControl as LabelDateEdit;
DateTime dateTime = labelDateEdit.TextEdit.DateTime; DateTime dateTime = labelDateEdit.TextEdit.DateTime;
if(isAddBottom)UpdateDynamicColumns(bandGcBottom, dateTime, typeDate); if (isAddBottom) UpdateDynamicColumns(bandGcBottom, dateTime, typeDate);
if (TreeMultiHeader) if (TreeMultiHeader)
{ {
UpdateDynamicColumns(treebandGcTop, dateTime, typeDate); UpdateDynamicColumns(treebandGcTop, dateTime, typeDate);
@@ -2285,14 +2285,14 @@ namespace Lskj.ProductiSched
if (DataModel.columnDateMapping.TryGetValue(cell.Column, out DateTime dateTime)) if (DataModel.columnDateMapping.TryGetValue(cell.Column, out DateTime dateTime))
{ {
// 日期必须大于等于今天才允许赋值 // 日期必须大于等于今天才允许赋值
if (dateTime.Date >= DateTime.Now.Date) string bj_tig = cell.Node.GetValue("bj_tig")?.ToString() ?? "";
if (!DataModel.TopModuleModel.HasReport && bj_tig != "0" && dateTime.Date >= DateTime.Now.Date)
{ {
cell.Node.SetValue(cell.Column, valueToSet); cell.Node.SetValue(cell.Column, valueToSet);
} }
} }
} }
} }
treeList.PostEditor(); treeList.PostEditor();
e.Handled = true; e.Handled = true;
WaitForm.HideForm(); WaitForm.HideForm();
@@ -2363,34 +2363,4 @@ namespace Lskj.ProductiSched
// 对每个动态日期列,从 dtPlan 中查找 billdocument_id 在 keyValues 内, // 对每个动态日期列,从 dtPlan 中查找 billdocument_id 在 keyValues 内,
// 且 ShowDay 等于当前列名的记录,将 amount 累加后再乘以系数 // 且 ShowDay 等于当前列名的记录,将 amount 累加后再乘以系数
foreach (string dateCol in dateColumns) foreach (stri
{
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;
}
}
}
}