Commit e7e492a2 by HTML5-侯张振

更改渠道过期显示

parent 5e8859b2
...@@ -185,6 +185,7 @@ class Index extends CI_Controller{ ...@@ -185,6 +185,7 @@ class Index extends CI_Controller{
$this->load->helper('date'); $this->load->helper('date');
$total_count=$this->channel->get_all_count($where); $total_count=$this->channel->get_all_count($where);
$counts=$this->channel->get_type_count($where); $counts=$this->channel->get_type_count($where);
if($status != ''){ if($status != ''){
$where.=' and B.recommend_status = '.$status; $where.=' and B.recommend_status = '.$status;
} }
...@@ -192,7 +193,8 @@ class Index extends CI_Controller{ ...@@ -192,7 +193,8 @@ class Index extends CI_Controller{
if ($is_search) { if ($is_search) {
$total_count=$this->channel->get_all_count($where); $total_count=$this->channel->get_all_count($where);
} }
//var_dump($counts);
//所有状态(从报备到签约)的客户数量 //所有状态(从报备到签约)的客户数量
//各种状态的客户数量 //各种状态的客户数量
...@@ -241,6 +243,7 @@ class Index extends CI_Controller{ ...@@ -241,6 +243,7 @@ class Index extends CI_Controller{
if($total_count > 0){ if($total_count > 0){
$customer_array = array(); $customer_array = array();
$recommend_status =$this->config->item('customer_recommend_status_mini', 'user_config'); $recommend_status =$this->config->item('customer_recommend_status_mini', 'user_config');
//var_dump($recommend_status);
$datestring="%Y-%m-%d"; $datestring="%Y-%m-%d";
$this->load->helper('date'); $this->load->helper('date');
$customer_array = $this->channel->get_all_info($where, $page_no, self::PAGE_SIZE); $customer_array = $this->channel->get_all_info($where, $page_no, self::PAGE_SIZE);
...@@ -250,6 +253,8 @@ class Index extends CI_Controller{ ...@@ -250,6 +253,8 @@ class Index extends CI_Controller{
if (!$lastTime) $lastTime = $cus['create_time']; if (!$lastTime) $lastTime = $cus['create_time'];
$customer_array[$i]['create_time']=mdate($datestring,$cus['create_time']); $customer_array[$i]['create_time']=mdate($datestring,$cus['create_time']);
$customer_array[$i]['recommend_status']=$recommend_status[$cus['recommend_status']]; $customer_array[$i]['recommend_status']=$recommend_status[$cus['recommend_status']];
$customer_array[$i]['is_expired'] = $cus['is_expired'];
} }
} else { } else {
$customer_array = array(); $customer_array = array();
......
...@@ -35,7 +35,7 @@ class Channel_model extends My_Model{ ...@@ -35,7 +35,7 @@ class Channel_model extends My_Model{
//按首字母排列 //按首字母排列
//$where.=' order by B.create_time desc'; //$where.=' order by B.create_time desc';
$this->db->select('B.id,A.customer_user,A.customer_mobile,A.customer_type,B.sale_id,B.create_time,B.recommend_status,H.user_name sale_name,F.manager_name channel_name,C.company_name,I.building_title,J.user_name,B.remark,RR.region_name') $this->db->select('B.id,A.customer_user,A.customer_mobile,A.customer_type,B.sale_id,B.create_time,B.recommend_status,H.user_name sale_name,F.manager_name channel_name,C.company_name,I.building_title,J.user_name,B.remark,RR.region_name,B.is_expired')
->from('tb_customer_building B') ->from('tb_customer_building B')
->join('tb_customer A','A.id=B.customer_id') ->join('tb_customer A','A.id=B.customer_id')
......
...@@ -143,7 +143,7 @@ ...@@ -143,7 +143,7 @@
echo '完成'; echo '完成';
}else if($customer['recommend_status']==7){ }else if($customer['recommend_status']==7){
echo '认购'; echo '认购';
}else if($customer['recommend_status']==8){ }else if($customer['expired']==1){
echo '已过期'; echo '已过期';
}else if($customer['recommend_status']==9){ }else if($customer['recommend_status']==9){
echo '可结俑'; echo '可结俑';
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
<td><?php echo $customer['company_name'];?></td> <td><?php echo $customer['company_name'];?></td>
<td><?php echo $customer['building_title'];?></td> <td><?php echo $customer['building_title'];?></td>
<td><?php echo $customer['user_name']?></td> <td><?php echo $customer['user_name']?></td>
<td><?php echo $customer['remark']?></td> <td class="Export-mark"><?php echo $customer['remark']?></td>
</tr> </tr>
<?php <?php
endforeach; endforeach;
...@@ -177,6 +177,18 @@ ...@@ -177,6 +177,18 @@
background-color: #428bca; background-color: #428bca;
border-color: #428bca; border-color: #428bca;
} }
.Export-mark{
display: inline-block;
width: 100px;
height:auto;
word-wrap: break-word;
word-break: break-all;
border-left: none !important;
border-right: none !important;
border-bottom: none !important;
text-align: center;
background-color:#fff !important;
}
</style> </style>
<div class="pagination-box"> <div class="pagination-box">
<div class="row"> <div class="row">
......
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
echo '完成'; echo '完成';
}else if($customer['recommend_status']==7){ }else if($customer['recommend_status']==7){
echo '认购'; echo '认购';
}else if($customer['recommend_status']==8){ }else if($customer['expired']==1){
echo '已过期'; echo '已过期';
}else if($customer['recommend_status']==9){ }else if($customer['recommend_status']==9){
echo '可结俑'; echo '可结俑';
......
...@@ -458,7 +458,13 @@ ...@@ -458,7 +458,13 @@
var customer_html='',status_html=''; var customer_html='',status_html='';
for(var i=0;i<data.data.customers.length;i++){ for(var i=0;i<data.data.customers.length;i++){
customer_html+="<li class='customer_li' id='"+data.data.customers[i].id+"'><div class='box-left'><div>"+data.data.customers[i].customer_user+"</div><div class='client-mid'>"+ data.data.customers[i].region_name + ' / ' +data.data.customers[i].building_title+"</div><div class='client-ren'>推荐人:"+data.data.customers[i].user_name+"</div><div class='client-fenxiao'>分销商:"+data.data.customers[i].company_name+"</div></div><div class='box-right'> <a class='client-btn' href='javascript:;'>"+data.data.customers[i].recommend_status+"</a> <div class='client-date'>"+data.data.customers[i].create_time+"</div></div> </li>"; customer_html+="<li class='customer_li' id='"+data.data.customers[i].id+"'><div class='box-left'><div>"+data.data.customers[i].customer_user+"</div><div class='client-mid'>"+ data.data.customers[i].region_name + ' / ' +data.data.customers[i].building_title+"</div><div class='client-ren'>推荐人:"+data.data.customers[i].user_name+"</div><div class='client-fenxiao'>分销商:"+data.data.customers[i].company_name+"</div></div><div class='box-right'><a class='client-btn' href='javascript:;'>";
if(data.data.customer[i].is_expired=='0'){
customer_html+=data.data.customers[i].recommend_status;
}else{
customer_html+="已过期";
}
customer_html+="</a> <div class='client-date'>"+data.data.customers[i].create_time+"</div></div> </li>";
} }
currStatus = postdata.status; //当前请求的状态 currStatus = postdata.status; //当前请求的状态
......
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