Commit 467bc060 by 朱继来

添加推送业务员JS

parent b2477889
......@@ -655,6 +655,53 @@
});
},
// 推送业务员
sendSales: function() {
$('.send_sales').click(function(){
var sale_id = $('input[name=sale_id]:checked').val();
var sale_name = $('input[name=sale_id]:checked').next('span').text();
if (sale_id == null) {
layer.msg('请选择业务员!');
return false;
}
// 弹出提示
layer.open({
title: '提醒',
content: '<div>确定推送到 <i class="error">'+sale_name+'</i> 吗?</div>',
btn:['取消','确定'],
yes: function(index, layero){
layer.close(index);
},
btn2: function(index, layero){
$.ajax({
url : '/sendSales',
type: 'post',
data: $('#sendSalesForm').serialize(),
dataType: 'json',
success: function (resp) {
if(resp.errcode === 0){
layer.msg(resp.errmsg || '操作成功');
setTimeout(function(){
location.reload();
}, 1000);
} else {
layer.alert(resp.errmsg || '网络异常');
}
},
error: function (res) {
console.log(res);
}
})
}
});
return false;
})
},
//人工审单
changeOrder: function(){
$('.deletegoods').click(function(){
......
......@@ -499,7 +499,7 @@
@endif
<!-- 人工审单时去掉操作按钮 -->
@if (!isset($_REQUEST['tags']) && $action_name != 'changeOrder')
@if (!isset($_REQUEST['tags']) && $action_name != 'changeOrder' && $action_name != 'sendSales')
<p style="padding-left: 5px;">操作</p>
<div class="tabs-box">
<!-- 判断操作权限 -->
......
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 sign in to comment