初始化

This commit is contained in:
2026-08-08 18:28:49 +08:00
parent 9bef4420e0
commit f082037a6e
854 changed files with 217171 additions and 11 deletions
+73
View File
@@ -0,0 +1,73 @@
<?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/payableAdd" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i> 添加应付</a>
</div>
</div>
<div class="box-body table-responsive no-padding">
<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 style="width:150px">操作</th>
</tr>
</thead>
<tbody>
<?php if (!empty($records)): ?>
<?php foreach ($records as $r): ?>
<?php
$unpaid = (float)$r['amount'] - (float)($r['paid_amount'] ?? 0);
?>
<tr>
<td><?php echo $r['id']; ?></td>
<td><?php echo htmlspecialchars($r['party_name']); ?></td>
<td>&yen;<?php echo number_format($r['amount'], 2); ?></td>
<td>&yen;<?php echo number_format($r['paid_amount'] ?? 0, 2); ?></td>
<td>
<span class="label label-<?php echo $unpaid > 0 ? 'warning' : 'success'; ?>">
&yen;<?php echo number_format($unpaid, 2); ?>
</span>
</td>
<td><?php echo htmlspecialchars($r['due_date']); ?></td>
<td>
<?php
$statusLabels = ['pending'=>'待付','partial'=>'部分付','paid'=>'已付','overdue'=>'逾期'];
$statusColors = ['pending'=>'warning','partial'=>'info','paid'=>'success','overdue'=>'danger'];
$st = $r['status'] ?? 'pending';
?>
<span class="label label-<?php echo $statusColors[$st] ?? 'default'; ?>">
<?php echo $statusLabels[$st] ?? $st; ?>
</span>
</td>
<td><?php echo htmlspecialchars($r['operator']); ?></td>
<td>
<a href="<?php echo BASE_URL; ?>/Finance/payableEdit?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/payableDelete" 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="9" class="text-center text-muted">暂无应付账款</td></tr>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<?php include APP_PATH . 'app/views/layouts/admin_footer.php'; ?>