SVN r1195

SVN-Revision: r1195
This commit is contained in:
cyf
2026-06-01 02:00:18 +00:00
parent 2eec2466f3
commit ab70c5cab1
+47 -6
View File
@@ -1874,6 +1874,8 @@ namespace Lskj.PubBill
}
else if (model.SourceType == 3 || model.SourceType == 4)
{
//类型为3,是树表格类型的单据管理。
//类型为4,是树表格类型的数据来源
gridControl = sourceControl != null ? (TreeGridControlEx)sourceControl : new TreeGridControlEx();
gridControl.Dock = DockStyle.Fill;
gridControl.BorderStyle = System.Windows.Forms.BorderStyle.None;
@@ -2592,7 +2594,7 @@ namespace Lskj.PubBill
if (page != null && page.Controls[0] is ModuleGridEx moduleGridEx)
{
bool result = !isReadOnly;
if (!string.IsNullOrWhiteSpace(this.BillModel.AdditionalCond)) result=ReplaceHelper.ReplaceRowParamCond(rowItem, this.BillModel.AdditionalCond);
if (!string.IsNullOrWhiteSpace(this.BillModel.AdditionalCond)) result = ReplaceHelper.ReplaceRowParamCond(rowItem, this.BillModel.AdditionalCond);
moduleGridEx.GridControlObj.GridView.OptionsBehavior.Editable = result;
if (moduleGridEx.SysModel != null && moduleGridEx.SysModel.IsCustomGroup == 1 && (moduleGridEx.GridControlObj.CustomGroupBandEx != null || moduleGridEx.GridControlObj.CustomGroupTreeBandEx != null))
{
@@ -4203,7 +4205,7 @@ namespace Lskj.PubBill
}
else if (!string.IsNullOrEmpty(model.DefaultValue))
{
if (string.IsNullOrEmpty(newRow[col.FieldName] + "")|| this.BillModel.DragFixedDefault)
if (string.IsNullOrEmpty(newRow[col.FieldName] + "") || this.BillModel.DragFixedDefault)
{
newRow[col.FieldName] = fieldValue;
}
@@ -4736,7 +4738,7 @@ namespace Lskj.PubBill
}
// 检测是否为提交或者终审模块
string text = Business.Impl.LanguageTranslation.Translatable ? Business.Impl.LanguageTranslation.GetTranslatedText("已终审") : "已终审";
if (_waterMark.Text.Contains(text)&& !this.BillModel.BillFinalReviewAdd)
if (_waterMark.Text.Contains(text) && !this.BillModel.BillFinalReviewAdd)
{
MessageUtil.Show(ResourceKeys.AddBillDetailed);
return false;
@@ -4977,7 +4979,7 @@ namespace Lskj.PubBill
/// <returns>System.String.</returns>
private string GetAddRecord(ref string parmaryValue)
{
if (BillModel.NewVer == 0|| BillModel.SaveVerifyBillNo)
if (BillModel.NewVer == 0 || BillModel.SaveVerifyBillNo)
{
// 检查当前的单据号是否已被占用.
string newBillNo = BillImpl.GetBillNo(this.BillModel.BillSeq);
@@ -5794,12 +5796,12 @@ namespace Lskj.PubBill
{
unionModel.TreeGridDetailControlObj.TreeListObj.DataSource = BillImpl.GetDataTableResult(sqlValue);
}
else
else
{
unionModel.GridDetailControlObj.GridControl.DataSource = BillImpl.GetDataTableResult(sqlValue);
}
if (BillModel.drgFinishHide == "1"&& unionModel.GridDetailControlObj!=null)
if (BillModel.drgFinishHide == "1" && unionModel.GridDetailControlObj != null)
{
DataTable finishHideTb = unionModel.GridDetailControlObj.GridControl.DataSourceTable();
//foreach (DataRow drItem in RemoveRowitem)
@@ -7093,6 +7095,7 @@ namespace Lskj.PubBill
BillSourceUnionModel unionModel = tabPage.Tag as BillSourceUnionModel;
int FocuseIndex = e.SourceGridViewObj.FocusedRowHandle;
int[] rows = e.SourceGridViewObj.GetSelectedRows();
List<DataRow> DragRows = new List<DataRow>();
int i = 0;
foreach (int rowIndex in rows)
{
@@ -7113,6 +7116,13 @@ namespace Lskj.PubBill
//DataTable details = unionModel.GridDetailControlObj.GridView.DataController.GetAllFilteredAndSortedRows().OfType<DataRow>().CopyToDataTable();
this.ControlObj.SetAllControlValue(rowItem, this.BillModel.isReplaceFixed);
if (this.BillModel.SourceMainPushPullHide)
{
DragRows.Add(rowItem);
}
if (unionModel.ModelObj.CadDragDetail)
{
this.AddMultiRowToGridView(details, unionModel);
@@ -7156,6 +7166,18 @@ namespace Lskj.PubBill
{
this.OnBillSaveClick(null, null);
}
if (this.BillModel.SourceMainPushPullHide && DragRows.Count > 0)
{
foreach (DataRow item in DragRows)
{
if (e.SourceGridViewObj.GridControl.DataSourceTable().Rows.IndexOf(item) >= 0)
{
e.SourceGridViewObj.GridControl.DataSourceTable().Rows.Remove(item);
}
}
}
}
}
}
@@ -9115,6 +9137,7 @@ namespace Lskj.PubBill
BillSourceUnionModel unionModel = tabPage.Tag as BillSourceUnionModel;
int FocuseIndex = e.GridViewObj.FocusedRowHandle;
int[] rows = e.GridViewObj.GetSelectedRows();
List<DataRow> DragRows = new List<DataRow>();
int i = 0;
foreach (int rowIndex in rows)
{
@@ -9132,6 +9155,12 @@ namespace Lskj.PubBill
}
this.ControlObj.SetAllControlValue(rowItem, this.BillModel.isReplaceFixed);
if (this.BillModel.SourceMainPushPullHide)
{
DragRows.Add(rowItem);
}
if (unionModel.ModelObj.CadDragDetail)
{
//清空当前主单明细表数据
@@ -9160,6 +9189,18 @@ namespace Lskj.PubBill
{
this.OnBillSaveClick(null, null);
}
if (this.BillModel.SourceMainPushPullHide && DragRows.Count > 0)
{
foreach (DataRow item in DragRows)
{
if (e.GridViewObj.GridControl.DataSourceTable().Rows.IndexOf(item) >= 0)
{
e.GridViewObj.GridControl.DataSourceTable().Rows.Remove(item);
}
}
}
}
}
}