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} 件

+
+
+
+
+
+
+ +
+
+
+ +
+

{$t_1_0} 笔

+
+
+
+
+
+ +
+

{$t_1_1} 笔

+
+
+
+
+
+ +
+

{$t_1_2} 笔

+
+
+
+
+
+ +
+

{$t_1_3} 笔

+
+
+
+
+
+
+ +
+
+
+ +
+

{$t_2_0_0} 个

+
+
+
+
+
+ +
+

{$t_2_1_0} 个

+
+
+
+
+
+ +
+

{$t_2_2_0} 个

+
+
+
+ +
+
+ +
+

{$t_2_0_1} 个

+
+
+
+
+
+ +
+

{$t_2_1_1} 个

+
+
+
+
+
+ +
+

{$t_2_2_1} 个

+
+
+
+
+
+
+
+
+
+ +
+

总数: {$t_3_0} 条

+
+
+
+
+
+ +
+

待审核: {$t_3_1} 条

+
+
+
+
+
+ +
+

已审核: {$t_3_2} 条

+
+
+
+
+
+
+
+ +{/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'} +
+ {$title|lang} +
{block name='button'}{/block}
+
+ {/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'} +
+ {$title|lang} +
{block name='button'}{/block}
+
+ {/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}