|
|
|
@ -2,10 +2,10 @@
|
|
|
|
|
<div class="task-popup-title clearfix">添加合作伙伴</div>
|
|
|
|
|
<div class="task_popup_con">
|
|
|
|
|
<div class="clearfix mb5 df">
|
|
|
|
|
<div class="flex1" id="partners_search_form">
|
|
|
|
|
<div class="flex1">
|
|
|
|
|
<%= render partial: "managements/partner_search_form" %>
|
|
|
|
|
</div>
|
|
|
|
|
<a href="javascript:void(0);" onclick="submit_search_user()" class="white-btn mt6 edu-blueback-btn fl ml15 mt55">搜索</a>
|
|
|
|
|
<a href="javascript:void(0);" onclick="$('#partners_search_form').submit()" class="white-btn mt6 edu-blueback-btn fl ml15 mt55">搜索</a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mb4 clearfix">
|
|
|
|
|
<p class="pl10 color-grey-6 clearfix">
|
|
|
|
@ -13,7 +13,7 @@
|
|
|
|
|
<span class="fr with30">地区</span>
|
|
|
|
|
</p>
|
|
|
|
|
<div class="edu-back-skyblue clearfix pl10 over280" id="search_user_list">
|
|
|
|
|
|
|
|
|
|
<%= render :partial => "partners_list" %>
|
|
|
|
|
</div>
|
|
|
|
|
<p class="clearfix" style="height: 20px;"><span class="fl lineh-20 none color-red" id="checkNotice"></span></p>
|
|
|
|
|
</div>
|
|
|
|
@ -25,12 +25,9 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script>
|
|
|
|
|
$(function() {
|
|
|
|
|
unitDownOption();
|
|
|
|
|
showprovince("province");
|
|
|
|
|
|
|
|
|
|
var i = 1; //设置当前页数
|
|
|
|
|
var msg_list_loading = false;
|
|
|
|
|
$(function() {
|
|
|
|
|
$(function() {
|
|
|
|
|
var totalpage = <%= @total_pages.to_i %>; //总页数,防止超过总页数继续滚动
|
|
|
|
|
var winH = $(window).height(); //页面可视区域高度
|
|
|
|
@ -82,18 +79,19 @@
|
|
|
|
|
$("#checkNotice").html("请选择需要添加的内容").removeClass("none");
|
|
|
|
|
return;
|
|
|
|
|
}else{
|
|
|
|
|
let checked_array = [];
|
|
|
|
|
var checked_array = [];
|
|
|
|
|
$("input[name='school[]']:checked").each(function () {
|
|
|
|
|
checked_array.push($(this).val())
|
|
|
|
|
});
|
|
|
|
|
let check_ids = {ids:checked_array};
|
|
|
|
|
$.ajax({
|
|
|
|
|
url: "/managements/add_partner",
|
|
|
|
|
type: 'POST',
|
|
|
|
|
data: check_ids,
|
|
|
|
|
data: {school_ids: checked_array},
|
|
|
|
|
success: function (e) {
|
|
|
|
|
if(e.status === 1){}
|
|
|
|
|
$("#popupAll").remove()
|
|
|
|
|
if(e.status === 1){
|
|
|
|
|
hideModal();
|
|
|
|
|
window.location.href = "<%= partners_managements_path %>";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|