SVN-Revision: r690
This commit is contained in:
cyf
2025-06-09 01:24:56 +00:00
parent d2f527a7a1
commit 826bfd4865
7 changed files with 130 additions and 42 deletions
@@ -382,16 +382,6 @@ namespace Lskj.Control.Model
this._bandFields = item.Table.Columns.Contains("bandFields") ? item["bandFields"] + "" : string.Empty;
this._fieldtype = item.Table.Columns.Contains("fieldsqltag") && !string.IsNullOrWhiteSpace(item["fieldsqltag"] + "") ? Convert.ToInt32(item["fieldsqltag"] + "") : 0;
if (this._fieldtype == 42)
{
this._fieldtype = 160;
}
if (this._fieldtype == 43)
{
this._fieldtype = 161;
}
this._sqlSource = item.Table.Columns.Contains("fieldsql") && !string.IsNullOrWhiteSpace(item["fieldsql"] + "") ? item["fieldsql"] + "" : string.Empty;
this._valueMember = item.Table.Columns.Contains("fieldsqlid") && !string.IsNullOrWhiteSpace(item["fieldsqlid"] + "") ? item["fieldsqlid"] + "" : "dm";
this._textMember = item.Table.Columns.Contains("fieldsqlname") && !string.IsNullOrWhiteSpace(item["fieldsqlname"] + "") ? item["fieldsqlname"] + "" : "mc";
@@ -443,4 +433,9 @@ namespace Lskj.Control.Model
this._lookUpWidth = item.Table.Columns.Contains("LookUpWidth") ? int.TryParse(item["LookUpWidth"] + "", out int lookUpWidth) ? lookUpWidth : 0 : 0;
this._lookUpFieldsWidth = item.Table.Columns.Contains("LookUpFieldsWidth") ? item["LookUpFieldsWidth"] + "" : "";
this.isDynamic = item.Table.Columns.Contains("isDynamic") && !string.IsNullOrWhiteSpace(item["isDynamic"] + "") ? "1".Equals(item["isDynamic"] + "") : false;
this.ConfigureColumnMode = item.Table.Columns.Contains("ConfigureColumnMode") && !string.IsNullOrWhiteSpace(item["ConfigureColumnMode"] + "") ? "1".Equa
this.ConfigureColumnMode = item.Table.Columns.Contains("ConfigureColumnMode") && !string.IsNullOrWhiteSpace(item["ConfigureColumnMode"] + "") ? "1".Equals(item["ConfigureColumnMode"] + "") : false;
this.SplicingConditions = item.Table.Columns.Contains("SplicingConditions") ? item["SplicingConditions"] + "" : "";
this.isVislble = item.Table.Columns.Contains("vislble") && !string.IsNullOrWhiteSpace(item["vislble"] + "") ? "1".Equals(item["vislble"] + "") : false;
if (item.Table.Columns.Contains("LabPicUrlHeight"))
{
int.TryParse
@@ -259,6 +259,10 @@ namespace Lskj.Control.Model
///记住上下复选行(上下表都有复选框才生效)
/// </summary>
public bool RecordDetailsCheckbox;
/// <summary>
///mrp条件页签(根据页签选中行去设置别的页签中对应的条件)
/// </summary>
public bool MrpConditionTab;
/// <summary>
@@ -316,4 +320,5 @@ namespace Lskj.Control.Model
this.AssociateRight = item.Table.Columns.Contains("AssociateRight") ? "1".Equals(item["AssociateRight"] + "") : false;
this.Enablecond = item.Table.Columns.Contains("Enablecond") ? (item["Enablecond"] + ""): string.Empty;
this.DBClickEvent = item.Table.Columns.Contains("DBClickEvent") ? "1".Equals(item["DBClickEvent"] + "") : false;
this.ProhibitRefresh = item.T
this.ProhibitRefresh = item.Table.Columns.Contains("ProhibitRefresh") ? "1".Equals(item["ProhibitRefresh"] + "") : false;
this.DragExecuteSql = item.Ta
+14 -10
View File
@@ -3850,16 +3850,6 @@ namespace Lskj.Control.Model
model.IsSave = true;
model.Visible = item.Table.Columns.Contains("visible") ? "1".Equals(item["visible"] + "") : false;
model.FieldType = string.IsNullOrEmpty(item["fieldTypeId"] + "") ? 0 : Convert.ToInt32(item["fieldTypeId"] + "");
if (model.FieldType == 42)
{
model.FieldType = 160;
}
if (model.FieldType == 43)
{
model.FieldType = 161;
}
model.FieldName = item["fieldName"] + "";
model.Name = "txt_" + item["fieldName"] + "";
model.LabelText = item["userName"] + "";
@@ -3928,6 +3918,20 @@ namespace Lskj.Control.Model
model.ImportCurrentValue = item.Table.Columns.Contains("ImportCurrentValue") && !string.IsNullOrWhiteSpace(item["ImportCurrentValue"] + "") ? "1".Equals(item["ImportCurrentValue"] + "") : false;
model.SchedStartDataControl = item.Table.Columns.Contains("SchedStartDataControl") && !string.IsNullOrWhiteSpace(item["SchedStartDataControl"] + "") ? "1".Equals(item["SchedStartDataControl"] + "") : false;
model.ListBoxFontSize = item.Table.Columns.Contains("ListBoxFontSize") && !string.IsNullOrEmpty(item["ListBoxFontSize"] + "") ? Convert.ToInt32(item["ListBoxFontSize"] + "") : 0;
//为了和工具里和bs里统一
if (model.FieldType == 42)
{
//模块弹出框单选返回id
model.FieldType = 160;
model.IsRadio = true;
}
if (model.FieldType == 43)
{
//模块弹出框多选返回id
model.FieldType = 160;
model.IsRadio = false;
}
return model;
}
/// <summary>
+24
View File
@@ -1021,6 +1021,14 @@ namespace Lskj.Control
DataRow row = BaseImpl.GetDataRowResult(sql);
if (row != null) this.ModuleGridObj.GridControlObj.SetColumnName(row);
}
if (this.SysModel.DynamicPrompt && e != null)
{
DataRow dataRow = this.gridLeft.GetViewFocusedDataRow();
if (dataRow != null && dataRow.Table.Columns.Contains("ReminderInformation"))
{
this.ModuleGridObj.SetDisplayColumns(dataRow["ReminderInformation"] + "", this.SysModel.PromptFontSize, this.SysModel.PromptForceColor);
}
}
this.SetMainGridView(where);
if (this.IsDragDetail)
@@ -1142,6 +1150,14 @@ namespace Lskj.Control
DataRow row = BaseImpl.GetDataRowResult(sql);
if (row != null) this.ModuleGridObj.GridControlObj.SetColumnName(row);
}
if (this.SysModel.DynamicPrompt)
{
DataRow dataRow = this.treeGridLeft.GetViewFocusedDataRow();
if (dataRow != null && dataRow.Table.Columns.Contains("ReminderInformation"))
{
this.ModuleGridObj.SetDisplayColumns(dataRow["ReminderInformation"] + "", this.SysModel.PromptFontSize, this.SysModel.PromptForceColor);
}
}
this.SetMainGridView();
if (this.IsDragDetail)
@@ -1463,6 +1479,14 @@ namespace Lskj.Control
DataRow row = BaseImpl.GetDataRowResult(sql);
if (row != null) this.ModuleGridObj.GridControlObj.SetColumnName(row);
}
if (this.SysModel.DynamicPrompt && e != null)
{
DataRow[] dataRows = this.treeLeft.DataSource.Select(this.treeLeft.TreeNodeKeyField + "='" + e.Node.Name + "'");
if (dataRows != null && dataRows[0].Table.Columns.Contains("ReminderInformation"))
{
this.ModuleGridObj.SetDisplayColumns(dataRows[0]["ReminderInformation"] + "", this.SysModel.PromptFontSize, this.SysModel.PromptForceColor);
}
}
this.SetMainGridView(where);
if (this.IsDragDetail)
+36 -20
View File
@@ -41,6 +41,8 @@ using Lskj.WebErp.Core.BLL.Abstract;
using Lskj.Data.Api.BLL;
using DevExpress.XtraGrid.Views.Base;
using System.Threading.Tasks;
using DevExpress.XtraRichEdit;
using DevExpress.XtraRichEdit.API.Native;
namespace Lskj.Control
{
@@ -428,7 +430,7 @@ namespace Lskj.Control
/// <summary>
/// 上方提示框
/// </summary>
public LabelRemarkEdit PromptBox = null;
public LabelRichEdit PromptBox = null;
/// <summary>
/// 上方高度
/// </summary>
@@ -5373,31 +5375,24 @@ namespace Lskj.Control
//不能搜索,并且传入提示值
this.pl_top_fix_search.Visible = false;
this.pl_top_right.Visible = false;
this.TipsPanel.Visible = true;
//提示内容有值的情况下,隐藏右侧按钮
if (string.IsNullOrWhiteSpace(text))
{
this.pl_top_right.Visible = true;
}
else
{
this.pl_top_right.Visible = false;
}
if (!CreatePromptBox)
{
this.TopHeight = this.pl_top.Height;
//代码的方式创建,直接拖的控件会提示线程问题
this.TipsPanel.Controls.Clear();
this.PromptBox = new LabelRemarkEdit();
this.PromptBox = new LabelRichEdit();
this.PromptBox.Dock = DockStyle.Fill;
this.PromptBox.Padding = new Padding(3, 5, 0, 0);
this.PromptBox.FontSize = ForceSize;
this.PromptBox.Padding = new Padding(3, 5, 0, 8);
this.PromptBox.FontSize = ForceSize;//ForceSize;
this.PromptBox.LabelText = "";
this.PromptBox.TextEdit.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.PromptBox.TextEdit.BackColor = Color.FromArgb(173, 216, 230);
this.TipsPanel.BackColor = Color.FromArgb(173, 216, 230);
//this.PromptBox.TextEdit.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
//this.PromptBox.TextEdit.BackColor = Color.FromArgb(173, 216, 230);
//this.TipsPanel.BackColor = Color.FromArgb(173, 216, 230);
if (!string.IsNullOrWhiteSpace(ForceColor))
{
this.PromptBox.TextEdit.ForeColor = ColorTranslator.FromHtml(ForceColor);
@@ -5408,9 +5403,26 @@ namespace Lskj.Control
CreatePromptBox = true;
}
PromptBox.EditText = text;
// 获取文档对象
Document document = this.PromptBox.TextEdit.Document;
document.BeginUpdate();
try
{
// 获取段落属性并设置行间距
ParagraphProperties pp = document.BeginUpdateParagraphs(document.Range);
// 设置行间距为1.2倍
pp.LineSpacingType = ParagraphLineSpacing.Multiple;
pp.LineSpacingMultiplier = 1.2f;
document.EndUpdateParagraphs(pp);
}
finally
{
document.EndUpdate();
}
int textHeight = this.GetFirstThreeLinesHeight(PromptBox.TextEdit)+4;
//前4行高度
int textHeight = (int)Math.Round(this.GetFirstThreeLinesHeight(PromptBox.TextEdit)*1.2) +20;
if (textHeight > this.TopHeight)
{
this.pl_top.Height = textHeight;
@@ -5422,6 +5434,10 @@ namespace Lskj.Control
}
}
public int GetFirstThreeLinesHeight(MemoEdit memoEdit)
public int GetFirstThreeLinesHeight(RichEditControl richEdit)
{
if (string.IsNullOrEmpty(memoEdit.Te
if (string.IsNullOrEmpty(richEdit.Text)) return 0;
// 获取字体和最大宽度
Document document = richEdit.Document;
+17
View File
@@ -102,6 +102,11 @@ namespace Lskj.Control
{
get { return this.xtc_container; }
}
/// <summary>
/// 替换其他页签中条件的表
/// </summary>
public GridControlEx ReplaceControlEx;
/// <summary>
/// 右键菜单执行后调用
/// </summary>
@@ -368,6 +373,10 @@ namespace Lskj.Control
{
DetailEx.ModuleGridObj.RightGridCallBack += this.OnMrpBtnClickCallback;
}
if (model.MrpConditionTab )
{
this.ReplaceControlEx = DetailEx.ModuleGridObj.GridControlObj;
}
DetailEx.ModuleGridObj.VisibleSearchPanel = Model.IsDetailSearch || model.DetailSearch;
DetailEx.ModuleGridObj.GridControlObj.Tag = model;
page.Tag = DetailEx.ModuleGridObj.GridControlObj;
@@ -437,6 +446,10 @@ namespace Lskj.Control
GridDragGrid dragGrid = new GridDragGrid(this.MrpDetailGridEx.GridView, gridEx.GridView);
dragGrid.OnDragComplete += new GridFragGridCompleteEventHandler(OnMrpDragGridCompleted);
}
if (model.MrpConditionTab)
{
this.ReplaceControlEx = gridEx;
}
// 加载配置查询条件
if (Model != null && Model.IsDetailSearch)
{
@@ -562,6 +575,10 @@ namespace Lskj.Control
{
gridEx.RightGridCallBack += this.OnMrpBtnClickCallback;
}
if (model.MrpConditionTab)
{
this.ReplaceControlEx = gridEx.GridControlObj;
}
if (model.AutoRefresh && !_UnRefresh && isGridmerge)
gridEx.SearchObj.SearchGrid();
page.Tag = gridEx.GridControlObj;
@@ -1299,6 +1299,33 @@ namespace Lskj.Control
}
}
/// <summary>
/// <para>说明:导出表格数据</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2018-02-01 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="sender">The sender.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
protected override void ExportItemClick(object sender, EventArgs e)
{
try
{
this.TreeListObj.ToExcelTreeList(this.Model.FormText);
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex, Model.ModuleCode);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
/// <para>说明:设置编辑列</para>
/// <para>创建人:龚宇超</para>