You've already forked guangan
工单位置详情
This commit is contained in:
@ -78,14 +78,12 @@ class InspectionShare extends Controller
|
||||
case 'new':
|
||||
$data = $this->_vali([
|
||||
'type_id.require' => '类型不能为空',
|
||||
'user_id.require' => '请选择处理人员',
|
||||
]);
|
||||
$ticket = TicketTicket::mk()->create([
|
||||
'source_type' => 2,
|
||||
'type_id' => $data['type_id'],
|
||||
'user_type' => 'staff',
|
||||
'user_id' => $share->user_id,
|
||||
'current_admin_id' => $data['user_id'],
|
||||
'title' => $share->title,
|
||||
'content' => $share->content,
|
||||
'ticket_region' => $share->ticket_region,
|
||||
|
83
plugs/think-plugs-ticket/src/controller/Repair.php
Normal file
83
plugs/think-plugs-ticket/src/controller/Repair.php
Normal file
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
namespace plugin\ticket\controller;
|
||||
|
||||
use plugin\ticket\model\TicketRepair;
|
||||
use think\admin\Controller;
|
||||
use think\admin\helper\QueryHelper;
|
||||
|
||||
/**
|
||||
* 维修工单管理
|
||||
*/
|
||||
class Repair 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 = '维修工单管理';
|
||||
TicketRepair::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 = '添加维修工单';
|
||||
TicketRepair::mForm('form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑维修工单
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @return void
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->title = '编辑维修工单';
|
||||
$this->id = $this->request->param('id');
|
||||
TicketRepair::mForm('form', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除维修工单
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @return void
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
TicketRepair::mDelete('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改维修工单状态
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @return void
|
||||
*/
|
||||
public function status()
|
||||
{
|
||||
TicketRepair::mSave($this->_vali([
|
||||
'id.require' => '工单ID不能为空',
|
||||
'status.in:0,1' => '状态值范围异常!',
|
||||
'status.require' => '状态值不能为空!',
|
||||
]), 'id');
|
||||
}
|
||||
}
|
@ -82,14 +82,12 @@ class UserShare extends Controller
|
||||
case 'new':
|
||||
$data = $this->_vali([
|
||||
'type_id.require' => '类型不能为空',
|
||||
'user_id.require' => '请选择处理人员',
|
||||
]);
|
||||
$ticket = TicketTicket::mk()->create([
|
||||
'source_type' => 1,
|
||||
'type_id' => $data['type_id'],
|
||||
'user_type' => 'user',
|
||||
'user_id' => $userShare->user_id,
|
||||
'current_admin_id' => $data['user_id'],
|
||||
'title' => $userShare->title,
|
||||
'content' => $userShare->content,
|
||||
'ticket_region' => $userShare->ticket_region,
|
||||
|
83
plugs/think-plugs-ticket/src/controller/Verify.php
Normal file
83
plugs/think-plugs-ticket/src/controller/Verify.php
Normal file
@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
namespace plugin\ticket\controller;
|
||||
|
||||
use plugin\ticket\model\TicketVerify;
|
||||
use think\admin\Controller;
|
||||
use think\admin\helper\QueryHelper;
|
||||
|
||||
/**
|
||||
* 验收工单管理
|
||||
*/
|
||||
class Verify 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 = '验收工单管理';
|
||||
TicketVerify::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 = '添加验收工单';
|
||||
TicketVerify::mForm('form');
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑验收工单
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @return void
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$this->title = '编辑验收工单';
|
||||
$this->id = $this->request->param('id');
|
||||
TicketVerify::mForm('form', 'id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除验收工单
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @return void
|
||||
*/
|
||||
public function remove()
|
||||
{
|
||||
TicketVerify::mDelete('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改验收工单状态
|
||||
* @auth true
|
||||
* @menu true
|
||||
* @return void
|
||||
*/
|
||||
public function status()
|
||||
{
|
||||
TicketVerify::mSave($this->_vali([
|
||||
'id.require' => '工单ID不能为空',
|
||||
'status.in:0,1' => '状态值范围异常!',
|
||||
'status.require' => '状态值不能为空!',
|
||||
]), 'id');
|
||||
}
|
||||
}
|
83
plugs/think-plugs-ticket/src/controller/View.php
Normal file
83
plugs/think-plugs-ticket/src/controller/View.php
Normal 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');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user