From ada663bd38bc0c46d10d3a5955289a5ede463a2d Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期四, 24 十月 2024 16:04:10 +0800
Subject: [PATCH] 1
---
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs | 74 +++++++++++++++++++++++++++++++-----
1 files changed, 63 insertions(+), 11 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs
index 530db9e..feb7664 100644
--- a/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs
+++ b/DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs
@@ -1,7 +1,9 @@
+using DevExpress.XtraGrid.Views.Base.ViewInfo;
using DevExpress.XtraGrid.Views.Grid;
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
+using MES.Service.Modes;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
@@ -53,12 +55,23 @@
Gs.DevApp.UserControl.SelectCgMx frm = new UserControl.SelectCgMx();
frm.UpdateParent += (ss, ee) =>
{
- List<string> _StringList = new List<string>();
- _StringList = ee.StringList;
- MessageBox.Show(_StringList.Count.ToString());
+ List<string> lst = new List<string>();
+ lst = ee.StringList;
+ var _obj = lst;
+ string strReturn = UtilityHelper.HttpPost("", "MesInvItemArnDetailManager/GetListPageByCgmxGuid", JsonConvert.SerializeObject(_obj));
+ ReturnModel<DataTable> dt = UtilityHelper.ReturnToList(strReturn);
+ gcMx1.BindingContext = new BindingContext();
+ gcMx1.DataSource = dt.rtnData;
+ gcMx1.ForceInitialize();
};
frm.ShowDialog();
};
+ ucLookCk1.EditChanged += (s, e) =>
+ {
+ var ddd = this.ucLookCk1.GetValue();
+ lbCkName.Text = ddd[1];
+ };
+
}
/// <summary>
@@ -167,7 +180,7 @@
private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
{
string rowGuid = "", rowName = "";
- // (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1);
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1);
if (string.IsNullOrEmpty(rowGuid))
{
ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -197,17 +210,56 @@
private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
{
toolBarMenu1.isSetBtn = false;
- //if (string.IsNullOrEmpty(txt_account.Text.Trim()))
+ string _ckCode = ucLookCk1.GetValue()[2];//浠撳簱缂栧彿 depots_code
+ string _gysCode = ucLookSupplier1.GetValue()[2];//渚涘簲鍟嗙紪鍙�
+ if (string.IsNullOrEmpty(_ckCode))
{
- Gs.DevApp.ToolBox.MsgHelper.Warning("鐧诲綍璐﹀彿涓嶈兘涓虹┖锛�");
- // txt_account.Focus();
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨浠撳簱锛�");
+ ucLookCk1.Focus();
return;
}
- var _obj = new
+ if (string.IsNullOrEmpty(_gysCode))
{
- guid = lbGuid.Text.Trim(),//涓诲缓
-
- };
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨渚涘簲鍟嗭紒");
+ ucLookSupplier1.Focus();
+ return;
+ }
+ if (string.IsNullOrEmpty(txt_paperBillNo.Text.Trim()))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨閫佽揣鍗曞彿锛�");
+ txt_paperBillNo.Focus();
+ return;
+ }
+ MesInvItemArn _obj = new MesInvItemArn();
+ _obj.Guid = null;//鍒拌揣鍗曚富閿�
+ _obj.PaperBillNo = txt_paperBillNo.Text.Trim();//閫佽揣鍗曞彿;
+ _obj.Remark = "";//澶囨敞
+ _obj.SuppNo = _gysCode;//渚涘簲鍟嗙紪鍙�
+ _obj.DepotsCode = _ckCode;//浠撳簱缂栧彿 depots_code
+ _obj.FType = 1; //0=閲囪喘锛�1=濮斿
+ _obj.list = new List<MesInvItemArnDetail>();
+ gvMx1.CloseEditor();
+ gvMx1.UpdateCurrentRow();
+ for (int i = 0; i < gvMx1.DataRowCount; i++)
+ {
+ DataRow row = gvMx1.GetDataRow(i);
+ if (row != null)
+ {
+ Guid? _guid = null;
+ if (string.IsNullOrEmpty(row["guid"].ToString()))
+ _guid = null;
+ else
+ _guid = Guid.Parse(row["guid"].ToString());
+ _obj.list.Add(new MesInvItemArnDetail
+ {
+ Guid = _guid,
+ AboutGuid = Guid.Parse(row["aboutGuid"].ToString()),
+ ItemNo= row["itemNo"].ToString(),
+ //ItemId= int.Parse( row["itemId"].ToString()),
+ Quantity = decimal.Parse(row["quantity"].ToString()),
+ });
+ }
+ }
try
{
string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
--
Gitblit v1.9.3