LeaveInfo.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. namespace app\leave\controller;
  3. use library\Controller;
  4. use think\Db;
  5. /**
  6. * 请假列表
  7. * Class LeaveInfo
  8. * @package app\leave\controller
  9. */
  10. class LeaveInfo extends Controller
  11. {
  12. /**
  13. * 绑定数据表
  14. * @var string
  15. */
  16. protected $table = 'LeaveInfo';
  17. /**
  18. * 类型列表
  19. * @auth true
  20. * @menu true
  21. * @throws \think\Exception
  22. * @throws \think\db\exception\DataNotFoundException
  23. * @throws \think\db\exception\ModelNotFoundException
  24. * @throws \think\exception\DbException
  25. * @throws \think\exception\PDOException
  26. */
  27. public function index()
  28. {
  29. $this->title = '列表管理';
  30. $query = $this->_query($this->table)->where('is_deleted',0)->page();
  31. }
  32. /**
  33. * 数据列表处理
  34. * @auth true
  35. * @menu true
  36. * @param array $data
  37. * @throws \think\db\exception\DataNotFoundException
  38. * @throws \think\db\exception\ModelNotFoundException
  39. * @throws \think\exception\DbException
  40. */
  41. protected function _index_page_filter(&$data)
  42. {
  43. foreach ($data as $k=>&$v){
  44. }
  45. }
  46. /**
  47. * 删除
  48. * @auth true
  49. * @menu true
  50. * @param array $data
  51. * @throws \think\db\exception\DataNotFoundException
  52. * @throws \think\db\exception\ModelNotFoundException
  53. * @throws \think\exception\DbException
  54. */
  55. public function remove()
  56. {
  57. $this->_save($this->table, ['is_deleted' => '1']);
  58. }
  59. /**
  60. *
  61. * 编辑
  62. * @auth true
  63. * @menu true
  64. * @param array $data
  65. * @throws \think\db\exception\DataNotFoundException
  66. * @throws \think\db\exception\ModelNotFoundException
  67. * @throws \think\exception\DbException
  68. */
  69. public function edit()
  70. {
  71. $this->title = '编辑';
  72. $this->_form($this->table, 'form');
  73. }
  74. /**
  75. *
  76. * 数据处理
  77. * @auth true
  78. * @menu true
  79. * @param array $data
  80. * @throws \think\db\exception\DataNotFoundException
  81. * @throws \think\db\exception\ModelNotFoundException
  82. * @throws \think\exception\DbException
  83. */
  84. protected function _form_filter(&$data)
  85. {
  86. }
  87. }