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
1dd55750
Commit
1dd55750
authored
Apr 11, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商铺列表修改
parent
d21d2569
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
GHouses.php
application/model/GHouses.php
+6
-12
house_template_tpl.html
public/resource/template/house_template_tpl.html
+1
-1
No files found.
application/model/GHouses.php
View file @
1dd55750
...
...
@@ -163,11 +163,6 @@ class GHouses extends BaseModel
->
select
();
$house_id
=
array
();
foreach
(
$data
as
$k
=>
$v
)
{
if
(
$v
[
'upload_id'
]
==
$agents_id
)
{
$data
[
$k
][
'auth_edit_house'
]
=
1
;
}
else
{
$data
[
$k
][
'auth_edit_house'
]
=
0
;
}
$house_id
[
$k
]
=
$v
[
'id'
];
$v
->
create_time
=
date
(
'Y-m-d'
,
strtotime
(
$v
->
create_time
));
}
...
...
@@ -176,15 +171,18 @@ class GHouses extends BaseModel
if
(
empty
(
$house_id
))
{
$result
=
$data
;
}
else
{
$house_id
=
array_unique
(
$house_id
);
/*案场权限人和盘方*/
$house_agents
=
Db
::
table
(
'g_houses_to_agents'
)
->
alias
(
'a'
)
->
field
(
'a.houses_id,b.id,b.name,b.phone,a.type'
)
->
join
(
'a_agents b'
,
'a.agents_id=b.id'
,
'left'
)
->
where
(
'a.houses_id'
,
'IN'
,
implode
(
','
,
$house_id
))
->
where
(
'a.is_del'
,
0
)
->
where
(
'a.type'
,
2
)
->
select
();
foreach
(
$data
as
$k
=>
$v
)
{
if
(
$v
[
'upload_id'
]
==
$agents_id
)
{
$data
[
$k
][
'auth_edit_house'
]
=
1
;
}
else
{
...
...
@@ -194,13 +192,9 @@ class GHouses extends BaseModel
$dish_name
=
''
;
$result
[
$k
][
'dish_name'
]
=
''
;
foreach
(
$house_agents
as
$k2
=>
$v2
)
{
if
(
$v
->
id
==
$v2
[
'houses_id'
])
{
if
(
$v2
[
'type'
]
==
2
)
{
$dish_name
.=
$v2
[
'name'
]
.
','
;
$result
[
$k
][
'dish_name'
]
=
rtrim
(
$dish_name
,
','
);
}
else
{
$result
[
$k
][
'dish_name'
]
=
''
;
}
if
(
$v
[
'id'
]
==
$v2
[
'houses_id'
])
{
$dish_name
.=
$v2
[
'name'
]
.
','
;
$result
[
$k
][
'dish_name'
]
=
rtrim
(
$dish_name
,
','
);
}
}
}
...
...
public/resource/template/house_template_tpl.html
View file @
1dd55750
...
...
@@ -46,7 +46,7 @@
[
%
}
%
]
<
/td
>
<
td
>
[
%
if
(
check_auth
(
'index/houseEdit'
))
{
%
]
[
%
if
(
it
[
item
][
'auth_edit_house'
]
||
check_auth
(
'index/houseEdit'
))
{
%
]
<
a
class
=
"btn1 btn-success "
href
=
"/admin.php/index/houseEdit?id=[%= it[item]['id']%]"
data
-
toggle
=
"modal"
>
编辑
<
/a
>
[
%
}
%
]
...
...
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