Browse Source

修改usps的退货问题

lvhao 3 months ago
parent
commit
f67f340312
2 changed files with 19 additions and 10 deletions
  1. 10 4
      core/CoreApp/controllers/Aatest.php
  2. 9 6
      core/CoreApp/models/Model_usps.php

+ 10 - 4
core/CoreApp/controllers/Aatest.php

@@ -58,6 +58,7 @@ class Aatest extends Start_Controller {
 
 
 		 $this->load->_model('Model_customer','customer');
 		 $this->load->_model('Model_customer','customer');
 		$this->load->_model('Model_express','express');
 		$this->load->_model('Model_express','express');
+		$this->load->_model('Model_weight','weight');
 
 
     }
     }
 
 
@@ -75,7 +76,7 @@ class Aatest extends Start_Controller {
 		}elseif($arg == 'logistic'){
 		}elseif($arg == 'logistic'){
 			//$this->_logistic();
 			//$this->_logistic();
 		}elseif($arg == 'th'){
 		}elseif($arg == 'th'){
-		    //$this->_th($arg_array);
+		    $this->_th($arg_array);
 		}else{
 		}else{
 			
 			
 			$this->_a($arg_array);
 			$this->_a($arg_array);
@@ -84,7 +85,7 @@ class Aatest extends Start_Controller {
     }
     }
     
     
     public function _th($arg_array){
     public function _th($arg_array){
-        die;
+        //die;
         if(empty($arg_array)){
         if(empty($arg_array)){
             die(1);
             die(1);
         }
         }
@@ -99,7 +100,7 @@ class Aatest extends Start_Controller {
         
         
         $r = $this->usps->get_return($data);
         $r = $this->usps->get_return($data);
         echo "<pre>";
         echo "<pre>";
-        var_dump($r);
+        print_r($r);
     }
     }
 
 
 	//物流轨迹
 	//物流轨迹
@@ -211,6 +212,11 @@ class Aatest extends Start_Controller {
 	}
 	}
     public function _a($arg_array){
     public function _a($arg_array){
 		
 		
+		echo "<pre>";
+		// $str = "86,-2397-957-101-146-29-72-2071-|A041 #P18/613 Straight 13*4 Frontal Wig Small 180% Ready to Go 16inch |1|0.00|0.00|16|0.00|0.00|255|0;87,-128-80-2323-57-104-146-29-72-2071-|Wigs 9A A032 Natural Black Deep Wave 13*4 Frontal Wig Small 180% Ready to Go 18inch |1|0.00|0.00|18|0.00|0.00|265|0;";
+		// $r = $this->weight->get_weightcx($str);
+		// var_dump($r);
+		// die;
 		// $list = [
 		// $list = [
 		// 	[
 		// 	[
 		// 		'sku2'=>'-128-80-89-57-106-341-30-72-',
 		// 		'sku2'=>'-128-80-89-57-106-341-30-72-',
@@ -226,7 +232,7 @@ class Aatest extends Start_Controller {
 		$dtc = $data['dtc'];
 		$dtc = $data['dtc'];
 		$dtctitle = $data['dtctitle'];
 		$dtctitle = $data['dtctitle'];
 		$quantity = '1';
 		$quantity = '1';
-		$issku = '#P4/27--STW--LaceWigs-26-RTGWL-13*4WIG';
+		$issku = 'LY021--OceanWave--Wigs--RTG-13*6Wig-20-250%';
 		$money = array();
 		$money = array();
 			$productdescribe = $this->productdescribe->find_all('1=1');
 			$productdescribe = $this->productdescribe->find_all('1=1');
 			foreach ($productdescribe as $v) 
 			foreach ($productdescribe as $v) 

+ 9 - 6
core/CoreApp/models/Model_usps.php

@@ -362,7 +362,7 @@ function __construct(){
 		}
 		}
 
 
 
 
-		var_dump($fw);
+		//var_dump($fw);
 		
 		
 		if($fw)
 		if($fw)
 		{
 		{
@@ -476,15 +476,18 @@ function __construct(){
 		$list['packageDescription']['processingCategory'] = 'MACHINABLE'; // 处理类别
 		$list['packageDescription']['processingCategory'] = 'MACHINABLE'; // 处理类别
 		$fw = array();
 		$fw = array();
 		//保险不需要了 先注释表
 		//保险不需要了 先注释表
-		// if($data['bx'] > 0)
-		// {
-		// 	$fw[] = 930;
-		// }
+		if($data['bx'] > 0)
+		{
+			$fw[] = 930;
+		}
 		if($fw)
 		if($fw)
 		{
 		{
             $list['packageDescription']['extraServices']= $fw; // 额外服务
             $list['packageDescription']['extraServices']= $fw; // 额外服务
 		}
 		}
-        $list['packageDescription']['packageOptions']['packageValue'] = 100; // 包裹选项
+		if($data['bx'] > 0){
+			$list['packageDescription']['packageOptions']['packageValue'] = $data['bx']; // 包裹选项
+		}
+       
         $list['packageDescription']['customerReference'][0]['referenceNumber'] = $data['number']; // 客户参考
         $list['packageDescription']['customerReference'][0]['referenceNumber'] = $data['number']; // 客户参考
 		$list['packageDescription']['customerReference'][0]['printReferenceNumber'] = true; // 客户参考
 		$list['packageDescription']['customerReference'][0]['printReferenceNumber'] = true; // 客户参考