diff --git a/插件库/Lskj.PubBill/BillModule.Designer.cs b/插件库/Lskj.PubBill/BillModule.Designer.cs index f9424b5..2303f99 100644 --- a/插件库/Lskj.PubBill/BillModule.Designer.cs +++ b/插件库/Lskj.PubBill/BillModule.Designer.cs @@ -28,7 +28,6 @@ /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); this.ssc_main = new DevExpress.XtraEditors.SplitContainerControl(); this.ssc_main_top = new DevExpress.XtraEditors.SplitContainerControl(); this.pl_left = new DevExpress.XtraEditors.PanelControl(); @@ -41,7 +40,7 @@ this.pl_treeview_detault_search = new DevExpress.XtraEditors.PanelControl(); this.panelControl4 = new DevExpress.XtraEditors.PanelControl(); this.textEdit1 = new DevExpress.XtraEditors.TextEdit(); - this.barManager1 = new DevExpress.XtraBars.BarManager(this.components); + this.barManager1 = new DevExpress.XtraBars.BarManager(); this.barDockControl1 = new DevExpress.XtraBars.BarDockControl(); this.barDockControl2 = new DevExpress.XtraBars.BarDockControl(); this.barDockControl3 = new DevExpress.XtraBars.BarDockControl(); @@ -51,7 +50,7 @@ this.btnTreeSearch = new DevExpress.XtraEditors.SimpleButton(); this.pl_main_bottom = new DevExpress.XtraEditors.PanelControl(); this.dbpFP = new DevExpress.XtraEditors.DropDownButton(); - this.pmFP = new DevExpress.XtraBars.PopupMenu(this.components); + this.pmFP = new DevExpress.XtraBars.PopupMenu(); this.btnRefresh = new DevExpress.XtraEditors.SimpleButton(); this.btnHiding = new DevExpress.XtraEditors.SimpleButton(); this.btnHelp = new DevExpress.XtraEditors.SimpleButton(); @@ -64,15 +63,15 @@ this.labelControl2 = new DevExpress.XtraEditors.LabelControl(); this.btn_input = new DevExpress.XtraEditors.SimpleButton(); this.dpbImport = new DevExpress.XtraEditors.DropDownButton(); - this.pmBillExp = new DevExpress.XtraBars.PopupMenu(this.components); + this.pmBillExp = new DevExpress.XtraBars.PopupMenu(); this.btnBillAdd = new DevExpress.XtraEditors.SimpleButton(); this.btnBillApply = new DevExpress.XtraEditors.SimpleButton(); this.dpCopyBill = new DevExpress.XtraEditors.DropDownButton(); - this.pmBill = new DevExpress.XtraBars.PopupMenu(this.components); + this.pmBill = new DevExpress.XtraBars.PopupMenu(); this.btnPrint = new DevExpress.XtraEditors.DropDownButton(); - this.pMprint = new DevExpress.XtraBars.PopupMenu(this.components); + this.pMprint = new DevExpress.XtraBars.PopupMenu(); this.dpbTools = new DevExpress.XtraEditors.DropDownButton(); - this.pMenu = new DevExpress.XtraBars.PopupMenu(this.components); + this.pMenu = new DevExpress.XtraBars.PopupMenu(); this.btnDelete = new DevExpress.XtraEditors.SimpleButton(); this.btnBillSave = new DevExpress.XtraEditors.SimpleButton(); this.pl_main_top = new DevExpress.XtraEditors.PanelControl(); @@ -265,10 +264,10 @@ this.pl_treeview_detault_search.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; this.pl_treeview_detault_search.Controls.Add(this.panelControl4); this.pl_treeview_detault_search.Controls.Add(this.panelControl3); - this.pl_treeview_detault_search.Location = new System.Drawing.Point(39, 104); + this.pl_treeview_detault_search.Location = new System.Drawing.Point(292, 789); this.pl_treeview_detault_search.Margin = new System.Windows.Forms.Padding(5, 3, 5, 3); this.pl_treeview_detault_search.Name = "pl_treeview_detault_search"; - this.pl_treeview_detault_search.Size = new System.Drawing.Size(270, 28); + this.pl_treeview_detault_search.Size = new System.Drawing.Size(2052, 215); this.pl_treeview_detault_search.TabIndex = 24; this.pl_treeview_detault_search.Visible = false; // @@ -281,7 +280,7 @@ this.panelControl4.Location = new System.Drawing.Point(0, 0); this.panelControl4.Name = "panelControl4"; this.panelControl4.Padding = new System.Windows.Forms.Padding(2, 4, 2, 0); - this.panelControl4.Size = new System.Drawing.Size(206, 28); + this.panelControl4.Size = new System.Drawing.Size(2043, 215); this.panelControl4.TabIndex = 25; // // textEdit1 @@ -292,7 +291,7 @@ this.textEdit1.Name = "textEdit1"; this.textEdit1.Properties.Appearance.Font = new System.Drawing.Font("宋体", 10F); this.textEdit1.Properties.Appearance.Options.UseFont = true; - this.textEdit1.Size = new System.Drawing.Size(91, 20); + this.textEdit1.Size = new System.Drawing.Size(1928, 20); this.textEdit1.TabIndex = 5; // // barManager1 @@ -347,7 +346,7 @@ this.lceCombobox.NullText = ""; this.lceCombobox.ReadOnly = false; this.lceCombobox.Required = false; - this.lceCombobox.Size = new System.Drawing.Size(111, 24); + this.lceCombobox.Size = new System.Drawing.Size(111, 211); this.lceCombobox.TabIndex = 4; // // panelControl3 @@ -355,10 +354,10 @@ this.panelControl3.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder; this.panelControl3.Controls.Add(this.btnTreeSearch); this.panelControl3.Dock = System.Windows.Forms.DockStyle.Right; - this.panelControl3.Location = new System.Drawing.Point(206, 0); + this.panelControl3.Location = new System.Drawing.Point(2043, 0); this.panelControl3.Name = "panelControl3"; this.panelControl3.Padding = new System.Windows.Forms.Padding(3); - this.panelControl3.Size = new System.Drawing.Size(64, 28); + this.panelControl3.Size = new System.Drawing.Size(9, 215); this.panelControl3.TabIndex = 25; // // btnTreeSearch @@ -367,9 +366,9 @@ this.btnTreeSearch.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.btnTreeSearch.Appearance.Options.UseFont = true; this.btnTreeSearch.Dock = System.Windows.Forms.DockStyle.Right; - this.btnTreeSearch.Location = new System.Drawing.Point(1, 3); + this.btnTreeSearch.Location = new System.Drawing.Point(-54, 3); this.btnTreeSearch.Name = "btnTreeSearch"; - this.btnTreeSearch.Size = new System.Drawing.Size(60, 22); + this.btnTreeSearch.Size = new System.Drawing.Size(60, 209); this.btnTreeSearch.TabIndex = 21; this.btnTreeSearch.Text = "查询"; this.btnTreeSearch.Click += new System.EventHandler(this.OnTreeSearchClick); diff --git a/插件库/Lskj.PubBill/BillModule.cs b/插件库/Lskj.PubBill/BillModule.cs index 4a9c888..941ecf4 100644 --- a/插件库/Lskj.PubBill/BillModule.cs +++ b/插件库/Lskj.PubBill/BillModule.cs @@ -93,7 +93,7 @@ namespace Lskj.PubBill /// /// 主表控件 /// - protected MyControl ControlObj; + public MyControl ControlObj; /// /// 入口参数 /// @@ -117,6 +117,12 @@ namespace Lskj.PubBill /// /// The main bottom templete object. public PanelControl MainBottomTempleteObj { get { return this.pl_templete; } } + /// + /// 明细表格数据 + /// + /// The main bottom templete object. + public GridControlEx gcMainDetilObj { get { return this.gcMain; } } + /// /// Brp模版控件 /// @@ -851,7 +857,6 @@ namespace Lskj.PubBill BarButtonItem itemFPBatch = new BarButtonItem(); itemFPBatch.Caption = "批量分配"; itemFPBatch.ItemClick += new ItemClickEventHandler(OnBtnFPNewClick); - this._itemImport = new BarButtonItem(); this._itemImport.Caption = "导入Excel文件"; this._itemImport.ItemClick += new ItemClickEventHandler(OnImportItemClick); @@ -948,7 +953,7 @@ namespace Lskj.PubBill { SimpleButton btn = sender as SimpleButton; DataRow rowItem = btn.Tag as DataRow; - CommonMenu menu = new CommonMenu(this.SysModel, this.ControlObj); + CommonMenu menu = new CommonMenu(this.SysModel, this.ControlObj,null); menu.ApplyBefore += new CommonToolApplyEventHandler(OnMenuApplyBefore); menu.DynamicLinkAfter += new CommonToolAfterDynamicLinkEventHandler(OnDynamicLinkAfter); menu.Apply(rowItem); @@ -1132,7 +1137,7 @@ namespace Lskj.PubBill if (!string.IsNullOrEmpty(this.SysModel.BillMasterSql)) { // 处理单据明细数据 - this.AddMultiRowToGridView(BillImpl.GetDataTableResult(this.SysModel.BillDetailSql)); + if (!this.SysModel.BillDetailSql.StartsWith("*")) this.AddMultiRowToGridView(BillImpl.GetDataTableResult(this.SysModel.BillDetailSql)); } } } @@ -2508,7 +2513,7 @@ namespace Lskj.PubBill { DataRow rowItem = e.Item.Tag as DataRow; - CommonMenu menu = new CommonMenu(this.SysModel, this.ControlObj); + CommonMenu menu = new CommonMenu(this.SysModel, this.ControlObj,null); menu.ApplyBefore += new CommonToolApplyEventHandler(OnMenuApplyBefore); menu.DynamicLinkAfter += new CommonToolAfterDynamicLinkEventHandler(OnDynamicLinkAfter); menu.Apply(rowItem); diff --git a/插件库/Lskj.PubBill/FrmMain.cs b/插件库/Lskj.PubBill/FrmMain.cs index f5696fc..09ba5e0 100644 --- a/插件库/Lskj.PubBill/FrmMain.cs +++ b/插件库/Lskj.PubBill/FrmMain.cs @@ -33,6 +33,7 @@ using System.IO; using Lskj.Business; using Lskj.Main.Model; using System.Threading.Tasks; +using Lskj.Core; namespace Lskj.PubBill { @@ -83,6 +84,19 @@ namespace Lskj.PubBill { this.Text = this.billModule1.BillModel.TypeName; + if (this.SysModel.BillDetailSql.StartsWith("*")) + { + string rightid = this.SysModel.BillDetailSql.TrimStart('*'); + string sqlValue = "select AllowNullExec,* from p_systempopupmenu "; + sqlValue = $"{sqlValue} where id = '{rightid}'"; + DataRow rowItem = BaseImpl.GetDataRowResult(sqlValue); + if (rowItem != null) + { + CommonMenu menu = new CommonMenu(this.SysModel, this.billModule1.ControlObj,this.billModule1.gcMainDetilObj); + menu.DynamicLinkAfter += new CommonToolAfterDynamicLinkEventHandler(OnDynamicLinkAfter); + menu.Apply(rowItem); + } + } } this.FormClosing += new FormClosingEventHandler(OnClose); } @@ -105,6 +119,17 @@ namespace Lskj.PubBill WaitForm.HideForm(); } } + /// + /// 执行完成后若是取消状态则关闭当前界面 + /// + /// + private void OnDynamicLinkAfter(ApplyArgs e) + { + if(e.DialogModel!= null && e.DialogModel.PubDialogType== DialogType.Pubcolsed) + { + this.Close(); + } + } ///