diff --git a/src/views/erp/stock/stock/index.vue b/src/views/erp/stock/stock/index.vue index 9f3c577d..e8e15614 100644 --- a/src/views/erp/stock/stock/index.vue +++ b/src/views/erp/stock/stock/index.vue @@ -117,36 +117,19 @@ @@ -244,8 +227,6 @@ const formatStockDisplay = (value: string | undefined) => { .filter(Boolean) } -const AREA_STOCK_VISIBLE_COUNT = 2 - const getAreaStockDisplayList = (value: StockVO['areaStocks']) => { if (!Array.isArray(value)) return [] return value @@ -253,14 +234,6 @@ const getAreaStockDisplayList = (value: StockVO['areaStocks']) => { .filter((item): item is string => Boolean(item)) } -const getVisibleAreaStockDisplayList = (value: StockVO['areaStocks']) => { - return getAreaStockDisplayList(value).slice(0, AREA_STOCK_VISIBLE_COUNT) -} - -const getHiddenAreaStockCount = (value: StockVO['areaStocks']) => { - return Math.max(getAreaStockDisplayList(value).length - AREA_STOCK_VISIBLE_COUNT, 0) -} - const getStockDisplayStyle = (categoryType: number | string | undefined) => { const dict = getDictObj(DICT_TYPE.MATERIAL_CLASSIFICATION_TYPE, categoryType) if (dict?.cssClass && isHexColor(dict.cssClass)) { @@ -399,40 +372,16 @@ onMounted(async () => { white-space: nowrap; } -.area-stock-summary { - display: inline-flex; +.area-stock-list { + display: flex; + flex-direction: column; align-items: center; - justify-content: center; - gap: 6px; - max-width: 100%; - vertical-align: middle; -} - -.area-stock-tag { - max-width: 108px; - padding: 1px 6px; - overflow: hidden; + gap: 4px; line-height: 20px; - text-overflow: ellipsis; - white-space: nowrap; - background: var(--el-fill-color-light); - border: 1px solid var(--el-border-color-light); - border-radius: 4px; } -.area-stock-more { - flex-shrink: 0; - font-weight: 500; - white-space: nowrap; -} - -.area-stock-detail { - max-height: 260px; - overflow-y: auto; - line-height: 22px; -} - -.area-stock-detail__item + .area-stock-detail__item { - margin-top: 6px; +.area-stock-list__item { + max-width: 100%; + word-break: break-all; }