@@ -59,7 +59,7 @@ | |||
valList.push(item.Score) | |||
}) | |||
console.log(res); | |||
//console.log(res); | |||
data=res; | |||
loadData(data[0],1); | |||
// $page.find('.lr-badge').text(data.records); | |||
@@ -225,7 +225,7 @@ | |||
}; | |||
function loadData(data,num){ | |||
console.log("数据",data) | |||
//console.log("数据",data) | |||
// valList | |||
var titleCon = '' | |||
titleCon+='<p>'+'<span>'+num+'</span>'+'</p>'+'<div>'+data.Assessment+'<span>'+'('+data.scorePre+'分)'+'</span>'+'</div>' | |||
@@ -46,6 +46,18 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexXZDetail() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -147,7 +159,19 @@ namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers | |||
dT_EvaluationDataIBLL.UpdateStatusForZPByMId(MainId, Status); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 党小组评分 提交/去审核 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult UpdateStatusForXZ(string keyValue, string Status) | |||
{ | |||
dT_EvaluationDataIBLL.UpdateStatusForXZById(keyValue, Status); | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
@@ -40,10 +40,7 @@ | |||
<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_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_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a>*@ | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 提交</a> | |||
@*<a id="lr_submit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 提交</a>*@ | |||
<a id="lr_nocheck" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 去审</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
@@ -40,9 +40,8 @@ | |||
<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_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_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
@*<a id="lr_lookDetail" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看详情</a>*@ | |||
<a id="lr_nocheck" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 去审</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
@@ -22,6 +22,36 @@ var bootstrap = function ($, learun) { | |||
$('#BeAssessed').lrDataSourceSelect({ code: 'PartyMember', value: 'id', text: 'name' }); | |||
//$('#ScoreType').lrDataItemSelect({ code: 'ScoringPersonnel' }); | |||
//去审 | |||
$('#lr_nocheck').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
learun.layerConfirm('是否确认去审!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/PersonnelManagement/DT_EvaluationData/UpdateStatusForXZ', { keyValue: keyValue, Status: '0' }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
}); | |||
//查看详情 | |||
$('#lr_lookDetail').on('click', function () { | |||
var MainId = $('#gridtable').jfGridValue('MainId'); | |||
var Assessed = $('#gridtable').jfGridValue('Assessed'); | |||
if (learun.checkrow(Assessed)) { | |||
learun.layerForm({ | |||
id: 'indexdetail', | |||
title: '评分详情', | |||
url: top.$.rootUrl + '/PersonnelManagement/DT_EvaluationData/IndexXZDetail?MainId=' + MainId + '&Assessed=' + Assessed, | |||
width: 650, | |||
height: 450, | |||
callBack: function (id) { | |||
//return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -52,23 +82,15 @@ var bootstrap = function ($, learun) { | |||
{ label: "分值", name: "Score", width: 100, align: "left" }, | |||
{ | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (value, row) { | |||
//case t.Status when -1 then '未打分' when 0 then '草稿' when 1 then '待审核' when 2 then '审核通过' when 3 then '未通过' end | |||
if (value == '-1') { | |||
return '未打分'; | |||
} | |||
else if (value == '0') { | |||
return '草稿'; | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == '-1') { | |||
return "<span class=\"label label-default\">未打分</span>"; | |||
} else if (cellvalue == '0') { | |||
return "<span class=\"label label-primary\">草稿</span>"; | |||
} else if (cellvalue == '1') { | |||
return "<span class=\"label label-success\">已提交</span>"; | |||
} | |||
else if (value == '1') { | |||
return '已提交'; | |||
} | |||
//else if (value == '2') { | |||
// return '审核通过'; | |||
//} | |||
//else if (value == '3') { | |||
// return '审核未通过'; | |||
//} | |||
} | |||
}, | |||
], | |||
@@ -0,0 +1,27 @@ | |||
@{ | |||
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> | |||
</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_nocheck" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 去审</a> | |||
<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/PersonnelManagement/Views/DT_EvaluationData/IndexXZDetail.js") |
@@ -0,0 +1,95 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2021-12-08 12:07 | |||
* 描 述:评价考核表 | |||
*/ | |||
var refreshGirdData; | |||
var MainId = request('MainId'); | |||
var Assessed = request('Assessed'); | |||
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); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/PersonnelManagement/DT_EvaluationData/GetList', | |||
headData: [ | |||
{ | |||
label: "考核内容", name: "Assessment", width: 150, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'EvaluationAssessment', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "行为规范要求", name: "ConductRequirements", width: 200, align: "left" }, | |||
//{ label: "被考核党员", name: "BeAssessed", width: 100, align: "left", | |||
// formatterAsync: function (callback, value, row, op,$cell) { | |||
// learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PartyMember', | |||
// key: value, | |||
// keyId: 'id', | |||
// callback: function (_data) { | |||
// callback(_data['name']); | |||
// } | |||
// }); | |||
// }}, | |||
//{ | |||
// label: "打分人", name: "Assessed", width: 100, align: "left", | |||
// formatterAsync: function (callback, value, row, op, $cell) { | |||
// learun.clientdata.getAsync('custmerData', { | |||
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PartyMember', | |||
// key: value, | |||
// keyId: 'id', | |||
// callback: function (_data) { | |||
// callback(_data['name']); | |||
// } | |||
// }); | |||
// } | |||
//}, | |||
{ label: "满分", name: "MaxScore", width: 100, align: "left" }, | |||
{ label: "得分", name: "Score", width: 100, align: "left" }, | |||
], | |||
mainId: 'Id', | |||
isPage: false, | |||
sidx: 'EOrder Asc', | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.SqlParameter = " and ScoreType=2 and MainId='" + MainId + "' and Assessed='" + Assessed + "'"; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -11,8 +11,13 @@ | |||
<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> | |||
<div id="BeAssessed"></div> | |||
<div class="lr-form-item-title">年度</div> | |||
<div id="ScoreYear"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">季度</div> | |||
<div id="ScoreQuarter"> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -23,12 +28,9 @@ | |||
<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_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_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
<a id="lr_dyzp" class="btn btn-default"><i class="fa fa-plus"></i> 党员自评</a> | |||
<a id="lr_xzzp" class="btn btn-default"><i class="fa fa-plus"></i> 党小组长评分</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -16,7 +16,17 @@ var bootstrap = function ($, learun) { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#BeAssessed').lrDataSourceSelect({ code: 'PartyMember', value: 'id', text: 'name' }); | |||
//年度 | |||
$('#ScoreYear').lrselect({ | |||
placeholder: "请选择年度", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/PersonnelManagement/DT_EvaluationDataMain/GetScoreYear', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#ScoreQuarter').lrselect({ data: [{ id: '1', text: '一' }, { id: '2', text: '二' }, { id: '3', text: '三' }, { id: '4', text: '四' }] }); | |||
// $('#BeAssessed').lrDataSourceSelect({ code: 'PartyMember', value: 'id', text: 'name' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -1525,6 +1525,7 @@ | |||
<Content Include="Areas\PersonnelManagement\Views\ContractManagement\FormRenew.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\DT_EvaluationDataMain\FormXF.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\DT_EvaluationDataMain\IndexXF.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\DT_EvaluationData\IndexXZDetail.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\DT_EvaluationData\IndexXZ.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\FundExaminer\Form.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\FundExaminer\Index.js" /> | |||
@@ -7664,6 +7665,7 @@ | |||
<Content Include="Areas\PersonnelManagement\Views\DT_EvaluationData\IndexXZ.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\DT_EvaluationDataMain\IndexXF.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\DT_EvaluationDataMain\FormXF.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\DT_EvaluationData\IndexXZDetail.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" /> | |||
@@ -265,6 +265,25 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
} | |||
} | |||
public void UpdateStatusForXZById(string keyValue, string Status) | |||
{ | |||
try | |||
{ | |||
dT_EvaluationDataService.UpdateStatusForXZById(keyValue, Status); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 下发评价 | |||
/// </summary> | |||
@@ -49,6 +49,7 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
void SaveEntity(string keyValue, DT_EvaluationDataEntity entity); | |||
string SaveList(List<DT_EvaluationDataEntity> list); | |||
void UpdateStatusForZPByMId(string MainId, string Status); | |||
void UpdateStatusForXZById(string keyValue, string Status); | |||
/// <summary> | |||
/// 下发评价 | |||
/// </summary> | |||
@@ -320,25 +320,25 @@ on k.Assessment=e.Assessment | |||
try | |||
{ | |||
db.BeginTrans(); | |||
var entity = db.FindEntity<DT_EvaluationDataEntity>(Id); | |||
//var entity = db.FindEntity<DT_EvaluationDataEntity>(Id); | |||
string sql = | |||
$"update DT_EvaluationData set Status='{Status}' where ScoreType=3 and Id='{Id}'"; | |||
db.ExecuteBySql(sql); | |||
if (Status == 1) | |||
{ | |||
//审核通过,修改主表分数 | |||
if (db.FindList<DT_EvaluationDataEntity>(x => | |||
x.MainId == entity.MainId && x.ScoreType == 3 && x.Id != Id && x.Status == -1).Count() == | |||
0) | |||
{ | |||
sql = | |||
$@" update DT_EvaluationDataMain t set t.ScoreXZ=(select Sum(Score) from DT_EvaluationData where ScoreType=3 and MainId='{entity.MainId}')/(select count(1) from DT_EvaluationData where ScoreType=3 and MainId='{entity.MainId}') | |||
where t.Id='{entity.MainId}'"; | |||
db.ExecuteBySql(sql); | |||
} | |||
} | |||
// if (Status == 1) | |||
// { | |||
// //审核通过,修改主表分数 | |||
// if (db.FindList<DT_EvaluationDataEntity>(x => | |||
// x.MainId == entity.MainId && x.ScoreType == 3 && x.Id != Id && x.Status == -1).Count() == | |||
// 0) | |||
// { | |||
// sql = | |||
// $@" update DT_EvaluationDataMain t set t.ScoreXZ=(select Sum(Score) from DT_EvaluationData where ScoreType=3 and MainId='{entity.MainId}')/(select count(1) from DT_EvaluationData where ScoreType=3 and MainId='{entity.MainId}') | |||
//where t.Id='{entity.MainId}'"; | |||
// db.ExecuteBySql(sql); | |||
// } | |||
// } | |||
db.Commit(); | |||
} | |||
@@ -458,13 +458,13 @@ join DT_EvaluationDataMain m on t.MainId=m.Id | |||
//修改主表小组评分 | |||
var mainList = db.FindList<DT_EvaluationDataEntity>(x => x.ScoreType == 3 && x.MainId == entity.MainId); | |||
if (mainList.Where(x => x.Status == -1 && x.Assessed == entity.Assessed).Count() == 0) | |||
if (mainList.Where(x => x.Status == -1 && x.Assessed != entity.Assessed).Count() == 0) | |||
{ | |||
var sumScore = mainList.Where(x => x.Assessed != entity.Assessed).Sum(x => x.Score) + list.Sum(x => x.Score); | |||
db.ExecuteBySql($@" update DT_EvaluationDataMain set ScoreXZ={sumScore / mainList.Count()} | |||
where Id='{entity.MainId}'"); | |||
} | |||
} | |||
} | |||
@@ -506,6 +506,35 @@ join DT_EvaluationDataMain m on t.MainId=m.Id | |||
} | |||
} | |||
/// <summary> | |||
/// 党小组 去审核 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="Status"></param> | |||
public void UpdateStatusForXZById(string keyValue, string Status) | |||
{ | |||
try | |||
{ | |||
var entity = this.BaseRepository("CollegeMIS").FindEntity<DT_EvaluationDataEntity>(keyValue); | |||
string sql = $@"update DT_EvaluationData set Status='{Status}' where MainId='{entity.MainId}' | |||
and PartyMemberGroupId = '{entity.PartyMemberGroupId}' | |||
and Assessed = '{entity.Assessed}' and(ScoreType = 2 or ScoreType = 3)"; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 下发评价 | |||
/// </summary> | |||
@@ -44,6 +44,16 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
dp.Add("BeAssessed", queryParam["BeAssessed"].ToString(), DbType.String); | |||
strSql.Append(" AND t.BeAssessed = @BeAssessed "); | |||
} | |||
if (!queryParam["ScoreYear"].IsEmpty()) | |||
{ | |||
dp.Add("ScoreYear", queryParam["ScoreYear"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ScoreYear = @ScoreYear "); | |||
} | |||
if (!queryParam["ScoreQuarter"].IsEmpty()) | |||
{ | |||
dp.Add("ScoreQuarter", queryParam["ScoreQuarter"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ScoreQuarter = @ScoreQuarter "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<DT_EvaluationDataMainEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||