瀏覽代碼

修改美仓的相关信息

lvhao 1 月之前
父節點
當前提交
a14e75a1d0
共有 2 個文件被更改,包括 34 次插入9 次删除
  1. 18 4
      core/CoreApp/controllers/Whlabel.php
  2. 16 5
      template/erp/whlabel_typedy.html

+ 18 - 4
core/CoreApp/controllers/Whlabel.php

@@ -464,6 +464,9 @@ class Whlabel extends Start_Controller
 			$cklx = $this->input->post('cklx', true);
 			$ktime = $this->input->post('ktime', true);
 			$jtime = $this->input->post('jtime', true);
+			$sm = $this->input->post('sm', true);
+			$cpbz = $this->input->post('cpbz', true);
+			$type = $this->input->post('type', true);
 			$ktime = strtotime($ktime);
 			$jtime = strtotime($jtime);
 			$where = "1=1";
@@ -515,6 +518,15 @@ class Whlabel extends Start_Controller
 			if ($lacecolor) {
 				$where  .= " and features like '%-$lacecolor-%'";
 			}
+			if($sm){
+				$where .= " and  sm like '%".$sm."%'";
+			}
+			if($cpbz){
+				$where .= " and  cpbz like '%".$cpbz."%'";
+			}
+			if($type){
+				$where .= " and  type = ".$type."";
+			}
 			if (!empty($hairnumber)) {
 				$where  .= " and  features like '%-128-%' ";
 				if ($hairnumber < 0) {
@@ -544,19 +556,20 @@ class Whlabel extends Start_Controller
 			} else {
 				$start = ($page - 1) * $perpage;
 			}
+			//这里为了对应前端界面的字段 新添加了label字段 后续代码会替换为sm字段
 			if ($sku) {
 				$sku = trim($sku, ' ');
 				$sku = trim($sku, '	');
 				$where  .= " and sku like '%$sku%'";
-				$info_list = $this->whlabel->find_pc($where . $where_add, 'sku,features,warehouse', 'id,warehouse,purchase,sku,title,details,shop,cpbz,features,number,sm', $order_str, $start, $perpage);
+				$info_list = $this->whlabel->find_pc($where . $where_add, 'sku,features,warehouse', 'id,warehouse,purchase,sku,title,details,shop,cpbz,label,features,number,sm', $order_str, $start, $perpage);
 			} else if ($title) {
 				$title = trim($title, ' ');
 				$title = trim($title, '	');
 				$where  .= " and title like '%$title%'";
-				$info_list = $this->whlabel->find_pc($where . $where_add, 'sku,features,warehouse', 'id,warehouse,purchase,sku,title,details,shop,cpbz,features,number,sm', $order_str, $start, $perpage);
+				$info_list = $this->whlabel->find_pc($where . $where_add, 'sku,features,warehouse', 'id,warehouse,purchase,sku,title,details,shop,cpbz,label,features,number,sm', $order_str, $start, $perpage);
 			} else {
 				//$where  .= " and time > '$ktime' and time < '$jtime'";
-				$info_list = $this->whlabel->find_pc($where . $where_add, 'sku,features,warehouse', 'id,warehouse,purchase,sku,title,details,shop,cpbz,features,number,sm', $order_str, $start, $perpage);
+				$info_list = $this->whlabel->find_pc($where . $where_add, 'sku,features,warehouse', 'id,warehouse,purchase,sku,title,details,shop,cpbz,label,features,number,sm', $order_str, $start, $perpage);
 			}
 
 
@@ -577,7 +590,8 @@ class Whlabel extends Start_Controller
 				$info_list[$key]['purchase'] = (isset($prc[$value['purchase']])) ? $prc[$value['purchase']] : '未知';
 				$c = $this->whlabel->find_all($where . ' and sku = "' . $value['sku'] . '" and state = 0 and warehouse = "' . $value['warehouse'] . '" and features = "' . $value['features'] . '"', 'details,cpid');
 				$z = $this->whlabel->find_all($where . ' and sku = "' . $value['sku'] . '" and zd != "" and state = 0 and warehouse = "' . $value['warehouse'] . '" and features = "' . $value['features'] . '"');
-				$info_list[$key]['cpbz'] = '<p>' . $value['cpbz'] . '</p><p>' . $value['sm'] . '</p>';
+				$info_list[$key]['cpbz'] = $value['cpbz'] ; 
+				$info_list[$key]['label'] = $value['sm'];
 				$number = $value['number'];
 				$ftime = time() - 15 * 24 * 3600;
 				$info_list[$key]['warehouse'] = $warehouse['title'];

+ 16 - 5
template/erp/whlabel_typedy.html

@@ -59,11 +59,20 @@
 <option value="{$val['id']}">{$val['shopname']}</option>
 {/loop}
 </select></li>
+<li>
+    类型  :<select name="type" class="select">
+        <option value="">全部</option>
+        {loop whlabel_type(100) as $val}
+        <option value="{$val['id']}">{$val['title']}</option>
+        {/loop}
+        </select>
+</li>
 <li>SKU:<input value="" name="sku" type="text" style="width:400px"></li>
 
-<li>商品名称:<input value="" name="title" type="text" style="width:400px"></li>
-<li>备注:<input value="" name="cpbz" type="text" style="width:270px"></li>
 
+<li>商品名称:<input value="" name="title" type="text" style="width:400px"></li>
+<li>备注:<input value="" name="cpbz" type="text" style="width:120px"></li>
+<li>说明:<input value="" name="sm" type="text" style="width:120px"></li>
 <li>状态:<select name="state" class="select">
 <option value="0">在库</option>
 <!--
@@ -85,6 +94,7 @@
 <td>位置及编码</td>
 <td>品牌</td>
 <td>备注</td>
+<td>说明</td>
 <td>库存</td>
 <td>在途</td>
 <td>占单</td>
@@ -103,14 +113,15 @@ function custom(){
 $(".data tr").each(function() {
 $(this).find('td:eq(1)').css("width","6%");
 $(this).find('td:eq(2)').css("width","8%");
-$(this).find('td:eq(3)').css("width","15%");
+$(this).find('td:eq(3)').css("width","10%");
 $(this).find('td:eq(4)').css("width","24%");
 $(this).find('td:eq(5)').css("width","11%");
 $(this).find('td:eq(6)').css("width","6%");
 $(this).find('td:eq(7)').css("width","10%");
 $(this).find('td:eq(8)').css("width","5%");
-$(this).find('td:eq(9)').css("width","10%");
-$(this).find('td:eq(10)').css("width","5%");
+$(this).find('td:eq(9)').css("width","5%");
+$(this).find('td:eq(10)').css("width","10%");
+$(this).find('td:eq(11)').css("width","5%");
 });}
 $("select[name=dccz]").change(function(){
 	if($(this).find("option:selected").val() == "")