Sfoglia il codice sorgente

提交测许昌和美仓

lvhao 6 mesi fa
parent
commit
d99491ff6e
2 ha cambiato i file con 47 aggiunte e 22 eliminazioni
  1. 38 22
      core/CoreApp/controllers/Whlabel.php
  2. 9 0
      template/erp/whlabel_typedy.html

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

@@ -595,12 +595,38 @@ class Whlabel extends Start_Controller {
 			$details = $this->input->post('details',true);
 			$state = $this->input->post('state',true);
 			$lacecolor = $this->input->post('lacecolor',true);
+			$hairnumber = $this->input->post('hairnumber',true);
 			$cklx = $this->input->post('cklx',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($usa)
+            {
+				if(!$warehouse)
+				{
+                    $where  .= " and (warehouse = '5' or warehouse = '8')";
+				}
+            }
+			if($warehouse)
+            {
+                $where  .= " and warehouse = '$warehouse'";
+            }
+			if($details)
+            {
+                $where  .= " and details = '$details'";
+            }
+			if($purchase)
+            {
+                $where  .= " and purchase = '$purchase'";
+            }
+			if($state)
+            {
+                $where  .= " and state = '$state'";
+            }
+
 			if($lacetype)
             {
                 $where  .= " and features like '%-$lacetype-%'";
@@ -637,29 +663,19 @@ class Whlabel extends Start_Controller {
             {
                 $where  .= " and features like '%-$lacecolor-%'";
             }
-			if($usa)
-            {
-				if(!$warehouse)
-				{
-                    $where  .= " and (warehouse = '5' or warehouse = '8')";
+			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-%'";
 				}
-            }
-			if($warehouse)
-            {
-                $where  .= " and warehouse = '$warehouse'";
-            }
-			if($details)
-            {
-                $where  .= " and details = '$details'";
-            }
-			if($purchase)
-            {
-                $where  .= " and purchase = '$purchase'";
-            }
-			if($state)
-            {
-                $where  .= " and state = '$state'";
-            }
+
+			}
+
 			$where_add = '';
 			if($cklx)
             {

+ 9 - 0
template/erp/whlabel_typedy.html

@@ -54,6 +54,15 @@
 
 <li>商品名称:<input value="" name="title" type="text" style="width:400px"></li>
 <li>备注:<input value="" name="cpbz" type="text" style="width:270px"></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="state" class="select">
 <option value="0">在库</option>
 <!--