@@ -3,6 +3,8 @@ using System.Data; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | using Learun.Application.TwoDevelopment.EducationalAdministration; | ||||
using System.Web.Mvc; | using System.Web.Mvc; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Linq; | |||||
using Learun.Application.Organization; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | ||||
{ | { | ||||
@@ -16,7 +18,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public class FillinFromController : MvcControllerBase | public class FillinFromController : MvcControllerBase | ||||
{ | { | ||||
private FillinFromIBLL fillinFromIBLL = new FillinFromBLL(); | private FillinFromIBLL fillinFromIBLL = new FillinFromBLL(); | ||||
private DepartmentBLL departmentIBLL = new DepartmentBLL(); | |||||
#region 视图功能 | #region 视图功能 | ||||
/// <summary> | /// <summary> | ||||
@@ -26,6 +28,14 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
[HttpGet] | [HttpGet] | ||||
public ActionResult Index() | 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(); | return View(); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -36,9 +46,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult FormIndex() | public ActionResult FormIndex() | ||||
{ | { | ||||
var logininfo = LoginUserInfo.Get(); | var logininfo = LoginUserInfo.Get(); | ||||
ViewBag.userId = logininfo.userId; | |||||
ViewBag.isSystem = logininfo.isSystem; | 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(); | return View(); | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -24,8 +24,10 @@ var bootstrap = function ($, learun) { | |||||
code: 'ThisCycle', | code: 'ThisCycle', | ||||
select: function (item) { | select: function (item) { | ||||
var Cycles = $("#FillingCycle").lrselectGet(); | var Cycles = $("#FillingCycle").lrselectGet(); | ||||
if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) { | |||||
if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 3) { | |||||
$('#FillingTime').lrDataItemSelect({ code: 'CycleTime' }); | $('#FillingTime').lrDataItemSelect({ code: 'CycleTime' }); | ||||
} else if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) { | |||||
$('#FillingTime').lrDataItemSelect({ code: 'undefined' }); | |||||
} else { | } else { | ||||
$('#FillingTime').lrDataItemSelect({ code: 'undefined' }); | $('#FillingTime').lrDataItemSelect({ code: 'undefined' }); | ||||
} | } | ||||
@@ -3,7 +3,6 @@ | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | Layout = "~/Views/Shared/_Index.cshtml"; | ||||
} | } | ||||
<script type="text/javascript"> | <script type="text/javascript"> | ||||
var userId = '@ViewBag.userId'; | |||||
var isSystem = '@ViewBag.isSystem'; | var isSystem = '@ViewBag.isSystem'; | ||||
var departmentId= '@ViewBag.departmentId' | var departmentId= '@ViewBag.departmentId' | ||||
</script> | </script> | ||||
@@ -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) { | formatterAsync: function (callback, value, row, op, $cell) { | ||||
learun.clientdata.getAsync('dataItem', { | learun.clientdata.getAsync('dataItem', { | ||||
key: value, | key: value, | ||||
@@ -216,7 +216,6 @@ var bootstrap = function ($, learun) { | |||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.IsFlag = 0; | param.IsFlag = 0; | ||||
param.userId = userId; | |||||
param.isSystem = isSystem; | param.isSystem = isSystem; | ||||
param.departmentId = departmentId; | param.departmentId = departmentId; | ||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
@@ -41,9 +41,12 @@ var bootstrap = function ($, learun) { | |||||
code: 'ThisCycle', | code: 'ThisCycle', | ||||
select: function (item) { | select: function (item) { | ||||
var Cycles = $("#FillingCycle").lrselectGet(); | var Cycles = $("#FillingCycle").lrselectGet(); | ||||
if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) { | |||||
if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 3) { | |||||
$('#FillingTime').lrDataItemSelect({ code: 'CycleTime' }); | $('#FillingTime').lrDataItemSelect({ code: 'CycleTime' }); | ||||
} else { | |||||
} else if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) { | |||||
$('#FillingTime').lrDataItemSelect({ code: 'undefined' }); | |||||
} | |||||
else { | |||||
$('#FillingTime').lrDataItemSelect({ code: 'undefined' }); | $('#FillingTime').lrDataItemSelect({ code: 'undefined' }); | ||||
} | } | ||||
} | } | ||||
@@ -54,8 +54,10 @@ var bootstrap = function ($, learun) { | |||||
code: 'ThisCycle', | code: 'ThisCycle', | ||||
select: function (item) { | select: function (item) { | ||||
var Cycles = $("#FillingCycle").lrselectGet(); | var Cycles = $("#FillingCycle").lrselectGet(); | ||||
if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) { | |||||
if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 3) { | |||||
$('#FillingTime').lrDataItemSelect({ code: 'CycleTime' }); | $('#FillingTime').lrDataItemSelect({ code: 'CycleTime' }); | ||||
} else if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) { | |||||
$('#FillingTime').lrDataItemSelect({ code: 'undefined' }); | |||||
} else { | } else { | ||||
$('#FillingTime').lrDataItemSelect({ code: 'undefined' }); | $('#FillingTime').lrDataItemSelect({ code: 'undefined' }); | ||||
} | } | ||||
@@ -24,8 +24,15 @@ var bootstrap = function ($, learun) { | |||||
code: 'ThisCycle', | code: 'ThisCycle', | ||||
select: function (item) { | select: function (item) { | ||||
var Cycles = $("#FillingCycle").lrselectGet(); | var Cycles = $("#FillingCycle").lrselectGet(); | ||||
if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 2) { | |||||
if (Cycles != null && Cycles != "" && Cycles != undefined && Cycles == 3) { | |||||
$('#FillingTime').lrDataItemSelect({ code: 'CycleTime' }); | $('#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 { | } else { | ||||
$('#FillingTime').lrDataItemSelect({ code: 'undefined' }); | $('#FillingTime').lrDataItemSelect({ code: 'undefined' }); | ||||
} | } | ||||
@@ -2,7 +2,11 @@ | |||||
ViewBag.Title = "质量目标管理体系指标模块"; | ViewBag.Title = "质量目标管理体系指标模块"; | ||||
Layout = "~/Views/Shared/_Index.cshtml"; | Layout = "~/Views/Shared/_Index.cshtml"; | ||||
} | } | ||||
<div class="lr-layout " > | |||||
<script type="text/javascript"> | |||||
var isSystem = '@ViewBag.isSystem'; | |||||
var departmentId= '@ViewBag.departmentId' | |||||
</script> | |||||
<div class="lr-layout "> | |||||
<div class="lr-layout-center"> | <div class="lr-layout-center"> | ||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | <div class="lr-layout-wrap lr-layout-wrap-notitle "> | ||||
<div class="lr-layout-tool"> | <div class="lr-layout-tool"> | ||||
@@ -34,12 +38,17 @@ | |||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 添加</a> | <a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 添加</a> | ||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | ||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
<a id="lr_cancel" class="btn btn-default"><i class="fa fa-trash-o"></i> 撤回</a> | |||||
<a id="lr_formula" class="btn btn-default"><i class="fa fa-trash-o"></i> 设置公式</a> | |||||
@*<a id="lr_cycle" class="btn btn-default"><i class="fa fa-trash-o"></i> 设置周期</a>*@ | |||||
<a id="lr_people" class="btn btn-default"><i class="fa fa-trash-o"></i> 设置填报人</a> | |||||
<a id="lr_hide" class="btn btn-default"><i class="fa fa-trash-o"></i> 隐藏</a> | |||||
<a id="lr_import" class="btn btn-default"><i class="fa fa-trash-o"></i> 导入</a> | |||||
<a id="lr_more" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | |||||
<i class="fa fa-reorder"></i> <span class="lrlt">更多</span><span class="caret"></span> | |||||
</a> | |||||
<ul class="dropdown-menu pull-right"> | |||||
<li id="lr_cancel"><a><i></i> <span class="lrlt">撤回</span></a></li> | |||||
<li id="lr_formula"><a><i></i> <span class="lrlt">设置公式</span></a></li> | |||||
<li id="lr_people"><a><i></i> <span class="lrlt">设置填报人</span></a></li> | |||||
<li id="lr_hide"><a><i></i> <span class="lrlt">隐藏</span></a></li> | |||||
<li id="lr_import"><a><i></i> <span class="lrlt">导入</span></a></li> | |||||
</ul> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -242,6 +242,8 @@ var bootstrap = function ($, learun) { | |||||
}, | }, | ||||
search: function (param) { | search: function (param) { | ||||
param = param || {}; | param = param || {}; | ||||
param.isSystem = isSystem; | |||||
param.departmentId = departmentId; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -88,6 +88,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
dp.Add("FillingDept", queryParam["departmentId"].ToString(), DbType.String); | dp.Add("FillingDept", queryParam["departmentId"].ToString(), DbType.String); | ||||
strSql.Append(" AND t.FillingDept = @FillingDept "); | strSql.Append(" AND t.FillingDept = @FillingDept "); | ||||
} | } | ||||
else | |||||
{ | |||||
dp.Add("FillingDept", "undefined11", DbType.String); | |||||
strSql.Append(" AND t.FillingDept = @FillingDept "); | |||||
} | |||||
} | } | ||||
//sql条件 | //sql条件 | ||||
if (!queryParam["SqlParameter"].IsEmpty()) | if (!queryParam["SqlParameter"].IsEmpty()) | ||||