Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
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
hujun
tl_estate
Commits
d7745fa8
Commit
d7745fa8
authored
Feb 07, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
部门列表修改
parent
0a549ae7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
8 deletions
+3
-8
District.php
application/index/controller/District.php
+1
-1
AAgents.php
application/model/AAgents.php
+2
-7
No files found.
application/index/controller/District.php
View file @
d7745fa8
...
...
@@ -31,7 +31,7 @@ class District extends Basic
$agents
=
new
AAgents
();
$field
=
'id,name,create_time,phone,district_id'
;
$where
=
''
;
$where
.=
'level
=40
AND status=0'
;
$where
.=
'level
in (30,40)
AND status=0'
;
if
(
$search
!=
NULL
)
{
$where
.=
" AND (phone like '
{
$search
}
%' or name like '
{
$search
}
%')"
;
...
...
application/model/AAgents.php
View file @
d7745fa8
...
...
@@ -185,14 +185,9 @@ public function saveList(){
$result
[
$k
][
'district_name'
]
=
Db
::
table
(
'a_district'
)
->
where
(
$district_where
)
->
value
(
'district_name'
);
if
(
$result
[
$k
][
'district_name'
])
{
$store_where
[
'district_id'
]
=
$v
->
district_id
;
$store
=
Db
::
table
(
'a_store'
)
->
where
(
$store_where
)
->
column
(
'store_name'
);
$store_str
=
''
;
foreach
(
$store
as
$kk
=>
$vv
)
{
$store_str
.=
$vv
.
','
;
}
$result
[
$k
][
'store_name'
]
=
rtrim
(
$store_str
,
','
);
$result
[
$k
][
'store_num'
]
=
Db
::
table
(
'a_store'
)
->
where
(
$store_where
)
->
count
(
'store_name'
);
}
else
{
$result
[
$k
][
'store_n
ame
'
]
=
''
;
$result
[
$k
][
'store_n
um
'
]
=
''
;
}
}
}
...
...
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