/**
  * 海外仓到货立方数
  */
 public function view_overSkuVolume()
 {
     global $mod, $act;
     $keyword = isset($_GET['keyword']) ? $_GET['keyword'] : '';
     $purwh = new PurToWhModel();
     $condition = '';
     if (!empty($keyword)) {
         $rtnCguserArr = $purwh->getCguserArrId($keyword);
         //获取可能匹配的采购员编号
         $cguserArr = '';
         if (!empty($rtnCguserArr)) {
             foreach ($rtnCguserArr as $k => $v) {
                 $cguserArr .= $v['global_user_id'] . ',';
             }
             $cguserArr = "(" . substr($cguserArr, 0, strlen($cguserArr) - 1) . ")";
         }
         if ($cguserArr != '') {
             $condition .= "AND (a.sku LIKE '%{$keyword}%' OR a.goodsName LIKE '%{$keyword}%' OR a.OverSeaSkuCharger IN {$cguserArr})";
         } else {
             $condition .= "AND (a.sku LIKE '%{$keyword}%' OR a.goodsName LIKE '%{$keyword}%')";
         }
     }
     $page = isset($_GET['page']) ? $_GET['page'] : '1';
     $listInfo = $purwh->getOverSeaSkuVolume($condition, $page);
     $perNum = 200;
     $totalNum = $listInfo["totalNum"];
     $list = $listInfo["goodsInfo"];
     $totalVolume = 0;
     if (!empty($list)) {
         foreach ($list as $k => $v) {
             $sku = $v['sku'];
             $length = $v['goodsLength'];
             $width = $v['goodsWidth'];
             $height = $v['goodsHeight'];
             $stock = $v['b_stock_cout'];
             $inboxqty = $v['inBoxQty'];
             $totalVolume += $length * $width * $height * ($stock + $inboxqty);
         }
         $totalVolume = round($totalVolume / 1000000, 3);
     }
     $allTotalVolume = $purwh->getTotalVolume();
     $pageobj = new Page($totalNum, $perNum);
     $pageStr = $pageobj->fpage();
     $this->smarty->assign('pageStr', $pageStr);
     //分页输出
     $this->smarty->assign('list', $list);
     //循环赋值*/
     $this->smarty->assign('title', '海外料号B仓库存立方数');
     $this->smarty->assign('mod', $mod);
     //模块权限
     $this->smarty->assign('totalVolume', $totalVolume);
     $this->smarty->assign('allTotalVolume', $allTotalVolume);
     $this->smarty->display('overSkuVolume.htm');
 }