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
995ac1c5
Commit
995ac1c5
authored
Nov 22, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pk列表 修改
parent
5cbbc9aa
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
111 additions
and
11 deletions
+111
-11
pkListCon.html
application/index/view/pkList/pkListCon.html
+2
-2
pkList.js
public/resource/js/pkList.js
+84
-9
pk_list_template_tpl.html.html
public/resource/template/pk_list_template_tpl.html.html
+25
-0
No files found.
application/index/view/pkList/pkListCon.html
View file @
995ac1c5
...
...
@@ -144,8 +144,8 @@
</div>
<div
class=
"pk-container-detail-con"
>
<div
class=
"pk-container-detail-team"
>
<
!--<span class="team-span team-span-pk">团队PK榜</span>--
>
<span
class=
"team-span
-active
team-span-pk"
>
店长PK榜
</span>
<
span
class=
"team-span-active team-span-pk"
>
团队PK榜
</span
>
<span
class=
"team-span team-span-pk"
>
店长PK榜
</span>
<span
class=
"team-span team-span-pk"
>
经理PK榜
</span>
<span
class=
"team-span team-span-pk"
>
主任PK榜
</span>
<span
class=
"team-span team-span-pk"
>
顾问PK榜
</span>
...
...
public/resource/js/pkList.js
View file @
995ac1c5
...
...
@@ -8,6 +8,7 @@ define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css',
mainTabIndex
:
1
,
mainTabIndexTwo
:
0
,
mainTabArr
:
[],
mainTabIndexTeam
:
1
,
init
:
function
()
{
//初始化dot
$
(
document
.
body
).
append
(
template
);
...
...
@@ -22,7 +23,7 @@ define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css',
$
(
'#end_date'
).
html
(
day_end
);
// pkList.getCitySite();
pkList
.
getList
(
0
);
pkList
.
get
Team
List
(
0
);
pkList
.
event
();
},
event
:
function
()
{
...
...
@@ -33,24 +34,42 @@ define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css',
e
.
stopPropagation
();
var
_this
=
$
(
this
);
_this
.
removeClass
(
'team-span'
).
addClass
(
'team-span-active'
).
siblings
().
removeClass
(
'team-span-active'
).
addClass
(
'team-span'
);
if
(
_this
.
index
()
==
0
){
pkList
.
mainTabIndex
=
1
if
(
_this
.
index
()
==
0
){
//团队pk
pkList
.
getTeamList
();
pkList
.
mainTabIndexTeam
=
1
;
};
if
(
_this
.
index
()
==
1
){
pkList
.
mainTabIndex
=
2
;
pkList
.
mainTabIndex
=
1
;
pkList
.
mainTabIndexTeam
=
0
;
pkList
.
getList
();
};
if
(
_this
.
index
()
==
2
){
pkList
.
mainTabIndex
=
3
;
pkList
.
mainTabIndex
=
2
;
pkList
.
mainTabIndexTeam
=
0
;
pkList
.
getList
();
};
if
(
_this
.
index
()
==
3
){
pkList
.
mainTabIndex
=
4
;
pkList
.
mainTabIndex
=
3
;
pkList
.
mainTabIndexTeam
=
0
;
pkList
.
getList
();
};
if
(
_this
.
index
()
==
4
){
pkList
.
mainTabIndex
=
4
;
pkList
.
mainTabIndexTeam
=
0
;
pkList
.
getList
();
};
if
(
_this
.
index
()
==
5
){
pkList
.
mainTabIndex
=
0
;
pkList
.
mainTabIndexTeam
=
0
;
pkList
.
getList
();
};
$
(
".pk-container-detail-a>span"
).
eq
(
0
).
removeClass
(
'a-span'
).
addClass
(
'a-span-active'
).
siblings
().
removeClass
(
'a-span-active'
).
addClass
(
'a-span'
);
pkList
.
mainTabIndexTwo
=
0
;
pkList
.
getList
();
});
_doc
.
on
(
'click'
,
'.pk-container-detail-a>span'
,
function
(
e
){
...
...
@@ -59,12 +78,23 @@ define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css',
var
_this
=
$
(
this
);
_this
.
removeClass
(
'a-span'
).
addClass
(
'a-span-active'
).
siblings
().
removeClass
(
'a-span-active'
).
addClass
(
'a-span'
);
pkList
.
mainTabIndexTwo
=
_this
.
attr
(
'data-id'
)
*
1
-
1
;
if
(
pkList
.
mainTabIndexTeam
){
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'team_pk_list_tpl'
).
innerHTML
);
}
else
{
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'pk_list_tpl'
).
innerHTML
);
}
$
(
"#pk_list"
).
html
(
doTtmpl
(
pkList
.
mainTabArr
[
pkList
.
mainTabIndexTwo
]));
});
$
(
".export-pk"
).
click
(
function
()
{
//导出列表
if
(
pkList
.
mainTabIndexTeam
){
pkList
.
exportTeamList
();
}
else
{
pkList
.
exportList
();
}
});
},
//pk导出列表
...
...
@@ -75,7 +105,12 @@ define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css',
window
.
open
(
'/index/exportReport?'
+
'position='
+
position
+
'&AuthToken='
+
AuthToken
);
},
//pk列表 团队导出
exportTeamList
:
function
()
{
var
params
=
{};
var
AuthToken
=
user_info_obj
.
AuthToken
;
window
.
open
(
'/index/exportReportStore?'
+
'&AuthToken='
+
AuthToken
);
},
getList
:
function
(
pageNo
)
{
$
(
".pk-container-detail-a>span"
).
hide
();
var
params
=
{};
...
...
@@ -117,7 +152,47 @@ define(['doT', 'text!temp/pk_list_template_tpl.html.html', 'css!style/home.css',
}
});
},
//团队 pk
getTeamList
:
function
(
pageNo
)
{
$
(
".pk-container-detail-a>span"
).
hide
();
var
params
=
{};
params
.
AuthToken
=
user_info_obj
.
AuthToken
;
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/getStoreRandKingList'
,
//团队
data
:
params
,
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{
$
(
'#main_loading_pic'
).
show
();
},
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
var
_length
=
data
.
data
.
length
;
$
(
".pk-container-detail-a>span"
).
eq
(
_length
).
prevAll
().
show
();
if
(
data
.
code
==
200
)
{
pkList
.
mainTabArr
=
data
.
data
;
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'team_pk_list_tpl'
).
innerHTML
);
$
(
"#pk_list"
).
html
(
doTtmpl
(
data
.
data
[
pkList
.
mainTabIndexTwo
]));
add_page
(
data
.
data
.
total
,
pageNo
,
pkList
.
pageSize
,
pkList
.
getList
);
}
else
{
alert
(
data
[
'msg'
]);
};
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
alert
(
'error'
);
},
complete
:
function
(
xhr
,
textStatus
){
$
(
'#main_loading_pic'
).
hide
();
if
(
textStatus
===
'timeout'
){
alert
(
'请求超时'
);
};
}
});
},
getCitySite
:
function
(){
//显示 隐藏城市 默认显示 当前账号 所在城市
$
.
ajax
({
...
...
public/resource/template/pk_list_template_tpl.html.html
View file @
995ac1c5
...
...
@@ -21,3 +21,27 @@
<
/tr
>
[
%
}
%
]
</script>
<script
id=
"team_pk_list_tpl"
type=
"text/template"
>
[
%
var
sw
=
function
(
s
){
return
++
s
};
%
]
[
%
if
(
it
)
{
%
]
<
tr
>
<
th
class
=
"text-center"
>
排名
<
/th
>
<
th
class
=
"text-center"
>
所属门店
<
/th
>
<!--<
th
class
=
"text-center"
>
经纪人
<
/th>--
>
<
th
class
=
"text-center"
>
业绩(元)
<
/th
>
<
/tr
>
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
<
td
>
[
%=
sw
(
item
)
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
"store_name"
]
%
]
<
/td
>
<!--<
td
>
[
%=
it
[
item
][
"name"
]
%
]
<
/td>--
>
<
td
>
[
%=
it
[
item
][
"performance"
]
%
]
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"8"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
[
%
}
%
]
</script>
\ No newline at end of file
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