Browse Source

【独立站出库浏览】页面待新增一个按产品ID筛选功能

lvhao 2 ngày trước cách đây
mục cha
commit
803300ddcd

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

@@ -2459,6 +2459,7 @@ class Whlabel extends Start_Controller
 			$print = $this->input->post('print', true);
 			$state = $this->input->post('state', true);
 			$orderurl = $this->input->post('orderurl', true);
+			$productid = $this->input->post('productid', true);
 			$timetk = strtotime($timetk);
 			$timetj = strtotime($timetj);
 			/**
@@ -2533,6 +2534,9 @@ class Whlabel extends Start_Controller
 				$url = $this->orderurl->read($orderurl);
 				$where  .= " and link like '%" . $url['url'] . "%'";
 			}
+			if($productid){
+				$where  .= " extra_price IS NOT NULL and JSON_SEARCH(extra_price, 'one', '".$productid."', NULL, '$[*].product_id') IS NOT NULL";
+			}
 			//数据排序
 			$order_str = "librarytime desc";
 			if (empty($page)) {

+ 1 - 0
template/erp/whlabel_outorder.html

@@ -71,6 +71,7 @@
 {loop $orderurl as $val}
 <option value="{$val['id']}">{$val['title']} - {$val['url']}</option>
 {/loop}</select></li>
+<li>产品ID:<input value="" name="productid" type="text" ></li>
 <li>选择时间条件:<select name="xztime" class="select">
 <option value="librarytime">出库时间</option>
 <option value="printtime">打印时间</option>