|
@ -19,7 +19,7 @@ var lastTeamId,
|
|
|
tagTitle = 1,//头部切换
|
|
|
search_keyword='',//搜索关键字
|
|
|
activeGroupType = "",
|
|
|
typeId = 1, //记录排列的值
|
|
|
typeId = 4, //记录排列的值
|
|
|
sendCount = 0, //记录发送的数量
|
|
|
historyData=[],//历史数据
|
|
|
historyStr,
|
|
@ -86,11 +86,11 @@ initTeams = function (){
|
|
|
|
|
|
if(!lastTeamId && baseInfo.teamInfo.data && baseInfo.teamInfo.data.length) {
|
|
|
updateLastTeamId(baseInfo.teamInfo.data[0].id);
|
|
|
$selectedTeamName.text(baseInfo.teamInfo.data[0].name);
|
|
|
// $selectedTeamName.text(baseInfo.teamInfo.data[0].name);
|
|
|
$('.lin-sel-group li').eq(0).addClass("checked");
|
|
|
} else {
|
|
|
var $selected = $('.lin-sel-group').find("li.checked");
|
|
|
$selectedTeamName.text($selected.attr("data-name"));
|
|
|
// $selectedTeamName.text($selected.attr("data-name"));
|
|
|
}
|
|
|
|
|
|
if(typeId){
|
|
@ -456,29 +456,6 @@ bindEvents = function () {
|
|
|
isEmpty = !$(this).find('ul.n-list li').length;
|
|
|
code && !isOpen && isEmpty && initPatientListByGroup(code);
|
|
|
})
|
|
|
$patiList.on('click','li[data-patient-code]',function(e) {
|
|
|
e.stopPropagation();
|
|
|
var that = $(this)
|
|
|
if(that.hasClass('checked')){
|
|
|
that.find('.check-img').attr('src','../images/unchecked.png');
|
|
|
that.removeClass('checked')
|
|
|
if(tagTitle == 2){removeSelectLi(that);}
|
|
|
$sendCount.text(sendCount);
|
|
|
checkIsSelect()
|
|
|
}else{
|
|
|
if(sendCount == 200){
|
|
|
mui.toast('选择居民不能超过200个')
|
|
|
return
|
|
|
}else{
|
|
|
that.find('.check-img').attr('src','../images/checked_all.png');
|
|
|
that.addClass('checked')
|
|
|
if(tagTitle == 2){addSelectLi(that);}
|
|
|
$sendCount.text(sendCount);
|
|
|
checkIsSelect()
|
|
|
}
|
|
|
}
|
|
|
return false;
|
|
|
})
|
|
|
//加载更多
|
|
|
$patiList.on('click','.load-more',function(e) {
|
|
|
e.stopPropagation();
|
|
@ -503,6 +480,29 @@ bindEvents = function () {
|
|
|
}).catch(function(e){ console && console.error(e); plus.nativeUI.closeWaiting(); });
|
|
|
return false;
|
|
|
})
|
|
|
$patiList.on('click','li[data-patient-code]',function(e) {
|
|
|
e.stopPropagation();
|
|
|
var that = $(this)
|
|
|
if(that.hasClass('checked')){
|
|
|
that.find('.check-img').attr('src','../images/unchecked.png');
|
|
|
that.removeClass('checked')
|
|
|
if(tagTitle == 2){removeSelectLi(that);}
|
|
|
$sendCount.text(sendCount);
|
|
|
checkIsSelect()
|
|
|
}else{
|
|
|
if(sendCount == 200){
|
|
|
mui.toast('选择居民不能超过200个')
|
|
|
return
|
|
|
}else{
|
|
|
that.find('.check-img').attr('src','../images/checked_all.png');
|
|
|
that.addClass('checked')
|
|
|
if(tagTitle == 2){addSelectLi(that);}
|
|
|
$sendCount.text(sendCount);
|
|
|
checkIsSelect()
|
|
|
}
|
|
|
}
|
|
|
return false;
|
|
|
})
|
|
|
//搜索功能
|
|
|
$searchBtn.on('click',function(){
|
|
|
historyList()
|