From 70c49ce94352ea6097b5de48536e81b1b96682e5 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期一, 13 十月 2025 21:29:26 +0800
Subject: [PATCH] 打印
---
DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs | 149 +++++++++++++++++++++++++++++++++----------------
1 files changed, 99 insertions(+), 50 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs b/DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs
index 924dd6a..b3d3f5a 100644
--- a/DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs
+++ b/DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs
@@ -1,4 +1,5 @@
-锘縰sing Gs.DevApp.DevFrm.QC;
+锘縰sing DevExpress.XtraLayout.Customization;
+using Gs.DevApp.DevFrm.QC;
using Gs.DevApp.DevFrm.Rpt;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
@@ -63,14 +64,26 @@
gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged;
btnIpt.Click += BtnIpt_Click;
string rptName = "";
- if (strType == QcSeason.鐢熶骇閫�鏂欏叆搴撴.ToString())
- rptName = "rpt_SCTL";
+ if (strType == QcSeason.鍙楁墭鍏ュ簱.ToString())
+ {
+ rptName = "rpt_Strk";
+ layoutControlItem25.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+ layoutControlItem27.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+ }
else
if (strType == QcSeason.鍏跺畠鍏ュ簱妫�.ToString())
+ {
rptName = "rpt_Qtrk";
+ layoutControlItem25.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+ layoutControlItem27.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+ }
+
else
if (strType == QcSeason.閿�鍞��璐у叆搴撴.ToString())
rptName = "rpt_Xsth";
+ else
+ if (strType == QcSeason.濮斿閫�鏂欏叆搴撴.ToString())
+ rptName = "rpt_wwtl";
else
if (strType == QcSeason.瓒呮湡妫�.ToString())
{
@@ -79,8 +92,70 @@
layoutControlItem27.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
tabMxPage3.PageVisible = false;
}
-
+ #region 鎵撳嵃鐩稿叧
this.ucBtnPrint1.btnPrintClick += (s, e) =>
+ {
+ _print(0, rptName);
+ };
+ this.ucBtnPrint1.btnAllClick += (s, e) =>
+ {
+ string rowGuid = txt_aboutGuid.Text.Trim();
+ SelectDeleteBar frm = new SelectDeleteBar(rowGuid, strType);
+ string strCodeList = "";
+ string strAction = "";
+ frm.UpdateParent += (ss, ee) =>
+ {
+ strCodeList = ee.StringSingle;
+ strAction = ee.Data;
+ };
+ frm.ShowDialog();
+ if (string.IsNullOrEmpty(strCodeList))
+ return;
+ if (strAction == "print")
+ {
+ try
+ {
+ string rptParameter = rptName + "{"
+ + "100"
+ + "," + ""
+ + "," + ""
+ + "," + ""
+ + "," + ""
+ + "," + strCodeList
+ + "}";
+ using (Form rpt = new RptPreview(rowGuid, rptParameter))
+ {
+ rpt.ShowDialog();
+ }
+ frm.Close();
+ }
+ catch (Exception ex)
+ {
+ MsgHelper.ShowError(ex.Message);
+ }
+ }
+ };
+ this.ucBtnPrint1.btnZhiJieClick += (s, e) =>
+ {
+ _print(1, rptName);
+ };
+ //鑷姩璁$畻鎵撳嵃閲�
+ txt_psnQty_1.TextChanged += (s, e) =>
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(txt_psnQty_1, txt_iCount_1, txt_kQty.Text.Trim(), radOut, txt_yuliang_1);
+ };
+ radOut.SelectedIndexChanged += (s, e) =>
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1);
+ };
+ #endregion
+
+ }
+ /// <summary>
+ /// 鎵撳嵃
+ /// </summary>
+ /// <param name="type">0琛ㄧず棰勮鎵撳嵃锛�1琛ㄧず鐩存帴鎵撳嵃</param>
+ private void _print(int type, string rptName)
{
ucBtnPrint1.guidKey = "";
string rowGuid = txt_aboutGuid.Text.Trim();
@@ -112,49 +187,6 @@
+ "," + txt_iCount_1.Text.Trim()
+ "," + txt_psnQty_1.Text.Trim()
+ "}";
- };
- this.ucBtnPrint1.btnAllClick += (s, e) =>
- {
- string rowGuid = txt_aboutGuid.Text.Trim();
- SelectDeleteBar frm = new SelectDeleteBar(rowGuid, strType);
- string strCodeList = "";
- frm.UpdateParent += (ss, ee) =>
- {
- strCodeList = ee.StringSingle;
- };
- frm.ShowDialog();
- if (string.IsNullOrEmpty(strCodeList))
- return;
- try
- {
- string rptParameter = rptName + "{"
- + "100"
- + "," + ""
- + "," + ""
- + "," + ""
- + "," + ""
- + "," + strCodeList
- + "}";
- using (Form rpt = new RptPreview(rowGuid, rptParameter))
- {
- rpt.ShowDialog();
- }
- frm.Close();
- }
- catch (Exception ex)
- {
- MsgHelper.ShowError(ex.Message);
- }
- };
- //鑷姩璁$畻鎵撳嵃閲�
- txt_psnQty_1.TextChanged += (s, e) =>
- {
- Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(txt_psnQty_1, txt_iCount_1, txt_kQty.Text.Trim(), radOut, txt_yuliang_1);
- };
- radOut.SelectedIndexChanged += (s, e) =>
- {
- Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1);
- };
}
/// <summary>
/// 鎵归噺褰曞叆
@@ -425,7 +457,13 @@
{
toolBarMenu1.isSetBtn = false;
string rkckid = txt_rkCkId.GetId();
- if (strType != QcSeason.瓒呮湡妫�.ToString())
+ if (strType == QcSeason.瓒呮湡妫�.ToString()
+ || strType == QcSeason.鍏跺畠鍏ュ簱妫�.ToString()
+ || strType == QcSeason.鍙楁墭鍏ュ簱.ToString())
+ {
+
+ }
+ else
{
if (string.IsNullOrEmpty(rkckid))
{
@@ -477,7 +515,19 @@
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
- gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+ gcMain1.DataSource = null;
+ System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
+ _sbSqlWhere.Append(" and a.ReceiveOrgId in");
+ _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
+ _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
+ if (strType == QcSeason.鍏跺畠鍏ュ簱妫�.ToString())
+ {
+ _sbSqlWhere.Append(" and isnull(qtrk.qt028,0)=1 and isnull(qtrk.qt032,0)=1 and isnull(qtrk.qt015,0)=1 ");
+ }
+ if (strType == QcSeason.鍙楁墭鍏ュ簱.ToString())
+ {
+ _sbSqlWhere.Append(" and isnull(st.isCheck,0)=1 and isnull(st.qt032,0)=1");
+ }
PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "release_no", "asc", "", " and a.order_type='" + strType + "' " + _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
try
@@ -511,7 +561,6 @@
{
ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
-
}
/// <summary>
/// 璇诲彇瀹炰綋
--
Gitblit v1.9.3