This commit is contained in:
CRM8000 2024-10-15 09:08:41 +08:00
parent 4f62b36572
commit 0e219b9b4e

View File

@ -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());
}
}
}