diff --git a/src/pages/claim/shippingLabel.vue b/src/pages/claim/shippingLabel.vue index 41fde7f..30d11c8 100644 --- a/src/pages/claim/shippingLabel.vue +++ b/src/pages/claim/shippingLabel.vue @@ -8,7 +8,7 @@ :class="{ 'nav-manual-input--inactive': !showScanInput }" @click="toggleScanInput" > - {{ showScanInput ? '关闭手动输入' : '手动输入' }} + 输入框 @@ -294,7 +294,7 @@ .placeholder-text { margin-top: 24rpx; - font-size: 28rpx; + font-size: 38rpx; color: #909399; } @@ -309,7 +309,7 @@ border-radius: 12rpx; .unclaimed-wave-count-label { - font-size: 32rpx; + font-size: 36rpx; font-weight: bold; color: #D46B08; } @@ -339,7 +339,7 @@ background-color: #D9F7BE; .claim-info-header-text { - font-size: 32rpx; + font-size: 36rpx; font-weight: bold; color: #389E0D; } @@ -392,7 +392,7 @@ } .nav-manual-input-text { - font-size: 28rpx; + font-size: 36rpx; color: #ffffff; white-space: nowrap; } @@ -419,7 +419,7 @@ align-items: baseline; .claim-footer-total-label { - font-size: 28rpx; + font-size: 36rpx; color: #606266; margin-right: 8rpx; } @@ -437,7 +437,7 @@ border-radius: 8rpx; .claim-footer-btn-text { - font-size: 30rpx; + font-size: 36rpx; color: #ffffff; white-space: nowrap; } diff --git a/src/pages/warehouse/locationInquiry.vue b/src/pages/warehouse/locationInquiry.vue index 3ae74ea..0930e3f 100644 --- a/src/pages/warehouse/locationInquiry.vue +++ b/src/pages/warehouse/locationInquiry.vue @@ -66,9 +66,16 @@ 货主 {{ goodsStoreName(goods) }} - + 商品 - {{ goodsName(goods) }}、{{ goodsBarcode(goods) }} + + {{ goodsName(goods) }}、{{ goodsBarcodeDisplayText(goods) }} + {{ isGoodsBarcodeExpanded(goods) ? '收起' : '展开' }} + @@ -178,7 +185,9 @@ export default { goodsList: [], // 筛选(仅支持:可移库存 > 0 / 库存 > 0) filterVisible: false, - filterType: '' + filterType: '', + // 条码展开状态(按商品 id 记录),条码超过 3 个时默认收起 + barcodeExpandMap: {} } }, computed: { @@ -345,17 +354,58 @@ export default { const text = String(name ?? '').trim(); return text || (goods?.stock_id ? `商品#${goods.stock_id}` : '--'); }, - goodsBarcode(goods) { + // 归一化商品条码为字符串数组([{barcode, code}] 或字符串) + getGoodsBarcodeList(goods) { const stock = goods?.stock; const codes = stock?.barcodes; - if (Array.isArray(codes) && codes.length) { - const list = codes.map(c => { + if (Array.isArray(codes)) { + return codes.map(c => { if (typeof c === 'string') return c.trim(); if (c && typeof c === 'object') return String(c.barcode ?? c.code ?? '').trim(); return ''; }).filter(Boolean); - if (list.length) return list.join('、'); } + const fallback = stock?.barcode ?? stock?.code; + if (typeof fallback === 'string' && fallback.trim()) { + return [fallback.trim()]; + } + if (Array.isArray(fallback)) { + return fallback.map(c => { + if (typeof c === 'string') return c.trim(); + if (c && typeof c === 'object') return String(c.barcode ?? c.code ?? '').trim(); + return ''; + }).filter(Boolean); + } + return []; + }, + getGoodsBarcodeCount(goods) { + return this.getGoodsBarcodeList(goods).length; + }, + hasMoreGoodsBarcodes(goods) { + return this.getGoodsBarcodeCount(goods) > 3; + }, + getGoodsBarcodeExpandKey(goods) { + if (!goods || typeof goods !== 'object') return 'unknown'; + return String(goods.stock_id ?? goods.stock?.id ?? goods.id ?? goods.item_id ?? 'unknown'); + }, + isGoodsBarcodeExpanded(goods) { + return !!this.barcodeExpandMap[this.getGoodsBarcodeExpandKey(goods)]; + }, + toggleGoodsBarcodeExpand(goods) { + const key = this.getGoodsBarcodeExpandKey(goods); + this.$set(this.barcodeExpandMap, key, !this.barcodeExpandMap[key]); + }, + getGoodsBarcodeDisplayList(goods) { + const list = this.getGoodsBarcodeList(goods); + if (list.length > 3 && !this.isGoodsBarcodeExpanded(goods)) { + return list.slice(0, 3); + } + return list; + }, + goodsBarcodeDisplayText(goods) { + const list = this.getGoodsBarcodeDisplayList(goods); + if (list.length) return list.join('、'); + const stock = goods?.stock; return String(stock?.item_code ?? '').trim() || '--'; }, goodsStoreName(goods) { @@ -951,6 +1001,37 @@ export default { font-size: 40rpx; } +.line--barcode { + align-items: flex-start; +} + +.line__value--barcode { + display: flex; + align-items: flex-start; + flex-wrap: wrap; +} + +.line__barcode-text { + flex: 1; + min-width: 0; + font-size: 40rpx; + color: #303133; + word-break: break-all; + overflow-wrap: break-word; +} + +.line__barcode-toggle { + flex-shrink: 0; + margin-left: 12rpx; + font-size: 36rpx; + color: #2979ff; + line-height: 1.4; + + &:active { + opacity: 0.7; + } +} + .line--count { background: transparent; padding: 0; diff --git a/src/pages/work/order/picking.vue b/src/pages/work/order/picking.vue index 0d86c00..84d38ca 100644 --- a/src/pages/work/order/picking.vue +++ b/src/pages/work/order/picking.vue @@ -2,12 +2,10 @@ -