初始化
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
include APP_PATH . 'app/views/layouts/admin_header.php';
|
||||
?>
|
||||
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title"><i class="fa fa-list"></i> 账务记录</h3>
|
||||
<div class="box-tools">
|
||||
<a href="<?php echo BASE_URL; ?>/Finance/accountsAdd" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> 添加记录</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<form method="get" class="form-inline" style="margin-bottom:15px;">
|
||||
<div class="form-group">
|
||||
<label>类型:</label>
|
||||
<select name="type" class="form-control input-sm">
|
||||
<option value="">全部</option>
|
||||
<option value="income" <?php echo ($typeFilter ?? '') === 'income' ? 'selected' : ''; ?>>收入</option>
|
||||
<option value="expense" <?php echo ($typeFilter ?? '') === 'expense' ? 'selected' : ''; ?>>支出</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>起始日期:</label>
|
||||
<input type="date" name="start_date" class="form-control input-sm" value="<?php echo htmlspecialchars($startDate ?? date('Y-m-01')); ?>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>截止日期:</label>
|
||||
<input type="date" name="end_date" class="form-control input-sm" value="<?php echo htmlspecialchars($endDate ?? date('Y-m-d')); ?>">
|
||||
</div>
|
||||
<button type="submit" class="btn btn-info btn-sm"><i class="fa fa-search"></i> 查询</button>
|
||||
</form>
|
||||
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>凭证号</th>
|
||||
<th>类型</th>
|
||||
<th>类别</th>
|
||||
<th>金额</th>
|
||||
<th>日期</th>
|
||||
<th>摘要</th>
|
||||
<th>往来单位</th>
|
||||
<th>支付方式</th>
|
||||
<th>操作人</th>
|
||||
<th style="width:150px">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (!empty($records)): ?>
|
||||
<?php foreach ($records as $r): ?>
|
||||
<tr>
|
||||
<td><?php echo $r['id']; ?></td>
|
||||
<td><?php echo htmlspecialchars($r['record_no']); ?></td>
|
||||
<td>
|
||||
<span class="label label-<?php echo $r['type'] === 'income' ? 'success' : 'danger'; ?>">
|
||||
<?php echo $r['type'] === 'income' ? '收入' : '支出'; ?>
|
||||
</span>
|
||||
</td>
|
||||
<td><?php echo htmlspecialchars($r['category']); ?></td>
|
||||
<td>¥<?php echo number_format($r['amount'], 2); ?></td>
|
||||
<td><?php echo htmlspecialchars($r['record_date']); ?></td>
|
||||
<td><?php echo htmlspecialchars($r['description']); ?></td>
|
||||
<td><?php echo htmlspecialchars($r['related_party']); ?></td>
|
||||
<td><?php echo htmlspecialchars($r['payment_method']); ?></td>
|
||||
<td><?php echo htmlspecialchars($r['operator']); ?></td>
|
||||
<td>
|
||||
<a href="<?php echo BASE_URL; ?>/Finance/accountsEdit?id=<?php echo $r['id']; ?>" class="btn btn-xs btn-info"><i class="fa fa-edit"></i> 编辑</a>
|
||||
<form method="post" action="<?php echo BASE_URL; ?>/Finance/accountsDelete" style="display:inline" onsubmit="return confirm('确定删除吗?');">
|
||||
<input type="hidden" name="csrf_token" value="<?php echo htmlspecialchars($csrfToken ?? ''); ?>">
|
||||
<input type="hidden" name="id" value="<?php echo $r['id']; ?>">
|
||||
<button type="submit" class="btn btn-xs btn-danger"><i class="fa fa-trash"></i> 删除</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php else: ?>
|
||||
<tr><td colspan="11" class="text-center text-muted">暂无账务记录</td></tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php include APP_PATH . 'app/views/layouts/admin_footer.php'; ?>
|
||||
Reference in New Issue
Block a user