新增渠道做成局部刷新

sso
cxt 5 years ago
parent c0b7273126
commit 290eadc5cb

@ -7,6 +7,10 @@ $(document).on('turbolinks:load', function() {
var $memberSelect = $addMemberModal.find('.salesman-channel-user-select'); var $memberSelect = $addMemberModal.find('.salesman-channel-user-select');
var $form = $addMemberModal.find('form.admin-add-salesman-user-form'); var $form = $addMemberModal.find('form.admin-add-salesman-user-form');
// 搜索
var searchscForm = $(".saleman-channel-list-form .search-form");
$addMemberModal.on('show.bs.modal', function(event){ $addMemberModal.on('show.bs.modal', function(event){
$memberSelect.select2('val', ' '); $memberSelect.select2('val', ' ');
}); });
@ -53,9 +57,10 @@ $(document).on('turbolinks:load', function() {
success: function(){ success: function(){
$.notify({ message: '创建成功' }); $.notify({ message: '创建成功' });
$addMemberModal.modal('hide'); $addMemberModal.modal('hide');
searchscForm.find('input[name="keyword"]').val('');
setTimeout(function(){ setTimeout(function(){
window.location.reload(); submitForm();
}, 500); }, 500);
}, },
error: function(res){ error: function(res){
@ -68,8 +73,6 @@ $(document).on('turbolinks:load', function() {
} }
}); });
// 搜索
var searchscForm = $(".saleman-channel-list-form .search-form");
// 清空 // 清空
searchscForm.on('click', '.clear-btn', function () { searchscForm.on('click', '.clear-btn', function () {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save