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
ea464834
Commit
ea464834
authored
May 10, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
门店列表搜索
parent
83d65abd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
23 deletions
+23
-23
AStore.php
application/model/AStore.php
+4
-4
store_template_tpl.html
public/resource/template/store_template_tpl.html
+19
-19
No files found.
application/model/AStore.php
View file @
ea464834
...
...
@@ -105,8 +105,8 @@ class AStore extends BaseModel
$data
=
array
();
if
(
$join
)
{
$field
.=
',b.name,b.phone'
;
$
where
[
'b.status'
]
=
0
;
$
where
[
'b.level'
]
=
[
'in'
,[
20
,
40
]
];
$
params
[
'b.status'
]
=
0
;
$
params
[
0
]
=
[
'EXP'
,
'b.level = 20 or b.level = 40'
];
$store_data
=
$this
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.id=b.store_id'
,
'left'
)
->
where
(
$params
)
->
order
(
$order_
)
...
...
@@ -148,8 +148,8 @@ class AStore extends BaseModel
*/
public
function
getStoreListTotal
(
$params
,
$join
=
0
)
{
if
(
$join
)
{
$
where
[
'b.status'
]
=
0
;
$
where
[
'b.level'
]
=
[
'in'
,[
20
,
40
]
];
$
params
[
'b.status'
]
=
0
;
$
params
[
0
]
=
[
'EXP'
,
'b.level = 20 or b.level = 40'
];
$store_num
=
$this
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.id=b.store_id'
,
'left'
)
->
where
(
$params
)
->
count
();
...
...
public/resource/template/store_template_tpl.html
View file @
ea464834
<script
id=
"store_list_tpl"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
<
td
>
[
%
if
(
it
[
item
][
'district_name'
])
{
%
]
[
%=
it
[
item
][
'district_name'
]
%
]
[
%
}
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'id'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'store_name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'agents_name'
]
%
]
<
/td
>
<
td
><
a
href
=
"#modal-record"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
class
=
"mend"
>
[
%=
it
[
item
][
'agents_total'
]
%
]
<
/a></
td
>
<
td
>
<
a
class
=
"btn1 btn-success edit"
href
=
"#modal-edit"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
编辑
<
/a
>
<!--<
a
class
=
"btn1 btn-info"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
拜访记录
<
/a>--
>
[
%
if
(
it
[
0
]
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
<
td
>
[
%
if
(
it
[
item
][
'district_name'
])
{
%
]
[
%=
it
[
item
][
'district_name'
]
%
]
[
%
}
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'id'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'store_name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'agents_name'
]
%
]
<
/td
>
<
td
><
a
href
=
"#modal-record"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
class
=
"mend"
>
[
%=
it
[
item
][
'agents_total'
]
%
]
<
/a></
td
>
<
td
>
<
a
class
=
"btn1 btn-success edit"
href
=
"#modal-edit"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
编辑
<
/a
>
<!--<
a
class
=
"btn1 btn-info"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
拜访记录
<
/a>--
>
<
/td
>
<
/tr
>
[
%
}
%
]
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"8"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
...
...
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