58 lines
1.5 KiB
PHP
58 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace app\admin\controller\accounts_receivable;
|
|
|
|
use app\admin\controller\BaseAdminController;
|
|
use app\admin\lists\AccountsReceivableInfoLists;
|
|
use app\admin\lists\AccountsReceivableLists;
|
|
use app\admin\logic\AccountsReceivableLogic;
|
|
use app\admin\validate\app_update\AppUpdateValidate;
|
|
|
|
/**
|
|
* Class AccountsReceivableController
|
|
* @package app\admin\controller\accounts_receivable
|
|
*/
|
|
class AccountsReceivableController extends BaseAdminController
|
|
{
|
|
|
|
public function lists()
|
|
{
|
|
return $this->dataLists(new AccountsReceivableLists());
|
|
}
|
|
|
|
public function edit()
|
|
{
|
|
$params = $this->request->post();
|
|
$result = AccountsReceivableLogic::edit($params);
|
|
if (true === $result) {
|
|
return $this->success('操作成功', [], 1, 1);
|
|
}
|
|
return $this->fail(AccountsReceivableLogic::getError());
|
|
}
|
|
|
|
public function delete()
|
|
{
|
|
$params = (new AppUpdateValidate())->post()->goCheck('delete');
|
|
AccountsReceivableLogic::delete($params);
|
|
return $this->success('删除成功', [], 1, 1);
|
|
}
|
|
|
|
public function detail()
|
|
{
|
|
$params = (new AppUpdateValidate())->goCheck('detail');
|
|
$result = AccountsReceivableLogic::detail($params);
|
|
return $this->data($result);
|
|
}
|
|
|
|
public function record()
|
|
{
|
|
return $this->dataLists(new AccountsReceivableInfoLists());
|
|
}
|
|
|
|
public function statistics()
|
|
{
|
|
$result = AccountsReceivableLogic::statistics();
|
|
return $this->data($result);
|
|
}
|
|
|
|
} |