lvhao пре 5 месеци
родитељ
комит
9be90e39e9
1 измењених фајлова са 45 додато и 1 уклоњено
  1. 45 1
      core/CoreApp/controllers/Boss.php

+ 45 - 1
core/CoreApp/controllers/Boss.php

@@ -1181,6 +1181,7 @@ class Boss extends Start_Controller {
 					$title = explode('|',$v);
 					$fg = str_replace(array('-163-','-164-','-165-','-166-','-0-','-126-','-127-','-128-','-197-','-195-'),'-',$title[0]);
 					$fg = explode(',',$fg);
+					$tmp_c = $this->getCate($title[0]);
 					//$fg = explode('-',trim($fg[1].$fg[0],'-'));
 					if(isset($fg[1])){
 						$fg = explode('-',trim($fg[1].$fg[0],'-'));
@@ -1261,7 +1262,7 @@ class Boss extends Start_Controller {
 							$wh = explode('-',$w[$k]);
 							$wsku = $this->whlabel->find_all("number = '".$wh[0]."' and sku != 'Preset'");
 							$whs = (isset($wsku[0]['sku']))?$wsku[0]['sku']:'';
-							$sp[$title[1]] = array('t'=>$title[1],'z'=>$zh,'w'=>$whs,'j'=>$jm,'n'=>$title[2],"warehouse"=>[
+							$sp[$title[1]] = array('t'=>$title[1],'z'=>$zh,'c'=>$tmp_c,'w'=>$whs,'j'=>$jm,'n'=>$title[2],"warehouse"=>[
 							        $val['type'] =>$title[2],
 							    ],"warehouse_show"=>"","xcc"=>0,"mc"=>0,"dzc"=>0,"qtc"=>0);
 							//美仓
@@ -1292,6 +1293,7 @@ class Boss extends Start_Controller {
             <tr>
             <td>名称</td>
 			<td>中文</td>
+			<td>类型</td>
 			<td>SKU</td>
 			<td>用友料号</td>
             <td>数量</td>
@@ -1306,6 +1308,48 @@ class Boss extends Start_Controller {
             $this->excel->get_fz2($sp,$titlename,$filename,$tail);
 		}
 	}
+	public function getCate($str){
+		//就是为了匹配类型的导出的一个定义数组
+		$lx_list = [
+			"126"=>"Hair Weaving - 发条",
+			"127"=>"Closure - 发块前头",
+			"128"=>"Wigs",
+			"130"=>"Hair Extension - 接发",
+			"131"=>"Gift - 礼物",
+			"133"=>"Accessories - 配件",
+			"1297"=>"Synthetic Wig - 化纤头套",
+			"1702"=>"Synthetic Hair - 化纤其它",
+		];
+		
+		if(stripos($str,'-126-') !== false){
+			$tmp_c = "Hair Weaving - 发条";
+		}elseif(stripos($str,'-127-') !== false){
+			$tmp_c = "Closure - 发块前头";
+		}
+		elseif(stripos($str,'-128-') !== false){
+			$tmp_c = "Wigs";
+		}
+		elseif(stripos($str,'-130-') !== false){
+			$tmp_c = "Hair Extension - 接发";
+		}
+		elseif(stripos($str,'-131-') !== false){
+			$tmp_c = "Gift - 礼物";
+		
+		}
+		elseif(stripos($str,'-133-') !== false){
+			$tmp_c = "Accessories - 配件";
+		}
+		elseif(stripos($str,'-1297-') !== false){
+			$tmp_c = "Synthetic Wig - 化纤头套";
+		}
+		elseif(stripos($str,'-1702-') !== false){
+			$tmp_c = "Synthetic Hair - 化纤其它";
+		}
+		else{
+			$tmp_c = "其他";
+		}
+		return $tmp_c;
+	}
 	
 	public function _setting()
 	{