From 780c932338d7fbefb9bb3e05b253cc203f6f4d48 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期五, 08 八月 2025 10:09:47 +0800
Subject: [PATCH] bug
---
DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs | 174 ++++++++++++++++++++++++++++++++++-----------------------
1 files changed, 103 insertions(+), 71 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs b/DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs
index c753744..1aebbbc 100644
--- a/DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs
+++ b/DevApp/Gs.DevApp/DevFrm/RkQC/RkDetect01.cs
@@ -18,17 +18,19 @@
string _strTag = "N:涓嶅悎鏍�";
List<FilterEntity> _filterList = new List<FilterEntity>();
- public string strType = "";//iqc type
+ public string strType = "";//鐢熶骇閫�鏂� type
public RkDetect01(string _strType)
{
InitializeComponent();
strType = _strType;
}
- protected override void OnCreateControl() {
+ protected override void OnCreateControl()
+ {
+ //鍒楄〃锛実etmodel 浣跨敤浜哛kqcManager锛�
+ //淇濆瓨锛屽鏍镐娇锛岄噸鏂板姞杞芥楠� 鐢ㄤ簡MesQaItemsDetect01Manager
base.OnCreateControl();
if (Parent == null) return;
-
this.toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick;
this.toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick;
this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
@@ -60,69 +62,95 @@
xtraTabControl2.SelectedPageChanged += XtraTabControl2_SelectedPageChanged;
gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged;
btnIpt.Click += BtnIpt_Click;
- this.ucBtnPrint1.btnPrintClick += (s, e) =>
+ string rptName = "";
+ if (strType == QcSeason.鐢熶骇閫�鏂欏叆搴撴.ToString())
+ rptName = "rpt_SCTL";
+ else
+ if (strType == QcSeason.鍏跺畠鍏ュ簱妫�.ToString())
+ rptName = "rpt_Qtrk";
+ else
+ if (strType == QcSeason.閿�鍞��璐у叆搴撴.ToString())
+ rptName = "rpt_Xsth";
+ else
+ if (strType == QcSeason.濮斿閫�鏂欏叆搴撴.ToString())
+ rptName = "rpt_wwtl";
+ else
+ if (strType == QcSeason.瓒呮湡妫�.ToString())
{
- ucBtnPrint1.guidKey = "";
- string rowGuid = txt_aboutGuid.Text.Trim();
- ucBtnPrint1.guidKey = rowGuid;
- if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim(), txt_yuliang_1.Text.Trim()))
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇疯緭鍏ユ纭殑鏉$爜鏁伴噺锛�");
- txt_iCount_1.Focus();
- this.ucBtnPrint1.rptParameter = "return false";
- return;
- }
- if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim()))
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�");
- txt_psnQty_1.Focus();
- this.ucBtnPrint1.rptParameter = "return false";
- return;
- }
- if (rowGuid.Length < 10)
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鐨勮锛�");
- this.ucBtnPrint1.rptParameter = "return false";
- return;
- }
- this.ucBtnPrint1.rptParameter = "rpt_SCTL{" + rowGuid.Trim()
- + "," + ""
- + "," + Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_yuliang_1.Text.Trim())
- + "," + txt_iCount_1.Text.Trim()
- + "," + txt_psnQty_1.Text.Trim()
- + "}";
- };
+ rptName = "";
+ layoutControlItem25.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+ layoutControlItem27.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+ tabMxPage3.PageVisible = false;
+ }
+
+ this.ucBtnPrint1.btnPrintClick += (s, e) =>
+ {
+ ucBtnPrint1.guidKey = "";
+ string rowGuid = txt_aboutGuid.Text.Trim();
+ ucBtnPrint1.guidKey = rowGuid;
+ if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim(), txt_yuliang_1.Text.Trim()))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇疯緭鍏ユ纭殑鏉$爜鏁伴噺锛�");
+ txt_iCount_1.Focus();
+ this.ucBtnPrint1.rptParameter = "return false";
+ return;
+ }
+ if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim()))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�");
+ txt_psnQty_1.Focus();
+ this.ucBtnPrint1.rptParameter = "return false";
+ return;
+ }
+ if (rowGuid.Length < 10)
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鐨勮锛�");
+ this.ucBtnPrint1.rptParameter = "return false";
+ return;
+ }
+
+ this.ucBtnPrint1.rptParameter = rptName + "{" + rowGuid.Trim()
+ + "," + ""
+ + "," + Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_yuliang_1.Text.Trim())
+ + "," + 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, "閲囪喘鍏ュ簱");
+ 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;
- try
- {
- string rptParameter = "rpt_SCTL{"
- + "100"
- + "," + ""
- + "," + ""
- + "," + ""
- + "," + ""
- + "," + strCodeList
- + "}";
- using (Form rpt = new RptPreview(rowGuid, rptParameter))
+ if (strAction == "print") {
+ try
{
- rpt.ShowDialog();
+ string rptParameter = rptName + "{"
+ + "100"
+ + "," + ""
+ + "," + ""
+ + "," + ""
+ + "," + ""
+ + "," + strCodeList
+ + "}";
+ using (Form rpt = new RptPreview(rowGuid, rptParameter))
+ {
+ rpt.ShowDialog();
+ }
+ frm.Close();
}
- frm.Close();
- }
- catch (Exception ex)
- {
- MsgHelper.ShowError(ex.Message);
+ catch (Exception ex)
+ {
+ MsgHelper.ShowError(ex.Message);
+ }
}
};
//鑷姩璁$畻鎵撳嵃閲�
@@ -182,7 +210,7 @@
string strGuid = lbGuid.Text.Trim();
if (string.IsNullOrEmpty(strGuid))
{
- ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
var _obj = new
@@ -204,7 +232,7 @@
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
/// <summary>
@@ -266,7 +294,7 @@
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
}
@@ -377,7 +405,7 @@
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1, "releaseNo");
if (string.IsNullOrEmpty(rowGuid))
{
- ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
@@ -404,13 +432,15 @@
{
toolBarMenu1.isSetBtn = false;
string rkckid = txt_rkCkId.GetId();
- if (string.IsNullOrEmpty(rkckid))
+ if (strType != QcSeason.瓒呮湡妫�.ToString())
{
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨浠撳簱锛�");
- txt_rkCkId.Focus();
- return;
+ if (string.IsNullOrEmpty(rkckid))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨浠撳簱锛�");
+ txt_rkCkId.Focus();
+ return;
+ }
}
-
if (txt_fcheckResu.Text.Trim() == _strTag && string.IsNullOrEmpty(txt_fngDesc.TextTxt.Trim()))
{
Gs.DevApp.ToolBox.MsgHelper.ShowError("褰撴楠岀粨鏋滀笉鍚堟牸鏃讹紝璇峰~鍐欏娉ㄨ鏄庯紒");
@@ -455,7 +485,7 @@
private void getPageList(int curPage)
{
gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
- PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "release_no", "asc", "", " and a.order_type='"+ strType + "' " + _sbSqlWhere.ToString());
+ PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "release_no", "asc", "", " and a.order_type='" + strType + "' " + _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
try
{
@@ -486,7 +516,7 @@
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -502,7 +532,7 @@
if (toolBarMenu1.currentAction == "edit") isEdit = true;
if (string.IsNullOrEmpty(strGuid))
{
- ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
var _obj = new
@@ -521,7 +551,7 @@
gvList.Add(gvMx1);
UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList);
string strCk = dy.rkCkId;
- txt_rkCkId.getSuppler(txt_tlOrg.Text.Trim(), strCk);
+ txt_rkCkId.getSuppler(txt_receiveOrgId.Text.Trim(), strCk);
setEable(isEdit);
txtQuantity.Text = dy["fbatchQty"].ToString();
txt_kQty.Text = dy["kdy"].ToString();
@@ -578,11 +608,11 @@
}
}
else
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -638,7 +668,7 @@
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
/// <summary>
@@ -661,7 +691,7 @@
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1, "releaseNo");
if (string.IsNullOrEmpty(rowGuid))
{
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鎿嶄綔鍚楋紵"))
@@ -676,9 +706,9 @@
"MesQaItemsDetect01Manager/" + _meth,
JsonConvert.SerializeObject(_obj));
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnData.outMsg);
if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
{
+ MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnData.outMsg);
if (xtraTabControl1.SelectedTabPageIndex == 1)
{
getModel(lbGuid.Text.Trim(), "0");
@@ -689,10 +719,12 @@
int _inFieldValue = (_meth == "EditModelSubmit" ? 1 : -1);
UtilityHelper.SetCheckIco(gridView1, "fsubmitTxt", "", "iqcDate", picCheckBox, parentForm, _inFieldValue.ToString());
}
+ else
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnData.outMsg);
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
--
Gitblit v1.9.3