From 3bce783a7c08190a09aebca59864ada10961ffc2 Mon Sep 17 00:00:00 2001
From: lu <123456>
Date: 星期二, 15 七月 2025 08:42:16 +0800
Subject: [PATCH] 采购退货
---
DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqsq.cs | 97 ++++++++++++++++++++++++++++++++----------------
1 files changed, 64 insertions(+), 33 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqsq.cs b/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqsq.cs
index 6334487..9537973 100644
--- a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqsq.cs
+++ b/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqsq.cs
@@ -13,7 +13,7 @@
{
public partial class Frm_Cqsq : DevExpress.XtraEditors.XtraForm
{
- string _webServiceName = "MesCgthSqManager/";
+ string _webServiceName = "RkqcSqManager/";
List<FilterEntity> _filterList = new List<FilterEntity>();
public Frm_Cqsq()
{
@@ -59,11 +59,44 @@
Gs.DevApp.ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨缁勭粐锛�");
return;
}
- var frm = new SelectCqsq(this.txt_kcOrgId.GetId());
- ////璧嬪�肩粰鏄庣粏琛�
+ var frm = new SelectCqsq(this.txt_kcOrgId.GetId());
+ //璧嬪�肩粰鏄庣粏琛�
frm.UpdateParent += (ss, ee) =>
{
-
+ try
+ {
+ var lst = ee.DynamicList;
+ DataTable _Table = (DataTable)gcMx1.DataSource;
+ foreach (dynamic dym in lst)
+ {
+ DataRow _row = _Table.NewRow();
+ _row["guid"] = "";//鏄庣粏guid
+ _row["pGuid"] = "";//涓昏〃guid
+ _row["itemBarCode"] = dym.itemBarCode;
+ _row["itemId"] = dym.itemId;
+ _row["itemNo"] = dym.itemNo;
+ _row["itemName"] = dym.itemName;
+ _row["itemModel"] = dym.itemModel;
+ _row["itemBarCodeSl"] = dym.itemBarCodeSl;
+ _row["yxqDate"] = dym.yxqDate;
+ _row["syts"] = dym.syts;
+ _row["cjcs"] = dym.cjcs;
+ _row["qckw"] = dym.qckw;
+ _Table.Rows.Add(_row);
+ }
+ gcMx1.BindingContext = new BindingContext();
+ gcMx1.DataSource = _Table;
+ gcMx1.ForceInitialize();
+ gvMx1.CloseEditor();
+ gvMx1.PostEditor();
+ gvMx1.UpdateCurrentRow();
+ gvMx1.BestFitColumns();
+ Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1);
+ }
+ catch (Exception ex)
+ {
+ Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message);
+ }
};
frm.ShowDialog();
};
@@ -185,13 +218,14 @@
else
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
getPageList(this.pageBar1.CurrentPage);
+ MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
}
-
- MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg);
+ else
+ MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
}
catch (Exception ex)
{
- MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
@@ -231,7 +265,7 @@
lbGuid, txt_billNo, gridView1);
if (string.IsNullOrEmpty(rowGuid))
{
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
@@ -242,9 +276,12 @@
else
{
List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
+ gvList.Add(gvMx2);
gvList.Add(gvMx1);
UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList);
}
+ //2025/07/12鍔犱笂淇敼鐘舵�佷笅涓嶈兘淇敼
+ txt_kcOrgId.IsReadly = true;
}
/// <summary>
/// 鏂板浜嬩欢
@@ -257,8 +294,10 @@
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4);
List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
gridViews.Add(gvMx1);
+ gridViews.Add(gvMx2);
UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews);
Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
+ Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2);
//澧炲姞鏃讹紝榛樿缁勭粐
string deftOrg = UtilityHelper.GetFirstOrg(txt_kcOrgId);
@@ -288,7 +327,7 @@
{
Guid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(lbGuid.Text.Trim()), //鍒拌揣鍗曚富閿�
Remark = txt_remark.Text.Trim(), //澶囨敞
- BillType = txt_billType.Text,//閫�鏂欐柟寮�
+ BillType = txt_billType.Text,
KcOrgId = _orgId,
list = new List<dynamic>(),
};
@@ -297,7 +336,7 @@
gvMx1.UpdateCurrentRow();
if (gvMx1.DataRowCount <= 0)
{
- MsgHelper.ShowError("鏄庣粏涓嶈兘涓虹┖锛岃閫夋嫨浣犵殑鏀舵枡鏄庣粏锛�");
+ MsgHelper.ShowError("鏄庣粏涓嶈兘涓虹┖锛岃閫夋嫨浣犵殑鏉$爜鏄庣粏锛�");
return;
}
for (var i = 0; i < gvMx1.DataRowCount; i++)
@@ -306,18 +345,10 @@
if (row != null)
{
Guid _guid = UtilityHelper.ToGuid(row["guid"].ToString());
- string _msl = row["sqsl"].ToString();
- if (string.IsNullOrEmpty(_msl))
- {
- MsgHelper.ShowError("鐢宠鏁伴噺涓嶈兘涓虹┖锛�");
- return;
- }
_obj.list.Add(new
{
Guid = _guid,
- DepotSectionCode = row["depotSectionCode"].ToString(),
- Gqsl = row["gqsl"].ToString(),
- ItemId = row["itemId"].ToString(),
+ ItemBarCode = row["itemBarCode"].ToString(),
});
}
}
@@ -327,7 +358,6 @@
_webServiceName + "EditModel",
JsonConvert.SerializeObject(_obj));
var _rtn = UtilityHelper.ReturnToDynamic(strJson);
-
if (_rtn.rtnCode > 0)
{
MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnMsg);
@@ -335,7 +365,7 @@
txt_billNo.Text = _rtn.rtnData.outNo;
toolBarMenu1.isSetBtn = true;
List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
- gvList.Add(gvMx1);
+ gvList.Add(gvMx2);
UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList);
toolBarMenu1.currentAction = "";
Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
@@ -402,7 +432,7 @@
if (toolBarMenu1.currentAction == "edit") isEdit = true;
if (string.IsNullOrEmpty(strGuid))
{
- ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
var _obj = new
@@ -440,17 +470,16 @@
{
Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1);
}
-
JArray array2 = new JArray();
foreach (var a in _job["rtnData"]["list2"])
{
- array.Add(a);
+ array2.Add(a);
}
DataTable dt2 = JsonConvert.DeserializeObject<DataTable>(array2.ToString());
if (dt2.Rows.Count > 0)
{
gcMx2.BindingContext = new BindingContext();
- gcMx2.DataSource = dt;
+ gcMx2.DataSource = dt2;
gcMx2.ForceInitialize();
gvMx2.BestFitColumns();
Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx2);
@@ -483,13 +512,14 @@
case 0:
strMsg = "鍙嶅鏍�";
break;
- };
+ }
+ ;
toolBarMenu1.guidKey = "";
string rowGuid, rowName;
(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1, "billNo");
if (string.IsNullOrEmpty(rowGuid))
{
- MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
return;
}
if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵"))
@@ -526,8 +556,9 @@
}
}
+
/// <summary>
- /// 鍒犻櫎鏄庣粏
+ /// 绉诲嚭鏄庣粏
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
@@ -563,17 +594,17 @@
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);
}
}
}
-
-
}
}
\ No newline at end of file
--
Gitblit v1.9.3