|
|
@@ -6,6 +6,7 @@ function initCheck() {
|
|
|
});
|
|
|
|
|
|
|
|
|
+
|
|
|
$("#tabcontent").css("height", ($("#video_content").height() - 80) + "px");
|
|
|
|
|
|
|
|
|
@@ -183,11 +184,18 @@ function initCheckAppealBtns() {
|
|
|
title: "申诉详情",
|
|
|
closeBtn: 1,
|
|
|
shade: false,
|
|
|
+ maxmin: true,
|
|
|
shadeClose: true,
|
|
|
offset: 'rb',
|
|
|
content: $('#appeal_div'), //捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
|
|
|
- yes: function (index) {
|
|
|
- layer.close(index);
|
|
|
+ min: function (index) {
|
|
|
+ // layer.close(index);
|
|
|
+ layer.style(index,{width: 50,height:50});
|
|
|
+ return false;
|
|
|
+ },
|
|
|
+ cancel:function(index){
|
|
|
+ layer.style(index,{width: 50,height:50,offset:'r'});
|
|
|
+ return false;
|
|
|
}
|
|
|
});
|
|
|
} else {
|
|
|
@@ -205,14 +213,17 @@ function queryCheckScores() {
|
|
|
}
|
|
|
// alert("ff");
|
|
|
var cols = [
|
|
|
- { width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
|
|
|
+ { width: 40, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
|
|
|
{ width: 160, text: '评分记录', type: 'string', flex: true, sort: 'down', field: 'content' },
|
|
|
- { width: 80, text: '分数', type: 'string', flex: true, colClass: '', field: 'check_item_score' },
|
|
|
+ { width: 50, text: '分数', type: 'string', flex: true, colClass: '', field: 'check_item_score' },
|
|
|
+ { width: 100, text: '备注', type: 'string', flex: true, colClass: '', field: 'remark' },
|
|
|
+ { width: 55, text: '考核人', type: 'string', flex: true, colClass: '', field: 'checked_person_name' },
|
|
|
// {width: 80, text: '图片', type: 'imagedd', flex: true, colClass: '',field: 'pics'},
|
|
|
{
|
|
|
- width: 160, text: '操作', type: 'string', flex: true, field: 'id',
|
|
|
+ width: 110, text: '操作', type: 'string', flex: true, field: 'id',
|
|
|
oper: [
|
|
|
{ func: 'showEditCheckScore', text: '修改', icon_class: 'icon-edit' },
|
|
|
+ { func: 'showEditPic', text: '修改图片', icon_class: 'icon-edit' },
|
|
|
{ func: 'deleteCheckScore', text: '删除', icon_class: 'icon-remove-circle' }
|
|
|
]
|
|
|
}
|
|
|
@@ -228,16 +239,60 @@ function queryCheckScores() {
|
|
|
}
|
|
|
);
|
|
|
}
|
|
|
-function showEditCheckScore(id) {
|
|
|
- // deleteItem4Common(id,"/score/delete/",queryCheckScores);
|
|
|
+function showEditPic(){
|
|
|
var rowData = getItemByIdFromArr(id, $('#score_datatable').mytable('getTableData'));
|
|
|
- // scoreDetailLayer = showPopup4Common('修改考核项',null,['600px','500px'],'#score-detail-div');
|
|
|
- // var rowData=getItemByIdFromArr(id,$('#score_datatable').mytable('getTableData'));
|
|
|
showPics(rowData.pics);
|
|
|
- // $("#scoreContent").val(rowData.content);
|
|
|
$("#saveEditBtn").show();
|
|
|
editScoreId = id;
|
|
|
}
|
|
|
+function showEditCheckScore(id) {
|
|
|
+ // deleteItem4Common(id,"/score/delete/",queryCheckScores);
|
|
|
+ var rowData = getItemByIdFromArr(id, $('#score_datatable').mytable('getTableData'));
|
|
|
+ scoreDetailLayer = showPopup4Common('修改考核项',function(data){
|
|
|
+ saveScoreEdit();
|
|
|
+ },['350px','400px'],'#score-detail-div','r');
|
|
|
+
|
|
|
+ $("#score_id_text").val(rowData.id);
|
|
|
+ $("#check_item_text").val(rowData.content);
|
|
|
+ $("#check_score_text").val(rowData.check_item_score);
|
|
|
+ $("#check_remark_text").val(rowData.remark);
|
|
|
+ var param = {
|
|
|
+ 'organid': $.checkTask.checked_dept
|
|
|
+ };
|
|
|
+ post_common_service("/user/getUserList/", param, function (data) {
|
|
|
+ setFeeUserSelect("#check_checked_person_select",rowData.checked_person,data);
|
|
|
+ });
|
|
|
+}
|
|
|
+function setFeeUserSelect(div,selectId,userList){
|
|
|
+ var optStr = '';
|
|
|
+ for(var i in userList) {
|
|
|
+ if(userList[i].deptid==selectId)
|
|
|
+ optStr += '<option value="'+userList[i].id+'" selected="selected">'+userList[i].truename+'</option>';
|
|
|
+ else
|
|
|
+ optStr += '<option value="'+userList[i].id+'">'+userList[i].truename+'</option>';
|
|
|
+ }
|
|
|
+ $(div).html('');
|
|
|
+ $(div).html(optStr);
|
|
|
+}
|
|
|
+function saveScoreEdit(){
|
|
|
+ var param = {
|
|
|
+ 'id': $("#score_id_text").val(),
|
|
|
+ 'content': $("#check_item_text").val(),
|
|
|
+ 'check_item_score': $("#check_score_text").val(),
|
|
|
+ 'remark': $("#check_remark_text").val(),
|
|
|
+ 'checked_person': $("#check_checked_person_select").val(),
|
|
|
+ };
|
|
|
+ editScoreId = null;
|
|
|
+ $("#saveEditBtn").hide();
|
|
|
+ no_return_common_service("/score/update", param, function (data) {
|
|
|
+ if (scoreLayer) layer.close(scoreLayer);
|
|
|
+ //查询评分情况
|
|
|
+ queryCheckScores();
|
|
|
+ // layer.msg(data, {
|
|
|
+ // time: 2000//20s后自动关闭
|
|
|
+ // });
|
|
|
+ });
|
|
|
+}
|
|
|
var editScoreId;
|
|
|
function saveEdit() {
|
|
|
if (editScoreId) {
|
|
|
@@ -359,8 +414,8 @@ function showChangeUser() {
|
|
|
var pic = "../../images/body-bg.png";
|
|
|
if (data[i].pic) pic = base_image_server_url + data[i].pic;
|
|
|
str = '<div style="width:90px;float:left;margin:5px;">'
|
|
|
- + '<a class="card" href="javascript:void(0)" onclick="showBigImg(\'' + pic + '\')">'
|
|
|
- + '<img src="' + pic + '" alt="" style="height:100px;width:90px;">'
|
|
|
+ + '<a class="card" href="javascript:void(0)">'
|
|
|
+ + '<img src="' + pic + '" alt="" style="height:100px;width:90px;" onclick="showBigImg(\'' + pic + '\')">'
|
|
|
+ '<div class="card-heading"><strong>' + name + '</strong></div>'
|
|
|
+ '<div class="card-actions">'
|
|
|
+ '<button type="button" class="btn btn-mini btn-danger" onclick="changePerson(\'' + data[i].id + '\')">选择</button>'
|
|
|
@@ -379,10 +434,17 @@ function changePerson(id) {
|
|
|
"id": $.checkTask.id,
|
|
|
"checked_person": id,
|
|
|
}
|
|
|
- no_return_common_service("task/update/", param, function (data) {
|
|
|
+ post_common_service("task/update/", param, function (task_data) {
|
|
|
+ //重置当前任务
|
|
|
+ $.checkTask = task_data;
|
|
|
+ //获取用户信息
|
|
|
get_common_service('user/getUserById/' + id, null, function (data) {
|
|
|
changePersonContent(data);
|
|
|
})
|
|
|
+ //更新用户次数表
|
|
|
+ no_return_common_service('task/updateUserCount/', param, function (data) {
|
|
|
+ // changePersonContent(data);
|
|
|
+ })
|
|
|
layer.close(changePersonLayer);
|
|
|
}, function (error) {
|
|
|
alert(error);
|
|
|
@@ -525,9 +587,7 @@ function genNode(m) {
|
|
|
zdataItem["children"] = addobj(m);
|
|
|
return zdataItem;
|
|
|
}
|
|
|
-
|
|
|
function zTreeOnClick(event, treeId, treeNode) {
|
|
|
- //alert(treeNode.name);
|
|
|
var imgArr = $("#img_container .pic-class");
|
|
|
var picsStr = "";
|
|
|
if (imgArr && imgArr.length > 0) {
|
|
|
@@ -556,6 +616,7 @@ function zTreeOnClick(event, treeId, treeNode) {
|
|
|
time: 2000//20s后自动关闭
|
|
|
});
|
|
|
});
|
|
|
+
|
|
|
}
|
|
|
|
|
|
function submitCheck() {
|
|
|
@@ -574,7 +635,7 @@ function submitCheck() {
|
|
|
function showPre(id) {
|
|
|
// $('#myModal').modal({name:"dd"});
|
|
|
//预览提交把任务状态改为待提交
|
|
|
- no_return_common_service('/task/update', { "id": $.checkTask.id, "check_status": 3 })
|
|
|
+ no_return_common_service('/task/update', {"id":$.checkTask.id,"check_status":7})
|
|
|
changePage("/view/mytask/taskDetail.html");
|
|
|
}
|
|
|
function showInvalid() {
|
|
|
@@ -599,7 +660,7 @@ function submitCheck4Appeal() {
|
|
|
function showPre4Appeal(id) {
|
|
|
// $('#myModal').modal({name:"dd"});
|
|
|
//预览提交把任务状态改为待提交
|
|
|
- no_return_common_service('/task/update', { "id": $.checkTask.id, "check_status": 13 })
|
|
|
+ no_return_common_service('/task/update', {"id":$.checkTask.id,"check_status":17})
|
|
|
changePage("/view/mytask/taskDetail.html");
|
|
|
}
|
|
|
function saveValidReason() {
|