From 8260333f7c6ec381e37ff843f5d54dc43b19755c Mon Sep 17 00:00:00 2001 From: "songnan.zhang" Date: Tue, 14 Jun 2022 15:17:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APPQ5/QMAPP.FJC.Web/App_Data/Menu.xml | 3 +- .../TSWeighRecore/TSWeighRecoreList.aspx | 7 +- .../Forms/Injection/InjectionCodePrint.cs | 90 +++++++++++++------ .../Forms/Operation/OperationForm.cs | 4 + .../Forms/Operation/OperationForm_316.cs | 3 + 5 files changed, 77 insertions(+), 30 deletions(-) diff --git a/APPQ5/QMAPP.FJC.Web/App_Data/Menu.xml b/APPQ5/QMAPP.FJC.Web/App_Data/Menu.xml index c67f9d0..f49ce8f 100644 --- a/APPQ5/QMAPP.FJC.Web/App_Data/Menu.xml +++ b/APPQ5/QMAPP.FJC.Web/App_Data/Menu.xml @@ -434,7 +434,8 @@ 查询 - 导出 + 统计 + 导出 diff --git a/APPQ5/QMAPP.FJC.Web/Views/TSWeighRecore/TSWeighRecoreList.aspx b/APPQ5/QMAPP.FJC.Web/Views/TSWeighRecore/TSWeighRecoreList.aspx index 97f3dd9..d19451b 100644 --- a/APPQ5/QMAPP.FJC.Web/Views/TSWeighRecore/TSWeighRecoreList.aspx +++ b/APPQ5/QMAPP.FJC.Web/Views/TSWeighRecore/TSWeighRecoreList.aspx @@ -96,6 +96,11 @@ }) } } + //导出 + function Export() { + document.getElementById("selectKey").value = getSelectKey(); + submitByButton("ExportExcel"); + } function Statistics() { submitByButton("Statistics"); } @@ -108,7 +113,7 @@ <%=Html.QTButtonSearch("TSWeighRecore", "List", "List(1)", QMAPP.Common.Web.SystemLimit.isLimt)%> <%=Html.QTButton("Statistics", "Statistics", QMFrameWork.WebUI.IconCls.redo, "Statistics()", QMAPP.Common.Web.SystemLimit.isLimt)%> - + <%=Html.QTButton("export", "ExportExcel", QMFrameWork.WebUI.IconCls.redo, "Export()", QMAPP.Common.Web.SystemLimit.isLimt)%> diff --git a/APPQ5/QMAPP.WinForm/Forms/Injection/InjectionCodePrint.cs b/APPQ5/QMAPP.WinForm/Forms/Injection/InjectionCodePrint.cs index 2a66105..b7e1d52 100644 --- a/APPQ5/QMAPP.WinForm/Forms/Injection/InjectionCodePrint.cs +++ b/APPQ5/QMAPP.WinForm/Forms/Injection/InjectionCodePrint.cs @@ -106,9 +106,16 @@ namespace QMAPP.WinForm.Forms.Injection int i = 1; //DataResult> resultList = _agent.InvokeServiceFunction>>("MainOperationBLL_GetPrintCodeForChengdu", materialListInfo, model, i); var machine = comMachine.SelectedItem as MachineInfo; - DataResult> resultList = _agent.InvokeServiceFunction>>("MainOperationBLL_GetPrintCodeWithParam", materialListInfo, machine, model, "", new Dictionary()); + DataResult> resultList = _agent.InvokeServiceFunction>>("MainOperationBLL_GetPrintCodeWithParam", materialListInfo, machine, model, "", new Dictionary()); + try + { + Print(resultList.Result, true); + } + catch (Exception e) + { + var ss = e.Message; + } - Print(resultList.Result, true); } private void CodeCreatePrint(string header, string datarow, char[] dataSeparator) @@ -216,41 +223,68 @@ namespace QMAPP.WinForm.Forms.Injection } } fr.Load(string.Format("{0}\\{1}.frx", path, typeTem)); - if (cbTemplateDesign.Enabled && cbTemplateDesign.Checked) - { - fr.Design(true); - } - else - { - fr.PrintSettings.ShowDialog = false; - fr.Print(); - #region 张松男20210802 修改 增加新版注塑投料条码绑定 - - foreach (var la in labels) + + if (cbTemplateDesign.Enabled && cbTemplateDesign.Checked) + { + try + { + fr.Design(true); + } + catch (Exception e) + { + var ss = e.Message; + } + + } + else { - var material_T = new BucketMaterialClass() { MaterialCode = la.MaterialCode }; - var List = _agent.InvokeServiceFunction>(B9BasicService.RawMaterialBLL_GetListTo.ToString(), material_T); + try + { + fr.PrintSettings.ShowDialog = false; + fr.Print(); + } + catch (Exception e) + { + var ss = e.Message; + } + - if (List != null && List.Count > 0) + #region 张松男20210802 修改 增加新版注塑投料条码绑定 + + foreach (var la in labels) { - foreach (var raw in List) + var material_T = new BucketMaterialClass() { MaterialCode = la.MaterialCode }; + var List = _agent.InvokeServiceFunction>(B9BasicService.RawMaterialBLL_GetListTo.ToString(), material_T); + + if (List != null && List.Count > 0) { - var record = new RawMaterialRecord(); - record.MaterialCode = la.MaterialCode; - record.MaterialName = la.MaterialName; - record.ProductCode = la.SerialNumber; - record.RawMaterialPID = raw.PID; - record.MachineCode = la.MachineCode; - _agent.InvokeServiceFunction>(B9BasicService.RawMaterialRecordBLL_Insert.ToString(), record); + foreach (var raw in List) + { + var record = new RawMaterialRecord(); + record.MaterialCode = la.MaterialCode; + record.MaterialName = la.MaterialName; + record.ProductCode = la.SerialNumber; + record.RawMaterialPID = raw.PID; + record.MachineCode = la.MachineCode; + _agent.InvokeServiceFunction>(B9BasicService.RawMaterialRecordBLL_Insert.ToString(), record); + } } } + + #endregion + + } + try + { + fr.Dispose(); + } + catch (Exception e) + { + var ss = e.Message; } - - #endregion - } - fr.Dispose(); + //QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil(); //pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString diff --git a/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs b/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs index 13b7b02..5855eaf 100644 --- a/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs +++ b/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs @@ -2523,6 +2523,10 @@ namespace QMAPP.WinForm.Forms.Operation /// private void tsbPrint_Click(object sender, EventArgs e) { + MessageBox.Show("重打功能已关闭!"); + return; + + if (this.DGViewProList.SelectedRows.Count == 0) { MessageBox.Show("请选择打印的本体信息!"); diff --git a/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm_316.cs b/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm_316.cs index 51d3360..56be50e 100644 --- a/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm_316.cs +++ b/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm_316.cs @@ -2698,6 +2698,9 @@ namespace QMAPP.WinForm.Forms.Operation /// private void tsbPrint_Click(object sender, EventArgs e) { + MessageBox.Show("重打功能已关闭!"); + return; + if (this.DGViewProList.SelectedRows.Count == 0) { MessageBox.Show("请选择打印的本体信息!");