lvhao 20 часов назад
Родитель
Сommit
18e91e7fda
2 измененных файлов с 148 добавлено и 0 удалено
  1. 97 0
      core/CoreApp/controllers/Workshopshow.php
  2. 51 0
      template/erp/workshopshow_cjzcsl.html

+ 97 - 0
core/CoreApp/controllers/Workshopshow.php

@@ -45,6 +45,8 @@ class Workshopshow extends Start_Controller
             $this->_wfhshow();
         }elseif($arg == 'gcjscsshow'){
             $this->_gcjscsshow();
+        }elseif($arg == 'cjzcsl'){
+            $this->_cjzcsl();
         }else {
             $this->_index();
         }  
@@ -1026,4 +1028,99 @@ class Workshopshow extends Start_Controller
         }
     }
 
+    private function _cjzcsl(){
+        if($this->input->method() == 'post'){
+            $page = $this->input->post('page',true);
+		    $perpage = $this->input->post('perpage',true);
+            $lx = $this->input->post('lx',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("extra_type",1);//美国销售
+            $this->db->order_by('id','desc');
+            $this->db->select("id,number,pm,shipremarks,printtime,time,ctime12");
+            $list = $this->db->get('whlabel_bh')->result_array();
+            $orderinfos = array_column($list,'orderinfo');
+            
+            $this->db->where_in('orderinfo',$orderinfos);
+            $this->db->like('rk', '|'.$lx.'|','before');
+            $this->db->where('rk != ck');
+            $this->db->select("orderinfo,rk,ck");
+            $info_list = $this->db->get('whlabel_bh_transfer')->result_array();
+
+
+
+
+
+            $operate_list = $this->transfer->find_all(" 1 = 1 ");
+            $operate_list = array_column($operate_list, 'title', 'id');
+            foreach($info_list as $key=>$value){
+                $info_list[$key]['printtime'] = date('Y-m-d H:i',$value['printtime']);
+                $info_list[$key]['time'] = "布标打印 :".date('Y-m-d H:i',$value['ctime12'])."<br>";
+                $cr_list = $this->systemtransfer_cr->find_all("fid = '".$value['id']."'");
+                foreach($cr_list as $k=>$v){
+                    $type = ($v['type']==1)?'入库':'出库';
+                    $operate_name = isset($operate_list[$v['lx']])?$operate_list[$v['lx']]:'';
+                    if($v['orver_flag'] == 1){
+						if($v['is_over'] == 0){
+							$info_list[$key]['time'] .= "<a href='javascript:void(0);' style='color:#90f'>".$operate_name.$type.' :'.date('Y-m-d H:i',$v['time']) ." <l style='font-weight:900;'>即将超时 </l></a>";
+							// $info_list[$key]['time'] .= '<i style="padding:10px;color:#90f;font-weight:bold;"> 即将超时</i>'.'<br>';
+						}else{
+							$info_list[$key]['time'] .= "<a href='javascript:void(0);' style='color:#000'>".$operate_name.$type.' :'.date('Y-m-d H:i',$v['time']) ."</a>";
+						}
+					}elseif($v['orver_flag'] == 2){
+						$info_list[$key]['time'] .= "<a href='javascript:void(0);' style='color:#f33'>".$operate_name.$type.' :'.date('Y-m-d H:i',$v['time']) ." <l font-weight:900'>超时! </l></a>";
+					}elseif($v['orver_flag'] == 3){
+						$info_list[$key]['time'] .= "<a href='javascript:void(0);' style='color:#06f'>".$operate_name.$type.' :'.date('Y-m-d H:i',$v['time']) ." <l font-weight:900'>【该单已取消】 </l></a>";
+					}elseif(($v['orver_flag'] == 0)&&(empty($v['lx']))){
+						$info_list[$key]['time'] .= "<a href='javascript:void(0);' style='color:red'>订单已完成:".date('Y-m-d H:i',$v['time']) ."</a>";
+					}else{
+						$info_list[$key]['time'] .= "<a  href='javascript:void(0);' style='color:#000'>".$operate_name.$type.' :'.date('Y-m-d H:i',$v['time']) ."</a>";
+					}
+
+					if($v['extra_status'] == 1){
+						$info_list[$key]['time'] .= "<a href='javascript:void(0);' style='color:#90f'>【下道工序未及时入库】</a><br>";
+					}elseif($v['extra_status'] == 2 || $v['extra_status'] == 3){
+						$info_list[$key]['time'] .= "<a href='javascript:void(0);' style='color:#A52A2A'>【工序间流转超过3天】</a><br>";
+					}else{
+						$info_list[$key]['time'] .= "<br>";
+					}
+                }
+
+				unset($info_list[$key]['ctime12']);
+            }
+            $this->db->where("time >= ",strtotime($timetkk));
+            $this->db->where("time < ",strtotime($timetjj));
+            $this->db->where('rk != ck');
+            $this->db->like('rk', '|'.$lx.'|','before');
+            $this->db->where("ycrk_type",0);
+            $total = $this->db->count_all_results('systemtransfer');
+
+		    $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{
+            $id = $this->input->get('id',true);
+            $this->data['lx'] = $id;
+            $this->_Template('workshopshow_cjzcsl', $this->data);
+        }
+    }
+
 }

+ 51 - 0
template/erp/workshopshow_cjzcsl.html

@@ -0,0 +1,51 @@
+{Template header}
+<body>
+<div class="warp">
+<div class="fixed">
+<ul class="search" >
+
+<li>
+    <input id="timetk"  value="{date('Y-m-d', strtotime('-2 month'))} 00:00" name="timetkk" type="text" onclick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})">
+        至&nbsp;&nbsp;&nbsp;&nbsp; 
+    <input id="timetj" value="{date('Y-m-d H:i',time())}" name="timetjj" type="text" onclick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})"></li>
+    <input type="hidden" name="lx" value="{$lx}">
+    <li><span>确 定</span></li>
+</ul>
+
+
+<table class="datatitle data" border="0" style="border-collapse:collapse;">
+<tr>
+<td><label onClick="swapCheck()"><input name="checkbox" type="checkbox" class="regular-checkbox"></label></td>
+<td>编码</td>
+<td>品名</td>
+<td>备注</td>
+<td>打印时间</td>
+<td>操作时间</td>
+
+</tr>
+</table>
+</div>
+<table class="datatext data" border="0" style="border-collapse:collapse;">
+</table>
+<div class="bomf"></div>
+</div>
+<script>
+var dataurl = "/workshopshow/cjzcsl";
+var editurl = "/workshopshow/cjzcsl";
+// var editdj = 1;
+// var editt = "用户管理 - 修改";
+var customon = 1;
+function custom(){
+$(".data tr").each(function() {
+    $(this).find('td:eq(0)').css("width","1%");
+    $(this).find('td:eq(1)').css("width","11%");
+    $(this).find('td:eq(2)').css("width","25%");
+    $(this).find('td:eq(3)').css("width","25%");
+    $(this).find('td:eq(4)').css("width","10%");
+    $(this).find('td:eq(5)').css("width","10%");
+    $(this).find('td:eq(6)').css("width","15%");
+  
+});}
+
+</script>
+{Template footer}