|
@@ -1033,39 +1033,63 @@
|
|
|
createTime_vip =createTime_vip.replace(/-/g,".")
|
|
|
//筛选条件
|
|
|
var filter_vip = JSON.parse(obj.filter);
|
|
|
+ var newbuyset= filter_vip.newBuyset;
|
|
|
//判断该订单是否是升级订单
|
|
|
var vip_type = obj.vip_type;
|
|
|
+ var region_vip=""
|
|
|
if ((vip_type != 2)&&(vip_type!=1)){
|
|
|
//地区
|
|
|
- var region_vipArr = filter_vip.area;
|
|
|
- var region_vip=""
|
|
|
- var province_length=0;
|
|
|
- var city_length=0;
|
|
|
- if(JSON.stringify(region_vipArr) != JSON.stringify({})){
|
|
|
- for(i in region_vipArr){
|
|
|
- if(region_vipArr[i].length==0){
|
|
|
- province_length++;
|
|
|
+ if(!$.isEmptyObject(newbuyset)){ //不为空
|
|
|
+ if(newbuyset.areacount!=-1){
|
|
|
+ var newcitys=newbuyset.newcitys;
|
|
|
+ var scatter=newcitys.length ;//分布
|
|
|
+ var citynum=0;
|
|
|
+ for(var k in newcitys){
|
|
|
+ citynum+=newcitys[k];
|
|
|
+ }
|
|
|
+ if(newbuyset.areacount>0){
|
|
|
+ region_vip=newbuyset.areacount+"个省级区域";
|
|
|
+ if(citynum>1){
|
|
|
+ region_vip+="、"+citynum+"个地市(分布在"+scatter+"省内)";
|
|
|
+ }else{
|
|
|
+ region_vip+="、"+citynum+"个地市";
|
|
|
+ }
|
|
|
}else{
|
|
|
- city_length+=region_vipArr[i].length;
|
|
|
+ region_vip+=citynum+"个地市(分布在"+scatter+"省内)";
|
|
|
}
|
|
|
+ }else{
|
|
|
+ region_vip="全国";
|
|
|
}
|
|
|
}else{
|
|
|
- region_vip="全国";
|
|
|
- }
|
|
|
- if((province_length!=0)&&(city_length!=0)){
|
|
|
- region_vip=province_length+"个省级区域、"+city_length+"个地市";
|
|
|
- }else if((province_length==0)&&(city_length!=0)){
|
|
|
- region_vip=city_length+"个地市";
|
|
|
- }else if((province_length!=0)&&(city_length==0)){
|
|
|
- region_vip=province_length+"个省级区域";
|
|
|
+ var region_vipArr = filter_vip.area;
|
|
|
+ var province_length=0;
|
|
|
+ var city_length=0;
|
|
|
+ if(JSON.stringify(region_vipArr) != JSON.stringify({})){
|
|
|
+ for(i in region_vipArr){
|
|
|
+ if(region_vipArr[i].length==0){
|
|
|
+ province_length++;
|
|
|
+ }else{
|
|
|
+ city_length+=region_vipArr[i].length;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ region_vip="全国";
|
|
|
+ }
|
|
|
+ if((province_length!=0)&&(city_length!=0)){
|
|
|
+ region_vip=province_length+"个省级区域、"+city_length+"个地市";
|
|
|
+ }else if((province_length==0)&&(city_length!=0)){
|
|
|
+ region_vip=city_length+"个地市";
|
|
|
+ }else if((province_length!=0)&&(city_length==0)){
|
|
|
+ region_vip=province_length+"个省级区域";
|
|
|
+ }
|
|
|
+ //行业
|
|
|
+ var industry_vip = filter_vip.industry.length; //数组
|
|
|
+ if(industry_vip==0){
|
|
|
+ industry_vip="全行业";
|
|
|
+ }else{
|
|
|
+ industry_vip=industry_vip+"个行业";
|
|
|
+ }
|
|
|
}
|
|
|
- //行业
|
|
|
- var industry_vip = filter_vip.industry.length; //数组
|
|
|
- if(industry_vip==0){
|
|
|
- industry_vip="全行业";
|
|
|
- }else{
|
|
|
- industry_vip=industry_vip+"个行业";
|
|
|
- }
|
|
|
var cyclecount_vip = filter_vip.cyclecount; //时长
|
|
|
var cycleunit_vip = filter_vip.cycleunit;//单位 1:年 2:月 3:天
|
|
|
//订阅周期
|
|
@@ -1123,31 +1147,63 @@
|
|
|
//升级订单 单独处理
|
|
|
//区域
|
|
|
var filterObj =filter_vip;
|
|
|
- var region_vip ="";
|
|
|
- if(!$.isEmptyObject(filterObj.addareacount)){
|
|
|
- if((filterObj.addareacount.province==0)&&(filterObj.addareacount.city==0)){
|
|
|
+ if(!$.isEmptyObject(newbuyset)){ //不为空
|
|
|
+ if(newbuyset.areacount!=-1){
|
|
|
+ var newcitys=newbuyset.newcitys;
|
|
|
+ var scatter=newcitys.length ;//分布
|
|
|
+ var citynum=0;
|
|
|
+ for(var k in newcitys){
|
|
|
+ citynum+=newcitys[k];
|
|
|
+ }
|
|
|
+ if(newbuyset.areacount>0){
|
|
|
+ region_vip=newbuyset.areacount+"个省级区域";
|
|
|
+ if(citynum>1){
|
|
|
+ region_vip+="、"+citynum+"个地市(分布在"+scatter+"省内)";
|
|
|
+ }else{
|
|
|
+ region_vip+="、"+citynum+"个地市";
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ region_vip+=citynum+"个地市(分布在"+scatter+"省内)";
|
|
|
+ }
|
|
|
+ }else{
|
|
|
region_vip="全国";
|
|
|
}
|
|
|
- if((filterObj.addareacount.province!=0)&&(filterObj.addareacount.city==0)){
|
|
|
- region_vip=filterObj.addareacount.province+"个省级区域";
|
|
|
- }
|
|
|
- if((filterObj.addareacount.province==0)&&(filterObj.addareacount.city!=0)){
|
|
|
- region_vip=filterObj.addareacount.city+"个地市";
|
|
|
+ var buyerclasscount=newbuyset.buyerclasscount;
|
|
|
+ if(buyerclasscount>3){
|
|
|
+ buyerclasscount=filterObj.industry.length;
|
|
|
+ industry_vip="全行业("+buyerclasscount+"个行业)";
|
|
|
+ }else{
|
|
|
+ industry_vip=buyerclasscount+"个行业";
|
|
|
}
|
|
|
- if((filterObj.addareacount.province!=0)&&(filterObj.addareacount.city!=0)){
|
|
|
- region_vip=filterObj.addareacount.province+"个省级区域、"+filterObj.addareacount.city+"个地市";
|
|
|
+ if(buyerclasscount==-1){
|
|
|
+ industry_vip="全行业";
|
|
|
}
|
|
|
}else{
|
|
|
- region_vip="无";
|
|
|
- }
|
|
|
- //行业
|
|
|
- var industry_vip="";
|
|
|
- industry_vip=filterObj.addbuyerclasscount+"个行业";
|
|
|
- if(filterObj.addbuyerclasscount==0){
|
|
|
- industry_vip="无";
|
|
|
- }
|
|
|
- if(filterObj.addbuyerclasscount==-1){
|
|
|
- industry_vip="全行业";
|
|
|
+ if(!$.isEmptyObject(filterObj.addareacount)){
|
|
|
+ if((filterObj.addareacount.province==0)&&(filterObj.addareacount.city==0)){
|
|
|
+ region_vip="全国";
|
|
|
+ }
|
|
|
+ if((filterObj.addareacount.province!=0)&&(filterObj.addareacount.city==0)){
|
|
|
+ region_vip=filterObj.addareacount.province+"个省级区域";
|
|
|
+ }
|
|
|
+ if((filterObj.addareacount.province==0)&&(filterObj.addareacount.city!=0)){
|
|
|
+ region_vip=filterObj.addareacount.city+"个地市";
|
|
|
+ }
|
|
|
+ if((filterObj.addareacount.province!=0)&&(filterObj.addareacount.city!=0)){
|
|
|
+ region_vip=filterObj.addareacount.province+"个省级区域、"+filterObj.addareacount.city+"个地市";
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ region_vip="无";
|
|
|
+ }
|
|
|
+ //行业
|
|
|
+ var industry_vip="";
|
|
|
+ industry_vip=filterObj.addbuyerclasscount+"个行业";
|
|
|
+ if(filterObj.addbuyerclasscount==0){
|
|
|
+ industry_vip="无";
|
|
|
+ }
|
|
|
+ if(filterObj.addbuyerclasscount==-1){
|
|
|
+ industry_vip="全行业";
|
|
|
+ }
|
|
|
}
|
|
|
//延长周期
|
|
|
var effectiveduration_vip="";
|
|
@@ -1165,32 +1221,58 @@
|
|
|
var renewal_market=0; //续费市级地区
|
|
|
var buyset=filter_vip.buyset;
|
|
|
if (!$.isEmptyObject(buyset)){
|
|
|
- if (buyset.areacount==-1){
|
|
|
- region_vip = "全国";
|
|
|
- }else{
|
|
|
- if(!$.isEmptyObject(buyset.citys)){
|
|
|
- for (var key in buyset.citys) {
|
|
|
- renewal_market+=(buyset.citys[key]);
|
|
|
+ //续费订单根据buyset 中ciyts判断 老订单为citys 新订单为newcitys 续费以外根据newbuyset判断
|
|
|
+ if (buyset.ciyts!=undefined){
|
|
|
+ if (buyset.areacount==-1){
|
|
|
+ region_vip = "全国";
|
|
|
+ }else{
|
|
|
+ if(!$.isEmptyObject(buyset.citys)){
|
|
|
+ for (var key in buyset.citys) {
|
|
|
+ renewal_market+=(buyset.citys[key]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //
|
|
|
+ var areaText="";
|
|
|
+ if ((buyset.areacount!=0)&&(renewal_market!=0)){
|
|
|
+ region_vip=buyset.areacount+"个省级地区、"+renewal_market+"个地市";
|
|
|
+ }else if((buyset.areacount==0)&&(renewal_market!=0)){
|
|
|
+ region_vip=renewal_market+"个地市";
|
|
|
+ }else if((buyset.areacount!=0)&&(renewal_market==0)){
|
|
|
+ region_vip=buyset.areacount+"个省级地区";
|
|
|
}
|
|
|
}
|
|
|
- //
|
|
|
- var areaText="";
|
|
|
- if ((buyset.areacount!=0)&&(renewal_market!=0)){
|
|
|
- region_vip=buyset.areacount+"个省级地区、"+renewal_market+"个地市";
|
|
|
- }else if((buyset.areacount==0)&&(renewal_market!=0)){
|
|
|
- region_vip=renewal_market+"个地市";
|
|
|
- }else if((buyset.areacount!=0)&&(renewal_market==0)){
|
|
|
- region_vip=buyset.areacount+"个省级地区";
|
|
|
+ if(buyset.buyerclasscount==-1){
|
|
|
+ industry_vip="全行业";
|
|
|
+ }else{
|
|
|
+ industry_vip=buyset.buyerclasscount+"个行业";
|
|
|
}
|
|
|
- }
|
|
|
- if(buyset.buyerclasscount==-1){
|
|
|
- industry_vip="全行业";
|
|
|
}else{
|
|
|
- industry_vip=buyset.buyerclasscount+"个行业";
|
|
|
+ if (buyset.areacount!=-1){
|
|
|
+ var newcitys=buyset.newcitys;
|
|
|
+ var scatter=newcitys.length ;//分布
|
|
|
+ var citynum=0;
|
|
|
+ for(var k in newcitys){
|
|
|
+ citynum+=newcitys[k];
|
|
|
+ }
|
|
|
+ if(buyset.areacount>0){
|
|
|
+ region_vip=buyset.areacount+"个省级区域";
|
|
|
+ if(citynum>1){
|
|
|
+ region_vip+="、"+citynum+"个地市(分布在"+scatter+"省内)";
|
|
|
+ }else{
|
|
|
+ region_vip+="、"+citynum+"个地市";
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ region_vip+=citynum+"个地市(分布在"+scatter+"省内)";
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ region_vip="全国";
|
|
|
+ }
|
|
|
+ if(buyset.buyerclasscount!=-1){
|
|
|
+ industry_vip= buyset.buyerclasscount+"个行业";
|
|
|
+ }else{
|
|
|
+ industry_vip="全行业";
|
|
|
+ }
|
|
|
}
|
|
|
- }else{
|
|
|
- industry_vip=""
|
|
|
- region_vip=""
|
|
|
}
|
|
|
//订阅周期
|
|
|
var effectiveduration_vip=""
|
|
@@ -1317,19 +1399,19 @@
|
|
|
+'<img src="/vipsubscribe/image/vip_order.png">'
|
|
|
+'</div>'
|
|
|
+'<div class="media-info">';
|
|
|
- if (vip_type==1){//续费
|
|
|
- listhtml+='<p class="item-ifo ellipsis">续费区域:'+ region_vip+'</p>'
|
|
|
- +'<p class="item-ifo ellipsis">续费行业:'+ industry_vip +'</p>'
|
|
|
- +'<p class="item-ifo ellipsis">续费周期:'+effectiveduration_vip+'</p>';
|
|
|
- }else if (vip_type ==2){//升级
|
|
|
- listhtml+='<p class="item-ifo ellipsis">升级区域:'+ region_vip+'</p>'
|
|
|
- +'<p class="item-ifo ellipsis">升级行业:'+ industry_vip +'</p>'
|
|
|
- +'<p class="item-ifo ellipsis">延长周期:'+effectiveduration_vip+'</p>';
|
|
|
- }else{
|
|
|
+ // if (vip_type==1){//续费
|
|
|
+ // listhtml+='<p class="item-ifo ellipsis">续费区域:'+ region_vip+'</p>'
|
|
|
+ // +'<p class="item-ifo ellipsis">续费行业:'+ industry_vip +'</p>'
|
|
|
+ // +'<p class="item-ifo ellipsis">续费周期:'+effectiveduration_vip+'</p>';
|
|
|
+ // }else if (vip_type ==2){//升级
|
|
|
+ // listhtml+='<p class="item-ifo ellipsis">升级区域:'+ region_vip+'</p>'
|
|
|
+ // +'<p class="item-ifo ellipsis">升级行业:'+ industry_vip +'</p>'
|
|
|
+ // +'<p class="item-ifo ellipsis">延长周期:'+effectiveduration_vip+'</p>';
|
|
|
+ // }else{
|
|
|
listhtml+='<p class="item-ifo ellipsis">区域:'+ region_vip+'</p>'
|
|
|
+'<p class="item-ifo ellipsis">行业:'+ industry_vip +'</p>'
|
|
|
+'<p class="item-ifo ellipsis">订阅周期:'+effectiveduration_vip+'</p>';
|
|
|
- }
|
|
|
+ //}
|
|
|
listhtml+='</div>'
|
|
|
+'</a>'
|
|
|
+'<div class="price">'
|
|
@@ -1357,22 +1439,22 @@
|
|
|
+'<img src="/vipsubscribe/image/vip_order.png">'
|
|
|
+'</div>'
|
|
|
+'<div class="media-info">';
|
|
|
- if(vip_type==1){ //续费
|
|
|
- listhtml+='<p class="item-ifo ellipsis">续费区域:'+ region_vip+'</p>'
|
|
|
- +'<p class="item-ifo ellipsis">续费行业:'+ industry_vip +'</p>'
|
|
|
- +'<p class="item-ifo ellipsis">续费周期:'+effectiveduration_vip+'</p>'
|
|
|
- +'<p class="item-ifo ellipsis">有效日期:'+effectivetime_vip+'</p>';
|
|
|
- }else if (vip_type==2){ //升级
|
|
|
- listhtml+='<p class="item-ifo ellipsis">升级区域:'+ region_vip+'</p>'
|
|
|
- +'<p class="item-ifo ellipsis">升级行业:'+ industry_vip +'</p>'
|
|
|
- +'<p class="item-ifo ellipsis">延长周期:'+effectiveduration_vip+'</p>'
|
|
|
- +'<p class="item-ifo ellipsis">有效日期:'+effectivetime_vip+'</p>';
|
|
|
- }else {
|
|
|
+ // if(vip_type==1){ //续费
|
|
|
+ // listhtml+='<p class="item-ifo ellipsis">续费区域:'+ region_vip+'</p>'
|
|
|
+ // +'<p class="item-ifo ellipsis">续费行业:'+ industry_vip +'</p>'
|
|
|
+ // +'<p class="item-ifo ellipsis">续费周期:'+effectiveduration_vip+'</p>'
|
|
|
+ // +'<p class="item-ifo ellipsis">有效日期:'+effectivetime_vip+'</p>';
|
|
|
+ // }else if (vip_type==2){ //升级
|
|
|
+ // listhtml+='<p class="item-ifo ellipsis">升级区域:'+ region_vip+'</p>'
|
|
|
+ // +'<p class="item-ifo ellipsis">升级行业:'+ industry_vip +'</p>'
|
|
|
+ // +'<p class="item-ifo ellipsis">延长周期:'+effectiveduration_vip+'</p>'
|
|
|
+ // +'<p class="item-ifo ellipsis">有效日期:'+effectivetime_vip+'</p>';
|
|
|
+ // }else {
|
|
|
listhtml+='<p class="item-ifo ellipsis">区域:'+ region_vip+'</p>'
|
|
|
+'<p class="item-ifo ellipsis">行业:'+ industry_vip +'</p>'
|
|
|
+'<p class="item-ifo ellipsis">订阅周期:'+effectiveduration_vip+'</p>'
|
|
|
+'<p class="item-ifo ellipsis">有效日期:'+effectivetime_vip+'</p>';
|
|
|
- }
|
|
|
+ //}
|
|
|
listhtml+='</div>'
|
|
|
+'</a>'
|
|
|
+'<div class="price">'
|