|
@@ -18,6 +18,7 @@ class Whlabelfz extends Start_Controller
|
|
|
$this->load->_model("Model_whlabellabel","whlabellabel");
|
|
$this->load->_model("Model_whlabellabel","whlabellabel");
|
|
|
$this->load->_model("Model_logic_zhlp",'logic_zhlp');
|
|
$this->load->_model("Model_logic_zhlp",'logic_zhlp');
|
|
|
$this->load->_model("Model_whlabellabelprint","whlabellabelprint");
|
|
$this->load->_model("Model_whlabellabelprint","whlabellabelprint");
|
|
|
|
|
+ $this->load->_model("Model_whlabelscanlog","whlabelscanlog");
|
|
|
}
|
|
}
|
|
|
//定义方法的调用规则 获取URI第二段值
|
|
//定义方法的调用规则 获取URI第二段值
|
|
|
public function _remap($arg, $arg_array)
|
|
public function _remap($arg, $arg_array)
|
|
@@ -44,6 +45,8 @@ class Whlabelfz extends Start_Controller
|
|
|
$this->_bqpladd();
|
|
$this->_bqpladd();
|
|
|
}elseif($arg == 'printing'){
|
|
}elseif($arg == 'printing'){
|
|
|
$this->_printing();
|
|
$this->_printing();
|
|
|
|
|
+ }elseif($arg == 'whlabelscan'){
|
|
|
|
|
+ $this->_whlabelscan();
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
$this->_index();
|
|
$this->_index();
|
|
@@ -925,4 +928,64 @@ class Whlabelfz extends Start_Controller
|
|
|
|
|
|
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
|
|
+ private function _whlabelscan(){
|
|
|
|
|
+ if($this->input->method() == 'post'){
|
|
|
|
|
+ $page = $this->input->post('page',true);
|
|
|
|
|
+ $perpage = $this->input->post('perpage',true);
|
|
|
|
|
+ $title = $this->input->post('title',true);
|
|
|
|
|
+ $sku = $this->input->post('sku',true);
|
|
|
|
|
+ $type = $this->input->post('type',true);
|
|
|
|
|
+ $timetk = $this->input->post('timetk',true);
|
|
|
|
|
+ $timetj = $this->input->post('timetj',true);
|
|
|
|
|
+ $timetk = strtotime($timetk);
|
|
|
|
|
+ $timetj = strtotime($timetj);
|
|
|
|
|
+ if($timetk && $timetj)
|
|
|
|
|
+ {
|
|
|
|
|
+ $where = " addtime > '$timetk' and addtime < '$timetj'";
|
|
|
|
|
+ }
|
|
|
|
|
+ if($type){
|
|
|
|
|
+ $where .= " and type = '$type'";
|
|
|
|
|
+ }
|
|
|
|
|
+ if($title){
|
|
|
|
|
+ $where .= " and title like '%$title%'";
|
|
|
|
|
+ }
|
|
|
|
|
+ if($sku){
|
|
|
|
|
+ $where .= " and sku like '%$sku%'";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //数据排序
|
|
|
|
|
+ $order_str = "id desc";
|
|
|
|
|
+ if(empty($page))
|
|
|
|
|
+ {
|
|
|
|
|
+ $start = 0;
|
|
|
|
|
+ $perpage = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ $start = ($page - 1)*$perpage;
|
|
|
|
|
+ }
|
|
|
|
|
+ // $purchase_list = $this->purchase->find_all("1 = 1","id,title");
|
|
|
|
|
+ // $purchase_list = array_column($purchase_list,'title','id');
|
|
|
|
|
+
|
|
|
|
|
+ //取得信息列表
|
|
|
|
|
+ $info_list = $this->whlabelscanlog->find_all($where,'id,sku,title,warehouse,type,num,addtime',$order_str,$start,$perpage);
|
|
|
|
|
+ foreach ($info_list as $key=>$value)
|
|
|
|
|
+ {
|
|
|
|
|
+ $info_list[$key]['warehouse'] = $this->_getWarehouseById($value['warehouse']);
|
|
|
|
|
+ $info_list[$key]['type'] = $value['type'] == 1 ? '扫描入库' : '扫描出库';
|
|
|
|
|
+ $info_list[$key]['addtime'] = date('Y-m-d H:i:s', $value['addtime']);
|
|
|
|
|
+ }
|
|
|
|
|
+ $total = $this->whlabelscanlog->find_count($where);
|
|
|
|
|
+ $pagenum = ceil($total/$perpage);
|
|
|
|
|
+ $over = $total-($start+$perpage);
|
|
|
|
|
+ $rows = array('total'=>$total,'over'=>$over,'pagenum'=>$pagenum,'rows'=>($info_list));
|
|
|
|
|
+ echo json_encode($rows);exit;
|
|
|
|
|
+
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $type = $this->input->get('type');
|
|
|
|
|
+ $this->data['type'] = $type;
|
|
|
|
|
+
|
|
|
|
|
+ $this->_Template('whlabelfz_whlabelscan', $this->data);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|