SVN-Revision: r651
This commit is contained in:
cyf
2025-05-30 03:34:44 +00:00
parent ac062f0545
commit 9927010e94
+33 -26
View File
@@ -216,6 +216,7 @@ namespace Lskj.PubBill
/// </summary>
public bool MultiLineSummary;
public BillModule()
{
InitializeComponent();
@@ -1330,7 +1331,6 @@ namespace Lskj.PubBill
gcMain.GridView.OptionsView.ShowFooter = true;
DataRow[] dataRows = dataTable.Select("num='999'");
DataRow dataRow = dataRows != null && dataRows.Length > 0 ? dataRows[0] : null;
//树表格
gcMain.AddHeadquarters(dataRow);
}
else if (MultiLineSummary)
@@ -1632,7 +1632,8 @@ namespace Lskj.PubBill
{
this.tb_buttom.TabControlObj.ShowTabHeader = DevExpress.Utils.DefaultBoolean.False;
}
dataCaches.GetValue(gcMain, "InitSourcesTask", out bool _);
dataCaches.GetValue(this, "InitSourcesTask", out bool _);
//dataCaches.GetValue(gcMain, "InitSourcesTask", out bool _);
for (int i = 0; i < masterTable.Rows.Count; i++)
{
@@ -3063,28 +3064,29 @@ namespace Lskj.PubBill
private void RefreshSource(BillSourceUnionModel unionModel = null)
{
if (unionModel == null || unionModel.SearchObj == null) return;
//unionModel.SearchObj.SearchLastGrid();
string sql = ReplaceHelper.ReplaceUserInfo(unionModel.ModelObj.SourceSql);
int Handle = 0;
if (unionModel.GridControlObj != null) Handle = unionModel.GridControlObj.GridView.FocusedRowHandle;
sql = sql.Replace("#", "");
List<string> paramList = ReplaceHelper.GetParamFields(sql);
if (unionModel.SearchObj != null)
{
//sql拼接来源条件和替换主表控件值
sql = this.ControlObj.ReplaceControlValue(unionModel.SearchObj.SetSearchSqlValue(sql, true));
}
if (unionModel.GridControlObj != null)
{
unionModel.GridControlObj.gridControl.DataSource = BaseImpl.GetDataTableResult(sql);
unionModel.SearchObj.SearchLastGrid();
if (unionModel.GridControlObj != null)
{
unionModel.GridControlObj.GridView.SelectRowHandler(Handle);
//this.RefreshSourceDetail(tabPage.Tag as BillSourceUnionModel);
}
RefreshSourceDetail(unionModel);
}
//string sql = ReplaceHelper.ReplaceUserInfo(unionModel.ModelObj.SourceSql);
//int Handle = 0;
//if (unionModel.GridControlObj != null) Handle = unionModel.GridControlObj.GridView.FocusedRowHandle;
//sql = sql.Replace("#", "");
//List<string> paramList = ReplaceHelper.GetParamFields(sql);
//if (unionModel.SearchObj != null)
//{
// //sql拼接来源条件和替换主表控件值
// sql = this.ControlObj.ReplaceControlValue(unionModel.SearchObj.SetSearchSqlValue(sql, true));
//}
//if (unionModel.GridControlObj != null)
//{
// unionModel.GridControlObj.gridControl.DataSource = BaseImpl.GetDataTableResult(sql);
// if (unionModel.GridControlObj != null)
// {
// unionModel.GridControlObj.GridView.SelectRowHandler(Handle);
// //this.RefreshSourceDetail(tabPage.Tag as BillSourceUnionModel);
// }
// RefreshSourceDetail(unionModel);
//}
}
/// <summary>
/// <para>说明:右边选择下拉框刷新左边来源</para>
@@ -3465,6 +3467,7 @@ namespace Lskj.PubBill
if (rowItem != null && model != null)
{
List<GridColumnModel> calcModels = this.gcMain.ObjmControlList.FindAll(x => !string.IsNullOrEmpty(x.CalcExpr)).OrderBy(y => y.CalcOrder).ToList();
foreach (GridColumnModel gridModel in calcModels)
{
// 计算顺序小于当前控件则不计算
@@ -3870,12 +3873,16 @@ namespace Lskj.PubBill
}
else if (!string.IsNullOrEmpty(model.DefaultValue))
{
newRow[col.FieldName] = fieldValue;
if (string.IsNullOrEmpty(newRow[col.FieldName] + ""))
{
newRow[col.FieldName] = fieldValue;
}
if (!string.IsNullOrEmpty(model.UnionFields))
{
this.SetUnionValue(model, fieldValue + "", newRow);
this.SetUnionValue(model, newRow[col.FieldName] + "", newRow);
}
SetCalcValue(model, fieldValue + "", newRow);
SetCalcValue(model, newRow[col.FieldName] + "", newRow);
//this.gcMain.GridView.SetFocusedRowCellValue(col, fieldValue);
}