工单位置详情

This commit is contained in:
2025-03-19 11:04:09 +08:00
parent 3d82a417a0
commit 483bcfd6d8
6 changed files with 297 additions and 4 deletions

View File

@ -0,0 +1,83 @@
<?php
namespace plugin\ticket\controller;
use plugin\ticket\model\TicketView;
use think\admin\Controller;
use think\admin\helper\QueryHelper;
/**
* 查看工单管理
*/
class View extends Controller
{
/**
* 查看工单列表
* @auth true
* @menu true
* @return void
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function index()
{
$this->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');
}
}