Jelajahi Sumber

Merge branch 'dev2.8.5' of http://192.168.3.207:10080/qmx/jy into dev2.8.5

wangkaiyue 5 tahun lalu
induk
melakukan
d76cc553c2

+ 2 - 1
src/jfw/modules/subscribepay/src/entity/dataexport.go

@@ -913,7 +913,8 @@ func newbuysetConversion(newbuyset map[string]interface{}) (subscription_area, i
 		}
 	}
 	//行业
-	if newbuyset["buyerclasscount"] == -1 {
+	buyerclasscount := qutil.Int64All(newbuyset["buyerclasscount"])
+	if buyerclasscount == -1 {
 		industry = "全行业"
 	} else {
 		industry = fmt.Sprintf("%d个行业", int(newbuyset["buyerclasscount"].(float64)))

+ 9 - 4
src/web/templates/weixin/dataExport/dataExport_toMyOrder.html

@@ -1054,7 +1054,9 @@
 											// if(citynum>1){
 											// 	region_vip+="、"+citynum+"个地市(分布在"+scatter+"省内)";
 											// }else{
-												region_vip+="、"+citynum+"个地市";
+												if(citynum!=0){
+													region_vip+="、"+citynum+"个地市";
+												}
 											//}
 										}
 										else{
@@ -1155,7 +1157,6 @@
 	                       }else if(vip_type==2){
 								//新增全部行业:-1  新增部分行业:123   		无新增:0
 								//新增全国{"province":0,"city":0}  无新增:{}
-	                       		//升级订单 单独处理
 	                       		//区域
 	                       		var filterObj =filter_vip;
 								if(!$.isEmptyObject(newbuyset)){	//不为空
@@ -1171,7 +1172,9 @@
 											// if(citynum>1){
 											// 	region_vip+="、"+citynum+"个地市(分布在"+scatter+"省内)";
 											// }else{
-												region_vip+="、"+citynum+"个地市";
+												if(citynum!=0){
+													region_vip+="、"+citynum+"个地市";
+												}
 											//}
 										}else{
 											//region_vip+=citynum+"个地市(分布在"+scatter+"省内)";
@@ -1324,7 +1327,9 @@
 											//}
 										}else{
 											//region_vip+=citynum+"个地市(分布在"+scatter+"省内)";
-											region_vip+=citynum+"个地市";
+											if(citynum!=0){
+												region_vip+="、"+citynum+"个地市";
+											}
 										}
 									}else{
 										region_vip="全国";

+ 72 - 51
src/web/templates/weixin/vipsubscribe/vip_order_detail.html

@@ -77,7 +77,7 @@
                             </ul>
                         </div>
                         <div class="item-list">
-                            <label class="dyhy">采购单位行业:</label>
+                            <label class="dyhy">采购单位行业:</label>
                             <ul class="item-list-parents">
                                 <li><span class="industryNum"></span></li>
                             </ul>
@@ -188,8 +188,6 @@ try{
         if(r.data.order.original_price==0){
         	$(".productType").text(r.data.order.product_type+"(试用)");
         }
-        //1 续费 2升级
-
         //价格
         $(".price").text(r.data.order.original_price/100);
         
@@ -211,13 +209,19 @@ try{
 						}
 						if(newBuyset.areacount>0){
 							areaText=newBuyset.areacount+"个省级区域";
-							if(citynum>1){
-								areaText+="、"+citynum+"个地市(分布在"+scatter+"省内)";
-							}else{
-								areaText+="、"+citynum+"个地市";
+							if(citynum!=0){
+								if(scatter>1){
+									areaText+="、"+citynum+"个地市(分布在"+scatter+"省内)";
+								}else{
+									areaText+="、"+citynum+"个地市";
+								}
 							}
 						}else{
-							areaText+=citynum+"个地市(分布在"+scatter+"省内)";
+							if (scatter>1){
+								areaText+=citynum+"个地市(分布在"+scatter+"省内)";
+							}else{
+								areaText+=citynum+"个地市";
+							}
 						}
 						$(".areaNum").text(areaText);
 					}else{
@@ -272,13 +276,19 @@ try{
 						}
 						if(newBuyset.areacount>0){
 							areaText=newBuyset.areacount+"个省级区域";
-							if(citynum>1){
-								areaText+="、"+citynum+"个地市(分布在"+scatter+"省内)";
-							}else{
-								areaText+="、"+citynum+"个地市";
+							if (citynum!=0){
+								if(scatter>1){
+									areaText+="、"+citynum+"个地市(分布在"+scatter+"省内)";
+								}else{
+									areaText+="、"+citynum+"个地市";
+								}
 							}
 						}else{
-							areaText+=citynum+"个地市(分布在"+scatter+"省内)";
+							if (scatter>1){
+								areaText+=citynum+"个地市(分布在"+scatter+"省内)";
+							}else{
+								areaText+=citynum+"个地市";
+							}
 						}
 					}else{
 						areaText="全国";
@@ -329,35 +339,6 @@ try{
 				var renewal_market=0; //续费市级地区
 				var buyset=filterObj.buyset;
 				var newBuyset=filterObj.newBuyset;
-				if(!$.isEmptyObject(buyset)){ 
-					//续费都是buyset 根据 citys 和 newcitys 判断是老订单还是新订单
-					if (buyset.citys!=undefined){
-						if (buyset.areacount==-1){
-							$(".areaNum").text("全国");
-						}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)){
-								areaText=buyset.areacount+"个省级地区、"+renewal_market+"个地市";
-							}else if((buyset.areacount==0)&&(renewal_market!=0)){
-								areaText=renewal_market+"个地市";
-							}else if((buyset.areacount!=0)&&(renewal_market==0)){
-								areaText=buyset.areacount+"个省级地区";
-							}
-							$(".areaNum").text(areaText);
-						}
-						if(buyset.buyerclasscount==-1){
-							$(".industryNum").text("全行业");
-						}else{
-							$(".industryNum").text(buyset.buyerclasscount+"个行业");
-						}
-					}
-				}
 				if(!$.isEmptyObject(newBuyset)){ //p1
 					if (newBuyset.areacount!=-1){
 						var newcitys=newBuyset.newcitys;
@@ -368,13 +349,19 @@ try{
 						}
 						if(newBuyset.areacount>0){
 							areaText=newBuyset.areacount+"个省级区域";
-							if(citynum>1){
-								areaText+="、"+citynum+"个地市(分布在"+scatter+"省内)";
-							}else{
-								areaText+="、"+citynum+"个地市";
+							if (citynum!=0){
+								if(scatter>1){
+									areaText+="、"+citynum+"个地市(分布在"+scatter+"省内)";
+								}else{
+									areaText+="、"+citynum+"个地市";
+								}
 							}
 						}else{
-							areaText+=citynum+"个地市(分布在"+scatter+"省内)";
+							if (scatter>1){
+								areaText+=citynum+"个地市(分布在"+scatter+"省内)";
+							}else{
+								areaText+=citynum+"个地市";
+							}
 						}
 						$(".areaNum").text(areaText);	
 					}else{
@@ -385,6 +372,35 @@ try{
 					}else{
 						$(".industryNum").text("全行业");
 					}
+				}else{
+					if(!$.isEmptyObject(buyset)){
+						if (buyset.citys!=undefined){
+							if (buyset.areacount==-1){
+								$(".areaNum").text("全国");
+							}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)){
+									areaText=buyset.areacount+"个省级地区、"+renewal_market+"个地市";
+								}else if((buyset.areacount==0)&&(renewal_market!=0)){
+									areaText=renewal_market+"个地市";
+								}else if((buyset.areacount!=0)&&(renewal_market==0)){
+									areaText=buyset.areacount+"个省级地区";
+								}
+								$(".areaNum").text(areaText);
+							}
+							if(buyset.buyerclasscount==-1){
+								$(".industryNum").text("全行业");
+							}else{
+								$(".industryNum").text(buyset.buyerclasscount+"个行业");
+							}
+						}
+					}
 				}
 			}
 			
@@ -746,7 +762,8 @@ try{
 			if (list[i].oldBuyset.areacount === -1) {
 				showArea = "全国"
 			} else {
-				if (list[i].oldBuyset.newcitys.length > 0) {
+				console.log(list[i].oldBuyset.newcitys.length)
+				//if (list[i].oldBuyset.newcitys.length > 0) {
 					var cityCount = 0;
 					for (var j = 0; j < list[i].oldBuyset.newcitys.length; j++) {
 						cityCount += list[i].oldBuyset.newcitys[j];
@@ -756,16 +773,20 @@ try{
 						if (list[i].oldBuyset.newcitys.length>1){
 							showArea += "、" + cityCount + "个市(分布在" + list[i].oldBuyset.newcitys.length + "个省内)";
 						}else{
-							showArea += "、" + cityCount + "个市";
+							if(cityCount!=0){
+								showArea += "、" + cityCount + "个市";
+							}
 						}
 					}else{
 						if (list[i].oldBuyset.newcitys.length>1){
 							showArea += cityCount + "个市(分布在" + list[i].oldBuyset.newcitys.length + "个省内)";
 						}else{
-							showArea += cityCount + "个市";
+							if(cityCount!=0){
+								showArea += cityCount + "个市";
+							}
 						}
 					}
-				}
+				//}
 			}
 			var industryShow = "";
 			if (list[i].oldBuyset.buyerclasscount === -1) {