wugg il y a 1 an
Parent
commit
1e08f3f270
2 fichiers modifiés avec 30 ajouts et 0 suppressions
  1. 4 0
      app/admin/controller/SaleReport.php
  2. 26 0
      app/common.php

+ 4 - 0
app/admin/controller/SaleReport.php

@@ -3236,6 +3236,7 @@ class SaleReport extends Base
 			$value['addr'] = "";
 			$value['addr_contactor'] = "";
 			$value['addr_mobile'] ="";
+			$value['report_sx'] =report_sx($value['sx']);
 			if(isset($addr[$value['addrid']])){
 				if($addr[$value['addrid']]['addr_code']!=''){
 					if (!json_decode($addr[$value['addrid']]['addr_code'])) {
@@ -3292,6 +3293,7 @@ class SaleReport extends Base
 			$value['收货地址'] = "";
 			$value['收货联系人'] = "";
 			$value['联系方式'] ="";
+			$value['时效'] =report_sx($value['时效']);
 			if(isset($addr[$value['addrid']])){
 				if($addr[$value['addrid']]['addr_code']!=''){
 					if (!json_decode($addr[$value['addrid']]['addr_code'])) {
@@ -3345,6 +3347,7 @@ class SaleReport extends Base
 		  $item['order_source'] = $this->order_source[$item['order_source']]??"";
 		  $item['order_type'] = $this->all_order_type[$item['order_type']]??"";
 		  $item['cat_name'] = $cat[$item['cat_id']]??"";
+		  $item['sx'] =report_sx($item['sx']);
 		  $data[]=$item;
 		}
 
@@ -3419,6 +3422,7 @@ class SaleReport extends Base
 		  $item['订单来源'] = $this->order_source[$item['订单来源']]??"";
 		  $item['商品类型'] = $this->all_order_type[$item['商品类型']]??"";
 		  $item['商品分类'] = $cat[$item['商品分类']]??"";
+		  $item['时效'] =report_sx($item['时效']);
 		  $data[]=$item;
 		}
 

+ 26 - 0
app/common.php

@@ -1694,4 +1694,30 @@ if(function_exists('channel_is_company')==false){
     	if(in_array($companyNo,$platform))return true;
 		return false;
     }
+}
+
+
+//是否是渠道
+if(function_exists('report_sx')==false){
+    function report_sx($day=0){
+    	if($day>0 && $day<=1){
+    		return "A24小时";
+    	}
+    	if($day>1 && $day<=2){
+    		return "B48小时";
+    	}
+    	if($day>2 && $day<=7){
+    		return "C3-7天内";
+    	}
+    	if($day>7 && $day<=14){
+    		return "D14天内";
+    	}
+    	if($day>14 && $day<=30){
+    		return "E30天内";
+    	}
+    	if($day>30){
+    		return "F30天以上";
+    	}
+		return '';
+    }
 }