Sfoglia il codice sorgente

处理亚马逊导入的标签过长

lvhao 2 giorni fa
parent
commit
cea3dec593
1 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. 4 3
      core/CoreApp/controllers/Amazonbarcode.php

+ 4 - 3
core/CoreApp/controllers/Amazonbarcode.php

@@ -213,7 +213,7 @@ class Amazonbarcode extends Start_Controller {
 			{
 				echo json_encode(array('msg'=>'此单已打印,无法修改!','success'=>false));exit;
 			}
-			if(strlen($post['number'])){
+			if(strlen($post['number']) > 25){
 				echo json_encode(array('msg'=>'条码超出25位无法有效打印!','success'=>false));exit;
 			}
 			if($this->amazonbarcode->save($post,$id))
@@ -375,14 +375,15 @@ class Amazonbarcode extends Start_Controller {
 				$post['label2'] =  ($value['2'])?$value['2']:'';
 				$post['num'] =  $value['3'];
 				$post['addtime'] =  $time;
+				
 				if(!is_numeric($post['num']))
 				{
 					$ed[] = array($key.' 行,非数字!');
 					$j++;
 					continue;
 				}
-				if(strlen($post['number'])){
-					$ed[] = array($key.' 行,条码超出25位!');
+				if(strlen($value['0']) > 25){
+					$ed[] = array($value['0']."--".$key.' 行,条码超出25位!');
 					$j++;
 					continue;
 				}