Commit 970ba304 by HTML5-侯张振
parents 8ae91122 12b426d9
<?php <?php
/** /**
*渠道管理表,管理员所属权限是渠道,及相关操作 *渠道管理表,管理员所属权限是渠道,及相关操作
* *
* @package application/model * @package application/model
* @version 2016-12-15 * @version 2016-12-15
* @author libin * @author libin
...@@ -12,7 +12,7 @@ class Channel_model extends My_Model{ ...@@ -12,7 +12,7 @@ class Channel_model extends My_Model{
* 使用到的表 * 使用到的表
*/ */
public $table = 'tb_channel'; public $table = 'tb_channel';
/** /**
* 构造器 * 构造器
*/ */
...@@ -23,11 +23,11 @@ class Channel_model extends My_Model{ ...@@ -23,11 +23,11 @@ class Channel_model extends My_Model{
$this->db = $this->load->database('default', true); $this->db = $this->load->database('default', true);
} }
/** /**
* *
* 查询所有该渠道下属客户信息 * 查询所有该渠道下属客户信息
* @param int $where * @param int $where
* @return array 包含统计起止时间的数组 * @return array 包含统计起止时间的数组
* @throws Exception * @throws Exception
* @author libin * @author libin
* @version 2016-12-18 * @version 2016-12-18
*/ */
...@@ -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.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')
->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')
...@@ -64,11 +64,11 @@ class Channel_model extends My_Model{ ...@@ -64,11 +64,11 @@ class Channel_model extends My_Model{
} }
/** /**
* *
* 查询所有该渠道下属各个类别客户信息总条数 * 查询所有该渠道下属各个类别客户信息总条数
* @param int $where * @param int $where
* @return array 包含统计起止时间的数组 * @return array 包含统计起止时间的数组
* @throws Exception * @throws Exception
* @author lihengyi * @author lihengyi
* @version 2016-12-23 * @version 2016-12-23
*/ */
...@@ -88,7 +88,7 @@ class Channel_model extends My_Model{ ...@@ -88,7 +88,7 @@ class Channel_model extends My_Model{
->where($where_sql) ->where($where_sql)
->group_by('B.recommend_status') ->group_by('B.recommend_status')
->order_by('B.recommend_status'); ->order_by('B.recommend_status');
$resp=$this->db->get(); $resp=$this->db->get();
//$resp=$resp->result_array(); //$resp=$resp->result_array();
if($resp->num_rows() > 0) if($resp->num_rows() > 0)
...@@ -99,11 +99,11 @@ class Channel_model extends My_Model{ ...@@ -99,11 +99,11 @@ class Channel_model extends My_Model{
} }
/** /**
* *
* 查询所有该渠道下属客户信息总条数 * 查询所有该渠道下属客户信息总条数
* @param int $where * @param int $where
* @return array 包含统计起止时间的数组 * @return array 包含统计起止时间的数组
* @throws Exception * @throws Exception
* @author libin * @author libin
* @version 2016-12-18 * @version 2016-12-18
*/ */
...@@ -122,17 +122,17 @@ class Channel_model extends My_Model{ ...@@ -122,17 +122,17 @@ class Channel_model extends My_Model{
if($where!=''){ if($where!=''){
$this->db->where($where); $this->db->where($where);
} }
$resp=$this->db->get(); $resp=$this->db->get();
$resp=$resp->result_array(); $resp=$resp->result_array();
return $resp[0]['num']; return $resp[0]['num'];
} }
/** /**
* *
* 查询所有该渠道的所有下属渠道id * 查询所有该渠道的所有下属渠道id
* @param int $where * @param int $where
* @return array 包含统计起止时间的数组 * @return array 包含统计起止时间的数组
* @throws Exception * @throws Exception
* @author libin * @author libin
* @version 2016-12-18 * @version 2016-12-18
* *
...@@ -142,7 +142,7 @@ class Channel_model extends My_Model{ ...@@ -142,7 +142,7 @@ class Channel_model extends My_Model{
->from('tb_channel'); ->from('tb_channel');
$query=$this->db->get(); $query=$this->db->get();
$re=$query->result_array(); $re=$query->result_array();
//组建渠道遍历树结构 //组建渠道遍历树结构
$tree=array(); $tree=array();
foreach($re as $k=>$v){ foreach($re as $k=>$v){
...@@ -168,11 +168,11 @@ class Channel_model extends My_Model{ ...@@ -168,11 +168,11 @@ class Channel_model extends My_Model{
return array(); return array();
} }
/** /**
* *
* 查询所有该渠道的渠道id和名称 * 查询所有该渠道的渠道id和名称
* @param int $where * @param int $where
* @return array 包含统计起止时间的数组 * @return array 包含统计起止时间的数组
* @throws Exception * @throws Exception
* @author libin * @author libin
* @version 2016-12-18 * @version 2016-12-18
* *
...@@ -184,7 +184,7 @@ class Channel_model extends My_Model{ ...@@ -184,7 +184,7 @@ class Channel_model extends My_Model{
if($where!=''){ if($where!=''){
$this->db->where($where); $this->db->where($where);
} }
$query=$this->db->get(); $query=$this->db->get();
if($query->num_rows() > 0) if($query->num_rows() > 0)
{ {
...@@ -194,11 +194,11 @@ class Channel_model extends My_Model{ ...@@ -194,11 +194,11 @@ class Channel_model extends My_Model{
} }
/** /**
* *
* 查询所有该渠道的所有下属渠道 * 查询所有该渠道的所有下属渠道
* @param int $where * @param int $where
* @return array 包含统计起止时间的数组 * @return array 包含统计起止时间的数组
* @throws Exception * @throws Exception
* @author libin * @author libin
* @version 2016-12-18 * @version 2016-12-18
*$c必须传空数组 *$c必须传空数组
...@@ -206,19 +206,19 @@ class Channel_model extends My_Model{ ...@@ -206,19 +206,19 @@ class Channel_model extends My_Model{
function findChildren($tree,$c){ function findChildren($tree,$c){
array_push($c,$tree['id']); array_push($c,$tree['id']);
if(isset($tree['children'])){ if(isset($tree['children'])){
foreach($tree['children'] as $k => $v){ foreach($tree['children'] as $k => $v){
$c=$this->findChildren($v,$c); $c=$this->findChildren($v,$c);
} }
} }
return $c; return $c;
} }
/** /**
* *
* 查询所渠道信息分页显示 * 查询所渠道信息分页显示
* @param int $where * @param int $where
* @return array 包含统计起止时间的数组 * @return array 包含统计起止时间的数组
* @throws Exception * @throws Exception
* @author libin * @author libin
* @version 2016-12-18 * @version 2016-12-18
*/ */
...@@ -263,4 +263,4 @@ class Channel_model extends My_Model{ ...@@ -263,4 +263,4 @@ class Channel_model extends My_Model{
} }
return array(); return array();
} }
} }
\ No newline at end of file
...@@ -11,15 +11,15 @@ ...@@ -11,15 +11,15 @@
<meta content="" name="description" /> <meta content="" name="description" />
<meta content="" name="author" /> <meta content="" name="author" />
<meta name="MobileOptimized" content="320"> <meta name="MobileOptimized" content="320">
<!-- BEGIN GLOBAL MANDATORY STYLES --> <!-- BEGIN GLOBAL MANDATORY STYLES -->
<link href="<?php echo APPLICATION_PATH ?>/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/> <link href="<?php echo APPLICATION_PATH ?>/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo APPLICATION_PATH ?>/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/> <link href="<?php echo APPLICATION_PATH ?>/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo APPLICATION_PATH ?>/assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/> <link href="<?php echo APPLICATION_PATH ?>/assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
<!-- END GLOBAL MANDATORY STYLES --> <!-- END GLOBAL MANDATORY STYLES -->
<!-- BEGIN PAGE LEVEL STYLES --> <!-- BEGIN PAGE LEVEL STYLES -->
<link rel="stylesheet" type="text/css" href="<?php echo APPLICATION_PATH ?>/assets/plugins/select2/select2-metronic.css" /> <link rel="stylesheet" type="text/css" href="<?php echo APPLICATION_PATH ?>/assets/plugins/select2/select2-metronic.css" />
<!-- END PAGE LEVEL SCRIPTS --> <!-- END PAGE LEVEL SCRIPTS -->
<!-- BEGIN THEME STYLES --> <!-- BEGIN THEME STYLES -->
<link href="<?php echo APPLICATION_PATH ?>/assets/css/style-metronic.css" rel="stylesheet" type="text/css"/> <link href="<?php echo APPLICATION_PATH ?>/assets/css/style-metronic.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo APPLICATION_PATH ?>/assets/css/style.css" rel="stylesheet" type="text/css"/> <link href="<?php echo APPLICATION_PATH ?>/assets/css/style.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo APPLICATION_PATH ?>/assets/css/style-responsive.css" rel="stylesheet" type="text/css"/> <link href="<?php echo APPLICATION_PATH ?>/assets/css/style-responsive.css" rel="stylesheet" type="text/css"/>
...@@ -66,15 +66,15 @@ ...@@ -66,15 +66,15 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<input type="text" name="captcha" id="captcha" class="input-sm input-small" onkeypress="EnterPress()"> <input type="text" name="captcha" id="captcha" class="input-sm input-small" onkeypress="EnterPress()" onkeydown="EnterPress(event)">
<?php echo isset($image)?$image:'no';?> <?php echo isset($image)?$image:'no';?>
</div> </div>
<div class="form-actions text-center"> <div class="form-actions text-center">
<input type="checkbox" checked="true" name="chkRememberUsername" class="text-left" id="rmbUser">记住用户名 <input type="checkbox" checked="true" name="chkRememberUsername" class="text-left" id="rmbUser">记住用户名
<button type="button" class="btn green pull-center text-right login-btn"> <button type="button" class="btn green pull-center text-right login-btn">
登录 <i class="m-icon-swapright m-icon-white"></i> 登录 <i class="m-icon-swapright m-icon-white"></i>
</button> </button>
</div> </div>
</form> </form>
<!-- END LOGIN FORM --> <!-- END LOGIN FORM -->
...@@ -86,28 +86,28 @@ ...@@ -86,28 +86,28 @@
</div> </div>
<!-- END COPYRIGHT --> <!-- END COPYRIGHT -->
<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) --> <!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
<!-- BEGIN CORE PLUGINS --> <!-- BEGIN CORE PLUGINS -->
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="/assets/plugins/respond.min.js"></script> <script src="/assets/plugins/respond.min.js"></script>
<script src="/assets/plugins/excanvas.min.js"></script> <script src="/assets/plugins/excanvas.min.js"></script>
<![endif]--> <![endif]-->
<script src="<?php echo APPLICATION_PATH ?>/assets/plugins/jquery-1.10.2.min.js" type="text/javascript"></script> <script src="<?php echo APPLICATION_PATH ?>/assets/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="<?php echo APPLICATION_PATH ?>/assets/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script> <script src="<?php echo APPLICATION_PATH ?>/assets/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<script src="<?php echo APPLICATION_PATH ?>/assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> <script src="<?php echo APPLICATION_PATH ?>/assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
<script src="<?php echo APPLICATION_PATH ?>/assets/plugins/jquery.blockui.min.js" type="text/javascript"></script> <script src="<?php echo APPLICATION_PATH ?>/assets/plugins/jquery.blockui.min.js" type="text/javascript"></script>
<script src="<?php echo APPLICATION_PATH ?>/assets/plugins/jquery.cookie.min.js" type="text/javascript"></script> <script src="<?php echo APPLICATION_PATH ?>/assets/plugins/jquery.cookie.min.js" type="text/javascript"></script>
<script src="<?php echo APPLICATION_PATH ?>/assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript" ></script> <script src="<?php echo APPLICATION_PATH ?>/assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript" ></script>
<!-- END CORE PLUGINS --> <!-- END CORE PLUGINS -->
<!-- BEGIN PAGE LEVEL PLUGINS --> <!-- BEGIN PAGE LEVEL PLUGINS -->
<script src="<?php echo APPLICATION_PATH ?>/assets/plugins/jquery-validation/dist/jquery.validate.min.js" type="text/javascript"></script> <script src="<?php echo APPLICATION_PATH ?>/assets/plugins/jquery-validation/dist/jquery.validate.min.js" type="text/javascript"></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/select2/select2.min.js"></script>
<!-- END PAGE LEVEL PLUGINS --> <!-- END PAGE LEVEL PLUGINS -->
<!-- BEGIN PAGE LEVEL SCRIPTS --> <!-- BEGIN PAGE LEVEL SCRIPTS -->
<script src="<?php echo APPLICATION_PATH ?>/assets/js/backend/core/app.js"></script> <script src="<?php echo APPLICATION_PATH ?>/assets/js/backend/core/app.js"></script>
<script src="<?php echo APPLICATION_PATH ?>/assets/js/backend/custom/login.js"></script> <script src="<?php echo APPLICATION_PATH ?>/assets/js/backend/custom/login.js"></script>
<!-- END PAGE LEVEL SCRIPTS --> <!-- END PAGE LEVEL SCRIPTS -->
<script> <script>
jQuery(document).ready(function() { jQuery(document).ready(function() {
App.init(); App.init();
//初始化 //初始化
if ($.cookie("rmbUser")) { if ($.cookie("rmbUser")) {
...@@ -116,11 +116,12 @@ ...@@ -116,11 +116,12 @@
// $("#password").val($.cookie("password")); // $("#password").val($.cookie("password"));
} }
}); });
function EnterPress(){ function EnterPress(e){ //传入 event
if(event.keyCode == 13){ var e = e || window.event;
if(event.keyCode == 13){
$('.login-btn').trigger('click'); $('.login-btn').trigger('click');
} }
} }
$(".login-btn").click(function(){ $(".login-btn").click(function(){
var username = $("#username").val(); var username = $("#username").val();
if(!username) if(!username)
...@@ -189,4 +190,4 @@ ...@@ -189,4 +190,4 @@
<!-- END JAVASCRIPTS --> <!-- END JAVASCRIPTS -->
</body> </body>
<!-- END BODY --> <!-- END BODY -->
</html> </html>
\ No newline at end of file
...@@ -367,8 +367,7 @@ ...@@ -367,8 +367,7 @@
format: 'yyyy-mm-dd', format: 'yyyy-mm-dd',
language: 'cn', language: 'cn',
}); });
var aa = "<?php echo $customer['recommend_status']?>";
console.log(aa);
//分销商筛选 //分销商筛选
$('#parent_name').on('keyup click',function(){ $('#parent_name').on('keyup click',function(){
$('#channel_list').show(); $('#channel_list').show();
......
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