|
|
@@ -26,48 +26,6 @@ var bootstrap = function ($, learun) { |
|
|
|
$('#lr_refresh').on('click', function () { |
|
|
|
location.reload(); |
|
|
|
}); |
|
|
|
// 新增 |
|
|
|
$('#lr_add').on('click', function () { |
|
|
|
learun.layerForm({ |
|
|
|
id: 'form', |
|
|
|
title: '新增', |
|
|
|
url: top.$.rootUrl + '/PersonnelManagement/DT_EvaluationData/Form', |
|
|
|
width: 600, |
|
|
|
height: 400, |
|
|
|
callBack: function (id) { |
|
|
|
return top[id].acceptClick(refreshGirdData); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
// 编辑 |
|
|
|
$('#lr_edit').on('click', function () { |
|
|
|
var keyValue = $('#gridtable').jfGridValue('Id'); |
|
|
|
if (learun.checkrow(keyValue)) { |
|
|
|
learun.layerForm({ |
|
|
|
id: 'form', |
|
|
|
title: '编辑', |
|
|
|
url: top.$.rootUrl + '/PersonnelManagement/DT_EvaluationData/Form?keyValue=' + keyValue, |
|
|
|
width: 600, |
|
|
|
height: 400, |
|
|
|
callBack: function (id) { |
|
|
|
return top[id].acceptClick(refreshGirdData); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
// 删除 |
|
|
|
$('#lr_delete').on('click', function () { |
|
|
|
var keyValue = $('#gridtable').jfGridValue('Id'); |
|
|
|
if (learun.checkrow(keyValue)) { |
|
|
|
learun.layerConfirm('是否确认删除该项!', function (res) { |
|
|
|
if (res) { |
|
|
|
learun.deleteForm(top.$.rootUrl + '/PersonnelManagement/DT_EvaluationData/DeleteForm', { keyValue: keyValue}, function () { |
|
|
|
refreshGirdData(); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
// 打印 |
|
|
|
$('#lr_print').on('click', function () { |
|
|
|
$('#gridtable').jqprintTable(); |
|
|
@@ -78,60 +36,104 @@ var bootstrap = function ($, learun) { |
|
|
|
$('#gridtable').jfGrid({ |
|
|
|
url: top.$.rootUrl + '/PersonnelManagement/DT_EvaluationData/GetPageList', |
|
|
|
headData: [ |
|
|
|
//{ label: "年度", name: "ScoreYear", width: 100, align: "left" }, |
|
|
|
//{ label: "季度", name: "ScoreQuarter", width: 100, align: "left" }, |
|
|
|
{ |
|
|
|
label: "考核内容", name: "Assessment", width: 150, align: "left", |
|
|
|
label: "组长", name: "Assessed", width: 100, align: "left", |
|
|
|
formatterAsync: function (callback, value, row, op, $cell) { |
|
|
|
learun.clientdata.getAsync('dataItem', { |
|
|
|
learun.clientdata.getAsync('custmerData', { |
|
|
|
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'PartyMember', |
|
|
|
key: value, |
|
|
|
code: 'EvaluationAssessment', |
|
|
|
keyId: 'id', |
|
|
|
callback: function (_data) { |
|
|
|
callback(_data.text); |
|
|
|
callback(_data['name']); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
{ 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: "Score", width: 100, align: "left"}, |
|
|
|
{ label: "分值", name: "Score", width: 100, align: "left" }, |
|
|
|
{ |
|
|
|
label: "类型", name: "ScoreType", width: 100, align: "left", |
|
|
|
formatter: function(value, row) { |
|
|
|
if (value == '1') { |
|
|
|
return '党员自评'; |
|
|
|
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 '草稿'; |
|
|
|
} |
|
|
|
else if (value == '1') { |
|
|
|
return '待审核'; |
|
|
|
} |
|
|
|
else if (value == '2') { |
|
|
|
return '党小组长评'; |
|
|
|
return '审核通过'; |
|
|
|
} |
|
|
|
else if (value == '3') { |
|
|
|
return '审核未通过'; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
], |
|
|
|
mainId:'Id', |
|
|
|
mainId: 'Id', |
|
|
|
isPage: true, |
|
|
|
sidx: 'ScoreType ASC,Assessed ASC,EOrder Asc', |
|
|
|
isSubGrid: true, // 是否有子表 |
|
|
|
subGridExpanded: function (subContentId, rowItem) { |
|
|
|
var Assessed = rowItem.Assessed; |
|
|
|
var MainId1 = rowItem.MainId; |
|
|
|
$('#' + subContentId).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', |
|
|
|
}); |
|
|
|
var param; |
|
|
|
param = param || {}; |
|
|
|
param.SqlParameter = " and ScoreType=2 and MainId='" + MainId1 + "' and Assessed='" + Assessed + "'"; |
|
|
|
$('#' + subContentId).jfGridSet('reload', { queryJson: JSON.stringify(param) }); |
|
|
|
}, |
|
|
|
subGridHeight: 300, |
|
|
|
}); |
|
|
|
page.search(); |
|
|
|
}, |
|
|
@@ -139,7 +141,7 @@ var bootstrap = function ($, learun) { |
|
|
|
param = param || {}; |
|
|
|
param.MainId = MainId; |
|
|
|
param.ScoreType = ScoreType; |
|
|
|
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); |
|
|
|
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); |
|
|
|
} |
|
|
|
}; |
|
|
|
refreshGirdData = function () { |
|
|
|