修改管理后台导出线索和空间站后台客户等级筛选
This commit is contained in:
@@ -29,6 +29,8 @@ class Clues extends HD_Controller
|
||||
$this->load->model('app/paic/app_paic_users_model');
|
||||
$this->load->model('receiver/receiver_enroll_model');
|
||||
|
||||
$this->load->model('biz/biz_car_brand_model');
|
||||
|
||||
$this->log_dir = 'receiver_clues';
|
||||
}
|
||||
|
||||
@@ -74,6 +76,7 @@ class Clues extends HD_Controller
|
||||
$this->data['maintainAry'] = $this->maintainAry;
|
||||
$this->data['export_button'] = $export_button;
|
||||
$this->data['role'] = $this->role;
|
||||
$this->data['levelList'] = $this->customers_model->get_sdata('level');
|
||||
$this->data['_title'] = '线索池列表';
|
||||
return $this->show_view('receiver/clues/lists', true);
|
||||
}
|
||||
@@ -159,6 +162,9 @@ class Clues extends HD_Controller
|
||||
!$params['brand_id'] && $params['brand_id'] = 0;
|
||||
!$params['series_id'] && $params['series_id'] = 0;
|
||||
!strlen($params['admin_id']) && $params['admin_id'] = '';
|
||||
if ($params['level']) {
|
||||
$where["id in (select rid from lc_receiver_customers where `level` = '{$params['level']}')"] = null;
|
||||
}
|
||||
|
||||
$count = $this->clues_model->count($where);
|
||||
$lists = [];
|
||||
@@ -1296,6 +1302,8 @@ class Clues extends HD_Controller
|
||||
continue;
|
||||
}
|
||||
$biz = $this->biz_model->get(array('id' => $item['biz_id']));
|
||||
//获取一条门店品牌
|
||||
$bizBrand = $this->biz_car_brand_model->get(['biz_id' => $biz['id']]);
|
||||
$add = array(
|
||||
'rid' => $re['id'],
|
||||
'cid' => create_customer_no($biz['county_id']),
|
||||
@@ -1320,6 +1328,15 @@ class Clues extends HD_Controller
|
||||
if ($re['app_id'] == Receiver_clues_model::APP_ID_ACTIVITY) {
|
||||
$add['un_lock'] = Receiver_customers_model::UNLOCK_STATUS;
|
||||
}
|
||||
//获取用户留资记录与门店品牌对应数据
|
||||
if ($bizBrand) {
|
||||
$where = ['mobile' => $re['mobile'], 'brand_id' => $bizBrand['brand_id']];
|
||||
$enrollRows = $this->receiver_enroll_model->select($where, 'id desc', 1, 1);
|
||||
if ($enrollRows) {
|
||||
$add['brand_id'] = $enrollRows[0]['brand_id'];
|
||||
$add['series_id'] = $enrollRows[0]['series_id'];
|
||||
}
|
||||
}
|
||||
$customers_id = $this->customers_model->add($add);
|
||||
if (!$customers_id) {
|
||||
continue;
|
||||
|
||||
@@ -92,6 +92,15 @@
|
||||
<?php } else { ?>
|
||||
<input name="belong_id" value="<?= $params['belong_id'] ?>" type="hidden">
|
||||
<?php } ?>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">客户等级:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select name="level" v-model="level">
|
||||
<option value="">请选择</option>
|
||||
<option :value="item" v-for="item in levelList">{{item}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fl" style="width:1920px">
|
||||
<label class="am-para-label w100">线索来源:</label>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
@@ -290,7 +299,7 @@
|
||||
<tbody>
|
||||
<? if ($lists) {
|
||||
foreach ($lists as $v) { ?>
|
||||
<tr >
|
||||
<tr>
|
||||
<td style="vertical-align: middle;"><input type="checkbox" name="ids[]" class="order-ids"
|
||||
value="<?= $v['id'] ?>"/></td>
|
||||
<td style="vertical-align: middle;"><a
|
||||
@@ -301,7 +310,7 @@
|
||||
<td style="vertical-align: middle;"><?= $v['biz_poi'] ?><br><?= $v['biz_name'] ?></td>
|
||||
<td style="vertical-align: middle;">
|
||||
<?= $v['status_name'] ?><br>
|
||||
<?= $v['is_unlock']?>
|
||||
<?= $v['is_unlock'] ?>
|
||||
</td>
|
||||
<td style="text-align: left">
|
||||
分配时间: <?= $v['p_time'] ?><br>
|
||||
@@ -375,6 +384,8 @@
|
||||
export_button: <?=$export_button?>,
|
||||
admin_id: <?=strlen($params['admin_id']) ? $params['admin_id'] : '""'?>,
|
||||
adminAry: <?=$adminLists ? json_encode($adminLists) : '[]'?>,
|
||||
levelList: <?=$levelList ? json_encode($levelList) : '[]'?>,
|
||||
level: "<?=$params['level'] ? $params['level'] : ''?>",
|
||||
},
|
||||
mounted: function () {
|
||||
this.init_provinces();
|
||||
|
||||
@@ -405,7 +405,7 @@ class Clues extends BaseController
|
||||
$status_name = $statusAry[$v['status']]['name'];
|
||||
$v['status2'] && $status_name .= '‒' . $statusAry[$v['status']]['list'][$v['status2']];
|
||||
if ($limit >= 10000) {
|
||||
$unLockReason = $is_unlock = '';
|
||||
$levelName = $unLockReason = $is_unlock = '';
|
||||
if ($v['status'] == 1) {
|
||||
$unlockCustomer = $this->customers_model->get(['rid' => $v['id'], 'un_lock' => Receiver_customers_model::LOCK_STATUS]);
|
||||
$is_unlock = $unlockCustomer ? '已解锁' : '未解锁';
|
||||
@@ -415,6 +415,7 @@ class Clues extends BaseController
|
||||
preg_match_all('/【(.*?)】/', $optLog[0]['log'], $matches);
|
||||
$unLockReason = $matches[1];
|
||||
}
|
||||
$levelName = $unlockCustomer['level'];
|
||||
}
|
||||
$temp = [
|
||||
'name' => $v['name'], 'mobile' => mobile_asterisk($v['mobile']), 'sid' => $v['sid'],
|
||||
@@ -428,7 +429,8 @@ class Clues extends BaseController
|
||||
'subStatusCn' => $statusAry[$v['status']]['list'][$v['status2']] ?: '',
|
||||
'isUnlock' => $is_unlock,
|
||||
'unLockReason' => $unLockReason,
|
||||
'enTime' => $v['en_time'],
|
||||
'levelName' => $levelName,
|
||||
'enTime' => $v['en_time']
|
||||
];
|
||||
} else {
|
||||
$temp = [
|
||||
@@ -449,7 +451,7 @@ class Clues extends BaseController
|
||||
}
|
||||
$columns = [];
|
||||
if ($limit >= 10000) {
|
||||
$columns = ['姓名', '手机号', '订单编号', '归属', '中心', '机构', '关注车型', '所属省', '所属市', '主状态', '子状态', '是否解锁', '未解锁原因', '入池时间'];
|
||||
$columns = ['姓名', '手机号', '订单编号', '归属', '中心', '机构', '关注车型', '所属省', '所属市', '主状态', '子状态', '是否解锁', '未解锁原因', '客户等级', '入池时间'];
|
||||
}
|
||||
return ['list' => $list, 'count' => $count, 'statusList' => $statusList, 'columns' => $columns];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user