fix ProductStockList.vue style

This commit is contained in:
Timi
2026-09-03 16:45:37 +08:00
parent 8ca2de5676
commit 9b82ec6a04
5 changed files with 200 additions and 185 deletions
+5 -66
View File
@@ -2,17 +2,11 @@
<div v-can="permissionCodes.productStock.read" class="product-stock-detail">
<t-loading v-if="isLoading" class="loading" size="32px" />
<template v-else-if="product && stock">
<section class="hero" v-entrance-transition>
<span class="eyebrow" v-text="'库存中心'" />
<div class="hero-title">
<h1 v-text="product.name || '未命名产品'" />
<product-profile :product="product">
<template #tags>
<t-tag :content="getStockStatusText(stock)" variant="light-outline" :theme="getStockTheme(stock)" />
</div>
<div class="hero-meta">
<span v-text="product.code || '无产品编码'" />
<strong v-text="`${getProductQuantityText(stock.availableQuantity)} ${getProductBaseUnitName(product)}`" />
</div>
</section>
</template>
</product-profile>
<card-container title="库存余额">
<t-cell-group theme="card" class="summary">
<t-cell title="产品" :note="product.name || '未命名产品'" />
@@ -68,6 +62,7 @@
import { Time } from "timi-web";
import { useUserStore } from "timi-web-api";
import ProductAPI from "@/api/ProductAPI";
import ProductProfile from "@/pages/product/component/ProductProfile.vue";
import ProductStockOperationDialog from "@/pages/product/ProductStockOperationDialog.vue";
import { useNavBarStore } from "@/store/navBarStore";
import type { Product, ProductStock, StockOperationType, StockRecord } from "@/types/Product";
@@ -169,51 +164,6 @@ onUnmounted(() => navBarStore.clearRight());
display: grid;
padding: calc(var(--app-nav-height) + 1rem) 0 1rem;
.hero {
margin: 0 1rem;
padding: 1rem;
background: linear-gradient(135deg, #eff6ff, #f0fdf4);
box-shadow: var(--td-shadow-1);
border-radius: 1.25rem;
.eyebrow {
color: #2563eb;
display: block;
font-size: .6875rem;
font-weight: 700;
letter-spacing: .08em;
}
.hero-title {
gap: .5rem;
display: flex;
margin-top: .35rem;
align-items: center;
justify-content: space-between;
}
h1 {
margin: 0;
font-size: 1.25rem;
line-height: 1.35;
}
.hero-meta {
gap: .75rem;
display: flex;
margin-top: .6rem;
color: var(--td-text-color-secondary);
align-items: center;
justify-content: space-between;
}
strong {
color: #0f766e;
font-size: 1.2rem;
white-space: nowrap;
}
}
.loading {
margin: 3rem auto;
}
@@ -254,15 +204,4 @@ onUnmounted(() => navBarStore.clearRight());
}
}
:global(html.theme-dark) .product-stock-detail .hero {
background: linear-gradient(135deg, rgba(37, 99, 235, .2), rgba(15, 118, 110, .18));
.eyebrow {
color: #93c5fd;
}
strong {
color: #99f6e4;
}
}
</style>