Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sunac-quanmin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HTML5-李恒逸
sunac-quanmin
Commits
970ba304
Commit
970ba304
authored
Jun 14, 2017
by
HTML5-侯张振
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://git.okayapps.com/lihengyi/sunac-quanmin
parents
8ae91122
12b426d9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
98 deletions
+93
-98
channeladmin.php
html/application/controllers/admin/channeladmin.php
+0
-0
distributionadmin.php
html/application/controllers/admin/distributionadmin.php
+47
-50
channel_model.php
html/application/models/channel_model.php
+24
-25
login.php
html/application/views/admin/login.php
+21
-21
index_info.php
html/application/views/admin/report/index_info.php
+1
-2
No files found.
html/application/controllers/admin/channeladmin.php
View file @
970ba304
This diff is collapsed.
Click to expand it.
html/application/controllers/admin/distributionadmin.php
View file @
970ba304
This diff is collapsed.
Click to expand it.
html/application/models/channel_model.php
View file @
970ba304
<?php
/**
*渠道管理表,管理员所属权限是渠道,及相关操作
*
*
* @package application/model
* @version 2016-12-15
* @author libin
...
...
@@ -12,7 +12,7 @@ class Channel_model extends My_Model{
* 使用到的表
*/
public
$table
=
'tb_channel'
;
/**
* 构造器
*/
...
...
@@ -23,11 +23,11 @@ class Channel_model extends My_Model{
$this
->
db
=
$this
->
load
->
database
(
'default'
,
true
);
}
/**
*
*
* 查询所有该渠道下属客户信息
* @param int $where
* @return array 包含统计起止时间的数组
* @throws Exception
* @throws Exception
* @author libin
* @version 2016-12-18
*/
...
...
@@ -35,7 +35,7 @@ class Channel_model extends My_Model{
//按首字母排列
//$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'
)
->
join
(
'tb_customer A'
,
'A.id=B.customer_id'
)
...
...
@@ -64,11 +64,11 @@ class Channel_model extends My_Model{
}
/**
*
*
* 查询所有该渠道下属各个类别客户信息总条数
* @param int $where
* @return array 包含统计起止时间的数组
* @throws Exception
* @throws Exception
* @author lihengyi
* @version 2016-12-23
*/
...
...
@@ -88,7 +88,7 @@ class Channel_model extends My_Model{
->
where
(
$where_sql
)
->
group_by
(
'B.recommend_status'
)
->
order_by
(
'B.recommend_status'
);
$resp
=
$this
->
db
->
get
();
//$resp=$resp->result_array();
if
(
$resp
->
num_rows
()
>
0
)
...
...
@@ -99,11 +99,11 @@ class Channel_model extends My_Model{
}
/**
*
*
* 查询所有该渠道下属客户信息总条数
* @param int $where
* @return array 包含统计起止时间的数组
* @throws Exception
* @throws Exception
* @author libin
* @version 2016-12-18
*/
...
...
@@ -122,17 +122,17 @@ class Channel_model extends My_Model{
if
(
$where
!=
''
){
$this
->
db
->
where
(
$where
);
}
$resp
=
$this
->
db
->
get
();
$resp
=
$resp
->
result_array
();
return
$resp
[
0
][
'num'
];
}
/**
*
*
* 查询所有该渠道的所有下属渠道id
* @param int $where
* @return array 包含统计起止时间的数组
* @throws Exception
* @throws Exception
* @author libin
* @version 2016-12-18
*
...
...
@@ -142,7 +142,7 @@ class Channel_model extends My_Model{
->
from
(
'tb_channel'
);
$query
=
$this
->
db
->
get
();
$re
=
$query
->
result_array
();
//组建渠道遍历树结构
$tree
=
array
();
foreach
(
$re
as
$k
=>
$v
){
...
...
@@ -168,11 +168,11 @@ class Channel_model extends My_Model{
return
array
();
}
/**
*
*
* 查询所有该渠道的渠道id和名称
* @param int $where
* @return array 包含统计起止时间的数组
* @throws Exception
* @throws Exception
* @author libin
* @version 2016-12-18
*
...
...
@@ -184,7 +184,7 @@ class Channel_model extends My_Model{
if
(
$where
!=
''
){
$this
->
db
->
where
(
$where
);
}
$query
=
$this
->
db
->
get
();
if
(
$query
->
num_rows
()
>
0
)
{
...
...
@@ -194,11 +194,11 @@ class Channel_model extends My_Model{
}
/**
*
*
* 查询所有该渠道的所有下属渠道
* @param int $where
* @return array 包含统计起止时间的数组
* @throws Exception
* @throws Exception
* @author libin
* @version 2016-12-18
*$c必须传空数组
...
...
@@ -206,19 +206,19 @@ class Channel_model extends My_Model{
function
findChildren
(
$tree
,
$c
){
array_push
(
$c
,
$tree
[
'id'
]);
if
(
isset
(
$tree
[
'children'
])){
foreach
(
$tree
[
'children'
]
as
$k
=>
$v
){
$c
=
$this
->
findChildren
(
$v
,
$c
);
foreach
(
$tree
[
'children'
]
as
$k
=>
$v
){
$c
=
$this
->
findChildren
(
$v
,
$c
);
}
}
return
$c
;
}
/**
*
*
* 查询所渠道信息分页显示
* @param int $where
* @return array 包含统计起止时间的数组
* @throws Exception
* @throws Exception
* @author libin
* @version 2016-12-18
*/
...
...
@@ -263,4 +263,4 @@ class Channel_model extends My_Model{
}
return
array
();
}
}
\ No newline at end of file
}
html/application/views/admin/login.php
View file @
970ba304
...
...
@@ -11,15 +11,15 @@
<meta
content=
""
name=
"description"
/>
<meta
content=
""
name=
"author"
/>
<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/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"
/>
<!-- 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"
/>
<!-- 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.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 @@
</div>
</div>
<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';?>
</div>
<div class="
form
-
actions
text
-
center
">
<input type="
checkbox
" checked="
true
" name="
chkRememberUsername
" class="
text
-
left
" id="
rmbUser
">记住用户名
<button type="
button
" class="
btn
green
pull
-
center
text
-
right
login
-
btn
">
登录 <i class="
m
-
icon
-
swapright
m
-
icon
-
white
"></i>
</button>
</button>
</div>
</form>
<!-- END LOGIN FORM -->
...
...
@@ -86,28 +86,28 @@
</div>
<!-- END COPYRIGHT -->
<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
<!-- BEGIN CORE PLUGINS -->
<!-- BEGIN CORE PLUGINS -->
<!--[if lt IE 9]>
<script src="
/
assets
/
plugins
/
respond
.
min
.
js
"></script>
<script src="
/
assets
/
plugins
/
excanvas
.
min
.
js
"></script>
<![endif]-->
<script src="
/
assets
/
plugins
/
excanvas
.
min
.
js
"></script>
<![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-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/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/uniform/jquery.uniform.min.js"
type=
"text/javascript"
></script>
<!-- END CORE 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
type=
"text/javascript"
src=
"
<?php
echo
APPLICATION_PATH
?>
/assets/plugins/select2/select2.min.js"
></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>
<!-- END PAGE LEVEL PLUGINS -->
<!-- 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>
<!-- END PAGE LEVEL SCRIPTS -->
<!-- END PAGE LEVEL SCRIPTS -->
<script>
jQuery
(
document
).
ready
(
function
()
{
jQuery
(
document
).
ready
(
function
()
{
App
.
init
();
//初始化
if
(
$
.
cookie
(
"rmbUser"
))
{
...
...
@@ -116,11 +116,12 @@
// $("#password").val($.cookie("password"));
}
});
function
EnterPress
(){
if
(
event
.
keyCode
==
13
){
function
EnterPress
(
e
){
//传入 event
var
e
=
e
||
window
.
event
;
if
(
event
.
keyCode
==
13
){
$
(
'.login-btn'
).
trigger
(
'click'
);
}
}
}
}
$
(
".login-btn"
).
click
(
function
(){
var
username
=
$
(
"#username"
).
val
();
if
(
!
username
)
...
...
@@ -189,4 +190,4 @@
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>
\ No newline at end of file
</html>
html/application/views/admin/report/index_info.php
View file @
970ba304
...
...
@@ -367,8 +367,7 @@
format
:
'yyyy-mm-dd'
,
language
:
'cn'
,
});
var
aa
=
"
<?php
echo
$customer
[
'recommend_status'
]
?>
"
;
console
.
log
(
aa
);
//分销商筛选
$
(
'#parent_name'
).
on
(
'keyup click'
,
function
(){
$
(
'#channel_list'
).
show
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment