SVN r1111

SVN-Revision: r1111
This commit is contained in:
cyf
2026-01-30 07:56:32 +00:00
parent b05e427911
commit 92d1a3bfed
+80 -6
View File
@@ -161,8 +161,14 @@ namespace Lskj.PubBillInfo
this.BillModelObj = new BillAuditModel(BillImpl.GetBillInfo(this.SysModel.ModuleCode));
this.BillModelObj.MasterPreFix = BaseImpl.GetColumnPrefix(this.BillModelObj.MasterTable);
this.AuditModelObj = new AccraditationModel(BillAuditImpl.GetBillFlowData(this.SysModel.ModuleCode, this.SysModel.StepCode));
string text = ResourceKeys.BillInfoTitle;
if (Business.Impl.LanguageTranslation.Translatable)
{
text = "【{0}】" + Business.Impl.LanguageTranslation.GetTranslatedText("单据号") + "【{1}】";
this.Text = !string.IsNullOrEmpty(this.SysModel.FormTitle) ? string.Format(ResourceKeys.BillInfoTitle, this.SysModel.FormText, this.SysModel.BillDocumentId) : this.SysModel.FormText;
}
this.Text = !string.IsNullOrEmpty(this.SysModel.FormTitle) ? string.Format(text, this.SysModel.FormText, this.SysModel.BillDocumentId) : this.SysModel.FormText;
this.txt_billDocumentId.EditText = this.SysModel.BillDocumentId;
}
/// <summary>
@@ -286,7 +292,8 @@ namespace Lskj.PubBillInfo
private void InitializeCommonMenus()
{
DataTable tableCommon = BaseModuleImpl.GetBaseGridRightMenus(this.SysModel.ModuleCode, ModuleType.BillDetail);
this.btnAtt.Text = "附件" + "(" + AttachImpl.GetFileCount(this.BillModelObj.DirId + "", this.SysModel.BillDocumentId) + ")";
string text = Business.Impl.LanguageTranslation.Translatable ? Business.Impl.LanguageTranslation.GetTranslatedText("附件") : "附件";
this.btnAtt.Text = text + "(" + AttachImpl.GetFileCount(this.BillModelObj.DirId + "", this.SysModel.BillDocumentId) + ")";
if (tableCommon.Rows.Count == 0)
{
this.dpb_Tools.Visible = false;
@@ -506,7 +513,38 @@ namespace Lskj.PubBillInfo
//string sqlValue = ReplaceHelper.ReplaceRowParam(this.gridBillInfo.GridView.GetFocusedDataRow(), model.DetailSql);
//this.baseTab.SetGridDataSource(tabPage, MainImpl.GetDataTableResult(sqlValue));
if (tabPage.Tag is GridControlEx)
if (tabPage.Tag is ModuleWebView)
{
// 加载网页
string url = ReplaceHelper.ReplaceRowParam(dataRow, ReplaceHelper.ReplaceUserInfo(model.DetailSql));
url = url.StartsWith("http") ? url : SystemInfo.Instance.OAUrl + url;
ModuleWebView webView = tabPage.Tag as ModuleWebView;
webView.Dock = DockStyle.Fill;
webView.Tag = model;
webView.Navigate(url);
}
else if (tabPage.Tag is FrmWebBrowser)
{
// 加载网页
string url = ReplaceHelper.ReplaceRowParam(dataRow, ReplaceHelper.ReplaceUserInfo(model.DetailSql));
url = url.StartsWith("http") ? url : SystemInfo.Instance.OAUrl + url;
FrmWebBrowser webView = tabPage.Tag as FrmWebBrowser;
webView.Dock = DockStyle.Fill;
webView.Tag = model;
webView.LoadUrl(url);
}
else if (tabPage.Tag is FrmMiniBlink)
{
// 加载网页
string url = ReplaceHelper.ReplaceRowParam(dataRow, ReplaceHelper.ReplaceUserInfo(model.DetailSql));
url = url.StartsWith("http") ? url : SystemInfo.Instance.OAUrl + url;
FrmMiniBlink webView = tabPage.Tag as FrmMiniBlink;
webView.Dock = DockStyle.Fill;
webView.Tag = model;
webView.LoadUrl(url);
}
else if(tabPage.Tag is GridControlEx)
{
string sqlValue = isDetailAttach ? ReplaceHelper.ReplaceRowParam(dataRow, model.DetailSql) : GetSearchSql(model);
GridControlEx grdExMain = (tabPage.Tag as GridControlEx);
@@ -588,7 +626,20 @@ namespace Lskj.PubBillInfo
graphicsText.DrawString(this._waterMark.Text, new Font("宋体", 20, FontStyle.Bold), brush, new PointF(x, y), format, -20f);
e.Graphics.TranslateTransform(x, y);
e.Graphics.RotateTransform(-20f);
e.Graphics.DrawRectangle(pen, new Rectangle(-60, -19, 120, 32));
if (Business.Impl.LanguageTranslation.Translatable)
{
// 1. 测量文本尺寸
SizeF textSize = e.Graphics.MeasureString(this._waterMark.Text, new Font("宋体", 20, FontStyle.Bold), new SizeF(float.MaxValue, float.MaxValue), format);
// 2. 计算边框矩形的尺寸和位置
int rectWidth = (int)textSize.Width + 10;
e.Graphics.DrawRectangle(pen, new Rectangle(-rectWidth / 2, -19, rectWidth, 32));
}
else
{
e.Graphics.DrawRectangle(pen, new Rectangle(-60, -19, 120, 32));
}
}
e.Graphics.ResetTransform();
if (!string.IsNullOrEmpty(this._waterMark.Print))
@@ -598,7 +649,19 @@ namespace Lskj.PubBillInfo
graphicsText.DrawString(this._waterMark.Print, new Font("宋体", 18, FontStyle.Bold), brush, new PointF(x, y), format, -20f);
e.Graphics.TranslateTransform(x, y);
e.Graphics.RotateTransform(-20f);
e.Graphics.DrawRectangle(pen, new Rectangle(-60, -19, 120, 32));
if (Business.Impl.LanguageTranslation.Translatable)
{
// 1. 测量文本尺寸
SizeF textSize = e.Graphics.MeasureString(this._waterMark.Print, new Font("宋体", 18, FontStyle.Bold), new SizeF(float.MaxValue, float.MaxValue), format);
// 2. 计算边框矩形的尺寸和位置
int rectWidth = (int)textSize.Width + 10;
e.Graphics.DrawRectangle(pen, new Rectangle(-rectWidth / 2, -19, rectWidth, 32));
}
else
{
e.Graphics.DrawRectangle(pen, new Rectangle(-60, -19, 120, 32));
}
}
e.Graphics.ResetTransform();
if (!string.IsNullOrEmpty(this._waterMark.Collect))
@@ -609,7 +672,18 @@ namespace Lskj.PubBillInfo
graphicsText.DrawString(this._waterMark.Collect, new Font("宋体", 20, FontStyle.Bold), brush, new PointF(x, y), format, -20f);
e.Graphics.TranslateTransform(x, y);
e.Graphics.RotateTransform(-20f);
e.Graphics.DrawRectangle(pen, new Rectangle(-60, -19, 120, 32));
if (Business.Impl.LanguageTranslation.Translatable)
{
// 1. 测量文本尺寸
SizeF textSize = e.Graphics.MeasureString(this._waterMark.Collect, new Font("宋体", 20, FontStyle.Bold), new SizeF(float.MaxValue, float.MaxValue), format);
// 2. 计算边框矩形的尺寸和位置
int rectWidth = (int)textSize.Width + 10;
e.Graphics.DrawRectangle(pen, new Rectangle(-rectWidth / 2, -19, rectWidth, 32));
}
else
{
e.Graphics.DrawRectangle(pen, new Rectangle(-60, -19, 120, 32));
}
}
}
}