@@ -26,7 +26,7 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
@@ -35,8 +35,18 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexTJ() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -62,6 +72,28 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageListForTJ(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = sRProjectBasicIBLL.GetPageListForTJ(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
@@ -82,8 +114,9 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var SRProjectBasicData = sRProjectBasicIBLL.GetSRProjectBasicEntity( keyValue ); | |||
var jsonData = new { | |||
var SRProjectBasicData = sRProjectBasicIBLL.GetSRProjectBasicEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
SRProjectBasic = SRProjectBasicData, | |||
}; | |||
return Success(jsonData); | |||
@@ -116,7 +149,7 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
SRProjectBasicEntity entity = strEntity.ToObject<SRProjectBasicEntity>(); | |||
sRProjectBasicIBLL.SaveEntity(keyValue,entity); | |||
sRProjectBasicIBLL.SaveEntity(keyValue, entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
@@ -0,0 +1,50 @@ | |||
@{ | |||
ViewBag.Title = "项目基本信息管理"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">项目编号</div> | |||
<input id="EnCode" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">项目名称</div> | |||
<input id="Name" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">项目类型</div> | |||
<div id="Type"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">项目级别</div> | |||
<div id="Lev"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">立项组织</div> | |||
<div id="ProjectOrganization"></div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/CustomFunction/Views/SRProjectBasic/IndexTJ.js") |
@@ -0,0 +1,141 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-09-15 15:53 | |||
* 描 述:项目基本信息管理 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 320, 400); | |||
$('#Type').lrDataItemSelect({ code: 'ProjectType_ZZ' }); | |||
$('#Lev').lrDataItemSelect({ code: 'ProjectLev_ZZ' }); | |||
$('#ProjectOrganization').lrDataItemSelect({ code: 'ProjectOrganization_ZZ' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/CustomFunction/SRProjectBasic/GetPageListForTJ', | |||
headData: [ | |||
{ label: "项目编号", name: "EnCode", width: 100, align: "left" }, | |||
{ label: "项目名称", name: "Name", width: 100, align: "left" }, | |||
{ | |||
label: "项目类型", name: "Type", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'ProjectType_ZZ', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "项目级别", name: "Lev", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'ProjectLev_ZZ', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "立项组织", name: "ProjectOrganization", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'ProjectOrganization_ZZ', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "项目总经费", name: "CostSum", width: 100, align: "left", statistics: true }, | |||
{ label: "项目来源", name: "Source", width: 100, align: "left" }, | |||
{ | |||
label: "项目负责人", name: "ManageName", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: value, | |||
keyId: 'empid', | |||
callback: function (_data) { | |||
callback(_data['empname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "项目成员", name: "Players", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
if (value.indexOf(',') != -1) { | |||
var content = ''; | |||
var timearr = value.split(','); | |||
for (var i = 0; i < timearr.length; i++) { | |||
learun.clientdata.getAsync('custmerData', | |||
{ | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | |||
key: timearr[i], | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
content += _data['f_realname'] + ','; | |||
} | |||
}); | |||
} | |||
content = content.substring(0, content.length - 1); | |||
callback(content); | |||
} else { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | |||
key: value, | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
} | |||
}, | |||
{ label: "项目成果个数", name: "acount", width: 100, align: "left" }, | |||
{ label: "开始时间", name: "StartTime", width: 100, align: "left" }, | |||
{ label: "结束时间", name: "EndTime", width: 100, align: "left" }, | |||
], | |||
mainId: 'ID', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -21,7 +21,7 @@ var bootstrap = function ($, learun) { | |||
value: "ID", | |||
text: "EnCode" | |||
}); | |||
$('#ManageName').lrDataSourceSelect({ code: 'EmpInfo', value: 'empid', text: 'empname' }); | |||
$('#ManageName').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' }); | |||
$('#Players').lrUserSelect({ type: '1' }); | |||
//$('#Players').lrselect({ | |||
@@ -84,11 +84,11 @@ var bootstrap = function ($, learun) { | |||
label: "项目负责人", name: "ManageName", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', | |||
key: value, | |||
keyId: 'empid', | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['empname']); | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
@@ -938,6 +938,7 @@ | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_UserChangeInfo\Index.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_Warning\Form.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_Warning\Index.js" /> | |||
<Content Include="Areas\CustomFunction\Views\SRProjectBasic\IndexTJ.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonSync\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonSync\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonTermAttemper\Form.js" /> | |||
@@ -7344,6 +7345,7 @@ | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\Index.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\PrintPublic.cshtml" /> | |||
<Content Include="Areas\ReceiveSendFeeManagement\Views\FD_PayManage\PrintSpecial.cshtml" /> | |||
<Content Include="Areas\CustomFunction\Views\SRProjectBasic\IndexTJ.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" /> | |||
@@ -43,6 +43,30 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<SRProjectBasicEntity> GetPageListForTJ(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return sRProjectBasicService.GetPageListForTJ(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
@@ -118,6 +118,13 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
[NotMapped] | |||
public string ManageName { get; set; } | |||
[NotMapped] | |||
public string Players { get; set; } | |||
[NotMapped] | |||
public int? acount { get; set; } | |||
#endregion | |||
} | |||
} | |||
@@ -22,6 +22,7 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
/// <returns></returns> | |||
IEnumerable<SRProjectBasicEntity> GetPageList(Pagination pagination, string queryJson); | |||
IEnumerable<SRProjectBasicEntity> GetList(); | |||
IEnumerable<SRProjectBasicEntity> GetPageListForTJ(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取SRProjectBasic表实体数据 | |||
/// </summary> | |||
@@ -89,6 +89,77 @@ namespace Learun.Application.TwoDevelopment.CustomFunction | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<SRProjectBasicEntity> GetPageListForTJ(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.ID, | |||
t.EnCode, | |||
t.Name, | |||
t.Type, | |||
t.Lev, | |||
t.ProjectOrganization, | |||
t.CostSum, | |||
t.StartTime, | |||
t.EndTime, | |||
t.Source, | |||
t.ContractNo,p.ManageName,p.Players,a.acount | |||
"); | |||
strSql.Append(" FROM SRProjectBasic t "); | |||
strSql.Append(@" left join SRProjectPeople p on p.SRProjectBasicId=t.id | |||
left join ( select SRProjectBasicId,count(1) as acount from SRProjectAchievement group by SRProjectBasicId) a on a.SRProjectBasicId=t.ID "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["EnCode"].IsEmpty()) | |||
{ | |||
dp.Add("EnCode", "%" + queryParam["EnCode"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.EnCode Like @EnCode "); | |||
} | |||
if (!queryParam["Name"].IsEmpty()) | |||
{ | |||
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.Name Like @Name "); | |||
} | |||
if (!queryParam["Type"].IsEmpty()) | |||
{ | |||
dp.Add("Type", queryParam["Type"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Type = @Type "); | |||
} | |||
if (!queryParam["Lev"].IsEmpty()) | |||
{ | |||
dp.Add("Lev", queryParam["Lev"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Lev = @Lev "); | |||
} | |||
if (!queryParam["ProjectOrganization"].IsEmpty()) | |||
{ | |||
dp.Add("ProjectOrganization", queryParam["ProjectOrganization"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ProjectOrganization = @ProjectOrganization "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<SRProjectBasicEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// | |||
/// </summary> | |||