lvhao 9 часов назад
Родитель
Сommit
8e26b08e10
1 измененных файлов с 9 добавлено и 2 удалено
  1. 9 2
      core/CoreApp/controllers/Beihuogl.php

+ 9 - 2
core/CoreApp/controllers/Beihuogl.php

@@ -13,6 +13,7 @@ class Beihuogl extends Start_Controller {
         $this->load->_model("Model_settingtest","settingtest");
         $this->load->_model("Model_bhdcd","bhdcd");
         $this->load->_model("Model_whlabellabel","whlabellabel");
+        $this->load->_model("Model_warehouse","warehouse");
     }
 
     //定义方法的调用规则 获取URI第二段值
@@ -1949,13 +1950,19 @@ class Beihuogl extends Start_Controller {
                 'featurespp'=>$tmp_featurespp,
                 'title'=>$info['title'],
                 'label'=>$label,
-                'warehouse'=>13,
+                'warehouse'=>$info['erp_warehouse'],
                 'time'=>$time,
                 'details'=>empty($info['kw'])?'':$info['kw'],
                 'cpid'=>$cpid,
                 'jm'=>$info['jm'],
                 'cpbz'=>''
             ];
+            $warehouse_info = $this->warehouse->read($info['erp_warehouse']);
+            if(empty($warehouse_info)){
+                $warehouse_name = "仓库异常";
+            }else{
+                $warehouse_name = $warehouse_info['title'];
+            }
             $this->db->trans_begin();
             $this->whlabellabel->insert($insert_arr);
             if ($this->db->trans_status() === TRUE) {
@@ -1971,7 +1978,7 @@ class Beihuogl extends Start_Controller {
                 $details = '位置:(' . $info['kw'] . ') <font style="font-size: 18px;">' . $cpid . '</font>' ;
             }
             
-			$details = ' <b style="font-size: 18px;">'."许昌仓</b>  ".$details;
+			$details = ' <b style="font-size: 18px;">'.$warehouse_name."</b>  ".$details;
             $purchase = "龙盈工厂";
             echo json_encode(array('title' => $info['title'], 'num' => $label, 'bqsku' => $info['sku'], 'xbqnum' => $xbqnum, 'zh' => str_replace('自然色 ', '', rtrim($info['zh'], ' ')), 'details' => $details, 'purchase' => $purchase, 'cpbz' => "", 'usa' => 0, 'success' => true));
             exit; //特殊仓目前不需要仓库选项