From 437425784b7612e10d4a54bd64905c508347514d Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 06 五月 2025 15:12:50 +0800
Subject: [PATCH] fqc

---
 DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs |  178 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 167 insertions(+), 11 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs b/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs
index e87c1ad..3f8d670 100644
--- a/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs
+++ b/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs
@@ -14,6 +14,7 @@
 {
     public partial class Frm_FqcDetect01 : DevExpress.XtraEditors.XtraForm
     {
+        string _strTag= "N:涓嶅悎鏍�";
         string _webServiceName = "FqcManager/";
         List<FilterEntity> _filterList = new List<FilterEntity>();
         public Frm_FqcDetect01()
@@ -70,7 +71,6 @@
                         txt_lineId.Text = lst[0].lineId;
                         txt_checkStates.Text = "W:鏈煡";
                         txt_fcheckResu.Text = "W:鏈煡";
-                        txt_freceQty.Text = "W:鏈煡";
                     }
                     catch (Exception ex)
                     {
@@ -314,14 +314,70 @@
             }
             if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鎻愪氦妫�楠屽悧锛�"))
                 return;
-            if (txt_fcheckResu.Text.Trim() == "涓嶅悎鏍�")
+            if (txt_fcheckResu.Text.Trim() == _strTag)
             {
                 if (string.IsNullOrEmpty(txt_msg.TextTxt.Trim()))
                 {
                     MsgHelper.Warning("鍗曟嵁涓轰笉鍚堟牸鏃讹紝璇峰~鍐欒繚瑙勪俊鎭紒");
                     return;
                 }
+                string _txt_fngHandle = txt_fngHandle.Text.Trim();
+                string _txt_fmrmode = txt_fmrmode.GetCode();
+                string _txt_fzrId = txt_fzrId.GetId();
+                string _txt_workNo = txt_workNo.Text.Trim();
+                string _txt_msg = txt_msg.TextTxt;
+                string _txt_zrType = txt_zrType.Text.Trim();
+                if (txt_fngHandle.SelectedIndex <= 0)
+                {
+                    Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨澶勭疆缁撴灉锛�");
+                    txt_fngHandle.Focus();
+                    return;
+                }
+                if (txt_zrType.SelectedIndex <= 0)
+                {
+                    Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璐d换鍒ゅ畾锛�");
+                    txt_zrType.Focus();
+                    return;
+                }
+                if (_txt_fzrId.Length <= 0)
+                {
+                    Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨璐d换浜猴紒");
+                    txt_fzrId.Focus();
+                    return;
+                }
+                //褰撳缃粨鏋滀负鍙嶅伐鏃讹紝瑕侀�夋嫨宸ュ簭鍜屽弽宸ョ紪鍙�
+                if (txt_fngHandle.SelectedIndex == 1)
+                {
+                    if (string.IsNullOrEmpty(_txt_workNo))
+                    {
+                        Gs.DevApp.ToolBox.MsgHelper.Warning("璇峰~鍐欏弽宸ュ崟鍙凤紒");
+                        txt_workNo.Focus();
+                        return;
+                    }
+                    if (string.IsNullOrEmpty(_txt_fmrmode))
+                    {
+                        Gs.DevApp.ToolBox.MsgHelper.Warning("璇峰~閫夋嫨鍙嶅伐宸ュ簭锛�");
+                        txt_fmrmode.Focus();
+                        return;
+                    }
+                }
+                else
+                {
+                    if (!string.IsNullOrEmpty(_txt_workNo))
+                    {
+                        Gs.DevApp.ToolBox.MsgHelper.Warning("涓嶉渶瑕佸~鍐欏弽宸ュ崟鍙凤紒");
+                        txt_workNo.Focus();
+                        return;
+                    }
+                    if (!string.IsNullOrEmpty(_txt_fmrmode))
+                    {
+                        Gs.DevApp.ToolBox.MsgHelper.Warning("涓嶉渶瑕侀�夋嫨鍙嶅伐宸ュ簭锛�");
+                        txt_fmrmode.Focus();
+                        return;
+                    }
+                }
             };
+
             var _obj = new
             {
                 guid = rowGuid,
@@ -498,18 +554,114 @@
                 txt_djType.Focus();
                 return;
             }
-            if (string.IsNullOrEmpty(_txt_fbatchQty.Trim()))
-            {
-                Gs.DevApp.ToolBox.MsgHelper.Warning("鎶芥鏁伴噺涓嶈兘涓虹┖锛�");
-                txt_fbatchQty.Focus();
-                return;
-            }
             if (string.IsNullOrEmpty(_txt_lotNo.Trim()))
             {
                 Gs.DevApp.ToolBox.MsgHelper.Warning("宸ュ崟鍙蜂笉鑳戒负绌猴紒");
                 txt_lotNo.Focus();
                 return;
             }
+            if (string.IsNullOrEmpty(_kbList.Trim()))
+            {
+                Gs.DevApp.ToolBox.MsgHelper.Warning("閫佹绠辩爜涓嶈兘涓虹┖锛�");
+                txt_kbList.Focus();
+                return;
+            }
+            if (string.IsNullOrEmpty(txt_kbSl.Text.Trim()))
+            {
+                Gs.DevApp.ToolBox.MsgHelper.Warning("閫佹鏁伴噺涓嶈兘涓虹┖锛�");
+                txt_kbList.Focus();
+                return;
+            }
+            if (string.IsNullOrEmpty(_txt_fbatchQty.Trim()))
+            {
+                Gs.DevApp.ToolBox.MsgHelper.Warning("鎶芥鏁伴噺涓嶈兘涓虹┖锛�");
+                txt_fbatchQty.Focus();
+                return;
+            }
+            if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric2(_txt_fbatchQty))
+            {
+                Gs.DevApp.ToolBox.MsgHelper.Warning("璇疯緭鍏ユ纭殑鎶芥鏁伴噺锛�");
+                txt_fbatchQty.Focus();
+                return;
+            }
+            if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric2(txt_kbSl.Text.Trim()))
+            {
+                Gs.DevApp.ToolBox.MsgHelper.Warning("璇疯緭鍏ユ纭殑閫佹鏁伴噺锛�");
+                txt_kbList.Focus();
+                return;
+            }
+            if (Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(_txt_fbatchQty) > Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_kbSl.Text.Trim()))
+            {
+                Gs.DevApp.ToolBox.MsgHelper.Warning("鎶芥鏁伴噺涓嶈兘澶т簬閫佹鏁伴噺锛�");
+                txt_fbatchQty.Focus();
+                return;
+            }
+            //褰撲笉鍚堟牸鏃剁殑妫�鏌�
+            string _txt_fngHandle = txt_fngHandle.Text.Trim();
+            string _txt_fmrmode = txt_fmrmode.GetCode();
+            string _txt_fzrId = txt_fzrId.GetId();
+            string _txt_workNo = txt_workNo.Text.Trim();
+            string _txt_zrType = txt_zrType.Text.Trim();
+            if (txt_fcheckResu.Text.Trim() == _strTag)
+            {
+                if (string.IsNullOrEmpty(txt_msg.TextTxt.Trim()))
+                {
+                    MsgHelper.Warning("褰撲笉鍚堟牸鏃讹紝璇峰~鍐欒繚瑙勪俊鎭紒");
+                    txt_msg.Focus();
+                    return;
+                }
+               
+                if (txt_fngHandle.SelectedIndex <= 0)
+                {
+                    Gs.DevApp.ToolBox.MsgHelper.Warning("褰撲笉鍚堟牸鏃讹紝璇烽�夋嫨澶勭疆缁撴灉锛�");
+                    txt_fngHandle.Focus();
+                    return;
+                }
+                if (txt_zrType.SelectedIndex <= 0)
+                {
+                    Gs.DevApp.ToolBox.MsgHelper.Warning("褰撲笉鍚堟牸鏃讹紝璇烽�夋嫨璐d换鍒ゅ畾锛�");
+                    txt_zrType.Focus();
+                    return;
+                }
+                if (_txt_fzrId.Length <= 0)
+                {
+                    Gs.DevApp.ToolBox.MsgHelper.Warning("褰撲笉鍚堟牸鏃讹紝璇烽�夋嫨璐d换浜猴紒");
+                    txt_fzrId.Focus();
+                    return;
+                }
+                //褰撳缃粨鏋滀负鍙嶅伐鏃讹紝瑕侀�夋嫨宸ュ簭鍜屽弽宸ョ紪鍙�
+                if (txt_fngHandle.SelectedIndex == 1)
+                {
+                    if (string.IsNullOrEmpty(_txt_workNo))
+                    {
+                        Gs.DevApp.ToolBox.MsgHelper.Warning("褰撲笉鍚堟牸鏃讹紝璇峰~鍐欏弽宸ュ崟鍙凤紒");
+                        txt_workNo.Focus();
+                        return;
+                    }
+                    if (string.IsNullOrEmpty(_txt_fmrmode))
+                    {
+                        Gs.DevApp.ToolBox.MsgHelper.Warning("褰撲笉鍚堟牸鏃讹紝璇峰~閫夋嫨鍙嶅伐宸ュ簭锛�");
+                        txt_fmrmode.Focus();
+                        return;
+                    }
+                }
+                else
+                {
+                    if (!string.IsNullOrEmpty(_txt_workNo))
+                    {
+                        Gs.DevApp.ToolBox.MsgHelper.Warning("涓嶉渶瑕佸~鍐欏弽宸ュ崟鍙凤紒");
+                        txt_workNo.Focus();
+                        return;
+                    }
+                    if (!string.IsNullOrEmpty(_txt_fmrmode))
+                    {
+                        Gs.DevApp.ToolBox.MsgHelper.Warning("涓嶉渶瑕侀�夋嫨鍙嶅伐宸ュ簭锛�");
+                        txt_fmrmode.Focus();
+                        return;
+                    }
+                }
+            };
+
             var _obj = new
             {
                 guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
@@ -525,8 +677,12 @@
                 fmanageNo = _txt_fmanageNo,//娴佺▼缂栧彿
                 lotNo1 = _txt_lotNo1,//閫佹鎵瑰彿
                 lotNo = _txt_lotNo,//鐢熶骇宸ュ崟
-                edtType = 0,
                 kbList = _kbList,
+                fngHandle = _txt_fngHandle,
+                fzrId = _txt_fzrId,
+                workNo = _txt_workNo,
+                fmrmode = _txt_fmrmode,
+                zrType = _txt_zrType,
                 list = new List<dynamic>(),
             };
             gvMx1.CloseEditor();
@@ -541,7 +697,7 @@
                     string _defectLevel = row["defectLevel"].ToString();
                     string _defectDetails = row["defectDetails"].ToString();
                     string _fcheckResu = row["fcheckResu"].ToString();
-                    if (_fcheckResu == "涓嶅悎鏍�")
+                    if (_fcheckResu == _strTag)
                     {
                         if (string.IsNullOrEmpty(_defectLevel))
                         {
@@ -592,7 +748,7 @@
         /// <param name="pageSize">姣忛〉鍑犳潯</param>
         private void getPageList(int curPage)
         {
-            gcMain1.DataSource = null;var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+            gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
             // _sbSqlWhere += " and isnull(fsubmit,0)=0";
             PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "release_no", "asc", "", _sbSqlWhere.ToString());
             string json = JsonConvert.SerializeObject(pgq);

--
Gitblit v1.9.3