lvhao 2 周之前
父節點
當前提交
48b168eb2b
共有 1 個文件被更改,包括 18 次插入1 次删除
  1. 18 1
      core/CoreApp/controllers/Fullorderexcel.php

+ 18 - 1
core/CoreApp/controllers/Fullorderexcel.php

@@ -559,13 +559,16 @@ class Fullorderexcel extends Start_Controller {
 			    }
 			}
 			//处理额外加上的subtotal和rowtoal 但是不想在表中加太多字段 想着以后有关金额的都给怼到extra_price字段中
-			if((strpos($feq,'subtotal')!= false)||(strpos($feq,'rowtotal')!= false)){
+			if((strpos($feq,'subtotal')!= false)||(strpos($feq,'rowtotal')!= false) ||(strpos($feq,'product_id')!= false)){
 				if(strpos($feq,'subtotal')!= false){
 					$feq = str_replace('subtotal,',"extra_price as subtotal,",$feq);
 				}
 				if(strpos($feq,'rowtotal')!= false){
 					$feq = str_replace('rowtotal,',"extra_price as rowtotal,",$feq);
 				}
+				if(strpos($feq,'product_id')!= false){
+					$feq = str_replace('product_id,',"extra_price as product_id,",$feq);
+				}
 			}
 			$feq = rtrim($feq,',');
 			
@@ -716,6 +719,20 @@ class Fullorderexcel extends Start_Controller {
 					$info_list[$key]['rowtotal'] = $tmp_sub_str;
 
 				}
+				if(isset($value['product_id'])){
+					$tmp_product_id = "";
+					$product_ids = json_decode($value['product_id'],true);
+					foreach($product_ids as $v){
+						if(isset($v['product_id'])){
+							$tmp_product_id .= $v['product_id']."<br>";
+						}else{
+							$tmp_product_id .= "<br>";
+						}
+					}
+					$info_list[$key]['product_id'] = $tmp_product_id;
+
+				}
+
 				if(isset($value['librarytime']))
 				{
 					if($value['librarytime'] > 0)