From 9f5f4cf65c0dc2f63777c3a1e55fbc058a8f3233 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期五, 29 八月 2025 16:52:00 +0800
Subject: [PATCH] bug
---
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs | 56 ++++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 42 insertions(+), 14 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
index a472296..6fb3acd 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
@@ -9,6 +9,7 @@
using System;
using System.Collections.Generic;
using System.Data;
+using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Gs.DevApp.DevFrm
@@ -183,7 +184,28 @@
{
Gs.DevApp.ToolBox.UtilityHelper.PrintAuto(txt_psnQty_1, txt_iCount_1, radOut, txt_yuliang_1);
};
-
+ #region 2025-08-27 澶嶅埗beg
+ btnCopyXls.Click += (s, e) =>
+ {
+ string kcZz = txt_qt022.GetId();
+ if (string.IsNullOrEmpty(kcZz))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨搴撳瓨缁勭粐鍚庢墠鑳戒娇鐢ㄥ鍒跺姛鑳斤紒");
+ txt_qt022.Focus();
+ return;
+ }
+ string filePath = AppContext.BaseDirectory + "xlsCopy.xls";
+ if (File.Exists(filePath))
+ {
+ var frm = new CopyXls(kcZz, lbGuid.Text.Trim(), OrderType.鍏跺畠鍏ュ簱.ToString());
+ frm.ShowDialog();
+ }
+ else
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("鎵句笉鍒皒lsCopy.xls鏂囦欢锛岃鑱旂郴绠$悊鍛橈紒");
+ }
+ };
+ #endregion
}
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
@@ -385,6 +407,7 @@
string inHz = ucLookHuoZhu1.GetHzId();//璐т富
string inRkyy = txt_qt010.Text.Trim();//鍏ュ簱鍘熷洜
string kcCk = txt_qt008.GetId();//浠撳簱
+ string qtlx = txt_qtlx.Text.Trim();//鍚庢潵澧炲姞鐨勭被鍨�
if (string.IsNullOrEmpty(kcZz))
{
Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨搴撳瓨缁勭粐锛�");
@@ -407,10 +430,10 @@
txt_qt003.Focus();
return;
}
- if (txt_qt019.SelectedIndex <= 0)
+ if (txt_qtlx.SelectedIndex <= 0)
{
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨搴撳瓨鏂瑰悜锛�");
- txt_qt019.Focus();
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鍏ュ簱绫诲瀷锛�");
+ txt_qtlx.Focus();
return;
}
if (string.IsNullOrEmpty(kcBm) && string.IsNullOrEmpty(kcGys))
@@ -419,12 +442,12 @@
txt_qt009.Focus();
return;
}
- //if (string.IsNullOrEmpty(kcCk))
- //{
- // Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鏀舵枡浠撳簱锛�");
- // txt_qt008.Focus();
- // return;
- //}
+ if (string.IsNullOrEmpty(kcCk))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鏀舵枡浠撳簱锛乗n濡傛灉涓嶆槸銆愭姤搴熶粨銆戯紒\nQC鍙互閲嶆柊璁剧疆浠撳簱锛�");
+ txt_qt008.Focus();
+ return;
+ }
var _obj = new
{
guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
@@ -438,6 +461,7 @@
hzlx = inHzlx,//璐т富绫诲瀷
inHz = inHz,//璐т富
inSource = txt_qt035.EditValue,//宸ュ崟鍙�
+ qtlx = qtlx,
list = new List<dynamic>(),
};
gvMx1.CloseEditor();
@@ -503,7 +527,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 a.qt022 in");
+ _sbSqlWhere.Append(ToolBox.UtilityHelper.GetOrgWhere());
+ _sbSqlWhere.Append(UtilityHelper.GetSearchWhere(_filterList));
PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "qt001", "asc", "", _sbSqlWhere.ToString());
string json = JsonConvert.SerializeObject(pgq);
try
@@ -544,7 +572,7 @@
/// <param name="strGuid"></param>
private void getModel(string strGuid)
{
-
+
gcMx1.DataSource = null;
bool isEdit = false;
if (toolBarMenu1.currentAction == "add") return;
@@ -684,7 +712,7 @@
getModel(lbGuid.Text);
}
else
- MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
@@ -804,7 +832,7 @@
_webServiceName + "EditModelSubmit",
JsonConvert.SerializeObject(_obj));
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
-
+
if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
{
MsgHelper.ShowInformation(_rtn.rtnData.outMsg.ToString());
--
Gitblit v1.9.3