diff --git a/pages.json b/pages.json index 2fc234a..2d9e591 100644 --- a/pages.json +++ b/pages.json @@ -162,6 +162,20 @@ { "titleNView": false } + }, + { + "path" : "pages/work/order/scatter-picking-detail", + "style" : + { + "titleNView": false + } + }, + { + "path" : "pages/work/order/scatter-pick-goods-detail", + "style" : + { + "titleNView": false + } } ], diff --git a/pages/index/index.vue b/pages/index/index.vue index 49e9583..f59b40a 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1149,6 +1149,7 @@ const isGoodsQuery = menuName === '商品查询' || (menuName.includes('商品') && menuName.includes('查询')); const isOrderPicking = menuName === '订单拣货' || (menuName.includes('订单') && menuName.includes('拣货')); const isScatterWaveStrategy = menuName === '散单波次策略' || (menuName.includes('散单') && menuName.includes('波次')); + const isScatterPickingDetail = menuName === '散单拣货详情' || (menuName.includes('散单') && menuName.includes('拣货') && menuName.includes('详情')); const rawPath = item?.component || item?.path || ''; const normalizedPath = rawPath ? (rawPath.startsWith('/') ? rawPath : `/${rawPath}`) : ''; const isRelocation = menuName === '移库作业' || normalizedPath === '/pages/work/storage/relocation'; @@ -1164,7 +1165,9 @@ ? '/pages/work/product/query' : (isOrderPicking ? '/pages/work/order/picking' - : (isScatterWaveStrategy ? '/pages/work/order/scatter-wave-strategy' : normalizedPath)); + : (isScatterWaveStrategy + ? '/pages/work/order/scatter-wave-strategy' + : (isScatterPickingDetail ? '/pages/work/order/scatter-picking-detail' : normalizedPath))); if (!targetPath) { uni.showToast({ diff --git a/pages/work/order/scatter-pick-goods-detail.vue b/pages/work/order/scatter-pick-goods-detail.vue new file mode 100644 index 0000000..4c574e5 --- /dev/null +++ b/pages/work/order/scatter-pick-goods-detail.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/pages/work/order/scatter-picking-detail.vue b/pages/work/order/scatter-picking-detail.vue new file mode 100644 index 0000000..0e2eac8 --- /dev/null +++ b/pages/work/order/scatter-picking-detail.vue @@ -0,0 +1,233 @@ + + + + + \ No newline at end of file diff --git a/pages/work/order/scatter-wave-strategy.vue b/pages/work/order/scatter-wave-strategy.vue index 665e4f2..8edfa3d 100644 --- a/pages/work/order/scatter-wave-strategy.vue +++ b/pages/work/order/scatter-wave-strategy.vue @@ -1,32 +1,71 @@ @@ -35,11 +74,19 @@ export default { data() { return { - title: '散单波次策略', + title: '散单待拣货列表', + pendingCount: 50, + grabCount: 5, loading: false, + currentStrategyId: '', strategyList: [] }; }, + computed: { + currentStrategy() { + return this.strategyList.find(item => String(item.id) === String(this.currentStrategyId)) || this.strategyList[0] || {}; + } + }, onLoad() { this.loadStrategyList(); }, @@ -103,10 +150,10 @@ const type = Number(item?.strategy_type || 0); const mode = Number(item?.batch_mode || 0); if (mode === 1) { - return '边拣边分'; + return 'E型'; } if (type === 1) { - return '先拣后分'; + return 'F型'; } return '未知'; }, @@ -133,13 +180,45 @@ const list = this.extractWaveStrategyList(payload, response); return list.map(item => this.normalizeWaveStrategyItem(item)); }, + selectStrategy(item) { + if (!item || typeof item !== 'object') { + return; + } + this.currentStrategyId = item.id; + }, + handleRefresh() { + this.loadStrategyList(); + }, + handleGrabScatter() { + if (!this.currentStrategy || !this.currentStrategy.id) { + uni.showToast({ + title: '请先选择策略', + icon: 'none' + }); + return; + } + + const params = [ + `strategyId=${encodeURIComponent(String(this.currentStrategy.id || ''))}`, + `strategyName=${encodeURIComponent(String(this.currentStrategy.strategyName || '--'))}`, + `ownerText=${encodeURIComponent(String(this.currentStrategy.ownerText || '--'))}`, + `pickTypeText=${encodeURIComponent(String(this.currentStrategy.pickTypeText || '--'))}`, + `grabCount=${encodeURIComponent(String(this.grabCount || 0))}` + ]; + this.$tools.routerTo(`/pages/work/order/scatter-picking-detail?${params.join('&')}`); + }, async loadStrategyList() { this.loading = true; try { const params = this.buildWaveStrategyListParams(); const response = await this.$http('order.wave.waveStrategyList', params); + const payload = this.extractWaveStrategyPayload(response); + this.pendingCount = Number(payload?.pending_count ?? payload?.pendingCount ?? 50); this.strategyList = this.parseWaveStrategyResponse(response); + this.currentStrategyId = this.strategyList[0]?.id || ''; } catch (error) { + this.pendingCount = 50; + this.currentStrategyId = ''; this.strategyList = []; uni.showToast({ title: this.getApiErrorMessage(error, '策略加载失败'), @@ -157,28 +236,85 @@ .scatter-wave-page { min-height: 100vh; background: #f8f9fa; + position: relative; + } + + .normar_container { + position: relative; + } + + ::v-deep .nav-title .right { + width: auto; + min-width: 170rpx; + display: flex; + justify-content: flex-end; + } + + .nav-right-pending { + font-size: 32rpx; + line-height: 36rpx; + color: #ffffff; + padding: 8rpx 18rpx; + border-radius: 6rpx; + background: #2979ff; } .list-content { - height: 100rpx; - flex: 1; - padding-top: 20rpx; + height: 100%; + } + + .content-layout { + height: calc(100vh - 170rpx - env(safe-area-inset-bottom)); + display: flex; + flex-direction: column; + padding: 20rpx 24rpx 120rpx; + background: #f3f4f6; box-sizing: border-box; } - .list-wrap { + .top-module, + .bottom-module { + flex: 1; + min-height: 0; + } + + .top-module { + padding-bottom: 10rpx; + } + + .bottom-module { + padding-top: 10rpx; + } + + .grid-scroll { + height: 100%; + } + + .grid-wrap { + display: flex; + flex-wrap: wrap; + row-gap: 8rpx; + column-gap: 16rpx; + align-content: flex-start; padding-bottom: 20rpx; } .content-card { - margin: 20rpx 24rpx; - padding: 20rpx; + margin: 0; + padding: 16rpx; background: #fff; border-radius: 14rpx; + box-sizing: border-box; + height: 100%; + overflow: hidden; + } + + .content-card--detail { + overflow-y: auto; } .card-title { - font-size: 30rpx; + font-size: 34rpx; font-weight: 600; color: #303133; margin-bottom: 14rpx; @@ -187,20 +323,139 @@ .card-row { display: flex; align-items: flex-start; - font-size: 24rpx; - line-height: 38rpx; + font-size: 32rpx; + line-height: 48rpx; + } + + .card-row--inline-group { + justify-content: space-between; + } + + .group-item { + flex: 1; + display: flex; + align-items: flex-start; + } + + .group-item + .group-item { + margin-left: 6rpx; + } + + .group-item .label { + width: auto; + white-space: nowrap; + margin-right: 6rpx; } .label { - width: 220rpx; + width: auto; + white-space: nowrap; + margin-right: 6rpx; color: #909399; } .value { flex: 1; + min-width: 0; color: #303133; } + .shentong-e-value { + font-size: 32rpx; + line-height: 46rpx; + } + + .pick-card { + width: calc(25% - 12rpx); + height: 180rpx; + background: #fff; + border-radius: 14rpx; + padding: 10rpx; + box-sizing: border-box; + display: flex; + flex-direction: column; + justify-content: space-between; + border: 2rpx solid transparent; + position: relative; + overflow: hidden; + } + + .pick-card--active { + border-color: transparent; + box-shadow: inset 0 0 0 6rpx #2979ff, 0 10rpx 24rpx rgba(41, 121, 255, 0.2); + } + + .pick-card__top { + display: flex; + justify-content: space-between; + align-items: center; + min-height: 34rpx; + } + + .pick-card__tag-left, + .pick-card__tag-right { + position: absolute; + top: 0; + font-size: 22rpx; + line-height: 30rpx; + padding: 4rpx 14rpx 6rpx; + background: #19be6b; + color: #fff; + max-width: 48%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .pick-card__tag-left { + left: 0; + clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%); + } + + .pick-card__tag-right { + right: 0; + clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%); + } + + .pick-card__main { + display: flex; + align-items: flex-end; + justify-content: center; + margin-top: 6rpx; + } + + .pick-card__num { + font-size: 40rpx; + line-height: 1; + font-weight: 700; + color: #303133; + } + + .pick-card__unit { + margin-left: 4rpx; + font-size: 18rpx; + line-height: 24rpx; + color: #606266; + } + + .pick-card__sub { + text-align: center; + font-size: 18rpx; + line-height: 24rpx; + color: #909399; + } + + .pick-card__bottom { + margin-top: 6rpx; + background: #2979ff; + color: #fff; + text-align: center; + border-radius: 10rpx; + font-size: 32rpx; + line-height: 44rpx; + padding: 2rpx 6rpx; + } + .empty-wrap { min-height: 400rpx; display: flex; @@ -216,4 +471,18 @@ .safe-area-bottom { height: calc(20rpx + env(safe-area-inset-bottom)); } + + .bottom-action-bar { + position: fixed; + left: 0; + right: 0; + bottom: 0; + display: grid; + grid-template-columns: 1fr 1fr; + column-gap: 12rpx; + padding: 12rpx 24rpx calc(12rpx + env(safe-area-inset-bottom)); + background: #fff; + border-top: 1rpx solid #f0f0f0; + box-sizing: border-box; + }