样式;
@import "include";
@newsLinkColor: #3D6699;
@newsLinkColorBold: #3D66BB;
.newsBg(@left, @top) {
background: url(../images/news.png) no-repeat scroll @left @top;
}
.opacity(@value){ opacity: (@value/100) ; filter: alpha(opacity=@value); -moz-opacity: (@value/100) ; -webkit-opacity: (@value/100); }
.inline-block {
display: inline-block;*zoom:1;*display:inline;
}
.page-header {
height: 49px;
position: fixed;
top: 0;
width: 100%;
min-width: 840px;
background: url(../images/header-bg2.png);
z-index: 100;
.news-logo {
position: relative;
float: left;
background: url(../images/news-logo.png) no-repeat 0 -1px;
width: 220px;
height: 40px;
margin: 5px 0 0 17px;
}
.page-header-inner {
width: 1250px; margin: 0 auto;
}
/* 时间框 */
.time-bar {
margin: 11px 0 0 0; vertical-align: middle;
.text-field { .newsBg(0, 0); width: 128px; height: 26px; padding: 0 12px; border: 0; }
}
}
.page-body {
.main {
margin: 0; text-align: center;
/* 热词区域 */
.hot-words-bar {
label { color: #b4b4b4; }
ul {
.inline-block;
li { .inline-block; margin: 0 20px 0 0; }
a { color: @newsLinkColor; }
}
}
/* 搜索条 */
.search-bar {
font-size: 0;
.text-field { .newsBg(-1px, -64px); width: 300px; height: 30px; padding: 0 10px; border: 0; font-size: 16px; }
.btn.search { .newsBg(-13px,-104px); width: 58px; height: 30px; margin: 0; border: 0; color: #fff; }
.news-errorMsg { float: right; color: red; font-size: 14px; }
}
/* 新闻中心内容头部 */
.newscenter-header {
width: 388px; margin: 0 auto; padding: 35px 0 0;
.search-bar { margin: 20px 0 0; }
}
/* 新闻中心内容 */
.newscenter-content {
margin: 10px auto; width: 1324px;
.main-news {
.main-img {
display: inline-block; *zoom:1;*display:inline; margin-right: 12px; float: right; margin-right: 30px;
img { height: 305px; max-width: 770px; }
}
.main-list {
width: 500px; height: 285px; display: inline-block; *zoom:1;*display:inline;float: right;
ul {
color: #7D7D7D;
font-size: 18px;
text-align: left;
line-height: 36px;
li {
position: relative;
height: 38px;
border-bottom: 1px solid #D7E0E9;
&.active {
cursor: pointer;
background: url(../images/news-center/slider-news-title-active-bg.png) 0 -40px;
color: #3675b4;
&:before { content: "";
position: absolute;
top: -1px;
left: -16px;
height: 39px;
width: 16px;
background: url(../images/news-center/slider-news-title-active-bg.png);
//border-left: 0;
//border-right: 19px solid #3675b4;
//border-top: 19px solid transparent;
//border-bottom: 19px solid transparent;
}
}
}
}
}
}
.main-catagory {
.salse-situation {
width: 270px; float: right; background: #EFEFEF; margin-top: 37px; text-align: left;
h1 {
border-bottom: 2px solid #E5ECF6; line-height: 28px; background: #fff; padding: 0 10px; font-size: 14px; color: @newsLinkColor; font-weight: bold;
}
h2 {
color: #8C8C8C; line-height: 40px; padding: 0 10px;
}
.manf {
padding: 10px; border-bottom: 1px solid #E1E1E1;height:160px;
.logo {
max-width: 70px; max-height: 55px; margin-bottom: 10px;
}
&.main-manf {
border-bottom: 1px solid #B2C7EB;
}
.info li {
width: 50%; float: left; line-height: 20px; margin-bottom: 10px;
.title {
color: @newsLinkColor;
}
.value {
font-size: 14px; color: #353535;
.red {
color: #B60E0E;
}
.green {
color: #00B22C;
}
.tendency{
border-top: 3px solid #7DA3CD;
margin-bottom: 4px;
display: inline-block;
height: 1px;
overflow: hidden;
width: 12px;
}
}
}
}
}
.big-list {
margin-right: 0px;
> li {
display: inline-block; *zoom:1;*display:inline; width: 485px; height: 170px;
margin-left: 20px; margin-right: 30px;margin-top: 15px;
header {
height: 28px; margin: 20px 0 10px 0; border-bottom: 2px solid #E5ECF6; line-height: 28px; padding: 0 10px;
.get-all { float: right; color: @newsLinkColor; line-height: 29px; }
menu {
display: inline-block; *zoom:1;*display:inline; float: right; line-height: 29px; margin-right: 10px; font-size: 13px;
li {
color: #999; width: 35px; position: relative;
&:hover { cursor: pointer; }
&.active {
background-color: #E5EEF7; color: @newsLinkColor;
&:before {
content: "";
position: absolute;
top: 29px;
left: 12px;
height: 0;
width: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 6px solid #E5EEF7;
border-bottom: 0;
}
}
}
}
label { float: left; font-size: 14px; font-weight: 700; }
}
.list-img {
display: inline-block; *zoom:1;*display:inline; float: left; position: relative; margin: 0 15px;
.title {
line-height: 29px;
position: absolute;
bottom: 0;
font-size: 14px;
color: @newsLinkColorBold;
font-weight:bolder;
background: #fff;
filter:alpha(Opacity=80); -moz-opacity:0.8; opacity: 0.8;
overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:210px;
}
.title a{
line-height: 29px;
font-size: 14px;
color: @newsLinkColorBold;
font-weight:bolder;
}
img { height: 84px; width: 210px; }
}
.tab-contents {
display: none; width: 450px; height: 88px;margin-top: 10px;
&.active { display: inline-block; }
li {
height: 21px; line-height: 18px; margin-bottom: 5px;
.date { float: right; color: #b4b4b4; font-size: 14px; }
.topic{ float: left; color: @newsLinkColor; text-align: left; font-size: 14px;
overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:320px; display: block; }
}
}
}
li:first-child header {
}
}
}
.new-cars {
margin-left: 10px;margin-top:40px;
header {
height: 28px; margin: 10px 10px; border-bottom: 2px solid #E5ECF6; padding: 0 10px;
.get-all { float: right; color: @newsLinkColor; line-height: 29px; }
menu {
display: inline-block; *zoom:1;*display:inline; float: right; line-height: 29px; margin-right: 10px; font-size: 13px;
li {
color: #999; width: 35px; position: relative;
&:hover { cursor: pointer; }
&.active {
background-color: #E5EEF7; color: @newsLinkColor;
&:before {
content: "";
position: absolute;
top: 29px;
left: 12px;
height: 0;
width: 0;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-top: 6px solid #E5EEF7;
border-bottom: 0;
}
}
}
}
label { float: left; font-size: 14px; font-weight: 700; }
}
.img-list {
.tab-contents {
display: none; width: 100%;
&.active { display: inline-block; }
li {
display: inline-block; *zoom:1;*display:inline; margin: 0 18px 10px;
img { height: 100px; width: 250px; }
a { color: @newsLinkColor; display: block; font-size: 15px;
overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:280px; display: block;}
}
}
}
}
#tabs-new-cars {
.img-list {
width: 1276px; height: 138px; position: relative; margin: 0 auto; overflow: hidden;
}
ul {
position: absolute; left: 1276px; display: block!important;
&:first-child {
left: 0;
}
}
}
}
/*tabs标签*/
.tabs {
.tab-contents {
&.active { display: block; }
}
}
/* 列表页头部 */
.news-header {
padding: 10px; background: #EEEFEE; text-align: center;
.hot-words-bar, .search-bar { .inline-block; }
}
.news-header-seacrch{
padding: 10px; background: #EEEFEE; text-align: center;
.hot-words-bar, .search-bar { .inline-block; }
}
/*车企动态列表-系别*/
.main-content {
width: 1350px; margin: 0 auto; text-align: left;
.news-type {
background-color: #EEEFEE; height: 32px; color: #3675b4; margin: 30px auto; border-bottom: 1px solid #D5D6D5;
.title-icon { margin-left: 100px; background: url(../images/header.png) no-repeat -75px -60px; width: 40px; height: 21px; display: inline-block;}
.title-icon2 { margin-left: -15px; background: url(../images/header.png) no-repeat -105px -63px; width: 25px; height: 21px; display: inline-block;}
.title-text { font-size: 16px; font-weight: 600; line-height: 35px;
a { font-size: 16px; font-weight: 600; line-height: 35px; color: #3675b4; } }
.news_search_title2 { font-size: 16px; font-weight: 300; line-height: 35px; }
.title-back-url { float: right; color: white; font-weight: bold;
font-size: 14px; position:absolute;line-height: 18px;width:900px;text-align:right;
margin-top:9px;margin-bottom:7px;
a:link,a:visited { color: #4c80be; }
}
}
.news-type-search {
background-color: #EEEFEE; height: 32px; color: #3675b4; margin: 30px auto; border-bottom: 1px solid #D5D6D5;
.title-icon { margin-left: 20px; background: url(../images/header.png) no-repeat -75px -60px; width: 40px; height: 21px; display: inline-block;}
.title-icon2 { margin-left: -15px; background: url(../images/header.png) no-repeat -105px -63px; width: 25px; height: 21px; display: inline-block;}
.title-text { font-size: 16px; font-weight: 600; line-height: 35px;
a { font-size: 16px; font-weight: 600; line-height: 35px; color: #3675b4; } }
.news_search_title2 { font-size: 16px; font-weight: 300; line-height: 35px; }
.title-back-url { float: right; color: white; font-weight: bold; margin-right: 50px; margin-top: 6px;
font-size: 14px; display: inline-block; *zoom:1;*display:inline;
a:link,a:visited { color: #4c80be; }
}
}
.news-list {
margin-left: 100px; width: 1000px;
li { margin-bottom: 15px; }
.news-title { font-size: 16px; font-weight: 600; color: @link-color;
a { font-size: 16px; font-weight: bold; color: @newsLinkColor;} }
.news_more_date { font-size: 16px; float: right; font-weight: 200; color: #b4b4b4; margin-right: 5px;}
.news_more_msg { line-height: 25px; font-size: 14px; word-wrap: break-word; text-indent: 2em;
margin-top: 5px; color: #3675b4;
a { line-height: 25px; font-size: 14px; word-wrap: break-word; text-indent: 2em; margin-top: 5px;
color: #3675b4; }
}
.more-first-title { a { font-size: 16px; font-weight: bold; color: #3675b4; } }
.second-title { a { font-size: 16 px;font-weight: bold; color: black; } }
.news-content { line-height: 25px; font-size: 15px; word-wrap: break-word; text-indent: 2em; margin-top: 5px; margin-right: 80px;}
}
.load-more {
width: 1000px; background: #EEEFEE; text-align: center; height: 30px; border: 1px solid #D5D6D5; margin-left: 100px; line-height: 2;
a { color: #3675b4; font-size: 15px; }
}
.category-list {
margin-left: 50px;
>ul>li {width: 390px; display: inline-block; *zoom:1;*display:inline; margin: 0 40px 10px 0; vertical-align: top; }
.category-title { width: 390px; color: #3675b4; font-size: 16px; line-height: 2; height: 28px;
border-bottom: 1px solid #D5D6D5; background-color: #EEEFEE;
.title-text { margin-left: 10px; font-size: 16px; }
.get-more { margin-right: 5px; }
}
.get-more { float: right; color: #3675b4; }
.segment-list {
li { margin: 5px 0 4px; line-height: 1.5; font-size: 14px; }
.topic { color: @newsLinkColor; margin-left: 5px; font-size: 16px;
overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:295px;
display: inline-block; *zoom:1;*display:inline; }
.date { float: right; color: #b4b4b4; margin-right: 5px; line-height: 29px;}
}
}
.news-detail {
width: 880px;
margin: 0 auto;
.detail-title { text-align: center; font-size: 18px; font-weight: 600; color: #3675b4; }
.sub-title {
text-align: center; color: #b4b4b4; margin: 20px auto;
>span {margin: 0 10px;}
}
.news-content { font-size: 16px; word-wrap: break-word; line-height: 2; text-indent: 2em;}
}
}
}
}
jsp页面:
<%@ page language="java" errorPage="/error.jsp"
contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<fmt:setLocale value="${portalLocale}" scope="session" />
<fmt:bundle basename="ApplicationResources">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>新闻中心 - <fmt:message key="system.news.pagetitle" />
</title>
<link rel="shortcut icon" href="${ctx}/images/favicon.ico" />
<link charset="utf-8" rel="stylesheet"
href="${ctx}/assets/stylesheets/common.css" />
<link charset="utf-8" rel="stylesheet"
href="${ctx}/assets/stylesheets/news.css" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width" />
<!--[if IE]>
<script src="${ctx}/assets/javascripts/libs/ie.js"></script>
<![endif]-->
<script type="text/javascript">
var localPath = "${ctx}";
var pageId = "newsMain"; //首页
</script>
<script type="text/javascript" src="${ctx}/js/waysdata/news/industryNews.js"></script>
</head>
<body>
<c:set var="pageId" scope="request" value="MAIN" />
<section class="page-wrapper">
<!-- 页头 -->
<%@ include file="/common/news_top.jsp"%>
<!-- 主体内容 -->
<section class="page-body clearfix">
<div id="main" class="main">
<!-- 内容头部 -->
<header class="news-header" fixed-block="true">
<!-- 热门词汇 -->
<%@ include file="/common/news_search.jsp"%>
</header>
<section class="newscenter-content">
<section class="main-news clearfix" id="banner-news">
<div class="main-list">
<ul>
<li style="color:#AA1F4C;border-bottom: 0px;margin-top:-6px;">${mainPictureNewsName}</li>
<c:forEach items="${pictureList}" var="picture" varStatus="statu1">
<c:if test="${statu1.index<7}">
<li picUrl="${picture.picUrl}" news-id="${picture.newsId}" picLink="${ctx}/news/industry/getNewsInfo.do?newsId=${picture.newsId}&pageSize=10&curPage=1&time=${time}&curTime=${curTime}&pageMark=main"
οnclick="window.open('${ctx}/news/industry/getNewsInfo.do?newsId=${picture.newsId}&pageSize=10&curPage=1&time=${time}&curTime=${curTime}&pageMark=main','_blank')">
• ${picture.mainTitle}
</li>
</c:if>
</c:forEach>
</ul>
</div>
<c:forEach items="${pictureList}" var="picture" varStatus="statu1">
<c:if test="${statu1.index==0}">
<div class="main-img">
<a id="mainLink"
href="${ctx}/news/industry/getNewsInfo.do?newsId=${picture.newsId}&pageSize=10&curPage=1&time=${time}&curTime=${curTime}&pageMark=main"
target="_blank"> <img id="mainImg" src="${picture.picUrl}"
οnerrοr="this.src='${ctx}/assets/images/transparent.png';" />
</a>
</div>
</c:if>
</c:forEach>
</section>
<section class="main-catagory">
<ul class="big-list clearfix" style="margin-right:0px;padding-bottom: 30px">
<c:forEach items="${list}" var="childList" varStatus="statu5">
<c:if test="${!fn:contains(childList.newsTypeName,typeName01)}">
<c:if test="${statu5.index%2==0}">
<li class="test_${statu5.index}" style="padding-bottom:30px;margin-left:17px;margin-right:278px;">
</c:if>
<c:if test="${statu5.index%2!=0}">
<li class="test_${statu5.index}" style="padding-bottom:30px;">
</c:if>
<div class="tabs news-main-tabs" id="tabs${statu5.index}">
<header>
<c:if test="${fn:length(childList.newsList)>5}">
<a
href="${ctx}/news/industry/${childList.typeUrl}?type=1&pageSize=10&curPage=1&time=${time}&curTime=${curTime}&channel=${childList.newsTypeId}&keyword=&pageMark=main" target="_blank" class="get-all">+更多</a>
</c:if>
<menu class="nav">
<c:if test="${fn:length(childList.newsList)>5}">
<li class="active">
1
</li>
</c:if>
<c:if test="${fn:length(childList.newsList)>5}">
<li>
2
</li>
</c:if>
<c:if test="${fn:length(childList.newsList)>10}">
<li>
3
</li>
</c:if>
</menu>
<label>
${childList.newsTypeName}
</label>
</header>
<section>
<div class="clearfix">
<c:forEach items="${allTypesList}" var="picInfo" varStatus="statu4">
<c:if test="${fn:contains(childList.newsTypeName,picInfo.tvalue)}">
<div class="list-img">
<a href="${ctx}/news/industry/getNewsInfo.do?newsId=${picInfo.newsId}&pageSize=10&curPage=1&time=${time}&curTime=${curTime}&pageMark=main" target="_blank">
<img src="${picInfo.picUrl}" οnerrοr="this.src='${ctx}/assets/images/transparent.png';" />
</a>
<div class="title"> <a href="${ctx}/news/industry/getNewsInfo.do?newsId=${picInfo.newsId}&pageSize=10&curPage=1&time=${time}&curTime=${curTime}&pageMark=main" target="_blank" title="${picInfo.mainTitle }"> ${picInfo.mainTitle} </a> </div></div>
</c:if>
</c:forEach>
</div>
<ul class="tab-contents active" style="padding-bottom:10px">
<c:forEach items="${childList.newsList}" var="info" varStatus="statu4">
<c:if test="${statu4.index<15}">
<li >
<label class="date">
<fmt:formatDate value="${info.newsDate}" type="date" />
</label>
<a
href="${ctx}/news/industry/getNewsInfo.do?newsId=${info.newsId}&pageSize=10&curPage=1&time=${time}&curTime=${curTime}&pageMark=main"
target="_blank" class="topic" title="${info.mainTitle }">${info.mainTitle}</a>
</li>
<c:if test="${ (fn:length(childList.newsList)>5 && statu4.index==4)|| (fn:length(childList.newsList)>10 && statu4.index==9) }">
</ul>
<ul class="tab-contents" style="padding-bottom:10px">
</c:if>
</c:if>
</c:forEach>
</ul>
</section>
</div>
</li>
</c:if>
</c:forEach>
</ul>
</section>
<c:forEach items="${list}" var="childList" varStatus="statu7">
<c:if test="${fn:contains(childList.newsTypeName,typeName01)}">
<section class="new-cars tabs news-main-tabs" id="tabs-new-cars">
<header>
<a
href="${ctx}/news/industry/${childList.typeUrl}?type=1&pageSize=10&curPage=1&time=${time}&curTime=${curTime}&channel=${childList.newsTypeId}&keyword=&pageMark=main" target="_blank" class="get-all">+更多</a>
<menu class="nav">
<c:if test="${fn:length(childList.newsList)>4}">
<li class="active">
1
</li>
</c:if>
<c:if test="${fn:length(childList.newsList)>4}">
<li>
2
</li>
</c:if>
<c:if test="${fn:length(childList.newsList)>8}">
<li>
3
</li>
</c:if>
</menu>
<label>
${childList.newsTypeName}
</label>
</header>
<div class="img-list">
<ul class="tab-contents active">
<c:forEach items="${childList.newsList}" var="info" varStatus="statu8">
<c:if test="${ statu8.index < 16 }">
<li>
<div>
<a
href="${ctx}/news/industry/getNewsInfo.do?newsId=${info.newsId}&pageSize=10&curPage=1&time=${time}&curTime=${curTime}&pageMark=main"
target="_blank" title="${info.mainTitle }"><img src="${ctx}/assets/images/transparent.png"
οnerrοr="this.src='${ctx}/assets/images/transparent.png';"
news-id="${info.newsId}" /> </a>
<a
href="${ctx}/news/industry/getNewsInfo.do?newsId=${info.newsId}&pageSize=10&curPage=1&time=${time}&curTime=${curTime}&pageMark=main"
target="_blank" title="${info.mainTitle }">${info.mainTitle}</a>
</div>
</li>
<c:if test="${ (fn:length(childList.newsList)>4 && statu8.index==3)|| (fn:length(childList.newsList)>8 && statu8.index==7) || (fn:length(childList.newsList)>12 && statu8.index==11) }">
</ul>
<ul class="tab-contents">
</c:if>
</c:if>
</c:forEach>
</ul>
</div>
</section>
</c:if>
</c:forEach>
</section>
</div>
<a class="back-top">返回顶部</a>
<div class="feedback" style="display: none;">
意见反馈
</div>
</section>
</section>
<script src="${ctx}/assets/javascripts/seajs/2.1.1/sea.js"
id="seajsnode"></script>
<script src="${ctx}/assets/javascripts/seajs/sea-config.js"></script>
<script>
seajs.use("appc/news-center",function(app,msgbox){
setTimeout(function() { // 延迟加载图片
$("#tabs-new-cars .img-list img").each(function(){
loadPicture($(this).attr("news-id"),$(this));
});
}, 1000); //end setTimeOut
function loadPicture(newsId,obj){ //获取图片
var url="${ctx}/news/industry/getPicture.do?newsId="+newsId;
$.ajax({
type : 'get',
contentType : 'application/json',
url : url,
processData : false,
dataType : 'json',
success : function(data) {
$(obj).attr("src",data.picUrl);
},
error : function() {}
});//end ajax
}
function formatKilo(v){
v += "";
if(4 <= v.length){
var re=/(\d{1,3})(?=(\d{3})+(?:$|\.))/g;
v = v.replace(re,"$1,");
}
return v;
}
function formatPercent(v){
var result = "";
if(v!=null && v!="" && v.indexOf("-")>-1) result = "<span class='red'>"+v+"%</span>";
if(v!=null && v!=""&& v.indexOf("-")<0) result = v+"%";
return result;
}
$.ajax({
type : 'get',
contentType : 'application/json',
url : "${ctx}/sales/getGMSalesData.do?rankType=0&manf=15&time=${time}&curTime=${curTime}&source=2&ids=21",
processData : false,
dataType : 'json',
//data : 'year=2010&month=7' , //条件
success : function(data) {
$("#salesTitle").text(data.year+"年"+data.month+"月上海通用销量情况");
$("#salesDiv").find(".salesMonth").text(data.month+"月");
$("#manfSales").find(".value").html(formatKilo( data["data"][0].sales ) + "(" + formatPercent( data["data"][0].yoy ) +")" );
$("#manfSalesSum").find(".value").html(formatKilo( data["data"][0].salesSum ) + "(" + formatPercent( data["data"][0].yoySum ) +")" );
$("#manfQuota").find(".value").html(formatPercent( data["data"][0].quota ) + "(" + formatPercent( data["data"][0].quotaChange ) +")" );
var rankTips = "<span class='green'>▲</span><span class='red'>▼</span>";
if(data["data"][0].linenumberchange!=null && data["data"][0].linenumberchange!="" && parseInt(data["data"][0].linenumberchange) < 0 ){
rankTips = "<span class='green'>▲</span>" +(parseInt(data["data"][0].linenumberchange) * (-1));
}
if(data["data"][0].linenumberchange!=null && data["data"][0].linenumberchange!="" && parseInt(data["data"][0].linenumberchange) > 0 ){
rankTips = "<span class='red'>▼</span>" +data["data"][0].linenumberchange;
}
if(data["data"][0].linenumberchange!=null && data["data"][0].linenumberchange!="" && parseInt(data["data"][0].linenumberchange) == 0 ){
rankTips = "<span class='tendency'></span>";
}
$("#manfRank").find(".value").html(data["data"][0].linenumber + "(" + rankTips +")" );
$("#brandYear").val(data.year);
$("#brandMonth").val(data.month);
//得到查询批发数需要的年月条件之后再分别查品牌和豪华车品牌的情况
$.ajax({
type : 'get',
contentType : 'application/json',
url : "${ctx}/sales/getGMSalesData.do?rankType=1&manf=&time=${time}&curTime=${curTime}&source=2&ids=14,15&brandYear="+data.year+"&brandMonth="+data.month,
processData : false,
dataType : 'json',
//data : 'year=2010&month=7' , //条件
success : function(data) {
if(data!=null && data["data"]!=null && data["data"].length>0){
for(var i=0;i<data["data"].length;i++){
$("#brandLogo"+i).attr("src",data["data"][i].imagePath );
$("#brandSalesValue"+i).html(formatKilo( data["data"][i].sales ) + "(" + formatPercent( data["data"][i].yoy ) +")" );
$("#brandSalesSumValue"+i).html(formatKilo( data["data"][i].salesSum ) + "(" + formatPercent( data["data"][i].yoySum ) +")" );
$("#brandQuotaValue"+i).html(formatPercent( data["data"][i].quota ) + "(" + formatPercent( data["data"][i].quotaChange ) +")" );
var rankTips = "<span class='green'>▲</span><span class='red'>▼</span>";
if(data["data"][i].linenumberchange!=null && data["data"][i].linenumberchange!="" && parseInt(data["data"][i].linenumberchange) < 0 ){
rankTips = "<span class='green'>▲</span>" +(parseInt(data["data"][i].linenumberchange) * (-1));
}
if(data["data"][i].linenumberchange!=null && data["data"][i].linenumberchange!="" && parseInt(data["data"][i].linenumberchange) > 0 ){
rankTips = "<span class='red'>▼</span>" +data["data"][i].linenumberchange;
}
if(data["data"][i].linenumberchange!=null && data["data"][i].linenumberchange!="" && parseInt(data["data"][i].linenumberchange) == 0 ){
rankTips = "<span class='tendency'></span>";
}
$("#brandRankValue"+i).html(data["data"][i].linenumber + "(" + rankTips +")" );
}
}
},
error : function() { }
});
$.ajax({
type : 'get',
contentType : 'application/json',
url : "${ctx}/sales/getGMSalesData.do?rankType=3&manf=&time=${time}&curTime=${curTime}&source=2&ids=46&segmentMarket=1&brandYear="+data.year+"&brandMonth="+data.month,
processData : false,
dataType : 'json',
//data : 'year=2010&month=7' , //条件
success : function(data) {
if(data!=null && data["data"]!=null && data["data"].length>0){
for(var i=0;i<data["data"].length;i++){
$("#brandLogo"+(i+2)).attr("src",data["data"][i].brandLogo );
$("#brandSalesValue"+(i+2)).html(formatKilo( data["data"][i].bqReg+"" ) + "(" + formatPercent( data["data"][i].tbPercent+"" ) +")" );
$("#brandSalesSumValue"+(i+2)).html(formatKilo( data["data"][i].bqYearAcc+"" ) + "(" + formatPercent( data["data"][i].accTbPercent +"" ) +")" );
$("#brandQuotaValue"+(i+2)).html(formatPercent( data["data"][i].zbPercent +"" ) + "(" + formatPercent( data["data"][i].zbPercentChange + "" ) +")" );
var rankTips = "<span class='green'>▲</span><span class='red'>▼</span>";
var rankChage = 0;
var bqRank = 0;
if(data["data"][i].sqRank!=null && data["data"][i].sqRank!="" && !isNaN(data["data"][i].sqRank)
&& data["data"][i].bqRank!=null && data["data"][i].bqRank!="" && !isNaN(data["data"][i].bqRank) ){
rankChage = parseInt(data["data"][i].bqRank)-parseInt(data["data"][i].sqRank);
bqRank = data["data"][i].bqRank;
}else if(data["data"][i].sqRank!=null && data["data"][i].sqRank!="" && !isNaN(data["data"][i].sqRank) ){
rankChage = parseInt(data["data"][i].sqRank)*(-1);
}else if( data["data"][i].bqRank!=null && data["data"][i].bqRank!="" && !isNaN(data["data"][i].bqRank) ){
rankChage = parseInt(data["data"][i].bqRank);
bqRank = data["data"][i].bqRank;
}
if(rankChage < 0 ){
rankTips = "<span class='green'>▲</span>" +((rankChage) * (-1));
}
if(rankChage > 0 ){
rankTips = "<span class='red'>▼</span>" +rankChage;
}
if(rankChage == 0 ){
rankTips = "<span class='tendency'></span>";
}
$("#brandRankValue"+(i+2)).html(bqRank + "(" + rankTips +")" );
}
}
},
error : function() { }
});
},
error : function() { }
});
});
</script>
</body>
</html>
</fmt:bundle>