From dfd02ad42c5b4f8ee7190fe51730c21cf75d37a5 Mon Sep 17 00:00:00 2001
From: lg <123456>
Date: 星期一, 24 十一月 2025 15:36:11 +0800
Subject: [PATCH] Merge branch 'master' of http://git.gs-mes.com:8080/r/~tjx/GsMesClient
---
DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 111 insertions(+), 5 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs b/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs
index 83cda47..4579e41 100644
--- a/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs
+++ b/DevApp/Gs.DevApp/DevFrm/FQC/Frm_FqcDetect01.cs
@@ -7,8 +7,10 @@
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
+using System.Configuration;
using System.Data;
using System.Data.SqlTypes;
+using System.Net;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -32,7 +34,10 @@
toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
+ toolBarMenu1.btnBaoGaoClick += ToolBarMenu1_btnBaoGaoClick;
+ 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);
@@ -403,6 +408,14 @@
this.ucUpFileList1.pGuid = "";
this.ucChouJianList1.pGuid = "";
this.setEable(false);
+
+ //澧炲姞鐨勬椂鍊欑姝�2025-08-14 beg
+ this.txt_msg.Enabled = false;
+ this.txt_fngHandle.Enabled = false;
+ this.txt_zrType.Enabled = false;
+ this.txt_fzrId.Enabled = false;
+ this.txt_fmrmode.Enabled = false;
+ //澧炲姞鐨勬椂鍊欑姝�2025-08-14 end
}
/// <summary>
/// 淇敼浜嬩欢
@@ -432,6 +445,16 @@
UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList);
this.setEable(true);
}
+
+ //2025/07/12鍔犱笂淇敼鐘舵�佷笅涓嶈兘淇敼
+ txt_lotNo.Enabled = false;
+ txt_kbList.Enabled = false;
+ //txt_fPurchaserId.IsReadly = true;
+ this.txt_msg.Enabled = true;
+ this.txt_fngHandle.Enabled = true;
+ this.txt_zrType.Enabled = true;
+ this.txt_fzrId.Enabled = true;
+ this.txt_fmrmode.Enabled = true;
}
/// <summary>
@@ -455,7 +478,7 @@
string _txt_lotNo1 = txt_lotNo1.Text.Trim();//閫佹鎵瑰彿
string _txt_lotNo = txt_lotNo.Text.Trim();//鐢熶骇宸ュ崟
string _kbList = txt_kbList.Text.Trim();
- if (txt_djType.SelectedIndex <= 0)
+ if (txt_djType.SelectedIndex < 0)
{
Gs.DevApp.ToolBox.MsgHelper.ShowError("鍗曟嵁绫诲瀷涓嶈兘涓虹┖锛�");
txt_djType.Focus();
@@ -657,7 +680,11 @@
/// <param name="pageSize">姣忛〉鍑犳潯</param>
private void getPageList(int curPage)
{
- gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
+ gcMain1.DataSource = null;
+ System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
+ _sbSqlWhere.Append(" and daa.erp_sczz 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
@@ -699,7 +726,7 @@
if (toolBarMenu1.currentAction == "edit") isEdit = true;
if (string.IsNullOrEmpty(strGuid))
{
- ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
var _obj = new
@@ -727,11 +754,13 @@
DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString());
if (dt.Rows.Count > 0)
{
+ this.xtraTabControl2.SelectedTabPageIndex = 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();
ucChouJianList1.pGuid = lbGuid.Text.Trim();
if (guid5.Length > 10)
@@ -796,7 +825,6 @@
if (e.Page.Name == "tabMxPage2")
{
ucChouJianList1.getList14();
-
}
if (e.Page.Name == "tabMxPage3")
{
@@ -851,7 +879,6 @@
btnLoad.Enabled = bl;
ucChouJianList1.IsReadOnly(!bl);
btnIpt.Text = (bl == true ? "褰曞叆鏍锋湰" : "鏌ョ湅鏍锋湰");
-
}
/// <summary>
@@ -905,6 +932,37 @@
frm.ShowDialog();
}
+ //鐢熶骇鎶ュ憡
+ private void ToolBarMenu1_btnBaoGaoClick(object sender, EventArgs e)
+ {
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_releaseNo, gridView1, "releaseNo");
+ if (string.IsNullOrEmpty(rowGuid))
+ {
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ return;
+ }
+ var _obj = new
+ {
+ guid = rowGuid,
+ };
+ try
+ {
+ var strJson = UtilityHelper.HttpPost("", _webServiceName + "GetBaoGao", JsonConvert.SerializeObject(_obj));
+ var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+ if (_rtn.rtnCode > 0)
+ {
+ MsgHelper.ShowInformation("鐢熸垚鎴愬姛");
+ }
+ else
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
+ }
+ catch (Exception ex)
+ {
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
+ }
+ }
/// <summary>
/// 妫�楠屽拰鍙嶆楠�
@@ -1031,5 +1089,53 @@
MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
+
+ private void ToolBarMenu1_btnOutClick(object sender, EventArgs e)
+ {
+ using (FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog())
+ {
+ folderBrowserDialog.Description = "閫夋嫨瀵煎嚭鏂囦欢鐨勪繚瀛樿矾寰�";
+ DialogResult dialogResult = folderBrowserDialog.ShowDialog();
+ System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder();
+ _sbSqlWhere.Append(" and daa.erp_sczz in");
+ _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
+ _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
+ if (dialogResult == DialogResult.OK)
+ {
+ string _folder = folderBrowserDialog.SelectedPath;
+ var _params = new
+ {
+ inSortName = "",
+ inSortOrder = "",
+ inQueryWhere = _sbSqlWhere.ToString()
+ };
+ var _obj = new Gs.DevApp.Entity.XlsOutModel("xlsOut_fqclst", "", "", "", _params);
+ try
+ {
+ string strJson = UtilityHelper.HttpPost("", "XlsInOut/XlsOutView_NEW", 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);
+ }
+ ToolBox.MsgHelper.ShowInformation("瀵煎嚭鎴愬姛锛�");
+ }
+ else
+ {
+ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ }
+ }
+ catch (Exception ex)
+ {
+ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ }
+ }
+ }
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.3