|
@@ -56,7 +56,7 @@
|
|
|
$("#monitor").append('<option value="'+data[i].id+'">'+data[i].truename+'</option>');
|
|
$("#monitor").append('<option value="'+data[i].id+'">'+data[i].truename+'</option>');
|
|
|
$("#second-monitor").append('<option value="'+data[i].id+'">'+data[i].truename+'</option>');
|
|
$("#second-monitor").append('<option value="'+data[i].id+'">'+data[i].truename+'</option>');
|
|
|
$("#member").append('<div style="width:78px;float:left;">\
|
|
$("#member").append('<div style="width:78px;float:left;">\
|
|
|
- <input type="checkbox" value="'+data[i].id+'" name="chkItem"><span>'+data[i].truename+'</span>\
|
|
|
|
|
|
|
+ <input type="checkbox" value="'+data[i].id+'" class="chkItem"><span>'+data[i].truename+'</span>\
|
|
|
</div>');
|
|
</div>');
|
|
|
}
|
|
}
|
|
|
}, function(){
|
|
}, function(){
|
|
@@ -72,6 +72,16 @@
|
|
|
$("#team_name").val(data.name);
|
|
$("#team_name").val(data.name);
|
|
|
$("#monitor").val(data.monitor);
|
|
$("#monitor").val(data.monitor);
|
|
|
$("#second-monitor").val(data.sub_monitor);
|
|
$("#second-monitor").val(data.sub_monitor);
|
|
|
|
|
+ var ids = data.user_ids.split(",");
|
|
|
|
|
+ $(".chkItem").prop("checked",false);
|
|
|
|
|
+ for(i=0;i<ids.length;i++){
|
|
|
|
|
+ // console.log(ids[i])
|
|
|
|
|
+ $(".chkItem").each(function(){
|
|
|
|
|
+ if($(this).attr('value') == ids[i]){
|
|
|
|
|
+ $(this).prop("checked", true);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
idUpdate = true;
|
|
idUpdate = true;
|
|
|
layerUpdateTeam('form-div','班组修改','550px');
|
|
layerUpdateTeam('form-div','班组修改','550px');
|
|
|
}, function(){
|
|
}, function(){
|
|
@@ -80,6 +90,7 @@
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
function layerUpdateTeam(domId,title,area){
|
|
function layerUpdateTeam(domId,title,area){
|
|
|
|
|
+ // $(".chkItem").attr("checked", false);
|
|
|
layer.open({
|
|
layer.open({
|
|
|
type: 1,
|
|
type: 1,
|
|
|
title: false,
|
|
title: false,
|
|
@@ -90,7 +101,6 @@
|
|
|
area:area,
|
|
area:area,
|
|
|
content: $("#"+domId)
|
|
content: $("#"+domId)
|
|
|
});
|
|
});
|
|
|
- $("[name = chkItem]:checkbox").attr("checked", false);
|
|
|
|
|
}
|
|
}
|
|
|
//关闭弹窗
|
|
//关闭弹窗
|
|
|
$("#close-layer").click(function(){
|
|
$("#close-layer").click(function(){
|
|
@@ -148,5 +158,6 @@
|
|
|
//添加班组
|
|
//添加班组
|
|
|
$("#addTeam").click(function(){
|
|
$("#addTeam").click(function(){
|
|
|
idUpdate = false;
|
|
idUpdate = false;
|
|
|
|
|
+ $(".chkItem").attr("checked", false);
|
|
|
layerUpdateTeam('form-div','班组新增','550px');
|
|
layerUpdateTeam('form-div','班组新增','550px');
|
|
|
})
|
|
})
|