123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- class BudgetPay extends Base
- {
- // 新增
- public function save(){
- model('BudgetPay')->add();
- HelpHander::success([],'操作成功');
- }
- // 编辑
- public function update(){
- model('BudgetPay')->add();
- HelpHander::success([],'操作成功');
- }
- // 确定
- public function confirm(){
- model('BudgetPay')->confirm($this->orgId,$this->userId);
- HelpHander::success([],'操作成功');
- }
- // 详情
- public function detail(){
- $id = input('id/d',0);
- $ret = model('BudgetPay')->info($id);
- HelpHander::success($ret);
- }
- // 列表 dep 0=全部 1=本部门
- public function list(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $type = input('type/d',0);
- $dep = input('dep/d',0);
- $depName = input('depName','','trim');
- $userName = input('userName','','trim');
- $itemName = input('itemName','','trim');
- $start = input('startTime','','trim');
- $end = input('endTime','','trim');
- $ret = model('BudgetPay')->lists($page,$size,$dep,$depName,$userName,$itemName,$type,$start,$end,$this->userId,$this->orgId);
- HelpHander::success($ret);
- }
- // 删除
- public function del(){
- $id = input('id/d',0);
- model('BudgetPay')->del($id,$this->userId);
- HelpHander::success([],'操作成功');
- }
- }
|