lu
2024-12-03 d343abf6635ad98a900babfeb80cc9021444d463
出库申请
已添加3个文件
已修改6个文件
650 ■■■■ 文件已修改
DevApp/Gs.DevApp/App.config 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesItemQt.Designer.cs 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/QiTa/Frm_MesItemQt.cs 161 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Gs.DevApp.csproj 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcLookCustomer.Designer.cs 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcLookCustomer.cs 108 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcLookCustomer.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcLookStaff.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
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" />
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;
    }
}
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;
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>
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;
                }
            }
        }
DevApp/Gs.DevApp/UserControl/UcLookCustomer.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,136 @@
namespace 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;
    }
}
DevApp/Gs.DevApp/UserControl/UcLookCustomer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,108 @@
using 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 "";
        }
    }
}
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>
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;