From d0f32cf641c751e6b926d2169fc1b17c155c6c82 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期四, 31 七月 2025 15:43:51 +0800
Subject: [PATCH] bug
---
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs | 193 ++++++++++++++++++++++++++++++++----------------
1 files changed, 129 insertions(+), 64 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
index afd01ba..32dbf78 100644
--- a/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaItemsDetect01.cs
@@ -6,7 +6,9 @@
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;
@@ -26,9 +28,11 @@
this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
- toolBarMenu1.btnJianYanClick += ToolBarMenu1_btnJianYanClick;
+ toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
+ toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
+ toolBarMenu1.btnOutClick += ToolBarMenu1_btnOutClick;
this.toolBarMenu1.getXmlConfig();
- Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
+ 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) =>
@@ -51,6 +55,7 @@
btnIpt.Click += BtnIpt_Click;
btnYcReport.Click += BtnYcReport_Click;
}
+
/// <summary>
/// 鎵归噺褰曞叆
@@ -94,7 +99,7 @@
/// <param name="e"></param>
private void BtnLoad_Click(object sender, EventArgs e)
{
- if (!MsgHelper.AskQuestion("纭畾閲嶆柊鍔犺浇妫�楠岄」鐩悧锛岃鎿嶄綔灏嗕細娓呯┖涔嬪墠鐨勬楠岃褰曪紵"))
+ if (!MsgHelper.AskQuestion("璇ユ搷浣滃皢浼氭竻绌烘楠岃褰曪紙鍖呮嫭鏍峰搧妫�楠岃褰曪級锛岀‘瀹氶噸鏂板姞杞芥楠岄」鐩悧锛�"))
return;
string strGuid = lbGuid.Text.Trim();
if (string.IsNullOrEmpty(strGuid))
@@ -234,62 +239,15 @@
lbGuid, txt_releaseNo, gridView1);
toolBarMenu1.guidKey = rowGuid;
}
- /// <summary>
- ///鎻愪氦妫�楠屼簨浠�
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- /// <exception cref="NotImplementedException"></exception>
- private void ToolBarMenu1_btnJianYanClick(object sender, EventArgs e)
- {
- toolBarMenu1.guidKey = "";
- string rowGuid, rowName;
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
- lbGuid, txt_releaseNo, gridView1, "lotNo");
- toolBarMenu1.guidKey = rowGuid;
- if (string.IsNullOrEmpty(rowGuid))
- {
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
- return;
- }
- if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鎻愪氦妫�楠屽悧锛�"))
- return;
- if (txt_fcheckResu.Text.Trim() == _strTag)
- {
- if (string.IsNullOrEmpty(txt_fngDesc.TextTxt.Trim()))
- {
- MsgHelper.Warning("鍗曟嵁涓轰笉鍚堟牸鏃讹紝璇峰~鍐欏紓甯稿娉ㄨ鏄庯紒");
- return;
- }
- };
- var _obj = new
- {
- guid = rowGuid,
- };
- try
- {
- var strJson = UtilityHelper.HttpPost("",
- _webServiceName + "EditModelSubmit",
- 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 = 1;
- UtilityHelper.SetCheckIco(gridView1, "fsubmitTxt", "", "iqcDate", picCheckBox, this, _inFieldValue.ToString());
- }
- }
- catch (Exception ex)
- {
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
- }
+
+ private void ToolBarMenu1_btnChkClick(object sender, EventArgs e)
+ {
+ _toolCk("EditModelSubmit");
+ }
+ private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e)
+ {
+ _toolCk("EditModelSubmitZhiLiang");
}
/// <summary>
@@ -301,7 +259,63 @@
{
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1);
}
-
+ /// <summary>
+ /// 瀵煎嚭
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ /// <exception cref="NotImplementedException"></exception>
+ private void ToolBarMenu1_btnOutClick(object sender, EventArgs e)
+ {
+ string rowGuid = "", rowName = "";
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_releaseNo, gridView1, "releaseNo");
+ if (string.IsNullOrEmpty(rowGuid))
+ {
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ return;
+ }
+ if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾瀵煎嚭鍚楋紵"))
+ return;
+ using (FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog())
+ {
+ folderBrowserDialog.Description = "閫夋嫨瀵煎嚭鏂囦欢鐨勪繚瀛樿矾寰�";
+ DialogResult dialogResult = folderBrowserDialog.ShowDialog();
+ if (dialogResult == DialogResult.OK)
+ {
+ string _folder = folderBrowserDialog.SelectedPath;
+ var _obj = new
+ {
+ guid = rowGuid,
+ };
+ try
+ {
+ string strJson = UtilityHelper.HttpPost("", "XlsInOut/XlsOutIqc", JsonConvert.SerializeObject(_obj));
+ ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+ if (_rtn.rtnCode > 0)
+ {
+ string _file = _rtn.rtnData.fileUrl.ToString();
+ string _folderName = _folder + "\\" + _file.Replace("down/", "");
+ string _url = ConfigurationManager.AppSettings["WebApiUrl"].ToString() + _file;
+ using (WebClient client = new WebClient())
+ {
+ client.DownloadFile(_url, _folderName);
+ }
+ var frm = new Gs.DevApp.DevFrm.QC.Xls(_folderName);
+ frm.ShowDialog();
+ }
+ else
+ {
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
+ }
+ }
+ catch (Exception ex)
+ {
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
+ }
+ }
+ }
+ }
/// <summary>
/// 鍒锋柊浜嬩欢
@@ -372,27 +386,29 @@
var _obj = new
{
guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
- fngDesc = txt_fngDesc.TextTxt.Trim(),
+ fngDesc = txt_fngDesc.TextTxt.Trim(),
};
try
{
string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+
if (_rtn.rtnCode > 0)
{
+ ToolBox.MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
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);
-
}
+ else
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -403,7 +419,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);
PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "release_no", "asc", "", _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
try
@@ -485,6 +501,7 @@
gcMx1.DataSource = dt;
gcMx1.ForceInitialize();
gvMx1.BestFitColumns();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
ucUpFileList1.pGuid = lbGuid.Text.Trim();
if (guid5.Length > 10)
{
@@ -598,5 +615,53 @@
}
#endregion
+
+ /// <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.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ return;
+ }
+ if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鎿嶄綔鍚楋紵"))
+ return;
+ var _obj = new
+ {
+ guid = rowGuid,
+ };
+ try
+ {
+ var strJson = UtilityHelper.HttpPost("",
+ _webServiceName + _meth,
+ JsonConvert.SerializeObject(_obj));
+ var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+
+ if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
+ {
+ MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnData.outMsg);
+ 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());
+ }
+ else
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnData.outMsg);
+ }
+ catch (Exception ex)
+ {
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
+ }
+ }
+
}
}
\ No newline at end of file
--
Gitblit v1.9.3