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/Ck/Frm_MesCgthSq.cs | 39 +++++++++ DevApp/Gs.DevApp/UserControl/SelectMesCgthSqLink.Designer.cs | 17 +++ DevApp/Gs.DevApp/UserControl/SelectMesCgthSqLink.cs | 29 +++++- DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.Designer.cs | 13 --- DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSqDj.cs | 17 ++- DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSqDj.Designer.cs | 93 +++++++++++++---------- 6 files changed, 140 insertions(+), 68 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.Designer.cs b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.Designer.cs index 43afbcd..1511448 100644 --- a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.Designer.cs @@ -125,7 +125,6 @@ this.rkmxGuid = new DevExpress.XtraGrid.Columns.GridColumn(); this.gvMx1id = new DevExpress.XtraGrid.Columns.GridColumn(); this.gvMx1mid = new DevExpress.XtraGrid.Columns.GridColumn(); - this.gvMx1isFinish = new DevExpress.XtraGrid.Columns.GridColumn(); this.gvMx1invBillNo = new DevExpress.XtraGrid.Columns.GridColumn(); this.gvMx1ebeln = new DevExpress.XtraGrid.Columns.GridColumn(); this.gvMx1itemId = new DevExpress.XtraGrid.Columns.GridColumn(); @@ -1122,7 +1121,6 @@ this.rkmxGuid, this.gvMx1id, this.gvMx1mid, - this.gvMx1isFinish, this.gvMx1invBillNo, this.gvMx1ebeln, this.gvMx1itemId, @@ -1175,16 +1173,6 @@ this.gvMx1mid.Name = "gvMx1mid"; this.gvMx1mid.Tag = "query_a.MID"; this.gvMx1mid.Width = 94; - // - // gvMx1isFinish - // - this.gvMx1isFinish.AppearanceCell.Options.UseFont = true; - this.gvMx1isFinish.Caption = "鏄惁瀹屾垚"; - this.gvMx1isFinish.FieldName = "isFinish"; - this.gvMx1isFinish.MinWidth = 50; - this.gvMx1isFinish.Name = "gvMx1isFinish"; - this.gvMx1isFinish.Tag = "query_a.IS_FINISH"; - this.gvMx1isFinish.Width = 94; // // gvMx1invBillNo // @@ -1564,7 +1552,6 @@ private DevExpress.XtraGrid.Columns.GridColumn rkmxGuid; private DevExpress.XtraGrid.Columns.GridColumn gvMx1id; private DevExpress.XtraGrid.Columns.GridColumn gvMx1mid; - private DevExpress.XtraGrid.Columns.GridColumn gvMx1isFinish; private DevExpress.XtraGrid.Columns.GridColumn gvMx1invBillNo; private DevExpress.XtraGrid.Columns.GridColumn gvMx1ebeln; private DevExpress.XtraGrid.Columns.GridColumn gvMx1itemId; diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs index 0d34401..c27778e 100644 --- a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs +++ b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSq.cs @@ -104,6 +104,44 @@ var frm2 = new SelectMesCgthSqLink(this.txt_thOrgId.GetId()); frm2.UpdateParent += (ss, ee) => { + try + { + var lst = ee.DynamicList; + DataTable _Table = (DataTable)gcMx1.DataSource; + foreach (dynamic dym in lst) + { + DataRow _row = _Table.NewRow(); + _row["id"] = dym.id; + _row["mid"] = dym.mid; + _row["rkmxGuid"] = dym.rkmxGuid;//鍏ュ簱鏄庣粏琛╣uid + _row["cgdh"] = dym.cgdh;//閲囪喘鍗曞彿 + _row["invWorkLine"] = dym.invWorkLine;//琛屽彿, + _row["wlbm"] = dym.wlbm; //鐗╂枡缂栧彿, + _row["wlmc"] = dym.wlmc; //鐗╂枡鍚嶇О, + _row["wlgg"] = dym.wlgg;//瑙勬牸鍨嬪彿, + _row["rksl"] = dym.rksl; //鍏ュ簱鏁伴噺, + _row["dwName"] = dym.dwName; + _row["eid"] = dym.eid; + _row["erpid"] = dym.erpid; + _row["itemId"] = dym.itemId; //鐗╂枡id, + _row["ysNum"] = dym.ysNum;//宸叉壂鏁伴噺 + _row["remark"] = dym.remark; + _row["orderNo"] = dym.orderNo; //搴忓彿 + _row["kcQty"] = dym.kcQty; //搴撳瓨鏁伴噺 + _Table.Rows.Add(_row); + } + gcMx1.BindingContext = new BindingContext(); + gcMx1.DataSource = _Table; + gcMx1.ForceInitialize(); + gvMx1.CloseEditor(); + gvMx1.PostEditor(); + gvMx1.UpdateCurrentRow(); + gvMx1.BestFitColumns(); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message); + } }; frm2.ShowDialog(); return; @@ -441,6 +479,7 @@ Quantity = decimal.Parse(row["sqNum"].ToString()), Bz = row["remark"].ToString(), DepotId = row["depotId"].ToString(), + ItemId = row["itemId"].ToString(), }); } } diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSqDj.Designer.cs b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSqDj.Designer.cs index f22cc43..1131fa1 100644 --- a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSqDj.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSqDj.Designer.cs @@ -30,14 +30,14 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - DevExpress.XtraLayout.ColumnDefinition columnDefinition5 = new DevExpress.XtraLayout.ColumnDefinition(); - DevExpress.XtraLayout.ColumnDefinition columnDefinition6 = new DevExpress.XtraLayout.ColumnDefinition(); - DevExpress.XtraLayout.ColumnDefinition columnDefinition7 = new DevExpress.XtraLayout.ColumnDefinition(); - DevExpress.XtraLayout.ColumnDefinition columnDefinition8 = new DevExpress.XtraLayout.ColumnDefinition(); - DevExpress.XtraLayout.RowDefinition rowDefinition5 = new DevExpress.XtraLayout.RowDefinition(); - DevExpress.XtraLayout.RowDefinition rowDefinition6 = new DevExpress.XtraLayout.RowDefinition(); - DevExpress.XtraLayout.RowDefinition rowDefinition7 = new DevExpress.XtraLayout.RowDefinition(); - DevExpress.XtraLayout.RowDefinition rowDefinition8 = new DevExpress.XtraLayout.RowDefinition(); + DevExpress.XtraLayout.ColumnDefinition columnDefinition1 = new DevExpress.XtraLayout.ColumnDefinition(); + DevExpress.XtraLayout.ColumnDefinition columnDefinition2 = new DevExpress.XtraLayout.ColumnDefinition(); + DevExpress.XtraLayout.ColumnDefinition columnDefinition3 = new DevExpress.XtraLayout.ColumnDefinition(); + DevExpress.XtraLayout.ColumnDefinition columnDefinition4 = new DevExpress.XtraLayout.ColumnDefinition(); + DevExpress.XtraLayout.RowDefinition rowDefinition1 = new DevExpress.XtraLayout.RowDefinition(); + DevExpress.XtraLayout.RowDefinition rowDefinition2 = new DevExpress.XtraLayout.RowDefinition(); + DevExpress.XtraLayout.RowDefinition rowDefinition3 = new DevExpress.XtraLayout.RowDefinition(); + DevExpress.XtraLayout.RowDefinition rowDefinition4 = new DevExpress.XtraLayout.RowDefinition(); this.toolBarMenu1 = new Gs.DevApp.UserControl.UcToolBarMenu(); this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage(); @@ -61,6 +61,7 @@ this.gv_fmrmode = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn7 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn18 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn19 = new DevExpress.XtraGrid.Columns.GridColumn(); this.pageBar1 = new UserControls.Data.UcPageBar(); this.xtraTabPage2 = new DevExpress.XtraTab.XtraTabPage(); this.splitMx1 = new DevExpress.XtraEditors.SplitContainerControl(); @@ -136,7 +137,7 @@ this.picCheckBox = new System.Windows.Forms.PictureBox(); this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem(); this.tips = new DevExpress.Utils.ToolTipController(this.components); - this.gridColumn19 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn20 = new DevExpress.XtraGrid.Columns.GridColumn(); ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); this.xtraTabControl1.SuspendLayout(); this.xtraTabPage1.SuspendLayout(); @@ -290,7 +291,8 @@ this.gv_fmrmode, this.gridColumn7, this.gridColumn18, - this.gridColumn19}); + this.gridColumn19, + this.gridColumn20}); this.gridView1.GridControl = this.gcMain1; this.gridView1.IndicatorWidth = 50; this.gridView1.Name = "gridView1"; @@ -487,6 +489,14 @@ this.gridColumn18.Visible = true; this.gridColumn18.VisibleIndex = 16; this.gridColumn18.Width = 94; + // + // gridColumn19 + // + this.gridColumn19.Caption = "涓婚敭GUID"; + this.gridColumn19.FieldName = "guid"; + this.gridColumn19.MinWidth = 25; + this.gridColumn19.Name = "gridColumn19"; + this.gridColumn19.Width = 94; // // pageBar1 // @@ -742,32 +752,32 @@ this.layoutControlItem15}); this.Root.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table; this.Root.Name = "Root"; - columnDefinition5.SizeType = System.Windows.Forms.SizeType.Percent; - columnDefinition5.Width = 100D; - columnDefinition6.SizeType = System.Windows.Forms.SizeType.Percent; - columnDefinition6.Width = 100D; - columnDefinition7.SizeType = System.Windows.Forms.SizeType.Percent; - columnDefinition7.Width = 100D; - columnDefinition8.SizeType = System.Windows.Forms.SizeType.Percent; - columnDefinition8.Width = 100D; + columnDefinition1.SizeType = System.Windows.Forms.SizeType.Percent; + columnDefinition1.Width = 100D; + columnDefinition2.SizeType = System.Windows.Forms.SizeType.Percent; + columnDefinition2.Width = 100D; + columnDefinition3.SizeType = System.Windows.Forms.SizeType.Percent; + columnDefinition3.Width = 100D; + columnDefinition4.SizeType = System.Windows.Forms.SizeType.Percent; + columnDefinition4.Width = 100D; this.Root.OptionsTableLayoutGroup.ColumnDefinitions.AddRange(new DevExpress.XtraLayout.ColumnDefinition[] { - columnDefinition5, - columnDefinition6, - columnDefinition7, - columnDefinition8}); - rowDefinition5.Height = 100D; - rowDefinition5.SizeType = System.Windows.Forms.SizeType.Percent; - rowDefinition6.Height = 100D; - rowDefinition6.SizeType = System.Windows.Forms.SizeType.Percent; - rowDefinition7.Height = 100D; - rowDefinition7.SizeType = System.Windows.Forms.SizeType.Percent; - rowDefinition8.Height = 100D; - rowDefinition8.SizeType = System.Windows.Forms.SizeType.Percent; + columnDefinition1, + columnDefinition2, + columnDefinition3, + columnDefinition4}); + rowDefinition1.Height = 100D; + rowDefinition1.SizeType = System.Windows.Forms.SizeType.Percent; + rowDefinition2.Height = 100D; + rowDefinition2.SizeType = System.Windows.Forms.SizeType.Percent; + rowDefinition3.Height = 100D; + rowDefinition3.SizeType = System.Windows.Forms.SizeType.Percent; + rowDefinition4.Height = 100D; + rowDefinition4.SizeType = System.Windows.Forms.SizeType.Percent; this.Root.OptionsTableLayoutGroup.RowDefinitions.AddRange(new DevExpress.XtraLayout.RowDefinition[] { - rowDefinition5, - rowDefinition6, - rowDefinition7, - rowDefinition8}); + rowDefinition1, + rowDefinition2, + rowDefinition3, + rowDefinition4}); this.Root.Size = new System.Drawing.Size(1126, 137); this.Root.TextVisible = false; // @@ -1348,13 +1358,15 @@ this.layoutControlItem4.Size = new System.Drawing.Size(138, 73); this.layoutControlItem4.TextSize = new System.Drawing.Size(50, 20); // - // gridColumn19 + // gridColumn20 // - this.gridColumn19.Caption = "涓婚敭GUID"; - this.gridColumn19.FieldName = "guid"; - this.gridColumn19.MinWidth = 25; - this.gridColumn19.Name = "gridColumn19"; - this.gridColumn19.Width = 94; + this.gridColumn20.Caption = "婧愬崟"; + this.gridColumn20.FieldName = "fHasLinkTxt"; + this.gridColumn20.MinWidth = 25; + this.gridColumn20.Name = "gridColumn20"; + this.gridColumn20.Visible = true; + this.gridColumn20.VisibleIndex = 17; + this.gridColumn20.Width = 94; // // Frm_MesCgthSqDj // @@ -1528,5 +1540,6 @@ private DevExpress.Utils.ToolTipController tips; private DevExpress.XtraGrid.Columns.GridColumn gridColumn11; private DevExpress.XtraGrid.Columns.GridColumn gridColumn19; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn20; } } \ No newline at end of file diff --git a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSqDj.cs b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSqDj.cs index 702768c..2371de9 100644 --- a/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSqDj.cs +++ b/DevApp/Gs.DevApp/DevFrm/Ck/Frm_MesCgthSqDj.cs @@ -186,7 +186,7 @@ } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } private void getModel(string strGuid) @@ -196,7 +196,7 @@ if (toolBarMenu1.currentAction == "edit") isEdit = true; if (string.IsNullOrEmpty(strGuid)) { - ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + ToolBox.MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } var _obj = new @@ -256,11 +256,11 @@ } } else - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + _rtn.rtnMsg); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg); } catch (Exception ex) { - ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } @@ -285,7 +285,7 @@ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemOutNo, gridView1, "itemOutNo"); if (string.IsNullOrEmpty(rowGuid)) { - MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); + MsgHelper.ShowError("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�"); return; } if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵")) @@ -301,9 +301,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()); @@ -312,10 +313,12 @@ gridView1.FocusedRowHandle = rowHandle; UtilityHelper.SetCheckIco(gridView1, "statusChk", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString()); } + else + MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString()); } catch (Exception ex) { - MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + MsgHelper.ShowError("鎻愮ず锛�" + ex.Message); } } diff --git a/DevApp/Gs.DevApp/UserControl/SelectMesCgthSqLink.Designer.cs b/DevApp/Gs.DevApp/UserControl/SelectMesCgthSqLink.Designer.cs index 630888f..663f1d4 100644 --- a/DevApp/Gs.DevApp/UserControl/SelectMesCgthSqLink.Designer.cs +++ b/DevApp/Gs.DevApp/UserControl/SelectMesCgthSqLink.Designer.cs @@ -41,6 +41,7 @@ this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn(); this.gv_Btn = new DevExpress.XtraGrid.Columns.GridColumn(); this.repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit(); @@ -84,6 +85,7 @@ this.gridColumn1, this.gridColumn2, this.gridColumn4, + this.gridColumn3, this.gv_Btn}); this.gridView1.GridControl = this.gcMain; this.gridView1.IndicatorWidth = 50; @@ -127,7 +129,7 @@ this.gridColumn1.OptionsColumn.AllowEdit = false; this.gridColumn1.Tag = "org.FNumber"; this.gridColumn1.Visible = true; - this.gridColumn1.VisibleIndex = 3; + this.gridColumn1.VisibleIndex = 4; this.gridColumn1.Width = 250; // // gridColumn2 @@ -150,6 +152,16 @@ this.gridColumn4.VisibleIndex = 2; this.gridColumn4.Width = 94; // + // gridColumn3 + // + this.gridColumn3.Caption = "搴撳瓨"; + this.gridColumn3.FieldName = "kcQty"; + this.gridColumn3.MinWidth = 25; + this.gridColumn3.Name = "gridColumn3"; + this.gridColumn3.Visible = true; + this.gridColumn3.VisibleIndex = 3; + this.gridColumn3.Width = 94; + // // gv_Btn // this.gv_Btn.Caption = "閫夋嫨"; @@ -158,7 +170,7 @@ this.gv_Btn.MinWidth = 25; this.gv_Btn.Name = "gv_Btn"; this.gv_Btn.Visible = true; - this.gv_Btn.VisibleIndex = 4; + this.gv_Btn.VisibleIndex = 5; this.gv_Btn.Width = 94; // // repositoryItemButtonEdit1 @@ -204,5 +216,6 @@ private DevExpress.XtraGrid.Columns.GridColumn gridColumn4; private DevExpress.XtraGrid.Columns.GridColumn gv_Btn; private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn3; } } \ No newline at end of file diff --git a/DevApp/Gs.DevApp/UserControl/SelectMesCgthSqLink.cs b/DevApp/Gs.DevApp/UserControl/SelectMesCgthSqLink.cs index d3d0383..ead5768 100644 --- a/DevApp/Gs.DevApp/UserControl/SelectMesCgthSqLink.cs +++ b/DevApp/Gs.DevApp/UserControl/SelectMesCgthSqLink.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Data; +using System.Web.UI.WebControls; using System.Windows.Forms; namespace Gs.DevApp.UserControl @@ -26,7 +27,7 @@ getPageList(1); } - + /// <summary> /// 閫夋嫨鍚庣殑鍥炶皟浜嬩欢 /// </summary> @@ -39,12 +40,12 @@ private void getPageList(int curPage) { var _sbSqlWhere = " and a.FSubsidiary=" + orgId; - var pgq = new PageQueryModel(curPage, 999999, "org.FNumber asc ,a.staff_no", "asc", "", _sbSqlWhere.ToString()); + var pgq = new PageQueryModel(curPage, 999999, "org.FNumber asc", "asc", "", _sbSqlWhere.ToString()); var json = JsonConvert.SerializeObject(pgq); try { var strReturn = UtilityHelper.HttpPost("", - _webServiceName + "GetListPage2", json); + _webServiceName + "GetListSelect", json); var dd = UtilityHelper.ReturnToTablePage(strReturn); if (dd.rtnCode > 0) { @@ -82,7 +83,7 @@ if (e.Button.Index == 0) { var dr = gridView1.GetDataRow(rowhandle); - var itemId = dr["itemId"].ToString(); + var itemId = dr["id"].ToString(); if (string.IsNullOrEmpty(itemId)) { return; @@ -90,10 +91,26 @@ var list = new List<dynamic>(); list.Add(new { - itemId = itemId, + id = "", + mid = "", + rkmxGuid = "",//鍏ュ簱鏄庣粏琛╣uid + cgdh = "",//閲囪喘鍗曞彿 + invWorkLine = "",//琛屽彿, + wlbm = dr["itemNo"].ToString(), //鐗╂枡缂栧彿, + wlmc = dr["itemName"].ToString(), //鐗╂枡鍚嶇О, + wlgg = dr["itemModel"].ToString(),//瑙勬牸鍨嬪彿, + rksl = "", //鍏ュ簱鏁伴噺, + dwName = dr["dwName"].ToString(), + eid = "", + erpid = "", + itemId = dr["id"].ToString(), //鐗╂枡id, + ysNum = "0",//宸叉壂鏁伴噺 + remark = "", + orderNo = "0", //搴忓彿 + kcQty = dr["kcQty"].ToString()//搴撳瓨鏁伴噺 }); UpdateParent?.Invoke(this, new UpdateParentEventArgs { DynamicList = list }); - Close(); + Close(); } } } -- Gitblit v1.9.3