From aadc9c5e167801a7e845088ca160642a9e99884d Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 17 六月 2025 18:00:59 +0800
Subject: [PATCH] bug

---
 DevApp/Gs.DevApp/DevFrm/RkQC/Frm_RkDetect01.cs |  691 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 691 insertions(+), 0 deletions(-)

diff --git a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_RkDetect01.cs b/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_RkDetect01.cs
new file mode 100644
index 0000000..567b2a1
--- /dev/null
+++ b/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_RkDetect01.cs
@@ -0,0 +1,691 @@
+锘縰sing Gs.DevApp.DevFrm.QC;
+using 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.Configuration;
+using System.Data;
+using System.Net;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Gs.DevApp.DevFrm.RkQC
+{
+    public partial class Frm_RkDetect01 : DevExpress.XtraEditors.XtraForm
+    {
+        string _strTag = "N:涓嶅悎鏍�";
+    
+        List<FilterEntity> _filterList = new List<FilterEntity>();
+        public Frm_RkDetect01()
+        {
+            InitializeComponent();
+            this.toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick;
+            this.toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick;
+            this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
+            this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
+            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
+            toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
+            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
+            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
+            this.toolBarMenu1.getXmlConfig();
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1, tips);
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx3);
+            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "fsubmitTxt", "", (value) =>
+            {
+                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
+            }, tips);
+            Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
+            {
+                getModel(value, "0");
+            }, (value) =>
+            {
+                getPageList(this.pageBar1.CurrentPage);
+            }, lbGuid);
+            getPageList(1);
+            pageBar1.PagerEvent += PageBar1_PagerEvent;
+            txtJianYan.KeyDown += TxtJianYan_KeyDown;
+            this.btnLoad.Click += BtnLoad_Click;
+            xtraTabControl2.SelectedPageChanged += XtraTabControl2_SelectedPageChanged;
+            gvMx1.FocusedRowChanged += GvMx1_FocusedRowChanged;
+            btnIpt.Click += BtnIpt_Click;
+
+            this.ucBtnPrint1.btnDesignClick += (s, e) =>
+            {
+                ucBtnPrint1.rptParameter = "rpt_SCTL{}";
+            };
+            this.ucBtnPrint1.btnReportClick += (s, e) =>
+            {
+                ucBtnPrint1.guidKey = "";
+                string rowGuid = txt_aboutGuid.Text.Trim();
+                ucBtnPrint1.guidKey = rowGuid;
+                if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_iCount_1.Text.Trim(), txt_yuliang_1.Text.Trim()))
+                {
+                    Gs.DevApp.ToolBox.MsgHelper.ShowError("璇疯緭鍏ユ纭殑鏉$爜鏁伴噺锛�");
+                    txt_iCount_1.Focus();
+                    this.ucBtnPrint1.rptParameter = "return false";
+                    return;
+                }
+                if (!Gs.DevApp.ToolBox.UtilityHelper.IsNumeric3(txt_psnQty_1.Text.Trim()))
+                {
+                    Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鏉$爜鏁伴噺锛�");
+                    txt_psnQty_1.Focus();
+                    this.ucBtnPrint1.rptParameter = "return false";
+                    return;
+                }
+                if (rowGuid.Length < 10)
+                {
+                    Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鎵撳嵃鐨勮锛�");
+                    this.ucBtnPrint1.rptParameter = "return false";
+                    return;
+                }
+                this.ucBtnPrint1.rptParameter = "rpt_SCTL{" + rowGuid.Trim()
+                       + "," + ""
+                       + "," + Gs.DevApp.ToolBox.UtilityHelper.ToDecimal(txt_yuliang_1.Text.Trim())
+                       + "," + txt_iCount_1.Text.Trim()
+                       + "," + txt_psnQty_1.Text.Trim()
+                       + "}";
+            };
+
+            //鑷姩璁$畻鎵撳嵃閲�
+            txt_psnQty_1.TextChanged += (s, e) =>
+            {
+                Gs.DevApp.ToolBox.UtilityHelper.PrintJiSuan(txt_psnQty_1, txt_iCount_1, txt_kQty.Text.Trim(), radOut, txt_yuliang_1);
+            };
+            radOut.SelectedIndexChanged += (s, e) =>
+            {
+                Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1);
+            };
+        }
+
+
+        /// <summary>
+        /// 鎵归噺褰曞叆
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        /// <exception cref="NotImplementedException"></exception>
+        private void BtnIpt_Click(object sender, EventArgs e)
+        {
+            bool bl = btnLoad.Enabled;
+            Frm_MesQaItemsDetect01Input frm = new Frm_MesQaItemsDetect01Input(this.lbGuid.Text.Trim(), bl);
+            frm.ShowDialog();
+        }
+
+        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
+        {
+            _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
+            Task.Delay(100);
+            getPageList(1);
+        }
+        /// <summary>
+        /// 5琛ㄧ劍鐐规椂锛岄噸鏂拌鍙�12琛�
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void GvMx1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
+        {
+            if (e.FocusedRowHandle >= 0)
+            {
+                DataRow row = gvMx1.GetDataRow(e.FocusedRowHandle);
+                string rowGuid = row["guid"].ToString();
+                if (string.IsNullOrEmpty(rowGuid))
+                    return;
+                getList12(rowGuid);
+            }
+        }
+        /// <summary>
+        ///  閲嶆柊鍔犺浇妫�楠�
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void BtnLoad_Click(object sender, EventArgs e)
+        {
+            if (!MsgHelper.AskQuestion("璇ユ搷浣滃皢浼氭竻绌烘楠岃褰曪紙鍖呮嫭鏍峰搧妫�楠岃褰曪級锛岀‘瀹氶噸鏂板姞杞芥楠岄」鐩悧锛�"))
+                return;
+            string strGuid = lbGuid.Text.Trim();
+            if (string.IsNullOrEmpty(strGuid))
+            {
+                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                return;
+            }
+            var _obj = new
+            {
+                guid = strGuid,
+            };
+            try
+            {
+                string strJson = UtilityHelper.HttpPost("", "MesQaItemsDetect01Manager/ReloadModel5", JsonConvert.SerializeObject(_obj));
+                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+                if (_rtn.rtnCode > 0)
+                {
+                    getModel(lbGuid.Text.Trim(), "0");
+                }
+                else
+                {
+                    Gs.DevApp.ToolBox.MsgHelper.ShowInformation(_rtn.rtnMsg);
+                }
+            }
+            catch (Exception ex)
+            {
+                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
+        }
+        /// <summary>
+        /// 杈撳叆妫�楠屼簨浠�
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void TxtJianYan_KeyDown(object sender, KeyEventArgs e)
+        {
+            int intHandle = this.gvMx1.FocusedRowHandle;
+            if (intHandle < 0)
+            {
+                ToolBox.MsgHelper.Warning("鎻愮ず锛氳閫夋嫨妫�楠岄」鐩紒");
+                return;
+            }
+            if (e.KeyCode == Keys.Enter)
+            {
+                string guid5 = this.gvMx1.GetDataRow(intHandle)["guid"].ToString();
+                string _strCmd = txtJianYan.Text.Trim().ToUpper();
+                string _strOK = "OK";
+                string _strNG = "NG";
+                if (!(_strCmd.StartsWith(_strOK) || _strCmd.StartsWith(_strNG)))
+                {
+                    Gs.DevApp.ToolBox.MsgHelper.ShowError("鍛戒护杈撳叆閿欒锛氳姝g‘浣跨敤OK 鎴� NG 鍛戒护!");
+                    return;
+                }
+                if (!_strCmd.Contains("-"))
+                {
+                    Gs.DevApp.ToolBox.MsgHelper.ShowError("鍛戒护杈撳叆閿欒锛氳姝g‘浣跨敤OK 鎴� NG 鍛戒护!");
+                    return;
+                }
+                string[] _ary = _strCmd.Split('-');
+                if (_ary.Length != 2)
+                {
+                    Gs.DevApp.ToolBox.MsgHelper.ShowError("鍛戒护杈撳叆閿欒锛氳姝g‘浣跨敤OK 鎴�  NG 鍛戒护!");
+                    return;
+                }
+                var _obj = new
+                {
+                    inOrderGuid1 = UtilityHelper.ToGuid(lbGuid.Text.Trim()), ////杩欐槸妫�楠屽崟guid
+                    inOrderGuid5 = guid5,//杩欐槸鎶芥牱鐨刧uid
+                    inP1 = _strCmd,//鎴栬��0k-19,鎴栬�卬g-19
+                };
+                try
+                {
+                    var strJson = UtilityHelper.HttpPost("",
+                        "MesQaItemsDetect01Manager/EdtModel12",
+                        JsonConvert.SerializeObject(_obj));
+                    var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+                    if (_rtn.rtnCode > 0)
+                    {
+                        getModel(lbGuid.Text.Trim(), guid5);
+                    }
+                    else
+                    {
+                        Gs.DevApp.ToolBox.MsgHelper.ShowInformation(_rtn.rtnMsg);
+                    }
+                    txtJianYan.Text = "";
+                }
+                catch (Exception ex)
+                {
+                    MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                }
+            }
+        }
+
+        /// <summary>
+        /// 鍒嗛〉浜嬩欢
+        /// </summary>
+        /// <param name="curPage"></param>
+        /// <param name="pageSize"></param>
+        private void PageBar1_PagerEvent(int curPage, int pageSize)
+        {
+            getPageList(curPage);
+        }
+        /// <summary>
+        /// 鏌ヨ浜嬩欢
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e)
+        {
+            gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
+            gridView1.ActiveFilter.Clear();
+            gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
+            var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName);
+            frm.UpdateParent += Frm_UpdateParent;
+            frm.ShowDialog();
+        }
+        /// <summary>
+        /// 鏌ヨ鍥炶皟
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void Frm_UpdateParent(object sender, UpdateParentEventArgs e)
+        {
+            _filterList = e.FilterList;
+            getPageList(1);
+        }
+        /// <summary>
+        /// 鏃ュ織浜嬩欢
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void ToolBarMenu1_btnLogClick(object sender, EventArgs e)
+        {
+            toolBarMenu1.guidKey = "";
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+                lbGuid, txt_releaseNo, gridView1);
+            toolBarMenu1.guidKey = rowGuid;
+        }
+
+
+        private void ToolBarMenu1_btnChkClick(object sender, EventArgs e)
+        {
+            _toolCk("EditModelSubmit");
+        }
+        private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e)
+        {
+            _toolCk("EditModelSubmitZhiLiang");
+        }
+
+        /// <summary>
+        /// 鍙栨秷浜嬩欢
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void ToolBarMenu1_btnEscClick(object sender, EventArgs e)
+        {
+            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1);
+        }
+       
+        /// <summary>
+        /// 鍒锋柊浜嬩欢
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
+        {
+            if (xtraTabControl1.SelectedTabPageIndex == 1)
+                getModel(lbGuid.Text.Trim(), "0");
+            else
+            {
+                //_filterList.Clear();
+                //if (gridView1.ActiveFilter.Count > 0)
+                //{
+                //    gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
+                //    gridView1.ActiveFilter.Clear();
+                //    gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
+                //}
+                //getPageList(1);
+                getPageList(this.pageBar1.CurrentPage);
+            }
+        }
+        /// <summary>
+        /// 淇敼浜嬩欢
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
+        {
+            toolBarMenu1.currentAction = "edit";
+            string rowGuid = "", rowName = "";
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1, "releaseNo");
+            if (string.IsNullOrEmpty(rowGuid))
+            {
+                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                return;
+            }
+            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
+            if (xtraTabControl1.SelectedTabPageIndex == 1)
+            {
+                getModel(rowGuid, "0");
+            }
+            else
+            {
+                List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+                gvList.Add(gvMx1);
+                gvList.Add(gvMx2);
+                UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList);
+                this.setEable(true);
+            }
+        }
+
+        /// <summary>
+        /// 淇濆瓨浜嬩欢
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
+        {
+            toolBarMenu1.isSetBtn = false;
+            if (txt_fcheckResu.Text.Trim() == _strTag && string.IsNullOrEmpty(txt_fngDesc.TextTxt.Trim()))
+            {
+                Gs.DevApp.ToolBox.MsgHelper.Warning("褰撴楠岀粨鏋滀笉鍚堟牸鏃讹紝璇峰~鍐欏娉ㄨ鏄庯紒");
+                txt_fngDesc.Focus();
+                return;
+            }
+            var _obj = new
+            {
+                guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
+                fngDesc = txt_fngDesc.TextTxt.Trim(),
+            };
+            try
+            {
+                string strJson = UtilityHelper.HttpPost("", "MesQaItemsDetect01Manager/EditModel", JsonConvert.SerializeObject(_obj));
+                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                if (_rtn.rtnCode > 0)
+                {
+                    lbGuid.Text = _rtn.rtnData;
+                    toolBarMenu1.isSetBtn = true;
+                    UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false);
+                    this.setEable(false);
+                    toolBarMenu1.currentAction = "";
+                    Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
+
+                }
+            }
+            catch (Exception ex)
+            {
+                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
+        }
+
+        /// <summary>
+        /// 
+        /// </summary>
+        /// <param name="curPage">绗嚑椤�</param>
+        /// <param name="pageSize">姣忛〉鍑犳潯</param>
+        private void getPageList(int curPage)
+        {
+            gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+            PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "release_no", "asc", "", _sbSqlWhere.ToString());
+            string json = JsonConvert.SerializeObject(pgq);
+            try
+            {
+                string strReturn = UtilityHelper.HttpPost("", "RkqcManager/GetListPage", json);
+                ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn);
+                if (dd.rtnCode > 0)
+                {
+                    DataTable dt = dd.rtnData.list;
+                    gcMain1.BindingContext = new BindingContext();
+                    gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
+                    if (dt.Rows.Count > 0)
+                    {
+                        gcMain1.DataSource = dt;
+                        gcMain1.ForceInitialize();
+                        gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
+                    }
+                    else
+                        UtilityHelper.SetDefaultTable(gcMain1, gridView1);
+                    gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
+                    pageBar1.TotalPages = dd.rtnData.pages;//鎬婚〉
+                    pageBar1.CurrentPage = curPage;//褰撳墠椤�
+                    pageBar1.RecordCount = dd.rtnData.total;//鎬昏褰曟暟
+                }
+                else
+                {
+                    ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + dd.rtnMsg);
+                }
+            }
+            catch (Exception ex)
+            {
+                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
+
+        }
+        /// <summary>
+        /// 璇诲彇瀹炰綋
+        /// </summary>
+        /// <param name="strGuid"></param>
+        /// <param name="guid5"></param>
+        private void getModel(string strGuid, string guid5)
+        {
+            bool isEdit = false;
+            if (toolBarMenu1.currentAction == "add") return;
+            if (toolBarMenu1.currentAction == "edit") isEdit = true;
+            if (string.IsNullOrEmpty(strGuid))
+            {
+                ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                return;
+            }
+            var _obj = new
+            {
+                guid = strGuid,//涓诲缓
+            };
+            try
+            {
+                string strJson = UtilityHelper.HttpPost("","RkqcManager/GetModel", JsonConvert.SerializeObject(_obj));
+                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+                if (_rtn.rtnCode > 0)
+                {
+                    dynamic dy = _rtn.rtnData;
+                    lbGuid.Text = strGuid;
+                    List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+                    gvList.Add(gvMx1);
+                    UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList);
+                    setEable(isEdit);
+                    txtQuantity.Text = dy["fbatchQty"].ToString();
+                    txt_kQty.Text = dy["kdy"].ToString();
+                    txtYdy.Text = dy["ydy"].ToString();
+                    txt_psnQty_1.Text = dy["fbatchQty"].ToString();
+                    JObject _job = JObject.Parse(strJson);
+                    JArray array = new JArray();
+                    foreach (var a in _job["rtnData"]["list5"])
+                    {
+                        array.Add(a);
+                    }
+                    DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString());
+                    if (dt.Rows.Count > 0)
+                    {
+                        gcMx1.DataSource = null;
+                        gcMx1.BindingContext = new BindingContext();
+                        gcMx1.DataSource = dt;
+                        gcMx1.ForceInitialize();
+                        gvMx1.BestFitColumns();
+                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
+                        ucUpFileList1.pGuid = lbGuid.Text.Trim();
+                        if (guid5.Length > 10)
+                        {
+                            int rowHandle = 0;
+                            rowHandle = gvMx1.LocateByValue(1, gvMx1.Columns["guid"], guid5);
+                            if (rowHandle < 0)
+                                rowHandle = 0;
+                            gvMx1.FocusedRowHandle = rowHandle + 1;
+                        }
+                        //  MessageBox.Show(rowHandle.ToString() + "**" + guid5);
+                    }
+                    else
+                    {
+                        Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
+                    }
+
+
+                    JArray array8 = new JArray();
+                    foreach (var a in _job["rtnData"]["barCodeList"])
+                    {
+                        array8.Add(a);
+                    }
+                    DataTable dt8 = JsonConvert.DeserializeObject<DataTable>(array8.ToString());
+                    if (dt8.Rows.Count > 0)
+                    {
+                        gcMx8.DataSource = null;
+                        gcMx8.BindingContext = new BindingContext();
+                        gcMx8.DataSource = dt8;
+                        gcMx8.ForceInitialize();
+                        gvMx8.BestFitColumns();
+                        Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx8);
+                    }
+                    else
+                    {
+                        Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
+                    }
+                }
+                else
+                    ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+            }
+            catch (Exception ex)
+            {
+                ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
+
+        }
+
+        /// <summary>
+        /// 閫夐」鍗″垏鎹�
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void XtraTabControl2_SelectedPageChanged(object sender, DevExpress.XtraTab.TabPageChangedEventArgs e)
+        {
+            if (e.Page.Name == "tabMxPage2")
+            {
+                ucUpFileList1.getFileList();
+            }
+        }
+
+        /// <summary>
+        /// 鏍规嵁妫�楠岄」鐩鍙栨娊鏍风粨鏋� 
+        /// </summary>
+        /// <param name="guid5"></param>
+        private void getList12(string guid5)
+        {
+            var _obj = new
+            {
+                parentGuid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
+                guid = UtilityHelper.ToGuid(guid5), //涓诲缓
+            };
+            try
+            {
+                var strJson = UtilityHelper.HttpPost("",  "MesQaItemsDetect01Manager/GetModel12", JsonConvert.SerializeObject(_obj));
+                JObject _job = JObject.Parse(strJson);
+                JArray array = new JArray();
+                foreach (var a in _job["rtnData"]["list"])
+                {
+                    array.Add(a);
+                }
+                DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString());
+                gcMx2.BindingContext = new BindingContext();
+                gcMx2.DataSource = dt;
+                gcMx2.ForceInitialize();
+                gvMx2.BestFitColumns();
+                JArray array1 = new JArray();
+                foreach (var a in _job["rtnData"]["list2"])
+                {
+                    array1.Add(a);
+                }
+                DataTable dt1 = JsonConvert.DeserializeObject<DataTable>(array1.ToString());
+                gcMx3.BindingContext = new BindingContext();
+                gcMx3.DataSource = dt1;
+                gcMx3.ForceInitialize();
+                gvMx3.BestFitColumns();
+            }
+            catch (Exception ex)
+            {
+                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
+        }
+        /// <summary>
+        /// 绂佺敤妫�楠屾+閲嶆柊鍔犺浇鎸夐挳
+        /// </summary>
+        /// <param name="bl"></param>
+        private void setEable(bool bl)
+        {
+            txtJianYan.ReadOnly = !bl;
+            btnLoad.Enabled = bl;
+            btnIpt.Text = (bl == true ? "褰曞叆鏍锋湰" : "鏌ョ湅鏍锋湰");
+        }
+        /// <summary>
+        /// 妫�楠屽拰鍙嶆楠�
+        /// </summary>
+        /// <param name="inFieldValue"></param>
+        private void _toolCk(string _meth)
+        {
+            string rowGuid, rowName;
+            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_releaseNo, gridView1, "releaseNo");
+            if (string.IsNullOrEmpty(rowGuid))
+            {
+                MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+                return;
+            }
+            if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鎿嶄綔鍚楋紵"))
+                return;
+            var _obj = new
+            {
+                guid = rowGuid,
+            };
+            try
+            {
+                var strJson = UtilityHelper.HttpPost("",
+                    "MesQaItemsDetect01Manager/" + _meth,
+                    JsonConvert.SerializeObject(_obj));
+                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+                MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnData.outMsg);
+                if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
+                {
+                    if (xtraTabControl1.SelectedTabPageIndex == 1)
+                    {
+                        getModel(lbGuid.Text.Trim(), "0");
+                    }
+                    int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
+                    gridView1.FocusedRowHandle = rowHandle;
+                    int _inFieldValue = (_meth == "EditModelSubmit" ? 1 : -1);
+                    UtilityHelper.SetCheckIco(gridView1, "fsubmitTxt", "", "iqcDate", picCheckBox, this, _inFieldValue.ToString());
+                }
+            }
+            catch (Exception ex)
+            {
+                MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+            }
+        }
+
+
+
+        /// <summary>
+        /// 绉诲嚭鏉$爜
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void repDelCard_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
+        {
+            var rowhandle = gvMx2.FocusedRowHandle;
+            if (rowhandle < 0)
+                return;
+            if (e.Button.Index == 0)
+            {
+                var dr = gvMx2.GetDataRow(rowhandle);
+                var mxGuid = dr["guid"].ToString();
+                if (!MsgHelper.AskQuestion("浣犻�夋嫨浜�1鏉℃暟鎹紝纭畾鍒犻櫎鍚楋紵"))
+                    return;
+                var _obj = new
+                {
+                    mxGuid = mxGuid,
+                    inType = "dhtm"
+                };
+                try
+                {
+                    var strJson = UtilityHelper.HttpPost("",
+                         "VArrivalBarcodeManager/DeleteBarcode",
+                        JsonConvert.SerializeObject(_obj));
+                    var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+                    if (_rtn.rtnCode > 0)
+                    {
+                        //if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
+                    }
+                    MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+                }
+                catch (Exception ex)
+                {
+                    MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+                }
+            }
+        }
+    }
+}
\ No newline at end of file

--
Gitblit v1.9.3