302 lines
14 KiB
PHP
Executable File
302 lines
14 KiB
PHP
Executable File
<?php
|
|
/* Smarty version 5.3.1, created on 2024-11-18 20:55:59
|
|
from 'file:admin/order/view.tpl' */
|
|
|
|
/* @var \Smarty\Template $_smarty_tpl */
|
|
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
|
|
'version' => '5.3.1',
|
|
'unifunc' => 'content_673b395f7bfac2_40791883',
|
|
'has_nocache_code' => false,
|
|
'file_dependency' =>
|
|
array (
|
|
'3d5f199650e3b339d14dd6eb8a4b2c9ff55b00c1' =>
|
|
array (
|
|
0 => 'admin/order/view.tpl',
|
|
1 => 1712762115,
|
|
2 => 'file',
|
|
),
|
|
),
|
|
'includes' =>
|
|
array (
|
|
'file:admin/header.tpl' => 1,
|
|
'file:admin/footer.tpl' => 1,
|
|
),
|
|
))) {
|
|
function content_673b395f7bfac2_40791883 (\Smarty\Template $_smarty_tpl) {
|
|
$_smarty_current_dir = '/private/var/www/wwwroot/crc.loc/resources/views/tabler/admin/order';
|
|
$_smarty_tpl->renderSubTemplate('file:admin/header.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
|
|
?>
|
|
|
|
<div class="page-wrapper">
|
|
<div class="container-xl">
|
|
<div class="page-header d-print-none text-white">
|
|
<div class="row align-items-center">
|
|
<div class="col">
|
|
<h2 class="page-title">
|
|
<span class="home-title">订单 #<?php echo $_smarty_tpl->getValue('order')->id;?>
|
|
</span>
|
|
</h2>
|
|
<div class="page-pretitle my-3">
|
|
<span class="home-subtitle">订单详情</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-auto">
|
|
<div class="btn-list">
|
|
<a href="/admin/user/<?php echo $_smarty_tpl->getValue('order')->user_id;?>
|
|
/edit" targer="_blank" class="btn btn-primary">
|
|
<i class="icon ti ti-user"></i>
|
|
查看关联用户
|
|
</a>
|
|
<a href="/admin/invoice/<?php echo $_smarty_tpl->getValue('invoice')->id;?>
|
|
/view" targer="_blank" class="btn btn-primary">
|
|
<i class="icon ti ti-file-dollar"></i>
|
|
查看关联账单
|
|
</a>
|
|
<?php if ($_smarty_tpl->getValue('order')->status === 'pending_payment') {?>
|
|
<button href="#" class="btn btn-red" data-bs-toggle="modal"
|
|
data-bs-target="#cancel_order_confirm_dialog">
|
|
<i class="icon ti ti-x"></i>
|
|
取消订单
|
|
</button>
|
|
<?php }?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="page-body">
|
|
<div class="container-xl">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h3 class="card-title">基本信息</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="datagrid">
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">提交用户</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('order')->user_id;?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">商品ID</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('order')->product_id;?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">商品类型</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('order')->product_type_text;?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">商品名称</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('order')->product_name;?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">订单优惠码</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('order')->coupon;?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">订单金额</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('order')->price;?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">订单状态</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('order')->status_text;?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">创建时间</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('order')->create_time;?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">更新时间</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('order')->update_time;?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card my-3">
|
|
<div class="card-header">
|
|
<h3 class="card-title">商品内容</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="datagrid">
|
|
<?php if ($_smarty_tpl->getValue('order')->product_type === 'tabp' || $_smarty_tpl->getValue('order')->product_type === 'time') {?>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">商品时长 (天)</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('order')->content->time;?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">等级时长 (天)</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('order')->content->class_time;?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">等级</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('order')->content->class;?>
|
|
</div>
|
|
</div>
|
|
<?php }?>
|
|
<?php if ($_smarty_tpl->getValue('order')->product_type === 'tabp' || $_smarty_tpl->getValue('order')->product_type === 'bandwidth') {?>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">可用流量 (GB)</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('order')->content->bandwidth;?>
|
|
</div>
|
|
</div>
|
|
<?php }?>
|
|
<?php if ($_smarty_tpl->getValue('order')->product_type === 'tabp' || $_smarty_tpl->getValue('order')->product_type === 'time') {?>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">用户分组</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('order')->content->node_group;?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">速率限制 (Mbps)</div>
|
|
<div class="datagrid-content">
|
|
<?php if ($_smarty_tpl->getValue('order')->content->ip_limit === '0') {?>
|
|
不限制
|
|
<?php } else { ?>
|
|
<?php echo $_smarty_tpl->getValue('order')->content->speed_limit;?>
|
|
|
|
<?php }?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">同时连接IP限制</div>
|
|
<div class="datagrid-content">
|
|
<?php if ($_smarty_tpl->getValue('order')->content->ip_limit === '0') {?>
|
|
不限制
|
|
<?php } else { ?>
|
|
<?php echo $_smarty_tpl->getValue('order')->content->ip_limit;?>
|
|
|
|
<?php }?>
|
|
</div>
|
|
</div>
|
|
<?php }?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card my-3">
|
|
<div class="card-header">
|
|
<h3 class="card-title">关联账单</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="datagrid">
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">账单内容</div>
|
|
<div class="datagrid-content">
|
|
<div class="table-responsive">
|
|
<table id="invoice_content_table" class="table table-vcenter card-table">
|
|
<thead>
|
|
<tr>
|
|
<th>名称</th>
|
|
<th>价格</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php
|
|
$_from = $_smarty_tpl->getSmarty()->getRuntime('Foreach')->init($_smarty_tpl, $_smarty_tpl->getValue('invoice')->content, 'invoice_content');
|
|
$foreach0DoElse = true;
|
|
foreach ($_from ?? [] as $_smarty_tpl->getVariable('invoice_content')->value) {
|
|
$foreach0DoElse = false;
|
|
?>
|
|
<tr>
|
|
<td><?php echo $_smarty_tpl->getValue('invoice_content')->name;?>
|
|
</td>
|
|
<td><?php echo $_smarty_tpl->getValue('invoice_content')->price;?>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">账单金额</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('invoice')->price;?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">账单状态</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('invoice')->status;?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">创建时间</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('invoice')->create_time;?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">更新时间</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('invoice')->update_time;?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">支付时间</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('invoice')->pay_time;?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal modal-blur fade" id="cancel_order_confirm_dialog" tabindex="-1" role="dialog" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable" role="document">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title">取消订单</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="mb-3">
|
|
<p>
|
|
确认取消此订单?
|
|
<p>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn me-auto" data-bs-dismiss="modal">取消</button>
|
|
<button id="confirm_cancel" type="button" class="btn btn-primary" data-bs-dismiss="modal">确认
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php echo '<script'; ?>
|
|
>
|
|
$("#confirm_cancel").click(function () {
|
|
$.ajax({
|
|
url: "/admin/order/<?php echo $_smarty_tpl->getValue('order')->id;?>
|
|
/cancel",
|
|
type: 'POST',
|
|
dataType: "json",
|
|
success: function (data) {
|
|
if (data.ret === 1) {
|
|
$('#success-message').text(data.msg);
|
|
$('#success-dialog').modal('show');
|
|
} else {
|
|
$('#fail-message').text(data.msg);
|
|
$('#fail-dialog').modal('show');
|
|
}
|
|
}
|
|
})
|
|
});
|
|
<?php echo '</script'; ?>
|
|
>
|
|
|
|
<?php $_smarty_tpl->renderSubTemplate('file:admin/footer.tpl', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), (int) 0, $_smarty_current_dir);
|
|
}
|
|
}
|