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
6ae9f605
Commit
6ae9f605
authored
Jun 27, 2017
by
HTML5-侯张振
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
渠道展示更改
parent
5e1661f5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
4 deletions
+28
-4
index.php
html/application/controllers/channel/index.php
+1
-1
customer.php
html/application/controllers/distributor/customer.php
+1
-0
customer_building_model.php
html/application/models/customer_building_model.php
+26
-3
No files found.
html/application/controllers/channel/index.php
View file @
6ae9f605
...
...
@@ -294,7 +294,7 @@ class Index extends CI_Controller{
$where
=
array
(
'CB.id'
=>
$cb_id
);
$query
=
$this
->
customer_building
->
get_custormer_list_byStatus
(
$where
,
1
,
1
);
$query
=
$this
->
customer_building
->
get_custormer_
channel
list_byStatus
(
$where
,
1
,
1
);
if
(
$query
[
0
][
'sale_id'
]
!=
0
){
$sales
=
$this
->
user
->
get
(
array
(
'id'
=>
$query
[
0
][
'sale_id'
]));
$this
->
data
[
'sales_name'
]
=
$sales
[
'true_name'
];
...
...
html/application/controllers/distributor/customer.php
View file @
6ae9f605
...
...
@@ -41,6 +41,7 @@ class Customer extends CI_Controller {
}
$distributor_ins
=
$this
->
distributor
->
get
(
array
(
'uniqid_id'
=>
$this
->
uniqid_id
));
if
(
$status
==
99
){
//获取所有状态的客户
$where
=
array
(
'D.id'
=>
$distributor_ins
[
'id'
],
'U.id'
=>
$this
->
user_id
);
}
else
if
(
$status
==
9
){
...
...
html/application/models/customer_building_model.php
View file @
6ae9f605
...
...
@@ -548,12 +548,11 @@ class Customer_building_model extends MY_Model{
*获取某种状态下的客户里报表。分销商用
*/
public
function
get_custormer_list_byStatus
(
$where
=
NULL
,
$page
=
1
,
$page_size
=
0
){
$this
->
db
->
select
(
'CB.id cbid,CB.create_time,C
S.sale_id,C.customer_user,C.customer_mobile,U.user_name,B.building_title,D.id idd,D.company_name,M.manager_name,R.region_name,U.user_mobile user_mobil
e,CB.recommend_status'
)
$this
->
db
->
select
(
'CB.id cbid,CB.create_time,C
B.sale_id,C.customer_user,C.customer_mobile,U.user_name,B.building_title,D.id idd,D.company_name,M.manager_name,R.region_nam
e,CB.recommend_status'
)
->
from
(
'tb_customer_building CB'
)
->
join
(
'tb_customer C'
,
'C.id=CB.customer_id'
,
'left'
)
->
join
(
'tb_building B'
,
'B.id=CB.building_id'
,
'left'
)
->
join
(
'tb_customer_sales CS'
,
'CS.customer_building_id = CB.id'
)
->
join
(
'tb_user U'
,
'U.id=CS.sale_id'
,
'left'
)
->
join
(
'tb_user U'
,
'U.id=CB.user_id'
,
'left'
)
->
join
(
'tb_distributor D'
,
'D.id=CB.distributor_id'
)
->
join
(
'tb_channel CH'
,
'CH.id=D.channel_id'
)
->
join
(
'tb_manager M'
,
'M.id=CH.manager_id'
)
...
...
@@ -571,7 +570,31 @@ class Customer_building_model extends MY_Model{
}
return
$query
->
result_array
();
}
//渠道用状态
public
function
get_custormer_channellist_byStatus
(
$where
=
NULL
,
$page
=
1
,
$page_size
=
0
){
$this
->
db
->
select
(
'CB.id cbid,CB.create_time,CS.sale_id,C.customer_user,C.customer_mobile,U.user_name,B.building_title,D.id idd,D.company_name,M.manager_name,R.region_name,CB.recommend_status'
)
->
from
(
'tb_customer_building CB'
)
->
join
(
'tb_customer C'
,
'C.id=CB.customer_id'
,
'left'
)
->
join
(
'tb_building B'
,
'B.id=CB.building_id'
,
'left'
)
->
join
(
'tb_customer_sales CS'
,
'CS.customer_building_id = CB.id'
,
'left'
)
->
join
(
'tb_user U'
,
'U.id=CS.sale_id'
,
'left'
)
->
join
(
'tb_distributor D'
,
'D.id=CB.distributor_id'
)
->
join
(
'tb_channel CH'
,
'CH.id=D.channel_id'
)
->
join
(
'tb_manager M'
,
'M.id=CH.manager_id'
)
->
join
(
'tb_region R'
,
'R.region_code=B.region_code'
);
if
(
!
empty
(
$where
)){
$this
->
db
->
where
(
$where
);
}
$this
->
db
->
order_by
(
'CB.create_time desc'
);
if
(
!
$page
)
{
$query
=
$this
->
db
->
get
();
}
else
{
$query
=
$this
->
db
->
get
(
null
,
$page_size
,
(
$page
-
1
)
*
$page_size
);
}
return
$query
->
result_array
();
}
//首页小红点
public
function
get_count_by_where
(
$where
=
''
)
{
...
...
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