From e2fffcde27c802e06b4e15ea100c1df838b6ea52 Mon Sep 17 00:00:00 2001
From: cdk <2441919651@qq.com>
Date: 星期六, 06 十二月 2025 10:42:27 +0800
Subject: [PATCH] 委外加工出库增加仓库库存
---
DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs | 198 ++++++++++++++++++++++++-------------------------
1 files changed, 97 insertions(+), 101 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs b/DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs
index fc0d4ff..006a55b 100644
--- a/DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs
+++ b/DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs
@@ -1,7 +1,4 @@
-锘縰sing DevExpress.XtraEditors;
-using DevExpress.XtraLayout.Utils;
-using Gs.DevApp.DevFrm.Ck;
-using Gs.DevApp.Entity;
+锘縰sing Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
using Newtonsoft.Json;
@@ -9,28 +6,22 @@
using System;
using System.Collections.Generic;
using System.Data;
-using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
-
namespace Gs.DevApp.DevFrm.WW
{
public partial class WwBlcl : DevExpress.XtraEditors.XtraUserControl
{
- string _ucCk = "";//浠撳簱
string _webServiceName = "WWBlManager/";
List<FilterEntity> _filterList = new List<FilterEntity>();
public string strType = "";
+ string _ucGys = "";//渚涘簲鍟�
public WwBlcl(string _strType)
{
InitializeComponent();
strType = _strType;
txt_bl017.Text = _strType;
txt_bl017.Tag = "moren." + _strType;
- if(_strType == "濮斿棰嗘枡")
- {
- layoutControlItem14.Visibility = LayoutVisibility.Never;
- }
}
protected override void OnCreateControl()
{
@@ -46,8 +37,10 @@
toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
+ toolBarMenu1.btnPrintClick += ToolBarMenu1_btnPrintClick;
+ toolBarMenu1.btnWjClick += ToolBarMenu1_btnWjClick;
this.toolBarMenu1.getXmlConfig();
- Form parentForm = this.FindForm();
+ Form parentForm = this.FindForm();
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, parentForm, "bl018", "", (value) =>
{
@@ -62,59 +55,23 @@
}, lbGuid);
getPageList(1);
pageBar1.PagerEvent += PageBar1_PagerEvent;
- //璁剧疆缁勭粐
- this.txt_orgId.EditChanged += (s, e) =>
+ txt_orgId.EditChanged += (s, e) =>
{
- string orgdId = txt_orgId.GetId();
- if (string.IsNullOrEmpty(orgdId)) return;
- txt_bl010.getSuppler(orgdId, _ucCk);
+ var orgId = txt_orgId.GetId();
+ if (string.IsNullOrEmpty(orgId))
+ return;
+ txt_wwGys.getSuppler(orgId, _ucGys);
};
- //閫夋嫨濮斿宸ュ崟
- this.txt_aboutGuid.EditChanged += (s, e) =>
- {
- string strGdId = txt_aboutGuid.GetId();
- if (string.IsNullOrEmpty(strGdId)) return;
- txt_bl002.Text = txt_aboutGuid.GetPrdNo();
- txt_bl014.Text = txt_aboutGuid.GetPrdName();
- txt_bl015.Text = txt_aboutGuid.GetPrdModel();
- txt_bl013.Text = txt_aboutGuid.GetRwd();
- var _obj = new
- {
- currentPage = 1,
- everyPageSize = 999999,
- sortName = "",
- keyWhere = "",
- inP1 = strGdId
- };
- var json = JsonConvert.SerializeObject(_obj);
- try
- {
- var strReturn = UtilityHelper.HttpPost("", "WWBlManager/SelectFormMx", json);
- var rtn = UtilityHelper.ReturnToTablePage(strReturn);
- var dt = rtn.rtnData.list;
- this.repositoryItemSearchLookUpEdit1.DataSource = dt;
- }
- catch (Exception ex)
- {
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
- }
- };
-
//閫夋嫨闇�瑕佸叆搴撶殑鏄庣粏
btnSelect.Click += (s, e) =>
{
- if (string.IsNullOrEmpty(this.txt_orgId.GetId()))
+ if (string.IsNullOrEmpty(txt_wwGys.GetId()))
{
- MsgHelper.ShowError("璇烽�夋嫨鐢熶骇缁勭粐锛�");
- txt_orgId.Focus();
+ MsgHelper.ShowError("璇烽�夋嫨渚涘簲鍟嗭紒");
+ txt_wwGys.Focus();
return;
}
- if (string.IsNullOrEmpty(this.txt_aboutGuid.GetId()))
- {
- Gs.DevApp.ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨鐢熶骇宸ュ崟锛�");
- return;
- }
- var frm = new UcWwBlclSelect(txt_aboutGuid.GetId(), this.txt_orgId.GetId());
+ var frm = new UcWwBlclSelectAll(txt_orgId.GetId(), txt_wwGys.GetId());
//璧嬪�肩粰鏄庣粏琛�
frm.UpdateParent += (ss, ee) =>
{
@@ -130,10 +87,12 @@
_row["bld003"] = dym.itemName;//鐗╂枡鍚嶇О
_row["bld004"] = dym.itemModel;//瑙勬牸鍨嬪彿
_row["dabGuid"] = dym.dabGuid;
- _row["bld008"] = dym.dab007;//椤规
- _row["bld009"] = dym.dwName;//椤规
+ _row["xlsl"] = dym.dab006;
+ _row["bld008"] = dym.dab007;//宸查鐢ㄩ噺
+ _row["bld009"] = dym.dwName;//鍗曚綅
+ _row["bld001"] = dym.bld001;//宸ュ崟鍙�
+ _row["stockNum"] = dym.stockNum;//搴撳瓨鏁伴噺
_Table.Rows.Add(_row);
-
idx++;
}
gcMx1.BindingContext = new BindingContext();
@@ -152,6 +111,8 @@
frm.ShowDialog();
};
}
+
+
private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
_filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
@@ -193,7 +154,6 @@
parentForm = this.Parent as Form;
else
parentForm = this.Parent.Parent as Form;
-
gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
gridView1.ActiveFilter.Clear();
gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
@@ -234,7 +194,7 @@
lbGuid, txt_blNo, gridView1, "blNo");
if (string.IsNullOrEmpty(rowGuid))
{
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾鍒犻櫎鍚楋紵"))
@@ -252,20 +212,20 @@
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
if (_rtn.rtnCode > 0)
{
+ MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
if (xtraTabControl1.SelectedTabPageIndex == 0)
{ }
else
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
getPageList(this.pageBar1.CurrentPage);
}
-
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ else
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
-
}
/// <summary>
@@ -301,7 +261,7 @@
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_blNo, gridView1, "blNo");
if (string.IsNullOrEmpty(rowGuid))
{
- ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
@@ -317,7 +277,7 @@
}
//2025/07/12鍔犱笂淇敼鐘舵�佷笅涓嶈兘淇敼
txt_orgId.IsReadly = true;
- txt_aboutGuid.IsReadly = true;
+ txt_wwGys.IsReadly = true;
}
/// <summary>
/// 鏂板浜嬩欢
@@ -334,8 +294,6 @@
Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
//澧炲姞鏃讹紝榛樿缁勭粐
string deftOrg = UtilityHelper.GetFirstOrg(txt_orgId);
-
-
}
/// <summary>
/// 淇濆瓨浜嬩欢
@@ -345,35 +303,31 @@
private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
{
toolBarMenu1.isSetBtn = false;
- string inGdId = txt_aboutGuid.GetId();//宸ュ崟鍙�
- string inCkId = txt_bl010.GetId();//鍙戞枡浠�
- string inFlOrg = txt_orgId.GetId();//鍙戞枡缁勭粐
- if (string.IsNullOrEmpty(inFlOrg))
+ if (string.IsNullOrEmpty(txt_bl017.Text.Trim()))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍙戞枡缁勭粐锛�");
+ Gs.DevApp.ToolBox.MsgHelper.ShowError("璇烽�夋嫨鍗曟嵁绫诲瀷锛�");
+ txt_bl017.Focus();
+ return;
+ }
+ if (string.IsNullOrEmpty(txt_orgId.GetId()))
+ {
+ MsgHelper.ShowError("璇烽�夋嫨缁勭粐锛�");
txt_orgId.Focus();
return;
}
- if (string.IsNullOrEmpty(inGdId))
+ if (string.IsNullOrEmpty(txt_wwGys.GetId()))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨宸ュ崟锛�");
- txt_aboutGuid.Focus();
- return;
- }
- if (string.IsNullOrEmpty(txt_bl017.Text.Trim()))
- {
- Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨鍗曟嵁绫诲瀷锛�");
- txt_bl017.Focus();
+ MsgHelper.ShowError("璇烽�夋嫨渚涘簲鍟嗭紒");
+ txt_wwGys.Focus();
return;
}
var _obj = new
{
guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
- inOrgId = inFlOrg,//鍙戞枡缁勭粐
- inGdId = inGdId,//宸ュ崟鍙�
- inCkId = inCkId,//浠撳簱
inYy = txt_bl007.Text.Trim(),//鍘熷洜
inType = txt_bl017.Text.Trim(),//鍑哄簱绫诲埆
+ inOrgId = txt_orgId.GetId(),
+ inWwGys = txt_wwGys.GetId(),
list = new List<dynamic>(),
};
gvMx1.CloseEditor();
@@ -410,9 +364,9 @@
{
string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
if (_rtn.rtnCode > 0)
{
+ ToolBox.MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
lbGuid.Text = _rtn.rtnData.outGuid;
txt_blNo.Text = _rtn.rtnData.outNo;
toolBarMenu1.isSetBtn = true;
@@ -422,10 +376,12 @@
toolBarMenu1.currentAction = "";
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
}
+ else
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -484,7 +440,7 @@
if (toolBarMenu1.currentAction == "edit") isEdit = true;
if (string.IsNullOrEmpty(strGuid))
{
- ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
var _obj = new
@@ -498,12 +454,12 @@
if (_rtn.rtnCode > 0)
{
dynamic dy = _rtn.rtnData;
- _ucCk = dy.bl010;
+ _ucGys = dy.wwGys;
lbGuid.Text = strGuid;
List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
gvList.Add(gvMx1);
UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList);
- _ucCk = "";
+ _ucGys = "";
JObject _job = JObject.Parse(strJson);
JArray array = new JArray();
foreach (var a in _job["rtnData"]["list"])
@@ -524,14 +480,24 @@
}
}
else
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
+ /// <summary>
+ /// 瀹岀粨浜嬩欢
+ /// </summary>
+ /// <param name="sender"></param>
+ /// <param name="e"></param>
+ /// <exception cref="NotImplementedException"></exception>
+ private void ToolBarMenu1_btnWjClick(object sender, EventArgs e)
+ {
+ _toolCk(2);
+ }
/// <summary>
/// 瀹℃牳浜嬩欢
@@ -569,13 +535,17 @@
case 0:
strMsg = "鍙嶅鏍�";
break;
- };
+ case 2:
+ strMsg = "瀹岀粨";
+ break;
+ }
+ ;
toolBarMenu1.guidKey = "";
string rowGuid, rowName;
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_blNo, gridView1, "blNo");
if (string.IsNullOrEmpty(rowGuid))
{
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵"))
@@ -591,9 +561,10 @@
_webServiceName + "EditModelSubmit",
JsonConvert.SerializeObject(_obj));
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
- MsgHelper.Warning(_rtn.rtnData.outMsg.ToString());
+
if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
{
+ MsgHelper.ShowInformation(_rtn.rtnData.outMsg.ToString());
if (xtraTabControl1.SelectedTabPageIndex == 1)
{
getModel(lbGuid.Text.Trim());
@@ -603,10 +574,12 @@
Form parentForm = this.FindForm();
UtilityHelper.SetCheckIco(gridView1, "bl018", "bl016", "bl006", picCheckBox, parentForm, _inFieldValue.ToString());
}
+ else
+ MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString());
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -639,16 +612,39 @@
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
if (_rtn.rtnCode > 0)
{
- if (_rtn.rtnCode > 0) getModel(lbGuid.Text);
+ MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
+ getModel(lbGuid.Text);
}
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ else
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
}
+ private void ToolBarMenu1_btnPrintClick(object sender, EventArgs e)
+ {
+ //guidKey, rptParameter
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
+ lbGuid, txt_blNo, gridView1, "blNo");
+ if (string.IsNullOrEmpty(rowGuid))
+ {
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ return;
+ }
+ this.toolBarMenu1.rptParameter = "rpt_WWBL{"
+ + ""
+ + "," + ""
+ + "," + ""
+ + "," + ""
+ + "," + ""
+ + "}";
+ this.toolBarMenu1.guidKey = rowGuid;
+
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.3