From ef4f463dc38d0934c2fce5d0eded7844a3726ca4 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期五, 22 十一月 2024 16:53:40 +0800
Subject: [PATCH] 采购到货
---
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs | 50 ++++++++++++++++++++++++++++++++++++++------------
1 files changed, 38 insertions(+), 12 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs
index a9243a2..475319a 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs
@@ -1,3 +1,4 @@
+using DevExpress.RichEdit.Export;
using Gs.DevApp.DevFrm.QC.Models;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
@@ -24,11 +25,13 @@
this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
-
toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
-
gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
+ gridView1.FocusedRowChanged += (s, e) =>
+ {
+ UtilityHelper.SetCheckIco(s, picCheckBox, this, "status", "");
+ };
getPageList(1, UtilityHelper.GetPageSize());
pageBar1.PagerEvent += PageBar1_PagerEvent;
gridView1.CustomDrawRowIndicator += (s, e) =>
@@ -45,8 +48,20 @@
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 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);
+ };
+ }
/// <summary>
/// 鍙屽嚮浜嬩欢
/// </summary>
@@ -142,8 +157,10 @@
/// <param name="e"></param>
private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
{
- UtilityHelper.JumpToTab(xtraTabControl1, 0);
- getPageList(1, UtilityHelper.GetPageSize());
+ if (xtraTabControl1.SelectedTabPageIndex == 1)
+ getModel(lbGuid.Text.Trim(), false, 999);
+ else
+ getPageList(1, UtilityHelper.GetPageSize());
}
/// <summary>
/// 淇敼浜嬩欢
@@ -189,17 +206,26 @@
private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
{
toolBarMenu1.isSetBtn = false;
- if (string.IsNullOrEmpty(txt_itemNo.Text.Trim()))
+ string _ItemId = txt_itemId.GetId();
+ string _suppNo = txt_suppId.GetId();
+ if (string.IsNullOrEmpty(_ItemId))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("鐗╂枡缂栫爜涓嶈兘涓虹┖锛�");
- // txt_account.Focus();
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鐗╂枡锛�");
+ txt_itemId.Focus();
+ return;
+ }
+ if (string.IsNullOrEmpty(_suppNo))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨渚涘簲鍟嗭紒");
+ txt_suppId.Focus();
return;
}
var _obj = new MesQaMj
{
Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
- ItemId = Convert.ToInt32(txt_itemId.Text.Trim()),
- ItemNo = txt_itemNo.Text.Trim(),
+ ItemId = Convert.ToInt32(_ItemId),
+ ItemNo = txt_itemId.GetCode(),
+ SuppId = _suppNo,
};
try
{
@@ -310,7 +336,7 @@
toolBarMenu1.guidKey = "";
string rowGuid, rowName;
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_itemId, gridView1);
+ lbGuid, txt_itemNo, gridView1);
toolBarMenu1.guidKey = rowGuid;
}
@@ -324,7 +350,7 @@
toolBarMenu1.guidKey = "";
string rowGuid, rowName;
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_itemId, gridView1);
+ lbGuid, txt_itemNo, gridView1);
toolBarMenu1.guidKey = rowGuid;
}
}
--
Gitblit v1.9.3