Quellcode durchsuchen

测试进销存筛选人发头套类型

lvhao vor 6 Monaten
Ursprung
Commit
46bbc68ca8
2 geänderte Dateien mit 68 neuen und 38 gelöschten Zeilen
  1. 58 38
      core/CoreApp/controllers/Whlabel.php
  2. 10 0
      template/erp/whlabel_type.html

+ 58 - 38
core/CoreApp/controllers/Whlabel.php

@@ -1403,44 +1403,14 @@ class Whlabel extends Start_Controller {
 			$state = $this->input->post('state',true);
 			$shop = $this->input->post('shop',true);
 			$lacecolor = $this->input->post('lacecolor',true);
+			$hairnumber = $this->input->post('hairnumber',true);
 			$type = $this->input->post('type',true);
 			$ktime = $this->input->post('ktime',true);
 			$jtime = $this->input->post('jtime',true);
 			$ktime = strtotime($ktime);
 			$jtime = strtotime($jtime);
 			$where = "1=1";$gj = "";$ck = "";
-			if($lacetype)
-            {
-                $where  .= " and features like '%-$lacetype-%'";
-            }
-			if($category)
-            {
-                $where  .= " and features like '%-$category-%'";
-            }
-			if($size)
-            {
-                $where  .= " and features like '%-$size-%'";
-            }
-			if($grade)
-            {
-                $where  .= " and features like '%-$grade-%'";
-            }
-			if($color)
-            {
-                $where  .= " and features like '%-$color-%'";
-            }
-			if($lowe)
-            {
-                $where  .= " and features like '%-$lowe-%'";
-            }
-			if($haircap)
-            {
-                $where  .= " and features like '%-$haircap-%'";
-            }
-			if($density)
-            {
-                $where  .= " and features like '%-$density-%'";
-            }
+			
 			if($usa)
             {
 				if(!$warehouse)
@@ -1468,10 +1438,7 @@ class Whlabel extends Start_Controller {
             {
                 $where  .= " and shop like '%$shop%'";
             }
-			if($lacecolor)
-            {
-                $where  .= " and features like '%-$lacecolor-%'";
-            }
+			
 			if($type)
             {
                 $where  .= " and type = '$type'";
@@ -1481,6 +1448,59 @@ class Whlabel extends Start_Controller {
                 $gj  = " and enter > '$ktime' and enter < '$jtime'";
 				$ck  = " and outk > '$ktime' and outk < '$jtime'";
             }
+
+
+			if($lacecolor)
+            {
+                $where  .= " and features like '%-$lacecolor-%'";
+            }
+			if($lacetype)
+            {
+                $where  .= " and features like '%-$lacetype-%'";
+            }
+			if($category)
+            {
+                $where  .= " and features like '%-$category-%'";
+            }
+			if($size)
+            {
+                $where  .= " and features like '%-$size-%'";
+            }
+			if($grade)
+            {
+                $where  .= " and features like '%-$grade-%'";
+            }
+			if($color)
+            {
+                $where  .= " and features like '%-$color-%'";
+            }
+			if($lowe)
+            {
+                $where  .= " and features like '%-$lowe-%'";
+            }
+			if($haircap)
+            {
+                $where  .= " and features like '%-$haircap-%'";
+            }
+			if($density)
+            {
+                $where  .= " and features like '%-$density-%'";
+            }
+			if(!empty($hairnumber)){
+				$where  .= " and  features like '%-128-%' ";
+				if($hairnumber < 0){
+					$class_list = $this->typeclass->find_all('classid = 43');
+					foreach($class_list as $v){
+						$where .= " and  features not like '%-".$v['id']."-%'";
+					}
+				}else{
+					$where  .= " and features like '%-$hairnumber-%'";
+				}
+
+			}
+
+
+
             //数据排序
             $order_str = "id desc";
             if(empty($page))
@@ -1511,7 +1531,7 @@ class Whlabel extends Start_Controller {
 			{
 				$wt[$v['id']] = $v['title'];
 			}
-			
+		
 			//$where  .= " and time > '$ktime' and time < '$jtime'";
 			$info_list = $this->whlabel->find_pc($where.$fjnr,'sku,purchase,features,warehouse','id,warehouse,purchase,sku,title,details,shop,cpbz,type,features,number,sm',$order_str,$start,$perpage);//改这需要修改_gbhtype
 			
@@ -2927,7 +2947,7 @@ class Whlabel extends Start_Controller {
 		{
 			$pid .= " id = ".$v." or";
 		}
-		$fullorderexcel = $this->fullorderexcel->find_all("type = '100002' and (".rtrim($pid,'or').")",'*','idorder desc');//导出模板
+		$fullorderexcel = $this->fullorderexcel->find_all("1 = 1",'*','idorder desc');//导出模板
 		$this->data['fullorderexcel'] = $fullorderexcel;
 		$orderurl = $this->orderurl->find_all(rtrim($fgshop,'or'));
 		$this->data['orderurl'] = $orderurl;

+ 10 - 0
template/erp/whlabel_type.html

@@ -23,6 +23,16 @@
 {/if}
 {/loop}
 </select></li>
+<li>人发头套编号:<select name="hairnumber" class="select">
+    <option value="">请选择</option>
+    <option value="-1">无标签</option>
+    {loop typeclassyc(43) as $val}
+    
+    <option value="{$val['id']}">{$val['title']}</option>
+    {/loop}
+    </select>
+</li>
+
 <li>蕾丝颜色:<select name="lacecolor" class="select">
 <option value="">请选择</option>{loop typeclassyc(9) as $val}
 <option value="{$val['id']}">{$val['title']}</option>{/loop}</select></li>