lvhao 13 timmar sedan
förälder
incheckning
2b2b656e9b
2 ändrade filer med 15 tillägg och 4 borttagningar
  1. 14 3
      core/CoreApp/controllers/Beihuogl.php
  2. 1 1
      template/erp/beihuogl_ccwlshlist.html

+ 14 - 3
core/CoreApp/controllers/Beihuogl.php

@@ -466,6 +466,7 @@ class Beihuogl extends Start_Controller {
     //仓储物流部的备货申请单的列表
     private function _ccwlshlist(){
         if($this->input->method() === 'post'){
+            $vip_id = $this->input->post('vip_id',true);
             $page = $this->input->post('page',true);
 		    $perpage = $this->input->post('perpage',true);
             $sqr = $this->input->post('sqr',true);
@@ -487,7 +488,12 @@ class Beihuogl extends Start_Controller {
             if(!empty($shop_id)){
                 $where .= " and shop_id = ".$shop_id." ";
             }else{
-                $where .= " and shop_id in (".$shop_ids.") ";
+                if($vip_id == 1){
+
+                }else{
+                    $where .= " and shop_id in (".$shop_ids.") ";
+                }
+                
             }
             if(!empty($plat_id)){
                 $where .= " and plat_id = ".$plat_id." ";
@@ -515,8 +521,8 @@ class Beihuogl extends Start_Controller {
             $plat_list = $this->typeclass->find_all("classid = 32","id,title");
             $plat_list = array_column($plat_list,'title','id');
             foreach($list as $k=>$v){
-                $list[$k]['shop_id'] = isset($shop_list[$v['shop_id']])?$shop_list[$v['shop_id']]:"";
-                $list[$k]['plat_id'] = isset($plat_list[$v['plat_id']])?$plat_list[$v['plat_id']]:"";
+                $list[$k]['shop_id'] = isset($shop_list[$v['shop_id']])?$shop_list[$v['shop_id']]:"";
+                $list[$k]['plat_id'] = isset($plat_list[$v['plat_id']])?$plat_list[$v['plat_id']]:"";
                 $list[$k]['add_time'] = date("Y-m-d",$v['add_time']);
                 $list[$k]['sku'] = $v['sku']."  <i class='fa fa-edit' data-id='".$v['id']."' data-sku='".$v['sku']."' onclick='edit_sku(this)'></i>";
                 $list[$k]['ccwl_num'] = $v['ccwl_num']."  <i class='fa fa-edit' data-id='".$v['id']."' data-num='".$v['ccwl_num']."' onclick='edit_ccwl(this)'></i>";
@@ -533,6 +539,11 @@ class Beihuogl extends Start_Controller {
             $user = $this->user->get_api($_SESSION['api']);
             $usersp = explode('|',trim($user['shop'],'|'));
             $this->data['usersp'] = implode(",",$usersp);
+             $vip_id = 0;
+            if(in_array($user['id'],[10,28])){
+                $vip_id = 1;
+            }
+            $this->data['vip_id'] = $vip_id;
             $this->_Template('beihuogl_ccwlshlist',$this->data);
         }
     }

+ 1 - 1
template/erp/beihuogl_ccwlshlist.html

@@ -29,7 +29,7 @@
         <input id="jtime" value="{date('Y-m-d',time()+24*3600)} 0:00" name="jtime" type="text" onClick="laydate({istime: true,format:'YYYY-MM-DD hh:mm'})"  autocomplete="off">
     </li>
 
-
+    <input type="hidden" name="vip_id" value="{$vip_id}">
     <input type="hidden" name="shop_ids" value="{$usersp}">
     <li><span>确 定</span></li>
 </ul>