lu
2025-02-20 5c66ff724a6ab1bef5fe7877821ec91997151484
DevApp/Gs.DevApp/DevFrm/WW/WwBlcl.cs
@@ -14,7 +14,7 @@
{
    public partial class WwBlcl : DevExpress.XtraEditors.XtraUserControl
    {
        string _ucCk = "";//仓库
        string _webServiceName = "WWBlManager/";
        List<FilterEntity> _filterList = new List<FilterEntity>();
        public string strType = "";
@@ -23,7 +23,6 @@
            InitializeComponent();
            strType = _strType;
            txt_bl017.Text = _strType;
            // txt_bl017.Tag = "moren." + _strType;
        }
        protected override void OnCreateControl()
        {
@@ -38,8 +37,13 @@
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick;
            toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx( gvMx1);
            toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick;
            toolBarMenu1.btnLayoutClick += ToolBarMenu1_btnLayoutClick;
            Form parentForm = this.FindForm();
            List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
            gvList.Add(gridView1);
            Gs.DevApp.ToolBox.UtilityHelper.getGridViewConfig(parentForm.GetType().FullName, gvList);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx( gvMx1);
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter( gridView1, picCheckBox, parentForm, "bl018", "", (value) =>
            {
                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
@@ -53,11 +57,12 @@
            });
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            //设置仓库选择
            txt_bl010.getSuppler("");
            this.txt_bl010.EditChanged += (s, e) =>
            //设置组织
            this.txt_orgId.EditChanged += (s, e) =>
            {
                string orgdId = txt_orgId.GetId();
                if (string.IsNullOrEmpty(orgdId)) return;
                txt_bl010.getSuppler(orgdId, _ucCk);
            };
            //选择委外工单
            this.txt_aboutGuid.EditChanged += (s, e) =>
@@ -95,6 +100,28 @@
            Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1);
            Task.Delay(100);
            getPageList(1);
        }
        /// <summary>
        /// 日志
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnLogClick(object sender, EventArgs e)
        {
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_blNo, gridView1);
            toolBarMenu1.guidKey = rowGuid;
        }
        private void ToolBarMenu1_btnLayoutClick(object sender, EventArgs e)
        {
            Form parentForm = this.FindForm();
            string _formNamespace = parentForm.GetType().FullName;
            List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
            gvList.Add(gridView1);
            Gs.DevApp.UserControl.showLayOut DevFrm = new showLayOut(_formNamespace, gvList);
            DevFrm.ShowDialog();
        }
        /// <summary>
        /// 分页事件
@@ -259,6 +286,13 @@
            toolBarMenu1.isSetBtn = false;
            string inGdId = txt_aboutGuid.GetId();//工单号
            string inCkId = txt_bl010.GetId();//发料仓
            string inFlOrg= txt_orgId.GetId();//发料组织
            if (string.IsNullOrEmpty(inFlOrg))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择发料组织!");
                txt_orgId.Focus();
                return;
            }
            if (string.IsNullOrEmpty(inGdId))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择工单!");
@@ -280,7 +314,7 @@
            var _obj = new
            {
                guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建
                inOrgId = "",//
                inOrgId = inFlOrg,//发料组织
                inGdId = inGdId,//工单号
                inCkId = inCkId,//仓库
                inYy = txt_bl007.Text.Trim(),//原因
@@ -323,11 +357,13 @@
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                if (_rtn.rtnCode > 0)
                {
                    lbGuid.Text = _rtn.rtnData;
                    lbGuid.Text = _rtn.rtnData.outGuid;
                    txt_blNo.Text = _rtn.rtnData.outNo;
                    toolBarMenu1.isSetBtn = true;
                    List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
                    gvList.Add(gvMx1);
                    UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList);
                    toolBarMenu1.currentAction = "";
                }
            }
            catch (Exception ex)
@@ -344,7 +380,7 @@
        private void getPageList(int curPage)
        {
            var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            // _sbSqlWhere += " and bl017=200";
            _sbSqlWhere += " and a.bl008='" + strType + "'";
            PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString());
            string json = JsonConvert.SerializeObject(pgq);
            try
@@ -401,10 +437,12 @@
                if (_rtn.rtnCode > 0)
                {
                    dynamic dy = _rtn.rtnData;
                    _ucCk = dy.bl010;
                    lbGuid.Text = strGuid;
                    List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>();
                    gvList.Add(gvMx1);
                    UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit, gvList);
                    _ucCk = "";
                    JObject _job = JObject.Parse(strJson);
                    JArray array = new JArray();
                    foreach (var a in _job["rtnData"]["list"])
@@ -562,5 +600,6 @@
                }
            }
        }
    }
}