admin:c_brand

This commit is contained in:
xiaoyu
2023-08-15 16:27:26 +08:00
parent 4eb3c5b89c
commit 411c73d36b
6 changed files with 69 additions and 19 deletions
+10 -4
View File
@@ -107,6 +107,7 @@ class Customer extends HD_Controller
$show_info['wxqyAry'] = $wxqyAry;
$show_info['wxgrAry'] = $wxgrAry;
$show_info['csbizidAry'] = $this->customers_model->csbizidAry();
$show_info['cbrandAry'] = $this->customers_model->cbrandAry();
$this->data['show_info'] = $show_info;
$this->data['lists'] = $lists;
$this->data['pager'] = array('count' => ceil($count / $size), 'curr' => $page, 'totle' => $count);
@@ -392,6 +393,7 @@ class Customer extends HD_Controller
!$params['cf_title'] && $params['cf_title'] = '';
!$params['qdjl_id'] && $params['qdjl_id'] = '';
!$params['level'] && $params['level'] = '';
!is_numeric($params['c_brand']) && $params['c_brand'] = '';
!$params['of_id'] && $params['of_id'] = '';
!$params['of2_id'] && $params['of2_id'] = '';
!$params['city_id'] && $params['city_id'] = '';
@@ -421,6 +423,9 @@ class Customer extends HD_Controller
if ($params['level']) {
$where['level'] = $params['level'];
}
if (is_numeric($params['c_brand'])) {
$where['c_brand'] = $params['c_brand'];
}
if ($params['of_id']) {
$where['of_id'] = $params['of_id'];
}
@@ -607,10 +612,11 @@ class Customer extends HD_Controller
'name' => $row['name'],
'level' => $row['level'],
'mobile' => $mobile_sub,
'c_brand' => $this->customers_model->cbrandAry($row['c_brand']),
'of_title' => $of_title,
'wxqy_name' => $this->customers_model->wxqyAry($row['wxqy']),
'wxgr_name' => $this->customers_model->wxgrAry($row['wxgr']),
'wx_name' => '企微:' . $this->customers_model->wxqyAry($row['wxqy']) . ' 个微:' . $this->customers_model->wxgrAry($row['wxgr']),
'wx_name' => '企微' . $this->customers_model->wxqyAry($row['wxqy']) . ' 个微' . $this->customers_model->wxgrAry($row['wxgr']),
'cf_user' => $cf_user,
'to_send' => $to_send,
'c_time' => date('Y-m-d H:i:s', $row['c_time']),
@@ -946,7 +952,7 @@ class Customer extends HD_Controller
"dt_time" => "到店时间",
"order_time" => "下单时间",
"cont_time" => "最后联系时间",
#"of_title" => "来源",
"c_brand" => "品牌归属",
"of_title_1" => "来源1",
"of_title_2" => "来源2",
"biz_name" => "归属门店",
@@ -961,7 +967,7 @@ class Customer extends HD_Controller
$status_arr = $this->customers_model->get_status();
unset($status_arr['-1']);
if ($count) {
$fileds = "id, name, mobile, level, status, cs_biz_id, FROM_UNIXTIME(c_time) as c_time, if(dt_time>0, dt_time,'') as dt_time, if(order_time>0, order_time,'') as order_time, if(cont_time>0, cont_time,'') as cont_time, cf_title, cf_id, of_id, of2_id, (SELECT biz_name FROM `lc_biz` where id = `lc_receiver_customers`.biz_id) as biz_name, (SELECT uname FROM `lc_app_licheb_users` where id = `lc_receiver_customers`.admin_id) as admin_name, biz_id, admin_id, wxqy, wxgr, (select city_name from lc_area where city_id = lc_receiver_customers.city_id limit 1) as city_name, (select county_name from lc_area where county_id = lc_receiver_customers.county_id limit 1) as county_name";
$fileds = "id, name, mobile, level, status, cs_biz_id, FROM_UNIXTIME(c_time) as c_time, if(dt_time>0, dt_time,'') as dt_time, if(order_time>0, order_time,'') as order_time, if(cont_time>0, cont_time,'') as cont_time, c_brand, cf_id, of_id, of2_id, (SELECT biz_name FROM `lc_biz` where id = `lc_receiver_customers`.biz_id) as biz_name, (SELECT uname FROM `lc_app_licheb_users` where id = `lc_receiver_customers`.admin_id) as admin_name, biz_id, admin_id, wxqy, wxgr, (select city_name from lc_area where city_id = lc_receiver_customers.city_id limit 1) as city_name, (select county_name from lc_area where county_id = lc_receiver_customers.county_id limit 1) as county_name";
$rows = $this->customers_model->select($where, 'id desc', $page, $size, $fileds);
foreach ($rows as $key => $val) {
$of_title = '';
@@ -987,7 +993,7 @@ class Customer extends HD_Controller
'dt_time' => $val['dt_time'],
'order_time' => $val['order_time'],
'cont_time' => $val['cont_time'],
'of_title' => $of_title,
'c_brand' => $this->customers_model->cbrandAry($val['c_brand'] ),
'of_title_1' => $of_title_1,
'of_title_2' => $of_title_2,
'biz_name' => $val['biz_name'],
+4 -3
View File
@@ -58,16 +58,17 @@
<td class="table-td"><span class="mr5">加入时间:</span>{{info.c_time}}</td>
</tr>
<tr>
<td class="table-td" v-if="info.c_brand"><span class="mr5">品牌归属:</span>{{info.c_brand}}</td>
<td class="table-td"><span class="mr5">客户来源:</span>{{info.of_title}}</td>
<td class="table-td"><span class="mr5">微信好友:</span>{{info.wx_name}}</td>
<td class="table-td"><span class="mr5">客户等级:</span>{{info.level}}</td>
</tr>
<tr>
<td class="table-td"><span class="mr5">微信好友:</span>{{info.wx_name}}</td>
<td class="table-td"><span class="mr5">客户位置:</span>{{info.city_county}}</td>
<td class="table-td" v-if="info.to_send"><span class="mr5">是否改派:</span>{{info.to_send}}</td>
<td class="table-td" v-if="info.cf_user"><span class="mr5">分销来源:</span>{{info.cf_user}}</td>
<!--td class="table-td" v-if="info.cf_user"><span class="mr5">分销来源:</span>{{info.cf_user}}</td>
<td class="table-td" v-if="!info.to_send && !info.cf_user" colspan="2"></td>
<td class="table-td" v-else-if="!info.to_send || !info.cf_user"></td>
<td class="table-td" v-else-if="!info.to_send || !info.cf_user"></td-->
</tr>
<!-- <tr v-if="info.to_send || info.cf_user">-->
<!-- <td class="table-td" v-if="info.to_send"><span class="mr5">是否改派:</span>{{info.to_send}}</td>-->
+9
View File
@@ -77,6 +77,15 @@
</select>
</div>
</div>
<div class="am-form-group fl">
<label class="am-para-label w80">品牌归属:</label>
<div class="am-para-inline w100">
<select name="c_brand" v-model="params.c_brand">
<option value=''>请选择</option>
<option :value="i" v-for="(v,i) in show_info.cbrandAry">{{v}}</option>
</select>
</div>
</div>
<div class="am-form-group" style="margin-bottom: 0px;"></div>
<div class="am-form-group fl">
<label class="am-para-label w80">客户来源:</label>
@@ -206,6 +206,16 @@ class Receiver_customers_model extends HD_Model
}
}
public function cbrandAry($c_brand=null){
$arr = [0 => '综合', 1 => '东风纳米', 4 => '哪吒', 5 => '零跑'];
if (is_numeric($c_brand)) {
return $arr[$c_brand];
} else {
return $arr;
}
}
public function count_order($where)
{
return $this->select_order($where, '', '', '', '', 1);
+36 -1
View File
@@ -4,6 +4,41 @@ defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
public function index(){
$url = 'https://salesapp-sit.hozonauto.com/appservice/app/if/salesclue/createSalesclue';
$data[] = array(
'cusSource3' => "010403",
'customerName' => "测试A",
'dealerCode' => "100316",
'fromSystem' => "好店云",
'mobile' => "13012341234",
'remark' => "测试数据",
);
$data = json_encode($data, JSON_UNESCAPED_UNICODE);
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//https
if (strlen($url) > 5 && strtolower(substr($url, 0, 5)) == "https") {
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
}
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json; charset=utf-8',
'Content-Length: ' . strlen($data)
)
);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
var_dump($response);
}
}
-11
View File
@@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>