195 lines
8.3 KiB
PHP
Executable File
195 lines
8.3 KiB
PHP
Executable File
<?php
|
|
/* Smarty version 5.3.1, created on 2025-01-31 20:26:52
|
|
from 'file:admin/invoice/view.tpl' */
|
|
|
|
/* @var \Smarty\Template $_smarty_tpl */
|
|
if ($_smarty_tpl->getCompiled()->isFresh($_smarty_tpl, array (
|
|
'version' => '5.3.1',
|
|
'unifunc' => 'content_679cc18ce782c2_45522765',
|
|
'has_nocache_code' => false,
|
|
'file_dependency' =>
|
|
array (
|
|
'64c5e2b26ac1422ad2a9d0cff37fed3625a0a495' =>
|
|
array (
|
|
0 => 'admin/invoice/view.tpl',
|
|
1 => 1712762115,
|
|
2 => 'file',
|
|
),
|
|
),
|
|
'includes' =>
|
|
array (
|
|
'file:admin/header.tpl' => 1,
|
|
'file:admin/footer.tpl' => 1,
|
|
),
|
|
))) {
|
|
function content_679cc18ce782c2_45522765 (\Smarty\Template $_smarty_tpl) {
|
|
$_smarty_current_dir = '/www/wwwroot/xiaofu.cloud/resources/views/tabler/admin/invoice';
|
|
$_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 my-3">账单 #<?php echo $_smarty_tpl->getValue('invoice')->id;?>
|
|
</span>
|
|
</h2>
|
|
<div class="page-pretitle">
|
|
<span class="home-subtitle">账单详情</span>
|
|
</div>
|
|
</div>
|
|
<?php if ($_smarty_tpl->getValue('invoice')->status === 'unpaid') {?>
|
|
<div class="col-auto">
|
|
<div class="btn-list">
|
|
<button href="#" class="btn btn-primary" data-bs-toggle="modal"
|
|
data-bs-target="#mark_paid_confirm_dialog">
|
|
<i class="icon ti ti-checklist"></i>
|
|
标记为支付
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<?php }?>
|
|
</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('invoice')->user_id;?>
|
|
</div>
|
|
</div>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">关联订单 ID</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('invoice')->order_id;?>
|
|
</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_text;?>
|
|
</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>
|
|
<?php if ($_smarty_tpl->getValue('invoice')->status === 'paid_gateway') {?>
|
|
<div class="datagrid-item">
|
|
<div class="datagrid-title">支付网关单号</div>
|
|
<div class="datagrid-content"><?php echo $_smarty_tpl->getValue('paylist')->tradeno;?>
|
|
</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="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_detail');
|
|
$foreach0DoElse = true;
|
|
foreach ($_from ?? [] as $_smarty_tpl->getVariable('invoice_content_detail')->value) {
|
|
$foreach0DoElse = false;
|
|
?>
|
|
<tr>
|
|
<td><?php echo $_smarty_tpl->getValue('invoice_content_detail')->name;?>
|
|
</td>
|
|
<td><?php echo $_smarty_tpl->getValue('invoice_content_detail')->price;?>
|
|
</td>
|
|
</tr>
|
|
<?php
|
|
}
|
|
$_smarty_tpl->getSmarty()->getRuntime('Foreach')->restore($_smarty_tpl, 1);?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal modal-blur fade" id="mark_paid_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_mark_paid" type="button" class="btn btn-primary" data-bs-dismiss="modal">确认
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php echo '<script'; ?>
|
|
>
|
|
$("#confirm_mark_paid").click(function () {
|
|
$.ajax({
|
|
url: "/admin/invoice/<?php echo $_smarty_tpl->getValue('invoice')->id;?>
|
|
/mark_paid",
|
|
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);
|
|
}
|
|
}
|