SVN-Revision: r611
This commit is contained in:
cyf
2025-05-21 03:43:52 +00:00
parent ad7c540610
commit 83b86610bd
+58 -1
View File
@@ -205,6 +205,10 @@ namespace Lskj.PubBill
/// 附加右键菜单
/// </summary>
public SimpleButton itemCommon = new SimpleButton();
/// <summary>
/// 是否已经添加了多行汇总
/// </summary>
public bool MultiLineSummary;
public BillModule()
{
@@ -1228,6 +1232,52 @@ namespace Lskj.PubBill
}
}
/// <summary>
/// 新增汇总数据(日期修改后)
/// </summary>
private void UpdateSummaryData(DataTable table = null)
{
DataTable dataTable = new DataTable();
if (table != null)
{
dataTable = table;
}
else
{
XtraTabPage tabPage = this.xtc_left_container.SelectedTabPage;
BillSourceUnionModel model = tabPage.Tag as BillSourceUnionModel;
if (model.GridControlObj != null)
{
if (model.ModelObj.sourceDetailType.Equals("1"))
{
dataTable = model.TreeGridDetailControlObj.TreeListObj.DataSource as DataTable;
}
else
{
dataTable = model.GridDetailControlObj.GridControl.DataSource as DataTable;
}
}
}
if (dataTable != null && dataTable.Columns.Contains("项目代号"))
{
MultiLineSummary = true;
gcMain.GridView.OptionsView.ShowFooter = true;
DataRow[] dataRows = dataTable.Select("项目代号='胡波'");
DataRow dataRow = dataRows != null && dataRows.Length > 0 ? dataRows[0] : null;
//树表格
gcMain.AddHeadquarters(dataRow);
}
else if(MultiLineSummary)
{
MultiLineSummary = false;
//清空新加的汇总列
gcMain.AddHeadquarters();
}
}
/// <summary>
/// <para>说明:表格编辑时,判断是否是否编辑</para>
/// <para>创建人:王一帆</para>
@@ -3048,6 +3098,7 @@ namespace Lskj.PubBill
AddDataColumns();
}
UpdateDynamicColumns(dateTime);
UpdateSummaryData();
OnGcMainDataSourceChanged(gcMain.GridView, null);//手动刷新日期合计数据源
}
}
@@ -3191,6 +3242,12 @@ namespace Lskj.PubBill
row["_check"] = 0;
}
}
if (table != null )
{
UpdateSummaryData(table);
}
if (unionModel.ModelObj.SourceType == 2 && this._isLoadRightControlValue)
{
string masterSql = rowItem == null ? BillModel.MasterSql.Replace("{" + BillModel.PrimaryKey + "}", this.lblOrderNo.Text) : ReplaceHelper.ReplaceRowParam(rowItem, BillModel.MasterSql);
@@ -4869,7 +4926,7 @@ namespace Lskj.PubBill
{
case 1:
// 提交成功
MessageUtil.Show(BillModel.TypeName + ResourceKeys.ApplySuccess);
if(!this.BillModel.DisableSubmitPrompt) MessageUtil.Show(BillModel.TypeName + ResourceKeys.ApplySuccess);
this.SetBillStatus(BillImpl.GetDataRowResult(string.Format("select * from {0} where {1}='{2}'", BillModel.MasterTable, BillModel.PrimaryKey, billNo)));
this.RefreshSource(GetBillSourceManager());
this.RefreshSelectedSource();