From f489e359066e1036f13491ef128a355bc730afcb Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 24 六月 2025 13:36:18 +0800
Subject: [PATCH] bug
---
DevApp/Gs.DevApp/DevFrm/RkQC/Frm_CqfaItems.cs | 37 ++++++++-
DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.Designer.cs | 87 +++++++++++++--------
DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs | 92 +++++++++++++++++-----
3 files changed, 153 insertions(+), 63 deletions(-)
diff --git a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.Designer.cs b/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.Designer.cs
index 8411833..36b0a2c 100644
--- a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.Designer.cs
+++ b/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.Designer.cs
@@ -31,13 +31,13 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- DevExpress.XtraLayout.ColumnDefinition columnDefinition9 = new DevExpress.XtraLayout.ColumnDefinition();
- DevExpress.XtraLayout.ColumnDefinition columnDefinition10 = new DevExpress.XtraLayout.ColumnDefinition();
- DevExpress.XtraLayout.ColumnDefinition columnDefinition11 = new DevExpress.XtraLayout.ColumnDefinition();
- DevExpress.XtraLayout.ColumnDefinition columnDefinition12 = new DevExpress.XtraLayout.ColumnDefinition();
- DevExpress.XtraLayout.RowDefinition rowDefinition7 = new DevExpress.XtraLayout.RowDefinition();
- DevExpress.XtraLayout.RowDefinition rowDefinition8 = new DevExpress.XtraLayout.RowDefinition();
- DevExpress.XtraLayout.RowDefinition rowDefinition9 = new DevExpress.XtraLayout.RowDefinition();
+ 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 rowDefinition4 = new DevExpress.XtraLayout.RowDefinition();
+ DevExpress.XtraLayout.RowDefinition rowDefinition5 = new DevExpress.XtraLayout.RowDefinition();
+ DevExpress.XtraLayout.RowDefinition rowDefinition6 = new DevExpress.XtraLayout.RowDefinition();
this.toolBarMenu1 = new Gs.DevApp.UserControl.UcToolBarMenu();
this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage();
@@ -93,7 +93,8 @@
this.picCheckBox = new System.Windows.Forms.PictureBox();
this.tips = new DevExpress.Utils.ToolTipController(this.components);
this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
-
+ this.frm_CqfaItems1 = new Gs.DevApp.DevFrm.RkQC.Frm_CqfaItems();
+ this.frm_CqfaItems2 = new Gs.DevApp.DevFrm.RkQC.Frm_CqfaItems();
((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
this.xtraTabControl1.SuspendLayout();
this.xtraTabPage1.SuspendLayout();
@@ -579,29 +580,29 @@
this.layoutControlItem7});
this.Root.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table;
this.Root.Name = "Root";
- columnDefinition9.SizeType = System.Windows.Forms.SizeType.Percent;
- columnDefinition9.Width = 100D;
- columnDefinition10.SizeType = System.Windows.Forms.SizeType.Percent;
- columnDefinition10.Width = 100D;
- columnDefinition11.SizeType = System.Windows.Forms.SizeType.Percent;
- columnDefinition11.Width = 100D;
- columnDefinition12.SizeType = System.Windows.Forms.SizeType.Percent;
- columnDefinition12.Width = 100D;
+ 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;
this.Root.OptionsTableLayoutGroup.ColumnDefinitions.AddRange(new DevExpress.XtraLayout.ColumnDefinition[] {
- columnDefinition9,
- columnDefinition10,
- columnDefinition11,
- columnDefinition12});
- rowDefinition7.Height = 100D;
- rowDefinition7.SizeType = System.Windows.Forms.SizeType.Percent;
- rowDefinition8.Height = 100D;
- rowDefinition8.SizeType = System.Windows.Forms.SizeType.Percent;
- rowDefinition9.Height = 100D;
- rowDefinition9.SizeType = System.Windows.Forms.SizeType.Percent;
+ columnDefinition5,
+ columnDefinition6,
+ columnDefinition7,
+ columnDefinition8});
+ rowDefinition4.Height = 100D;
+ rowDefinition4.SizeType = System.Windows.Forms.SizeType.Percent;
+ rowDefinition5.Height = 100D;
+ rowDefinition5.SizeType = System.Windows.Forms.SizeType.Percent;
+ rowDefinition6.Height = 100D;
+ rowDefinition6.SizeType = System.Windows.Forms.SizeType.Percent;
this.Root.OptionsTableLayoutGroup.RowDefinitions.AddRange(new DevExpress.XtraLayout.RowDefinition[] {
- rowDefinition7,
- rowDefinition8,
- rowDefinition9});
+ rowDefinition4,
+ rowDefinition5,
+ rowDefinition6});
this.Root.Size = new System.Drawing.Size(1201, 111);
this.Root.TextVisible = false;
//
@@ -736,7 +737,7 @@
//
// splitContainerControl1.Panel1
//
-
+ this.splitContainerControl1.Panel1.Controls.Add(this.frm_CqfaItems1);
this.splitContainerControl1.Panel1.Text = "Panel1";
//
// splitContainerControl1.Panel2
@@ -762,7 +763,7 @@
//
// splitContainerControl2.Panel2
//
-
+ this.splitContainerControl2.Panel2.Controls.Add(this.frm_CqfaItems2);
this.splitContainerControl2.Panel2.Text = "Panel2";
this.splitContainerControl2.ShowSplitGlyph = DevExpress.Utils.DefaultBoolean.False;
this.splitContainerControl2.Size = new System.Drawing.Size(559, 415);
@@ -777,7 +778,7 @@
this.btnOut.Name = "btnOut";
this.btnOut.Size = new System.Drawing.Size(39, 29);
this.btnOut.TabIndex = 2;
- this.btnOut.Text = "<<";
+ this.btnOut.Text = ">>";
//
// btnIn
//
@@ -787,7 +788,7 @@
this.btnIn.Name = "btnIn";
this.btnIn.Size = new System.Drawing.Size(39, 29);
this.btnIn.TabIndex = 1;
- this.btnIn.Text = ">>";
+ this.btnIn.Text = "<<";
//
// picCheckBox
//
@@ -807,7 +808,22 @@
this.gridColumn3.MinWidth = 25;
this.gridColumn3.Name = "gridColumn3";
this.gridColumn3.Width = 94;
-
+ //
+ // frm_CqfaItems1
+ //
+ this.frm_CqfaItems1.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.frm_CqfaItems1.Location = new System.Drawing.Point(0, 0);
+ this.frm_CqfaItems1.Name = "frm_CqfaItems1";
+ this.frm_CqfaItems1.Size = new System.Drawing.Size(628, 415);
+ this.frm_CqfaItems1.TabIndex = 0;
+ //
+ // frm_CqfaItems2
+ //
+ this.frm_CqfaItems2.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.frm_CqfaItems2.Location = new System.Drawing.Point(0, 0);
+ this.frm_CqfaItems2.Name = "frm_CqfaItems2";
+ this.frm_CqfaItems2.Size = new System.Drawing.Size(476, 415);
+ this.frm_CqfaItems2.TabIndex = 0;
//
// Frm_Cqfa
//
@@ -936,6 +952,7 @@
private DevExpress.XtraEditors.SimpleButton btnIn;
private DevExpress.XtraEditors.SimpleButton btnOut;
private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
-
+ private Frm_CqfaItems frm_CqfaItems1;
+ private Frm_CqfaItems frm_CqfaItems2;
}
}
\ No newline at end of file
diff --git a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs b/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs
index 32be7ec..b8236e3 100644
--- a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs
+++ b/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_Cqfa.cs
@@ -1,4 +1,5 @@
-锘縰sing Gs.DevApp.Entity;
+锘縰sing DevExpress.XtraPivotGrid.Data;
+using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
using Newtonsoft.Json;
@@ -40,6 +41,18 @@
}, lbGuid);
getPageList(1);
pageBar1.PagerEvent += PageBar1_PagerEvent;
+ //绉诲叆
+ btnIn.Click += (s, e) =>
+ {
+ string strItemsGuids = frm_CqfaItems2.GetSelect();
+ _toolOutIn(1, strItemsGuids);
+ };
+ //绉诲嚭
+ btnOut.Click += (s, e) =>
+ {
+ string strItemsGuids = frm_CqfaItems1.GetSelect();
+ _toolOutIn(0, strItemsGuids);
+ };
}
private async void GridView1_ColumnFilterChanged(object sender, EventArgs e)
{
@@ -371,28 +384,8 @@
dynamic dy = _rtn.rtnData;
lbGuid.Text = strGuid;
UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit);
- Frm_CqfaItems frm_CqfaItems1 = new Gs.DevApp.DevFrm.RkQC.Frm_CqfaItems(QcSeason.cqcjyes.ToString(), txt_fSubsidiary.GetId());
- Frm_CqfaItems frm_CqfaItems2 = new Gs.DevApp.DevFrm.RkQC.Frm_CqfaItems(QcSeason.cqcjno.ToString(), txt_fSubsidiary.GetId());
- //
- // frm_CqfaItems1
- //
- frm_CqfaItems1.Dock = System.Windows.Forms.DockStyle.Fill;
- frm_CqfaItems1.Location = new System.Drawing.Point(0, 0);
- frm_CqfaItems1.Name = "frm_CqfaItems1";
- frm_CqfaItems1.Size = new System.Drawing.Size(628, 415);
- frm_CqfaItems1.TabIndex = 0;
- //
- // frm_CqfaItems2
- //
- frm_CqfaItems2.Dock = System.Windows.Forms.DockStyle.Fill;
- frm_CqfaItems2.Location = new System.Drawing.Point(0, 0);
- frm_CqfaItems2.Name = "frm_CqfaItems2";
- frm_CqfaItems2.Size = new System.Drawing.Size(476, 415);
- frm_CqfaItems2.TabIndex = 0;
- this.splitContainerControl1.Panel1.Controls.Add(frm_CqfaItems1);
- this.splitContainerControl2.Panel2.Controls.Add(frm_CqfaItems2);
- frm_CqfaItems1.Initialize();
- frm_CqfaItems2.Initialize();
+ frm_CqfaItems1.Initialize(QcSeason.cqcjyes.ToString(), txt_fSubsidiary.GetId());
+ frm_CqfaItems2.Initialize(QcSeason.cqcjno.ToString(), txt_fSubsidiary.GetId());
}
else
ToolBox.MsgHelper.ShowError("鎻愮ず锛�" + _rtn.rtnMsg);
@@ -458,5 +451,58 @@
MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
}
}
+
+
+ /// <summary>
+ /// 宸ュ叿鏉′簨浠�
+ /// </summary>
+ /// <param name="inFieldValue"></param>
+ private void _toolOutIn(int _inFieldValue, string _itemGuids)
+ {
+ string strMsg = "";
+ switch (_inFieldValue)
+ {
+ case 1:
+ strMsg = "绉诲叆";
+ break;
+ case 0:
+ strMsg = "绉诲嚭";
+ break;
+ };
+ string rowGuid, rowName;
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fabm, gridView1, "fabm");
+ if (string.IsNullOrEmpty(rowGuid))
+ {
+ MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
+ return;
+ }
+ if (!MsgHelper.AskQuestion("浣犻�夋嫨浜嗐��" + rowName + "銆戯紝纭畾" + strMsg + "鍚楋紵"))
+ return;
+ var _obj = new
+ {
+ guid = rowGuid,
+ inFieldValue = _inFieldValue,
+ inItemsGuids = _itemGuids
+ };
+ try
+ {
+ var strJson = UtilityHelper.HttpPost("",
+ _webServiceName + "EditModelOutIn",
+ JsonConvert.SerializeObject(_obj));
+ var _rtn = UtilityHelper.ReturnToDynamic(strJson);
+ if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0)
+ {
+ MsgHelper.ShowInformation("鎻愮ず锛�" + _rtn.rtnData.outMsg.ToString());
+ frm_CqfaItems1.Initialize(QcSeason.cqcjyes.ToString(), txt_fSubsidiary.GetId());
+ frm_CqfaItems2.Initialize(QcSeason.cqcjno.ToString(), txt_fSubsidiary.GetId());
+ }
+ else
+ MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString());
+ }
+ catch (Exception ex)
+ {
+ MsgHelper.ShowError("鎻愮ず锛�" + ex.Message);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_CqfaItems.cs b/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_CqfaItems.cs
index e3c9a04..18f4e7d 100644
--- a/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_CqfaItems.cs
+++ b/DevApp/Gs.DevApp/DevFrm/RkQC/Frm_CqfaItems.cs
@@ -1,4 +1,6 @@
-锘縰sing Gs.DevApp.Entity;
+锘縰sing DevExpress.RichEdit.Export;
+using DevExpress.Utils.DirectXPaint;
+using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
using System;
@@ -15,11 +17,9 @@
string orgId = "";
private List<FilterEntity> _filterList = new List<FilterEntity>();
private readonly string _webServiceName = "MesQmCheckitemManager/";
- public Frm_CqfaItems(string _strType, string _orgId)
+ public Frm_CqfaItems()
{
InitializeComponent();
- strType = _strType;
- orgId = _orgId;
pageBar1.setBar(false);
this.gvMain.CustomDrawColumnHeader += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomDrawColumnHeader(s, e); };
this.gvMain.MouseUp += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomMouseUp(s, e, gcMain, gvMain); };
@@ -31,8 +31,10 @@
pageBar1.PagerEvent += PageBar1_PagerEvent;
Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gvMain);
}
- public void Initialize()
+ public void Initialize(string _strType,string _orgId)
{
+ strType=_strType;
+ orgId=_orgId;
getPageList(1);
}
@@ -100,5 +102,30 @@
}
#endregion
+
+ public string GetSelect()
+ {
+ System.Text.StringBuilder sb = new System.Text.StringBuilder();
+ gvMain.PostEditor();
+ gvMain.UpdateCurrentRow();
+ DataTable dt = this.gcMain.DataSource as DataTable;
+ {
+ foreach (DataRow dr in dt.Rows)
+ {
+ string checkBox = dr["chkInt"].ToString();
+ string _guid = dr["guid"].ToString();
+ if (Gs.DevApp.ToolBox.UtilityHelper.ToCheck(checkBox))
+ {
+ if (sb.Length > 0)
+ sb.Append(",");
+ sb.Append(_guid);
+ }
+ }
+ }
+ return sb.ToString();
+ }
+
+
+
}
}
--
Gitblit v1.9.3