cxhxy/runtime/store/temp/233e0da4a493f66c5eda33831df6debb.php
test_service d3170b4d1c 1
2023-12-01 15:43:29 +08:00

449 lines
23 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php /*a:5:{s:77:"/www/wwwroot/app.cxhxy.dev.1nww.com/app/store/view/food/shop/table/index.html";i:1700553054;s:67:"/www/wwwroot/app.cxhxy.dev.1nww.com/app/store/view/layout/food.html";i:1700553054;s:75:"/www/wwwroot/app.cxhxy.dev.1nww.com/app/store/view/food/shop/table/add.html";i:1700553054;s:76:"/www/wwwroot/app.cxhxy.dev.1nww.com/app/store/view/food/shop/table/edit.html";i:1700553054;s:78:"/www/wwwroot/app.cxhxy.dev.1nww.com/app/store/view/food/shop/table/qrcode.html";i:1700553054;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<title><?php echo htmlentities($app_name); ?>管理后台</title>
<meta name="author" content="<?php echo htmlentities($web['name']); ?>">
<meta name="keywords" content="<?php echo htmlentities($web['keywords']); ?>">
<meta name="description" content="<?php echo htmlentities($web['description']); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="referrer" content="no-referrer-when-downgrade">
<meta http-equiv="Cache-Control" content="no-siteapp"/>
<link rel="icon" href="/favicon.png" type="image/x-icon">
<link rel="stylesheet" href="/assets/plugins/amazeui/amazeui.css?v=<?php echo htmlentities($version); ?>"/>
<link rel="stylesheet" href="/assets/css/hema.app.css?v=<?php echo htmlentities($version); ?>"/>
<link rel="stylesheet" href="/addons/upload/css/file.library.css?v=<?php echo htmlentities($version); ?>"/>
<script src="/assets/plugins/jquery/jquery.min.js?v=<?php echo htmlentities($version); ?>"></script>
<link rel="stylesheet" href="/assets/plugins/iconfont/iconfont.css?v=<?php echo htmlentities($version); ?>">
<script src="/assets/plugins/iconfont/iconfont.js?v=<?php echo htmlentities($version); ?>"></script>
<script>
BASE_URL = "<?php echo isset($base_url) ? $base_url : ''; ?>";
STORE_URL = "<?php echo isset($store_url) ? $store_url : ''; ?>";
APPLET_ID = "<?php echo isset($applet_id) ? $applet_id : 0; ?>";
</script>
</head>
<body data-type="">
<div class="am-g tpl-g">
<!-- 头部 -->
<header class="tpl-header">
<!-- 右侧内容 -->
<div class="tpl-header-fluid">
<!-- 侧边切换 -->
<div class="am-fl tpl-header-button switch-button">
<i class="iconfont iconzhedie"></i>
</div>
<!-- 刷新页面 -->
<div class="am-fl tpl-header-button refresh-button">
<i class="iconfont iconshuaxin"></i>
</div>
<!-- 超链接-->
<div class="am-fl tpl-header-navbar">
<ul>
<!-- 网站首页 -->
<li class="am-text-sm">
<a href="/">
<i class="iconfont iconshouye"></i> 网站首页
</a>
</li>
</ul>
</div>
<!-- 其它功能-->
<div class="am-fr tpl-header-navbar">
<ul>
<li class="am-text-sm">
<div class="am-dropdown" data-am-dropdown="{boundary: '.am-topbar'}">
<div class="am-topbar-btn am-dropdown-toggle" data-am-dropdown-toggle>
<img src="<?php echo htmlentities($user['user']['avatar']); ?>" />
<?php echo htmlentities($user['user']['user_name']); ?>
<span class="am-icon-caret-down"></span>
</div>
<ul class="am-dropdown-content">
<li><a href="/user">用户中心</a></li>
<li><a href="/store/<?php echo htmlentities($app_type); ?>.setting/renew">修改密码</a></li>
<li><a href="/store/passport/<?php echo htmlentities($logout); ?>?app_type=<?php echo htmlentities($app_type); ?>">安全退出</a></li>
</ul>
</div>
</li>
</ul>
</div>
</div>
</header>
<!-- 侧边导航栏 -->
<div class="left-sidebar dis-flex">
<!-- 一级菜单 -->
<ul class="sidebar-nav">
<li class="sidebar-nav-heading"><?php echo htmlentities($app_name); ?> <small>V<?php echo htmlentities((isset($version) && ($version !== '')?$version:'1.0.0')); ?></small></li>
<?php foreach($menus as $key => $item): ?>
<li class="sidebar-nav-link">
<a href="<?php echo isset($item['index'])?url($item['index']):'javascript:void(0);'; ?>"
class="<?php echo !empty($item['active']) ? 'active' : ''; ?>">
<?php if(isset($item['is_svg']) && $item['is_svg'] === true): ?>
<svg class="icon sidebar-nav-link-logo" aria-hidden="true">
<use xlink:href="#<?php echo htmlentities($item['icon']); ?>"></use>
</svg>
<?php else: ?>
<i class="iconfont sidebar-nav-link-logo <?= $item['icon'] ?>"
style="color:<?php echo isset($item['color'])?$item['color']:''; ?>;"></i>
<?php endif; ?>
<?php echo htmlentities($item['name']); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
<!-- 子级菜单-->
<?php $second = isset($menus[$group]['submenu']) ? $menus[$group]['submenu'] : []; if(!empty($second)): ?>
<ul class="left-sidebar-second">
<li class="sidebar-second-title"><?php echo htmlentities($menus[$group]['name']); ?></li>
<li class="sidebar-second-item">
<?php foreach($second as $item): if(!isset($item['submenu'])): ?>
<!-- 二级菜单-->
<a href="<?= url($item['index']) ?>" class="<?= $item['active'] ? 'active' : '' ?>">
<?= $item['name']; ?>
</a>
<?php else: ?>
<!-- 三级菜单-->
<div class="sidebar-third-item">
<a href="javascript:void(0);"
class="sidebar-nav-sub-title <?php echo !empty($item['active']) ? 'active' : ''; ?>">
<i class="iconfont icongengduo"></i>
<?php echo htmlentities($item['name']); ?>
</a>
<ul class="sidebar-third-nav-sub">
<?php foreach($item['submenu'] as $third): ?>
<li>
<a class="<?php echo !empty($third['active']) ? 'active' : ''; ?>"
href="<?php echo url($third['index']); ?>">
<?php echo htmlentities($third['name']); ?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
<?php endforeach; ?>
</li>
</ul>
<?php endif; ?>
</div>
<!-- 内容区域 start -->
<div class="tpl-content-wrapper <?php echo empty($second) ? 'no-sidebar-second' : ''; ?>">
<div class="row-content am-cf">
<div class="row">
<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
<div class="widget am-cf">
<div class="widget-head am-cf">
<div class="widget-title am-cf">餐桌列表</div>
</div>
<div class="widget-body am-fr">
<!-- 工具栏 -->
<div class="page_toolbar am-margin-bottom am-cf">
<form class="toolbar-form" action="<?php echo url('food.shop.table/index'); ?>">
<div class="am-u-sm-12 am-u-md-3">
<div class="am-form-group">
<div class="am-btn-group am-btn-group-sm">
<a href="javascript:void(0);" class="hema-add am-btn am-btn-primary am-radius">
<span class="am-icon-plus"></span> 添加
</a>
</div>
</div>
</div>
<div class="am-u-sm-12 am-u-md-9">
<div class="am fr">
<?php if($user['applet']['shop_mode']['value']==20): ?>
<div class="am-form-group am-fl">
<select name="shop_id"
data-am-selected="{btnSize: 'sm', placeholder: '全部门店'}">
<option value=""></option>
<?php if(isset($category)): foreach($category as $item): ?>
<option value="<?php echo htmlentities($item['shop_id']); ?>" <?php echo $shop_id==$item['shop_id'] ? 'selected' : ''; ?>>
<?php echo htmlentities($item['shop_name']); ?>
</option>
<?php endforeach; ?>
<?php endif; ?>
</select>
</div>
<?php endif; ?>
<div class="am-form-group am-fl">
<div class="am-input-group am-input-group-sm tpl-form-border-form">
<input type="text" class="am-form-field" name="search"
placeholder="请输入餐桌/包间号" value="<?php echo htmlentities($search); ?>">
<div class="am-input-group-btn">
<button class="am-btn am-btn-default am-icon-search" type="submit"></button>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="am-scrollable-horizontal am-u-sm-12">
<table width="100%" class="am-table am-table-hover tpl-table-black">
<thead>
<tr>
<th>编号ID</th>
<th>餐桌名称</th>
<th>餐桌状态</th>
<th>餐桌码</th>
<th>所属门店</th>
<th>显示排序</th>
<th>添加时间</th>
<th>管理操作</th>
</tr>
</thead>
<tbody>
<?php if(sizeof($list)>0): foreach($list as $index => $item): ?>
<tr>
<td class="am-text-middle"><?php echo htmlentities($item['table_id']); ?></td>
<td class="am-text-middle">
<p class="item-title"><?php echo htmlentities($item['table_name']); ?></p>
</td>
<td class="am-text-middle">
<span class="<?php echo $item['status']['value']==10 ? 'x-color-green' : 'x-color-red'; ?>">
<?php echo htmlentities($item['status']['text']); ?>
</span>
</td>
<td class="am-text-middle">
<a class="hema-qrcode" data-index="<?php echo htmlentities($index); ?>" href="javascript:;">
<i class="iconfont iconerweima" style="font-size:25px;color:#2979ff;"></i>
</a>
</td>
<td class="am-text-middle"><?php echo htmlentities($item['shop']['shop_name']); ?></td>
<td class="am-text-middle"><?php echo htmlentities($item['sort']); ?></td>
<td class="am-text-middle"><?php echo htmlentities($item['create_time']); ?></td>
<td class="am-text-middle">
<div class="tpl-table-black-operation">
<a href="javascript:;" class="hema-edit" data-id="<?php echo htmlentities($item['table_id']); ?>">
<i class="am-icon-pencil"></i> 编辑
</a>
<a href="javascript:;" class="hema-del tpl-table-black-operation-del"
data-id="<?php echo htmlentities($item['table_id']); ?>">
<i class="am-icon-trash"></i> 删除
</a>
</div>
</td>
</tr>
<?php endforeach; else: ?>
<tr>
<td colspan="8" class="am-text-center">暂无记录</td>
</tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 添加 -->
<script id="tpl-add" type="text/template">
<div class="am-padding-xs am-padding-top-sm">
{{ if(user.applet.shop_mode.value == 20) }}
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 所属门店 </label>
<div class="am-u-sm-9 am-u-end">
<select name="data[shop_id]" style="width:200px" required>
<option value="">请选择</option>
{{ if(category) }}
{{ each category }}
<option value="{{ $value.shop_id }}">{{ $value.shop_name }}</option>
{{ /each}}
{{ /if }}
</select>
</div>
</div>
{{ /if }}
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">餐桌名称 </label>
<div class="am-u-sm-9 am-u-end">
<input type="text" class="tpl-form-input" name="data[table_name]" value="" placeholder="请输入餐桌/包间名称" required>
</div>
</div>
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">餐桌编号 </label>
<div class="am-u-sm-9 am-u-end">
<input type="number" min="1" class="tpl-form-input" name="data[row_no]" required>
<small>顾客呼叫时使用最小值为1</small>
</div>
</div>
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">排序 </label>
<div class="am-u-sm-9 am-u-end">
<input type="number" class="tpl-form-input" name="data[sort]" value="100" required>
<small>数字越小越靠前</small>
</div>
</div>
</div>
</script>
<!-- 编辑 -->
<script id="tpl-edit" type="text/template">
<div class="am-padding-xs am-padding-top-sm">
{{ if(user.applet.shop_mode.value == 20) }}
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require"> 所属门店 </label>
<div class="am-u-sm-9 am-u-end">
<select name="data[shop_id]" style="width:200px" required>
<option value="">请选择</option>
{{ if(category) }}
{{ each category }}
<option value="{{ $value.shop_id }}" {{ $value.shop_id == model.shop_id ? 'selected' : '' }}>{{ $value.shop_name }}</option>
{{ /each}}
{{ /if }}
</select>
</div>
</div>
{{ /if }}
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">餐桌名称 </label>
<div class="am-u-sm-9 am-u-end">
<input type="text" class="tpl-form-input" name="data[table_name]" value="{{ model.table_name }}" placeholder="请输入餐桌/包间名称" required>
</div>
</div>
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">餐桌编号 </label>
<div class="am-u-sm-9 am-u-end">
<input type="number" min="1" class="tpl-form-input" name="data[row_no]" value="{{ model.row_no }}" required>
<small>顾客呼叫时使用最小值为1</small>
</div>
</div>
<div class="am-form-group">
<label class="am-u-sm-3 am-u-lg-2 am-form-label form-require">排序 </label>
<div class="am-u-sm-9 am-u-end">
<input type="number" class="tpl-form-input" name="data[sort]" value="{{ model.sort }}" required>
<small>数字越小越靠前</small>
</div>
</div>
</div>
</script>
<script id="tpl-qrcode" type="text/template">
<div class="am-padding-xs am-padding-top-sm">
<div class="user-qrcode">
{{ if qrcode.h5 }}
<img src="{{ qrcode.h5}}">
{{ else / }}
<div class="online">等待上线</div>
{{ /if }}
<div class="text">H5端</div>
</div>
<div class="user-qrcode">
{{ if qrcode.weixin }}
<img src="{{ qrcode.weixin}}">
{{ else / }}
<div class="online">等待上线</div>
{{ /if }}
<div class="text">微信小程序</div>
</div>
<div class="user-qrcode">
{{ if qrcode.alipay }}
<img src="{{ qrcode.alipay}}">
{{ else / }}
<div class="online">等待上线</div>
{{ /if }}
<div class="text">支付宝小程序</div>
</div>
<div class="user-qrcode">
{{ if qrcode.qrcode }}
<img src="{{ qrcode.qrcode}}">
{{ else / }}
<div class="online">等待上线</div>
{{ /if }}
<div class="text">小程序聚合码</div>
</div>
</div>
</script>
<script>
$(function () {
$('.hema-qrcode').click(function () {
let data = $(this).data();
let list = <?= json_encode($list)?>;
$.showAction({
title: '餐桌码',
area: '990px',
content: template('tpl-qrcode', {qrcode:list[data.index].qrcode}),
uCheck: true,
btn: ['取消'],
success: function ($content) {
},
btn2: function ($content) {
return true;
}
});
});
//添加
$('.hema-add').on('click', function () {
let model = {
category:<?= json_encode($category)?>,
user:<?= json_encode($user)?>
};
$.showAction({
title: '添加',
area: '750px',
content: template('tpl-add', model),
uCheck: true,
success: function ($content) {
$('#my-form').formPost({
url: "<?php echo url('food.shop.table/add'); ?>"
});
},
btn2: function ($content) {
return true;
}
});
});
//编辑
$('.hema-edit').on('click', function () {
var data = $(this).data();
$.get("<?php echo url('food.shop.table/edit'); ?>?id=" + data.id, function (result) {
if(result.code == 0){
$.show_error(result.msg);
return false;
}
let model = {
category:<?= json_encode($category)?>,
user:<?= json_encode($user)?>,
model:result.data.model
};
$.showAction({
title: '编辑',
area: '750px',
content: template('tpl-edit', model),
uCheck: true,
success: function ($content) {
$('#my-form').formPost({
url: "<?php echo url('food.shop.table/edit'); ?>?id=" + data.id
});
},
btn2: function ($content) {
return true;
}
});
});
});
// 删除元素
var url = "<?php echo url('food.shop.table/delete'); ?>";
$('.hema-del').del('id', url);
});
</script>
</div>
<!-- 内容区域 end -->
</div>
<script src="/assets/plugins/layer/layer.js?v=<?php echo htmlentities($version); ?>"></script>
<script src="/assets/plugins/jquery/jquery.form.min.js?v=<?php echo htmlentities($version); ?>"></script>
<script src="/assets/plugins/amazeui/amazeui.min.js?v=<?php echo htmlentities($version); ?>"></script>
<script src="/assets/js/hema.app.js?v=<?php echo htmlentities($version); ?>"></script>
<script src="/assets/js/webuploader.html5only.js?v=<?php echo htmlentities($version); ?>"></script>
<script src="/assets/js/art-template.js?v=<?php echo htmlentities($version); ?>"></script>
<script src="/addons/upload/js/file.library.js?v=<?php echo htmlentities($version); ?>"></script>
</body>
</html>