From ea50621dfa910d663d37a56e402a667c6f52d869 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期一, 28 十月 2024 16:35:42 +0800
Subject: [PATCH] 来料检验申请页面
---
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 163 insertions(+), 7 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs
index cfebf8c..dc60933 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmAql1.cs
@@ -1,5 +1,6 @@
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
+using Gs.DevApp.DevFrm.QC.Models;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
@@ -26,6 +27,10 @@
this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
+ toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
+ toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
+ toolBarMenu1.btnPiZhunClick += ToolBarMenu1_btnPiZhunClick;
+
gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
getPageList(1, UtilityHelper.GetPageSize());
pageBar1.PagerEvent += PageBar1_PagerEvent;
@@ -43,6 +48,60 @@
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);
};
+ }
+
+ private void ToolBarMenu1_btnPiZhunClick(object sender, EventArgs e)
+ {
+ //鎵瑰噯
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_sampleSizeNo, gridView1);
+
+ try
+ {
+ string strJson = UtilityHelper.HttpPost("", _webServiceName + "Approval", JsonConvert.SerializeObject(rowGuid));
+ ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+ if (_rtn.rtnCode > 0)
+ {
+ UtilityHelper.JumpToTab(xtraTabControl1, 0);
+ getPageList(1, UtilityHelper.GetPageSize());
+ }
+ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ }
+ catch (Exception ex)
+ {
+ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ }
+
+ }
+
+ /// <summary>
+ /// 鍙嶅鏍�
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ /// <exception cref="NotImplementedException"></exception>
+ private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e)
+ {
+ toolBarMenu1.guidKey = "";
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_sampleSizeNo, gridView1);
+ toolBarMenu1.guidKey = rowGuid;
+ }
+
+ /// <summary>
+ /// 瀹℃牳浜嬩欢
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ private void ToolBarMenu1_btnChkClick(object sender, EventArgs e)
+ {
+ toolBarMenu1.guidKey = "";
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_sampleSizeNo, gridView1);
+ toolBarMenu1.guidKey = rowGuid;
}
/// <summary>
@@ -105,7 +164,7 @@
private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e)
{
string rowGuid = "", rowName = "";
- // (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1);
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_sampleSizeNo, gridView1);
if (string.IsNullOrEmpty(rowGuid))
{
ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -151,7 +210,7 @@
private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
{
string rowGuid = "", rowName = "";
- // (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1);
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_sampleSizeNo, gridView1);
if (string.IsNullOrEmpty(rowGuid))
{
ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -168,10 +227,30 @@
{
UtilityHelper.JumpToTab(xtraTabControl1, 1);
lbGuid.Text = "";
- List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+
+ List<GridView> gridViews = new List<GridView>();
gridViews.Add(gvMx1);
UtilityHelper.CleanValueByControl(this.panel1.Controls, true, gridViews);
- Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
+ UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
+
+ txt_createDate.Text = DateTime.Now.ToString("G");
+ txt_createDate.Enabled = false;
+
+ txt_ftwoChecked.Text = "False";
+ txt_ftwoChecked.Enabled = false;
+ txt_isenabled.Text = "False";
+ txt_isenabled.Enabled = false;
+ txt_foneChecked.Text = "False";
+ txt_foneChecked.Enabled = false;
+
+ txt_createName.Enabled = false;
+ txt_foneCheckor.Enabled = false;
+ txt_ftwoCheckor.Enabled = false;
+
+ txt_ftwoCheckdate.Enabled = false;
+ txt_foneCheckdate.Enabled = false;
+
+ txt_fversion.Text = "1";
}
/// <summary>
/// 淇濆瓨浜嬩欢
@@ -187,11 +266,88 @@
txt_sampleSizeNo.Focus();
return;
}
- var _obj = new
- {
- guid = lbGuid.Text.Trim(),//涓诲缓
+ if (string.IsNullOrEmpty(txt_sampleSizeName.Text.Trim()))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("鏍囧噯鍚嶇О涓嶈兘涓虹┖锛�");
+ txt_sampleSizeName.Focus();
+ return;
+ }
+
+ gvMx1.CloseEditor();
+ gvMx1.UpdateCurrentRow();
+
+ gvMx2.CloseEditor();
+ gvMx2.UpdateCurrentRow();
+
+ var qmaql2 = new List<MesQmAql2>();
+ for (var i = 0; i < gvMx1.DataRowCount; i++)
+ {
+ var row = gvMx1.GetDataRow(i);
+ if (row != null)
+ qmaql2.Add(new MesQmAql2
+ {
+ Guid = UtilityHelper.ToGuid(row["Guid"].ToString()),
+ LotFrom = Convert.ToInt32(row["LotFrom"].ToString()),
+ LotTo = Convert.ToInt32(row["LotTo"].ToString()),
+ FlevelS1 = row["FlevelS1"].ToString(),
+ FlevelS2 = row["FlevelS2"].ToString(),
+ FlevelS3 = row["FlevelS3"].ToString(),
+ FlevelS4 = row["FlevelS4"].ToString(),
+ FlevelI = row["FlevelI"].ToString(),
+ FlevelIi = row["FlevelIi"].ToString(),
+ FlevelIii = row["FlevelIii"].ToString(),
+ Memo = row["Memo"].ToString()
+ });
+ }
+
+ var qmaql3 = new List<MesQmAql3>();
+ for (var i = 0; i < gvMx2.DataRowCount; i++)
+ {
+ var row = gvMx2.GetDataRow(i);
+ if (row != null)
+ qmaql3.Add(new MesQmAql3
+ {
+ Guid = UtilityHelper.ToGuid(row["Guid"].ToString()),
+ FsampleSizeWord = Convert.ToInt32(row["FsampleSizeWord"].ToString()),
+ SampleSizeWord = row["SampleSizeWord"].ToString(),
+ Aql00010 = Convert.ToInt32(row["Aql00010"].ToString()),
+ Aql00015 = Convert.ToInt32(row["Aql00015"].ToString()),
+ Aql00025 = Convert.ToInt32(row["Aql00025"].ToString()),
+ Aql00040 = Convert.ToInt32(row["Aql00040"].ToString()),
+ Aql00065 = Convert.ToInt32(row["Aql00065"].ToString()),
+ Aql0010 = Convert.ToInt32(row["Aql0010"].ToString()),
+ Aql0015 = Convert.ToInt32(row["Aql0015"].ToString()),
+ Aql0025 = Convert.ToInt32(row["Aql0025"].ToString()),
+ Aql0040 = Convert.ToInt32(row["Aql0040"].ToString()),
+ Aql0065 = Convert.ToInt32(row["Aql0065"].ToString()),
+ Aql0100 = Convert.ToInt32(row["Aql0100"].ToString()),
+ Aql0150 = Convert.ToInt32(row["Aql0150"].ToString()),
+ Aql0250 = Convert.ToInt32(row["Aql0250"].ToString()),
+ Aql0400 = Convert.ToInt32(row["Aql0400"].ToString()),
+ Aql0650 = Convert.ToInt32(row["Aql0650"].ToString()),
+ Aql1000 = Convert.ToInt32(row["Aql1000"].ToString()),
+ Memo = row["Memo"].ToString()
+ });
+ }
+
+ var _obj = new MesQmAql1
+ {
+ Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()),
+ SampleSizeNo = txt_sampleSizeNo.Text.Trim(),
+ SampleSizeName = txt_sampleSizeName.Text.Trim(),
+ Memo = txt_memo.Text.Trim(),
+ CreateDate = DateTime.Now,
+ FtwoChecked = false,
+ Isenabled = false,
+ FoneChecked = false,
+ Fversion = Convert.ToInt32(txt_fversion.Text.Trim()),
+
+ MesQmAql2s = qmaql2,
+ MesQmAql3s = qmaql3
};
+
+
try
{
string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
--
Gitblit v1.9.3