zhangxinlei1996 před 5 roky
rodič
revize
41d610295a

+ 49 - 1
src/web/templates/weixin/dataExport/dataExport_toMyOrder.html

@@ -1227,7 +1227,55 @@
 							       effectiveduration_vip=filterObj.cyclecount+"天";
 							    }else if (filterObj.cycleunit==-1){
 							        effectiveduration_vip="不延期";
-							    }
+							    }else{
+									if((obj.vip_starttime!=undefined)&&(obj.vip_endtime!=undefined)){
+										var start_time_vip = obj.vip_starttime;
+										var end_time_vip = obj.vip_endtime;
+										var start_time_arr = start_time_vip.split(" ")[0].split("-")
+										var end_time_arr = end_time_vip.split(" ")[0].split("-")
+										var start_year=start_time_arr[0];
+										var start_month=start_time_arr[1];
+										var end_year=end_time_arr[0];
+										var end_month=end_time_arr[1];
+										
+										var year = 0;
+										var month = 0;
+										if(end_year > start_year){
+											if(end_month > start_month){
+												year = end_year - start_year;
+												month = end_month - start_month;
+											}else{
+												year = end_year - start_year-1;
+												month = 12+Number(end_month)-start_month;
+												if (month==12){
+													year=Number(year)+1;
+													month=0;
+												}
+											}
+										}else if(end_year == start_year){
+											month = end_month - start_month;
+										}
+										
+										if(year != 0 && month !=0){
+											effectiveduration_vip=year+"年"+month+"个月";
+										}else if(year !== 0&& month ===0){
+											effectiveduration_vip=year+"年";
+										}else if(year === 0&& month !==0){
+											effectiveduration_vip=month+"个月";
+										}
+										if(cycleunit_vip==3){
+											effectiveduration_vip=cyclecount_vip+"天";	 
+										}
+									}else{
+									   	if(cycleunit_vip==1){
+									    	effectiveduration_vip=cyclecount_vip+"年";
+									    }else if(cycleunit_vip==2){
+									    	effectiveduration_vip=cyclecount_vip+"个月"
+									    }else if(cycleunit_vip==3){
+									    	effectiveduration_vip=cyclecount_vip+"天";	                    
+									    }
+									}
+								}
 	                       }else if (vip_type==1){
 								filter_vip = JSON.parse(obj.filter);
 								var renewal_market=0; //续费市级地区