chore(admin-ui): migrate products list to list card and admin pagination
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
<div class="stat-box"><div class="muted">累计失败商品</div><strong class="num-sm">{{ $importHistoryStats['total_failed'] ?? 0 }}</strong></div>
|
||||
<div class="stat-box"><div class="muted">含失败批次</div><strong class="num-sm">{{ $importHistoryStats['warning_imports'] ?? 0 }}</strong></div>
|
||||
</div>
|
||||
<table>
|
||||
<table class="list-card-table">
|
||||
<thead><tr><th>ID</th><th>导入时间</th><th>商家</th><th>上传文件</th><th>结果</th><th>失败明细</th></tr></thead>
|
||||
<tbody>
|
||||
@forelse($importHistories->take(5) as $history)
|
||||
@@ -171,8 +171,13 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>商品列表</h3>
|
||||
<div class="card list-card">
|
||||
<div class="list-card-header">
|
||||
<div>
|
||||
<h3 class="list-card-title">商品列表</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-card-body">
|
||||
<form id="platform-batch-form" method="post" action="/admin/products/batch" onsubmit="return confirm('确认执行本次批量操作?');">
|
||||
@csrf
|
||||
@php
|
||||
@@ -195,7 +200,7 @@
|
||||
</div>
|
||||
</form>
|
||||
<p class="muted muted-tight">平台侧批量改分类会校验所选分类是否属于被勾选商品对应商家;若混选了不同商家的商品,请选择各自可用的分类或先分批处理。</p>
|
||||
<table>
|
||||
<table class="list-card-table">
|
||||
<thead><tr><th><input type="checkbox" data-check-all="platform-products"></th><th>ID</th><th>商家</th><th>标题</th><th>分类</th><th>SKU</th><th>售价/原价</th><th>库存</th><th>创建时间</th><th>更新时间</th><th>状态</th><th>操作</th></tr></thead>
|
||||
<tbody>
|
||||
@foreach($products as $product)
|
||||
@@ -216,7 +221,7 @@
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const master = document.querySelector('[data-check-all="platform-products"]');
|
||||
@@ -232,5 +237,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="pagination-wrap">{{ $products->links() }}</div>
|
||||
{{ $products->links('pagination.admin') }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user