啊鑫
2024-11-13 613c1a383b3e83fa3d6700ff81a7a57c275db9c4
IQC免检维护
已修改3个文件
72 ■■■■■ 文件已修改
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.Designer.cs 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/QC/Models/MesQaMj.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.Designer.cs
@@ -59,6 +59,7 @@
            this.toolBarMenu1 = new Gs.DevApp.UserControl.UcToolBarMenu();
            this.gcMain = new DevExpress.XtraGrid.GridControl();
            this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
            this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
            this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage();
            this.pageBar1 = new UserControls.Data.UcPageBar();
@@ -100,13 +101,13 @@
            this.gv_suppNo.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_suppNo.AppearanceCell.Options.UseFont = true;
            this.gv_suppNo.Caption = "供应商编码";
            this.gv_suppNo.FieldName = "suppNo";
            this.gv_suppNo.FieldName = "suppId";
            this.gv_suppNo.MinWidth = 50;
            this.gv_suppNo.Name = "gv_suppNo";
            this.gv_suppNo.OptionsColumn.AllowEdit = false;
            this.gv_suppNo.Tag = "query_a.SUPP_NO";
            this.gv_suppNo.Visible = true;
            this.gv_suppNo.VisibleIndex = 2;
            this.gv_suppNo.VisibleIndex = 3;
            this.gv_suppNo.Width = 94;
            // 
            // lb_itemId
@@ -130,7 +131,7 @@
            this.gv_itemId.OptionsColumn.AllowEdit = false;
            this.gv_itemId.Tag = "query_a.ITEM_ID";
            this.gv_itemId.Visible = true;
            this.gv_itemId.VisibleIndex = 0;
            this.gv_itemId.VisibleIndex = 1;
            this.gv_itemId.Width = 94;
            // 
            // lb_status
@@ -154,7 +155,7 @@
            this.gv_status.OptionsColumn.AllowEdit = false;
            this.gv_status.Tag = "query_a.STATUS";
            this.gv_status.Visible = true;
            this.gv_status.VisibleIndex = 7;
            this.gv_status.VisibleIndex = 8;
            this.gv_status.Width = 94;
            // 
            // lb_checkDate
@@ -188,7 +189,7 @@
            this.gv_checkDate.OptionsColumn.AllowEdit = false;
            this.gv_checkDate.Tag = "query_a.CHECK_DATE";
            this.gv_checkDate.Visible = true;
            this.gv_checkDate.VisibleIndex = 9;
            this.gv_checkDate.VisibleIndex = 10;
            this.gv_checkDate.Width = 94;
            // 
            // lb_checkUser
@@ -222,7 +223,7 @@
            this.gv_checkUser.OptionsColumn.AllowEdit = false;
            this.gv_checkUser.Tag = "query_a.CHECK_USER";
            this.gv_checkUser.Visible = true;
            this.gv_checkUser.VisibleIndex = 8;
            this.gv_checkUser.VisibleIndex = 9;
            this.gv_checkUser.Width = 94;
            // 
            // lb_lastupdateDate
@@ -256,7 +257,7 @@
            this.gv_lastupdateDate.OptionsColumn.AllowEdit = false;
            this.gv_lastupdateDate.Tag = "query_a.LASTUPDATE_DATE";
            this.gv_lastupdateDate.Visible = true;
            this.gv_lastupdateDate.VisibleIndex = 6;
            this.gv_lastupdateDate.VisibleIndex = 7;
            this.gv_lastupdateDate.Width = 94;
            // 
            // lb_lastupdateBy
@@ -290,7 +291,7 @@
            this.gv_lastupdateBy.OptionsColumn.AllowEdit = false;
            this.gv_lastupdateBy.Tag = "query_a.LASTUPDATE_BY";
            this.gv_lastupdateBy.Visible = true;
            this.gv_lastupdateBy.VisibleIndex = 5;
            this.gv_lastupdateBy.VisibleIndex = 6;
            this.gv_lastupdateBy.Width = 94;
            // 
            // lb_createDate
@@ -324,7 +325,7 @@
            this.gv_createDate.OptionsColumn.AllowEdit = false;
            this.gv_createDate.Tag = "query_a.CREATE_DATE";
            this.gv_createDate.Visible = true;
            this.gv_createDate.VisibleIndex = 4;
            this.gv_createDate.VisibleIndex = 5;
            this.gv_createDate.Width = 94;
            // 
            // lb_createBy
@@ -358,7 +359,7 @@
            this.gv_createBy.OptionsColumn.AllowEdit = false;
            this.gv_createBy.Tag = "query_a.CREATE_BY";
            this.gv_createBy.Visible = true;
            this.gv_createBy.VisibleIndex = 3;
            this.gv_createBy.VisibleIndex = 4;
            this.gv_createBy.Width = 94;
            // 
            // lb_itemNo
@@ -392,7 +393,7 @@
            this.gv_itemNo.OptionsColumn.AllowEdit = false;
            this.gv_itemNo.Tag = "query_a.ITEM_NO";
            this.gv_itemNo.Visible = true;
            this.gv_itemNo.VisibleIndex = 1;
            this.gv_itemNo.VisibleIndex = 2;
            this.gv_itemNo.Width = 94;
            // 
            // toolBarMenu1
@@ -426,6 +427,7 @@
            this.gridView1.Appearance.Row.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gridView1.Appearance.Row.Options.UseFont = true;
            this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
            this.gridColumn1,
            this.gv_itemId,
            this.gv_itemNo,
            this.gv_suppNo,
@@ -442,6 +444,16 @@
            this.gridView1.OptionsFind.ShowSearchNavButtons = false;
            this.gridView1.OptionsView.ShowAutoFilterRow = true;
            this.gridView1.OptionsView.ShowGroupPanel = false;
            //
            // gridColumn1
            //
            this.gridColumn1.Caption = "组织";
            this.gridColumn1.FieldName = "orgName";
            this.gridColumn1.MinWidth = 25;
            this.gridColumn1.Name = "gridColumn1";
            this.gridColumn1.Visible = true;
            this.gridColumn1.VisibleIndex = 0;
            this.gridColumn1.Width = 94;
            // 
            // xtraTabControl1
            // 
@@ -516,6 +528,7 @@
            // 
            // txt_suppNo
            // 
            this.txt_suppNo.IsReadly = false;
            this.txt_suppNo.KeyFile = "";
            this.txt_suppNo.Location = new System.Drawing.Point(114, 90);
            this.txt_suppNo.Margin = new System.Windows.Forms.Padding(0);
@@ -525,11 +538,13 @@
            // 
            // txt_itemId
            // 
            this.txt_itemId.IsReadly = false;
            this.txt_itemId.KeyFile = "";
            this.txt_itemId.Location = new System.Drawing.Point(114, 12);
            this.txt_itemId.Name = "txt_itemId";
            this.txt_itemId.Size = new System.Drawing.Size(150, 33);
            this.txt_itemId.TabIndex = 237;
            this.txt_itemId.Tag = "no";
            // 
            // txt_status
            // 
@@ -626,5 +641,6 @@
        private DevExpress.XtraEditors.CheckEdit txt_status;
        private UserControl.UcLookSupplier txt_suppNo;
        private UserControl.UcLookItems txt_itemId;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn1;
    }
}
DevApp/Gs.DevApp/DevFrm/QC/Frm_MesQaMj.cs
@@ -54,13 +54,13 @@
            txt_itemId.EditChanged += (s, e) =>
            {
                txt_itemNo.Text = this.txt_itemId.GetCode();
                var ItemId = this.txt_itemId.GetId();
                var ItemName = this.txt_itemId.GetName();
                GetCount(ItemId, ItemName);
                //var ItemId = this.txt_itemId.GetId();
                //var ItemName = this.txt_itemId.GetName();
                //GetCount(ItemId, ItemName);
            };
        }
        private void GetCount(string ItemId,string ItemName)
        private int GetCount(string ItemId,string ItemName)
        {
            //string rowGuid = "", rowName = "";
            //(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1);
@@ -74,16 +74,13 @@
            {
                string strJson = UtilityHelper.HttpPost("", _webServiceName + "GetCount", JsonConvert.SerializeObject(ItemId));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
                {
                    UtilityHelper.JumpToTab(xtraTabControl1, 0);
                    MsgHelper.Warning("提示:"+ ItemName+"这个物料已经维护了免检数据");
                }
                return _rtn.rtnCode;
                
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
                return -1;
            }
        }
        /// <summary>
@@ -231,7 +228,7 @@
        {
            toolBarMenu1.isSetBtn = false;
            string _ItemId = txt_itemId.GetId();
            string _suppNo = txt_suppNo.GetCode();
            string _suppNo = txt_suppNo.GetId();
            if (string.IsNullOrEmpty(_ItemId))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择物料!");
@@ -249,8 +246,21 @@
                Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建
                ItemId = Convert.ToInt32(_ItemId),
                ItemNo = txt_itemId.GetCode(),
                SuppNo= _suppNo,
                SuppId = _suppNo,
            };
            if (lbGuid.Text.Trim().Length == 0)
            {
                var ItemName = txt_itemNo.Text.Trim();
                var flag = GetCount(_ItemId, ItemName);
                if (flag > 0)
                {
                    UtilityHelper.JumpToTab(xtraTabControl1, 0);
                    MsgHelper.Warning("提示:" + ItemName + "这个物料已经维护了免检数据");
                    return;
                }
            }
            try
            {
                string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
DevApp/Gs.DevApp/DevFrm/QC/Models/MesQaMj.cs
@@ -61,6 +61,6 @@
    /// <summary>
    ///     供应商编码
    /// </summary>
    public string SuppNo { get; set; }
    public string SuppId { get; set; }
}
}