Commit 07225ff4 by HTML5-侯张振
parents c153b91f 62d104aa
......@@ -356,7 +356,9 @@ class Report extends CI_Controller
$managerId = (int)$post['mid'];
$cbid = (int)$post['cbid'];
$reset = $post['reset'];
if(empty($manager_id)){
$manager_id=0;
}
if (!in_array($userType, array('sale', 'manager')) || !$cbid || (!$saleId && !$managerId)) {
$result = array('errcode' => 4,'errmsg' => '参数错误');
} else {
......@@ -364,7 +366,8 @@ class Report extends CI_Controller
//重新分配,记录日志
//if ($reset) {
$customerBuilding = $this->customer_building->get(array('id' => $cbid));
// echo '<pre>';
// print_r($customerBuilding);die;
$reportedInfo = $this->customer_building->get_report_id($customerBuilding['id']);
//若此客户已经分配,其他报备则不可分配
......
......@@ -520,7 +520,7 @@
$('.newdetermine').click(function(){
$('.userList').hide();
$('.hzz-keepout').show();
if (_type && _mid && flag) {
if (_type && flag) {
$.ajax({
type: 'post',
url: "<?php echo site_url('admin/report/allot') ?>",
......@@ -540,17 +540,19 @@
alert('出错了');
}
});
}else if(!_mid){
$('.hzz-keepout').hide();
alert("没有销售经理,不支持分配");
}else{
}
// else if(!_mid){
// $('.hzz-keepout').hide();
// alert("没有销售经理,不支持分配");
//
// }
else{
$('.hzz-keepout').hide();
alert('请选择销售');
}
});
//搜索姓名
$('#search_uname').on('keyup click',function() {
$('.search_uname').on('keyup click',function() {
var _val = $.trim($(this).val());
......
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