public function view_applyBox() { $status = isset($_GET['status']) ? intval($_GET['status']) : ''; $navlist = array(array('url' => '', 'title' => '海外仓补货'), array('url' => '', 'title' => '箱号申请')); $boxObj = new BoxManageModel(); $pageSize = 98; $count = $boxObj->calcCount($status); $perCount = ceil($count / 11); $pageObj = new Page($count, $pageSize); $boxApplyRecord = $boxObj->getApplyBoxRecord($status, $pageObj->limit); $sign = 0; $ismark = 0; $useArr = array(); foreach ($boxApplyRecord as $k => $v) { $isuse = $v['isuse']; $useArr[$v['boxnum']] = $isuse; if ($sign % 14 != 0) { $arr[$i][$sign] = $v['boxnum']; } else { $i++; $arr[$i][$sign] = $v['boxnum']; } $sign++; } $toplevel = 2; //顶层菜单 $secondlevel = '214'; if ($count > $pageSize) { $pagestr = $pageObj->fpage(array(0, 2, 3, 4, 5, 6, 7, 8, 9)); } else { $pagestr = $pageObj->fpage(array(0, 2, 3)); } $this->smarty->assign('toplevel', $toplevel); $this->smarty->assign('count', $count); $this->smarty->assign('pagestr', $pagestr); //当前的二级菜单 $this->smarty->assign('navlist', $navlist); $this->smarty->assign('secondlevel', $secondlevel); $this->smarty->assign('third', 2); $this->smarty->assign('boxApplyRecord', $arr); $this->smarty->assign('useArr', $useArr); $this->smarty->assign('status', $status); $this->smarty->display('owBoxNumApply.htm'); }