|
@@ -37,6 +37,8 @@ class Workshopshow extends Start_Controller
|
|
|
$this->_ycsshow();
|
|
$this->_ycsshow();
|
|
|
}elseif($arg == 'gxlzc3show'){
|
|
}elseif($arg == 'gxlzc3show'){
|
|
|
$this->_gxlzc3show();
|
|
$this->_gxlzc3show();
|
|
|
|
|
+ }elseif($arg == 'xdgxwjsrkshow'){
|
|
|
|
|
+ $this->_xdgxwjsrkshow();
|
|
|
}else {
|
|
}else {
|
|
|
$this->_index();
|
|
$this->_index();
|
|
|
}
|
|
}
|
|
@@ -709,7 +711,97 @@ class Workshopshow extends Start_Controller
|
|
|
}
|
|
}
|
|
|
// 下道工序未及时入库单
|
|
// 下道工序未及时入库单
|
|
|
private function _xdgxwjsrkshow(){
|
|
private function _xdgxwjsrkshow(){
|
|
|
|
|
+ if($this->input->method() == 'post'){
|
|
|
|
|
+
|
|
|
|
|
+ $page = $this->input->post('page',true);
|
|
|
|
|
+ $perpage = $this->input->post('perpage',true);
|
|
|
|
|
+
|
|
|
|
|
+ $timetkk = $this->input->post('timetkk',true);
|
|
|
|
|
+ $timetjj = $this->input->post('timetjj',true);
|
|
|
|
|
+
|
|
|
|
|
+ if(empty($page))
|
|
|
|
|
+ {
|
|
|
|
|
+ $start = 0;
|
|
|
|
|
+ $perpage = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ $start = ($page - 1)*$perpage;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ $this->db->where("time >= ",strtotime($timetkk));
|
|
|
|
|
+ $this->db->where("time < ",strtotime($timetjj));
|
|
|
|
|
+ $this->db->where("ycrk_type",0);
|
|
|
|
|
+ $this->db->where_in('extra_status',[1,2]);
|
|
|
|
|
+ $this->db->order_by('id','desc');
|
|
|
|
|
+ $this->db->group_by('fid');
|
|
|
|
|
+ $this->db->limit($perpage,$start);
|
|
|
|
|
+ $info_list = $this->db->get('systemtransfer_cr');
|
|
|
|
|
+ $list = $info_list->result_array();
|
|
|
|
|
+
|
|
|
|
|
+ $transfer_list = $this->transfer->find_all();
|
|
|
|
|
+ $t = $transfer_list = array_column($transfer_list, 'title', 'id');
|
|
|
|
|
+
|
|
|
|
|
+ $final_list = [];
|
|
|
|
|
+ foreach ($list as $key => $value) {
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
+ $info = $this->systemtransfer->read($value['fid']);
|
|
|
|
|
+ $final_list[$key]['id'] = $value['id'];
|
|
|
|
|
+ $final_list[$key]['number'] = isset($info['number'])?$info['number']:'';
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ $final_list[$key]['pm'] = $info['pm'];
|
|
|
|
|
+ $final_list[$key]['shipremarks'] = $info['shipremarks'];
|
|
|
|
|
+ $final_list[$key]['printtime'] = date('Y-m-d H:i:s',$info['printtime']);
|
|
|
|
|
+
|
|
|
|
|
+ $data = $this->systemtransfer_cr->find_all("fid = '".$info['id']."'");
|
|
|
|
|
+
|
|
|
|
|
+ $final_list[$key]['time'] = "布标打印 :".date('Y-m-d H:i',$info['ctime12']).'<br>';
|
|
|
|
|
+ foreach ($data as $k=>$v)
|
|
|
|
|
+ {
|
|
|
|
|
+ $type = ($v['type']==1)?'入库':'出库';
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if($v['orver_flag'] == 1){
|
|
|
|
|
+ if($v['is_over'] == 0){
|
|
|
|
|
+ $final_list[$key]['time'] .= "<a href='javascript:void(0);' style='color:#90f'>".$t[$v['lx']].$type.' :'.date('Y-m-d H:i',$v['time']) ." <l style='padding-left:10px;font-weight:900;'> 即将超时 </l></a>";
|
|
|
|
|
+ // $info_list[$key]['time'] .= '<i style="padding:10px;color:#90f;font-weight:bold;"> 即将超时</i>'.'<br>';
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $final_list[$key]['time'] .= "<a href='javascript:void(0);' style='color:#000'>".$t[$v['lx']].$type.' :'.date('Y-m-d H:i',$v['time']) ."</a>";
|
|
|
|
|
+ }
|
|
|
|
|
+ }elseif($v['orver_flag'] == 2){
|
|
|
|
|
+ $final_list[$key]['time'] .= "<a href='javascript:void(0);' style='color:#f33'>".$t[$v['lx']].$type.' :'.date('Y-m-d H:i',$v['time']) ." <l style='padding-left:10px;font-weight:900'> 超 时 ! </l></a>";
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $final_list[$key]['time'] .= "<a href='javascript:void(0);' style='color:#000'>".$t[$v['lx']].$type.' :'.date('Y-m-d H:i',$v['time']) ."</a>";
|
|
|
|
|
+ }
|
|
|
|
|
+ if($v['extra_status'] == 1){
|
|
|
|
|
+ $final_list[$key]['time'] .= "<a href='javascript:void(0);' style='color:#90f'>【下道工序未及时入库】</a><br>";
|
|
|
|
|
+ }elseif($v['extra_status'] == 2 || $v['extra_status'] == 3){
|
|
|
|
|
+ $final_list[$key]['time'] .= "<a href='javascript:void(0);' style='color:#A52A2A'>【工序间流转超过3天】</a><br>";
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $final_list[$key]['time'] .= "<br>";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $final_list[$key]['time'] = trim($final_list[$key]['time'],'<br>');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ $this->db->where("time >= ",strtotime($timetkk));
|
|
|
|
|
+ $this->db->where("time < ",strtotime($timetjj));
|
|
|
|
|
+ $this->db->where("ycrk_type",0);
|
|
|
|
|
+ $this->db->where_in('extra_status',[1,2]);
|
|
|
|
|
+ $this->db->group_by('fid');
|
|
|
|
|
+ $total = $this->db->count_all_results('systemtransfer_cr');
|
|
|
|
|
+
|
|
|
|
|
+ $pagenum = ceil($total/$perpage);
|
|
|
|
|
+ $over = $total-($start+$perpage);
|
|
|
|
|
+ $rows = array('total'=>$total,'over'=>$over,'pagenum'=>$pagenum,'rows'=>($final_list));
|
|
|
|
|
+ echo json_encode($rows);exit;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ $this->_Template('workshopshow_xdgxwjsrkshow', $this->data);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
// 打印超7天未出货单
|
|
// 打印超7天未出货单
|
|
|
private function _dyc7twchshow(){
|
|
private function _dyc7twchshow(){
|