1395 lines
34 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="review-detail">
<!-- 空状态 -->
<view v-if="goodsList.length === 0" class="empty-state">
<u-icon name="list" size="86" color="#c0c4cc"></u-icon>
<text class="empty-text">暂无拣货商品</text>
</view>
<!-- 商品详情 -->
<view v-else class="content-layout">
<!-- 订单信息行 -->
<view class="order-info-row">
<view class="order-info-left">
<text class="order-info-text" v-if="detailInfo.waybillNo && detailInfo.waybillNo !== '--'">运单:{{ detailInfo.waybillNo }}</text>
<text class="order-info-text" v-else>波次:{{ detailInfo.waveNo }}</text>
<text class="order-info-divider"></text>
<text class="order-info-text">拣货人:{{ detailInfo.pickerName }}</text>
</view>
<view class="order-info-right">
<view class="reprint-btn" @click="$emit('reprint')">面单补打</view>
</view>
</view>
<view v-if="detailInfo.listType === 'group'" class="wave-info-row">
<text class="wave-info-text">波次订单:{{ detailInfo.totalOrders || '--' }}单</text>
<text class="wave-info-divider"></text>
<text class="wave-info-text">篮号:{{ detailInfo.waveIndex || detailInfo.boxNo || '--' }}</text>
</view>
<view class="top-module">
<view class="top-card">
<view class="top-main top-main--horizontal">
<!-- 左侧图片 -->
<view class="goods-thumb" @click.stop="previewCurrentGoodsImage">
<u-image
class="goods-image"
:src="currentGoods.imageUrl || ''"
mode="aspectFill"
width="140rpx"
height="140rpx"
>
<template #error>
<view class="image-placeholder image-placeholder--large">
<u-icon name="photo" size="28" color="#c0c4cc"></u-icon>
</view>
</template>
</u-image>
<view v-if="getCurrentGoodsImageList().length > 1" class="image-badge">
<text class="image-badge-text">1/{{ getCurrentGoodsImageList().length }}</text>
</view>
</view>
<!-- 右侧信息 -->
<view class="top-info top-info--compact">
<view class="info-row name-barcode-row">
<text class="goods-name goods-name--compact">{{ currentGoods.skuName || '--' }}</text>
<text class="barcode-tag" :class="{ 'barcode-tag--matched': isCurrentBarcodeMatched }" @click="handleBarcodeClick">{{ currentGoods.barcode || '--' }}</text>
</view>
<view class="info-row">
<text class="info-label">数量</text>
<text class="info-value" :class="{ 'info-value--warn': isScannedComplete }">{{ currentGoods.scannedQty || 0 }} / {{ currentGoods.planQty || 0 }}</text>
</view>
<view v-if="detailInfo.listType !== 'group'" class="info-row">
<text class="info-label">蓝号</text>
<text class="info-value">{{ detailInfo.waveIndex || (detailInfo.boxNo ? '' : '--') }}<text v-if="detailInfo.boxNo" class="box-no-suffix">{{ detailInfo.boxNo }}号篮</text></text>
</view>
<view class="info-row">
<text class="info-label">规格</text>
<text class="info-value">{{ currentGoods.location || '--' }}</text>
</view>
</view>
</view>
</view>
</view>
<view class="bottom-module">
<view class="bottom-module-title">商品列表</view>
<view class="pick-list-scroll">
<!-- 宫格模式 -->
<view v-if="viewMode === 'grid'" class="pick-list pick-list--grid">
<view
v-for="(item, index) in goodsList"
:key="item.id"
class="pick-item-wrap"
@click="selectGoods(index)"
>
<view
class="metric-card-btn"
:class="{
'metric-card-btn--active': index === currentGoodsIndex,
'metric-card-btn--matched': isGoodsMatched(item)
}"
>
<view class="order-corner"></view>
<view class="metric-diagonal"></view>
<text class="metric-order">{{ item.lineNo || 0 }}</text>
<text class="metric-product">{{ item.planQty || 0 }}</text>
<text class="metric-scanned">{{ item.scannedQty || 0 }}</text>
</view>
</view>
</view>
<!-- 列表模式 -->
<view v-else class="pick-list pick-list--table">
<view class="list-table-header">
<text class="list-table-col list-table-col--no">序号</text>
<text class="list-table-col list-table-col--name">商品名称</text>
<text class="list-table-col list-table-col--qty">计划</text>
<text class="list-table-col list-table-col--qty">已扫</text>
<text class="list-table-col list-table-col--status">状态</text>
</view>
<view
v-for="(item, index) in goodsList"
:key="item.id"
class="list-table-row"
:class="{
'list-table-row--active': index === currentGoodsIndex,
'list-table-row--matched': isGoodsMatched(item)
}"
@click="selectGoods(index)"
>
<text class="list-table-col list-table-col--no">{{ item.lineNo || index + 1 }}</text>
<text class="list-table-col list-table-col--name">{{ item.skuName || '--' }}</text>
<text class="list-table-col list-table-col--qty">{{ item.planQty || 0 }}</text>
<text class="list-table-col list-table-col--qty" :class="{ 'list-table-col--done': (item.scannedQty || 0) >= (item.planQty || 0) }">{{ item.scannedQty || 0 }}</text>
<text class="list-table-col list-table-col--status" :class="isGoodsMatched(item) ? 'list-table-col--matched-text' : ''">{{ isGoodsMatched(item) ? '已匹配' : '待匹配' }}</text>
</view>
</view>
</view>
<!-- 推荐包材提示 -->
<view v-if="detailInfo.suggestedPkg" class="package-info-hint">
<text class="package-info-label">推荐包材:</text>
<text class="package-info-value">{{ detailInfo.suggestedPkg.name }}({{ detailInfo.suggestedPkg.code }})</text>
<text class="package-info-spec">{{ detailInfo.suggestedPkg.spec }}</text>
</view>
<view class="safe-area-bottom"></view>
</view>
</view>
<!-- 底部合计 -->
<view class="bottom-summary">
<text class="bottom-summary-text">合计:<text class="bottom-summary-value">{{ totalPlanQty }}</text></text>
<text class="bottom-summary-scan">已扫:<text class="bottom-summary-value">{{ totalScannedQty }}</text><text class="bottom-summary-split">/</text><text class="bottom-summary-total">{{ totalPlanQty }}</text>件</text>
<view v-if="canConfirmRecheck && !autoShip" class="confirm-btn" @click="$emit('confirmRecheck')">确认复核</view>
<view class="view-mode-toggle" @click="toggleViewMode">
<u-icon :name="viewMode === 'grid' ? 'list' : 'grid'" size="32" color="#2979ff"></u-icon>
<text class="view-mode-text">{{ viewMode === 'grid' ? '列表' : '宫格' }}</text>
</view>
</view>
<!-- 多商品匹配弹窗 -->
<u-popup v-if="showMultiMatchPopup" :show="showMultiMatchPopup" mode="bottom" :closeable="true" border-radius="20" :z-index="10100" @close="handleMultiMatchClose">
<view class="multi-match-popup">
<view class="multi-match-popup-title">库内有相同商品</view>
<view class="multi-match-popup-body">
<view class="multi-match-card" @click="handleMultiMatchSelect(0)">
<view class="multi-match-thumb">
<u-image
class="multi-match-image"
:src="multiMatchFirst.imageUrl || ''"
mode="aspectFill"
width="100%"
height="100%"
>
<template #error>
<view class="multi-match-image-placeholder">
<u-icon name="photo" size="40" color="#c0c4cc"></u-icon>
</view>
</template>
</u-image>
</view>
<view class="multi-match-info">
<text class="multi-match-name">{{ multiMatchFirst.skuName || '--' }}</text>
<text class="multi-match-barcode">条码:{{ multiMatchFirst.barcode || '--' }}</text>
<text class="multi-match-spec">规格:{{ multiMatchFirst.location || '--' }}</text>
<text class="multi-match-qty">计划 {{ multiMatchFirst.planQty || 0 }} / 已扫 {{ multiMatchFirst.scannedQty || 0 }}</text>
</view>
</view>
</view>
<view class="multi-match-popup-footer">
<view class="multi-match-footer-btn" @click="handleMultiMatchClose">关闭</view>
</view>
</view>
</u-popup>
<!-- 无条码复核弹窗 -->
<u-popup v-if="showNoBarcodePopup" :show="showNoBarcodePopup" mode="center" :closeable="true" :closeOnClickOverlay="false" border-radius="20" @close="showNoBarcodePopup = false">
<view class="no-barcode-popup">
<view class="no-barcode-popup__title">无条码复核</view>
<view class="no-barcode-popup__body">
<text class="no-barcode-popup__text">
将商品「{{ noBarcodeItemName }}」标记为已复核({{ noBarcodePickedCount }}/{{ noBarcodeItemTotalQty }} → {{ noBarcodeItemTotalQty }}/{{ noBarcodeItemTotalQty }})?
</text>
</view>
<view class="no-barcode-popup__actions">
<view class="no-barcode-popup__btn no-barcode-popup__btn--cancel" @click="showNoBarcodePopup = false">取消</view>
<view class="no-barcode-popup__btn no-barcode-popup__btn--confirm" @click="confirmNoBarcodeReview">确定</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import voice from '@/core/utils/voice';
export default {
name: 'ReviewDetail',
created() {
console.log('[ReviewDetail] created');
},
mounted() {
console.log('[ReviewDetail] mounted, goodsList length:', this.goodsList?.length);
},
props: {
goodsList: {
type: Array,
default: () => []
},
scanQty: {
type: Number,
default: 1
},
autoShip: {
type: Boolean,
default: false
},
detailInfo: {
type: Object,
default: () => ({
recordId: '',
orderId: 0,
waveId: '',
waveNo: '--',
waybillNo: '',
matchType: '',
recheckStatus: '',
pickerName: '--',
cartNo: '--',
status: 'pending',
unreviewedCount: 0,
storeRemark: '',
waveIndex: '',
orderIds: [],
interceptStatus: '',
printStationId: '',
printStationName: '',
boxNo: ''
})
},
scannedPackageMaterial: {
type: Object,
default: null
}
},
data() {
// 读取本地存储的视图模式,默认列表模式
let savedMode = 'list';
try {
const stored = uni.getStorageSync('review_view_mode');
if (stored === 'grid' || stored === 'list') {
savedMode = stored;
}
} catch (e) {
// 忽略读取失败
}
return {
currentGoodsIndex: 0,
matchedGoodsId: '',
matchedGoodsState: {},
viewMode: savedMode,
showMultiMatchPopup: false,
multiMatchFirst: {},
pendingScanCode: '',
_dismissedMultiMatchCodes: [],
_lastScanCode: '',
_lastScanTime: 0,
showNoBarcodePopup: false,
noBarcodeItemName: '',
noBarcodePickedCount: 0,
noBarcodeItemTotalQty: 0
};
},
computed: {
currentGoods() {
return this.goodsList[this.currentGoodsIndex] || {};
},
isCurrentBarcodeMatched() {
const currentId = String(this.currentGoods?.id || '');
if (!currentId) return false;
return !!this.matchedGoodsState[currentId];
},
totalPlanQty() {
return this.goodsList.reduce((sum, item) => sum + (item.planQty || 0), 0);
},
totalScannedQty() {
return this.goodsList.reduce((sum, item) => sum + (item.scannedQty || 0), 0);
},
isReadOnly() {
return String(this.detailInfo?.recheckStatus || '').toLowerCase() === 'fin';
},
isScannedComplete() {
const plan = Number(this.currentGoods?.planQty || 0);
const scanned = Number(this.currentGoods?.scannedQty || 0);
return plan > 0 && scanned >= plan;
},
isAllMatched() {
return this.goodsList.every(item => {
const id = String(item?.id || '');
if (!id) return false;
return !!this.matchedGoodsState[id];
});
},
isAllScanned() {
return this.goodsList.every(item => (item.scannedQty || 0) >= (item.planQty || 0));
},
canConfirmRecheck() {
return this.isAllMatched && this.isAllScanned;
}
},
watch: {
goodsList: {
handler(newList, oldList) {
// 切换订单时重置匹配状态,防止残留
if (oldList && oldList.length > 0 && newList !== oldList) {
this.resetMatchState();
}
const total = this.totalPlanQty;
const scanned = this.totalScannedQty;
if (total > 0 && scanned >= total) {
this.$emit('allScanned');
}
},
deep: true
},
currentGoodsIndex(val) {
this.$emit('currentGoodsChange', val);
}
},
methods: {
isGoodsMatched(item) {
const id = String(item?.id || '');
if (!id) return false;
return !!this.matchedGoodsState[id];
},
normalizeBarcode(value) {
return String(value || '').replace(/\s+/g, '').toUpperCase();
},
extractBarcodeCandidates(item) {
const sourceList = [item?.barcode, item?.skuCode];
const result = [];
sourceList.forEach(source => {
const text = String(source || '').trim();
if (!text) return;
text
.split(/[;,,|\s]+/)
.map(part => this.normalizeBarcode(part))
.filter(part => !!part)
.forEach(part => {
result.push(part);
// 包含汉字时,额外添加去除汉字后的部分作为候选
if (/[\u4e00-\u9fff]/.test(part)) {
const stripped = part.replace(/[\u4e00-\u9fff]+/g, '');
if (stripped) result.push(stripped);
}
});
});
return Array.from(new Set(result));
},
/**
* 外部调用:处理扫描到的条码
* @param {string} scanCode - 扫描结果
* @returns {boolean} 是否匹配成功
*/
handleScanCode(scanCode) {
// 已复核订单只读,不做商品匹配
if (this.isReadOnly) return false;
const code = this.normalizeBarcode(scanCode);
if (!code) return false;
// 基于时间的去重:300ms 内相同条码跳过,防止广播重复触发导致弹窗多次
const now = Date.now();
const elapsed = now - this._lastScanTime;
if (code === this._lastScanCode && elapsed < 300) {
console.log('[ReviewDetail][handleScanCode] 去重拦截,相同条码:', code, '间隔(ms):', elapsed);
return true;
}
this._lastScanCode = code;
this._lastScanTime = now;
// 多商品匹配弹窗已打开且扫描相同条码时,跳过避免重复提示
if (this.showMultiMatchPopup && this.pendingScanCode === code) {
return true;
}
// 查找所有匹配的商品
const matchIndices = [];
this.goodsList.forEach((item, idx) => {
const candidates = this.extractBarcodeCandidates(item);
if (candidates.includes(code)) {
matchIndices.push(idx);
}
});
if (matchIndices.length === 0) {
voice.speak('无记录');
return false;
}
// 多个商品匹配时,弹出底部抽屉显示第一个商品详情
if (matchIndices.length > 1) {
// 如果用户之前关闭过该条码的弹窗,不再弹出,自动分配到未扫完的商品
if (this._dismissedMultiMatchCodes.includes(code)) {
// 从匹配列表中找第一个未扫完的商品
let matchIndex = -1;
for (let i = 0; i < matchIndices.length; i++) {
const idx = matchIndices[i];
const item = this.goodsList[idx];
if ((item?.scannedQty || 0) < (item?.planQty || 0)) {
matchIndex = idx;
break;
}
}
if (matchIndex === -1) {
uni.showToast({ title: '所有匹配商品已复核完成', icon: 'none' });
voice.speak('超出订单数');
return true;
}
this.currentGoodsIndex = matchIndex;
const matchedItem = this.goodsList[matchIndex];
const maxQty = matchedItem?.planQty || 0;
const currentScanned = matchedItem?.scannedQty || 0;
const addQty = Math.min(this.scanQty || 1, maxQty - currentScanned);
const newScanned = Math.min(currentScanned + addQty, maxQty);
// 扫描数量超过剩余数量时语音提示
if ((this.scanQty || 1) > (maxQty - currentScanned)) {
voice.speak('超出订单数');
}
this.$emit('updateScannedQty', matchIndex, newScanned);
const allDone = this.goodsList.every((item, idx) => {
const qty = idx === matchIndex ? newScanned : (item.scannedQty || 0);
return qty >= (item.planQty || 0);
});
if (allDone) {
voice.speak('数据一致');
}
// 已扫数量达到计划数量时,标记为已匹配(显示绿底和"已匹配"状态)
if (newScanned >= maxQty) {
const matchedId = String(matchedItem?.id || '');
if (matchedId) {
this.matchedGoodsId = matchedId;
if (typeof this.$set === 'function') {
this.$set(this.matchedGoodsState, matchedId, true);
} else {
this.matchedGoodsState[matchedId] = true;
}
}
}
if ((this.scanQty || 1) > 1) {
this.$emit('resetScanQty');
}
return true;
}
const firstIdx = matchIndices[0];
this.multiMatchFirst = { ...this.goodsList[firstIdx] };
this.pendingScanCode = code;
this.showMultiMatchPopup = true;
voice.speak('库内有相同商品');
return true;
}
// 仅一个商品匹配,直接处理
const matchIndex = matchIndices[0];
this.currentGoodsIndex = matchIndex;
const matchedItem = this.goodsList[matchIndex];
const maxQty = matchedItem?.planQty || 0;
const currentScanned = matchedItem?.scannedQty || 0;
// 已复核完成的商品,不再增加数量
if (currentScanned >= maxQty) {
uni.showToast({ title: '该商品已复核完成', icon: 'none' });
voice.speak('超出订单数');
return true;
}
const addQty = Math.min(this.scanQty || 1, maxQty - currentScanned);
const newScanned = Math.min(currentScanned + addQty, maxQty);
// 扫描数量超过剩余数量时语音提示
if ((this.scanQty || 1) > (maxQty - currentScanned)) {
voice.speak('超出订单数');
}
// 更新已扫数量
this.$emit('updateScannedQty', matchIndex, newScanned);
// 所有商品都已完成扫描时才播报"数据一致"
const allDone = this.goodsList.every((item, idx) => {
const qty = idx === matchIndex ? newScanned : (item.scannedQty || 0);
return qty >= (item.planQty || 0);
});
if (allDone) {
voice.speak('数据一致');
}
// 已扫数量达到计划数量时,才标记为已匹配
if (newScanned >= maxQty) {
const matchedId = String(matchedItem?.id || '');
if (matchedId) {
this.matchedGoodsId = matchedId;
if (typeof this.$set === 'function') {
this.$set(this.matchedGoodsState, matchedId, true);
} else {
this.matchedGoodsState[matchedId] = true;
}
}
}
// 设置的数量>1时,使用后回归1(一次性)
if ((this.scanQty || 1) > 1) {
this.$emit('resetScanQty');
}
return true;
},
/**
* 无条码复核(点击条码区域触发)
*/
handleBarcodeClick() {
const item = this.currentGoods;
if (!item) return;
const skuName = item.skuName || '商品';
const planQty = item.planQty || 0;
const scannedQty = item.scannedQty || 0;
if (scannedQty >= planQty) {
uni.showToast({ title: '该商品已复核完成', icon: 'none' });
return;
}
// 设置弹窗数据
this.noBarcodeItemName = skuName;
this.noBarcodePickedCount = scannedQty;
this.noBarcodeItemTotalQty = planQty;
this.showNoBarcodePopup = true;
},
confirmNoBarcodeReview() {
const item = this.currentGoods;
if (!item) return;
const planQty = item.planQty || 0;
this.showNoBarcodePopup = false;
this.$emit('updateScannedQty', this.currentGoodsIndex, planQty);
const matchId = String(item.id || '');
if (matchId) {
this.matchedGoodsId = matchId;
if (typeof this.$set === 'function') {
this.$set(this.matchedGoodsState, matchId, true);
} else {
this.matchedGoodsState[matchId] = true;
}
}
// 标记当前商品条码匹配
this.$emit('barcodeMatched', matchId);
uni.showToast({ title: `已标记为已复核(${planQty}/${planQty})`, icon: 'success' });
voice.speak('数据一致');
},
previewCurrentGoodsImage() {
const images = this.getCurrentGoodsImageList();
if (!images.length) return;
uni.previewImage({
current: images[0],
urls: images
});
},
getCurrentGoodsImageList() {
const list = Array.isArray(this.currentGoods?.images) ? this.currentGoods.images : [];
const normalizedList = list
.map(url => String(url || '').trim())
.filter(url => !!url);
const currentUrl = String(this.currentGoods?.imageUrl || '').trim();
if (!normalizedList.length && currentUrl) {
return [currentUrl];
}
return normalizedList;
},
selectGoods(index) {
this.currentGoodsIndex = index;
this.$emit('goodsItemClick');
},
toggleViewMode() {
this.viewMode = this.viewMode === 'grid' ? 'list' : 'grid';
try {
uni.setStorageSync('review_view_mode', this.viewMode);
} catch (e) {
console.warn('[ReviewDetail] 保存视图模式失败:', e);
}
this.$emit('viewModeChange', this.viewMode);
},
/**
* 标记条码匹配成功
*/
markBarcodeMatched(itemId) {
const id = String(itemId || '');
if (!id) return;
if (typeof this.$set === 'function') {
this.$set(this.matchedGoodsState, id, true);
} else {
this.matchedGoodsState[id] = true;
}
},
/**
* 重置匹配状态(切换订单时调用)
*/
resetMatchState() {
this.matchedGoodsState = {};
this.matchedGoodsId = '';
this.currentGoodsIndex = 0;
this.showMultiMatchPopup = false;
this.multiMatchFirst = {};
this.pendingScanCode = '';
this._dismissedMultiMatchCodes = [];
this._lastScanCode = '';
this._lastScanTime = 0;
},
/**
* 多商品匹配时,选择第一个商品进行处理
*/
handleMultiMatchClose() {
this.showMultiMatchPopup = false;
// 将当前条码加入已忽略列表,关闭后不再弹窗提示
if (this.pendingScanCode && !this._dismissedMultiMatchCodes.includes(this.pendingScanCode)) {
this._dismissedMultiMatchCodes.push(this.pendingScanCode);
}
this.pendingScanCode = '';
},
handleMultiMatchSelect(index) {
this.showMultiMatchPopup = false;
const code = this.pendingScanCode;
this.pendingScanCode = '';
if (!code) return;
// 重新查找匹配项,定位到第一个匹配商品并处理
const matchIndices = [];
this.goodsList.forEach((item, idx) => {
const candidates = this.extractBarcodeCandidates(item);
if (candidates.includes(code)) {
matchIndices.push(idx);
}
});
const targetIdx = matchIndices[index] ?? matchIndices[0];
if (targetIdx === undefined) return;
this.currentGoodsIndex = targetIdx;
const matchedItem = this.goodsList[targetIdx];
const maxQty = matchedItem?.planQty || 0;
const currentScanned = matchedItem?.scannedQty || 0;
if (currentScanned >= maxQty) {
uni.showToast({ title: '该商品已复核完成', icon: 'none' });
return;
}
const addQty = Math.min(this.scanQty || 1, maxQty - currentScanned);
const newScanned = Math.min(currentScanned + addQty, maxQty);
this.$emit('updateScannedQty', targetIdx, newScanned);
const allDone = this.goodsList.every((item, idx) => {
const qty = idx === targetIdx ? newScanned : (item.scannedQty || 0);
return qty >= (item.planQty || 0);
});
if (allDone) {
voice.speak('数据一致');
}
if (newScanned >= maxQty) {
const matchedId = String(matchedItem?.id || '');
if (matchedId) {
this.matchedGoodsId = matchedId;
if (typeof this.$set === 'function') {
this.$set(this.matchedGoodsState, matchedId, true);
} else {
this.matchedGoodsState[matchedId] = true;
}
}
}
if ((this.scanQty || 1) > 1) {
this.$emit('resetScanQty');
}
}
}
};
</script>
<style lang="scss" scoped>
.review-detail {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
}
.content-layout {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
}
.top-module {
flex-shrink: 0;
}
.top-card {
background: #ffffff;
border-radius: 12rpx;
margin: 12rpx 16rpx 0;
padding: 16rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.04);
}
.goods-thumb {
position: relative;
width: 140rpx;
height: 140rpx;
border-radius: 10rpx;
overflow: hidden;
flex-shrink: 0;
background: #f5f5f5;
}
.goods-image {
width: 140rpx;
height: 140rpx;
}
.image-placeholder--large {
width: 140rpx;
height: 140rpx;
display: flex;
align-items: center;
justify-content: center;
background: #f2f3f5;
border-radius: 10rpx;
}
.image-badge {
position: absolute;
right: 6rpx;
bottom: 6rpx;
background: rgba(0, 0, 0, 0.5);
border-radius: 10rpx;
padding: 2rpx 8rpx;
}
.image-badge-text {
font-size: 18rpx;
color: #ffffff;
line-height: 1.3;
}
.top-main--horizontal {
display: flex;
flex-direction: row;
align-items: flex-start;
gap: 16rpx;
}
.top-info--compact {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 6rpx;
}
.goods-name--compact {
font-size: 32rpx;
font-weight: 600;
color: #303133;
line-height: 38rpx;
word-break: break-all;
margin-bottom: 2rpx;
}
.info-row {
display: flex;
align-items: center;
font-size: 28rpx;
line-height: 32rpx;
}
.info-label {
color: #909399;
flex-shrink: 0;
width: 60rpx;
}
.info-value {
color: #303133;
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.info-row--barcode-highlight .info-value {
color: #2979ff;
font-weight: 500;
}
.info-value--warn {
color: #07c160;
font-weight: 500;
}
.box-no-suffix {
color: #e6a23c;
margin-left: 6rpx;
font-size: 26rpx;
}
.order-info-row {
display: flex;
align-items: center;
justify-content: space-between;
margin: 8rpx 16rpx 0;
padding: 12rpx 16rpx;
background: #ffffff;
border-radius: 10rpx;
border: 1rpx solid #ebeef5;
}
.order-info-left {
display: flex;
align-items: center;
gap: 12rpx;
flex: 1;
min-width: 0;
}
.order-info-text {
font-size: 28rpx;
color: #909399;
white-space: nowrap;
}
.order-info-divider {
width: 1rpx;
height: 20rpx;
background: #dcdfe6;
flex-shrink: 0;
}
.wave-info-row {
display: flex;
align-items: center;
gap: 12rpx;
margin: 0 16rpx;
padding: 8rpx 16rpx;
background: #f5f7fa;
border-radius: 6rpx;
font-size: 26rpx;
}
.wave-info-text {
color: #606266;
font-size: 26rpx;
}
.wave-info-divider {
width: 1rpx;
height: 18rpx;
background: #dcdfe6;
flex-shrink: 0;
}
.order-info-right {
flex-shrink: 0;
}
.reprint-btn {
padding: 4rpx 16rpx;
border: 1rpx solid #2979ff;
border-radius: 6rpx;
font-size: 26rpx;
color: #2979ff;
line-height: 1.6;
}
.reprint-btn:active {
opacity: 0.7;
}
.name-barcode-row {
gap: 12rpx;
margin-bottom: 2rpx;
}
.name-barcode-row .goods-name--compact {
flex: 1;
min-width: 0;
word-break: break-all;
}
.barcode-tag {
flex-shrink: 0;
font-size: 26rpx;
color: #000000;
background: #f0f7ff;
border: 1rpx solid #b3d8ff;
border-radius: 6rpx;
padding: 2rpx 10rpx;
line-height: 1.6;
max-width: 240rpx;
word-break: break-all;
}
.barcode-tag--matched {
color: #07c160;
background: #f0fff5;
border-color: #b3ebc1;
}
.bottom-module {
flex: 1;
min-height: 0;
padding: 8rpx 16rpx 0;
box-sizing: border-box;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
.bottom-module-title {
font-size: 30rpx;
font-weight: 600;
color: #303133;
margin-bottom: 8rpx;
}
.pick-list-scroll {
min-height: 0;
}
.pick-list {
display: flex;
flex-wrap: wrap;
gap: 12rpx;
}
.pick-item-wrap {
flex: 0 0 auto;
}
.metric-card-btn {
position: relative;
width: 96rpx;
height: 96rpx;
border: 2rpx solid #dcdfe6;
border-radius: 10rpx;
background: #fafafa;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2rpx;
overflow: hidden;
}
.metric-card-btn--active {
border-color: #2979ff;
background: #f0f7ff;
}
.metric-card-btn--matched {
border-color: #07c160;
background: #07c160;
}
.metric-card-btn--matched .metric-order,
.metric-card-btn--matched .metric-product,
.metric-card-btn--matched .metric-scanned {
color: #ffffff;
}
.order-corner {
display: none;
}
.metric-diagonal {
display: none;
}
.metric-order {
font-size: 32rpx;
font-weight: 600;
color: #2979ff;
line-height: 1.2;
}
.metric-card-btn--matched .metric-order {
color: #ffffff;
}
.metric-product {
font-size: 20rpx;
color: #909399;
line-height: 1.2;
}
.metric-scanned {
font-size: 20rpx;
color: #e6a23c;
line-height: 1.2;
}
.metric-card-btn--matched .metric-scanned {
color: #ffffff;
}
.bottom-summary {
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 16rpx 24rpx;
padding-bottom: calc(16rpx + env(safe-area-inset-bottom));
background: #ffffff;
border-top: 1rpx solid #ebeef5;
}
.bottom-summary-text {
font-size: 34rpx;
color: #909399;
flex-shrink: 0;
}
.bottom-summary-value {
color: #303133;
font-weight: 500;
margin-left: 4rpx;
}
.bottom-summary-scan {
font-size: 32rpx;
color: #909399;
flex-shrink: 0;
}
.bottom-summary-split {
color: #c0c4cc;
margin: 0 4rpx;
}
.bottom-summary-total {
color: #303133;
font-weight: 500;
}
.confirm-btn {
flex-shrink: 0;
padding: 8rpx 24rpx;
background: #2979ff;
border-radius: 8rpx;
font-size: 32rpx;
color: #ffffff;
font-weight: 500;
line-height: 1.4;
}
.confirm-btn:active {
opacity: 0.7;
}
.view-mode-toggle {
display: flex;
align-items: center;
gap: 6rpx;
padding: 6rpx 12rpx;
border: 1rpx solid #2979ff;
border-radius: 8rpx;
flex-shrink: 0;
}
.view-mode-toggle:active {
opacity: 0.7;
}
.view-mode-text {
font-size: 26rpx;
color: #2979ff;
}
/* 列表模式表格样式 */
.pick-list--table {
display: flex;
flex-direction: column;
gap: 0;
}
.list-table-header {
display: flex;
align-items: center;
padding: 16rpx 12rpx;
background: #f5f7fa;
border-radius: 8rpx 8rpx 0 0;
border-bottom: 2rpx solid #ebeef5;
}
.list-table-row {
display: flex;
align-items: center;
padding: 22rpx 12rpx;
border-bottom: 1rpx solid #000000;
}
.list-table-row:active {
background: #f5f6fa;
}
.list-table-row--active {
background: #9dc4f1;
}
.list-table-row--active .list-table-col {
color: #000000;
}
.list-table-row--matched {
background: #07c160;
}
.list-table-row--matched .list-table-col {
color: #ffffff;
}
.list-table-col {
font-size: 40rpx;
color: #303133;
}
.list-table-header .list-table-col {
color: #909399;
font-weight: 500;
font-size: 38rpx;
}
.list-table-col--no {
width: 100rpx;
text-align: center;
flex-shrink: 0;
}
.list-table-col--name {
flex: 1;
min-width: 0;
word-break: break-all;
padding: 0 12rpx;
}
.list-table-col--qty {
width: 110rpx;
text-align: center;
flex-shrink: 0;
}
.list-table-col--status {
width: 120rpx;
text-align: center;
flex-shrink: 0;
}
.list-table-col--done {
color: #07c160;
font-weight: 500;
}
.list-table-col--matched-text {
color: #ffffff;
}
.empty-state {
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.empty-text {
margin-top: 18rpx;
font-size: 36rpx;
color: #909399;
}
.safe-area-bottom {
height: calc(30rpx + env(safe-area-inset-bottom));
}
.package-info-hint {
flex-shrink: 0;
padding: 10rpx 24rpx;
background: #fffbe6;
border-top: 1rpx solid #f0e6b8;
border-bottom: 1rpx solid #f0e6b8;
display: flex;
align-items: center;
gap: 6rpx;
line-height: 1.4;
}
.package-info-label {
font-size: 34rpx;
color: #909399;
flex-shrink: 0;
}
.package-info-value {
font-size: 34rpx;
color: #000000;
font-weight: 500;
}
.package-info-spec {
font-size: 34rpx;
color: #c0c4cc;
}
/* 多商品匹配弹窗 */
.multi-match-popup {
padding: 48rpx 32rpx calc(40rpx + env(safe-area-inset-bottom));
background: #ffffff;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
}
.multi-match-popup-title {
font-size: 38rpx;
font-weight: 600;
color: #303133;
text-align: center;
margin-bottom: 32rpx;
}
.multi-match-popup-body {
margin-bottom: 32rpx;
}
.multi-match-card {
display: flex;
flex-direction: row;
align-items: stretch;
padding: 0;
background: #f8f9fa;
border-radius: 12rpx;
border: 1rpx solid #ebeef5;
overflow: hidden;
}
.multi-match-card:active {
opacity: 0.7;
}
.multi-match-thumb {
flex: 1;
min-height: 240rpx;
overflow: hidden;
background: #f2f3f5;
display: flex;
align-items: center;
justify-content: center;
}
.multi-match-image {
width: 100%;
height: 100%;
}
.multi-match-image-placeholder {
width: 100%;
height: 100%;
min-height: 240rpx;
display: flex;
align-items: center;
justify-content: center;
background: #f2f3f5;
}
.multi-match-info {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
justify-content: center;
gap: 10rpx;
padding: 24rpx;
}
.multi-match-name {
font-size: 38rpx;
font-weight: 600;
color: #303133;
line-height: 1.4;
word-break: break-all;
}
.multi-match-barcode,
.multi-match-spec {
font-size: 32rpx;
color: #909399;
line-height: 1.4;
}
.multi-match-qty {
font-size: 32rpx;
color: #2979ff;
font-weight: 500;
line-height: 1.3;
}
.multi-match-popup-footer {
display: flex;
justify-content: center;
}
.multi-match-footer-btn {
flex: 1;
height: 80rpx;
line-height: 80rpx;
text-align: center;
border-radius: 12rpx;
font-size: 36rpx;
background: #f5f5f5;
color: #909399;
}
.multi-match-footer-btn:active {
opacity: 0.7;
}
/* 无条码复核弹窗 */
.no-barcode-popup {
width: 640rpx;
padding: 40rpx 32rpx 32rpx;
background: #ffffff;
border-radius: 20rpx;
box-sizing: border-box;
}
.no-barcode-popup__title {
font-size: 42rpx;
font-weight: 600;
color: #303133;
text-align: center;
margin-bottom: 32rpx;
}
.no-barcode-popup__body {
margin-bottom: 36rpx;
padding: 24rpx;
background: #f8f9fa;
border-radius: 12rpx;
}
.no-barcode-popup__text {
font-size: 36rpx;
color: #303133;
line-height: 1.6;
}
.no-barcode-popup__actions {
display: flex;
align-items: center;
gap: 20rpx;
}
.no-barcode-popup__btn {
flex: 1;
height: 88rpx;
border-radius: 12rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 36rpx;
font-weight: 500;
}
.no-barcode-popup__btn--cancel {
background: #f5f7fa;
color: #606266;
border: 1rpx solid #dcdfe6;
}
.no-barcode-popup__btn--confirm {
background: #2979ff;
color: #ffffff;
}
</style>