From 825d0df7bf34e5d15271dfb6daa226c429481528 Mon Sep 17 00:00:00 2001
From: Jerry Yan <792602257@qq.com>
Date: Sun, 16 Mar 2025 15:08:37 +0800
Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=EF=BC=8C=E9=A6=96=E9=A1=B5?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/index/controller/Index.php | 36 ++++
app/index/view/full.html | 35 ++++
app/index/view/index/dashboard.html | 187 ++++++++++++++++++
app/index/view/main.html | 23 +++
app/index/view/table.html | 23 +++
.../src/controller/api/auth/Thumb.php | 20 ++
.../src/controller/Order.php | 3 +-
.../src/controller/Approval.php | 10 +-
.../src/controller/Ticket.php | 15 ++
.../src/controller/Type.php | 21 +-
.../src/view/ticket/detail.html | 3 +-
11 files changed, 367 insertions(+), 9 deletions(-)
create mode 100644 app/index/view/full.html
create mode 100644 app/index/view/index/dashboard.html
create mode 100644 app/index/view/main.html
create mode 100644 app/index/view/table.html
diff --git a/app/index/controller/Index.php b/app/index/controller/Index.php
index 2f5fbf7..78fe5eb 100644
--- a/app/index/controller/Index.php
+++ b/app/index/controller/Index.php
@@ -16,7 +16,15 @@
namespace app\index\controller;
+use plugin\cms\model\CmsArticle;
+use plugin\cms\model\CmsThumb;
+use plugin\points_mall\model\PointsMallGoods;
+use plugin\points_mall\model\PointsMallOrder;
+use plugin\ticket\model\TicketTicket;
+use plugin\ticket\model\TicketTicketInter;
+use plugin\ticket\model\TicketTicketOuter;
use think\admin\Controller;
+use think\db\Raw;
class Index extends Controller
{
@@ -24,4 +32,32 @@ class Index extends Controller
{
$this->redirect(sysuri('admin/login/index'));
}
+
+ public function dashboard() {
+ $this->t_0_0_0 = PointsMallGoods::query()->where('status', '=', 1)->where('deleted', '=', 0)->count();
+ $this->t_0_0_1 = PointsMallGoods::query()->where('status', '=', 1)->where('deleted', '=', 0)->sum(new Raw("`stock_total` - `stock_sales`"));
+
+ $this->t_0_1_0 = PointsMallGoods::query()->where('deleted', '=', 0)->count();
+ $this->t_0_1_1 = PointsMallGoods::query()->where('deleted', '=', 0)->sum(new Raw("`stock_total` - `stock_sales`"));
+
+ $this->t_1_0 = PointsMallOrder::query()->count();
+ $this->t_1_1 = PointsMallOrder::query()->where('status', '=', 2)->count();
+ $this->t_1_2 = PointsMallOrder::query()->where('status', '=', 4)->count();
+ $this->t_1_3 = PointsMallOrder::query()->where('status', '=', 6)->count();
+
+ $this->t_2_0_0 = TicketTicket::query()->count();
+ $this->t_2_0_1 = TicketTicket::query()->where('status', '=', -1)->count();
+
+ $this->t_2_1_0 = TicketTicketInter::query()->where('status', '=', 0)->count();
+ $this->t_2_1_1 = TicketTicketInter::query()->where('status', '=', 0)->count();
+
+ $this->t_2_2_0 = TicketTicketOuter::query()->where('status', '=', 0)->count();
+ $this->t_2_2_1 = TicketTicketOuter::query()->where('status', '=', 0)->count();
+
+ $this->t_3_0 = CmsArticle::query()->count();
+ $this->t_3_1 = CmsThumb::query()->where('is_audit', '=', 0)->count();
+ $this->t_3_2 = CmsThumb::query()->where('is_audit', '=', 1)->count();
+
+ $this->fetch();
+ }
}
diff --git a/app/index/view/full.html b/app/index/view/full.html
new file mode 100644
index 0000000..187f12c
--- /dev/null
+++ b/app/index/view/full.html
@@ -0,0 +1,35 @@
+
+
+
+ {block name="title"}{$title|default=''}{if !empty($title)} · {/if}{:sysconf('site_name')}{/block}
+
+
+
+
+
+
+
+
+
+
+
+ {if file_exists(syspath("public/static/extra/icon/iconfont.css"))}
+
+ {/if}
+ {block name="style"}{/block}
+
+
+
+
+{block name='body'}
+
+
{block name='content'}{/block}
+
+{/block}
+
+
+
+
+{block name='script'}{/block}
+
+
\ No newline at end of file
diff --git a/app/index/view/index/dashboard.html b/app/index/view/index/dashboard.html
new file mode 100644
index 0000000..72589ee
--- /dev/null
+++ b/app/index/view/index/dashboard.html
@@ -0,0 +1,187 @@
+{extend name='main'}
+
+{block name='content'}
+
+
+ 商品信息
+ 订单信息
+ 工单信息
+ 内容信息
+
+
+
+
+
+
+
+
+
+
种类: {$t_0_0_0} 种
+
数量: {$t_0_0_1} 件
+
+
+
+
+
+
+
+
种类: {$t_0_1_0} 种
+
数量: {$t_0_1_1} 件
+
+
+
+
+
+
+
+
+
+
+
+{/block}
\ No newline at end of file
diff --git a/app/index/view/main.html b/app/index/view/main.html
new file mode 100644
index 0000000..a698dd7
--- /dev/null
+++ b/app/index/view/main.html
@@ -0,0 +1,23 @@
+
+ {block name='style'}{/block}
+ {block name='header'}
+ {notempty name='title'}
+
+ {/notempty}
+ {/block}
+
+
+
+ {notempty name='showErrorMessage'}
+
+ {:lang('系统提示:')} {$showErrorMessage|raw}
+
+ {/notempty}
+ {block name='content'}{/block}
+
+
+ {block name='script'}{/block}
+
\ No newline at end of file
diff --git a/app/index/view/table.html b/app/index/view/table.html
new file mode 100644
index 0000000..fef73fe
--- /dev/null
+++ b/app/index/view/table.html
@@ -0,0 +1,23 @@
+
+ {block name='style'}{/block}
+ {block name='header'}
+ {notempty name='title'}
+
+ {/notempty}
+ {/block}
+
+
+
+ {notempty name='showErrorMessage'}
+
+ {:lang('系统提示:')} {$showErrorMessage|raw}
+
+ {/notempty}
+ {block name='content'}{/block}
+
+
+ {block name='script'}{/block}
+
\ No newline at end of file
diff --git a/plugs/think-plugs-cms/src/controller/api/auth/Thumb.php b/plugs/think-plugs-cms/src/controller/api/auth/Thumb.php
index 94dd69f..c980e32 100644
--- a/plugs/think-plugs-cms/src/controller/api/auth/Thumb.php
+++ b/plugs/think-plugs-cms/src/controller/api/auth/Thumb.php
@@ -7,6 +7,10 @@ use plugin\cms\model\CmsThumb;
class Thumb extends Auth
{
+ /**
+ * 获取点赞城市列表
+ * @return void
+ */
public function index()
{
$thumbList = CmsThumb::mk()->scope('published')->order('create_at desc')->withCount([
@@ -18,12 +22,20 @@ class Thumb extends Auth
$this->success('获取点赞城市列表', $thumbList);
}
+ /**
+ * 获取当前用户点赞的城市列表
+ * @return void
+ */
public function my()
{
$myThumbs = CmsThumb::mk()->scope('published')->order('create_at desc')->where('user_id', '=', $this->usid)->paginate();
$this->success('获取点赞城市成功', $myThumbs);
}
+ /**
+ * 添加点赞城市
+ * @return void
+ */
public function add()
{
$data = $this->_vali([
@@ -40,6 +52,10 @@ class Thumb extends Auth
$this->success('点赞成功', $thumb);
}
+ /**
+ * 获取点赞城市详情
+ * @return void
+ */
public function info()
{
$id = $this->request->get('id');
@@ -52,6 +68,10 @@ class Thumb extends Auth
$this->success('获取点赞城市详情', $thumb);
}
+ /**
+ * 对点赞城市进行点赞操作
+ * @return void
+ */
public function like()
{
$id = $this->request->post('id');
diff --git a/plugs/think-plugs-points-mall/src/controller/Order.php b/plugs/think-plugs-points-mall/src/controller/Order.php
index bdb4654..e9ed72e 100644
--- a/plugs/think-plugs-points-mall/src/controller/Order.php
+++ b/plugs/think-plugs-points-mall/src/controller/Order.php
@@ -13,12 +13,13 @@ use think\exception\HttpResponseException;
class Order extends Controller
{
/**
- * 订单数据管理
+ * 订单数据管理页面
* @auth true
* @menu true
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
+ * @return void
*/
public function index()
{
diff --git a/plugs/think-plugs-ticket/src/controller/Approval.php b/plugs/think-plugs-ticket/src/controller/Approval.php
index f44c266..dbe3aa3 100644
--- a/plugs/think-plugs-ticket/src/controller/Approval.php
+++ b/plugs/think-plugs-ticket/src/controller/Approval.php
@@ -10,12 +10,13 @@ use think\admin\model\SystemUser;
class Approval extends Controller
{
/**
- * 流程管理列表
+ * 审批流程管理页面
* @auth true
* @menu true
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
+ * @return void
*/
public function index()
{
@@ -35,9 +36,10 @@ class Approval extends Controller
}
/**
- * 添加审批流程
+ * 添加审批流程页面
* @auth true
* @menu true
+ * @return void
*/
public function add()
{
@@ -47,9 +49,10 @@ class Approval extends Controller
}
/**
- * 编辑审批流程
+ * 编辑审批流程页面
* @auth true
* @menu true
+ * @return void
*/
public function edit()
{
@@ -63,6 +66,7 @@ class Approval extends Controller
* 删除审批流程
* @auth true
* @menu true
+ * @return void
*/
public function remove()
{
diff --git a/plugs/think-plugs-ticket/src/controller/Ticket.php b/plugs/think-plugs-ticket/src/controller/Ticket.php
index 2c67668..5051ba5 100644
--- a/plugs/think-plugs-ticket/src/controller/Ticket.php
+++ b/plugs/think-plugs-ticket/src/controller/Ticket.php
@@ -213,6 +213,13 @@ class Ticket extends Controller
$this->fetch();
}
+ /**
+ * @return void
+ * @throws \Exception
+ * 审核提交
+ * @auth true
+ * @menu true
+ */
public function create_approval()
{
$data = $this->_vali([
@@ -268,6 +275,14 @@ class Ticket extends Controller
$this->success('创建成功!');
}
+ /**
+ * 进行审核
+ * @return void
+ * @throws \Exception
+ *
+ * @auth true
+ * @menu true
+ */
public function do_approve()
{
$data = $this->_vali([
diff --git a/plugs/think-plugs-ticket/src/controller/Type.php b/plugs/think-plugs-ticket/src/controller/Type.php
index 093072c..60e9001 100644
--- a/plugs/think-plugs-ticket/src/controller/Type.php
+++ b/plugs/think-plugs-ticket/src/controller/Type.php
@@ -13,11 +13,13 @@ use think\admin\helper\QueryHelper;
class Type extends Controller
{
/**
- * 工单类型列表
- * @return void
+ * 工单类型列表页面
+ * @auth true
+ * @menu true
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
+ * @return void
*/
public function index()
{
@@ -31,7 +33,9 @@ class Type extends Controller
}
/**
- * 添加工单类型
+ * 添加工单类型页面
+ * @auth true
+ * @menu true
* @return void
*/
public function add()
@@ -41,7 +45,9 @@ class Type extends Controller
}
/**
- * 编辑工单类型
+ * 编辑工单类型页面
+ * @auth true
+ * @menu true
* @return void
*/
public function edit()
@@ -52,6 +58,8 @@ class Type extends Controller
/**
* 修改工单类型状态
+ * @auth true
+ * @menu true
* @return void
*/
public function status()
@@ -65,6 +73,8 @@ class Type extends Controller
/**
* 修改工单类型排序
+ * @auth true
+ * @menu true
* @return void
*/
public function sort()
@@ -76,8 +86,11 @@ class Type extends Controller
'sort.between:0,9999' => '排序值必须为0~9999之间!',
]), 'id');
}
+
/**
* 删除工单类型
+ * @auth true
+ * @menu true
* @return void
*/
public function remove()
diff --git a/plugs/think-plugs-ticket/src/view/ticket/detail.html b/plugs/think-plugs-ticket/src/view/ticket/detail.html
index af6337a..7a5248f 100644
--- a/plugs/think-plugs-ticket/src/view/ticket/detail.html
+++ b/plugs/think-plugs-ticket/src/view/ticket/detail.html
@@ -93,11 +93,12 @@
{elseif $step.status == 1}
-
+
审核通过
{elseif $step.status == 0}
+
审核中
{/if}