优化
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<view class="popup-header">
|
||||
<view class="popup-header-spacer" aria-hidden="true"></view>
|
||||
<text class="popup-header-title" :class="{ 'popup-header-title-danger': tone === 'danger' }">{{ title }}</text>
|
||||
<button class="popup-header-close" :aria-label="`${$t('common.close')} ${title}`" @tap="$emit('close')">
|
||||
<button class="popup-header-close" :aria-label="`关闭${title}`" @tap="$emit('close')">
|
||||
<uni-icons type="closeempty" color="#52657c" size="24" />
|
||||
</button>
|
||||
</view>
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
<view class="portal-header-shell">
|
||||
<view class="portal-header">
|
||||
<view class="portal-header-row">
|
||||
<button v-if="menu" class="portal-header-button" :aria-label="$t('nav.openMenu')" @tap="openMenu"><uni-icons type="bars" color="#ffffff" size="26" /></button>
|
||||
<button v-else class="portal-header-button" :aria-label="$t('nav.back')" @tap="goBack"><uni-icons type="back" color="#ffffff" size="26" /></button>
|
||||
<button v-if="menu" class="portal-header-button" aria-label="打开功能菜单" @tap="openMenu"><uni-icons type="bars" color="#ffffff" size="26" /></button>
|
||||
<button v-else class="portal-header-button" aria-label="返回上一页" @tap="goBack"><uni-icons type="back" color="#ffffff" size="26" /></button>
|
||||
<text class="portal-title">{{ title }}</text>
|
||||
<button v-if="showProfile" class="avatar-button" :aria-label="$t('nav.profile')" @tap="goProfile"><uni-icons type="person" color="#ffffff" size="27" /></button>
|
||||
<button v-if="showProfile" class="avatar-button" aria-label="打开个人中心" @tap="goProfile"><uni-icons type="person" color="#ffffff" size="27" /></button>
|
||||
<view v-else class="portal-header-spacer" aria-hidden="true"></view>
|
||||
</view>
|
||||
</view>
|
||||
<uni-popup ref="menuPopup" type="bottom" background-color="#ffffff" border-radius="12px 12px 0 0" :is-mask-click="true" @change="handleMenuChange">
|
||||
<view class="header-menu-sheet">
|
||||
<view class="header-menu-content">
|
||||
<PopupHeader :title="$t('nav.menu')" @close="closeMenu" />
|
||||
<button class="header-menu-item" @tap="goHistory"><uni-icons type="list" color="#334155" size="22" /><text>{{ $t('nav.history') }}</text><uni-icons type="right" color="#94a3b8" size="18" /></button>
|
||||
<button class="header-menu-item" @tap="goProfile"><uni-icons type="person" color="#334155" size="22" /><text>{{ $t('nav.profile') }}</text><uni-icons type="right" color="#94a3b8" size="18" /></button>
|
||||
<button class="header-menu-close" @tap="closeMenu">{{ $t('common.close') }}</button>
|
||||
<PopupHeader title="功能菜单" @close="closeMenu" />
|
||||
<button class="header-menu-item" @tap="goHistory"><uni-icons type="list" color="#334155" size="22" /><text>作业记录</text><uni-icons type="right" color="#94a3b8" size="18" /></button>
|
||||
<button class="header-menu-item" @tap="goProfile"><uni-icons type="person" color="#334155" size="22" /><text>个人中心</text><uni-icons type="right" color="#94a3b8" size="18" /></button>
|
||||
<button class="header-menu-close" @tap="closeMenu">关闭</button>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<template>
|
||||
<view class="receiving-summary">
|
||||
<view class="receiving-summary-head">
|
||||
<view><text class="receiving-summary-label">{{ $t('receivingSummary.container') }}</text><text class="receiving-summary-container">{{ session?.containerNo || '—' }}</text></view>
|
||||
<view><text class="receiving-summary-label">当前柜号</text><text class="receiving-summary-container">{{ session?.containerNo || '—' }}</text></view>
|
||||
<text class="receiving-summary-status">{{ statusLabel }}</text>
|
||||
</view>
|
||||
<view class="receiving-summary-context">
|
||||
<text>{{ $t('receivingSummary.warehouse') }}:{{ session?.overseasWarehouseName || '—' }}</text>
|
||||
<text>{{ $t('receivingSummary.destinations') }}:{{ destinationSummary }}</text>
|
||||
<text>收货仓:{{ session?.overseasWarehouseName || '—' }}</text>
|
||||
<text>目的仓:{{ destinationSummary }}</text>
|
||||
</view>
|
||||
<view class="receiving-summary-metrics">
|
||||
<view><text class="metric-value">{{ inboundCodeCount }}</text><text class="metric-label">{{ $t('receivingSummary.inboundCodes') }}</text></view>
|
||||
<view><text class="metric-value">{{ plannedPalletCount }}</text><text class="metric-label">{{ $t('receivingSummary.plannedPallets') }}</text></view>
|
||||
<view><text class="metric-value">{{ totalPackages }}</text><text class="metric-label">{{ $t('receivingSummary.plannedBoxes') }}</text></view>
|
||||
<view><text class="metric-value metric-pending">{{ pendingPackages }}</text><text class="metric-label">{{ $t('receivingSummary.pendingBoxes') }}</text></view>
|
||||
<view><text class="metric-value">{{ inboundCodeCount }}</text><text class="metric-label">入仓码</text></view>
|
||||
<view><text class="metric-value">{{ plannedPalletCount }}</text><text class="metric-label">计划托数</text></view>
|
||||
<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 class="receiving-summary-progress"><view><text>{{ $t('operation.receivingProgress') }}</text><text>{{ receivedPackages }} / {{ totalPackages }} {{ $t('common.boxes') }}</text></view><view class="progress-track"><view class="progress-fill" :style="{ width: percent + '%' }"></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>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
receivedPackages() { return Math.max(0, Number(this.session?.receivedPackages || 0)) },
|
||||
pendingPackages() { return Math.max(0, Number(this.session?.pendingPackages ?? this.totalPackages - this.receivedPackages)) },
|
||||
percent() { return this.totalPackages ? Math.min(100, Math.round(this.receivedPackages / this.totalPackages * 100)) : 0 },
|
||||
statusLabel() { return this.$t(({ WAIT_SIGN: 'operation.statusWait', SIGNED: 'operation.statusSigned', RECEIVING: 'operation.statusReceiving', COMPLETED: 'operation.statusCompleted' })[this.session?.status] || 'operation.statusWait') }
|
||||
statusLabel() { return ({ WAIT_SIGN: '待签收', SIGNED: '已签收', RECEIVING: '收货中', COMPLETED: '已完成' })[this.session?.status] || '待签收' }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
@input="handleInput"
|
||||
@confirm="handleConfirm"
|
||||
/>
|
||||
<text v-if="active" class="scan-target-badge">{{ $t('scanInput.active') }}</text>
|
||||
<text v-if="active" class="scan-target-badge">当前扫码</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
props: {
|
||||
name: { type: String, required: true },
|
||||
modelValue: { type: String, default: '' },
|
||||
label: { type: String, default: '' },
|
||||
placeholder: { type: String, default: '' },
|
||||
label: { type: String, default: '扫码输入框' },
|
||||
placeholder: { type: String, default: '扫描或人工输入' },
|
||||
active: Boolean
|
||||
},
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user