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
726c86c0
Commit
726c86c0
authored
Jul 17, 2017
by
HTML5-侯张振
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复 渠道展示重复bug
parent
4d416e7b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
18 deletions
+44
-18
channeladmin.php
html/application/controllers/admin/channeladmin.php
+4
-1
report.php
html/application/controllers/admin/report.php
+2
-2
recommend.php
html/application/controllers/distributor/recommend.php
+10
-4
channel_model.php
html/application/models/channel_model.php
+18
-7
updateDay.php
html/application/views/admin/report/updateDay.php
+10
-4
No files found.
html/application/controllers/admin/channeladmin.php
View file @
726c86c0
...
...
@@ -48,7 +48,7 @@ class Channeladmin extends CI_Controller
$this
->
data
[
'con_arr'
]
=
$name
;
$count
=
$this
->
manager
->
get_count
(
$where
);
$this
->
data
[
'admins'
]
=
array
();
$where1
=
'A.role_id = 12 and'
;
if
(
!
empty
(
$name
)){
...
...
@@ -70,8 +70,11 @@ class Channeladmin extends CI_Controller
}
$re
=
array
();
$manager_channel
=
$this
->
manager
->
get
(
array
(
'id'
=>
$user_data
[
'u_id'
]));
$where1
.=
' and CA.building_id in ('
.
$manager_channel
[
'building_id'
]
.
')'
;
$re
=
$this
->
channel
->
get_all_channel
(
$where1
,
$page_no
,
self
::
PAGE_SIZE
,
$orderbySql
);
var_dump
(
$where1
);
$this
->
data
[
'admins'
]
=
$re
;
$this
->
data
[
'num_link'
]
=
set_page1
(
$this
,
site_url
(
'admin/channeladmin/index?manager_id='
.
$name
),
$count
,
self
::
PAGE_SIZE
,
4
,
''
,
true
,
array
(
'num_links'
=>
3
,
'show_total'
=>
false
,
'page_query_string'
=>
true
));
}
...
...
html/application/controllers/admin/report.php
View file @
726c86c0
...
...
@@ -1040,12 +1040,12 @@ class Report extends CI_Controller
$this
->
data
[
'buildings'
]
=
$protection_arr
;
$data_arr
=
'?
building_titl
e='
.
$building
;
$data_arr
=
'?
company_nam
e='
.
$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/protection'
),
$count
,
self
::
PAGE_SIZE
,
4
,
''
,
true
);
$this
->
load
->
view
(
'admin/report/protection'
,
$this
->
data
);
}
...
...
html/application/controllers/distributor/recommend.php
View file @
726c86c0
...
...
@@ -187,18 +187,20 @@ class Recommend extends CI_Controller{
$this
->
customer_building
->
del
(
array
(
'id'
=>
$customer_info
[
'id'
]));
}
else
if
(
0
==
$customer_info
[
'distribution_status'
]
&&
$distributor_entity
[
'id'
]
!=
$customer_info
[
'distributor_id'
])
{
//不同分销商,未分配,可报备
//todo
}
else
{
$result
=
array
(
'errcode'
=>
42178
,
'errmsg'
=>
$this
->
lang
->
line
(
'err_42178'
));
//重复提交
echo
json_encode
(
$result
);
return
;
}
}
else
{
}
else
{
//查找客户
$customerInfo
=
$this
->
customer
->
exits_customer_by_mobile
(
$post
[
'customer_phone'
][
$i
]);
if
(
$customerInfo
)
{
$customer_id
=
$customerInfo
[
'id'
];
}
else
{
}
else
{
//客户信息
$customer_data
=
array
(
'user_id'
=>
$this
->
user_id
,
...
...
@@ -226,7 +228,11 @@ class Recommend extends CI_Controller{
if
(
!
empty
(
$buildingmanager
))
{
$return
=
$this
->
building_manager
(
array
(
'building_id'
=>
$building_id
,
'customer_id'
=>
$customer_id
,
'distributor_id'
=>
$distributor_entity
[
'id'
]),
$i
,
$post
);
}
else
{
}
else
if
(
!
empty
(
$customerInfo
)
&&
$customer_info
[
'is_expired'
]
!=
1
&&
$customer_info
[
'is_valid'
]
!=
'0'
&&
$building
!=
$customer_info
[
'building_id'
]){
$result
=
array
(
'errcode'
=>
42178
,
'errmsg'
=>
$this
->
lang
->
line
(
'err_42178'
));
//重复提交
echo
json_encode
(
$result
);
return
;
}
else
{
$customer_building_data
=
array
(
'user_id'
=>
$this
->
user_id
,
'customer_id'
=>
$customer_id
,
...
...
html/application/models/channel_model.php
View file @
726c86c0
...
...
@@ -224,24 +224,35 @@ class Channel_model extends My_Model{
* @version 2016-12-18
*/
public
function
get_all_channel
(
$where
=
''
,
$page_no
=
1
,
$page_size
=
20
,
$order_by
=
''
){
$this
->
db
->
select
(
'A.manager_name,B.id channel_id,B.parent_id,
C
.manager_name parent_name,B.is_deleted,B.create_time'
)
$this
->
db
->
select
(
'A.manager_name,B.id channel_id,B.parent_id,
A
.manager_name parent_name,B.is_deleted,B.create_time'
)
->
from
(
'tb_channel B'
)
->
join
(
'tb_manager A'
,
'B.manager_id=A.id'
,
'left'
)
->
join
(
'tb_channel D'
,
'B.parent_id=D.id'
,
'left'
)
//->join('tb_channel D','B.parent_id=D.id','left')
->
join
(
'tb_channel_building CA'
,
'CA.channel_id = B.id'
,
'left'
)
->
join
(
'tb_manager C'
,
'D.manager_id=C.id'
,
'left'
);
->
join
(
'tb_manager A'
,
'B.manager_id=A.id'
,
'left'
)
->
join
(
'tb_manager C'
,
'B.manager_id=C.id'
,
'left'
);
if
(
$where
!=
''
){
$this
->
db
->
where
(
$where
);
}
if
(
$order_by
)
{
$this
->
db
->
order_by
(
$order_by
);
}
$offset
=
(
$page_no
-
1
)
*
$page_size
;
$query
=
$this
->
db
->
get
(
null
,
$page_size
,
$offset
);
if
(
$query
->
num_rows
()
>
0
)
{
return
$query
->
result_array
();
{
$qery
=
$query
->
result_array
();
$rAr
=
array
();
for
(
$i
=
0
;
$i
<
count
(
$qery
);
$i
++
)
{
if
(
!
isset
(
$rAr
[
$qery
[
$i
][
'manager_name'
]]))
{
$rAr
[
$qery
[
$i
][
'manager_name'
]]
=
$qery
[
$i
];
}
}
$qery
=
array_values
(
$rAr
);
return
$qery
;
//return $query->result_array();
}
return
array
();
...
...
html/application/views/admin/report/updateDay.php
View file @
726c86c0
...
...
@@ -167,15 +167,21 @@ jQuery(document).ready(function() {
$
(
'#checked_list'
).
html
(
html
);
});
//全选
$
(
".form-body"
).
on
(
'click'
,
'#all'
,
function
(){
console
.
log
(
12211
);
if
(
this
.
checked
){
console
.
log
(
3
);
$
(
".checked_list"
).
parent
().
addClass
(
'checked'
);
$
(
".checked_list"
).
parent
().
addClass
(
'checked'
);
}
else
{
$
(
".checked_list"
).
parent
().
removeClass
(
'checked'
);
}
});
});
$
(
".checked_list"
).
on
(
'click'
,
function
(){
if
(
$
(
".checked_list"
).
parent
().
attr
(
'class'
)
==
''
){
$
(
"#all"
).
parent
().
removeClass
(
'checked'
);
}
});
});
</script>
</body>
...
...
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