SVN-Revision: r934
This commit is contained in:
cyf
2025-08-07 09:36:37 +00:00
parent 0293871027
commit 87056b7953
6 changed files with 178 additions and 120 deletions
+55 -1
View File
@@ -536,4 +536,58 @@ namespace Lskj.Workflow.Control
/// <para>说明:点击流转步骤加载数据</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2019-06-21 </para>
/// <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>
/// <exception cref="System.NotImplementedException"></exception>
void OnTitleLabelObjClick(StepItem1 before, StepItem1 after)
{
try
{
BillflowModel model = after.Tag as BillflowModel;
this.SeletStepItem1Obj = after;
this.SetFlowItem(model);
this.SetMainFieldCheckState(model);
this.SetDetailFieldCheckState(model);
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
}
}
#endregion
/// <summary>
/// <para>说明:插入流转类别</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2019-06-24 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
public void InsertFlowItem(string stepGroup, string stepName)
{
int Code =0;
if (SelectBillflowModel == null)
{
MessageUtil.Show("插入的流转类别不能为空");
return;
}
else
{
//BillflowModelList
//选中的步骤号
int selectedStepCode = SelectBillflowModel.stepCode;
//获取比选中步骤小一步的步骤号
int? maxStepCode = BillflowModelList
.Where(m => m.stepCode < selectedStepCode)
.Select(m => m.stepCode)
.DefaultIfEmpty() // 避免空集合时抛出
+60 -22
View File
@@ -45,6 +45,10 @@ namespace Lskj.Workflow.Control
/// 缓存model
/// </summary>
public List<BillflowTypeModel> modellist = new List<BillflowTypeModel>();
/// <summary>
/// 主页转过来的操作权限
/// </summary>
public bool SerpPage3Power;
public StepPage3()
{
InitializeComponent();
@@ -55,6 +59,7 @@ namespace Lskj.Workflow.Control
this.LeftFlowCharfillcolor.TextEdit.Click += new EventHandler(color_Click);
this.fontColor.TextEdit.Click += new EventHandler(color_Click);
this.LeftFontColor.TextEdit.Click += new EventHandler(color_Click);
if (SystemInfo.Instance.HideFlowchartTab) this.xtraTabControl1.TabPages[1].PageVisible = false;
}
#region
@@ -121,7 +126,7 @@ namespace Lskj.Workflow.Control
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
@@ -374,7 +379,7 @@ namespace Lskj.Workflow.Control
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
MessageUtil.Show(Message, ex.Message);
LogUtil.WriteError("重置失败!", ex);
}
}
@@ -403,7 +408,7 @@ namespace Lskj.Workflow.Control
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
MessageUtil.Show(Message, ex.Message);
LogUtil.WriteError("初始化权限出错!", ex);
}
}
@@ -435,7 +440,7 @@ namespace Lskj.Workflow.Control
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
MessageUtil.Show(Message, ex.Message);
}
}
#endregion
@@ -569,9 +574,15 @@ namespace Lskj.Workflow.Control
{
StepItem3 item = new StepItem3();
item.TitleLabelObj.Text = pos + "、" + model.stepName + " " + model.stepCode;
item.DeletePabelObj.Visible = false;
//item.DeletePabelObj.Visible = false;
if (SerpPage3Power)
{
item.DeletePabelObj.Enabled = false;
}
item.DeletePabelObj.Click += new EventHandler(OnDeletePabelObjClick);
item.Dock = DockStyle.Top;
item.Tag = item.TitleLabelObj.Tag = model;
item.Tag = item.TitleLabelObj.Tag = item.DeletePabelObj.Tag = model;
item.SetHoverEvent(OnBillFlowLabelObjClick);
if (pos == 1)
{
@@ -653,7 +664,7 @@ namespace Lskj.Workflow.Control
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
@@ -680,7 +691,7 @@ namespace Lskj.Workflow.Control
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
@@ -708,7 +719,7 @@ namespace Lskj.Workflow.Control
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
@@ -737,7 +748,7 @@ namespace Lskj.Workflow.Control
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
@@ -778,7 +789,7 @@ namespace Lskj.Workflow.Control
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
MessageUtil.Show(Message, ex.Message);
LogHelper.Instance.WriteError(ex);
//MessageUtil.Show(ResourceKeys.OperFault);
}
@@ -823,7 +834,7 @@ namespace Lskj.Workflow.Control
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
MessageUtil.Show(Message, ex.Message);
LogHelper.Instance.WriteError(ex);
//MessageUtil.Show(ResourceKeys.OperFault);
}
@@ -854,7 +865,7 @@ namespace Lskj.Workflow.Control
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
@@ -876,7 +887,7 @@ namespace Lskj.Workflow.Control
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
MessageUtil.Show(Message, ex.Message);
}
}
/// <summary>
@@ -890,22 +901,49 @@ namespace Lskj.Workflow.Control
{
if (xtraTabControl1.SelectedTabPage == xtraTabPage2)//进行tabpage位置判断
{
//this.xtraTabPage2.Controls.Clear();
//// 获取基本数据
//ModuleWebView moduleWebView1 = new ModuleWebView();
//this.xtraTabPage2.Controls.Add(moduleWebView1);
//// 获取单据数据
//BillflowTypeStepModel model = this.SelectBillflowTypeStepModel;
//string url = SystemInfo.Instance.OAUrl + "/pages/flowchart/FlowChart.html?ModuleId=" + model.typeCode + "&ModuleType=" + "1" + "&billType=" + model.billType;
//moduleWebView1.Navigate(url);
this.xtraTabPage2.Controls.Clear();
// 获取基本数据
ModuleWebView moduleWebView1 = new ModuleWebView();
this.xtraTabPage2.Controls.Add(moduleWebView1);
// 获取单据数据
BillflowTypeStepModel model = this.SelectBillflowTypeStepModel;
string url = SystemInfo.Instance.OAUrl + "/pages/flowchart/FlowChart.html?ModuleId=" + model.typeCode + "&ModuleType=" + "1" + "&billType=" + model.billType;
moduleWebView1.Navigate(url);
if (SystemInfo.Instance.PrimitiveBrowser)
{
FrmMiniBlink webView = new FrmMiniBlink();
webView.AllowDownload = false;
webView.Dock = DockStyle.Fill;
webView.Tag = model;
this.xtraTabPage2.Controls.Add(webView);
webView.LoadUrl(ReplaceHelper.ReplaceUserInfo(url));
}
else
{
FrmWebBrowser webView = new FrmWebBrowser();
webView.Dock = DockStyle.Fill;
webView.Tag = model;
this.xtraTabPage2.Controls.Add(webView);
webView.FrmLoad(ReplaceHelper.ReplaceUserInfo(url));
}
}
}
catch (Exception ex)
{
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message,ex.Message);
MessageUtil.Show(Message, ex.Message);
}
}
#endregion
}
}
private void OnDeletePabelObjClick(object sender, EventArgs e)
{
try
{
Panel de
+1 -8
View File
@@ -242,11 +242,4 @@ namespace Lskj.Workflow.Control
if (dataTable.Rows.Count > 0)
{
this.memoEdit1.Text = dataTable.Rows[0]["OverBackSql"] + "";
this.memoEdit2.Text = dataTable.Rows[0]["OverBackOper"] + "";
}
}
}
}
+3 -39
View File
@@ -20,6 +20,7 @@ using Spire.Doc.Documents;
using Spire.Doc.Fields;
using Lskj.Control.Model;
using Lskj.Business.Impl;
using Lskj.Business;
namespace Lskj.Workflow
{
@@ -33,6 +34,7 @@ namespace Lskj.Workflow
public FrmMain()
{
InitializeComponent();
if (SystemInfo.Instance.HidePDFGeneration) this.btn_pdf.Visible = false;
}
DataTable masterdt = new DataTable();
@@ -510,42 +512,4 @@ namespace Lskj.Workflow
fristparagraph.ApplyStyle(BuiltinStyle.Subtitle);
document.SaveToFile(filePath, FileFormat.Docx);
//Launching the MS Word file.
WordDocViewer(filePath);
}
public static void WordDocViewer(string fileName)
{
try
{
System.Diagnostics.Process.Start(fileName);
}
catch
{
}
}
/// <summary>
/// 点击开始生成
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btn_start_Click(object sender, EventArgs e)
{
this.Initialization(); // 初始化同步平台
// 创建后台线程
try
{
Thread backThread = new Thread(Mulu);
backThread.IsBackground = true;
backThread.Start();
}
catch (Exception)
{
throw;
}
}
private void btn_getout_Click(object sender, EventArgs e)
{
this.Close();
}
}
}
+41 -46
View File
@@ -41,6 +41,7 @@
this.pllzbzsz = new System.Windows.Forms.Panel();
this.PlAdd = new System.Windows.Forms.Panel();
this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
this.btnInsert = new DevExpress.XtraEditors.SimpleButton();
this.btnToWord = new DevExpress.XtraEditors.SimpleButton();
this.btnInit = new DevExpress.XtraEditors.SimpleButton();
this.btnReset = new DevExpress.XtraEditors.SimpleButton();
@@ -48,10 +49,10 @@
this.btnSaveAllflow = new DevExpress.XtraEditors.SimpleButton();
this.btnSave = new DevExpress.XtraEditors.SimpleButton();
this.panelControl3 = new DevExpress.XtraEditors.PanelControl();
this.stepPage11 = new Lskj.Workflow.Control.StepPage1();
this.stepPage31 = new Lskj.Workflow.Control.StepPage3();
this.stepPage21 = new Lskj.Workflow.Control.StepPage2();
this.stepPage41 = new Lskj.Workflow.Control.StepPage4();
this.stepPage21 = new Lskj.Workflow.Control.StepPage2();
this.stepPage31 = new Lskj.Workflow.Control.StepPage3();
this.stepPage11 = new Lskj.Workflow.Control.StepPage1();
((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
this.panelControl1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit();
@@ -207,6 +208,7 @@
this.panelControl2.Appearance.BackColor = System.Drawing.SystemColors.Control;
this.panelControl2.Appearance.Options.UseBackColor = true;
this.panelControl2.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.panelControl2.Controls.Add(this.btnInsert);
this.panelControl2.Controls.Add(this.btnToWord);
this.panelControl2.Controls.Add(this.btnInit);
this.panelControl2.Controls.Add(this.btnReset);
@@ -219,6 +221,18 @@
this.panelControl2.Size = new System.Drawing.Size(1037, 39);
this.panelControl2.TabIndex = 1;
//
// btnInsert
//
this.btnInsert.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnInsert.Appearance.Options.UseFont = true;
this.btnInsert.Location = new System.Drawing.Point(89, 6);
this.btnInsert.Name = "btnInsert";
this.btnInsert.Size = new System.Drawing.Size(80, 28);
this.btnInsert.TabIndex = 23;
this.btnInsert.TabStop = false;
this.btnInsert.Text = "插入";
this.btnInsert.Click += new System.EventHandler(this.btnInsert_Click);
//
// btnToWord
//
this.btnToWord.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
@@ -236,7 +250,7 @@
//
this.btnInit.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnInit.Appearance.Options.UseFont = true;
this.btnInit.Location = new System.Drawing.Point(177, 6);
this.btnInit.Location = new System.Drawing.Point(259, 6);
this.btnInit.Name = "btnInit";
this.btnInit.Size = new System.Drawing.Size(80, 28);
this.btnInit.TabIndex = 21;
@@ -248,7 +262,7 @@
//
this.btnReset.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnReset.Appearance.Options.UseFont = true;
this.btnReset.Location = new System.Drawing.Point(91, 6);
this.btnReset.Location = new System.Drawing.Point(173, 6);
this.btnReset.Name = "btnReset";
this.btnReset.Size = new System.Drawing.Size(80, 28);
this.btnReset.TabIndex = 20;
@@ -273,7 +287,7 @@
this.btnSaveAllflow.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSaveAllflow.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnSaveAllflow.Appearance.Options.UseFont = true;
this.btnSaveAllflow.Location = new System.Drawing.Point(313, 6);
this.btnSaveAllflow.Location = new System.Drawing.Point(395, 6);
this.btnSaveAllflow.Name = "btnSaveAllflow";
this.btnSaveAllflow.Size = new System.Drawing.Size(139, 28);
this.btnSaveAllflow.TabIndex = 18;
@@ -309,21 +323,13 @@
this.panelControl3.Size = new System.Drawing.Size(1037, 586);
this.panelControl3.TabIndex = 2;
//
// stepPage11
// stepPage41
//
this.stepPage11.Dock = System.Windows.Forms.DockStyle.Fill;
this.stepPage11.Location = new System.Drawing.Point(0, 0);
this.stepPage11.Name = "stepPage11";
this.stepPage11.Size = new System.Drawing.Size(1037, 586);
this.stepPage11.TabIndex = 0;
//
// stepPage31
//
this.stepPage31.Dock = System.Windows.Forms.DockStyle.Fill;
this.stepPage31.Location = new System.Drawing.Point(0, 0);
this.stepPage31.Name = "stepPage31";
this.stepPage31.Size = new System.Drawing.Size(1037, 586);
this.stepPage31.TabIndex = 2;
this.stepPage41.Dock = System.Windows.Forms.DockStyle.Fill;
this.stepPage41.Location = new System.Drawing.Point(0, 0);
this.stepPage41.Name = "stepPage41";
this.stepPage41.Size = new System.Drawing.Size(1037, 586);
this.stepPage41.TabIndex = 3;
//
// stepPage21
//
@@ -333,13 +339,21 @@
this.stepPage21.Size = new System.Drawing.Size(1037, 586);
this.stepPage21.TabIndex = 1;
//
// stepPage41
// stepPage31
//
this.stepPage41.Dock = System.Windows.Forms.DockStyle.Fill;
this.stepPage41.Location = new System.Drawing.Point(0, 0);
this.stepPage41.Name = "stepPage41";
this.stepPage41.Size = new System.Drawing.Size(1037, 586);
this.stepPage41.TabIndex = 3;
this.stepPage31.Dock = System.Windows.Forms.DockStyle.Fill;
this.stepPage31.Location = new System.Drawing.Point(0, 0);
this.stepPage31.Name = "stepPage31";
this.stepPage31.Size = new System.Drawing.Size(1037, 586);
this.stepPage31.TabIndex = 2;
//
// stepPage11
//
this.stepPage11.Dock = System.Windows.Forms.DockStyle.Fill;
this.stepPage11.Location = new System.Drawing.Point(0, 0);
this.stepPage11.Name = "stepPage11";
this.stepPage11.Size = new System.Drawing.Size(1037, 586);
this.stepPage11.TabIndex = 0;
//
// FrmWork
//
@@ -375,23 +389,4 @@
private DevExpress.XtraEditors.PanelControl panelControl3;
private Control.StepPage1 stepPage11;
private System.Windows.Forms.Panel pllzbzsz;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Panel plxllzsz;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Panel plxlsz;
private System.Windows.Forms.Panel panel1;
private DevExpress.XtraEditors.SimpleButton btnSave;
private DevExpress.XtraEditors.SimpleButton btnAdd;
private DevExpress.XtraEditors.SimpleButton btnReset;
private DevExpress.XtraEditors.SimpleButton btnInit;
private DevExpress.XtraEditors.SimpleButton btnSaveAllflow;
private DevExpress.XtraEditors.SimpleButton btnToWord;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Panel plzsht;
private Control.StepPage4 stepPage41;
private Control.StepPage2 stepPage21;
private Control.StepPage3 stepPage31;
}
}
private System.Windows.Forms.Lab
+18 -4
View File
@@ -69,6 +69,7 @@ namespace Lskj.Workflow
{
this.mCurrentStepPage = stepEnum;
this.btnAdd.Visible = true;
this.btnInsert.Visible = BillModel.NewVer==1;
switch (stepEnum)
{
case StepEnum.StepPage1:
@@ -85,7 +86,7 @@ namespace Lskj.Workflow
this.btnAdd.Text = "新增(&A)";
break;
case StepEnum.StepPage2:
this.btnSaveAllflow.Visible = this.btnReset.Visible = this.btnInit.Visible = false;
this.btnInsert.Visible=this.btnSaveAllflow.Visible = this.btnReset.Visible = this.btnInit.Visible = false;
this.stepPage11.Visible = false;
this.stepPage21.Visible = true;
this.stepPage31.Visible = false;
@@ -98,6 +99,7 @@ namespace Lskj.Workflow
break;
case StepEnum.StepPage3:
this.btnSaveAllflow.Visible = this.btnReset.Visible = this.btnInit.Visible = true;
this.btnInsert.Visible = false;
this.stepPage11.Visible = false;
this.stepPage21.Visible = false;
this.stepPage31.Visible = true;
@@ -109,7 +111,8 @@ namespace Lskj.Workflow
this.btnAdd.Text = "生成(&A)";
break;
case StepEnum.StepPage4:
this.btnSaveAllflow.Visible = this.btnReset.Visible = this.btnInit.Visible = this.btnAdd.Visible = false;
this.btnSaveAllflow.Visible = this.btnReset.Visible = this.btnInit.Visible = false;
this.btnInsert.Visible = false;
this.stepPage11.Visible = false;
this.stepPage21.Visible = false;
this.stepPage31.Visible = false;
@@ -118,6 +121,7 @@ namespace Lskj.Workflow
this.plxlsz.BackgroundImage = Resources.icon_xlsz_gray_2x;
this.plxllzsz.BackgroundImage = Resources.icon_lzbzsz_gray_2x;
this.plzsht.BackgroundImage = Resources.icon_lzbzsz_2x;
this.btnAdd.Text = "生成Sql(&A)";
break;
}
@@ -159,6 +163,7 @@ namespace Lskj.Workflow
this.btnAdd.Enabled = this.btnReset.Enabled = this.btnInit.Enabled = false;
stepPage11.SerpPagePower = true;
stepPage21.SerpPage2Power = true;
stepPage31.SerpPage3Power = true;
}
// 设置默认显示第一个界面
this.SetStepPage(StepEnum.StepPage1);
@@ -230,6 +235,12 @@ namespace Lskj.Workflow
this.stepPage31.CreateFlowTypeStep();
}
break;
case StepEnum.StepPage4:
{
// 生成终审sql
this.stepPage41.GenerateFinalSqlStatement();
}
break;
}
}
catch (Exception ex)
@@ -460,5 +471,8 @@ namespace Lskj.Workflow
}
#endregion
}
}
private void btnInsert_Click(object sender, EventArgs e)
{
try