SVN-Revision: r889
This commit is contained in:
wyf
2025-07-24 02:44:06 +00:00
parent 1efec78228
commit 2da11181e4
3 changed files with 723 additions and 70 deletions
+129 -64
View File
@@ -41,6 +41,8 @@
this.TabControl = new DevExpress.XtraTab.XtraTabControl();
this.MainTab = new DevExpress.XtraTab.XtraTabPage();
this.splitLeft = new DevExpress.XtraEditors.SplitContainerControl();
this.pl_detail = new DevExpress.XtraEditors.XtraScrollableControl();
this.gridBillInfo = new Lskj.Control.GridControlEx();
this.pl_left_top = new DevExpress.XtraEditors.XtraScrollableControl();
this.txt_billDocumentId = new Lskj.Control.LabelTextEdit();
this.tab_basicInfo = new Lskj.Control.TabControlEx();
@@ -68,8 +70,13 @@
this.label_date = new Lskj.Control.LabelDateEdit();
this.label_managerAudit = new Lskj.Control.LabelTextEdit();
this.CheckSuggestion = new Lskj.Control.LabelComboxEdit();
this.pl_detail = new DevExpress.XtraEditors.XtraScrollableControl();
this.gridBillInfo = new Lskj.Control.GridControlEx();
this.dbpFP = new DevExpress.XtraEditors.DropDownButton();
this.pmFP = new DevExpress.XtraBars.PopupMenu();
this.barManager2 = new DevExpress.XtraBars.BarManager();
this.barDockControl1 = new DevExpress.XtraBars.BarDockControl();
this.barDockControl2 = new DevExpress.XtraBars.BarDockControl();
this.barDockControl3 = new DevExpress.XtraBars.BarDockControl();
this.barDockControl5 = new DevExpress.XtraBars.BarDockControl();
((System.ComponentModel.ISupportInitialize)(this.pMenu)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.barManager1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pMprint)).BeginInit();
@@ -80,6 +87,7 @@
this.MainTab.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitLeft)).BeginInit();
this.splitLeft.SuspendLayout();
this.pl_detail.SuspendLayout();
this.pl_left_top.SuspendLayout();
this.tabpage_remind.SuspendLayout();
this.tabpage_sign.SuspendLayout();
@@ -91,7 +99,8 @@
this.pl_right_bottom.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pl_bottom)).BeginInit();
this.pl_bottom.SuspendLayout();
this.pl_detail.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pmFP)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.barManager2)).BeginInit();
this.SuspendLayout();
//
// pMenu
@@ -114,14 +123,14 @@
this.barDockControlTop.CausesValidation = false;
this.barDockControlTop.Dock = System.Windows.Forms.DockStyle.Top;
this.barDockControlTop.Location = new System.Drawing.Point(0, 0);
this.barDockControlTop.Size = new System.Drawing.Size(489, 0);
this.barDockControlTop.Size = new System.Drawing.Size(444, 0);
//
// barDockControlBottom
//
this.barDockControlBottom.CausesValidation = false;
this.barDockControlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.barDockControlBottom.Location = new System.Drawing.Point(0, 386);
this.barDockControlBottom.Size = new System.Drawing.Size(489, 0);
this.barDockControlBottom.Size = new System.Drawing.Size(444, 0);
//
// barDockControlLeft
//
@@ -134,7 +143,7 @@
//
this.barDockControlRight.CausesValidation = false;
this.barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right;
this.barDockControlRight.Location = new System.Drawing.Point(489, 0);
this.barDockControlRight.Location = new System.Drawing.Point(444, 0);
this.barDockControlRight.Size = new System.Drawing.Size(0, 386);
//
// pMprint
@@ -153,7 +162,7 @@
this.pl_right_top.Location = new System.Drawing.Point(0, 0);
this.pl_right_top.Name = "pl_right_top";
this.pl_right_top.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0);
this.pl_right_top.Size = new System.Drawing.Size(497, 381);
this.pl_right_top.Size = new System.Drawing.Size(542, 381);
this.pl_right_top.TabIndex = 1;
//
// gridFlow
@@ -164,7 +173,8 @@
this.gridFlow.Margin = new System.Windows.Forms.Padding(4);
this.gridFlow.Name = "gridFlow";
this.gridFlow.SiftEnumObj = Lskj.Control.GridControlEx.HeaderSiftEnum.Sum;
this.gridFlow.Size = new System.Drawing.Size(492, 358);
this.gridFlow.Size = new System.Drawing.Size(537, 358);
this.gridFlow.SysModel = null;
this.gridFlow.TabIndex = 4;
//
// label_flow
@@ -178,7 +188,7 @@
this.label_flow.Location = new System.Drawing.Point(0, 0);
this.label_flow.Name = "label_flow";
this.label_flow.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0);
this.label_flow.Size = new System.Drawing.Size(492, 23);
this.label_flow.Size = new System.Drawing.Size(537, 23);
this.label_flow.TabIndex = 8;
this.label_flow.Text = "流转记录";
//
@@ -188,7 +198,7 @@
this.TabControl.Location = new System.Drawing.Point(0, 0);
this.TabControl.Name = "TabControl";
this.TabControl.SelectedTabPage = this.MainTab;
this.TabControl.Size = new System.Drawing.Size(495, 670);
this.TabControl.Size = new System.Drawing.Size(450, 670);
this.TabControl.TabIndex = 0;
this.TabControl.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
this.MainTab,
@@ -199,7 +209,7 @@
//
this.MainTab.Controls.Add(this.splitLeft);
this.MainTab.Name = "MainTab";
this.MainTab.Size = new System.Drawing.Size(489, 641);
this.MainTab.Size = new System.Drawing.Size(444, 641);
this.MainTab.Text = "主消息";
//
// splitLeft
@@ -218,12 +228,34 @@
this.splitLeft.Panel1.Text = "Panel1";
this.splitLeft.Panel2.Controls.Add(this.tab_basicInfo);
this.splitLeft.Panel2.Text = "Panel2";
this.splitLeft.Size = new System.Drawing.Size(489, 641);
this.splitLeft.Size = new System.Drawing.Size(444, 641);
this.splitLeft.SplitterPosition = 386;
this.splitLeft.TabIndex = 0;
this.splitLeft.Text = "splitContainerControl2";
this.splitLeft.SplitterPositionChanged += new System.EventHandler(this.splitLeft_SplitterPositionChanged);
//
// pl_detail
//
this.pl_detail.AutoScroll = false;
this.pl_detail.Controls.Add(this.gridBillInfo);
this.pl_detail.Dock = System.Windows.Forms.DockStyle.Fill;
this.pl_detail.Location = new System.Drawing.Point(0, 68);
this.pl_detail.Name = "pl_detail";
this.pl_detail.Size = new System.Drawing.Size(444, 318);
this.pl_detail.TabIndex = 7;
//
// gridBillInfo
//
this.gridBillInfo.AdapterObj = null;
this.gridBillInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridBillInfo.Location = new System.Drawing.Point(0, 0);
this.gridBillInfo.Margin = new System.Windows.Forms.Padding(4);
this.gridBillInfo.Name = "gridBillInfo";
this.gridBillInfo.SiftEnumObj = Lskj.Control.GridControlEx.HeaderSiftEnum.Sum;
this.gridBillInfo.Size = new System.Drawing.Size(444, 318);
this.gridBillInfo.SysModel = null;
this.gridBillInfo.TabIndex = 2;
//
// pl_left_top
//
this.pl_left_top.AutoScroll = false;
@@ -231,7 +263,7 @@
this.pl_left_top.Dock = System.Windows.Forms.DockStyle.Top;
this.pl_left_top.Location = new System.Drawing.Point(0, 0);
this.pl_left_top.Name = "pl_left_top";
this.pl_left_top.Size = new System.Drawing.Size(489, 68);
this.pl_left_top.Size = new System.Drawing.Size(444, 68);
this.pl_left_top.TabIndex = 6;
//
// txt_billDocumentId
@@ -256,7 +288,7 @@
this.tab_basicInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.tab_basicInfo.Location = new System.Drawing.Point(0, 0);
this.tab_basicInfo.Name = "tab_basicInfo";
this.tab_basicInfo.Size = new System.Drawing.Size(489, 250);
this.tab_basicInfo.Size = new System.Drawing.Size(444, 250);
this.tab_basicInfo.TabIndex = 0;
//
// tabpage_remind
@@ -275,6 +307,7 @@
this.gridRemind.Name = "gridRemind";
this.gridRemind.SiftEnumObj = Lskj.Control.GridControlEx.HeaderSiftEnum.Sum;
this.gridRemind.Size = new System.Drawing.Size(489, 641);
this.gridRemind.SysModel = null;
this.gridRemind.TabIndex = 0;
//
// tabpage_sign
@@ -293,6 +326,7 @@
this.gridSign.Name = "gridSign";
this.gridSign.SiftEnumObj = Lskj.Control.GridControlEx.HeaderSiftEnum.Sum;
this.gridSign.Size = new System.Drawing.Size(489, 641);
this.gridSign.SysModel = null;
this.gridSign.TabIndex = 0;
//
// splitMain
@@ -308,7 +342,7 @@
this.splitMain.Panel2.Controls.Add(this.p_right_bottom);
this.splitMain.Panel2.Text = "Panel2";
this.splitMain.Size = new System.Drawing.Size(997, 670);
this.splitMain.SplitterPosition = 497;
this.splitMain.SplitterPosition = 542;
this.splitMain.TabIndex = 0;
this.splitMain.Text = "splitContainerControl1";
this.splitMain.SplitterPositionChanged += new System.EventHandler(this.splitMain_SplitterPositionChanged);
@@ -323,7 +357,7 @@
this.p_right_bottom.Location = new System.Drawing.Point(0, 381);
this.p_right_bottom.Name = "p_right_bottom";
this.p_right_bottom.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0);
this.p_right_bottom.Size = new System.Drawing.Size(497, 289);
this.p_right_bottom.Size = new System.Drawing.Size(542, 289);
this.p_right_bottom.TabIndex = 0;
//
// txtRemark
@@ -332,7 +366,7 @@
this.txtRemark.Location = new System.Drawing.Point(0, 23);
this.txtRemark.Multiline = true;
this.txtRemark.Name = "txtRemark";
this.txtRemark.Size = new System.Drawing.Size(492, 131);
this.txtRemark.Size = new System.Drawing.Size(537, 131);
this.txtRemark.TabIndex = 2;
this.txtRemark.Text = "同意";
//
@@ -346,7 +380,7 @@
this.label_auditPerson.Location = new System.Drawing.Point(0, 0);
this.label_auditPerson.Name = "label_auditPerson";
this.label_auditPerson.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0);
this.label_auditPerson.Size = new System.Drawing.Size(492, 23);
this.label_auditPerson.Size = new System.Drawing.Size(537, 23);
this.label_auditPerson.TabIndex = 0;
this.label_auditPerson.Text = "审核人员";
//
@@ -365,12 +399,13 @@
this.pl_right_bottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pl_right_bottom.Location = new System.Drawing.Point(0, 154);
this.pl_right_bottom.Name = "pl_right_bottom";
this.pl_right_bottom.Size = new System.Drawing.Size(492, 135);
this.pl_right_bottom.Size = new System.Drawing.Size(537, 135);
this.pl_right_bottom.TabIndex = 3;
//
// pl_bottom
//
this.pl_bottom.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
this.pl_bottom.Controls.Add(this.dbpFP);
this.pl_bottom.Controls.Add(this.btnSave);
this.pl_bottom.Controls.Add(this.dpb_Tools);
this.pl_bottom.Controls.Add(this.btnExport);
@@ -380,7 +415,7 @@
this.pl_bottom.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pl_bottom.Location = new System.Drawing.Point(0, 98);
this.pl_bottom.Name = "pl_bottom";
this.pl_bottom.Size = new System.Drawing.Size(492, 37);
this.pl_bottom.Size = new System.Drawing.Size(537, 37);
this.pl_bottom.TabIndex = 20;
//
// btnSave
@@ -389,7 +424,7 @@
this.btnSave.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnSave.Appearance.Options.UseFont = true;
this.btnSave.Enabled = false;
this.btnSave.Location = new System.Drawing.Point(418, 8);
this.btnSave.Location = new System.Drawing.Point(463, 8);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(67, 23);
this.btnSave.TabIndex = 17;
@@ -403,7 +438,7 @@
this.dpb_Tools.Appearance.Options.UseFont = true;
this.dpb_Tools.DropDownArrowStyle = DevExpress.XtraEditors.DropDownArrowStyle.Show;
this.dpb_Tools.DropDownControl = this.pMenu;
this.dpb_Tools.Location = new System.Drawing.Point(199, 8);
this.dpb_Tools.Location = new System.Drawing.Point(244, 8);
this.dpb_Tools.Name = "dpb_Tools";
this.dpb_Tools.Size = new System.Drawing.Size(67, 23);
this.dpb_Tools.TabIndex = 16;
@@ -414,7 +449,7 @@
this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnExport.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnExport.Appearance.Options.UseFont = true;
this.btnExport.Location = new System.Drawing.Point(53, 8);
this.btnExport.Location = new System.Drawing.Point(98, 8);
this.btnExport.Name = "btnExport";
this.btnExport.Size = new System.Drawing.Size(67, 23);
this.btnExport.TabIndex = 19;
@@ -426,7 +461,7 @@
this.btnAttach.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnAttach.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnAttach.Appearance.Options.UseFont = true;
this.btnAttach.Location = new System.Drawing.Point(345, 8);
this.btnAttach.Location = new System.Drawing.Point(390, 8);
this.btnAttach.Name = "btnAttach";
this.btnAttach.Size = new System.Drawing.Size(67, 23);
this.btnAttach.TabIndex = 15;
@@ -438,7 +473,7 @@
this.btnSpare.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnSpare.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnSpare.Appearance.Options.UseFont = true;
this.btnSpare.Location = new System.Drawing.Point(126, 8);
this.btnSpare.Location = new System.Drawing.Point(171, 8);
this.btnSpare.Name = "btnSpare";
this.btnSpare.Size = new System.Drawing.Size(67, 23);
this.btnSpare.TabIndex = 19;
@@ -453,7 +488,7 @@
this.btnPrint.Appearance.Options.UseFont = true;
this.btnPrint.DropDownArrowStyle = DevExpress.XtraEditors.DropDownArrowStyle.Show;
this.btnPrint.DropDownControl = this.pMprint;
this.btnPrint.Location = new System.Drawing.Point(272, 8);
this.btnPrint.Location = new System.Drawing.Point(317, 8);
this.btnPrint.Name = "btnPrint";
this.btnPrint.Size = new System.Drawing.Size(67, 23);
this.btnPrint.TabIndex = 18;
@@ -465,7 +500,7 @@
this.btnClose.Appearance.Font = new System.Drawing.Font("宋体", 9F);
this.btnClose.Appearance.Options.UseFont = true;
this.btnClose.Enabled = false;
this.btnClose.Location = new System.Drawing.Point(412, 69);
this.btnClose.Location = new System.Drawing.Point(457, 69);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(75, 23);
this.btnClose.TabIndex = 5;
@@ -477,7 +512,7 @@
this.btnRemindBack.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnRemindBack.Appearance.Font = new System.Drawing.Font("宋体", 9F);
this.btnRemindBack.Appearance.Options.UseFont = true;
this.btnRemindBack.Location = new System.Drawing.Point(331, 37);
this.btnRemindBack.Location = new System.Drawing.Point(376, 37);
this.btnRemindBack.Name = "btnRemindBack";
this.btnRemindBack.Size = new System.Drawing.Size(75, 23);
this.btnRemindBack.TabIndex = 4;
@@ -490,7 +525,7 @@
this.btnBack.Appearance.Font = new System.Drawing.Font("宋体", 9F);
this.btnBack.Appearance.Options.UseFont = true;
this.btnBack.Enabled = false;
this.btnBack.Location = new System.Drawing.Point(412, 37);
this.btnBack.Location = new System.Drawing.Point(457, 37);
this.btnBack.Name = "btnBack";
this.btnBack.Size = new System.Drawing.Size(75, 23);
this.btnBack.TabIndex = 4;
@@ -502,7 +537,7 @@
this.btnRemindAccradit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnRemindAccradit.Appearance.Font = new System.Drawing.Font("宋体", 9F);
this.btnRemindAccradit.Appearance.Options.UseFont = true;
this.btnRemindAccradit.Location = new System.Drawing.Point(331, 6);
this.btnRemindAccradit.Location = new System.Drawing.Point(376, 6);
this.btnRemindAccradit.Name = "btnRemindAccradit";
this.btnRemindAccradit.Size = new System.Drawing.Size(75, 23);
this.btnRemindAccradit.TabIndex = 3;
@@ -515,7 +550,7 @@
this.btnAccradit.Appearance.Font = new System.Drawing.Font("宋体", 9F);
this.btnAccradit.Appearance.Options.UseFont = true;
this.btnAccradit.Enabled = false;
this.btnAccradit.Location = new System.Drawing.Point(412, 6);
this.btnAccradit.Location = new System.Drawing.Point(457, 6);
this.btnAccradit.Name = "btnAccradit";
this.btnAccradit.Size = new System.Drawing.Size(75, 23);
this.btnAccradit.TabIndex = 3;
@@ -538,7 +573,7 @@
this.label_date.NullText = "";
this.label_date.ReadOnly = false;
this.label_date.Required = false;
this.label_date.Size = new System.Drawing.Size(400, 21);
this.label_date.Size = new System.Drawing.Size(445, 21);
this.label_date.TabIndex = 2;
//
// label_managerAudit
@@ -557,7 +592,7 @@
this.label_managerAudit.NullText = "";
this.label_managerAudit.ReadOnly = false;
this.label_managerAudit.Required = false;
this.label_managerAudit.Size = new System.Drawing.Size(319, 21);
this.label_managerAudit.Size = new System.Drawing.Size(364, 21);
this.label_managerAudit.TabIndex = 1;
//
// CheckSuggestion
@@ -575,29 +610,63 @@
this.CheckSuggestion.NullText = "";
this.CheckSuggestion.ReadOnly = false;
this.CheckSuggestion.Required = false;
this.CheckSuggestion.Size = new System.Drawing.Size(319, 21);
this.CheckSuggestion.Size = new System.Drawing.Size(364, 21);
this.CheckSuggestion.TabIndex = 0;
//
// pl_detail
// dbpFP
//
this.pl_detail.AutoScroll = false;
this.pl_detail.Controls.Add(this.gridBillInfo);
this.pl_detail.Dock = System.Windows.Forms.DockStyle.Fill;
this.pl_detail.Location = new System.Drawing.Point(0, 68);
this.pl_detail.Name = "pl_detail";
this.pl_detail.Size = new System.Drawing.Size(489, 318);
this.pl_detail.TabIndex = 7;
this.dbpFP.AllowFocus = false;
this.dbpFP.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.dbpFP.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.dbpFP.Appearance.Options.UseFont = true;
this.dbpFP.DropDownControl = this.pmFP;
this.dbpFP.Location = new System.Drawing.Point(25, 8);
this.dbpFP.Name = "dbpFP";
this.dbpFP.Size = new System.Drawing.Size(67, 23);
this.dbpFP.TabIndex = 35;
this.dbpFP.Text = "分配";
//
// gridBillInfo
// pmFP
//
this.gridBillInfo.AdapterObj = null;
this.gridBillInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridBillInfo.Location = new System.Drawing.Point(0, 0);
this.gridBillInfo.Margin = new System.Windows.Forms.Padding(4);
this.gridBillInfo.Name = "gridBillInfo";
this.gridBillInfo.SiftEnumObj = Lskj.Control.GridControlEx.HeaderSiftEnum.Sum;
this.gridBillInfo.Size = new System.Drawing.Size(489, 318);
this.gridBillInfo.TabIndex = 2;
this.pmFP.Manager = this.barManager2;
this.pmFP.Name = "pmFP";
//
// barManager2
//
this.barManager2.DockControls.Add(this.barDockControl1);
this.barManager2.DockControls.Add(this.barDockControl2);
this.barManager2.DockControls.Add(this.barDockControl3);
this.barManager2.DockControls.Add(this.barDockControl5);
this.barManager2.Form = this;
this.barManager2.MaxItemId = 0;
//
// barDockControl1
//
this.barDockControl1.CausesValidation = false;
this.barDockControl1.Dock = System.Windows.Forms.DockStyle.Top;
this.barDockControl1.Location = new System.Drawing.Point(0, 0);
this.barDockControl1.Size = new System.Drawing.Size(997, 0);
//
// barDockControl2
//
this.barDockControl2.CausesValidation = false;
this.barDockControl2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.barDockControl2.Location = new System.Drawing.Point(0, 670);
this.barDockControl2.Size = new System.Drawing.Size(997, 0);
//
// barDockControl3
//
this.barDockControl3.CausesValidation = false;
this.barDockControl3.Dock = System.Windows.Forms.DockStyle.Left;
this.barDockControl3.Location = new System.Drawing.Point(0, 0);
this.barDockControl3.Size = new System.Drawing.Size(0, 670);
//
// barDockControl5
//
this.barDockControl5.CausesValidation = false;
this.barDockControl5.Dock = System.Windows.Forms.DockStyle.Right;
this.barDockControl5.Location = new System.Drawing.Point(997, 0);
this.barDockControl5.Size = new System.Drawing.Size(0, 670);
//
// FrmAccraditation
//
@@ -607,6 +676,10 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(997, 670);
this.Controls.Add(this.barDockControl3);
this.Controls.Add(this.barDockControl5);
this.Controls.Add(this.barDockControl2);
this.Controls.Add(this.barDockControl1);
this.Controls.Add(this.splitMain);
this.Margin = new System.Windows.Forms.Padding(4);
this.Name = "FrmAccraditation";
@@ -622,6 +695,7 @@
this.MainTab.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitLeft)).EndInit();
this.splitLeft.ResumeLayout(false);
this.pl_detail.ResumeLayout(false);
this.pl_left_top.ResumeLayout(false);
this.tabpage_remind.ResumeLayout(false);
this.tabpage_sign.ResumeLayout(false);
@@ -634,8 +708,10 @@
this.pl_right_bottom.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pl_bottom)).EndInit();
this.pl_bottom.ResumeLayout(false);
this.pl_detail.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pmFP)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.barManager2)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
@@ -673,15 +749,4 @@
private DevExpress.XtraEditors.SimpleButton btnAttach;
private DevExpress.XtraEditors.SimpleButton btnSpare;
private DevExpress.XtraEditors.DropDownButton btnPrint;
private DevExpress.XtraEditors.SimpleButton btnClose;
private DevExpress.XtraEditors.SimpleButton btnRemindBack;
private DevExpress.XtraEditors.SimpleButton btnBack;
private DevExpress.XtraEditors.SimpleButton btnRemindAccradit;
private DevExpress.XtraEditors.SimpleButton btnAccradit;
private Control.LabelDateEdit label_date;
private Control.LabelTextEdit label_managerAudit;
private Control.LabelComboxEdit CheckSuggestion;
private DevExpress.XtraEditors.XtraScrollableControl pl_detail;
private Control.GridControlEx gridBillInfo;
}
}
private DevExpress.XtraEditors.SimpleButton btnClose;
@@ -94,6 +94,15 @@ namespace Lskj.PubAccraditation
public GridColumn SumGridColumn = new GridColumn();
#region
/// <summary>
/// 数量名称
/// </summary>
public string NumberMc;
/// <summary>
/// 主键字段
/// </summary>
private string mRecordPrimaryField;
private string guidField = "xxxxx_guid";
/// <summary>
/// id(推送记录)
/// </summary>
private int _beforeId;
@@ -1035,20 +1044,28 @@ namespace Lskj.PubAccraditation
// }
//}
this.AuthorityTable = PowerImpl.GetModuleAuthorityEnable(this.SysModel.ModuleCode);
this.AuthorityTable = PowerImpl.GetModuleAuthorityEnable(this.SysModel.ModuleCode);
if (this.AuditModelObj.DetailModifyFields != "-1")
{
this.gridBillInfo.SetReadOnlyAllColumn();
this.dbpFP.Enabled = false;
}
//设置必填和修改字段
this.gridBillInfo.SetFieldStatus(this.AuditModelObj.DetailModifyFields, this.AuditModelObj.RequiredDetailFields, this.AuthorityTable);
this.SetBillControl(this.AuditModelObj.BillModifyFields, this.AuditModelObj.RequiredFields);
this.InitPrint();
//加载分配
this.dbpFP.Click += new System.EventHandler(this.OnBtnFPOldClick);
BarButtonItem itemFPBatch = new BarButtonItem();
itemFPBatch.Caption = "批量分配";
itemFPBatch.ItemClick += new ItemClickEventHandler(OnBtnFPNewClick);
//分配
this.pmFP.AddItems(new BarItem[] { itemFPBatch });
this.dbpFP.Visible = !string.IsNullOrWhiteSpace(this.BillModelObj.PopupUnionCode);
}
/// <summary>
@@ -3035,7 +3052,7 @@ namespace Lskj.PubAccraditation
string Message = ErrorMessage.PromptErrorMessage(ex);
MessageUtil.Show(Message, ex.Message);
}
if (this.BillModelObj.SaveSuccessfullyRefresh && !save) return save;//保存成功才刷新
// 刷新主表
@@ -3134,9 +3151,10 @@ namespace Lskj.PubAccraditation
{
detailTable = ((this.gridBillInfo as TreeGridControlEx).TreeListObj.DataSource as DataTable).TrimDeleteRows();
}
if (detailTable.Rows.Count > 0)
{
DataTable BillColumns = BaseImpl.GetDataTableResult(string.Format("select * from {0} where 1<>1", BillModelObj.DetailTable));
IEnumerable<DataColumn> detailColumns = BillColumns.Columns.Cast<DataColumn>();
DataTable BillTempColumns = BaseImpl.GetDataTableResult(string.Format("select * from {0} where 1<>1", BillModelObj.DetailTable + "_temp"));
foreach (DataRow dataRow in detailTable.Rows)
{
@@ -3148,6 +3166,11 @@ namespace Lskj.PubAccraditation
values.Append("'" + guid + "',");
foreach (DataColumn item in detailTable.Columns)
{
var selectColumn = detailColumns.Where(n => n.ColumnName.Equals(item.ColumnName, StringComparison.OrdinalIgnoreCase));
if (selectColumn.Count() == 0)
{
continue;
}
fields.Append(item.ColumnName + ",");
string fieldValue = (dataRow[item] + "").Replace("'", "''");
if (!BillTempColumns.Columns.Contains(item.ColumnName))
@@ -3310,4 +3333,560 @@ namespace Lskj.PubAccraditation
/// <summary>
/// <para>说明:检查可用条件</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-11
/// <para>创建日期:2017-11-09 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="cond">The cond.</param>
/// <param name="dataRow">The data row.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
private bool ValidateCond(string cond, DataRow dataRow)
{
bool result = false;
cond = ReplaceHelper.ReplaceRowParam(dataRow, cond);
if (cond.StartsWith("@") || cond.StartsWith("!"))
{
result = "1".Equals(BaseImpl.GetDefaultValue(cond));
}
else if (dataRow == null)
{
result = ReplaceHelper.EvalCond(cond);
}
else
{
result = ReplaceHelper.ReplaceRowParamCond(dataRow, cond);
}
return result;
}
/// <summary>
/// <para>说明:分配明细</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2020-01-15 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
private void OnBtnFPOldClick(object sender, EventArgs e)
{
this.gridBillInfo.GridView.PostEditor();
FPOld();
}
private void OnBtnFPNewClick(object sender, EventArgs e)
{
this.gridBillInfo.GridView.PostEditor();
FPNew();
}
/// <summary>
/// 新版分配
/// </summary>
private void FPNew(int rowHandle = 0)
{
try
{
this.gridBillInfo.GridView.FocusedRowHandle = rowHandle;
DataTable table = this.gridBillInfo.GridControl.DataSource as DataTable;
if (!table.Columns.Contains(guidField))
{
table.Columns.Add(guidField, typeof(string));
}
#region
string[] args = { this.SysModel.FormText, this.SysModel.UserId, this.SysModel.UserName, this.SysModel.Privilege, this.SysModel.ModuleCode, this.SysModel.ModuleId + "", this.BillModelObj.PopupUnionCode, "1000" };
DynamicBaseSelectModel baseModel = new DynamicBaseSelectModel(args);
using (FrmBaseSelectBatch frmSelect = new FrmBaseSelectBatch(baseModel, this.ControlObj, this.gridBillInfo))
{
frmSelect.Text = this.BillModelObj.TypeName;
frmSelect.InitControl();
frmSelect.OnAfterFPCallback += OnAfterFPCallback;
#region
DataRow rowItem = this.gridBillInfo.GridView.GetFocusedDataRow();
if (rowItem == null)
{
return;
}
rowItem[guidField] = Guid.NewGuid().ToString();
if (!string.IsNullOrEmpty(mRecordPrimaryField) && table.Columns.Contains(this.mRecordPrimaryField))
{
// 检查数据是否为分配后的行
if (!string.IsNullOrEmpty(rowItem[this.mRecordPrimaryField] + ""))
{
if (this.gridBillInfo.GridView.FocusedRowHandle + 1 <= this.gridBillInfo.GridView.RowCount - 1)
{
int focusedRowHandle = this.gridBillInfo.GridView.FocusedRowHandle + 1;
this.gridBillInfo.GridView.FocusedRowHandle = focusedRowHandle;
if (this.gridBillInfo.GridView.FocusedRowHandle == focusedRowHandle)
{
FPNew(focusedRowHandle);
}
else
{
MessageUtil.Show("全部分配完毕");
}
}
return;
}
}
if (!string.IsNullOrEmpty(mRecordPrimaryField))
{
frmSelect.FpRows = table.Rows.Cast<DataRow>().Where(x => (rowItem[guidField] + "").Equals(x[guidField] + "")).ToArray();
if (frmSelect.FpRows != null && frmSelect.FpRows.Length > 0)
{
List<DataRow> rows = frmSelect.FpRows.ToList();
rows.Remove(rowItem);
frmSelect.FpRows = rows.ToArray();
}
if (table.Columns.Contains(mRecordPrimaryField))
{
frmSelect.FpOtherRows = table.Rows.Cast<DataRow>().Where(x => !(rowItem[guidField] + "").Equals(x[guidField] + "") && !string.IsNullOrEmpty(x[mRecordPrimaryField] + "")).ToArray();
}
}
frmSelect.InitData(rowItem);
frmSelect.OnBtnFPClick(null, null);
#endregion
//frmSelect.ShowDialog();
#endregion
}
}
catch (Exception ex)
{
MessageUtil.Show(ex.Message);
}
}
/// <summary>
/// 分配完成后回调
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OnAfterFPCallback(object sender, EventArgs e)
{
WaitForm.ShowForm();
try
{
// 临时禁用新增行(空白行)
if (this.BillModelObj.DefaultAddEmptyRow) this.gridBillInfo.GridView.OptionsView.NewItemRowPosition = NewItemRowPosition.None;
DataRow rowItem = this.gridBillInfo.GridView.GetFocusedDataRow();
if (rowItem == null)
{
return;
}
DataTable table = this.gridBillInfo.GridControl.DataSource as DataTable;
FrmBaseSelectBatch frmSelect = (FrmBaseSelectBatch)sender;
rowItem[guidField] = Guid.NewGuid().ToString();
if (!string.IsNullOrEmpty(mRecordPrimaryField) && table.Columns.Contains(this.mRecordPrimaryField))
{
// 检查数据是否为分配后的行
if (!string.IsNullOrEmpty(rowItem[this.mRecordPrimaryField] + ""))
{
if (this.gridBillInfo.GridView.FocusedRowHandle + 1 <= this.gridBillInfo.GridView.RowCount - 1)
{
this.gridBillInfo.GridView.FocusedRowHandle += 1;
OnAfterFPCallback(sender, e);
}
return;
}
}
if (!string.IsNullOrEmpty(mRecordPrimaryField))
{
frmSelect.FpRows = table.Rows.Cast<DataRow>().Where(x => (rowItem[guidField] + "").Equals(x[guidField] + "")).ToArray();
if (frmSelect.FpRows != null && frmSelect.FpRows.Length > 0)
{
List<DataRow> rows = frmSelect.FpRows.ToList();
rows.Remove(rowItem);
frmSelect.FpRows = rows.ToArray();
}
if (table.Columns.Contains(mRecordPrimaryField))
{
frmSelect.FpOtherRows = table.Rows.Cast<DataRow>().Where(x => !(rowItem[guidField] + "").Equals(x[guidField] + "") && !string.IsNullOrEmpty(x[mRecordPrimaryField] + "")).ToArray();
}
}
frmSelect.InitData(rowItem);
bool success = frmSelect.FP();
if (success)
{
if (frmSelect.SelectedRows != null && frmSelect.SelectedRows.Length > 0)
{
// 增加标识列
if (!table.Columns.Contains(frmSelect.RecordPrimaryField))
{
this.mRecordPrimaryField = frmSelect.RecordPrimaryField;
table.Columns.Add(this.mRecordPrimaryField, typeof(String));
}
foreach (DataRow item in frmSelect.SelectedRows)
{
DataRow newRow = table.NewRow();
newRow.ItemArray = rowItem.ItemArray;
newRow[guidField] = rowItem[guidField];
DataColumn IsIdentCol = newRow.Table.Columns.Cast<DataColumn>().FirstOrDefault(x => x.ColumnName == BaseImpl.GetResult(string.Format("SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.columns WHERE TABLE_NAME='{0}' AND COLUMNPROPERTY(OBJECT_ID('{0}'),COLUMN_NAME,'IsIdentity')=1", BillModelObj.DetailTable)) + "");
//自增长列分配按空值取
if (IsIdentCol != null)
{
if (IsIdentCol.DataType == typeof(Decimal) ||
IsIdentCol.DataType == typeof(Double) ||
IsIdentCol.DataType == typeof(Int16) ||
IsIdentCol.DataType == typeof(Int32) ||
IsIdentCol.DataType == typeof(Int64))
{
newRow[IsIdentCol.ColumnName] = 0;
}
}
foreach (DataColumn col in item.Table.Columns)
{
if (table.Columns.Contains(col.ColumnName))
{
//newRow[col.ColumnName] = item[col.ColumnName];
newRow[col.ColumnName] = item[col.ColumnName];
GridColumn column = this.gridBillInfo.GridView.Columns[col.ColumnName];
if (column != null)
{
GridColumnModel model = column.Tag as GridColumnModel;
if (!string.IsNullOrEmpty(model.UnionFields))
{
this.SetUnionValue(model, rowItem[column.FieldName] + "", newRow);
}
SetCalcValue(model, rowItem[column.FieldName] + "", newRow);
}
}
}
newRow[frmSelect.AmountField] = item[frmSelect.AmountField];
newRow[frmSelect.RecordPrimaryField] = item[frmSelect.RecordPrimaryField];
table.Rows.Add(newRow);
}
NumberMc = frmSelect.AmountField;
table.Rows.Remove(rowItem);
// 重排顺序
table.OrderBy(this.BillModelObj.DetailOrderField);
this.gridBillInfo.GridView.UpdateCurrentRow();
this.gridBillInfo.GridView.ShowEditor();
if (frmSelect.isNextOne)
{
int SourceRowIndex = this.gridBillInfo.GridView.GetFocusedDataSourceRowIndex();
DataRow[] a = table.Rows.Cast<DataRow>().Where(x => string.IsNullOrEmpty(x[guidField].ToString())).ToArray();
if (a.Length != 0)
{
this.gridBillInfo.GridView.FocusedRowHandle = SourceRowIndex;
OnAfterFPCallback(sender, e);
}
else
{
MessageUtil.Show("全部分配完毕");
// frmSelect.SelectRowItem = null;
}
}
}
}
else
{
if (this.gridBillInfo.GridView.FocusedRowHandle + 1 <= this.gridBillInfo.GridView.RowCount - 1)
{
this.gridBillInfo.GridView.FocusedRowHandle += 1;
OnAfterFPCallback(sender, e);
}
else
{
MessageUtil.Show("全部分配完毕");
}
}
}
catch (Exception)
{
throw;
}
finally
{
// 重新开启新增行(空白行)
if (this.BillModelObj.DefaultAddEmptyRow) this.gridBillInfo.GridView.OptionsView.NewItemRowPosition = NewItemRowPosition.Bottom;
WaitForm.HideForm();
}
}
/// <summary>
/// 老版分配
/// </summary>
private void FPOld()
{
try
{
DataRow rowItem = this.gridBillInfo.GridView.GetFocusedDataRow();
if (rowItem == null)
{
MessageUtil.Show("请先选择一条明细在进行分配!");
return;
}
DataTable table = this.gridBillInfo.GridControl.DataSource as DataTable;
if (!table.Columns.Contains(guidField))
{
table.Columns.Add(guidField, typeof(string));
}
rowItem[guidField] = Guid.NewGuid().ToString(); ;
if (!string.IsNullOrEmpty(mRecordPrimaryField) && table.Columns.Contains(this.mRecordPrimaryField))
{
// 检查数据是否为分配后的行
if (!string.IsNullOrEmpty(rowItem[this.mRecordPrimaryField] + ""))
{
MessageUtil.Show("该行数据为已分配后的数据,无需分配!");
return;
}
}
string[] args = { this.SysModel.FormText, this.SysModel.UserId, this.SysModel.UserName, this.SysModel.Privilege, this.SysModel.ModuleCode, this.SysModel.ModuleId + "", this.BillModelObj.PopupUnionCode, "1000" };
DynamicBaseSelectModel baseModel = new DynamicBaseSelectModel(args);
using (FrmBaseSelect frmSelect = new FrmBaseSelect(baseModel, this.ControlObj, this.gridBillInfo))
{
//if (frmSelect.SelectRowItem == null)
//{
// frmSelect = new FrmBaseSelect(baseModel, this.ControlObj, this.gcMain);
//}
frmSelect.Text = this.BillModelObj.TypeName;
frmSelect.SelectRowItem = rowItem;
bool isNextOne = false;
if (!string.IsNullOrEmpty(mRecordPrimaryField))
{
frmSelect.FpRows = table.Rows.Cast<DataRow>().Where(x => (rowItem[guidField] + "").Equals(x[guidField] + "")).ToArray();
if (frmSelect.FpRows != null && frmSelect.FpRows.Length > 0)
{
List<DataRow> rows = frmSelect.FpRows.ToList();
rows.Remove(rowItem);
frmSelect.FpRows = rows.ToArray();
}
if (table.Columns.Contains(mRecordPrimaryField))
{
frmSelect.FpOtherRows = table.Rows.Cast<DataRow>().Where(x => !(rowItem[guidField] + "").Equals(x[guidField] + "") && !string.IsNullOrEmpty(x[mRecordPrimaryField] + "")).ToArray();
}
}
if (frmSelect.ShowDialog() == DialogResult.OK)
{
if (frmSelect.SelectedRows != null && frmSelect.SelectedRows.Length > 0)
{
//if (frmSelect.isNextOne)
//{
// isNextOne = true;
//}
//else
//{
// isNextOne = false;
//}
// 增加标识列
if (!table.Columns.Contains(frmSelect.RecordPrimaryField))
{
this.mRecordPrimaryField = frmSelect.RecordPrimaryField;
table.Columns.Add(this.mRecordPrimaryField, typeof(String));
}
foreach (DataRow item in frmSelect.SelectedRows)
{
DataRow newRow = table.NewRow();
newRow.ItemArray = rowItem.ItemArray;
newRow[guidField] = rowItem[guidField];
DataColumn IsIdentCol = newRow.Table.Columns.Cast<DataColumn>().FirstOrDefault(x => x.ColumnName == BaseImpl.GetResult(string.Format("SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.columns WHERE TABLE_NAME='{0}' AND COLUMNPROPERTY(OBJECT_ID('{0}'),COLUMN_NAME,'IsIdentity')=1", BillModelObj.DetailTable)) + "");
//自增长列分配按空值取
if (IsIdentCol != null)
{
if (IsIdentCol.DataType == typeof(Decimal) ||
IsIdentCol.DataType == typeof(Double) ||
IsIdentCol.DataType == typeof(Int16) ||
IsIdentCol.DataType == typeof(Int32) ||
IsIdentCol.DataType == typeof(Int64))
{
newRow[IsIdentCol.ColumnName] = 0;
}
}
foreach (DataColumn col in item.Table.Columns)
{
if (table.Columns.Contains(col.ColumnName))
{
//newRow[col.ColumnName] = item[col.ColumnName];
newRow[col.ColumnName] = item[col.ColumnName];
GridColumn column = this.gridBillInfo.GridView.Columns[col.ColumnName];
if (column != null)
{
GridColumnModel model = column.Tag as GridColumnModel;
if (!string.IsNullOrEmpty(model.UnionFields))
{
this.SetUnionValue(model, rowItem[column.FieldName] + "", newRow);
}
SetCalcValue(model, rowItem[column.FieldName] + "", newRow);
}
}
}
newRow[frmSelect.AmountField] = item[frmSelect.AmountField];
newRow[frmSelect.RecordPrimaryField] = item[frmSelect.RecordPrimaryField];
table.Rows.Add(newRow);
}
NumberMc = frmSelect.AmountField;
//double syAmount = frmSelect.GetSyAmount();
//if (syAmount > 0)
//{
// rowItem[frmSelect.AmountField] = frmSelect.GetSyAmount();
//}
//else
//{
// table.Rows.Remove(rowItem);
//}
table.Rows.Remove(rowItem);
// 重排顺序
table.OrderBy(this.BillModelObj.DetailOrderField);
this.gridBillInfo.GridView.UpdateCurrentRow();
this.gridBillInfo.GridView.ShowEditor();
}
}
if (frmSelect.isNextOne)
{
int SourceRowIndex = this.gridBillInfo.GridView.GetFocusedDataSourceRowIndex();
DataRow[] a = table.Rows.Cast<DataRow>().Where(x => string.IsNullOrEmpty(x[guidField].ToString())).ToArray();
if (a.Length != 0)
{
this.gridBillInfo.GridView.FocusedRowHandle = SourceRowIndex;
OnBtnFPOldClick(null, null);
}
else
{
MessageUtil.Show("全部分配完毕");
// frmSelect.SelectRowItem = null;
}
}
}
}
catch (Exception ex)
{
MessageUtil.Show(ex);
}
}
/// <summary>
/// <para>说明:计算列关联字段</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-12-18 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="model">The model.</param>
/// <param name="fieldValue">The field value.</param>
protected virtual void SetUnionValue(GridColumnModel model, string fieldValue, DataRow rowItem)
{
DataTable table = this.gridBillInfo.gridControl.DataSourceTable();
//DataRow rowItem = this.gridView.GetFocusedDataRow();
string unionValues = model.UnionValues;
if (rowItem != null && model != null)
{
unionValues = ReplaceHelper.ReplaceRowParam(rowItem, unionValues.Replace("{" + model.FieldName + "}", fieldValue));
if (this.ControlObj != null)
{
unionValues = ControlObj.ReplaceParentControlValue(unionValues);
}
try
{
string[] fields = model.UnionFields.Trim(',').Split(',');
DataRow rowResult = BaseImpl.GetDataRowResult(unionValues);
if (rowResult != null)
{
for (int i = 0; i < fields.Length; i++)
{
string field = fields[i];
string value = rowResult.Table.Columns.Contains(field) ? rowResult[field] + "" : null;
rowItem[field] = value;
}
}
else
{
// 设置为空
for (int i = 0; i < fields.Length; i++)
{
string field = fields[i];
rowItem[field] = DBNull.Value;
}
}
}
catch (Exception ex)
{
LogHelper.Instance.WriteError(ex);
LogUtil.WriteError("计算列关联字段--错误-->" + unionValues, ex);
}
}
}
/// <summary>
/// <para>说明:计算列计算公式</para>
/// <para>创建人:龚宇超</para>
/// <para>创建日期:2017-12-18 </para>
/// <para>修改人:</para>
/// <para>修改日期:</para>
/// <para>修改备注:</para>
/// <para>版本:1.0</para>
/// </summary>
/// <param name="model">The model.</param>
/// <param name="fieldValue">The field value.</param>
protected virtual void SetCalcValue(GridColumnModel model, string fieldValue, DataRow rowItem)
{
try
{
DataTable table = this.gridBillInfo.gridControl.DataSourceTable();
if (rowItem != null && model != null)
{
List<GridColumnModel> calcModels = this.gridBillInfo.ObjmControlList.FindAll(x => !string.IsNullOrEmpty(x.CalcExpr)).OrderBy(y => y.CalcOrder).ToList();
foreach (GridColumnModel gridModel in calcModels)
{
// 计算顺序小于当前控件则不计算
if (gridModel.CalcOrder < model.CalcOrder) continue;
if (!gridModel.FieldName.Equals(model.FieldName, StringComparison.OrdinalIgnoreCase))
{
bool isTruncate = false;
string calcExpr = gridModel.CalcExpr;
if (calcExpr.StartsWith("@truncate:"))
{
calcExpr = calcExpr.Substring(10);
isTruncate = true;
}
try
{
if (this.ControlObj != null)
calcExpr = ControlObj.ReplaceParentControlValue(calcExpr);
calcExpr = ReplaceHelper.ReplaceRowParam(rowItem, calcExpr);
//EvalHelper.Eval2(ReplaceHelper.ReplaceEvalCond(calcExpr)) + ""
string result = EvalHelper.Eval2(ReplaceHelper.ReplaceEvalCond(calcExpr)) + "";
if (isTruncate)
{
result += result.Contains(".") ? "0000000000" : ".0000000000";
rowItem[gridModel.FieldName] = result.Substring(0, result.IndexOf(".")) + result.Substring(result.IndexOf("."), model.Decimals + 1);
//this.gridView.SetRowCellValue(this.gridView.FocusedRowHandle, this.gridView.Columns[gridModel.FieldName], result.Substring(0, result.IndexOf(".")) + result.Substring(result.IndexOf("."), model.Decimals + 1));
}
else
{
try
{
double d = 0;
if (!string.IsNullOrEmpty(result) &&
!"NaN".Equals(result, StringComparison.OrdinalIgnoreCase) &&
!"非数字".Equals(result, StringComparison.OrdinalIgnoreCase) &&
!"undefined".Equals(result, StringComparison.OrdinalIgnoreCase) &&
result != "∞" && result != "-∞" &&
!"正无穷大".Equals(result, StringComparison.OrdinalIgnoreCase) &&
!"负无穷大".Equals(result, StringComparison.OrdinalIgnoreCase) &&
double.TryParse(result, out d))
{
if (string.IsNullOrEmpty(gridModel.DataFormat))
{
result = Math.Round(Convert.ToDouble(d), model.Decimals, MidpointRounding.AwayFromZero) + "";
}
else
{
//计算后先执行保存小数位数
result = string.Format("{0:" + gridModel.DataFormat + "}", Convert.ToDecimal(result));
}
if (model.FieldType == 7 && result.Contains('%'))
{
result = (double.Parse(result.Replace("%", "")) * 0.01).ToString();
}
rowItem[gridModel.FieldName] = result;
// 判断计算列有无关联值
GridColumnModel UnionModel = calcModels.FirstOrDefault(x => x.FieldName == gridModel.FieldName);
if (!string.IsNullOrEmpty(UnionModel.UnionFields))
{
this.SetUnionValue(UnionModel, rowItem[gridModel.FieldName] + "", rowItem);
}
//this.gridView.SetRowCellValue(this.gri
@@ -126,6 +126,15 @@
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>79</value>
</metadata>
<metadata name="pmFP.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1163, 23</value>
</metadata>
<metadata name="barManager2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>1248, 23</value>
</metadata>
<metadata name="pMprint.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>232, 15</value>
</metadata>
<metadata name="pMprint.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>232, 15</value>
</metadata>