提交代码

This commit is contained in:
2025-03-05 16:48:17 +08:00
parent 64ee6e8635
commit 58beeab458
59 changed files with 4829 additions and 532 deletions
@@ -29,9 +29,7 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
/// </summary>
public void BindGrid()
{
string strSql = @"select BaseId,C.ProjectId,a.WorkSection,DrawingNo,DrawingName,Part,ProjectContent,Unit,Amount,WorkTeam
from QuantityManagement_Base C
left join QuantityManagement_Drawing a on a.DrawingId=C.DrawingId
string strSql = @"select * from View_QuantityManagement_Base C
where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
@@ -143,7 +141,58 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BaseEdit.aspx?BaseId={0}", Grid1.SelectedRowID, "编辑 - ")));
string id = Grid1.SelectedRowID;
var bases = BLL.BaseService.GetBaseById(id);
if (bases != null)
{
if (bases.State.Equals(Const.Base_Complete))
{
Alert.ShowInTop("已审批完成,请右键查看!", MessageBoxIcon.Warning);
return;
}
Model.QuantityManagement_BaseApprove approve = BLL.BaseApproveService.GetBaseApproveByBaseId(id);
if (approve != null)
{
if (!string.IsNullOrEmpty(approve.ApproveMan))
{
if (this.CurrUser.UserId == approve.ApproveMan || CurrUser.UserId == Const.sysglyId || CurrUser.UserId == Const.hfnbdId)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BaseEdit.aspx?BaseId={0}", id, "编辑 - ")));
return;
}
else if (bases.State == BLL.Const.Base_Complete)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BaseView.aspx?BaseId={0}", id, "查看 - ")));
return;
}
else
{
Alert.ShowInTop("您不是当前办理人,无法编辑,请右键查看!", MessageBoxIcon.Warning);
return;
}
}
}
else
{
Alert.ShowInTop("您不是当前办理人,无法编辑,请右键查看!", MessageBoxIcon.Warning);
return;
}
}
}
protected void btnMenuView_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string id = Grid1.SelectedRowID;
var bases = BLL.BaseService.GetBaseById(id);
if (bases != null)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BaseView.aspx?BaseId={0}", id, "查看 - ")));
}
}
/// <summary>
@@ -173,6 +222,7 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
var Base = BLL.BaseService.GetBaseById(rowID);
if (Base != null)
{
BLL.BaseApproveService.DeleteBaseApprovesByBaseId(rowID);
BLL.BaseService.DeleteBase(rowID);
}
}
@@ -233,5 +283,62 @@ namespace FineUIPro.Web.CQMS.QuantityManagement
}
}
#endregion
/// <summary>
/// 把状态转换代号为文字形式
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
protected string ConvertState(object state)
{
if (state != null)
{
if (state.ToString() == BLL.Const.Base_ReCompile)
{
return "重新编制";
}
else if (state.ToString() == BLL.Const.Base_Compile)
{
return "编制";
}
else if (state.ToString() == BLL.Const.Base_Audit1)
{
return "审核";
}
else if (state.ToString() == BLL.Const.Base_Complete)
{
return "审批完成";
}
else
{
return "";
}
}
return "";
}
//<summary>
//获取办理人姓名
//</summary>
//<param name="state"></param>
//<returns></returns>
protected string ConvertMan(object BaseCode)
{
if (BaseCode != null)
{
Model.QuantityManagement_BaseApprove a = BLL.BaseApproveService.GetBaseApproveByBaseId(BaseCode.ToString());
if (a != null)
{
if (a.ApproveMan != null)
{
return BLL.UserService.GetUserByUserId(a.ApproveMan).UserName;
}
}
else
{
return "";
}
}
return "";
}
}
}