From fdc017bffe579b0855743b68c58e3ba7571b8ad1 Mon Sep 17 00:00:00 2001
From: kyy <3283105747@qq.com>
Date: 星期一, 01 九月 2025 18:12:23 +0800
Subject: [PATCH] 1、优化条码删除报错 2、采购入库三联打印
---
DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs | 132 ++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 126 insertions(+), 6 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs
index b5a05a4..4193d39 100644
--- a/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Rk/Frm_MesInvItemArn.cs
@@ -1,7 +1,9 @@
+using DevExpress.Utils.VisualEffects;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraGrid.Views.Grid;
using Gs.DevApp.DevFrm.Rk;
+using Gs.DevApp.DevFrm.Rpt;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
@@ -10,6 +12,7 @@
using System;
using System.Collections.Generic;
using System.Data;
+using System.Drawing;
using System.Threading.Tasks;
using System.Windows.Forms;
@@ -34,12 +37,19 @@
toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
+ toolBarMenu1.btnHbClick += ToolBarMenu1_btnHbClick;
+ toolBarMenu1.btnPrintClick += ToolBarMenu1_btnPrintClick;
+
this.toolBarMenu1.getXmlConfig();
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMxL1);
+
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "fstatus", "", (value) =>
{
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
- }, tips);
+ }, tips, true, (strGuid) => {
+ getModelList(strGuid);
+ });
Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
{
getModel(value);
@@ -107,10 +117,51 @@
};
frm.ShowDialog();
};
+ ////搴曢儴姹囨�诲惎鐢�
+ // gvMx1.OptionsView.ShowFooter = true;
+
+ //// 涓烘煇涓�鍒楄缃眰鍜屾眹鎬�
+ // gvMx1.Columns["quantity"].SummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Sum;
+ // gvMx1.Columns["quantity"].SummaryItem.DisplayFormat = "鍚堣: {0}";
+ /////搴曢儴姹囨��
+ UtilityHelper.SetupGridSummary(gvMx1, "quantity");
+ //鎵撳嵃姣斾緥
+ UtilityHelper.SetSimpleGridColor(gridView1, "barcodeProgress", "=100.00%", "Cell", Color.Green);
+ //鍏ュ簱姣斾緥
+ UtilityHelper.SetSimpleGridColor(gridView1, "rkbl", "=100.00%", "Cell", Color.Green);
}
+ private void ToolBarMenu1_btnPrintClick(object sender, EventArgs e)
+ {
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1);
+ if (string.IsNullOrEmpty(rowGuid))
+ {
+ MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎵撳嵃鐨勫崟鎹紒");
+ return;
+ }
-
-
+ try
+ {
+ string rptParameter = "rpt_Cgrk{"
+ + rowGuid // @inOrderGuid - 鍗曟嵁guid
+ + "," + "100" // @isDesign - 閲嶆墦閮芥槸浼�100
+ + "," + "" // @in1 - 鍏ュ簱鏃堕棿锛堟墿灞曠敤锛�
+ + "," + "" // @in2 - 鐗归噰锛堟墿灞曠敤锛�
+ + "," + "" // @in3 - 渚涘簲鍟唅d锛堟墿灞曠敤锛�
+ + "," + "" // @in4 - 寮犳暟锛堟墿灞曠敤锛�
+ + "," + "" // @in5 - 鏁伴噺锛堟墿灞曠敤锛�
+ + "," + "" // @in6 - 鎵╁睍鐢�
+ + "}";
+ using (Form rpt = new RptPreview(rowGuid, rptParameter))
+ {
+ rpt.ShowDialog();
+ }
+ }
+ catch (Exception ex)
+ {
+ MsgHelper.ShowError(ex.Message);
+ }
+ }
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
_filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
@@ -174,6 +225,11 @@
private void ToolBarMenu1_btnFChkClick(object sender, EventArgs e)
{
_toolCk("EditModelSubmitF");
+ }
+
+ private void ToolBarMenu1_btnHbClick(object sender, EventArgs e)
+ {
+ _toolCk("EditModelSubmitHb");
}
/// <summary>
/// 鍙栨秷浜嬩欢
@@ -343,6 +399,7 @@
{
Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString());
string _msl = row["quantity"].ToString();
+
if (string.IsNullOrEmpty(_msl))
{
MsgHelper.ShowError("鏁伴噺涓嶈兘涓虹┖锛�");
@@ -354,6 +411,7 @@
AboutGuid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(row["aboutGuid"].ToString()),
ItemId = int.Parse(row["itemId"].ToString()),
Quantity = decimal.Parse(row["quantity"].ToString()),
+
UrgentFlag = Gs.DevApp.ToolBox.UtilityHelper.ToBit(row["urgentFlag"].ToString()),
Remark = row["memo"].ToString(),
});
@@ -375,6 +433,13 @@
gvList.Add(gvMx1);
UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false);
toolBarMenu1.currentAction = "";
+ // 銆愭柊澧炲埛鏂伴�昏緫銆戜繚瀛樻垚鍔熷悗绔嬪嵆鍒锋柊褰撳墠妯″瀷鏁版嵁鍜屽垪琛�
+ // 鍒锋柊褰撳墠鍗曟嵁璇︽儏
+ getModel(lbGuid.Text.Trim());
+ // 鍒锋柊鍒楄〃椤垫暟鎹�
+ getPageList(this.pageBar1.CurrentPage);
+
+ // 璺宠浆鍒版煡鐪嬬粨鏋滈〉闈�
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
}
}
@@ -603,22 +668,26 @@
_webServiceName + _meth,
JsonConvert.SerializeObject(_obj));
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnData.outMsg);
+
if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
{
+ MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnData.outMsg);
if (xtraTabControl1.SelectedTabPageIndex == 1)
{
getModel(lbGuid.Text.Trim());
}
int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid);
gridView1.FocusedRowHandle = rowHandle;
- int _inFieldValue = (_meth == "EditModelSubmit" ? 1 : -1);
+ //鍒ゆ柇瀹℃牳鍚庢槸鍚﹀彉涓虹孩绔狅紙1锛氱孩绔犲凡瀹℃牳 锛�-1 榛戠珷鏈鏍革級
+ int _inFieldValue = ((_meth == "EditModelSubmit" || _meth == "EditModelSubmitHb") ? 1 : -1);
UtilityHelper.SetCheckIco(gridView1, "fstatus", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString());
}
+ else
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnData.outMsg);
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -637,5 +706,56 @@
HistoryDhmxcs frm = new HistoryDhmxcs(mxGuid);
frm.ShowDialog();
}
+
+ /// <summary>
+ /// 鏂板鏂规硶锛氬垪琛ㄦ樉绀�
+ /// </summary>
+ /// <param name="strGuid">涓昏〃id</param>
+
+ private void getModelList(string strGuid)
+ {
+ gcMxL1.DataSource = null;
+
+
+ var _obj = new
+ {
+ guid = strGuid,//涓诲缓
+ };
+ try
+ {
+ string strJson = UtilityHelper.HttpPost("", _webServiceName + "GetModel", JsonConvert.SerializeObject(_obj));
+ ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
+ if (_rtn.rtnCode > 0)
+ {
+ dynamic dy = _rtn.rtnData;
+
+ JArray array1 = new JArray();
+ foreach (var a in dy["list"])
+ {
+ array1.Add(a);
+ }
+ DataTable dt1 = JsonConvert.DeserializeObject<DataTable>(array1.ToString());
+ if (dt1.Rows.Count > 0)
+ {
+ gcMxL1.BindingContext = new BindingContext();
+ gcMxL1.DataSource = dt1;
+ gcMxL1.ForceInitialize();
+ gvMxL1.BestFitColumns();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMxL1);
+ }
+ else
+ {
+ Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMxL1, gvMxL1);
+ }
+ }
+ else
+ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ }
+ catch (Exception ex)
+ {
+ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ }
+ }
+
}
}
\ No newline at end of file
--
Gitblit v1.9.3