Commit 65da0ad7 authored by gaoyuan's avatar gaoyuan

4.9.3需求---增加批量转移按钮

parent 8aadd0a9
<%@ page language="java" pageEncoding="UTF-8" %>
<%@include file="/WEB-INF/common/layouts/common.jsp" %>
<html>
<head>
<title>客户转移</title>
<link href="${static_common }/customize/jquery-ui-bootstrap/css/multi-select.css" media="screen" rel="stylesheet"
type="text/css">
</head>
<body>
请选择用户:
<select id='custom-headers' multiple='multiple' class="nochosen">
<c:forEach items="${users}" var="user">
<option value='${user.id}'>${user.realName}(${user.name})</option>
</c:forEach>
</select>
</body>
<script src="${static_common }/script/jquery/jquery.multi-select.js" type="text/javascript"></script>
<script src="${static_common }/script/jquery/jquery.quicksearch.js" type="text/javascript"></script>
<script type="text/javascript">
function reset(){
$('#custom-headers').multiSelect('deselect_all');
}
$(document).ready(function () {
$('#custom-headers').multiSelect({
selectableHeader: "<input type='text' class='search-input span3' autocomplete='off' placeholder='请输入'>",
selectionHeader: "<div class='search-input span3' style='height:50px;'>&nbsp;</div>",
selectableFooter: "",
selectionFooter: "<input type='button' onclick='reset()' value='重置'>",
keepOrder: true,
afterInit: function (ms) {
var that = this,
$selectableSearch = that.$selectableUl.prev(),
$selectionSearch = that.$selectionUl.prev(),
selectableSearchString = '#' + that.$container.attr('id') + ' .ms-elem-selectable:not(.ms-selected)',
selectionSearchString = '#' + that.$container.attr('id') + ' .ms-elem-selection.ms-selected';
that.qs1 = $selectableSearch.quicksearch(selectableSearchString)
.on('keydown', function (e) {
if (e.which === 40) {
that.$selectableUl.focus();
return false;
}
});
that.qs2 = $selectionSearch.quicksearch(selectionSearchString)
.on('keydown', function (e) {
if (e.which == 40) {
that.$selectionUl.focus();
return false;
}
});
},
afterSelect: function () {
this.qs1.cache();
this.qs2.cache();
},
afterDeselect: function () {
this.qs1.cache();
this.qs2.cache();
},
afterSelect: function (values) {
this.qs1.cache();
this.qs2.cache();
// console.log(values);
// console.log(this.results(true))
var select_text;
$("#custom-headers").find("option").each(function () {
if ($(this).val() == values) {
select_text = $(this).text();
$(this).attr("selected", "selected");
}else{
$(this).removeAttr("selected");
}
});
$(".ms-selectable span").each(function () {
if($(this).text() == select_text){
$(this).parent("li").hide();
}else{
$(this).parent("li").show();
}
});
$(".ms-selection span").each(function () {
if($(this).text() != select_text){
$(this).parent("li").hide();
}else{
$(this).parent("li").show();
}
});
},
afterDeselect: function (values) {
this.qs1.cache();
this.qs2.cache();
$("#custom-headers").find("option").each(function () {
if ($(this).val() == values) {
$(this).removeAttr("selected");
}
});
}
});
})
</script>
</html>
......@@ -474,6 +474,9 @@
</ul>
<div class="bottomBtn" style="overflow: hidden">
<div class="checkAll">选择全部:<input type="checkbox" id="memberCheckAll" onclick="checkAll(this)"/></div>
<shiro:hasPermission name="FUNC:BATCHTRANSFER">
<div class="bottomBtnR" onclick="assignManager()">批量转移</div>
</shiro:hasPermission>
<div class="bottomBtnR" onclick="assignManager()">批量转移</div>
<div class="bottomBtnR" name="batchDel" onclick="batchDel()">批量删除</div>
</div>
......@@ -928,7 +931,7 @@
return false;
}
House365Util.createRemoteModal("客户转移", "/house365-hgs-web/customer/transManager?customerCount=" + customerCont, null, function () {
House365Util.createRemoteModal("客户转移", "/house365-hgs-web/customer/transferCreator?customerCount=" + customerCont, null, function () {
var userIds = "";
if ($("#custom-headers").find("option:selected").length == 0) {
alert("分派人员不可为空!");
......@@ -944,23 +947,23 @@
return false;
}
$.ajax({
url: '/house365-hgs-web/customer/assign',
data: {
"userIds": userIds,
"customerIds": customerIds,
"type": 'handover'
},
type: "GET",
success: function (data) {
if (data.result == '1') {
window.location.reload();
} else {
alert("操作失败," + data.msg);
}
}
});
return true;
// $.ajax({
// url: '/house365-hgs-web/customer/assign',
// data: {
// "userIds": userIds,
// "customerIds": customerIds,
// "type": 'handover'
// },
// type: "GET",
// success: function (data) {
// if (data.result == '1') {
// window.location.reload();
// } else {
// alert("操作失败," + data.msg);
// }
// }
// });
// return true;
});
$(".modal").css("width", "560px");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment