From d4e0269da1cc87d42918cdda6afaa005b6c47a0e Mon Sep 17 00:00:00 2001
From: lg <123456>
Date: 星期三, 19 十一月 2025 13:40:46 +0800
Subject: [PATCH] 按大类维护
---
DevApp/Gs.DevApp/DevFrm/IPQC/Frm_XunJianDetect01.cs | 88 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 85 insertions(+), 3 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/IPQC/Frm_XunJianDetect01.cs b/DevApp/Gs.DevApp/DevFrm/IPQC/Frm_XunJianDetect01.cs
index 071b3c9..cedfb43 100644
--- a/DevApp/Gs.DevApp/DevFrm/IPQC/Frm_XunJianDetect01.cs
+++ b/DevApp/Gs.DevApp/DevFrm/IPQC/Frm_XunJianDetect01.cs
@@ -1,11 +1,15 @@
-锘縰sing Gs.DevApp.Entity;
+锘縰sing DevExpress.XtraGrid.Views.Base.ViewInfo;
+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.Linq;
+using System.Net;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -21,7 +25,9 @@
this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
+ toolBarMenu1.btnOutClick += ToolBarMenu1_btnOutClick;
this.toolBarMenu1.getXmlConfig();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1, tips);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx3);
@@ -108,6 +114,78 @@
getPageList(1);
}
/// <summary>
+ /// 瀵煎嚭
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ /// <exception cref="NotImplementedException"></exception>
+ private void ToolBarMenu1_btnOutClick(object sender, EventArgs e)
+ {
+ //鏄惁妫�鏌ユ棤姣昩eg
+ var dr = gridView1.GetFocusedDataRow();
+ if (dr == null || string.IsNullOrEmpty(dr["guid"].ToString()))
+ {
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ return;
+ }
+ string strLotNo = dr["lotNo"].ToString();
+ if (string.IsNullOrEmpty(strLotNo))
+ {
+ MsgHelper.ShowError("鏈紑濮嬫楠岋紝涓嶈兘瀵煎嚭锛�");
+ return;
+ }
+ //鏄惁妫�鏌ユ棤姣昬nd
+
+ 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/XlsOutXunJian", 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>
/// 鏃ュ織浜嬩欢
/// </summary>
/// <param name="sender"></param>
@@ -150,8 +228,11 @@
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
- gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
- // _sbSqlWhere += " and isnull(fsubmit,0)=0";
+ gcMain1.DataSource = null;
+ System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
+ _sbSqlWhere.Append(" and bm.FSubsidiary in");
+ _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
+ _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "release_no", "asc", "", _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
try
@@ -226,6 +307,7 @@
gcMx1.DataSource = dt;
gcMx1.ForceInitialize();
gvMx1.BestFitColumns();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
ucUpFileList1.pGuid = lbGuid.Text.Trim();
if (guid5.Length > 10)
{
--
Gitblit v1.9.3