72 lines
2.5 KiB
PHP
72 lines
2.5 KiB
PHP
|
<?php
|
|||
|
|
|||
|
namespace app\store\controller\finance;
|
|||
|
|
|||
|
use app\common\controller\Definitions;
|
|||
|
use app\common\lists\StoreBillLists;
|
|||
|
use app\common\logic\StoreFinanceFlowLogic;
|
|||
|
use app\store\controller\BaseAdminController;
|
|||
|
use hg\apidoc\annotation as ApiDoc;
|
|||
|
|
|||
|
#[ApiDoc\title('账单记录')]
|
|||
|
class StoreBillController extends BaseAdminController
|
|||
|
{
|
|||
|
|
|||
|
#[
|
|||
|
ApiDoc\Title('列表'),
|
|||
|
ApiDoc\url('/store/finance/storeBill/lists'),
|
|||
|
ApiDoc\Method('GET'),
|
|||
|
ApiDoc\NotHeaders(),
|
|||
|
ApiDoc\Author('中国队长'),
|
|||
|
ApiDoc\Query(name: 'type', type: 'int', require: false, desc: '类型:1日账单,2周账单,3月账单'),
|
|||
|
ApiDoc\Query(name: 'start_time', type: 'string', require: false, desc: '开始时间'),
|
|||
|
ApiDoc\Query(name: 'end_time', type: 'string', require: false, desc: '结束时间'),
|
|||
|
ApiDoc\Header(ref: [Definitions::class, "token"]),
|
|||
|
ApiDoc\Query(ref: [Definitions::class, "page"]),
|
|||
|
ApiDoc\ResponseSuccess("data", type: "array"),
|
|||
|
]
|
|||
|
public function lists()
|
|||
|
{
|
|||
|
return $this->dataLists(new StoreBillLists());
|
|||
|
}
|
|||
|
|
|||
|
#[
|
|||
|
ApiDoc\Title('详情'),
|
|||
|
ApiDoc\url('/store/finance/storeBill/detail'),
|
|||
|
ApiDoc\Method('GET'),
|
|||
|
ApiDoc\NotHeaders(),
|
|||
|
ApiDoc\Author('中国队长'),
|
|||
|
ApiDoc\Param(name: 'id', type: 'int', require: true, desc: 'id'),
|
|||
|
ApiDoc\Param(name: 'remark', type: 'string', require: true, desc: '备注'),
|
|||
|
ApiDoc\Header(ref: [Definitions::class, "token"]),
|
|||
|
ApiDoc\ResponseSuccess("data", type: "array"),
|
|||
|
]
|
|||
|
public function detail(StoreFinanceFlowLogic $logic)
|
|||
|
{
|
|||
|
$id = $this->request->post('id');
|
|||
|
$remark = $this->request->post('remark');
|
|||
|
$logic->remark($id, $remark);
|
|||
|
return $this->success('操作成功', [], 1, 1);
|
|||
|
}
|
|||
|
|
|||
|
#[
|
|||
|
ApiDoc\Title('下载'),
|
|||
|
ApiDoc\url('/store/finance/storeBill/download'),
|
|||
|
ApiDoc\Method('GET'),
|
|||
|
ApiDoc\NotHeaders(),
|
|||
|
ApiDoc\Author('中国队长'),
|
|||
|
ApiDoc\Param(name: 'id', type: 'int', require: true, desc: 'id'),
|
|||
|
ApiDoc\Param(name: 'remark', type: 'string', require: true, desc: '备注'),
|
|||
|
ApiDoc\Header(ref: [Definitions::class, "token"]),
|
|||
|
ApiDoc\ResponseSuccess("data", type: "array"),
|
|||
|
]
|
|||
|
public function download(StoreFinanceFlowLogic $logic)
|
|||
|
{
|
|||
|
$id = $this->request->post('id');
|
|||
|
$remark = $this->request->post('remark');
|
|||
|
$logic->remark($id, $remark);
|
|||
|
return $this->success('操作成功', [], 1, 1);
|
|||
|
}
|
|||
|
|
|||
|
}
|