lvhao 14 시간 전
부모
커밋
2a71291ce9
2개의 변경된 파일24개의 추가작업 그리고 4개의 파일을 삭제
  1. 7 3
      core/CoreApp/controllers/Whlabel_bh.php
  2. 17 1
      template/erp/whlabel_bh_cj_transfer_log.html

+ 7 - 3
core/CoreApp/controllers/Whlabel_bh.php

@@ -2246,8 +2246,11 @@ class Whlabel_bh extends Start_Controller {
 			
 			
 			$transfer = explode('|',trim($user['transfer'],'|'));
-			
-			
+			$stid = "";
+			foreach ($transfer as $value) 
+		    {
+				$stid .= " id = ".$value." or";
+			}
 			if(empty($transfer)){
 				exit("您的账号没有赋予车间权限");
 			}
@@ -2263,7 +2266,7 @@ class Whlabel_bh extends Start_Controller {
 		}
 		$transfer = $this->transfer->read($tid);
 		$this->data['transfer'] = $transfer;
-		
+		$transfer_list  = $this->transfer->find_all( trim($stid,'or'));
 
 
 		$start_time = strtotime(date('Y-m-d')) -  14* 24 * 60 * 60;
@@ -2273,6 +2276,7 @@ class Whlabel_bh extends Start_Controller {
 		$wwcsl = $this->whlabel_bh_transfer_cr->find_count(" lx = ".$tid." and type = 1 and is_over = 0 and time >= ".$start_time." and time <= ".$end_time);
 
 		$this->data['wwcsl'] = $wwcsl;
+		$this->data['transfer_list'] = $transfer_list;
 
 		$this->_Template('whlabel_bh_cj_transfer_log',$this->data);
 

+ 17 - 1
template/erp/whlabel_bh_cj_transfer_log.html

@@ -4,7 +4,15 @@
 <div class="fixed">
 <ul class="search">
 <li style="margin-right: 30px;">
-    <font class="cona " style="color:#fff;background-color: #f33;">当前部门:{$transfer['title']}</font>
+    <font class="cona " style="color:#fff;background-color: #f33;">当前部门:<font id="dqbm">{$transfer['title']}</font></font>
+</li>
+<li>
+    操作部门:<select name="transfer" class="select">
+    
+    {loop $transfer_list as $val}
+    <option value="{$val['id']}" {if $val['id']==$transfer['id']} selected {/if}>{$val['title']}</option>
+    {/loop}
+    </select>
 </li>
 <li>订单号:<input value="" name="orderinfo" type="text"></li>
 <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'})">
@@ -64,6 +72,14 @@ $(this).find('td:eq(7)').css("width","5%");
 
 
 });}
+
+
+$("select[name='transfer']").on("change",function(){
+    var tid = $(this).val();
+    $("input[name='tid']").val(tid);
+    $("#dqbm").text($("select[name='transfer'] option:selected").text());
+    $(".search span").click();
+})
 window.onload = function() { 
 if(typeof $("select[name='printer']").length < 1) return;
 setTimeout(function(){ wprinter.printer()},1000);};