From 0e219b9b4ee2836b0216d82166446065a4b6a18c Mon Sep 17 00:00:00 2001 From: CRM8000 Date: Tue, 15 Oct 2024 09:08:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=AD=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/VoucherController.class.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) 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()); + } + } }