lvhao 2 dni temu
rodzic
commit
b42eab1e58

+ 29 - 2
core/CoreApp/controllers/Whlabel_bh.php

@@ -2027,7 +2027,19 @@ class Whlabel_bh extends Start_Controller {
 		if($post){
 			$page = $this->input->post('page',true);
 		    $perpage = $this->input->post('perpage',true);
-			$where = "";
+			$where = " extra_type = 1 ";
+			$orderinfo = $this->input->post('orderinfo',true);
+			$timetk = $this->input->post('timetk',true);
+			$timetj = $this->input->post('timetj',true);
+			$timetk = strtotime($timetk);
+			$timetj = strtotime($timetj);
+			if($timetk && $timetj)
+            {
+                $where .= " and time > '$timetk' and time < '$timetj'";
+            }
+			if($orderinfo){
+				$where.= " and orderinfo like '%$orderinfo%' ";
+			}
 			if(empty($page))
 		    {
                 $start = 0;
@@ -2041,7 +2053,7 @@ class Whlabel_bh extends Start_Controller {
 
 			$rows = [];
 			foreach($list as $k=>$v){
-				$list = $this->whlabel_bh_transfer->find_all(" orderinfo= '".$v['orderinfo']."'");
+				$list = $this->whlabel_bh_transfer->find_all(" wbid= '".$v['id']."'");
 				$ydysl = $wdysl = $yphsl = $yjgsj = $wwgsl = 0;
 				foreach($list as $vv){
 					$ydysl += 1;
@@ -2068,6 +2080,21 @@ class Whlabel_bh extends Start_Controller {
 			$rows = array('total'=>$total,'over'=>$over,'pagenum'=>$pagenum,'rows'=>($rows));
 			echo json_encode($rows);exit;
 		}
+		$start_time = strtotime(date('Y-m-d')) -  14* 24 * 60 * 60;
+		$end_time = strtotime(date('Y-m-d')) + 24 * 60 * 60;
+		$all_list = $this->whlabel_bh->find_all("extra_type = 1 and time >= ".$start_time." and time <= ".$end_time);
+		$orderinfo_list =[];
+		$total_num = 0;
+		foreach($all_list as $k=>$v){
+			$orderinfo_list[$v['id']] = $v['id'];
+			$total_num += $v['bhnum'];
+		}
+		$wbids = array_values($orderinfo_list);
+		$over_num = $this->whlabel_bh_transfer->find_count(" status = 2 and wbid in (".implode(",",$wbids).")");
+
+		$this->data['total_num'] = $total_num;
+		$this->data['wwcsl'] = $total_num - $over_num;
+
 		$this->_Template('whlabel_bh_transfer_log',$this->data);
 	}
 

+ 3 - 0
template/erp/whlabel_bh_transfer_log.html

@@ -7,6 +7,9 @@
 <li>扫描时间:<input id="timetk"  value="{date('Y-m-d',time()-14*24*3600)} 0:00" name="timetk" type="text" onClick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})">
 	至&nbsp;&nbsp;&nbsp;&nbsp; <input id="timetj" value="{date('Y-m-d',time()+24*3600)} 0:00" name="timetj" type="text" onClick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})"></li>
 <li><span>确 定</span></li>
+<li style="margin-right: 30px;">
+    <font class="cona " style="color:#fff;background-color: #f33;">未完成({$wwcsl})</font>
+</li>
 </ul>
 
 <table class="datatitle data" border="0" style="border-collapse:collapse;">