提交代码

This commit is contained in:
2023-10-31 15:22:02 +08:00
parent b0f60f4a58
commit 3eab5e32f6
28 changed files with 1730 additions and 96 deletions
@@ -238,7 +238,7 @@ namespace FineUIPro.Web.CQMS.Performance
}
else {
ShowNotify("当前日期未设置规则,请前往施工绩效设置页面进行操作。", MessageBoxIcon.Warning);
PageContext.RegisterStartupScript("CloseRefresh()");
//PageContext.RegisterStartupScript("CloseRefresh()");
return;
}
@@ -1185,6 +1185,24 @@ namespace FineUIPro.Web.CQMS.Performance
}
else
{
var NowDate = Convert.ToDateTime(drpCompileDateMonth.Text.Trim());
var Year = NowDate.Year;
var Month = 1;
if (NowDate.Month != 12)
{
Month = NowDate.Month + 1;
}
else
{
Year += 1;
}
//获取配置
var modelConfig = Funs.DB.CQMS_Performance_SetUp.FirstOrDefault(x => x.CreateYear == Year.ToString() && x.SortIndex == Month);
if (modelConfig==null)
{
return;
}
if (string.IsNullOrEmpty(CurrUser.LoginProjectId))
{
ShowNotify("未查询到当前项目,请刷新页面重试。", MessageBoxIcon.Warning);
@@ -1508,12 +1526,54 @@ namespace FineUIPro.Web.CQMS.Performance
return;
}
else {
model.States = "1";
Funs.DB.SubmitChanges();
ShowNotify("提交成功,请等待领导打分。", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("PerformanceSubmit.aspx?PerformanceGid=" + PerformanceGid + "&CreateDateMonth=" + drpCompileDateMonth.Text.Trim(), ""),
"提交报表", Unit.Parse("440px"), Unit.Parse("300px")));
//model.States = "1";
//Funs.DB.SubmitChanges();
//ShowNotify("提交成功,请等待领导打分。", MessageBoxIcon.Success);
}
}
}
/// <summary>
/// 修改出差天数
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnDays_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(PerformanceGid))
{
ShowNotify("未查询到数据,请先生成表单。", MessageBoxIcon.Warning);
return;
}
else
{
//查询状态是否是0 不是0的不允许修改
var model = Funs.DB.CQMS_Performance.FirstOrDefault(x => x.PerformanceGid == PerformanceGid);
if (model == null)
{
ShowNotify("未查询到数据,请先生成表单。", MessageBoxIcon.Warning);
return;
}
else
{
if (CurrUser.UserId != Const.sysglyId && CurrUser.UserId != Const.hfnbdId)
{
if (model.States != "0")
{
ShowNotify("当前数据已经提交,不允许修改。", MessageBoxIcon.Warning);
return;
}
}
}
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("OutDayEdit.aspx?PerformanceGid=" + PerformanceGid, ""),
"修改出差天数", Unit.Parse("440px"), Unit.Parse("300px")));
}
}
#region excel