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
eae0c411
Commit
eae0c411
authored
Nov 19, 2018
by
xinyuandu
Committed by
hujun
Nov 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
排行优化
parent
68063c60
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
31 deletions
+84
-31
performance_ranking.html
...n/index/view/performance_ranking/performance_ranking.html
+4
-2
performance_ranking.js
public/resource/js/performance_ranking.js
+80
-29
No files found.
application/index/view/performance_ranking/performance_ranking.html
View file @
eae0c411
...
...
@@ -254,7 +254,7 @@
<span
class=
"title-time"
id=
"table-time"
></span>
</div>
<div
style=
"
max-
height:6.97rem;;overflow-y:scroll"
>
<div
style=
"height:6.97rem;;overflow-y:scroll"
>
<table
class=
"table table-striped"
data-toggle=
"table"
data-height=
"460"
style=
"max-width:500px;"
>
<thead>
<tr>
...
...
@@ -264,7 +264,9 @@
<th
data-field=
"performance"
>
排业绩(元)
</th>
</tr>
</thead>
<tbody
id=
"tbody"
></tbody
>
<tbody
id=
"tbody"
>
</tbody
>
</table>
</div>
</div>
...
...
public/resource/js/performance_ranking.js
View file @
eae0c411
...
...
@@ -248,36 +248,87 @@ define (['doT', 'ckfinder','ckfinderStart', 'css!style/home.css',"datetimepicker
var
params
=
{
'agent_id'
:
id
}
$
.
get
(
'/index/getRandKingListByAgentId'
,
params
,
function
(
data
){
that
.
loadTable
(
data
.
data
.
list
,
data
.
data
.
grade
);
var
grade
=
data
.
data
.
grade
;
var
index
=
data
.
data
.
grade
;
var
indexTimes
=
0
;
if
(
grade
<
27
){
index
=
data
.
data
.
grade
}
else
{
index
=
data
.
data
.
grade
%
26
;
indexTimes
=
parseInt
(
data
.
data
.
grade
/
26
)
}
var
str
=
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
;
var
value
=
str
[
data
.
data
.
grade
]
+
""
+
(
indexTimes
>
0
?
indexTimes
+
""
:
""
);
var
name
=
data
.
data
.
position
;
var
text
=
""
;
if
(
name
==
0
){
text
=
"新人职称"
+
value
+
"档"
}
else
if
(
name
==
1
){
text
=
"店长职称"
+
value
+
"档"
}
else
if
(
name
==
2
){
text
=
"经理职称"
+
value
+
"档"
}
else
if
(
name
==
3
){
text
=
"主任职称"
+
value
+
"档"
}
else
if
(
name
==
4
){
text
=
"顾问职称"
+
value
+
"档"
}
else
if
(
name
==
5
){
text
=
"无职称职称"
+
value
+
"档"
// $.get('/index/getRandKingListByAgentId',params,function(data){
// that.loadTable(data.data.list,data.data.grade);
// var grade = data.data.grade ;
// var index = data.data.grade ;
// var indexTimes = 0 ;
// if (grade < 27){
// index = data.data.grade
// } else {
// index = data.data.grade%26;
// indexTimes = parseInt(data.data.grade/26)
// }
// var str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
// var value = str[data.data.grade]+""+(indexTimes > 0 ? indexTimes+"" : "");
// var name = data.data.position;
// var text = "";
// if (name == 0 ){
// text = "新人职称" + value + "档"
// } else if (name == 1 ){
// text = "店长职称" + value + "档"
// } else if (name == 2 ){
// text = "经理职称" + value + "档"
// } else if (name == 3 ){
// text = "主任职称" + value + "档"
// } else if (name == 4 ){
// text = "顾问职称" + value + "档"
// } else if (name == 5 ){
// text = "无职称职称" + value + "档"
// }
// $('#table-title').text(text);
// },'json')
//
$
.
ajax
({
url
:
'/index/getRandKingListByAgentId'
,
type
:
'GET'
,
async
:
true
,
data
:
{
},
dataType
:
'json'
,
success
:
function
(
data
)
{
$
(
'#tbody'
).
empty
();
that
.
loadTable
(
data
.
data
.
list
,
data
.
data
.
grade
);
var
grade
=
data
.
data
.
grade
;
var
index
=
data
.
data
.
grade
;
var
indexTimes
=
0
;
if
(
grade
<
27
){
index
=
data
.
data
.
grade
}
else
{
index
=
data
.
data
.
grade
%
26
;
indexTimes
=
parseInt
(
data
.
data
.
grade
/
26
)
}
var
str
=
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
;
var
value
=
str
[
data
.
data
.
grade
]
+
""
+
(
indexTimes
>
0
?
indexTimes
+
""
:
""
);
var
name
=
data
.
data
.
position
;
var
text
=
""
;
if
(
name
==
0
){
text
=
"新人职称"
+
value
+
"档"
}
else
if
(
name
==
1
){
text
=
"店长职称"
+
value
+
"档"
}
else
if
(
name
==
2
){
text
=
"经理职称"
+
value
+
"档"
}
else
if
(
name
==
3
){
text
=
"主任职称"
+
value
+
"档"
}
else
if
(
name
==
4
){
text
=
"顾问职称"
+
value
+
"档"
}
else
if
(
name
==
5
){
text
=
"无职称职称"
+
value
+
"档"
}
$
(
'#table-title'
).
text
(
text
);
},
error
:
function
(
data
){
$
(
'#table-title'
).
text
(
'职称排行'
);
var
tableDat
=
'<tr><td colspan="4" >您还没有职称</td></tr>'
;
tableDat
+=
"<tr></tr>"
$
(
'#tbody'
).
append
(
tableDat
);
$
(
'#overlay'
).
fadeOut
(
''
)
}
$
(
'#table-title'
).
text
(
text
);
},
'json'
)
});
},
//
loadTable
:
function
(
data
,
gradge
){
...
...
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