HouseContractPay.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace app\api\controller\v1;
  3. use app\api\controller\Base;
  4. use app\hander\HelpHander;
  5. use think\Db;
  6. class HouseContractPay extends Base
  7. {
  8. // 新增
  9. public function save(){
  10. model('HouseContractPay')->add();
  11. HelpHander::success([],'操作成功');
  12. }
  13. // 删除
  14. public function del(){
  15. $id = input('id/d',0);
  16. model('HouseContractPay')->del($id);
  17. HelpHander::success([],'操作成功');
  18. }
  19. // 改变发票状态
  20. public function invoice(){
  21. $id = input('id/d',0);
  22. $invoice = 1;
  23. model('HouseContractPay')->changeInvoice($id,$invoice,$this->userId);
  24. HelpHander::success([],'操作成功');
  25. }
  26. //列表
  27. public function list(){
  28. $page = input('page/d',1);
  29. $size = input('size/d',10);
  30. $intro = input('intro','','trim');
  31. $sn = input('sn','','trim');
  32. $contractId = input('contractId/d',0);
  33. $ret = model('HouseContractPay')->lists($page,$size,$intro,$contractId,$sn,$this->orgId);
  34. HelpHander::success($ret);
  35. }
  36. public function jfee(){
  37. $id = input('id/d',0);
  38. $ret = model('HouseContractPay')->jfee($id);
  39. HelpHander::success($ret);
  40. }
  41. public function jfees(){
  42. $ids = input('ids','','trim');
  43. if(!$ids){
  44. HelpHander::error('参数错误');
  45. }
  46. $ret = model('HouseContractPay')->jfees($ids);
  47. HelpHander::success($ret);
  48. }
  49. }