三类工单基础

This commit is contained in:
2025-03-19 17:07:27 +08:00
parent eeb2ea1b8b
commit cf2a2892b5
12 changed files with 398 additions and 36 deletions

View File

@ -3,6 +3,7 @@
namespace plugin\ticket\controller;
use plugin\ticket\model\TicketRepair;
use plugin\ticket\model\TicketType;
use think\admin\Controller;
use think\admin\helper\QueryHelper;
@ -23,6 +24,7 @@ class Repair extends Controller
public function index()
{
$this->title = '维修工单管理';
$this->type_list = TicketType::getList();
TicketRepair::mQuery()->layTable(function () {
}, static function (QueryHelper $query) {
$query->equal('status')->like('title');

View File

@ -41,7 +41,7 @@ class Ticket extends Controller
$query->like(['title|content|contact_name|ticket_address|contact_phone#keyword'])
->dateBetween(['create_at'])
->equal(['status', 'type_id']);
$query->append(['imgs_arr', 'source_type_name', 'type_name', 'last_reply'])->with('approval');
$query->append(['imgs_arr', 'source_type_name', 'type_name', 'last_reply'])->with(['views', 'repairs', 'verifys']);
});
}

View File

@ -2,6 +2,7 @@
namespace plugin\ticket\controller;
use plugin\ticket\model\TicketType;
use plugin\ticket\model\TicketVerify;
use think\admin\Controller;
use think\admin\helper\QueryHelper;
@ -23,6 +24,7 @@ class Verify extends Controller
public function index()
{
$this->title = '验收工单管理';
$this->type_list = TicketType::getList();
TicketVerify::mQuery()->layTable(function () {
}, static function (QueryHelper $query) {
$query->equal('status')->like('title');

View File

@ -2,6 +2,7 @@
namespace plugin\ticket\controller;
use plugin\ticket\model\TicketType;
use plugin\ticket\model\TicketView;
use think\admin\Controller;
use think\admin\helper\QueryHelper;
@ -23,8 +24,9 @@ class View extends Controller
public function index()
{
$this->title = '查看工单管理';
$this->type_list = TicketType::getList();
TicketView::mQuery()->layTable(function () {
}, static function (QueryHelper $query) {
}, function (QueryHelper $query) {
$query->equal('status')->like('title');
$query->timeBetween('create_at');
});