title = '查看工单管理'; TicketView::mQuery()->layTable(function () { }, static function (QueryHelper $query) { $query->equal('status')->like('title'); $query->timeBetween('create_at'); }); } /** * 添加查看工单 * @auth true * @menu true * @return void */ public function add() { $this->title = '添加查看工单'; TicketView::mForm('form'); } /** * 编辑查看工单 * @auth true * @menu true * @return void */ public function edit() { $this->title = '编辑查看工单'; $this->id = $this->request->param('id'); TicketView::mForm('form', 'id'); } /** * 删除查看工单 * @auth true * @menu true * @return void */ public function remove() { TicketView::mDelete('id'); } /** * 修改查看工单状态 * @auth true * @menu true * @return void */ public function status() { TicketView::mSave($this->_vali([ 'id.require' => '工单ID不能为空', 'status.in:0,1' => '状态值范围异常!', 'status.require' => '状态值不能为空!', ]), 'id'); } }