From d343abf6635ad98a900babfeb80cc9021444d463 Mon Sep 17 00:00:00 2001
From: lu <99954486@qq.com>
Date: 星期二, 03 十二月 2024 10:10:44 +0800
Subject: [PATCH] 出库申请
---
DevApp/Gs.DevApp/UserControl/UcLookStaff.cs | 2
DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesItemQt.cs | 161 +++++++------
DevApp/Gs.DevApp/UserControl/UcLookCustomer.Designer.cs | 136 ++++++++++++
DevApp/Gs.DevApp/UserControl/UcLookCustomer.resx | 120 ++++++++++
DevApp/Gs.DevApp/Gs.DevApp.csproj | 9
DevApp/Gs.DevApp/UserControl/UcLookCustomer.cs | 108 +++++++++
DevApp/Gs.DevApp/App.config | 4
DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesItemQt.Designer.cs | 50 ++--
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | 60 +++++
9 files changed, 544 insertions(+), 106 deletions(-)
diff --git a/DevApp/Gs.DevApp/App.config b/DevApp/Gs.DevApp/App.config
index 77ee15e..3ac99d8 100644
--- a/DevApp/Gs.DevApp/App.config
+++ b/DevApp/Gs.DevApp/App.config
@@ -28,8 +28,8 @@
</assemblyBinding>
</runtime>
<appSettings>
- <!--<add key="WebApiUrl" value="http://localhost:5263/" />-->
- <add key="WebApiUrl" value="http://192.168.1.145:81/" />
+ <add key="WebApiUrl" value="http://localhost:5263/" />
+ <!--<add key="WebApiUrl" value="http://192.168.1.145:81/" />-->
<add key="LogPath" value="logs" />
<add key="ProductName" value="骞挎繁绉戞妧 G-MES V2.0" />
<add key="PageSize" value="50" />
diff --git a/DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesItemQt.Designer.cs b/DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesItemQt.Designer.cs
index a3a4ecc..214d44e 100644
--- a/DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesItemQt.Designer.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesItemQt.Designer.cs
@@ -70,7 +70,6 @@
this.lb_qt019 = new DevExpress.XtraEditors.LabelControl();
this.gv_qt019 = new DevExpress.XtraGrid.Columns.GridColumn();
this.lb_qt018 = new DevExpress.XtraEditors.LabelControl();
- this.txt_qt018 = new DevExpress.XtraEditors.TextEdit();
this.gv_qt018 = new DevExpress.XtraGrid.Columns.GridColumn();
this.gv_qt017 = new DevExpress.XtraGrid.Columns.GridColumn();
this.lb_qt016 = new DevExpress.XtraEditors.LabelControl();
@@ -86,7 +85,6 @@
this.txt_qt010 = new DevExpress.XtraEditors.TextEdit();
this.gv_qt010 = new DevExpress.XtraGrid.Columns.GridColumn();
this.lb_qt009 = new DevExpress.XtraEditors.LabelControl();
- this.txt_qt009 = new DevExpress.XtraEditors.TextEdit();
this.gv_qt009 = new DevExpress.XtraGrid.Columns.GridColumn();
this.lb_qt008 = new DevExpress.XtraEditors.LabelControl();
this.gv_qt008 = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -125,6 +123,8 @@
this.labelControl11 = new DevExpress.XtraEditors.LabelControl();
this.lbGuid = new System.Windows.Forms.Label();
this.picCheckBox = new System.Windows.Forms.PictureBox();
+ this.txt_qt018 = new Gs.DevApp.UserControl.UcLookCustomer();
+ this.txt_qt009 = new Gs.DevApp.UserControl.UcLookWorkshop();
this.tabMxPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gcMx1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gvMx1)).BeginInit();
@@ -132,10 +132,8 @@
((System.ComponentModel.ISupportInitialize)(this.repositoryItemSearchLookUpEdit1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gridView2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txt_qt021.Properties)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.txt_qt018.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txt_qt016.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txt_qt010.Properties)).BeginInit();
- ((System.ComponentModel.ISupportInitialize)(this.txt_qt009.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txt_qt006.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txt_qt004.Properties)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.txt_qt003.Properties)).BeginInit();
@@ -601,15 +599,6 @@
this.lb_qt018.TabIndex = 273;
this.lb_qt018.Text = "瀹㈡埛 ";
//
- // txt_qt018
- //
- this.txt_qt018.Location = new System.Drawing.Point(580, 16);
- this.txt_qt018.Name = "txt_qt018";
- this.txt_qt018.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
- this.txt_qt018.Properties.Appearance.Options.UseFont = true;
- this.txt_qt018.Size = new System.Drawing.Size(150, 28);
- this.txt_qt018.TabIndex = 273;
- //
// gv_qt018
//
this.gv_qt018.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
@@ -794,15 +783,6 @@
this.lb_qt009.Size = new System.Drawing.Size(73, 21);
this.lb_qt009.TabIndex = 231;
this.lb_qt009.Text = "鐢宠閮ㄩ棬 ";
- //
- // txt_qt009
- //
- this.txt_qt009.Location = new System.Drawing.Point(580, 84);
- this.txt_qt009.Name = "txt_qt009";
- this.txt_qt009.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
- this.txt_qt009.Properties.Appearance.Options.UseFont = true;
- this.txt_qt009.Size = new System.Drawing.Size(150, 28);
- this.txt_qt009.TabIndex = 231;
//
// gv_qt009
//
@@ -1168,6 +1148,8 @@
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
+ this.panel1.Controls.Add(this.txt_qt009);
+ this.panel1.Controls.Add(this.txt_qt018);
this.panel1.Controls.Add(this.txt_qt008);
this.panel1.Controls.Add(this.txt_qt015);
this.panel1.Controls.Add(this.txt_qt019);
@@ -1181,14 +1163,12 @@
this.panel1.Controls.Add(this.lb_qt020);
this.panel1.Controls.Add(this.lb_qt019);
this.panel1.Controls.Add(this.lb_qt018);
- this.panel1.Controls.Add(this.txt_qt018);
this.panel1.Controls.Add(this.lb_qt016);
this.panel1.Controls.Add(this.txt_qt016);
this.panel1.Controls.Add(this.lb_qt015);
this.panel1.Controls.Add(this.lb_qt010);
this.panel1.Controls.Add(this.txt_qt010);
this.panel1.Controls.Add(this.lb_qt009);
- this.panel1.Controls.Add(this.txt_qt009);
this.panel1.Controls.Add(this.lb_qt008);
this.panel1.Controls.Add(this.lb_qt006);
this.panel1.Controls.Add(this.txt_qt006);
@@ -1293,6 +1273,22 @@
this.picCheckBox.TabStop = false;
this.picCheckBox.Visible = false;
//
+ // txt_qt018
+ //
+ this.txt_qt018.IsReadly = false;
+ this.txt_qt018.Location = new System.Drawing.Point(580, 16);
+ this.txt_qt018.Name = "txt_qt018";
+ this.txt_qt018.Size = new System.Drawing.Size(150, 28);
+ this.txt_qt018.TabIndex = 304;
+ //
+ // txt_qt009
+ //
+ this.txt_qt009.IsReadly = false;
+ this.txt_qt009.Location = new System.Drawing.Point(580, 84);
+ this.txt_qt009.Name = "txt_qt009";
+ this.txt_qt009.Size = new System.Drawing.Size(150, 28);
+ this.txt_qt009.TabIndex = 305;
+ //
// Frm_MesItemQt
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
@@ -1309,10 +1305,8 @@
((System.ComponentModel.ISupportInitialize)(this.repositoryItemSearchLookUpEdit1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gridView2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txt_qt021.Properties)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.txt_qt018.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txt_qt016.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txt_qt010.Properties)).EndInit();
- ((System.ComponentModel.ISupportInitialize)(this.txt_qt009.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txt_qt006.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txt_qt004.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.txt_qt003.Properties)).EndInit();
@@ -1362,7 +1356,6 @@
private DevExpress.XtraGrid.Columns.GridColumn gv_qt019;
private DevExpress.XtraEditors.LabelControl lb_qt018;
-private DevExpress.XtraEditors.TextEdit txt_qt018;
private DevExpress.XtraGrid.Columns.GridColumn gv_qt018;
private DevExpress.XtraGrid.Columns.GridColumn gv_qt017;
@@ -1382,7 +1375,6 @@
private DevExpress.XtraGrid.Columns.GridColumn gv_qt010;
private DevExpress.XtraEditors.LabelControl lb_qt009;
-private DevExpress.XtraEditors.TextEdit txt_qt009;
private DevExpress.XtraGrid.Columns.GridColumn gv_qt009;
private DevExpress.XtraEditors.LabelControl lb_qt008;
@@ -1441,5 +1433,7 @@
private DevExpress.XtraGrid.Columns.GridColumn gvMx1qd009;
private DevExpress.XtraGrid.Columns.GridColumn gvMx1qd010;
private DevExpress.XtraGrid.Columns.GridColumn gvMx1qd011;
+ private UserControl.UcLookCustomer txt_qt018;
+ private UserControl.UcLookWorkshop txt_qt009;
}
}
\ No newline at end of file
diff --git a/DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesItemQt.cs b/DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesItemQt.cs
index 57cac79..4d745e9 100644
--- a/DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesItemQt.cs
+++ b/DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesItemQt.cs
@@ -150,7 +150,7 @@
private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e)
{
string rowGuid = "", rowName = "";
- (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_qtck, gridView1, "qtck");
+ (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_qtck, gridView1, "qtck");
if (string.IsNullOrEmpty(rowGuid))
{
ToolBox.MsgHelper.Warning("璇峰厛閫夋嫨浣犺鎿嶄綔鐨勮锛�");
@@ -236,79 +236,90 @@
/// <param name="e"></param>
private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
{
- //toolBarMenu1.isSetBtn = false;
- //string inGys = txt_qt018.GetId();
- //string inCjId = txt_qt011.GetId();
- //if (string.IsNullOrEmpty(inGys))
- //{
- // Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨渚涘簲鍟嗭紒");
- // txt_qt018.Focus();
- // return;
- //}
- //if (string.IsNullOrEmpty(inCjId))
- //{
- // Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨浠撳簱锛�");
- // txt_qt011.Focus();
- // return;
- //}
- //var _obj = new
- //{
- // guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
- // inRklb = txt_qt003.Text.Trim(),//澶囨敞
- // inYwlx = txt_qt004.Text.Trim(),//涓氬姟绫诲瀷
- // inRkfs = txt_qt019.Text.Trim(),//鍏ュ簱鏂瑰紡
- // inRklx = txt_qt020.Text.Trim(),//鍏ュ簱绫诲瀷
- // inGys = inGys,//渚涘簲鍟�
- // inCjId = inCjId,//鍏ュ簱浠撳簱
- // inDepart = txt_qt009.Text.Trim(),//鐢宠閮ㄩ棬
- // inXsdh = txt_qt021.Text.Trim(),//閿�鍞崟鍙�
- // inRkyy = txt_qt010.Text.Trim(),//鍏ュ簱鍘熷洜
- // list = new List<dynamic>(),
- //};
- //gvMx1.CloseEditor();
- //gvMx1.UpdateCurrentRow();
- //if (gvMx1.DataRowCount <= 0)
- //{
- // MsgHelper.ShowError("鏄庣粏涓嶈兘涓虹┖锛岃閫夋嫨浣犵殑鏀舵枡鏄庣粏锛�");
- // return;
- //}
- //for (var i = 0; i < gvMx1.DataRowCount; i++)
- //{
- // var row = gvMx1.GetDataRow(i);
- // if (row != null)
- // {
- // Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString());
- // //string _msl = row["quantity"].ToString();
- // //if (string.IsNullOrEmpty(_msl))
- // //{
- // // MsgHelper.ShowError("鏁伴噺涓嶈兘涓虹┖锛�");
- // // return;
- // //}
- // _obj.list.Add(new
- // {
- // Guid = _guid,
- // ItemId = (row["itemId"].ToString()),
- // Sqsl = (row["qd007"].ToString()),
- // Bz = (row["qd010"].ToString()),
- // });
- // }
- //}
- //try
- //{
- // 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)
- // {
- // lbGuid.Text = _rtn.rtnData;
- // toolBarMenu1.isSetBtn = true;
- // UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false);
- // }
- //}
- //catch (Exception ex)
- //{
- // ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
- //}
+ toolBarMenu1.isSetBtn = false;
+ string inCusId = txt_qt018.GetId();
+ string inCkId = txt_qt008.GetId();
+ string inLlrId = txt_qt022.GetId();
+ string inDepart = txt_qt009.GetId();
+ string inScgdId = txt_qt006.Text.Trim();
+ if (string.IsNullOrEmpty(inCusId))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨瀹㈡埛锛�");
+ txt_qt018.Focus();
+ return;
+ }
+ if (string.IsNullOrEmpty(inCkId))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨浠撳簱锛�");
+ txt_qt008.Focus();
+ return;
+ }
+ if (string.IsNullOrEmpty(inLlrId))
+ {
+ Gs.DevApp.ToolBox.MsgHelper.Warning("璇烽�夋嫨棰嗘枡浜猴紒");
+ txt_qt022.Focus();
+ return;
+ }
+ var _obj = new
+ {
+ guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //涓诲缓
+ inRklb = txt_qt003.Text.Trim(),//涓氬姟绫诲埆
+ inYwlx = txt_qt004.Text.Trim(),//涓氬姟绫诲瀷
+ inRkfs = txt_qt019.Text.Trim(),//鍏ュ簱鏂瑰紡
+ inRklx = txt_qt020.Text.Trim(),//鍏ュ簱绫诲瀷
+ inCusId = inCusId,//瀹㈡埛
+ inCkId = inCkId,//浠撳簱
+ inDepart = inDepart,//鐢宠閮ㄩ棬
+ inXsdh = txt_qt021.Text.Trim(),//閿�鍞崟鍙�
+ inScgdId = inScgdId,//鐢熶骇宸ュ崟鍙�
+ inLlrId = inLlrId,//棰嗘枡浜�
+ inRkyy = txt_qt010.Text.Trim(),//鍘熷洜
+ list = new List<dynamic>(),
+ };
+ gvMx1.CloseEditor();
+ gvMx1.UpdateCurrentRow();
+ if (gvMx1.DataRowCount <= 0)
+ {
+ MsgHelper.ShowError("鏄庣粏涓嶈兘涓虹┖锛岃閫夋嫨浣犵殑鏀舵枡鏄庣粏锛�");
+ return;
+ }
+ for (var i = 0; i < gvMx1.DataRowCount; i++)
+ {
+ var row = gvMx1.GetDataRow(i);
+ if (row != null)
+ {
+ Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString());
+ //string _msl = row["quantity"].ToString();
+ //if (string.IsNullOrEmpty(_msl))
+ //{
+ // MsgHelper.ShowError("鏁伴噺涓嶈兘涓虹┖锛�");
+ // return;
+ //}
+ _obj.list.Add(new
+ {
+ Guid = _guid,
+ ItemId = (row["itemId"].ToString()),
+ Sqsl = (row["qd007"].ToString()),
+ Bz = (row["qd010"].ToString()),
+ });
+ }
+ }
+ try
+ {
+ 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)
+ {
+ lbGuid.Text = _rtn.rtnData;
+ toolBarMenu1.isSetBtn = true;
+ UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false);
+ }
+ }
+ catch (Exception ex)
+ {
+ ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ }
}
/// <summary>
@@ -488,7 +499,7 @@
gvMx1.SetFocusedRowCellValue("qd003", SelectedDataRow["itemName"]);
gvMx1.SetFocusedRowCellValue("qd004", SelectedDataRow["itemModel"]);
}
-
+
private void repositoryItemSearchLookUpEdit1_EditValueChanged_1(object sender, EventArgs e)
{
SearchLookUpEdit LookupEdit = sender as SearchLookUpEdit;
diff --git a/DevApp/Gs.DevApp/Gs.DevApp.csproj b/DevApp/Gs.DevApp/Gs.DevApp.csproj
index 8982c8f..9aadd43 100644
--- a/DevApp/Gs.DevApp/Gs.DevApp.csproj
+++ b/DevApp/Gs.DevApp/Gs.DevApp.csproj
@@ -588,6 +588,12 @@
<Compile Include="UserControl\UcLookCk.Designer.cs">
<DependentUpon>UcLookCk.cs</DependentUpon>
</Compile>
+ <Compile Include="UserControl\UcLookCustomer.cs">
+ <SubType>UserControl</SubType>
+ </Compile>
+ <Compile Include="UserControl\UcLookCustomer.Designer.cs">
+ <DependentUpon>UcLookCustomer.cs</DependentUpon>
+ </Compile>
<Compile Include="UserControl\UcLookItems.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -853,6 +859,9 @@
<EmbeddedResource Include="UserControl\UcLookCk.resx">
<DependentUpon>UcLookCk.cs</DependentUpon>
</EmbeddedResource>
+ <EmbeddedResource Include="UserControl\UcLookCustomer.resx">
+ <DependentUpon>UcLookCustomer.cs</DependentUpon>
+ </EmbeddedResource>
<EmbeddedResource Include="UserControl\UcLookItems.resx">
<DependentUpon>UcLookItems.cs</DependentUpon>
</EmbeddedResource>
diff --git a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
index f596b2b..84c5dbd 100644
--- a/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
+++ b/DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -542,6 +542,30 @@
txt.Enabled = false;
continue;
}
+
+ //鑷畾瀹㈡埛
+ if (colType is UcLookCustomer)
+ {
+ var txt = colType as UcLookCustomer;
+ txt.SetIdOrCode(strVal);
+ if (txt.IsReadly == false)
+ txt.Enabled = !isEdt;
+ else
+ txt.Enabled = false;
+ continue;
+ }
+ //鑷畾鍛樺伐
+ if (colType is UcLookStaff)
+ {
+ var txt = colType as UcLookStaff;
+ txt.SetIdOrCode(strVal);
+ if (txt.IsReadly == false)
+ txt.Enabled = !isEdt;
+ else
+ txt.Enabled = false;
+ continue;
+ }
+
if (colType is SimpleButton)
{
var txt = colType as SimpleButton;
@@ -698,6 +722,22 @@
txt.Enabled = !isEdt;
continue;
}
+ //鑷畾瀹㈡埛
+ if (ctrl is UcLookCustomer)
+ {
+ var txt = ctrl as UcLookCustomer;
+ txt.SetIdOrCode("-1");
+ txt.Enabled = !isEdt;
+ continue;
+ }
+ //鑷畾瀹㈡埛
+ if (ctrl is UcLookStaff)
+ {
+ var txt = ctrl as UcLookStaff;
+ txt.SetIdOrCode("-1");
+ txt.Enabled = !isEdt;
+ continue;
+ }
if (ctrl is SimpleButton)
{
var txt = ctrl as SimpleButton;
@@ -842,6 +882,26 @@
txt.Enabled = false;
continue;
}
+ //鑷畾涔夊鎴�
+ if (ctrl is UcLookCustomer)
+ {
+ var txt = ctrl as UcLookCustomer;
+ if (txt.IsReadly == false)
+ txt.Enabled = !isEdt;
+ else
+ txt.Enabled = false;
+ continue;
+ }
+ //鑷畾涔夊憳宸�
+ if (ctrl is UcLookStaff)
+ {
+ var txt = ctrl as UcLookStaff;
+ if (txt.IsReadly == false)
+ txt.Enabled = !isEdt;
+ else
+ txt.Enabled = false;
+ continue;
+ }
}
}
diff --git a/DevApp/Gs.DevApp/UserControl/UcLookCustomer.Designer.cs b/DevApp/Gs.DevApp/UserControl/UcLookCustomer.Designer.cs
new file mode 100644
index 0000000..85ff4c2
--- /dev/null
+++ b/DevApp/Gs.DevApp/UserControl/UcLookCustomer.Designer.cs
@@ -0,0 +1,136 @@
+锘縩amespace Gs.DevApp.UserControl
+{
+ partial class UcLookCustomer
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.lookSearchSupplier = new DevExpress.XtraEditors.SearchLookUpEdit();
+ this.searchLookUpEdit1View = new DevExpress.XtraGrid.Views.Grid.GridView();
+ this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn();
+ this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn();
+ this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn();
+ this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
+ this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn();
+ ((System.ComponentModel.ISupportInitialize)(this.lookSearchSupplier.Properties)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).BeginInit();
+ this.SuspendLayout();
+ //
+ // lookSearchSupplier
+ //
+ this.lookSearchSupplier.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.lookSearchSupplier.Location = new System.Drawing.Point(0, 0);
+ this.lookSearchSupplier.Name = "lookSearchSupplier";
+ this.lookSearchSupplier.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
+ this.lookSearchSupplier.Properties.Appearance.Options.UseFont = true;
+ this.lookSearchSupplier.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
+ new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
+ this.lookSearchSupplier.Properties.PopupView = this.searchLookUpEdit1View;
+ this.lookSearchSupplier.Size = new System.Drawing.Size(236, 28);
+ this.lookSearchSupplier.TabIndex = 10;
+ //
+ // searchLookUpEdit1View
+ //
+ this.searchLookUpEdit1View.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
+ this.gridColumn5,
+ this.gridColumn1,
+ this.gridColumn2,
+ this.gridColumn3,
+ this.gridColumn4});
+ this.searchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
+ this.searchLookUpEdit1View.Name = "searchLookUpEdit1View";
+ this.searchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = false;
+ this.searchLookUpEdit1View.OptionsView.ShowGroupPanel = false;
+ //
+ // gridColumn5
+ //
+ this.gridColumn5.Caption = "鎵�鍦ㄧ粍缁�";
+ this.gridColumn5.FieldName = "fSubsidiary";
+ this.gridColumn5.MinWidth = 200;
+ this.gridColumn5.Name = "gridColumn5";
+ this.gridColumn5.Visible = true;
+ this.gridColumn5.VisibleIndex = 0;
+ this.gridColumn5.Width = 200;
+ //
+ // gridColumn1
+ //
+ this.gridColumn1.Caption = "瀹㈡埛ID";
+ this.gridColumn1.FieldName = "id";
+ this.gridColumn1.MinWidth = 50;
+ this.gridColumn1.Name = "gridColumn1";
+ this.gridColumn1.Visible = true;
+ this.gridColumn1.VisibleIndex = 1;
+ //
+ // gridColumn2
+ //
+ this.gridColumn2.Caption = "瀹㈡埛缂栧彿";
+ this.gridColumn2.FieldName = "custNo";
+ this.gridColumn2.MinWidth = 80;
+ this.gridColumn2.Name = "gridColumn2";
+ this.gridColumn2.Visible = true;
+ this.gridColumn2.VisibleIndex = 2;
+ this.gridColumn2.Width = 80;
+ //
+ // gridColumn3
+ //
+ this.gridColumn3.Caption = "瀹㈡埛鍚嶇О";
+ this.gridColumn3.FieldName = "custName";
+ this.gridColumn3.MinWidth = 100;
+ this.gridColumn3.Name = "gridColumn3";
+ this.gridColumn3.Visible = true;
+ this.gridColumn3.VisibleIndex = 3;
+ this.gridColumn3.Width = 100;
+ //
+ // gridColumn4
+ //
+ this.gridColumn4.Caption = "guid";
+ this.gridColumn4.FieldName = "guid";
+ this.gridColumn4.Name = "gridColumn4";
+ //
+ // UcLookCustomer
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.lookSearchSupplier);
+ this.Name = "UcLookCustomer";
+ this.Size = new System.Drawing.Size(236, 28);
+ ((System.ComponentModel.ISupportInitialize)(this.lookSearchSupplier.Properties)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).EndInit();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private DevExpress.XtraEditors.SearchLookUpEdit lookSearchSupplier;
+ private DevExpress.XtraGrid.Views.Grid.GridView searchLookUpEdit1View;
+ private DevExpress.XtraGrid.Columns.GridColumn gridColumn5;
+ private DevExpress.XtraGrid.Columns.GridColumn gridColumn1;
+ private DevExpress.XtraGrid.Columns.GridColumn gridColumn2;
+ private DevExpress.XtraGrid.Columns.GridColumn gridColumn3;
+ private DevExpress.XtraGrid.Columns.GridColumn gridColumn4;
+ }
+}
diff --git a/DevApp/Gs.DevApp/UserControl/UcLookCustomer.cs b/DevApp/Gs.DevApp/UserControl/UcLookCustomer.cs
new file mode 100644
index 0000000..731b077
--- /dev/null
+++ b/DevApp/Gs.DevApp/UserControl/UcLookCustomer.cs
@@ -0,0 +1,108 @@
+锘縰sing DevExpress.XtraEditors;
+using Gs.DevApp.Entity;
+using Gs.DevApp.ToolBox;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace Gs.DevApp.UserControl
+{
+ public partial class UcLookCustomer : DevExpress.XtraEditors.XtraUserControl
+ {
+ public UcLookCustomer()
+ {
+ InitializeComponent();
+ lookSearchSupplier.Properties.NullText = "璇烽�夋嫨";
+ lookSearchSupplier.EditValueChanged +=
+ LookSearchSupplier_EditValueChanged;
+ getSuppler();
+ }
+
+ public bool IsReadly { get; set; }
+
+ /// <summary>
+ /// 鏀瑰彉浜嬩欢
+ /// </summary>
+ public event EventHandler EditChanged;
+
+ private void LookSearchSupplier_EditValueChanged(object sender,
+ EventArgs e)
+ {
+ if (EditChanged != null) EditChanged(this, e);
+ }
+
+ private void getSuppler()
+ {
+ var pgq = new PageQueryModel(1, 999999, "a.create_date", "asc", "", " and 1=1");
+ var json = JsonConvert.SerializeObject(pgq);
+ try
+ {
+ var strReturn = UtilityHelper.HttpPost("", "MesCustomerManager/GetListPage", json);
+ var rtn = UtilityHelper.ReturnToTablePage(strReturn);
+ var dt = rtn.rtnData.list;
+ lookSearchSupplier.Properties.DataSource = dt;
+ lookSearchSupplier.Properties.DisplayMember = "custName";
+ lookSearchSupplier.Properties.ValueMember = "id";
+ }
+ catch (Exception ex)
+ {
+ MsgHelper.Warning("鎻愮ず锛�" + ex.Message);
+ }
+ }
+
+ public string GetId()
+ {
+ var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView;
+ if (row != null)
+ {
+ string id = row["id"].ToString();
+ return id;
+ }
+ return "";
+ }
+ public string GetCode()
+ {
+ var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView;
+ if (row != null)
+ {
+ string id = row["[custNo]"].ToString();
+ return id;
+ }
+ return "";
+ }
+ public string GetName()
+ {
+ var name = lookSearchSupplier.Text.Trim();
+ return name;
+ }
+
+ public void SetIdOrCode(string Code)
+ {
+ if (Code == "-1" || string.IsNullOrEmpty(Code))
+ {
+ lookSearchSupplier.EditValue = null;
+ return;
+ }
+ lookSearchSupplier.EditValue = Int64.Parse(((Code.ToString().Trim())));
+ }
+
+
+ public string GetGuid()
+ {
+ var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView;
+ if (row != null)
+ {
+ string id = row["guid"].ToString();
+ return id;
+ }
+ return "";
+ }
+ }
+}
diff --git a/DevApp/Gs.DevApp/UserControl/UcLookCustomer.resx b/DevApp/Gs.DevApp/UserControl/UcLookCustomer.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/DevApp/Gs.DevApp/UserControl/UcLookCustomer.resx
@@ -0,0 +1,120 @@
+锘�<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>
\ No newline at end of file
diff --git a/DevApp/Gs.DevApp/UserControl/UcLookStaff.cs b/DevApp/Gs.DevApp/UserControl/UcLookStaff.cs
index 2fb2d17..96dd57e 100644
--- a/DevApp/Gs.DevApp/UserControl/UcLookStaff.cs
+++ b/DevApp/Gs.DevApp/UserControl/UcLookStaff.cs
@@ -86,7 +86,7 @@
public void SetIdOrCode(string Code)
{
- if (Code == "-1")
+ if (Code == "-1" || string.IsNullOrEmpty(Code))
{
lookSearchSupplier.EditValue = null;
return;
--
Gitblit v1.9.3