1
lu
2024-11-05 da1280610c34aa29467e97fee97de89c1eae4804
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs
@@ -7,6 +7,7 @@
using DevExpress.DataAccess.DataFederation;
using DevExpress.XtraEditors;
using DevExpress.XtraEditors.Controls;
using DevExpress.XtraGrid.Views.Base.ViewInfo;
using DevExpress.XtraGrid.Views.Grid;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
@@ -21,7 +22,6 @@
    {
        private List<FilterEntity> _filterList = new List<FilterEntity>();
        private readonly string _webServiceName = "MesInvItemArnManager/";
        public Frm_MesInvItemArn()
        {
            InitializeComponent();
@@ -38,6 +38,7 @@
            toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            toolBarMenu1.btnJianYanClick += ToolBarMenu1_btnJianYanClick;
            toolBarMenu1.btnFjianYanClick += ToolBarMenu1_btnFjianYanClick;
            toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
            gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
            getPageList(1, UtilityHelper.GetPageSize());
            gridView1.CustomDrawRowIndicator += (s, e) =>
@@ -63,7 +64,9 @@
                    Gs.DevApp.ToolBox.MsgHelper.ShowError("请先选择供应商,才能选择来料明细!");
                    return;
                }
                var frm = new SelectCgMx(this.txt_suppNo.GetCode());
                System.Text.StringBuilder sbWhere = new StringBuilder();
                sbWhere.Append(" and A.SUPPLIER=" + this.txt_suppNo.GetId());
                var frm = new SelectCgMx(this.txt_suppNo.GetCode(), sbWhere.ToString());
                frm.UpdateParent += (ss, ee) =>
                {
                    var lst = new List<string>();
@@ -87,6 +90,16 @@
                frm.ShowDialog();
            };
        }
        private void ToolBarMenu1_btnLogClick(object sender, EventArgs e)
        {
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_billNo, gridView1);
            toolBarMenu1.guidKey = rowGuid;
        }
        /// <summary>
        ///     反检验
        /// </summary>
@@ -269,13 +282,6 @@
            toolBarMenu1.isSetBtn = false;
            var _ckCode = txt_depotsCode.GetCode(); //仓库编号 depots_code
            var _gysCode = txt_suppNo.GetCode(); //供应商编号
            if (string.IsNullOrEmpty(_ckCode))
            {
                MsgHelper.Warning("请选择仓库!");
                txt_depotsCode.Focus();
                return;
            }
            if (string.IsNullOrEmpty(_gysCode))
            {
                MsgHelper.Warning("请选择供应商!");
@@ -283,17 +289,16 @@
                return;
            }
            if (string.IsNullOrEmpty(txt_paperBillNo.Text.Trim()))
            if (string.IsNullOrEmpty(_ckCode))
            {
                MsgHelper.Warning("请选择送货单号!");
                txt_paperBillNo.Focus();
                MsgHelper.Warning("请选择仓库!");
                txt_depotsCode.Focus();
                return;
            }
            var _obj = new MesInvItemArn();
            _obj.Guid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(lbGuid.Text.Trim()); //到货单主键
            _obj.PaperBillNo = txt_paperBillNo.Text.Trim(); //送货单号;
            _obj.Remark = ""; //备注
            _obj.Remark = txt_remark.Text.Trim(); //备注
            _obj.SuppNo = _gysCode; //供应商编号
            _obj.DepotsCode = _ckCode; //仓库编号 depots_code
            _obj.FType = txt_fType.Checked; //0=采购,1=委外
@@ -451,6 +456,11 @@
                var mxGuid = dr["guid"].ToString();
                if (!MsgHelper.AskQuestion("你选择了1条数据,确定删除吗?"))
                    return;
                if (string.IsNullOrEmpty(mxGuid))
                {
                    gvMx1.DeleteRow(rowhandle);
                    return;
                }
                var strJson = "";
                var lst = new List<string>();
                lst.Add(mxGuid);