SVN-Revision: r477
This commit is contained in:
wyf
2025-04-12 05:08:01 +00:00
parent 4c83bfe0b2
commit f41d3f4d0e
+22 -3
View File
@@ -201,6 +201,10 @@ namespace Lskj.PubBill
/// 主表动态生成的日期列 /// 主表动态生成的日期列
/// </summary> /// </summary>
public List<GridColumn> DateColumnList = new List<GridColumn>(); public List<GridColumn> DateColumnList = new List<GridColumn>();
/// <summary>
/// 附加右键菜单
/// </summary>
public SimpleButton itemCommon = new SimpleButton();
public BillModule() public BillModule()
{ {
@@ -910,13 +914,12 @@ namespace Lskj.PubBill
itemCommon.ItemClick += new ItemClickEventHandler(OnCommonItemClick); itemCommon.ItemClick += new ItemClickEventHandler(OnCommonItemClick);
if (tableCommon.Columns.Contains("menuCond")) if (tableCommon.Columns.Contains("menuCond"))
{ {
itemCommon.Enabled = ReplaceHelper.EvalCond(ReplaceHelper.ReplaceUserInfo(item["menuCond"] + "")); itemCommon.Enabled = ValidateCond(item["menuCond"] + "", null);
} }
pMenu.AddItem(itemCommon); pMenu.AddItem(itemCommon);
} }
else else
{ {
SimpleButton itemCommon = new SimpleButton();
//itemCommon.AutoSize = true; //itemCommon.AutoSize = true;
itemCommon.Text = item["menuname"] + ""; itemCommon.Text = item["menuname"] + "";
itemCommon.Tag = item; itemCommon.Tag = item;
@@ -929,7 +932,7 @@ namespace Lskj.PubBill
x += itemCommon.Width + 6; x += itemCommon.Width + 6;
if (tableCommon.Columns.Contains("menuCond")) if (tableCommon.Columns.Contains("menuCond"))
{ {
itemCommon.Enabled = ReplaceHelper.EvalCond(ReplaceHelper.ReplaceUserInfo(item["menuCond"] + "")); itemCommon.Enabled = ValidateCond(item["menuCond"] + "", null);
} }
j++; j++;
} }
@@ -2019,6 +2022,14 @@ namespace Lskj.PubBill
this.dbpFP.Enabled = this.btnDelete.Enabled = this.btnBillSave.Enabled = this.btnBillApply.Enabled = !isReadOnly; this.dbpFP.Enabled = this.btnDelete.Enabled = this.btnBillSave.Enabled = this.btnBillApply.Enabled = !isReadOnly;
this.ControlObj.CanExecControl = true; this.ControlObj.CanExecControl = true;
this.cb_input.Enabled = this.btn_input.Enabled = this.txt_input.Enabled = !isReadOnly; this.cb_input.Enabled = this.btn_input.Enabled = this.txt_input.Enabled = !isReadOnly;
if (this.itemCommon.Visible == true && this.itemCommon.Tag is DataRow rightRow)
{
string menuCode = rightRow["menuCond"] + "";
if (!string.IsNullOrEmpty(menuCode))
{
this.itemCommon.Enabled = ValidateCond(menuCode, rowItem); ;
}
}
this.BillRowItem = rowItem; this.BillRowItem = rowItem;
// 设置Brp模版 // 设置Brp模版
if (this.IsBrpTemplete || this.BillModel.IsBrp) if (this.IsBrpTemplete || this.BillModel.IsBrp)
@@ -2093,6 +2104,14 @@ namespace Lskj.PubBill
this.BillModel.SaveState = false; this.BillModel.SaveState = false;
this.ControlObj.SetReadOnlyAllControl(false); this.ControlObj.SetReadOnlyAllControl(false);
this.rdBlue.Enabled = this.rdRed.Enabled = true; this.rdBlue.Enabled = this.rdRed.Enabled = true;
if (this.itemCommon.Visible == true && this.itemCommon.Tag is DataRow rightRow)
{
string menuCode = rightRow["menuCond"] + "";
if (!string.IsNullOrEmpty(menuCode))
{
this.itemCommon.Enabled = ValidateCond(menuCode, rowItem); ;
}
}
// 通过右键菜单打开单据,假如明细有数据则在初始化时使用传入数据. // 通过右键菜单打开单据,假如明细有数据则在初始化时使用传入数据.
if (this.BillModel.DetailTreeTable) if (this.BillModel.DetailTreeTable)
{ {