lu
2025-02-09 47d90c78a5e00f50e804705aa208ff1f264cb4f6
DevApp/Gs.DevApp/UserControl/UcToolBarMenu.cs
@@ -67,6 +67,42 @@
            if (Parent != null) getNamespace();
        }
        private bool _isCk(int _type)
        {
            Form parentForm = this.FindForm();
            if (parentForm != null)
            {
                PictureBox specificControl = (PictureBox)parentForm.Controls.Find("picCheckBox", true).FirstOrDefault();
                if (specificControl== null)
                    return false;
                if (specificControl.Tag == null)
                    return false;
                if (_type == 1)
                {
                    if (specificControl != null)
                    {
                        if (specificControl.Tag.ToString() == "已审核")
                        {
                            Gs.DevApp.ToolBox.MsgHelper.ShowInformation("该单据已被审核,无法进行操作!");
                            return true;
                        }
                    }
                }
                if (_type == 0)
                {
                    if (specificControl != null)
                    {
                        if (specificControl.Tag.ToString() == "未审核")
                        {
                            Gs.DevApp.ToolBox.MsgHelper.ShowInformation("该单据未被审核,无法进行操作!");
                            return true;
                        }
                    }
                }
            }
            return false;
        }
        private void BtnBoHui_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (btnBoHuiClick != null)
@@ -173,6 +209,8 @@
        private void BtnFchk_ItemClick(object sender, ItemClickEventArgs e)
        {
            bool bl = _isCk(0);
            if (bl) return;
            if (btnFChkClick != null)
            {
                btnFChkClick(this, e);
@@ -182,6 +220,8 @@
        private void BtnChk_ItemClick(object sender, ItemClickEventArgs e)
        {
            bool bl = _isCk(1);
            if (bl) return;
            if (btnChkClick != null)
            {
                btnChkClick(this, e);
@@ -226,6 +266,8 @@
        private void BtnFjianYan_ItemClick(object sender, ItemClickEventArgs e)
        {
            bool bl = _isCk(0);
            if (bl) return;
            if (btnFjianYanClick != null)
                btnFjianYanClick(this, e);
            else
@@ -249,6 +291,8 @@
        private void BtnJianYan_ItemClick(object sender, ItemClickEventArgs e)
        {
            bool bl = _isCk(1);
            if (bl) return;
            if (btnJianYanClick != null)
                btnJianYanClick(this, e);
            else
@@ -438,6 +482,11 @@
                lst.Add(btnLog.Name);
                lst.Add(btnPiZhun.Name);
                lst.Add(btnHelp.Name);
                lst.Add(btnBoHui.Name);
                lst.Add(btnTzbl.Name);
                lst.Add(btnKg.Name);
                lst.Add(btnWg.Name);
                lst.Add(btnZhongTai.Name);
                _enabledBtn(lst);
                this.currentAction = "esc";
                if (btnEscClick != null) btnEscClick(this, e);
@@ -464,6 +513,18 @@
                    lst.Add(btnFjianYan.Name);
                    lst.Add(btnQuery.Name);
                    lst.Add(btnLog.Name);
                    lst.Add(btnZhiLiangChk.Name);
                    lst.Add(btnZhiLiangFchk.Name);
                    lst.Add(btnPiZhun.Name);
                    lst.Add(btnBoHui.Name);
                    lst.Add(btnDesign.Name);
                    lst.Add(btnReport.Name);
                    lst.Add(btnKg.Name);
                    lst.Add(btnWg.Name);
                    lst.Add(btnZhongTai.Name);
                    lst.Add(btnHelp.Name);
                    lst.Add(btnLoad.Name);
                    lst.Add(btnTzbl.Name);
                    _enabledBtn(lst);
                }
            }
@@ -480,6 +541,8 @@
        private void BtnEdit_ItemClick(object sender, ItemClickEventArgs e)
        {
            bool bl = _isCk(1);
            if (bl) return;
            var lst = new List<string>();
            lst.Add(btnSave.Name);
            lst.Add(btnEsc.Name);
@@ -487,20 +550,17 @@
            _enabledBtn(lst);
            this.currentAction = "edit";
            if (btnEdtClick != null) btnEdtClick(this, e);
            Form parentForm = this.FindForm();
            if (parentForm != null)
            {
                Control specificControl = parentForm.Controls.Find("picCheckBox", true).FirstOrDefault();
                if (specificControl != null)
                {
                    specificControl.Visible = false;
                }
            }
        }
        private void BtnDel_ItemClick(object sender, ItemClickEventArgs e)
        {
            bool bl = _isCk(1);
            if (bl) return;
            if (btnDelClick != null) btnDelClick(this, e);
            // btnEsc.Enabled = false;
            this.currentAction = "";
        }
        /// <summary>
@@ -519,10 +579,11 @@
            Form parentForm = this.FindForm();
            if (parentForm != null)
            {
                Control specificControl = parentForm.Controls.Find("picCheckBox", true).FirstOrDefault();
                PictureBox specificControl = (PictureBox)parentForm.Controls.Find("picCheckBox", true).FirstOrDefault();
                if (specificControl != null)
                {
                    specificControl.Visible = false;
                    specificControl.Image = global::Gs.DevApp.Properties.Resources.ico_noCheck;
                    specificControl.Tag = "未审核";
                }
            }
        }
@@ -621,7 +682,6 @@
            var _obj = new
            {
                userGuid = LoginInfoModel.CurrentUser.LoginUserGuid,
                orgGuid = LoginInfoModel.CurrentUser.LoginOrgGuid,
                formNamespace = _formNamespace
            };
            var strReturn = "";