|
|
@@ -39,6 +39,8 @@
|
|
|
})
|
|
|
});
|
|
|
|
|
|
+ var flag = true;
|
|
|
+
|
|
|
//编辑用户基本信息
|
|
|
function editInfo(){
|
|
|
var id = '${omCandidate.id}';
|
|
|
@@ -49,8 +51,10 @@
|
|
|
function setQuality(){
|
|
|
var id = '${omCandidate.id}';
|
|
|
confirm('确认设为优质用户吗?',"设为优质用户", function(){
|
|
|
- jp.loading();
|
|
|
- jp.get("${ctx}/omcandidate/omCandidate/setQuality?id=" + id, function(data){
|
|
|
+ if(flag){
|
|
|
+ flag = false;
|
|
|
+ jp.loading();
|
|
|
+ jp.get("${ctx}/omcandidate/omCandidate/setQuality?id=" + id, function(data){
|
|
|
if(data.success){
|
|
|
location.reload();
|
|
|
jp.success("设为优质成功");
|
|
|
@@ -58,22 +62,25 @@
|
|
|
jp.error(data.msg);
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
//取消优质
|
|
|
function cancelQuality(){
|
|
|
var id = '${omCandidate.id}';
|
|
|
confirm('确认取消优质用户吗?',"取消优质用户", function(){
|
|
|
- jp.loading();
|
|
|
- jp.get("${ctx}/omcandidate/omCandidate/cancelQuality?id=" + id, function(data){
|
|
|
- if(data.success){
|
|
|
- location.reload();
|
|
|
- jp.success("取消优质成功");
|
|
|
- }else{
|
|
|
- jp.error(data.msg);
|
|
|
- }
|
|
|
+ if(flag){
|
|
|
+ flag = false;
|
|
|
+ jp.loading();
|
|
|
+ jp.get("${ctx}/omcandidate/omCandidate/cancelQuality?id=" + id, function(data){
|
|
|
+ if(data.success){
|
|
|
+ location.reload();
|
|
|
+ jp.success("取消优质成功");
|
|
|
+ }else{
|
|
|
+ jp.error(data.msg);
|
|
|
+ }
|
|
|
})
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -83,15 +90,18 @@
|
|
|
var name = '${omCandidate.name}';
|
|
|
var status = '${fns:getDictLabel(omCandidate.status, 'om_candidate_status', '-')}';
|
|
|
confirm(name+' 当前为 '+status+' 状态,是否确认要将此用户添加入黑名单?',"添加黑名单", function(){
|
|
|
- jp.loading();
|
|
|
- jp.get("${ctx}/omcandidate/omCandidate/blacklist?id=" + id, function(data){
|
|
|
- if(data.success){
|
|
|
- location.reload();
|
|
|
- jp.success("添加黑名单成功");
|
|
|
- }else{
|
|
|
- jp.error(data.msg);
|
|
|
- }
|
|
|
+ if(flag){
|
|
|
+ flag = false;
|
|
|
+ jp.loading();
|
|
|
+ jp.get("${ctx}/omcandidate/omCandidate/blacklist?id=" + id, function(data){
|
|
|
+ if(data.success){
|
|
|
+ location.reload();
|
|
|
+ jp.success("添加黑名单成功");
|
|
|
+ }else{
|
|
|
+ jp.error(data.msg);
|
|
|
+ }
|
|
|
})
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -101,15 +111,18 @@
|
|
|
var name = '${omCandidate.name}';
|
|
|
var newName = '${fns:getUser().name}';
|
|
|
confirm('是否确认要将 '+name+' 解除黑名单,并将此用户跟进人设置为 '+newName+'?',"解除黑名单", function(){
|
|
|
- jp.loading();
|
|
|
- jp.get("${ctx}/omcandidate/omCandidate/cancelBlacklist?id=" + id, function(data){
|
|
|
- if(data.success){
|
|
|
- location.reload();
|
|
|
- jp.success("解除黑名单成功");
|
|
|
- }else{
|
|
|
- jp.error(data.msg);
|
|
|
- }
|
|
|
+ if(flag){
|
|
|
+ flag = false;
|
|
|
+ jp.loading();
|
|
|
+ jp.get("${ctx}/omcandidate/omCandidate/cancelBlacklist?id=" + id, function(data){
|
|
|
+ if(data.success){
|
|
|
+ location.reload();
|
|
|
+ jp.success("解除黑名单成功");
|
|
|
+ }else{
|
|
|
+ jp.error(data.msg);
|
|
|
+ }
|
|
|
})
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
|
|
|
@@ -156,20 +169,20 @@
|
|
|
<div class="panel-body">
|
|
|
<div class="form-group col-sm-12" style="margin-top:10px">
|
|
|
<div class="form-group col-sm-3">
|
|
|
- <label class="col-sm-5 control-label" style="font-size:18px">${omCandidate.name}</label>
|
|
|
+ <label class="col-sm-5 control-label" style="word-wrap:break-word;font-size:18px">${omCandidate.name}</label>
|
|
|
<div class="col-sm-7">
|
|
|
<c:choose>
|
|
|
<c:when test="${omCandidate.type==0}">
|
|
|
- <button class="btn btn-xs" style="color:#17AC00;border-color:#17AC00;background:#fff"> ${fns:getDictLabel(omCandidate.type, 'om_candidate_type', '-')} </button>
|
|
|
+ <button disabled="disabled" class="btn btn-xs" style="color:#17AC00;border-color:#17AC00;background:#fff"> ${fns:getDictLabel(omCandidate.type, 'om_candidate_type', '-')} </button>
|
|
|
</c:when>
|
|
|
<c:when test="${omCandidate.type==1}">
|
|
|
- <button class="btn btn-xs" style="color:#FF9514;border-color:#FF9514;background:#fff"> ${fns:getDictLabel(omCandidate.type, 'om_candidate_type', '-')} </button>
|
|
|
+ <button disabled="disabled" class="btn btn-xs" style="color:#FF9514;border-color:#FF9514;background:#fff"> ${fns:getDictLabel(omCandidate.type, 'om_candidate_type', '-')} </button>
|
|
|
</c:when>
|
|
|
<c:when test="${omCandidate.type==2}">
|
|
|
- <button class="btn btn-xs" style="color:#666666;border-color:#666666;background:#fff"> ${fns:getDictLabel(omCandidate.type, 'om_candidate_type', '-')} </button>
|
|
|
+ <button disabled="disabled" class="btn btn-xs" style="color:#666666;border-color:#666666;background:#fff"> ${fns:getDictLabel(omCandidate.type, 'om_candidate_type', '-')} </button>
|
|
|
</c:when>
|
|
|
<c:otherwise>
|
|
|
- <button class="btn btn-xs" style="background:#fff"> ${fns:getDictLabel(omCandidate.type, 'om_candidate_type', '-')} </button>
|
|
|
+ <button disabled="disabled" class="btn btn-xs" style="background:#fff"> ${fns:getDictLabel(omCandidate.type, 'om_candidate_type', '-')} </button>
|
|
|
</c:otherwise>
|
|
|
</c:choose>
|
|
|
</div>
|