This commit is contained in:
2026-09-09 10:18:10 +08:00
parent 8be8f6ac3d
commit cb1dfc5a31
5 changed files with 31 additions and 3 deletions
+5 -1
View File
@@ -42,7 +42,11 @@ export function normalizeReceivingInbound(value = {}) {
plannedPalletCount: number(value.plannedPalletCount),
totalPackages: number(value.totalPackages),
receivedPackages: number(value.receivedPackages),
pendingPackages: number(value.pendingPackages)
pendingPackages: number(value.pendingPackages),
assigned: value.assigned === true,
mergeAllowed: value.mergeAllowed === true,
urgent: value.urgent === true,
mergeHint: text(value.mergeHint)
}
}
@@ -14,6 +14,16 @@
<view><text class="metric-value">{{ totalPackages }}</text><text class="metric-label">计划箱数</text></view>
<view><text class="metric-value metric-pending">{{ pendingPackages }}</text><text class="metric-label">待收箱数</text></view>
</view>
<view v-if="planFlags.length" class="receiving-plan-flags">
<view v-for="item in planFlags" :key="item.inboundCode" class="receiving-plan-row">
<text class="receiving-plan-code">{{ item.inboundCode || '—' }}</text>
<view class="receiving-plan-tags">
<text :class="item.assigned ? 'flag-positive' : 'flag-muted'">{{ item.assigned ? '已分配' : '未分配' }}</text>
<text :class="item.mergeAllowed ? 'flag-option' : 'flag-muted'">{{ item.mergeAllowed ? '可合托·非强制' : '不合托' }}</text>
<text :class="item.urgent ? 'flag-urgent' : 'flag-muted'">{{ item.urgent ? '加急' : '普通' }}</text>
</view>
</view>
</view>
<view class="receiving-summary-progress"><view><text>收货进度</text><text>{{ receivedPackages }} / {{ totalPackages }} 箱</text></view><view class="progress-track"><view class="progress-fill" :style="{ width: percent + '%' }"></view></view></view>
</view>
</template>
@@ -22,6 +32,7 @@
export default {
props: { session: { type: Object, default: null } },
computed: {
planFlags() { return Array.isArray(this.session?.inbounds) ? this.session.inbounds : [] },
receivingWarehouseLabel() { const code = String(this.session?.overseasWarehouseCode || '').trim(); const name = String(this.session?.overseasWarehouseName || '').trim(); return code && name ? `${code} · ${name}` : '—' },
inboundCodeCount() { return Array.isArray(this.session?.inbounds) ? this.session.inbounds.length : 0 },
plannedPalletCount() { return (this.session?.inbounds || []).reduce((sum, item) => sum + Math.max(0, Number(item?.plannedPalletCount || 0)), 0) },
@@ -42,6 +53,7 @@
.receiving-summary-status{flex-shrink:0;padding:4px 8px;border-radius:99px;color:#1668dc;font-size:9px;font-weight:700;background:#e3efff}
.receiving-summary-context{display:flex;flex-direction:column;gap:4px;margin-top:7px;color:#617389;font-size:9px;line-height:14px}.receiving-summary-warehouse{display:block}.receiving-summary-destinations{display:flex;min-width:0;align-items:flex-start}.destination-label{flex-shrink:0}.destination-tags{display:flex;min-width:0;flex-wrap:wrap;gap:3px 4px}.destination-tags text{padding:0 5px;border-radius:99px;color:#42617f;line-height:14px;background:#e8f0fa;white-space:nowrap}
.receiving-summary-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:7px;padding:7px 2px;border-radius:9px;background:rgba(255,255,255,.8)}.receiving-summary-metrics>view{display:flex;align-items:center;flex-direction:column;border-right:1px solid #e3eaf2}.receiving-summary-metrics>view:last-child{border-right:0}
.receiving-plan-flags{margin-top:7px;padding:3px 8px;border-radius:9px;background:rgba(255,255,255,.82)}.receiving-plan-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 0;border-bottom:1px solid #e9eef5}.receiving-plan-row:last-child{border-bottom:0}.receiving-plan-code{min-width:0;color:#17324d;font-size:10px;font-weight:750;overflow-wrap:anywhere}.receiving-plan-tags{display:flex;flex-shrink:0;gap:3px}.receiving-plan-tags text{padding:2px 5px;border-radius:99px;font-size:8px;line-height:12px}.flag-positive{color:#08705f;background:#e2f6f0}.flag-option{color:#1668dc;background:#e7f0ff}.flag-urgent{color:#b54708;background:#fff0dc}.flag-muted{color:#718095;background:#edf1f5}
.metric-value{color:#17324d;font-size:17px;font-weight:850;line-height:21px}.metric-pending{color:#b66a08}.metric-label{margin-top:1px;color:#718095;font-size:8px;line-height:12px;text-align:center}
.receiving-summary-progress{margin-top:7px;color:#607287;font-size:9px}.progress-track{height:5px;margin-top:5px;overflow:hidden;border-radius:99px;background:#dfe8f2}.progress-fill{height:100%;border-radius:inherit;background:#1677e8}
</style>
+3
View File
@@ -74,6 +74,8 @@
<view class="matched-inbound-card">
<view class="mode-banner" :class="activeInbound.destinationType === 'FBA' ? 'fba' : 'overseas'"><text>{{ activeInbound.destinationType === 'FBA' ? 'FBA 按箱数收货' : '海外仓逐箱收货' }}</text><text>{{ destinationLabel(activeInbound) }}</text></view>
<text class="matched-inbound-code">{{ activeInbound.inboundCode }}</text>
<view class="matched-plan-flags"><text>{{ activeInbound.assigned ? '已分配' : '未分配' }}</text><text :class="{ optional: activeInbound.mergeAllowed }">{{ activeInbound.mergeAllowed ? '可合托(现场自选)' : '不合托' }}</text><text :class="{ urgent: activeInbound.urgent }">{{ activeInbound.urgent ? '加急' : '普通' }}</text></view>
<text v-if="activeInbound.mergeHint" class="merge-option-hint">{{ activeInbound.mergeHint }}</text>
<view class="matched-inbound-progress"><text>总计 {{ activeInbound.totalPackages }} 箱</text><text>已收 {{ activeInbound.receivedPackages }} 箱</text><text>待收 {{ activeInbound.pendingPackages }} 箱</text></view>
</view>
<text class="section-label">2. 扫描实物托盘码</text>
@@ -199,6 +201,7 @@
.matched-inbound-card{margin:14px 0;padding:12px;border:1px solid #cfe0f2;border-radius:10px;background:#f8fbff}
.matched-inbound-card .mode-banner{margin-bottom:10px}
.matched-inbound-code{display:block;color:#17324d;font-size:15px;font-weight:800}
.matched-plan-flags{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}.matched-plan-flags text{padding:3px 7px;border-radius:99px;color:#617389;font-size:9px;background:#edf1f5}.matched-plan-flags .optional{color:#1668dc;background:#e7f0ff}.matched-plan-flags .urgent{color:#b54708;background:#fff0dc}.merge-option-hint{display:block;margin-top:7px;padding:7px 8px;border-radius:7px;color:#1668dc;font-size:10px;line-height:15px;background:#eef5ff}
.matched-inbound-progress{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-top:8px;color:#5f7185;font-size:10px}
.matched-inbound-progress text{padding:6px 4px;border-radius:6px;text-align:center;background:#edf3f9}
.error-card text{overflow-wrap:anywhere;word-break:break-word}