From e70362b2c95d25269c650153ce7fc56b883f2631 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期六, 14 十二月 2024 16:52:10 +0800
Subject: [PATCH] 生产退料
---
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs | 125 +++++++++++++++++++++++------------------
1 files changed, 71 insertions(+), 54 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs
index 2b46c9a..0abedb6 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs
@@ -29,47 +29,26 @@
toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
- gridView1.FocusedRowChanged += (s, e) =>
- {
- UtilityHelper.SetCheckIco(s, picCheckBox, this, "status", "");
- };
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1, picCheckBox, this, "status", "");
getPageList(1);
- Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1);
pageBar1.PagerEvent += PageBar1_PagerEvent;
- gridView1.CustomDrawRowIndicator += (s, e) =>
- {
- if (e.Info.IsRowIndicator && e.RowHandle >= 0)
- {
- e.Info.DisplayText = (e.RowHandle + 1).ToString();
- }
- };
- gridView1.CustomDrawEmptyForeground += (s, e) =>
- {
- string str = "鏆傛湭鏌ユ壘鍒板尮閰嶇殑鏁版嵁!";
- Font f = new Font("寰蒋闆呴粦", 16);
- Rectangle r = new Rectangle(gridView1.GridControl.Width / 2 - 100, e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5);
- e.Graphics.DrawString(str, f, Brushes.Gray, r);
- };
- _setIno();
- }
- private async void GridView1_ColumnFilterChanged(object sender, EventArgs e)
- {
- _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
- await Task.Delay(100);
- getPageList(1);
- }
- private void _setIno()
- {
- this.txt_itemId.KeyFile = "id";
- this.txt_suppId.KeyFile = "id";
txt_itemId.EditChanged += (s, e) =>
{
txt_itemNo.Text = this.txt_itemId.GetCode();
- //var ItemId = this.txt_itemId.GetId();
- //var ItemName = this.txt_itemId.GetName();
- //GetCount(ItemId, ItemName);
+ };
+ txt_suppId.getSuppler("");
+ txt_suppId.EditChanged += (s, e) =>
+ {
+ txtGysNo.Text = this.txt_suppId.GetCode();
};
}
+ private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
+ {
+ _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
+ Task.Delay(100);
+ getPageList(1);
+ }
+
/// <summary>
/// 鍙屽嚮浜嬩欢
/// </summary>
@@ -168,7 +147,6 @@
/// <param name="e"></param>
private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
{
-
if (xtraTabControl1.SelectedTabPageIndex == 1)
getModel(lbGuid.Text.Trim(), false, 999);
else
@@ -209,13 +187,6 @@
UtilityHelper.JumpToTab(xtraTabControl1, 1);
lbGuid.Text = "";
UtilityHelper.CleanValueByControl(this.panel1.Controls, true);
- txt_createBy.Enabled = false;
- txt_createDate.Enabled = false;
- txt_lastupdateBy.Enabled = false;
- txt_lastupdateDate.Enabled = false;
- txt_checkUser.Enabled = false;
- txt_checkDate.Enabled = false;
- txt_status.Enabled = false;
}
/// <summary>
/// 淇濆瓨浜嬩欢
@@ -269,15 +240,15 @@
/// </summary>
/// <param name="curPage">绗嚑椤�</param>
/// <param name="pageSize">姣忛〉鍑犳潯</param>
- private async void getPageList(int curPage)
+ private void getPageList(int curPage)
{
- UcLoading _loading = new UcLoading();
+
var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.create_date", "asc", "", _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
try
{
- var strReturn = await UtilityHelper.HttpPostAsync("", _webServiceName + "GetListPage", json);
+ var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetListPage", json);
ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn);
if (dd.rtnCode > 0)
{
@@ -305,7 +276,7 @@
{
ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
- _loading.Stop();
+
}
/// <summary>
///
@@ -354,11 +325,7 @@
/// <exception cref="NotImplementedException"></exception>
private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e)
{
- toolBarMenu1.guidKey = "";
- string rowGuid, rowName;
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_itemNo, gridView1);
- toolBarMenu1.guidKey = rowGuid;
+ _toolCk(0);
}
/// <summary>
@@ -368,11 +335,61 @@
/// <param name="e"></param>
private void ToolBarMenu1_btnChkClick(object sender, EventArgs e)
{
+ _toolCk(1);
+ }
+
+ /// <summary>
+ /// 宸ュ叿鏉′簨浠�
+ /// </summary>
+ /// <param name="inFieldValue"></param>
+ private void _toolCk(int _inFieldValue)
+ {
+ string strMsg = "";
+ switch (_inFieldValue)
+ {
+ case 1:
+ strMsg = "瀹℃牳";
+ break;
+ case 0:
+ strMsg = "鍙嶅鏍�";
+ break;
+ };
toolBarMenu1.guidKey = "";
string rowGuid, rowName;
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_itemNo, gridView1);
- toolBarMenu1.guidKey = rowGuid;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1, "itemName");
+ if (string.IsNullOrEmpty(rowGuid))
+ {
+ MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ return;
+ }
+ if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵"))
+ return;
+
+ var _obj = new
+ {
+ guid = rowGuid,
+ ckValue = _inFieldValue,
+ parameter = "MES_QA_MJ,CHECK_DATE,STATUS,CHECK_USER"
+ };
+ try
+ {
+ var strJson = UtilityHelper.HttpPost("", "General/GeneralCheck",
+ JsonConvert.SerializeObject(_obj));
+ var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+ MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
+ if (_rtn.rtnCode > 0)
+ {
+ if (xtraTabControl1.SelectedTabPageIndex == 1)
+ getModel(lbGuid.Text.Trim(), false, 999);
+ else
+ getPageList(1);
+ }
+ }
+ catch (Exception ex)
+ {
+ MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ }
+
}
}
}
\ No newline at end of file
--
Gitblit v1.9.3