BudgetPay.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. namespace app\api\controller\v1;
  3. use app\api\controller\Base;
  4. use app\hander\HelpHander;
  5. class BudgetPay extends Base
  6. {
  7. // 新增
  8. public function save(){
  9. model('BudgetPay')->add();
  10. HelpHander::success([],'操作成功');
  11. }
  12. // 编辑
  13. public function update(){
  14. model('BudgetPay')->add();
  15. HelpHander::success([],'操作成功');
  16. }
  17. // 确定
  18. public function confirm(){
  19. model('BudgetPay')->confirm($this->orgId,$this->userId);
  20. HelpHander::success([],'操作成功');
  21. }
  22. // 详情
  23. public function detail(){
  24. $id = input('id/d',0);
  25. $ret = model('BudgetPay')->info($id);
  26. HelpHander::success($ret);
  27. }
  28. // 列表 dep 0=全部 1=本部门
  29. public function list(){
  30. $page = input('page/d',1);
  31. $size = input('size/d',10);
  32. $type = input('type/d',0);
  33. $dep = input('dep/d',0);
  34. $depName = input('depName','','trim');
  35. $userName = input('userName','','trim');
  36. $itemName = input('itemName','','trim');
  37. $start = input('startTime','','trim');
  38. $end = input('endTime','','trim');
  39. $ret = model('BudgetPay')->lists($page,$size,$dep,$depName,$userName,$itemName,$type,$start,$end,$this->userId,$this->orgId);
  40. HelpHander::success($ret);
  41. }
  42. // 删除
  43. public function del(){
  44. $id = input('id/d',0);
  45. model('BudgetPay')->del($id,$this->userId);
  46. HelpHander::success([],'操作成功');
  47. }
  48. }