From 891658c2e6640d8c7631b9c892722ccc1eeaa31b Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期三, 24 九月 2025 15:05:01 +0800
Subject: [PATCH] 过站字体大小
---
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs | 72 ++++++++++++++++++++++++++++++++---
1 files changed, 65 insertions(+), 7 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesItemQtrk.cs
index 42c80f1..1ed4291 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,60 @@
{
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.UpdateParent += (ss, ee) =>
+ {
+ try
+ {
+ var lst = ee.DynamicList;
+ DataTable _Table = (DataTable)gcMx1.DataSource;
+ foreach (dynamic dym in lst)
+ {
+ DataRow _row = _Table.NewRow();
+ _row["qd002"] = dym.itemNo;
+ _row["qd003"] = dym.itemName;
+ _row["qd004"] = dym.itemModel;
+ _row["kcDw"] = dym.dwName;
+ _row["itemId"] = dym.itemId;
+ _row["qd007"] = dym.sl;
+ _row["qd010"] = dym.bz;
+ _row["qd012"] = dym.bllx;
+ _Table.Rows.Add(_row);
+ }
+ gcMx1.BindingContext = new BindingContext();
+ gcMx1.DataSource = _Table;
+ gcMx1.ForceInitialize();
+ gvMx1.CloseEditor();
+ gvMx1.PostEditor();
+ gvMx1.UpdateCurrentRow();
+ gvMx1.BestFitColumns();
+ }
+ catch (Exception ex)
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message);
+ }
+ };
+ frm.ShowDialog();
+ }
+ else
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("鎵句笉鍒皒lsCopy.xls鏂囦欢锛岃鑱旂郴绠$悊鍛橈紒");
+ }
+ };
+ #endregion
}
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
@@ -385,6 +439,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 +462,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))
@@ -438,6 +493,7 @@
hzlx = inHzlx,//璐т富绫诲瀷
inHz = inHz,//璐т富
inSource = txt_qt035.EditValue,//宸ュ崟鍙�
+ qtlx = qtlx,
list = new List<dynamic>(),
};
gvMx1.CloseEditor();
@@ -548,7 +604,6 @@
/// <param name="strGuid"></param>
private void getModel(string strGuid)
{
-
gcMx1.DataSource = null;
bool isEdit = false;
if (toolBarMenu1.currentAction == "add") return;
@@ -649,6 +704,9 @@
gvMx1.CloseEditor();
gvMx1.PostEditor();
gvMx1.UpdateCurrentRow();
+ gvMx1.BestFitColumns();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
+
}
/// <summary>
/// 绉诲嚭鏄庣粏
@@ -688,7 +746,7 @@
getModel(lbGuid.Text);
}
else
- MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
@@ -808,7 +866,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