Quellcode durchsuchen

修改亚马逊打印的条码位数 从25 转化到30位

lvhao vor 1 Tag
Ursprung
Commit
d2e6e3dfba
1 geänderte Dateien mit 11 neuen und 11 gelöschten Zeilen
  1. 11 11
      core/CoreApp/controllers/Amazonbarcode.php

+ 11 - 11
core/CoreApp/controllers/Amazonbarcode.php

@@ -213,9 +213,9 @@ class Amazonbarcode extends Start_Controller {
 			{
 				echo json_encode(array('msg'=>'此单已打印,无法修改!','success'=>false));exit;
 			}
-// 			if(strlen($post['number']) > 25){
-// 				echo json_encode(array('msg'=>'条码超出25位无法有效打印!','success'=>false));exit;
-// 			}
+			if(strlen($post['number']) > 30){
+				echo json_encode(array('msg'=>'条码超出30位无法有效打印!','success'=>false));exit;
+			}
 			if($this->amazonbarcode->save($post,$id))
         	{
          		echo json_encode(array('msg'=>'修改成功','success'=>true));exit;
@@ -275,9 +275,9 @@ class Amazonbarcode extends Start_Controller {
 			}
 			$text = array();$text['data'] = array();$time = time();
 			$data = $this->amazonbarcode->read($va[$n]);
-// 			if(strlen($data['number']) > 25){
-// 				echo json_encode(array('msg'=>'打印条码超过25位,系统不支持!','success'=>false));exit;
-// 			}
+			if(strlen($data['number']) > 30){
+				echo json_encode(array('msg'=>'打印条码超过30位,系统不支持!','success'=>false));exit;
+			}
 			$rows = array('number'=>$data['number'],'label'=>$data['label'],'label2'=>$data['label2'],'num'=>$sl,'data'=>$v,'n'=>$n-1,'bfb'=>$bfb);
 			if($this->amazonbarcode->save(array('print'=>1,'time'=>$time),$data['id']))
         	{
@@ -392,11 +392,11 @@ class Amazonbarcode extends Start_Controller {
 					$j++;
 					continue;
 				}
-				// if(strlen($value['0']) > 25){
-				// 	$ed[] = array($value['0']."--".$key.' 行,条码字符数不可超过25!');
-				// 	$j++;
-				// 	continue;
-				// }
+				if(strlen($value['0']) > 30){
+					$ed[] = array($value['0']."--".$key.' 行,条码字符数不可超过30!');
+					$j++;
+					continue;
+				}
 				if($post['num'] < 1)
 				{
 					$ed[] = array($key.' 行,数量错误!');