From 699d70615b62bd6a04bda7789153373a40716992 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期六, 15 二月 2025 15:12:56 +0800
Subject: [PATCH] 生产入库,其它入库
---
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.cs | 102 ++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 88 insertions(+), 14 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.cs
index 8df7648..8183fc8 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQmCheckitemDt.cs
@@ -225,15 +225,20 @@
private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
{
toolBarMenu1.isSetBtn = false;
- string _ItemId = txt_ItemId.GetId();
+ string _ItemId = txt_itemId.GetId();
if (string.IsNullOrEmpty(_ItemId))
{
MsgHelper.Warning("璇烽�夋嫨鐗╂枡锛�");
- txt_ItemId.Focus();
+ txt_itemId.Focus();
return;
}
gvMx1.CloseEditor();
gvMx1.UpdateCurrentRow();
+ if (gvMx1.DataRowCount <= 0)
+ {
+ MsgHelper.Warning("椤圭洰鏄庣粏涓嶈兘涓虹┖锛�");
+ return;
+ }
try
{
var lst = new List<MesQmCheckitemDt>();
@@ -241,6 +246,64 @@
{
var row = gvMx1.GetDataRow(i);
if (row != null)
+ {
+ if (string.IsNullOrEmpty(row["forder"].ToString()))
+ {
+ MsgHelper.ShowError("椤哄簭涓嶈兘涓虹┖锛�");
+ return;
+ }
+ if (string.IsNullOrEmpty(row["FcheckItem"].ToString()))
+ {
+ MsgHelper.ShowError("妫�楠岄」鐩笉鑳戒负绌猴紒");
+ return;
+ }
+ if (string.IsNullOrEmpty(row["FcheckTool"].ToString()))
+ {
+ MsgHelper.ShowError("妫�楠屽伐鍏蜂笉鑳戒负绌猴紒");
+ return;
+ }
+ if (string.IsNullOrEmpty(row["SampleSizeNo"].ToString()))
+ {
+ MsgHelper.ShowError("妫�楠屾爣鍑嗕笉鑳戒负绌猴紒");
+ return;
+ }
+ if (string.IsNullOrEmpty(row["FcheckLevel"].ToString()))
+ {
+ MsgHelper.ShowError("妫�楠屾按骞充笉鑳戒负绌猴紒");
+ return;
+ }
+ if (string.IsNullOrEmpty(row["FacLevel"].ToString()))
+ {
+ MsgHelper.ShowError("鎺ュ彈姘村钩涓嶈兘涓虹┖锛�");
+ return;
+ }
+ string _Fstand = row["Fstand"].ToString();
+ string _FupAllow = row["FupAllow"].ToString();
+ string _FdownAllow = row["FdownAllow"].ToString();
+ //鍋囧涓変釜閮戒负绌洪�氳繃
+ if (string.IsNullOrEmpty(_Fstand) && string.IsNullOrEmpty(_FupAllow) && string.IsNullOrEmpty(_FdownAllow))
+ {
+
+ }
+ else
+ {
+ if (!string.IsNullOrEmpty(_Fstand) && !string.IsNullOrEmpty(_FupAllow) && !string.IsNullOrEmpty(_FdownAllow))
+ {
+ decimal _Fstand_f = Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(_Fstand);
+ decimal _FupAllow_f = Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(_FupAllow);
+ decimal _FdownAllow_f = Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(_FdownAllow);
+ if (_Fstand_f >= _FdownAllow_f && _Fstand_f <= _FupAllow_f) { }
+ else {
+ MsgHelper.ShowError("鏍囧噯鍊煎繀椤诲湪涓婇檺鍜屼笅闄愪箣闂达紒");
+ return;
+ }
+ }
+ else
+ {
+ MsgHelper.ShowError("璇峰~鍐欐纭殑涓婇檺锛屾爣鍑嗗�硷紝涓嬮檺锛�");
+ return;
+ }
+ }
lst.Add(new MesQmCheckitemDt
{
Guid = UtilityHelper.ToGuid(row["guid"].ToString()),
@@ -256,6 +319,7 @@
FupAllow = row["FupAllow"].ToString(),
FdownAllow = row["FdownAllow"].ToString(),
});
+ }
}
var _obj = new MesQmCheckitem
{
@@ -306,7 +370,7 @@
var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
_sbSqlWhere += " and b.guid is not null";
var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount,
- "a.create_date", "asc", "", _sbSqlWhere.ToString());
+ "org.FNumber asc ,b.item_no asc,a.FVERSION desc", "", "", _sbSqlWhere.ToString());
var json = JsonConvert.SerializeObject(pgq);
try
{
@@ -323,6 +387,7 @@
{
gcMain.DataSource = dt;
gcMain.ForceInitialize();
+ gridView1.BestFitColumns();
}
else
UtilityHelper.SetDefaultTable(gcMain, gridView1);
@@ -340,7 +405,6 @@
{
MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
-
}
private void getModel(string strGuid)
@@ -385,6 +449,7 @@
gcMx1.BindingContext = new BindingContext();
gcMx1.DataSource = dt;
gcMx1.ForceInitialize();
+ gvMx1.BestFitColumns();
}
else
{
@@ -432,7 +497,6 @@
}
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵"))
return;
-
var _obj = new
{
guid = rowGuid,
@@ -448,28 +512,39 @@
if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
{
if (xtraTabControl1.SelectedTabPageIndex == 1)
+ {
getModel(lbGuid.Text.Trim());
- else
- getPageList(this.pageBar1.CurrentPage);
+ }
+ int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
+ gridView1.FocusedRowHandle = rowHandle;
+ UtilityHelper.SetCheckIco(gridView1, "foneChecked", "foneCheckor", "foneCheckdate", picCheckBox, this, _inFieldValue.ToString());
}
}
catch (Exception ex)
{
MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
-
}
-
#region 浠ヤ笅涓虹绉嶄笅鎷�
private void _setIno()
{
- txt_ItemId.EditChanged += (s, e) =>
+ this.txt_fSubsidiary.EditChanged += (s, e) =>
{
- txt_itemModel.Text = this.txt_ItemId.GetModel();
- txt_itemNo.Text = this.txt_ItemId.GetCode();
+ string _orgId = txt_fSubsidiary.GetId();
+ if (string.IsNullOrEmpty(_orgId))
+ return;
+ txt_itemId.getSuppler(_orgId);
+ //txt_gg.Text ="";
+ //txt_itemNo.Text = "";
};
-
+ txt_itemId.EditChanged += (s, e) =>
+ {
+ if (!string.IsNullOrEmpty(this.txt_itemId.GetModel()))
+ txt_gg.Text = this.txt_itemId.GetModel();
+ if (!string.IsNullOrEmpty(this.txt_itemId.GetCode()))
+ txt_itemNo.Text = this.txt_itemId.GetCode();
+ };
_getListJyxm();
_getListJygj();
_getListJybz();
@@ -710,6 +785,5 @@
MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
}
}
-
}
}
\ No newline at end of file
--
Gitblit v1.9.3