This commit is contained in:
2025-09-22 14:04:04 +08:00
parent c32381f8ed
commit 8910ccd63c
5 changed files with 94 additions and 47 deletions

View File

@@ -218,10 +218,7 @@ onMounted(async () => {
</tr>
</thead>
<tbody>
<tr v-if="paginatedData.length === 0">
<td colspan="16" class="empty-tip">暂无数据请选择日期范围获取订单</td>
</tr>
<tr v-else v-for="row in paginatedData" :key="row.shopOrderNumber + (row.productNumber || '')">
<tr v-for="row in paginatedData" :key="row.shopOrderNumber + (row.productNumber || '')">
<td>{{ row.orderedAt || '-' }}</td>
<td>
<div class="image-container" v-if="row.productImage">
@@ -252,6 +249,13 @@ onMounted(async () => {
</table>
</div>
<div v-if="paginatedData.length === 0" class="empty-abs">
<div class="empty-container">
<div class="empty-icon">📄</div>
<div class="empty-text">暂无数据请获取订单</div>
</div>
</div>
<!-- 表格加载遮罩 -->
<div v-if="loading && !allOrderData.length" class="table-loading">
<div class="spinner"></div>
@@ -301,8 +305,8 @@ export default {
.empty-container { text-align: center; }
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.6; }
.empty-text { font-size: 14px; color: #909399; }
.table-section { flex: 1; overflow: hidden; position: relative; background: #fff; border: 1px solid #ebeef5; border-radius: 4px; }
.table-wrapper { height: 100%; overflow: auto; }
.table-section { flex: 1; overflow: hidden; position: relative; background: #fff; border: 1px solid #ebeef5; border-radius: 4px; display: flex; flex-direction: column; }
.table-wrapper { flex: 1; overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { background: #f5f7fa; color: #909399; font-weight: 600; padding: 12px 8px; border-bottom: 2px solid #ebeef5; text-align: left; }
.table td { padding: 10px 8px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
@@ -317,6 +321,11 @@ export default {
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.pagination-fixed { flex-shrink: 0; padding: 8px 12px; background: #f9f9f9; border-radius: 4px; display: flex; justify-content: center; border-top: 1px solid #ebeef5; margin-top: 8px; }
.tag { display: inline-block; padding: 2px 6px; font-size: 12px; background: #ecf5ff; color: #409EFF; border-radius: 3px; }
.empty-tip { text-align: center; color: #909399; padding: 16px 0; }
.empty-container { text-align: center; }
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.6; }
.empty-text { font-size: 14px; color: #909399; }
.empty-abs { position: absolute; left: 0; right: 0; top: 48px; bottom: 0; display: flex; align-items: center; justify-content: center; }
</style>