From b35f2ddadef73a6f5be707a78e2176d7081080f9 Mon Sep 17 00:00:00 2001 From: qixinzhi Date: Wed, 31 Jul 2024 02:07:46 +0000 Subject: [PATCH] * [bug#53323,0.5h] fix screen 3 scroll. --- module/screen/control.php | 53 ++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/module/screen/control.php b/module/screen/control.php index 7e5433d3fd..71dd1a4ae1 100644 --- a/module/screen/control.php +++ b/module/screen/control.php @@ -88,10 +88,26 @@ class screen extends control */ public function view(int $screenID, int $year = 0, int $month = 0, int $dept = 0, string $account = '') { + if($screenID == 3) + { + echo $this->fetch('report', 'annualData', "year={$year}&dept={$dept}&account={$account}"); + return; + } + $screen = $this->screen->getByID($screenID, $year, $month, $dept, $account, false); $this->view->title = $screen->name; $this->view->screenID = $screenID; + + if($screenID == 5) + { + $this->loadModel('execution'); + $this->view->executions = $this->screen->getBurnData(); + $this->view->date = date('Y-m-d H:i:s'); + $this->display('screen', 'burn'); + return; + } + $this->view->year = $year; $this->view->month = $month; $this->view->dept = $dept; @@ -113,37 +129,18 @@ class screen extends control public function viewOld(int $screenID, int $year = 0, int $month = 0, int $dept = 0, string $account = '') { if(empty($year)) $year = date('Y'); - if(empty($month)) $month = date('n'); - - if($screenID == 3) - { - echo $this->fetch('report', 'annualData', "year={$year}&dept={$dept}&account={$account}"); - return; - } - - if(empty($year)) $year = date('Y'); + if(empty($year)) $year = date('Y'); + if(empty($month)) $month = date('m'); $screen = $this->screen->getByID($screenID, $year, $month, $dept, $account, false); - $this->view->title = $screen->name; - $this->view->screen = $screen; - - if($screenID == 5) - { - $this->loadModel('execution'); - $this->view->executions = $this->screen->getBurnData(); - $this->view->date = date('Y-m-d H:i:s'); - $this->display('screen', 'burn'); - } - else - { - if(empty($month)) $month = date('m'); - $this->view->year = $year; - $this->view->month = $month; - $this->view->dept = $dept; - $this->view->account = $account; - $this->display(); - } + $this->view->title = $screen->name; + $this->view->screen = $screen; + $this->view->year = $year; + $this->view->month = $month; + $this->view->dept = $dept; + $this->view->account = $account; + $this->display(); } public function ajaxGetScreenScheme(int $screenID, int $year = 0, int $month = 0, int $dept = 0, string $account = '')