hidden product/sku code
This commit is contained in:
@@ -28,8 +28,9 @@
|
||||
@click="viewStock"
|
||||
/>
|
||||
</t-cell-group>
|
||||
<t-cell-group title="SKU 列表" theme="card" class="units" v-entrance-transition="210">
|
||||
<t-cell-group title="SKU 列表" theme="card" class="skus" v-entrance-transition="210">
|
||||
<t-cell
|
||||
class="sku"
|
||||
v-for="sku in product.skuList || []"
|
||||
:key="sku.id || sku.code"
|
||||
role="button"
|
||||
@@ -38,14 +39,18 @@
|
||||
hover
|
||||
@click="openSkuDetail(sku)"
|
||||
>
|
||||
<template #leftIcon>
|
||||
<t-image
|
||||
v-if="getProductPhotoURL(sku)"
|
||||
:src="getProductPhotoURL(sku)"
|
||||
:alt="getSkuTitle(sku)"
|
||||
fit="cover"
|
||||
class="avatar"
|
||||
/>
|
||||
<div v-else class="avatar fallback" v-text="getSkuTitle(sku).slice(0, 1)" />
|
||||
</template>
|
||||
<template #title>
|
||||
<div class="title">
|
||||
<t-tag
|
||||
class="code"
|
||||
size="small"
|
||||
variant="light"
|
||||
:content="sku.code || '无编码'"
|
||||
/>
|
||||
<h5 class="name" v-text="getSkuTitle(sku)" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -162,7 +167,13 @@ import type { PhotoItem } from "@/types/Photo";
|
||||
import type { Product, ProductSku, ProductSkuUnit } from "@/types/Product";
|
||||
import { getAttachmentReadURL } from "@/utils/attachment";
|
||||
import { getErrorMessage } from "@/utils/error";
|
||||
import { formatProductAmount, getProductQuantityText, getProductSkuSpecEntries, getProductStatusText } from "@/utils/product";
|
||||
import {
|
||||
formatProductAmount,
|
||||
getProductPhotoURL,
|
||||
getProductQuantityText,
|
||||
getProductSkuSpecEntries,
|
||||
getProductStatusText
|
||||
} from "@/utils/product";
|
||||
import { Message } from "@/utils/message";
|
||||
import { permissionCodes } from "@/utils/permission";
|
||||
import { Text } from "timi-web";
|
||||
@@ -317,7 +328,15 @@ onUnmounted(() => navBarStore.clearRight());
|
||||
padding: calc(var(--app-nav-height) + 1rem) 0 1rem 0;
|
||||
flex-direction: column;
|
||||
|
||||
.units {
|
||||
.skus {
|
||||
|
||||
.sku {
|
||||
padding: 10px;
|
||||
|
||||
.avatar {
|
||||
width: 3.5rem;
|
||||
height: 3.5rem;
|
||||
}
|
||||
|
||||
.title {
|
||||
gap: .5rem;
|
||||
@@ -336,6 +355,7 @@ onUnmounted(() => navBarStore.clearRight());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sku-popup {
|
||||
max-height: 100%;
|
||||
|
||||
@@ -68,11 +68,6 @@
|
||||
</template>
|
||||
<template #description>
|
||||
<div class="description">
|
||||
<t-tag
|
||||
size="small"
|
||||
variant="outline"
|
||||
:content="item.code"
|
||||
/>
|
||||
<t-tag
|
||||
size="small"
|
||||
variant="outline"
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
>
|
||||
<t-cell-group v-if="productList.length" theme="card" class="list fix-last-cell-line">
|
||||
<t-cell
|
||||
class="item"
|
||||
v-for="(item, index) in productList"
|
||||
:key="item.productId"
|
||||
:title="item.productName || '未命名产品'"
|
||||
arrow
|
||||
hover
|
||||
class="item"
|
||||
v-entrance-transition="index * 30"
|
||||
@click="toSkuList(item)"
|
||||
>
|
||||
@@ -38,12 +38,6 @@
|
||||
/>
|
||||
<div v-else class="avatar fallback" v-text="(item.productName || '产').slice(0, 1)" />
|
||||
</template>
|
||||
<template #title>
|
||||
<div class="title">
|
||||
<strong v-text="item.productName || '未命名产品'" />
|
||||
<t-tag size="small" variant="outline" :content="item.productCode || '无产品编码'" />
|
||||
</div>
|
||||
</template>
|
||||
<template #description>
|
||||
<div class="stock">
|
||||
<span class="on-hand">
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<div class="description">
|
||||
<pass-time-label :timestamp="record.occurredAt" underline />
|
||||
<div class="delta">
|
||||
<span>库存变更:</span>
|
||||
<span>库存:</span>
|
||||
<span
|
||||
class="value"
|
||||
:class="getDeltaClass(record.onHandDelta)"
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
</t-cell-group>
|
||||
<t-cell-group v-if="skuStockList.length" theme="card" class="list fix-last-cell-line">
|
||||
<t-cell
|
||||
class="item"
|
||||
v-for="(item, index) in skuStockList"
|
||||
:key="item.skuId || item.id"
|
||||
:title="item.sku?.name || '未命名 SKU 明细'"
|
||||
arrow
|
||||
hover
|
||||
class="item"
|
||||
v-entrance-transition="index * 30"
|
||||
@click="toDetail(item)"
|
||||
>
|
||||
@@ -41,12 +41,6 @@
|
||||
/>
|
||||
<div v-else class="avatar fallback" v-text="(item.sku?.name || 'S').slice(0, 1)" />
|
||||
</template>
|
||||
<template #title>
|
||||
<div class="title">
|
||||
<strong v-text="item.sku?.name || '未命名 SKU 明细'" />
|
||||
<t-tag size="small" variant="outline" :content="item.sku?.code || '无 SKU 编码'" />
|
||||
</div>
|
||||
</template>
|
||||
<template #description>
|
||||
<div class="stock">
|
||||
<span class="on-hand">
|
||||
|
||||
Reference in New Issue
Block a user