同步项目代码

This commit is contained in:
Anyon 2021-01-09 18:42:32 +08:00
parent 1525e48e0a
commit 988532dc3f
19 changed files with 50 additions and 616 deletions

View File

@ -1,91 +0,0 @@
<?php
namespace app\data\controller;
use think\admin\Controller;
/**
* 实体门店管理
* Class StoreItem
* @package app\data\controller
*/
class StoreItem extends Controller
{
/**
* 绑定数据表
* @var string
*/
private $table = 'DataStoreItem';
/**
* 实体门店管理
* @auth true
* @menu true
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function index()
{
$this->title = '实体门店管理';
$query = $this->_query($this->table);
// code,name,cover,slider,username,phone,remark,sort,type,status,deleted,business_hours_start,business_hours_after
### 地理位置标志
// region_province,region_city,region_area,region_address,region_longitude,region_latitude
### 字段描述
// type 0 支持自提1 不支持自提
// status 0 禁用0 启用
// business_weeks_works // 每周工作
// business_hours_start // 开始时间
// business_hours_after // 结束时间
$query->like('name')->equal('status')->dateBetween('create_at');
$query->where(['deleted' => 0])->order('sort desc,id desc')->page();
}
/**
* 添加实体门店
* @auth true
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function add()
{
$this->_form($this->table, 'form');
}
/**
* 编辑实体门店
* @auth true
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function edit()
{
$this->_form($this->table, 'form');
}
/**
* 修改实体门店状态
* @auth true
* @throws \think\db\exception\DbException
*/
public function state()
{
$this->_save($this->table, $this->_vali([
'status.in:0,1' => '状态值范围异常!',
'status.require' => '状态值不能为空!',
]));
}
/**
* 删除实体门店
* @auth true
* @throws \think\db\exception\DbException
*/
public function remove()
{
$this->_delete($this->table);
}
}

View File

@ -1,48 +0,0 @@
<?php
namespace app\data\controller;
use think\admin\Controller;
/**
* 门店核销管理
* Class StoreItem
* @package app\data\controller
*/
class StoreUsed extends Controller
{
/**
* 绑定数据表
* @var string
*/
private $table = 'DataStoreUsed';
/**
* 门店店员管理
* @auth true
* @menu true
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function index()
{
$this->title = '门店核销管理';
$query = $this->_query($this->table);
$query->order('id desc')->equal('status')->dateBetween('create_at')->page();
}
/**
* 修改核销状态
* @auth true
* @throws \think\db\exception\DbException
*/
public function state()
{
$this->_save($this->table, $this->_vali([
'status.in:0,1' => '状态值范围异常!',
'status.require' => '状态值不能为空!',
]));
}
}

View File

@ -1,83 +0,0 @@
<?php
namespace app\data\controller;
use think\admin\Controller;
/**
* 门店店员管理
* Class StoreUser
* @package app\data\controller
*/
class StoreUser extends Controller
{
/**
* 绑定数据表
* @var string
*/
private $table = 'DataStoreUser';
/**
* 门店店员管理
* @auth true
* @menu true
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function index()
{
$this->title = '门店店员管理';
$query = $this->_query($this->table);
$query->like('name')->equal('status')->dateBetween('create_at');
$query->where(['deleted' => 0])->order('sort desc,id desc')->page();
}
/**
* 添加门店店员
* @auth true
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function add()
{
$this->_form($this->table, 'form');
}
/**
* 编辑门店店员
* @auth true
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function edit()
{
$this->_form($this->table, 'form');
}
/**
* 修改门店店员状态
* @auth true
* @throws \think\db\exception\DbException
*/
public function state()
{
$this->_save($this->table, $this->_vali([
'status.in:0,1' => '状态值范围异常!',
'status.require' => '状态值不能为空!',
]));
}
/**
* 删除门店店员
* @auth true
* @throws \think\db\exception\DbException
*/
public function remove()
{
$this->_delete($this->table);
}
}

View File

@ -26,9 +26,9 @@ class Address extends Auth
{
$data = $this->_vali([
'uid.value' => $this->uuid,
'type.default' => 0,
'code.default' => '',
'idcode.default' => '',
'type.default' => 0,
'type.in:0,1' => '地址状态不在范围!',
'name.require' => '收货姓名不能为空!',
'phone.mobile' => '收货手机格式错误!',

View File

@ -114,13 +114,16 @@ class Order extends Auth
$order['amount_total'] = $order['amount_goods'] - $order['amount_reduct'];
// 支付金额不能为零
if ($order['amount_total'] <= 0) $order['amount_total'] = 0.01;
// 订单数据写入
// 写入订单商品数据
$this->app->db->name('ShopOrder')->insert($order);
$this->app->db->name('ShopOrderItem')->insertAll($items);
// 同步商品库存销量
// 同步商品库存销量
foreach ($codes as $code) GoodsService::instance()->syncStock($code);
// 返回订单数据接口
// 返回订单数据接口
$order['items'] = $items;
// 触发订单创建事件
$this->app->event->trigger('ShopOrderCreate', $order['order_no']);
// 返回处理成功数据
$this->success('预购订单创建成功,请补全收货地址', $order);
} catch (HttpResponseException $exception) {
throw $exception;
@ -129,6 +132,32 @@ class Order extends Auth
}
}
/**
* 模拟计算订单运费
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function express()
{
$data = $this->_vali([
'code.require' => '收货地址不能为空!',
'order_no.require' => '订单单号不能为空!',
]);
// 用户收货地址
$map = ['uid' => $this->uuid, 'code' => $data['code']];
$addr = $this->app->db->name('DataUserAddress')->where($map)->find();
if (empty($addr)) $this->error('用户收货地址异常!');
// 订单状态检查
$map = ['uid' => $this->uuid, 'order_no' => $data['order_no']];
$tCount = $this->app->db->name('ShopOrderItem')->where($map)->sum('truck_count');
// 根据地址计算运费
$map = ['status' => 1, 'deleted' => 0, 'order_no' => $data['order_no']];
$tCode = $this->app->db->name('ShopOrderItem')->where($map)->column('truck_tcode');
[$amount, , , $remark] = TruckService::instance()->amount($tCode, $addr['province'], $addr['city'], $tCount);
$this->success('计算运费成功', ['amount' => $amount, 'remark' => $remark]);
}
/**
* 订单信息完成
* @throws \think\db\exception\DataNotFoundException
@ -152,8 +181,8 @@ class Order extends Auth
if (empty($order)) $this->error('不能修改收货地址哦!');
// 根据地址计算运费
$map = ['status' => 1, 'deleted' => 0, 'order_no' => $data['order_no']];
$tCode = $this->app->db->name('ShopOrderItem')->where($map)->column('truck_tcode');
[$amount, $tCount, $tCode, $remark] = TruckService::instance()->amount($tCode, $addr['province'], $addr['city'], $tCount);
$tCodes = $this->app->db->name('ShopOrderItem')->where($map)->column('truck_tcode');
[$amount, $tCount, $tCode, $remark] = TruckService::instance()->amount($tCodes, $addr['province'], $addr['city'], $tCount);
// 创建订单发货信息
$express = [
'template_code' => $tCode, 'template_count' => $tCount, 'uid' => $this->uuid,
@ -176,6 +205,9 @@ class Order extends Auth
// 支付金额不能为零
if ($update['amount_total'] <= 0) $update['amount_total'] = 0.01;
if ($this->app->db->name('ShopOrder')->where($map)->update($update) !== false) {
// 触发订单确认事件
$this->app->event->trigger('ShopOrderPerfect', $order['order_no']);
// 返回处理成功数据
$this->success('订单确认成功!', ['order_no' => $order['order_no']]);
} else {
$this->error('订单确认失败,请稍候再试!');
@ -237,6 +269,9 @@ class Order extends Auth
'cancel_datetime' => date('Y-m-d H:i:s'),
]);
if ($result !== false && OrderService::instance()->syncStock($order['order_no'])) {
// 触发订单取消事件
$this->app->event->trigger('ShopOrderCancel', $order['order_no']);
// 返回处理成功数据
$this->success('订单取消成功!');
} else {
$this->error('订单取消失败,请稍候再试!');
@ -262,7 +297,9 @@ class Order extends Auth
if (empty($order)) $this->error('订单查询失败,请稍候再试!');
if (in_array($order['status'], [4])) {
if ($this->app->db->name('ShopOrder')->where($map)->update(['status' => 5]) !== false) {
// OrderService::instance()->syncConfrimOrderAmount($order['order_no']);
// 触发订单确认事件
$this->app->event->trigger('ShopOrderConfirm', $order['order_no']);
// 返回处理成功数据
$this->success('订单确认成功!');
} else {
$this->error('订单确认失败,请稍候再试!');

View File

@ -219,7 +219,10 @@ abstract class PaymentService
if (empty($data['payment_type'])) unset($data['payment_type']);
$this->app->db->name('ShopOrder')->where($map)->update($data);
// 调用用户升级机制
return OrderService::instance()->syncAmount($order['order_no']);
OrderService::instance()->syncAmount($order['order_no']);
// 触发订单更新事件
$this->app->event->trigger('ShopOrderPayment', $orderNo);
return true;
}
/**

View File

@ -191,7 +191,7 @@ class UserService extends Service
if (count($list) < 1) return $list;
$uids = array_unique(array_column($list, $keys));
$users = $this->app->db->name('DataUser')->whereIn('id', $uids)->column($column, 'id');
foreach ($list as &$vo) $vo[$bind] = $users[$keys] ?? [];
foreach ($list as &$vo) $vo[$bind] = $users[$vo['uid']] ?? [];
return $list;
}

View File

@ -1,23 +0,0 @@
<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
<div class="layui-card-body padding-left-40">
<label class="layui-form-item relative block">
<span class="color-green font-w7">标签名称</span>
<span class="color-desc margin-left-5">Mark Name</span>
<input class="layui-input" required placeholder="请输入标签名称" name="name" value="{$vo.name|default=''}"/>
<span class="help-block"><b>必填,</b>请填写分类名称系统管理建议字符不要太长一般4-6个汉字</span>
</label>
<div class="layui-form-item relative block">
<span class="color-green font-w7">标签描述</span>
<span class="color-desc margin-left-5">Mark Remark</span>
<label class="relative block">
<textarea class="layui-textarea" placeholder="请输入文档描述" name="desc">{$vo.desc|default=''}</textarea>
</label>
</div>
</div>
<div class="hr-line-dashed"></div>
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
<div class="layui-form-item text-center">
<button class="layui-btn" type='submit'>保存数据</button>
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
</div>
</form>

View File

@ -1,68 +0,0 @@
{extend name="../../admin/view/main"}
{block name="button"}
<!--{if auth("add")}-->
<button data-modal='{:url("add")}' data-title="添加标签" class='layui-btn layui-btn-sm layui-btn-primary'>添加标签</button>
<!--{/if}-->
<!--{if auth("remove")}-->
<button data-action='{:url("remove")}' data-rule="id#{key}" data-confirm="确定要删除这些标签吗?" class='layui-btn layui-btn-sm layui-btn-primary'>删除标签</button>
<!--{/if}-->
{/block}
{block name='content'}
<div class="think-box-shadow table-block">
{include file='store_item/index_search'}
<table class="layui-table margin-top-10" lay-skin="line">
{notempty name='list'}
<thead>
<tr>
<th class='list-table-check-td think-checkbox'>
<label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
</th>
<th class='list-table-sort-td'>
<button type="button" data-reload class="layui-btn layui-btn-xs"> </button>
</th>
<th class="text-left nowrap">标签名称</th>
<th class="text-left nowrap">标签状态</th>
<th class="text-left nowrap">创建时间</th>
<th class="text-left nowrap"></th>
</tr>
</thead>
{/notempty}
<tbody>
{foreach $list as $key=>$vo}
<tr data-dbclick>
<td class='list-table-check-td think-checkbox'>
<label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
</td>
<td class='list-table-sort-td'>
<label><input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input"></label>
</td>
<td class="text-left nowrap">{$vo.name|default=''}</td>
<td>{if $vo.status eq 0}<span class="color-red">已禁用</span>{elseif $vo.status eq 1}<span class="color-green">已激活</span>{/if}</td>
<td class="text-left nowrap">{$vo.create_at|format_datetime}</td>
<td class='text-left nowrap'>
<!--{if auth("edit")}-->
<a data-dbclick class="layui-btn layui-btn-sm" data-title="编辑标签" data-modal="{:url('edit')}?id={$vo.id}"> </a>
<!--{/if}-->
<!--{if auth("state") and $vo.status eq 1}-->
<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#0"> </a>
<!--{/if}-->
<!--{if auth("state") and $vo.status eq 0}-->
<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#1"> </a>
<!--{/if}-->
<!--{if auth("remove")}-->
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除该标签吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}"> </a>
<!--{/if}-->
</td>
</tr>
{/foreach}
</tbody>
</table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}

View File

@ -1,35 +0,0 @@
<fieldset>
<legend>条件搜索</legend>
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
<div class="layui-form-item layui-inline">
<label class="layui-form-label">标签名称</label>
<label class="layui-input-inline">
<input name="name" value="{:input('name','')}" placeholder="请输入标签名称" class="layui-input">
</label>
</div>
<div class="layui-form-item layui-inline">
<label class="layui-form-label">使用状态</label>
<div class="layui-input-inline">
<select class="layui-select" name="status">
{foreach [''=>'-- 全部 --','0'=>'已禁用的记录','1'=>'已激活的记录'] as $k=>$v}
{if $k.'' eq input('status')}
<option selected value="{$k}">{$v}</option>
{else}
<option value="{$k}">{$v}</option>
{/if}{/foreach}
</select>
</div>
</div>
<div class="layui-form-item layui-inline">
<label class="layui-form-label">创建时间</label>
<label class="layui-input-inline">
<input data-date-range name="create_at" value="{:input('create_at','')}" placeholder="请选择创建时间" class="layui-input">
</label>
</div>
<div class="layui-form-item layui-inline">
<button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
</div>
</form>
</fieldset>
<script>window.form.render()</script>

View File

@ -1,23 +0,0 @@
<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
<div class="layui-card-body padding-left-40">
<label class="layui-form-item relative block">
<span class="color-green font-w7">标签名称</span>
<span class="color-desc margin-left-5">Mark Name</span>
<input class="layui-input" required placeholder="请输入标签名称" name="name" value="{$vo.name|default=''}"/>
<span class="help-block"><b>必填,</b>请填写分类名称系统管理建议字符不要太长一般4-6个汉字</span>
</label>
<div class="layui-form-item relative block">
<span class="color-green font-w7">标签描述</span>
<span class="color-desc margin-left-5">Mark Remark</span>
<label class="relative block">
<textarea class="layui-textarea" placeholder="请输入文档描述" name="desc">{$vo.desc|default=''}</textarea>
</label>
</div>
</div>
<div class="hr-line-dashed"></div>
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
<div class="layui-form-item text-center">
<button class="layui-btn" type='submit'>保存数据</button>
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
</div>
</form>

View File

@ -1,68 +0,0 @@
{extend name="../../admin/view/main"}
{block name="button"}
<!--{if auth("add")}-->
<button data-modal='{:url("add")}' data-title="添加标签" class='layui-btn layui-btn-sm layui-btn-primary'>添加标签</button>
<!--{/if}-->
<!--{if auth("remove")}-->
<button data-action='{:url("remove")}' data-rule="id#{key}" data-confirm="确定要删除这些标签吗?" class='layui-btn layui-btn-sm layui-btn-primary'>删除标签</button>
<!--{/if}-->
{/block}
{block name='content'}
<div class="think-box-shadow table-block">
{include file='store_used/index_search'}
<table class="layui-table margin-top-10" lay-skin="line">
{notempty name='list'}
<thead>
<tr>
<th class='list-table-check-td think-checkbox'>
<label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
</th>
<th class='list-table-sort-td'>
<button type="button" data-reload class="layui-btn layui-btn-xs"> </button>
</th>
<th class="text-left nowrap">标签名称</th>
<th class="text-left nowrap">标签状态</th>
<th class="text-left nowrap">创建时间</th>
<th class="text-left nowrap"></th>
</tr>
</thead>
{/notempty}
<tbody>
{foreach $list as $key=>$vo}
<tr data-dbclick>
<td class='list-table-check-td think-checkbox'>
<label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
</td>
<td class='list-table-sort-td'>
<label><input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input"></label>
</td>
<td class="text-left nowrap">{$vo.name|default=''}</td>
<td>{if $vo.status eq 0}<span class="color-red">已禁用</span>{elseif $vo.status eq 1}<span class="color-green">已激活</span>{/if}</td>
<td class="text-left nowrap">{$vo.create_at|format_datetime}</td>
<td class='text-left nowrap'>
<!--{if auth("edit")}-->
<a data-dbclick class="layui-btn layui-btn-sm" data-title="编辑标签" data-modal="{:url('edit')}?id={$vo.id}"> </a>
<!--{/if}-->
<!--{if auth("state") and $vo.status eq 1}-->
<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#0"> </a>
<!--{/if}-->
<!--{if auth("state") and $vo.status eq 0}-->
<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#1"> </a>
<!--{/if}-->
<!--{if auth("remove")}-->
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除该标签吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}"> </a>
<!--{/if}-->
</td>
</tr>
{/foreach}
</tbody>
</table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}

View File

@ -1,35 +0,0 @@
<fieldset>
<legend>条件搜索</legend>
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
<div class="layui-form-item layui-inline">
<label class="layui-form-label">标签名称</label>
<label class="layui-input-inline">
<input name="name" value="{:input('name','')}" placeholder="请输入标签名称" class="layui-input">
</label>
</div>
<div class="layui-form-item layui-inline">
<label class="layui-form-label">使用状态</label>
<div class="layui-input-inline">
<select class="layui-select" name="status">
{foreach [''=>'-- 全部 --','0'=>'已禁用的记录','1'=>'已激活的记录'] as $k=>$v}
{if $k.'' eq input('status')}
<option selected value="{$k}">{$v}</option>
{else}
<option value="{$k}">{$v}</option>
{/if}{/foreach}
</select>
</div>
</div>
<div class="layui-form-item layui-inline">
<label class="layui-form-label">创建时间</label>
<label class="layui-input-inline">
<input data-date-range name="create_at" value="{:input('create_at','')}" placeholder="请选择创建时间" class="layui-input">
</label>
</div>
<div class="layui-form-item layui-inline">
<button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
</div>
</form>
</fieldset>
<script>window.form.render()</script>

View File

@ -1,23 +0,0 @@
<form class="layui-form layui-card" action="{:request()->url()}" data-auto="true" method="post" autocomplete="off">
<div class="layui-card-body padding-left-40">
<label class="layui-form-item relative block">
<span class="color-green font-w7">标签名称</span>
<span class="color-desc margin-left-5">Mark Name</span>
<input class="layui-input" required placeholder="请输入标签名称" name="name" value="{$vo.name|default=''}"/>
<span class="help-block"><b>必填,</b>请填写分类名称系统管理建议字符不要太长一般4-6个汉字</span>
</label>
<div class="layui-form-item relative block">
<span class="color-green font-w7">标签描述</span>
<span class="color-desc margin-left-5">Mark Remark</span>
<label class="relative block">
<textarea class="layui-textarea" placeholder="请输入文档描述" name="desc">{$vo.desc|default=''}</textarea>
</label>
</div>
</div>
<div class="hr-line-dashed"></div>
{notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}
<div class="layui-form-item text-center">
<button class="layui-btn" type='submit'>保存数据</button>
<button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗?" data-close>取消编辑</button>
</div>
</form>

View File

@ -1,68 +0,0 @@
{extend name="../../admin/view/main"}
{block name="button"}
<!--{if auth("add")}-->
<button data-modal='{:url("add")}' data-title="添加标签" class='layui-btn layui-btn-sm layui-btn-primary'>添加标签</button>
<!--{/if}-->
<!--{if auth("remove")}-->
<button data-action='{:url("remove")}' data-rule="id#{key}" data-confirm="确定要删除这些标签吗?" class='layui-btn layui-btn-sm layui-btn-primary'>删除标签</button>
<!--{/if}-->
{/block}
{block name='content'}
<div class="think-box-shadow table-block">
{include file='store_user/index_search'}
<table class="layui-table margin-top-10" lay-skin="line">
{notempty name='list'}
<thead>
<tr>
<th class='list-table-check-td think-checkbox'>
<label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
</th>
<th class='list-table-sort-td'>
<button type="button" data-reload class="layui-btn layui-btn-xs"> </button>
</th>
<th class="text-left nowrap">标签名称</th>
<th class="text-left nowrap">标签状态</th>
<th class="text-left nowrap">创建时间</th>
<th class="text-left nowrap"></th>
</tr>
</thead>
{/notempty}
<tbody>
{foreach $list as $key=>$vo}
<tr data-dbclick>
<td class='list-table-check-td think-checkbox'>
<label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
</td>
<td class='list-table-sort-td'>
<label><input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input"></label>
</td>
<td class="text-left nowrap">{$vo.name|default=''}</td>
<td>{if $vo.status eq 0}<span class="color-red">已禁用</span>{elseif $vo.status eq 1}<span class="color-green">已激活</span>{/if}</td>
<td class="text-left nowrap">{$vo.create_at|format_datetime}</td>
<td class='text-left nowrap'>
<!--{if auth("edit")}-->
<a data-dbclick class="layui-btn layui-btn-sm" data-title="编辑标签" data-modal="{:url('edit')}?id={$vo.id}"> </a>
<!--{/if}-->
<!--{if auth("state") and $vo.status eq 1}-->
<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#0"> </a>
<!--{/if}-->
<!--{if auth("state") and $vo.status eq 0}-->
<a class="layui-btn layui-btn-sm layui-btn-warm" data-action="{:url('state')}" data-value="id#{$vo.id};status#1"> </a>
<!--{/if}-->
<!--{if auth("remove")}-->
<a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要删除该标签吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}"> </a>
<!--{/if}-->
</td>
</tr>
{/foreach}
</tbody>
</table>
{empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
</div>
{/block}

View File

@ -1,35 +0,0 @@
<fieldset>
<legend>条件搜索</legend>
<form class="layui-form layui-form-pane form-search" action="{:request()->url()}" onsubmit="return false" method="get" autocomplete="off">
<div class="layui-form-item layui-inline">
<label class="layui-form-label">标签名称</label>
<label class="layui-input-inline">
<input name="name" value="{:input('name','')}" placeholder="请输入标签名称" class="layui-input">
</label>
</div>
<div class="layui-form-item layui-inline">
<label class="layui-form-label">使用状态</label>
<div class="layui-input-inline">
<select class="layui-select" name="status">
{foreach [''=>'-- 全部 --','0'=>'已禁用的记录','1'=>'已激活的记录'] as $k=>$v}
{if $k.'' eq input('status')}
<option selected value="{$k}">{$v}</option>
{else}
<option value="{$k}">{$v}</option>
{/if}{/foreach}
</select>
</div>
</div>
<div class="layui-form-item layui-inline">
<label class="layui-form-label">创建时间</label>
<label class="layui-input-inline">
<input data-date-range name="create_at" value="{:input('create_at','')}" placeholder="请选择创建时间" class="layui-input">
</label>
</div>
<div class="layui-form-item layui-inline">
<button class="layui-btn layui-btn-primary"><i class="layui-icon">&#xe615;</i> 搜 索</button>
</div>
</form>
</fieldset>
<script>window.form.render()</script>

View File

@ -205,9 +205,6 @@ return array(
'app\\data\\controller\\ShopOrderService' => $baseDir . '/app/data/controller/ShopOrderService.php',
'app\\data\\controller\\ShopTruckCompany' => $baseDir . '/app/data/controller/ShopTruckCompany.php',
'app\\data\\controller\\ShopTruckTemplate' => $baseDir . '/app/data/controller/ShopTruckTemplate.php',
'app\\data\\controller\\StoreItem' => $baseDir . '/app/data/controller/StoreItem.php',
'app\\data\\controller\\StoreUsed' => $baseDir . '/app/data/controller/StoreUsed.php',
'app\\data\\controller\\StoreUser' => $baseDir . '/app/data/controller/StoreUser.php',
'app\\data\\controller\\User' => $baseDir . '/app/data/controller/User.php',
'app\\data\\controller\\UserMessage' => $baseDir . '/app/data/controller/UserMessage.php',
'app\\data\\controller\\api\\Auth' => $baseDir . '/app/data/controller/api/Auth.php',

View File

@ -328,9 +328,6 @@ class ComposerStaticInit4f89fd0e0503ccf740f2fa5757825d7b
'app\\data\\controller\\ShopOrderService' => __DIR__ . '/../..' . '/app/data/controller/ShopOrderService.php',
'app\\data\\controller\\ShopTruckCompany' => __DIR__ . '/../..' . '/app/data/controller/ShopTruckCompany.php',
'app\\data\\controller\\ShopTruckTemplate' => __DIR__ . '/../..' . '/app/data/controller/ShopTruckTemplate.php',
'app\\data\\controller\\StoreItem' => __DIR__ . '/../..' . '/app/data/controller/StoreItem.php',
'app\\data\\controller\\StoreUsed' => __DIR__ . '/../..' . '/app/data/controller/StoreUsed.php',
'app\\data\\controller\\StoreUser' => __DIR__ . '/../..' . '/app/data/controller/StoreUser.php',
'app\\data\\controller\\User' => __DIR__ . '/../..' . '/app/data/controller/User.php',
'app\\data\\controller\\UserMessage' => __DIR__ . '/../..' . '/app/data/controller/UserMessage.php',
'app\\data\\controller\\api\\Auth' => __DIR__ . '/../..' . '/app/data/controller/api/Auth.php',

2
vendor/services.php vendored
View File

@ -1,5 +1,5 @@
<?php
// This file is automatically generated at:2021-01-08 13:03:11
// This file is automatically generated at:2021-01-09 18:42:18
declare (strict_types = 1);
return array (
0 => 'think\\admin\\Library',