修改模板文件

This commit is contained in:
邹景立 2021-04-07 19:27:37 +08:00
parent 45b10f52ec
commit b0541d6d5a
6 changed files with 15 additions and 16 deletions

View File

@ -19,7 +19,7 @@
{/block}
{block name="content"}
<div class="layui-tab layui-tab-card think-bg-white'amount'">
<div class="layui-tab layui-tab-card think-bg-white">
<ul class="layui-tab-title">
{foreach ['all'=>'系统用户','recycle'=>'回 收 站'] as $k=>$v}
{if isset($type) and $type eq $k}

View File

@ -52,8 +52,7 @@ class Order extends Controller
// 状态数据统计
$this->total = ['t0' => 0, 't1' => 0, 't2' => 0, 't3' => 0, 't4' => 0, 't5' => 0, 't6' => 0, 'ta' => 0];
foreach ($this->app->db->name($this->table)->field('status,count(1) total')->group('status')->cursor() as $vo) {
$this->total["t{$vo['status']}"] = $vo['total'];
$this->total["ta"] += $vo['total'];
[$this->total["t{$vo['status']}"] = $vo['total'], $this->total["ta"] += $vo['total']];
}
// 订单列表查询
$query = $this->_query($this->table);

View File

@ -23,13 +23,13 @@
{/block}
{block name="content"}
<div class="layui-tab layui-tab-card think-bg-white'amount'">
<div class="layui-tab layui-tab-card think-bg-white">
<ul class="layui-tab-title">
{foreach ['index'=>'快递公司','recycle'=>'回 收 站'] as $k=>$v}
{if $type eq $k}
<li class="layui-this" data-open="{:url('index')}?type={$k}">{$v}</li>
{if isset($type) and $type eq $k}
<li class="layui-this" data-open="{:url('index')}?type={$k}"><b>{$v}</b></li>
{else}
<li data-open="{:url('index')}?type={$k}">{$v}</li>
<li data-open="{:url('index')}?type={$k}"><b>{$v}</b></li>
{/if}{/foreach}
</ul>
<div class="layui-tab-content">

View File

@ -21,13 +21,13 @@
{/block}
{block name="content"}
<div class="layui-tab layui-tab-card think-bg-white'amount'">
<div class="layui-tab layui-tab-card think-bg-white">
<ul class="layui-tab-title">
{foreach ['index'=>'商品管理','recycle'=>'回 收 站'] as $k=>$v}
{if isset($type) and $type eq $k}
<li class="layui-this" data-open="{:url('index')}?type={$k}">{$v}</li>
<li class="layui-this" data-open="{:url('index')}?type={$k}"><b>{$v}</b></li>
{else}
<li data-open="{:url('index')}?type={$k}">{$v}</li>
<li data-open="{:url('index')}?type={$k}"><b>{$v}</b></li>
{/if}{/foreach}
</ul>
<div class="layui-tab-content">

View File

@ -9,11 +9,11 @@
{block name="content"}
<div class="layui-tab layui-tab-card">
<ul class="layui-tab-title notselect">
{foreach ['ta'=>'全部订单','t2'=>'待支付的订单','t3'=>'待审核的订单','t4'=>'待发货的订单','t5'=>'待收货的订单','t6'=>'已完成的订单','t0'=>'已取消的订单'] as $k=>$v}
{if isset($type) and 't'.$type eq $k}
<li class="layui-this" data-open="{:url('index')}?type={$k}">{$v}<sup class="layui-badge border-radius">{$total[$k]??0}</sup></li>
{php}$types = ['ta' => '全部订单', 't2' => '待支付的订单', 't3' => '待审核的订单', 't4' => '待发货的订单', 't5' => '待收货的订单', 't6' => '已完成的订单', 't0' => '已取消的订单'];{/php}
{foreach $types as $k=>$v}{if isset($type) and 't'.$type eq $k}
<li class="layui-this" data-open="{:url('index')}?type={$k}"><b>{$v}</b><sup class="layui-badge border-radius">{$total[$k]??0}</sup></li>
{else}
<li data-open="{:url('index')}?type={$k}">{$v}<sup class="layui-badge border-radius">{$total[$k]??0}</sup></li>
<li data-open="{:url('index')}?type={$k}"><b>{$v}</b><sup class="layui-badge border-radius">{$total[$k]??0}</sup></li>
{/if}{/foreach}
</ul>
<div class="layui-tab-content">

View File

@ -11,9 +11,9 @@
<ul class="layui-tab-title notselect">
{foreach ['ta'=>'全部订单','t1'=>'待发货的订单','t2'=>'已发货的订单','t0'=>'已取消的订单'] as $k => $v}
{if isset($type) and 't'.$type eq $k}
<li class="layui-this" data-open="{:url('index')}?type={$k}">{$v}<sup class="layui-badge border-radius">{$total[$k]??0}</sup></li>
<li class="layui-this" data-open="{:url('index')}?type={$k}"><b>{$v}</b><sup class="layui-badge border-radius">{$total[$k]??0}</sup></li>
{else}
<li data-open="{:url('index')}?type={$k}">{$v}<sup class="layui-badge border-radius">{$total[$k]??0}</sup></li>
<li data-open="{:url('index')}?type={$k}"><b>{$v}</b><sup class="layui-badge border-radius">{$total[$k]??0}</sup></li>
{/if}{/foreach}
</ul>
<div class="layui-tab-content">