|
@@ -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'];
|