diff --git a/web/Application/SLN0002/Controller/VoucherController.class.php b/web/Application/SLN0002/Controller/VoucherController.class.php index 68e1df4f..f4edc343 100644 --- a/web/Application/SLN0002/Controller/VoucherController.class.php +++ b/web/Application/SLN0002/Controller/VoucherController.class.php @@ -5,6 +5,7 @@ namespace SLN0002\Controller; use Home\Common\FIdConst; use Home\Controller\PSIBaseController; use Home\Service\UserService; +use SLN0002\Service\VoucherService; /** * 会计凭证Controller @@ -18,6 +19,8 @@ class VoucherController extends PSIBaseController /** * 凭证 - 主页面 + * + * 模板页面:web\Application\SLN0002\View\Voucher\index.html */ public function index() { @@ -44,4 +47,23 @@ class VoucherController extends PSIBaseController $this->gotoLoginPage("/SLN0002/Voucher/index"); } } + + /** + * 返回所有的公司列表 + * + * JS: web\Public\Scripts\PSI\SLN0002\Voucher\MainForm.js + */ + public function companyList() + { + if (IS_POST) { + $us = new UserService(); + + if (!$us->hasPermission(FIdConst::VOUCHER)) { + die("没有权限"); + } + + $service = new VoucherService(); + $this->ajaxReturn($service->companyList()); + } + } }