From e740617f4c4009642a3097afda28d557984f40e1 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期五, 05 九月 2025 08:28:34 +0800
Subject: [PATCH] bug
---
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs | 79 ++++++++++++++++++++++++++-------------
1 files changed, 52 insertions(+), 27 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
index 667d8df..9b68dc3 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
@@ -1,4 +1,5 @@
using DevExpress.Pdf.Native.BouncyCastle.Utilities.Collections;
+using DevExpress.XtraLayout.Customization;
using DevExpress.XtraRichEdit.API.Native;
using Gs.DevApp.DevFrm.QC;
using Gs.DevApp.Entity;
@@ -25,10 +26,20 @@
/// <summary>
/// 瀹氭椂鍒锋柊
/// </summary>
- System.Timers.Timer timer = new System.Timers.Timer(1000);
+ System.Timers.Timer timer;
+
public Frm_MesQaItemsDetect01()
{
InitializeComponent();
+
+ #region 璁剧疆鏃堕棿
+ int int32 = 3000;
+ string _vanishingSeconds = ConfigurationManager.AppSettings["IqcGetWeight"];
+ if (!string.IsNullOrEmpty(_vanishingSeconds))
+ int32 = int.Parse(_vanishingSeconds);
+ timer = new System.Timers.Timer(int32);
+ #endregion
+
this.toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick;
this.toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick;
this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
@@ -61,6 +72,7 @@
gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged;
btnIpt.Click += BtnIpt_Click;
btnYcReport.Click += BtnYcReport_Click;
+ #region 浜旀閲嶉噺
//鍏抽棴鏃堕噴鏀総imer
this.Disposed += (s, e) =>
{
@@ -91,7 +103,7 @@
}
catch (Exception ex)
{
-
+ Gs.DevApp.ToolBox.LogHelper.Debug(this.ToString(), "WorkWeight/GetIqcWeight:" + ex.Message);
}
};
timer.AutoReset = true; // 璁剧疆涓簍rue琛ㄧず閲嶅鎵ц锛宖alse琛ㄧず鎵ц涓�娆″悗鍋滄
@@ -112,27 +124,27 @@
ToolBox.MsgHelper.ShowError("璇锋鏌ョО閲嶈缃紒");
return;
}
- if (txtW1.Text.Trim().Length <= 0)
+ if (txt_weight1.Text.Trim().Length <= 0)
{
_setWeigth(1, _strCurrent);
return;
}
- if (txtW2.Text.Trim().Length <= 0)
+ if (txt_weight2.Text.Trim().Length <= 0)
{
_setWeigth(2, _strCurrent);
return;
}
- if (txtW3.Text.Trim().Length <= 0)
+ if (txt_weight3.Text.Trim().Length <= 0)
{
_setWeigth(3, _strCurrent);
return;
}
- if (txtW4.Text.Trim().Length <= 0)
+ if (txt_weight4.Text.Trim().Length <= 0)
{
_setWeigth(4, _strCurrent);
return;
}
- if (txtW5.Text.Trim().Length <= 0)
+ if (txt_weight5.Text.Trim().Length <= 0)
{
_setWeigth(5, _strCurrent);
return;
@@ -143,9 +155,13 @@
//娓呯┖
this.btnClean.Click += (s, e) =>
{
- _setWeigth(1, "");
- this.txtW1.Text = this.txtW2.Text = this.txtW3.Text = this.txtW4.Text = this.txtW5.Text = "";
+ if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + txt_releaseNo.Text.Trim() + "銆戯紝纭畾娓呴櫎鎵�鏈夌О閲嶆暟鎹悧锛�"))
+ return;
+ _setWeigth(99, "");
+
};
+ #endregion
+
}
/// <summary>
/// 鎻愪氦绉伴噸
@@ -162,7 +178,7 @@
};
try
{
- var strReturn = UtilityHelper.HttpPost("", "WorkWeight/EditIqc", JsonConvert.SerializeObject(_obj), false);
+ var strReturn = UtilityHelper.HttpPost("", "WorkWeight/EditIqcWeight", JsonConvert.SerializeObject(_obj), false);
var dd = UtilityHelper.ReturnToDynamic(strReturn);
if (dd.rtnCode <= 0)
{
@@ -172,27 +188,32 @@
{
if (_weightType == 1)
{
- txtW1.Text = _weight;
+ txt_weight1.Text = _weight;
return;
}
if (_weightType == 2)
{
- txtW2.Text = _weight;
+ txt_weight2.Text = _weight;
return;
}
if (_weightType == 3)
{
- txtW3.Text = _weight;
+ txt_weight3.Text = _weight;
return;
}
if (_weightType == 4)
{
- txtW4.Text = _weight;
+ txt_weight4.Text = _weight;
return;
}
if (_weightType == 5)
{
- txtW5.Text = _weight;
+ txt_weight5.Text = _weight;
+ return;
+ }
+ if (_weightType == 99)
+ {
+ this.txt_weight1.Text = this.txt_weight2.Text = this.txt_weight3.Text = this.txt_weight4.Text = this.txt_weight5.Text = "";
return;
}
}
@@ -250,7 +271,7 @@
string strGuid = lbGuid.Text.Trim();
if (string.IsNullOrEmpty(strGuid))
{
- ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
var _obj = new
@@ -272,7 +293,7 @@
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
/// <summary>
@@ -285,7 +306,7 @@
int intHandle = this.gvMx1.FocusedRowHandle;
if (intHandle < 0)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛氳閫夋嫨妫�楠岄」鐩紒");
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛氳閫夋嫨妫�楠岄」鐩紒");
return;
}
if (e.KeyCode == Keys.Enter)
@@ -334,7 +355,7 @@
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
}
@@ -497,7 +518,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);
@@ -525,7 +546,7 @@
toolBarMenu1.isSetBtn = false;
if (txt_fcheckResu.Text.Trim() == _strTag && string.IsNullOrEmpty(txt_fngDesc.TextTxt.Trim()))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("褰撴楠岀粨鏋滀笉鍚堟牸鏃讹紝璇峰~鍐欏娉ㄨ鏄庯紒");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("褰撴楠岀粨鏋滀笉鍚堟牸鏃讹紝璇峰~鍐欏娉ㄨ鏄庯紒");
txt_fngDesc.Focus();
return;
}
@@ -565,7 +586,11 @@
/// <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));
PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "release_no", "asc", "", _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
try
@@ -597,7 +622,7 @@
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -613,7 +638,7 @@
if (toolBarMenu1.currentAction == "edit") isEdit = true;
if (string.IsNullOrEmpty(strGuid))
{
- ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
var _obj = new
@@ -665,11 +690,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);
}
}
@@ -725,7 +750,7 @@
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
/// <summary>
--
Gitblit v1.9.3