提交代码

This commit is contained in:
2024-02-26 16:45:05 +08:00
parent 1f40c4aa91
commit f227bbeba2
26 changed files with 2379 additions and 85 deletions
@@ -30,9 +30,15 @@ namespace FineUIPro.Web.TestRun.DriverRun
driverRun.ProjectId,
driverRun.Code,
driverRun.UnitId,
driverRun.State,
driverRun.Implement,
driverRun.Descriptions,
driverRun.AttachUrl,
driverRun.InstallationId,
driverRun.InstallationNames,
driverRun.Objective,
driverRun.NeedCompletedDate,
driverRun.RealCompletedDate,
driverRun.Remark,
Unit.UnitName AS UnitName"
+ @" FROM DriverRun_DriverRun AS driverRun"
@@ -135,7 +141,51 @@ namespace FineUIPro.Web.TestRun.DriverRun
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DriverRunEdit.aspx?id={0}", Grid1.SelectedRowID, "编辑 - ")));
string id = Grid1.SelectedRowID;
Model.DriverRun_DriverRun data = BLL.DriverRunService.GetDriverRunById(id);
Model.DriverRun_DriverRunApprove approve = BLL.DriverRunApproveService.GetDriverRunApproveByDriverRunId(id);
if (approve != null)
{
if (!string.IsNullOrEmpty(approve.ApproveMan))
{
if (this.CurrUser.UserId == approve.ApproveMan || CurrUser.UserId == Const.sysglyId)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DriverRunEdit.aspx?id={0}", id, "编辑 - ")));
return;
}
else if (data.State == BLL.Const.DriverRun_Complete)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DriverRunView.aspx?id={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;
Model.DriverRun_DriverRun data = BLL.DriverRunService.GetDriverRunById(id);
if (data != null)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("DriverRunView.aspx?id={0}", id, "编辑 - ")));
}
}
#endregion
@@ -150,6 +200,7 @@ namespace FineUIPro.Web.TestRun.DriverRun
var info = BLL.DriverRunService.GetDriverRunById(rowID);
if (info != null)
{
BLL.DriverRunApproveService.DeleteDriverRunApprovesByDriverRunId(rowID);
BLL.DriverRunService.DeleteDriverRunById(rowID);
}
}
@@ -200,5 +251,70 @@ namespace FineUIPro.Web.TestRun.DriverRun
}
}
#endregion
/// <summary>
/// 把状态转换代号为文字形式
/// </summary>
/// <param name="state"></param>
/// <returns></returns>
protected string ConvertState(object state)
{
if (state != null)
{
if (state.ToString() == BLL.Const.DriverRun_Compile)
{
return "编制";
}
else if (state.ToString() == BLL.Const.DriverRun_Audit1)
{
return "开车负责人审批";
}
else if (state.ToString() == BLL.Const.DriverRun_Audit2)
{
return "保运主任审批";
}
else if (state.ToString() == BLL.Const.DriverRun_Audit3)
{
return "保运主任确认完成";
}
else if (state.ToString() == BLL.Const.DriverRun_Audit4)
{
return "开车负责人确认完成";
}
else if (state.ToString() == BLL.Const.DriverRun_Complete)
{
return "流程闭环";
}
else
{
return "";
}
}
return "";
}
//<summary>
//获取办理人姓名
//</summary>
//<param name="state"></param>
//<returns></returns>
protected string ConvertMan(object DriverRunId)
{
if (DriverRunId != null)
{
Model.DriverRun_DriverRunApprove a = BLL.DriverRunApproveService.GetDriverRunApproveByDriverRunId(DriverRunId.ToString());
if (a != null)
{
if (a.ApproveMan != null)
{
return BLL.UserService.GetUserByUserId(a.ApproveMan).UserName;
}
}
else
{
return "";
}
}
return "";
}
}
}