This commit is contained in:
2024-12-01 16:56:00 +08:00
parent 9f10f727ed
commit 19d38802a9
10 changed files with 206 additions and 4 deletions

View File

@ -0,0 +1,47 @@
<?php
namespace plugin\ticket\controller;
use plugin\ticket\model\TicketDept;
use think\admin\Controller;
use think\admin\helper\QueryHelper;
class Dept extends Controller
{
public function index()
{
$this->title = '部门管理';
TicketDept::mQuery()->layTable(function () {
}, function (QueryHelper $query) {
$query->like('name')->equal('status');
});
}
public function add()
{
$this->title = '添加部门';
TicketDept::mForm('form');
}
public function edit()
{
$this->title = '编辑部门';
TicketDept::mForm('form');
}
public function remove()
{
$this->_applyFormToken();
TicketDept::mDelete('id');
}
public function status()
{
TicketDept::mSave($this->_vali([
'id.require' => '部门ID不能为空',
'status.in:0,1' => '状态值范围异常!',
'status.require' => '状态值不能为空!',
]), 'id');
}
}