From b3dea8292e8c0ebae01d3b826927c15add26ecd0 Mon Sep 17 00:00:00 2001 From: edy Date: Tue, 29 Jun 2021 10:06:42 +0800 Subject: [PATCH] --- .../Controllers/FillinFromController.cs | 20 +++++++++++++--- .../Views/FillinFrom/Form.js | 4 +++- .../Views/FillinFrom/FormIndex.cshtml | 1 - .../Views/FillinFrom/FormIndex.js | 3 +-- .../Views/FillinFrom/FormPeople.js | 7 ++++-- .../Views/FillinFrom/Formula.js | 4 +++- .../Views/FillinFrom/FormulaIndex.js | 9 +++++++- .../Views/FillinFrom/Index.cshtml | 23 +++++++++++++------ .../Views/FillinFrom/Index.js | 2 ++ .../FillinFrom/FillinFromService.cs | 5 ++++ 10 files changed, 60 insertions(+), 18 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs index 16a6c6840..ca947e236 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/FillinFromController.cs @@ -3,6 +3,8 @@ using System.Data; using Learun.Application.TwoDevelopment.EducationalAdministration; using System.Web.Mvc; using System.Collections.Generic; +using System.Linq; +using Learun.Application.Organization; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { @@ -16,7 +18,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public class FillinFromController : MvcControllerBase { private FillinFromIBLL fillinFromIBLL = new FillinFromBLL(); - + private DepartmentBLL departmentIBLL = new DepartmentBLL(); #region 视图功能 /// @@ -26,6 +28,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult Index() { + var logininfo = LoginUserInfo.Get(); + ViewBag.isSystem = logininfo.isSystem; + ViewBag.departmentId = ""; + var Model = departmentIBLL.GetEntity(logininfo.companyId, logininfo.departmentId); + if (Model.F_Manager == logininfo.realName) + { + ViewBag.departmentId = logininfo.departmentId; + } return View(); } /// @@ -36,9 +46,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult FormIndex() { var logininfo = LoginUserInfo.Get(); - ViewBag.userId = logininfo.userId; ViewBag.isSystem = logininfo.isSystem; - ViewBag.departmentId = logininfo.departmentId; + ViewBag.departmentId = ""; + var Model = departmentIBLL.GetEntity(logininfo.companyId, logininfo.departmentId); + if (Model.F_Manager == logininfo.realName) + { + ViewBag.departmentId = logininfo.departmentId; + } return View(); } /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Form.js index ea397eff4..fcd418319 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Form.js @@ -24,8 +24,10 @@ var bootstrap = function ($, learun) { code: 'ThisCycle', select: function (item) { var Cycles = $("#FillingCycle").lrselectGet(); - if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) { + if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 3) { $('#FillingTime').lrDataItemSelect({ code: 'CycleTime' }); + } else if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) { + $('#FillingTime').lrDataItemSelect({ code: 'undefined' }); } else { $('#FillingTime').lrDataItemSelect({ code: 'undefined' }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.cshtml index cbb15f0ad..d50b9851e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.cshtml @@ -3,7 +3,6 @@ Layout = "~/Views/Shared/_Index.cshtml"; } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js index a26ebe995..ae64207f0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormIndex.js @@ -153,7 +153,7 @@ var bootstrap = function ($, learun) { } }, { - label: "填报时间", name: "FillingTime", width: 100, align: "left", + label: "填报时间", name: "FillingTime", width: 100, align: "center", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('dataItem', { key: value, @@ -216,7 +216,6 @@ var bootstrap = function ($, learun) { search: function (param) { param = param || {}; param.IsFlag = 0; - param.userId = userId; param.isSystem = isSystem; param.departmentId = departmentId; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.js index b64b2eb66..82016407d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormPeople.js @@ -41,9 +41,12 @@ var bootstrap = function ($, learun) { code: 'ThisCycle', select: function (item) { var Cycles = $("#FillingCycle").lrselectGet(); - if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) { + if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 3) { $('#FillingTime').lrDataItemSelect({ code: 'CycleTime' }); - } else { + } else if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) { + $('#FillingTime').lrDataItemSelect({ code: 'undefined' }); + } + else { $('#FillingTime').lrDataItemSelect({ code: 'undefined' }); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Formula.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Formula.js index efe440d30..8fe150275 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Formula.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Formula.js @@ -54,8 +54,10 @@ var bootstrap = function ($, learun) { code: 'ThisCycle', select: function (item) { var Cycles = $("#FillingCycle").lrselectGet(); - if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) { + if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 3) { $('#FillingTime').lrDataItemSelect({ code: 'CycleTime' }); + } else if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) { + $('#FillingTime').lrDataItemSelect({ code: 'undefined' }); } else { $('#FillingTime').lrDataItemSelect({ code: 'undefined' }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormulaIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormulaIndex.js index ea397eff4..9230a6b74 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormulaIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/FormulaIndex.js @@ -24,8 +24,15 @@ var bootstrap = function ($, learun) { code: 'ThisCycle', select: function (item) { var Cycles = $("#FillingCycle").lrselectGet(); - if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) { + if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 3) { $('#FillingTime').lrDataItemSelect({ code: 'CycleTime' }); + } else if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) { + //$('#FillingTime').lrselect({ + // code: 'CycleTime', value: 'id', text: 'name', + // maxHeight: 200, + // select: function (item) { } + //}) + $('#FillingTime').lrDataItemSelect({ code: 'undefined' }); } else { $('#FillingTime').lrDataItemSelect({ code: 'undefined' }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.cshtml index f79d9f108..52f3620c4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.cshtml @@ -2,7 +2,11 @@ ViewBag.Title = "质量目标管理体系指标模块"; Layout = "~/Views/Shared/_Index.cshtml"; } -
+ +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.js index c7da98c2f..42d9cc2bd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/FillinFrom/Index.js @@ -242,6 +242,8 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + param.isSystem = isSystem; + param.departmentId = departmentId; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromService.cs index a5d807e4b..b5ab775ab 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/FillinFrom/FillinFromService.cs @@ -88,6 +88,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("FillingDept", queryParam["departmentId"].ToString(), DbType.String); strSql.Append(" AND t.FillingDept = @FillingDept "); } + else + { + dp.Add("FillingDept", "undefined11", DbType.String); + strSql.Append(" AND t.FillingDept = @FillingDept "); + } } //sql条件 if (!queryParam["SqlParameter"].IsEmpty())