From 906f79ff500541dda3626f12c1a05f2d2e57f7a8 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期一, 23 六月 2025 10:46:30 +0800
Subject: [PATCH] 超期重检

---
 DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs |   85 +++++++++++++++++++++++-------------------
 1 files changed, 46 insertions(+), 39 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs b/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs
index 9ba2217..4aa4936 100644
--- a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs
+++ b/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs
@@ -1,15 +1,11 @@
-锘縰sing DevExpress.XtraEditors;
-using Gs.DevApp.Entity;
+锘縰sing Gs.DevApp.Entity;
 using Gs.DevApp.ToolBox;
 using Gs.DevApp.UserControl;
 using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 
@@ -17,7 +13,7 @@
 {
     public partial class Frm_Cqfa : DevExpress.XtraEditors.XtraForm
     {
-        string _webServiceName = "MesCgthSqManager/";
+        string _webServiceName = "RkqcfaManager/";
         List<FilterEntity> _filterList = new List<FilterEntity>();
         string _ucGys = "";//渚涘簲鍟�
         public Frm_Cqfa()
@@ -34,7 +30,7 @@
             toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
             this.toolBarMenu1.getXmlConfig();
             Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
-            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "status", "", (value) =>
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "checkStatus", "", (value) =>
             {
                 Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
             }, tips);
@@ -167,7 +163,7 @@
         {
             string rowGuid = "", rowName = "";
             (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
-                lbGuid, txt_fabm, gridView1, "billNo");
+                lbGuid, txt_fabm, gridView1, "fabm");
             if (string.IsNullOrEmpty(rowGuid))
             {
                 MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -178,7 +174,7 @@
             var _obj = new
             {
                 guid = rowGuid,
-                mxGuid = Guid.Empty.ToString(),
+                mxGuid = "",
             };
             try
             {
@@ -201,7 +197,6 @@
             {
                 MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
             }
-
         }
 
         /// <summary>
@@ -239,13 +234,15 @@
                 lbGuid, txt_fabm, gridView1);
             if (string.IsNullOrEmpty(rowGuid))
             {
-                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
                 return;
             }
             Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
             if (xtraTabControl1.SelectedTabPageIndex == 1)
             {
                 getModel(rowGuid);
+                txt_fabm.ReadOnly = true;
+                txt_fSubsidiary.Enabled = false;
             }
             else
             {
@@ -268,8 +265,7 @@
             UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews);
             Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
             //澧炲姞鏃讹紝榛樿缁勭粐
-            string deftOrg = UtilityHelper.GetFirstOrg(txt_thOrgId);
-
+            string deftOrg = UtilityHelper.GetFirstOrg(txt_fSubsidiary);
         }
         /// <summary>
         /// 淇濆瓨浜嬩欢
@@ -279,11 +275,25 @@
         private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
         {
             toolBarMenu1.isSetBtn = false;
+            string _fabm = txt_fabm.Text.Trim();
             string _famc = txt_famc.Text.Trim();
             string _yjrq = txt_yjrq.Text.Trim();
             string _bzqx = txt_bzqx.Text.Trim();
             string _fjxz = txt_fjxz.Text.Trim();
             string _bz = txt_bz.Text.Trim();
+            string _fSubsidiary = txt_fSubsidiary.GetId();
+            if (string.IsNullOrEmpty(_fSubsidiary))
+            {
+                MsgHelper.ShowError("缁勭粐涓嶈兘涓虹┖锛�");
+                txt_fSubsidiary.Focus();
+                return;
+            }
+            if (string.IsNullOrEmpty(_famc))
+            {
+                MsgHelper.ShowError("鏂规缂栫爜涓嶈兘涓虹┖锛�");
+                txt_fabm.Focus();
+                return;
+            }
             if (string.IsNullOrEmpty(_famc))
             {
                 MsgHelper.ShowError("鍚嶇О涓嶈兘涓虹┖锛�");
@@ -310,22 +320,19 @@
             }
             var _obj = new
             {
-                guid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(lbGuid.Text.Trim()), //鍒拌揣鍗曚富閿�
-                yjrq = int.Parse(_yjrq),
-                bzqx = int.Parse(_bzqx),
-                fjxz = int.Parse(_fjxz),
+                guid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(lbGuid.Text.Trim()),
+                yjrq = (_yjrq),
+                bzqx = (_bzqx),
+                fjxz = (_fjxz),
                 famc = _famc.Trim(),
+                fabm = _fabm.Trim(),
                 bz = _bz.Trim(),
+                fSubsidiary = _fSubsidiary.Trim(),
                 list = new List<dynamic>(),
             };
             gvMx1.CloseEditor();
             gvMx1.PostEditor();
             gvMx1.UpdateCurrentRow();
-            if (gvMx1.DataRowCount <= 0)
-            {
-                MsgHelper.ShowError("鏄庣粏涓嶈兘涓虹┖锛岃閫夋嫨浣犵殑鏀舵枡鏄庣粏锛�");
-                return;
-            }
             for (var i = 0; i < gvMx1.DataRowCount; i++)
             {
                 var row = gvMx1.GetDataRow(i);
@@ -378,7 +385,7 @@
             }
             catch (Exception ex)
             {
-                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
 
@@ -390,7 +397,7 @@
         private void getPageList(int curPage)
         {
             gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
-            PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "BILL_NO", "asc", "", _sbSqlWhere.ToString());
+            PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.fabm", "desc", "", _sbSqlWhere.ToString());
             string json = JsonConvert.SerializeObject(pgq);
             try
             {
@@ -476,11 +483,11 @@
                     }
                 }
                 else
-                    ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                    ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
             }
             catch (Exception ex)
             {
-                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
         /// <summary>
@@ -501,7 +508,7 @@
             };
             toolBarMenu1.guidKey = "";
             string rowGuid, rowName;
-            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fabm, gridView1, "billNo");
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fabm, gridView1, "fabm");
             if (string.IsNullOrEmpty(rowGuid))
             {
                 MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -512,29 +519,29 @@
             var _obj = new
             {
                 guid = rowGuid,
-                inFieldValue = _inFieldValue,
+                ckValue = _inFieldValue,
+                parameter = "MES_CQJY_FA,checkDate,checkStatus,checkBy"
             };
             try
             {
-                var strJson = UtilityHelper.HttpPost("",
-                    _webServiceName + "EditModelSubmit",
+                var strJson = UtilityHelper.HttpPost("", "General/GeneralCheck",
                     JsonConvert.SerializeObject(_obj));
                 var _rtn = UtilityHelper.ReturnToDynamic(strJson);
-                MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
-                if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
+                if (_rtn.rtnCode > 0)
                 {
+                    MsgHelper.ShowInformation(_rtn.rtnData.outMsg.ToString());
                     if (xtraTabControl1.SelectedTabPageIndex == 1)
-                    {
                         getModel(lbGuid.Text.Trim());
-                    }
-                    int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
-                    gridView1.FocusedRowHandle = rowHandle;
-                    UtilityHelper.SetCheckIco(gridView1, "status", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString());
+                    else
+                        getPageList(this.pageBar1.CurrentPage);
+                    UtilityHelper.SetCheckIco(gridView1, "checkStatus", "checkBy", "checkDate", picCheckBox, this, _inFieldValue.ToString());
                 }
+                else
+                    MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString());
             }
             catch (Exception ex)
             {
-                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
             }
         }
 

--
Gitblit v1.9.3