Commit 421a9a3d by HTML5-侯张振

增加 查看保护期

parent eb309372
......@@ -130,12 +130,13 @@ $config['admin_setup'] = array(
'operation' => array(
1 => array('name' => '客户报备', 'link'=>'admin/report/index', 'data-url'=>'report/index', 'controller' => 'report-index'),
2 => array('name' => '保护期设置', 'link'=>'admin/report/circulation', 'data-url'=>'report/circulation', 'controller' => 'report-circulation'),
3 => array('name' => '分销商绑定', 'link'=>'admin/report/distributors', 'data-url'=>'report/distributors', 'controller' => 'report-distributors'),
4 => array('name' => '经纪人管理', 'link'=>'admin/report/agents', 'data-url'=>'report/agents', 'controller' => 'report-agents'),
5 => array('name' => '二次报备管理', 'link'=>'admin/report/reportAgain', 'data-url'=>'report/reportAgain', 'controller' => 'report-reportAgain'),
3 => array('name' => '保护期查看', 'link'=>'admin/report/protection', 'data-url'=>'report/protection', 'controller' => 'report-protection'),
4 => array('name' => '分销商绑定', 'link'=>'admin/report/distributors', 'data-url'=>'report/distributors', 'controller' => 'report-distributors'),
5 => array('name' => '经纪人管理', 'link'=>'admin/report/agents', 'data-url'=>'report/agents', 'controller' => 'report-agents'),
6 => array('name' => '二次报备管理', 'link'=>'admin/report/reportAgain', 'data-url'=>'report/reportAgain', 'controller' => 'report-reportAgain'),
),
'actions'=>array(
'report'=>array('index', 'circulation', 'distributors', 'del', 'update','agents','reportAgain'),
'report'=>array('index', 'circulation', 'protection', 'distributors', 'del', 'update','agents','reportAgain'),
)
),
......
......@@ -83,7 +83,6 @@ class Index extends CI_Controller{
$this->data['red_count'] = $red_count;
$this->data['log_data'] = $logs;
$this->load->view('admin/index',$this->data);
}
//定期获取未读的报备客户数量
......
......@@ -978,7 +978,39 @@ class Report extends CI_Controller
$this->load->view('admin/report/circulation',$this->data);
}
// 保护期查看
public function protection($page_no = 1){
$get = $this->input->get();
$uid = $this->session->userdata['u_id'];
$info = $this->manager->get(array('id' => $uid));
$this->data['building_title'] = $building = $get['building_title'];
$where = "B.building_title like '%$building%'";
if ($info['building_id']) {
$where .= " and B.id in(" . $info['building_id'] . ")";
}
$count = $this->building->get_building_count($where);
$this->data['count'] = $count;
$this->data['buildings'] = $this->building->get_building_page($where, $page_no, self::PAGE_SIZE);
$data_arr = '?building_title=' . $building;
$this->data['num_start'] = ($page_no - 1) * self::PAGE_SIZE + 1;
//获取分页
$this->data['num_link'] = set_page_new($data_arr, $this, site_url('admin/report/circulation'), $count,self::PAGE_SIZE, 4, '', true);
$this->load->view('admin/report/protection',$this->data);
}
/**
* 分销商列表
......
......@@ -257,16 +257,16 @@
//得到当前用户权限
$privileges = $CI->session->userdata('privileges');
$pri_arr = json_decode($privileges, true);
$menu_html = '';
//遍历该用户持有的每个功能
if(!empty($pri_arr))
{
foreach($pri_arr as $k => $one)
{
{
//系统存在该功能
if(isset($all_privileges[$k]))
{
$menu_html .= '<li class="last">
<a href="javascript:;"><i class="fa '.$all_privileges[$k]['icon'].'"></i><span class="title">' . $all_privileges[$k]['name'].
'</span>
......@@ -278,7 +278,8 @@
{
$menu_html .= '<ul class="sub-menu"><li>';
foreach($all_privileges[$k]['operation'] as $op => $one_op)
{
{
if(!in_array($op, $one)) continue;
$menu_html .= '<a class="menu-bar" data-url="'.$one_op['data-url'].'" href="'. site_url($one_op['link']).'">'.$one_op['name'] . (stripos($one_op['name'],'客户报备') !== false ? '<span class="red_count"></span>' : '') .'</a>';
}
......
<?php $this->load->view('admin/header');?>
<style>
.selected{
background:#2f333f;color:#fff;
}
</style>
<div class="clearfix"> </div>
<!-- BEGIN CONTAINER -->
<div class="page-container">
<!-- BEGIN SIDEBAR -->
<?php $this->load->view('admin/leftbar');?>
<!-- END SIDEBAR -->
<!-- BEGIN CONTENT -->
<div class="page-content-wrapper">
<div class="page-content">
<!-- BEGIN PAGE HEADER-->
<div class="row">
<div class="col-md-12">
<!-- BEGIN PAGE TITLE & BREADCRUMB-->
<ul class="page-breadcrumb breadcrumb">
<li> <i class="fa fa-home"></i> <a href="<?php echo site_url('admin/index');?>"> 主页 </a> <i class="fa fa-angle-right"></i> </li>
<li> <a href="javascript:;"> 报备管理 </a> <i class="fa fa-angle-right"></i> </li>
<li> <a href="<?php echo site_url('admin/report/circulation');?>"></a> 保护期查看</li>
</ul>
<!-- END PAGE TITLE & BREADCRUMB-->
</div>
</div>
<!-- END PAGE HEADER-->
<!-- BEGIN PAGE CONTENT-->
<div class="row">
<div class="col-md-12">
<!-- BEGIN EXAMPLE TABLE PORTLET-->
<div class="portlet box blue">
<div class="portlet-body clearfix">
<div class="form-body" style="padding:0">
<div style="margin-bottom: 20px;background: #F9FCEF;padding: 10px 0;border: 1px solid #ccc;" class="text-center">
<form action="<?php echo site_url('admin/report/circulation');?>" name='form' method="get">
项目名称:
<input type="text" class="form-control input-inline input-small" name="building_title" id="building_title" value="<?php echo $building_title;?>">
<button type="submit" class="btn blue" id="search">搜索</button>
<input type="reset" class="btn red" name="button2" value="清空">
</form>
</div>
</div>
<div class="girdScroller" style="overflow:auto;">
<!-- <div class="total" style="margin-bottom:10px;">总共:<span></span>条</div>-->
<table class="table table-striped table-bordered table-hover" id="sample_1">
<thead>
<tr>
<th>序号</th>
<th>项目名称</th>
<th>默认保护期(天)</th>
<th>当前保护期(天)</th>
<th>操作</th>
</tr>
</thead>
<tbody id="add-con">
<?php if(!empty($buildings)):
foreach($buildings as $building):
?>
<tr>
<td><?php echo $num_start++; ?></td>
<td><?php echo $building['building_title'];?></td>
<td>7</td>
<td><?php echo $building['valid_day'] ? $building['valid_day'] : 7;?></td>
<td><a href="<?php echo site_url('admin/report/updateDay/' . $building['id']) ?>">编辑</a></td>
</tr>
<?php
endforeach;
else:
?>
<tr>
<td colspan="16" align="center">暂无数据.</td>
</tr>
<?php
endif;
?>
</tbody>
</table>
</div>
<div class="pagination-box">
<div class="row">
<div class="col-md-8">
<div class="pagination" id="pagination">
<?php if(!empty($buildings)):
?>
<?php echo $num_link;?>
<?php
endif;
?>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- END EXAMPLE TABLE PORTLET-->
</div>
</div>
<!-- END PAGE CONTENT-->
</div>
</div>
<!-- END CONTENT -->
</div>
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<?php $this->load->view('admin/footer');?>
<!-- BEGIN PAGE LEVEL PLUGINS -->
<link rel="stylesheet" href="<?php echo APPLICATION_PATH ?>/assets/plugins/data-tables/DT_bootstrap.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo APPLICATION_PATH ?>/assets/plugins/bootstrap-datepicker/css/datepicker.css"/>
<script type="text/javascript" src="<?php echo APPLICATION_PATH ?>/assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script type="text/javascript" src="<?php echo APPLICATION_PATH ?>/assets/plugins/select2/select2.min.js"></script>
<script type="text/javascript" src="<?php echo APPLICATION_PATH ?>/assets/plugins/data-tables/jquery.dataTables.js"></script>
<script type="text/javascript" src="<?php echo APPLICATION_PATH ?>/assets/plugins/data-tables/DT_bootstrap.js"></script>
<!-- END PAGE LEVEL PLUGINS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->
<script src="<?php echo APPLICATION_PATH ?>/assets/js/backend/core/app.js"></script>
<script>
jQuery(document).ready(function() {
App.init();
});
</script>
<script type="text/javascript">
$(function (){
$("#export").click(function(){
var city_code = $("#city_code").val();
var building_id = $("#building_id").val();
location.href = "<?php echo site_url('admin/statistics/export_actions')?>?tag_name=customer_info&city_code="
+ city_code + "&building_id="
+ building_id;
});
$('input[type="reset"]').click(function(){
$("input[name='building_title']").attr('value','');
})
});
</script>
</body><!-- END BODY -->
</html>
\ No newline at end of file
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