| DevApp/Gs.DevApp/DevFrm/Rpt/CKTmkc.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/DevFrm/Rpt/CKTmkc.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/Gs.DevApp.csproj | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/UserControl/UcBtnPrint.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/UserControl/UcPrintPanel.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/UserControl/UcPrintPanel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/UserControl/UcPrintPanel.resx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
DevApp/Gs.DevApp/DevFrm/Rpt/CKTmkc.Designer.cs
@@ -90,6 +90,7 @@ this.layoutControlItem10 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem12 = new DevExpress.XtraLayout.LayoutControlItem(); this.layoutControlItem11 = new DevExpress.XtraLayout.LayoutControlItem(); this.gridColumn7 = new DevExpress.XtraGrid.Columns.GridColumn(); ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); this.xtraTabControl1.SuspendLayout(); this.xtraTabPage1.SuspendLayout(); @@ -224,7 +225,8 @@ this.gv_ownerId, this.gridColumn5, this.gv_indepUserCode, this.gv_indepDate}); this.gv_indepDate, this.gridColumn7}); this.gridView1.GridControl = this.gcMain1; this.gridView1.IndicatorWidth = 50; this.gridView1.Name = "gridView1"; @@ -832,6 +834,15 @@ this.layoutControlItem11.Text = "å ¥åºæ¥æ"; this.layoutControlItem11.TextSize = new System.Drawing.Size(60, 18); // // gridColumn7 // this.gridColumn7.Caption = "ä»åºç¼ç "; this.gridColumn7.MinWidth = 25; this.gridColumn7.Name = "gridColumn7"; this.gridColumn7.Visible = true; this.gridColumn7.VisibleIndex = 12; this.gridColumn7.Width = 94; // // CKTmkc // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); @@ -943,5 +954,6 @@ private DevExpress.XtraLayout.LayoutControlItem layoutControlItem24; private DevExpress.XtraLayout.LayoutControlItem layoutControlItem11; private DevExpress.XtraGrid.Columns.GridColumn colChkInt; private DevExpress.XtraGrid.Columns.GridColumn gridColumn7; } } DevApp/Gs.DevApp/DevFrm/Rpt/CKTmkc.cs
@@ -15,9 +15,13 @@ { string _webServiceName = "Ck/"; List<FilterEntity> _filterList = new List<FilterEntity>(); // ææ¿æå°é¢æ¿ï¼å¤ç¨è¾å ¥å¼¹çªä¸åæ°æé ï¼ private Gs.DevApp.UserControl.UcPrintPanel _palletPrintPanel; public CKTmkc() { InitializeComponent(); // åå§åææ¿æå°é¢æ¿ï¼ä¸å¿ å¯è§åæ·»å ï¼ä» å¤ç¨å ¶é»è¾ï¼ _palletPrintPanel = new Gs.DevApp.UserControl.UcPrintPanel(); this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; toolBarMenu1.btnPrintClick += ToolBarMenu1_btnPrintClick; @@ -259,24 +263,22 @@ /// <param name="e"></param> private void ToolBarMenu1_btnTBPrintClick(object sender, EventArgs e) { //System.Text.StringBuilder sb = new System.Text.StringBuilder(); gridView1.PostEditor(); gridView1.UpdateCurrentRow(); /*if (string.IsNullOrEmpty(sb.ToString())) // è·åå½åéä¸è¡ guid string rowGuid, rowName; (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemBarcode, gridView1); if (rowGuid.Length < 36) { Gs.DevApp.ToolBox.MsgHelper.ShowError("æç¤ºï¼è¯·å éæ©ç©æï¼"); Gs.DevApp.ToolBox.MsgHelper.ShowError("è¯·éæ©ä½ è¦æå°çè¡ï¼"); this.toolBarMenu1.rptParameter = "return false"; return; }*/ this.toolBarMenu1.rptParameter = "rpt_TB_Print{" + "" + "," + "" + "," + "" + "," + "" + "," + "" + "," + "" + "}"; } // å¤ç¨ UcPrintPanel çå¼¹çªä¸æå°é»è¾ _palletPrintPanel.TriggerPalletPrint(rowGuid); // 黿¢å·¥å ·æ é»è®¤ç忬¡æå°æµç¨ this.toolBarMenu1.rptParameter = "return false"; this.toolBarMenu1.guidKey = null; } } DevApp/Gs.DevApp/Gs.DevApp.csproj
@@ -1,4 +1,4 @@ <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="..\packages\CefSharp.Common.109.1.110\build\CefSharp.Common.props" Condition="Exists('..\packages\CefSharp.Common.109.1.110\build\CefSharp.Common.props')" /> <Import Project="..\packages\cef.redist.x86.109.1.11\build\cef.redist.x86.props" Condition="Exists('..\packages\cef.redist.x86.109.1.11\build\cef.redist.x86.props')" /> <Import Project="..\packages\cef.redist.x64.109.1.11\build\cef.redist.x64.props" Condition="Exists('..\packages\cef.redist.x64.109.1.11\build\cef.redist.x64.props')" /> @@ -1364,6 +1364,18 @@ <Compile Include="UserControl\SelectSrm.Designer.cs"> <DependentUpon>SelectSrm.cs</DependentUpon> </Compile> <Compile Include="UserControl\UcBtnPrintOne.cs"> <SubType>UserControl</SubType> </Compile> <Compile Include="UserControl\UcBtnPrintOne.Designer.cs"> <DependentUpon>UcBtnPrintOne.cs</DependentUpon> </Compile> <Compile Include="UserControl\UcPrintPanel.cs"> <SubType>UserControl</SubType> </Compile> <Compile Include="UserControl\UcPrintPanel.Designer.cs"> <DependentUpon>UcPrintPanel.cs</DependentUpon> </Compile> <Compile Include="UserControl\UcCheckFlow.cs"> <SubType>UserControl</SubType> </Compile> @@ -2301,6 +2313,12 @@ <EmbeddedResource Include="UserControl\SelectSrm.resx"> <DependentUpon>SelectSrm.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="UserControl\UcBtnPrintOne.resx"> <DependentUpon>UcBtnPrintOne.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="UserControl\UcPrintPanel.resx"> <DependentUpon>UcPrintPanel.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="UserControl\UcCheckFlow.resx"> <DependentUpon>UcCheckFlow.cs</DependentUpon> </EmbeddedResource> DevApp/Gs.DevApp/UserControl/UcBtnPrint.cs
@@ -1,4 +1,4 @@ using Gs.DevApp.DevFrm.Rpt; using Gs.DevApp.DevFrm.Rpt; using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; using Newtonsoft.Json; @@ -152,6 +152,38 @@ } /// <summary> /// 设置âç¡®å®æå°âæé®çæ¾ç¤ºææ¬ /// </summary> /// <param name="text">æé®ææ¬</param> public void SetPrintText(string text) { if (string.IsNullOrWhiteSpace(text)) return; this.btnPrint.Text = text; } /// <summary> /// å¤é¨è§¦åæå°æµç¨ï¼æ§è¡ btnPrintClick é»è¾å¹¶æå° /// </summary> public void TriggerPrint() { // å¤ç¨ç°æç¹å»æé®é»è¾ if (btnPrintClick != null) btnPrintClick(this, EventArgs.Empty); else return; if (rptParameter == "return false") return; if (string.IsNullOrEmpty(rptParameter)) { MsgHelper.ShowError("没ææå®æ¥è¡¨åæ°ï¼è¯·èç³»ææ¯å¼å人åï¼"); return; } _print(); } /// <summary> /// /// </summary> private void _print() DevApp/Gs.DevApp/UserControl/UcPrintPanel.Designer.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,117 @@ namespace Gs.DevApp.UserControl { partial class UcPrintPanel { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Component Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.layoutMain = new DevExpress.XtraLayout.LayoutControl(); this.ucBtnPrint1 = new Gs.DevApp.UserControl.UcBtnPrint(); this.layoutGroup = new DevExpress.XtraLayout.LayoutControlGroup(); this.layPrint = new DevExpress.XtraLayout.LayoutControlItem(); this.colDef1 = new DevExpress.XtraLayout.ColumnDefinition(); this.rowDef1 = new DevExpress.XtraLayout.RowDefinition(); ((System.ComponentModel.ISupportInitialize)(this.layoutMain)).BeginInit(); this.layoutMain.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.layoutGroup)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.layPrint)).BeginInit(); this.SuspendLayout(); // // layoutMain // this.layoutMain.Controls.Add(this.ucBtnPrint1); this.layoutMain.Dock = System.Windows.Forms.DockStyle.Fill; this.layoutMain.Location = new System.Drawing.Point(0, 0); this.layoutMain.Margin = new System.Windows.Forms.Padding(0); this.layoutMain.Name = "layoutMain"; this.layoutMain.Root = this.layoutGroup; this.layoutMain.Size = new System.Drawing.Size(261, 34); this.layoutMain.TabIndex = 0; this.layoutMain.Text = "layoutMain"; // // ucBtnPrint1 // this.ucBtnPrint1.Location = new System.Drawing.Point(0, 0); this.ucBtnPrint1.Margin = new System.Windows.Forms.Padding(0); this.ucBtnPrint1.Name = "ucBtnPrint1"; this.ucBtnPrint1.Size = new System.Drawing.Size(261, 34); this.ucBtnPrint1.TabIndex = 0; // // layoutGroup // this.layoutGroup.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True; this.layoutGroup.GroupBordersVisible = false; this.layoutGroup.Items.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] { this.layPrint}); this.layoutGroup.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table; this.layoutGroup.Name = "Root"; this.colDef1.SizeType = System.Windows.Forms.SizeType.Percent; this.colDef1.Width = 100D; this.layoutGroup.OptionsTableLayoutGroup.ColumnDefinitions.AddRange(new DevExpress.XtraLayout.ColumnDefinition[] { this.colDef1}); this.rowDef1.SizeType = System.Windows.Forms.SizeType.Percent; this.rowDef1.Height = 100D; this.layoutGroup.OptionsTableLayoutGroup.RowDefinitions.AddRange(new DevExpress.XtraLayout.RowDefinition[] { this.rowDef1}); this.layoutGroup.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); this.layoutGroup.Size = new System.Drawing.Size(261, 34); this.layoutGroup.TextVisible = false; // // layPrint // this.layPrint.Control = this.ucBtnPrint1; this.layPrint.Location = new System.Drawing.Point(0, 0); this.layPrint.Name = "layPrint"; this.layPrint.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0); this.layPrint.Size = new System.Drawing.Size(261, 34); this.layPrint.TextSize = new System.Drawing.Size(0, 0); this.layPrint.TextVisible = false; // // UcPrintPanel // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.layoutMain); this.Name = "UcPrintPanel"; this.Size = new System.Drawing.Size(261, 34); ((System.ComponentModel.ISupportInitialize)(this.layoutMain)).EndInit(); this.layoutMain.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.layoutGroup)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.layPrint)).EndInit(); this.ResumeLayout(false); } #endregion private DevExpress.XtraLayout.LayoutControl layoutMain; private DevExpress.XtraLayout.LayoutControlGroup layoutGroup; private Gs.DevApp.UserControl.UcBtnPrint ucBtnPrint1; private DevExpress.XtraLayout.LayoutControlItem layPrint; private DevExpress.XtraLayout.ColumnDefinition colDef1; private DevExpress.XtraLayout.RowDefinition rowDef1; } } DevApp/Gs.DevApp/UserControl/UcPrintPanel.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,63 @@ using System; using System.Windows.Forms; using DevExpress.XtraEditors; namespace Gs.DevApp.UserControl { public partial class UcPrintPanel : DevExpress.XtraEditors.XtraUserControl { public UcPrintPanel() { InitializeComponent(); // ä» ä¿çææ¿æå°æé® ucBtnPrint1.SetPlButton(false); ucBtnPrint1.SetPrintButton(true); ucBtnPrint1.SetPrintText("ææ¿æå°"); // ç¹å»ææ¿æå°ï¼å¼¹çªè¾å ¥å¼ æ°ï¼é»è®¤1 ucBtnPrint1.btnPrintClick += (s, e) => { string input = XtraInputBox.Show("请è¾å ¥æå°å¼ æ°", "ææ¿æå°", "1"); if (input == null) { ucBtnPrint1.rptParameter = "return false"; return; } input = input.Trim(); if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(input)) { Gs.DevApp.ToolBox.MsgHelper.ShowError("请è¾å ¥æ£ç¡®çæå°å¼ æ°ï¼"); ucBtnPrint1.rptParameter = "return false"; return; } int copies = Math.Max(1, int.Parse(input)); // guidKey å¯ç±å®¿ä¸»çªä½éè¿å±æ§èµå¼ï¼ææ¿æå°å 许为空 ucBtnPrint1.guidKey = this.guidKey; ucBtnPrint1.rptParameter = $"rpt_TB_Print{{,,,{copies},1,,}}"; }; } // 坹夿´é²ç主é®ï¼ç¨äºé¨åæ¥è¡¨éè¦ä¼ guid private string _guidKey; public string guidKey { get => _guidKey; set => _guidKey = value ?? string.Empty; } public void SetPlButton(bool show) => ucBtnPrint1.SetPlButton(show); public void SetPrintButton(bool show) => ucBtnPrint1.SetPrintButton(show); /// <summary> /// è§¦åææ¿æå°ï¼è®¾ç½® guid å¹¶è°ç¨å 鍿尿µç¨ /// </summary> /// <param name="guid">å½åéä¸è¡ç guid</param> public void TriggerPalletPrint(string guid) { this.guidKey = guid ?? string.Empty; ucBtnPrint1.guidKey = this.guidKey; ucBtnPrint1.TriggerPrint(); } } } DevApp/Gs.DevApp/UserControl/UcPrintPanel.resx
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,15 @@ <?xml version="1.0" encoding="utf-8"?> <root> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> </root>