From 2d6ffc0451c42a68b192a78a4a96e850b34bf803 Mon Sep 17 00:00:00 2001 From: zm2000 <18386612143@163.com> Date: Sat, 9 May 2026 18:23:17 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=8B=A3=E8=B4=A7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=AD=97=E5=8F=B7=E4=B8=8E=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/work/order/picking.vue | 42 +- .../work/order/scatter-pick-goods-detail.vue | 401 ++++++++++++++++-- pages/work/order/scatter-picking-detail.vue | 142 ++++++- 3 files changed, 532 insertions(+), 53 deletions(-) diff --git a/pages/work/order/picking.vue b/pages/work/order/picking.vue index 21a90ab..6d99965 100644 --- a/pages/work/order/picking.vue +++ b/pages/work/order/picking.vue @@ -60,7 +60,7 @@ 复核状态:{{ getReviewStatusText(item.reviewed, item.inspectionStatus) }} - 进入拣货 + 进入拣货 @@ -545,7 +545,7 @@ } .search-btn__text { - font-size: 26rpx; + font-size: 34rpx; color: #2979ff; font-weight: 600; } @@ -562,7 +562,7 @@ height: 52rpx; padding: 0 24rpx; margin-right: 12rpx; - font-size: 24rpx; + font-size: 32rpx; color: #666; background: #f6f7fb; border-radius: 26rpx; @@ -584,21 +584,26 @@ .summary-row { display: flex; align-items: center; - font-size: 24rpx; - line-height: 38rpx; + font-size: 32rpx; + line-height: 50rpx; } .summary-label { - width: 180rpx; - font-size: 24rpx; - line-height: 38rpx; + width: 220rpx; + min-width: 220rpx; + font-size: 32rpx; + line-height: 50rpx; color: #909399; + white-space: nowrap; + word-break: keep-all; + overflow-wrap: normal; + flex-shrink: 0; } .summary-value { flex: 1; - font-size: 24rpx; - line-height: 38rpx; + font-size: 32rpx; + line-height: 50rpx; color: #303133; font-weight: 500; } @@ -664,7 +669,7 @@ } .order-status { - font-size: 22rpx; + font-size: 30rpx; padding: 6rpx 14rpx; border-radius: 18rpx; } @@ -687,13 +692,20 @@ .item-row { display: flex; align-items: center; - font-size: 24rpx; - line-height: 38rpx; + font-size: 32rpx; + line-height: 50rpx; } .label { - width: 128rpx; + width: 170rpx; + min-width: 170rpx; color: #909399; + display: inline-flex; + align-items: center; + white-space: nowrap; + word-break: keep-all; + overflow-wrap: normal; + flex-shrink: 0; } .value { @@ -723,7 +735,7 @@ .empty-text { margin-top: 12rpx; - font-size: 26rpx; + font-size: 34rpx; color: #999; } diff --git a/pages/work/order/scatter-pick-goods-detail.vue b/pages/work/order/scatter-pick-goods-detail.vue index 4c574e5..950ea79 100644 --- a/pages/work/order/scatter-pick-goods-detail.vue +++ b/pages/work/order/scatter-pick-goods-detail.vue @@ -1,31 +1,75 @@ @@ -35,9 +79,12 @@ data() { return { title: '拣货商品详情', + currentGoodsIndex: 0, + showPickListSection: true, detailInfo: { recordId: '', waveNo: '--', + orderTotal: 0, pickerName: '--', cartNo: '--', status: 'pending', @@ -46,18 +93,47 @@ goodsList: [] }; }, + computed: { + orderTotal() { + const total = Number(this.detailInfo?.orderTotal || 0); + if (!Number.isNaN(total) && total > 0) { + return total; + } + return this.goodsList.length; + }, + currentGoods() { + return this.goodsList[this.currentGoodsIndex] || {}; + }, + hasPrevGoods() { + return this.currentGoodsIndex > 0; + }, + hasNextGoods() { + return this.currentGoodsIndex < this.goodsList.length - 1; + } + }, onLoad(options) { this.detailInfo = { recordId: options?.recordId || '', waveNo: options?.waveNo || '--', + orderTotal: Number(options?.orderTotal || 0), pickerName: options?.pickerName || '--', cartNo: options?.cartNo || '--', status: options?.status || 'pending', unreviewedCount: Number(options?.unreviewedCount || 0) }; this.goodsList = this.buildMockGoodsList(); + this.currentGoodsIndex = 0; }, methods: { + togglePickListSection() { + this.showPickListSection = !this.showPickListSection; + }, + handleComplete() { + uni.showToast({ + title: '已完成', + icon: 'none' + }); + }, getStatusText(status) { const map = { pending: '待拣货', @@ -69,11 +145,35 @@ buildMockGoodsList() { return Array.from({ length: 5 }).map((_, index) => ({ id: `${this.detailInfo.recordId || 'record'}-${index + 1}`, + orderCount: (index % 4) + 1, + productQty: (index % 6) + 2, skuCode: `SKU${String(index + 1).padStart(4, '0')}`, skuName: `模拟商品${index + 1}`, + location: `A-${String(index + 1).padStart(2, '0')}`, + barcode: `6900000000${String(index + 1).padStart(3, '0')}`, + imageUrl: '', needQty: (index % 3) + 1, pickedQty: 0 })); + }, + selectGoods(index) { + const next = Number(index); + if (Number.isNaN(next) || next < 0 || next >= this.goodsList.length) { + return; + } + this.currentGoodsIndex = next; + }, + showPrevGoods() { + if (!this.hasPrevGoods) { + return; + } + this.currentGoodsIndex -= 1; + }, + showNextGoods() { + if (!this.hasNextGoods) { + return; + } + this.currentGoodsIndex += 1; } } }; @@ -85,23 +185,96 @@ background: #f8f9fa; } - .summary-card { - margin: 20rpx 24rpx 12rpx; + ::v-deep .nav-title .right { + width: auto; + min-width: 90rpx; + display: flex; + justify-content: flex-end; + } + + .nav-right-complete { + font-size: 32rpx; + line-height: 36rpx; + color: #ffffff; + padding: 8rpx 18rpx; + border-radius: 6rpx; + background: #2979ff; + } + + .page-head { + margin: 20rpx 24rpx 0; padding: 16rpx; background: #fff; border-radius: 12rpx; + display: flex; + align-items: center; } - .summary-row, - .goods-row { + .page-head-item { + flex: 1; display: flex; + flex-direction: column; + } + + .page-head-item--right { + align-items: flex-end; + } + + .page-head-label { font-size: 28rpx; line-height: 40rpx; + color: #909399; + display: inline-flex; + align-items: center; + white-space: nowrap !important; + word-break: keep-all; + overflow-wrap: normal; + overflow: hidden; + text-overflow: ellipsis; + } + + .page-head-value { + margin-top: 4rpx; + font-size: 36rpx; + line-height: 46rpx; + font-weight: 600; + color: #303133; + } + + .goods-row { + display: flex; + flex-wrap: nowrap; + width: 100%; + margin-top: 14rpx; + font-size: 32rpx; + line-height: 54rpx; + } + + .goods-row:first-child { + margin-top: 0; + } + + .goods-row--quantity { + align-items: center; + } + + .goods-row--quantity .value { + flex: 0; + margin-right: 12rpx; } .label { - width: 150rpx; + width: 180rpx; + min-width: 180rpx; color: #909399; + display: inline-flex; + align-items: center; + white-space: nowrap !important; + word-break: keep-all; + overflow-wrap: normal; + overflow: hidden; + text-overflow: ellipsis; + flex-shrink: 0; } .value { @@ -115,19 +288,182 @@ box-sizing: border-box; } - .goods-list { + .content-layout { display: flex; flex-direction: column; - gap: 12rpx; + padding: 0 24rpx; + flex: 1; + min-height: 0; + box-sizing: border-box; } - .goods-item { + .top-module { + flex: 0 0 auto; + margin-top: 16rpx; + } + + .top-card { background: #fff; border-radius: 12rpx; - padding: 14rpx 16rpx; + padding: 16rpx; border: 1rpx solid #ebeef5; } + .top-main { + display: flex; + flex-direction: column; + align-items: stretch; + } + + .goods-image-name-row { + display: flex; + align-items: center; + gap: 16rpx; + } + + .goods-image { + flex-shrink: 0; + } + + .goods-name { + flex: 1; + min-width: 0; + font-size: 38rpx; + line-height: 52rpx; + font-weight: 700; + color: #303133; + } + + .top-info { + width: 100%; + margin-top: 22rpx; + } + + .pick-list-title-btn { + margin-top: 0; + margin-left: auto; + display: inline-flex; + align-items: center; + justify-content: center; + font-size: 32rpx; + line-height: 36rpx; + font-weight: 600; + color: #ffffff; + background: #2979ff; + border-radius: 6rpx; + padding: 6rpx 14rpx; + } + + .pick-list-scroll { + margin-top: 8rpx; + width: 100%; + } + + .pick-list { + display: flex; + align-items: center; + width: 100%; + } + + .pick-item-wrap { + display: flex; + align-items: center; + width: calc((100% - 64rpx) / 5); + margin-right: 16rpx; + } + + .pick-item-wrap:nth-child(5n) { + margin-right: 0; + } + + .metric-card-btn { + position: relative; + display: flex; + align-items: stretch; + justify-content: center; + width: 100%; + height: 72rpx; + padding: 0; + border-radius: 10rpx; + background: #f2f3f5; + border: 2rpx solid transparent; + overflow: hidden; + } + + .metric-card-btn--active { + background: #eaf2ff; + border-color: #2979ff; + } + + .order-corner { + position: absolute; + left: 0; + top: 0; + width: 0; + height: 0; + border-top: 16rpx solid #19be6b; + border-right: 16rpx solid transparent; + } + + .metric-diagonal { + position: absolute; + left: -10rpx; + top: 50%; + width: calc(100% + 20rpx); + height: 2rpx; + background: #dcdfe6; + transform: rotate(-28deg); + transform-origin: center; + } + + .metric-order { + position: absolute; + left: 8rpx; + top: 6rpx; + font-size: 30rpx; + line-height: 38rpx; + font-weight: 600; + color: #606266; + } + + .metric-product { + position: absolute; + right: 8rpx; + bottom: 4rpx; + font-size: 38rpx; + line-height: 46rpx; + font-weight: 700; + color: #2979ff; + } + + .switch-row { + margin-top: 14rpx; + display: flex; + align-items: center; + justify-content: space-between; + } + + .switch-index { + font-size: 28rpx; + line-height: 38rpx; + color: #606266; + } + + .bottom-module { + flex: 1; + min-height: 0; + margin-top: 12rpx; + overflow: hidden; + } + + .bottom-module-title { + font-size: 32rpx; + line-height: 46rpx; + font-weight: 600; + color: #303133; + margin-bottom: 8rpx; + } + .empty-state { height: 100%; display: flex; @@ -136,9 +472,14 @@ align-items: center; } + .empty-state--content { + height: calc(100vh - 350rpx - env(safe-area-inset-bottom)); + margin: 0 24rpx; + } + .empty-text { margin-top: 18rpx; - font-size: 28rpx; + font-size: 32rpx; color: #909399; } diff --git a/pages/work/order/scatter-picking-detail.vue b/pages/work/order/scatter-picking-detail.vue index 0e2eac8..993d37e 100644 --- a/pages/work/order/scatter-picking-detail.vue +++ b/pages/work/order/scatter-picking-detail.vue @@ -25,10 +25,45 @@ {{ getStatusText(item.status) }} + + + 打印所有未复核订单 + + + + + + 打印设置 + + 打印台 + {{ printStationName }} + + + 打印 + + 打印 + + + + 打印消息 + {{ printMessage || '暂无打印消息' }} + + + @@ -41,6 +76,10 @@ grabCount: 0, onlyMine: false, currentUserId: '', + showPrintPopup: false, + printStationName: '默认打印台', + printMessage: '', + pendingPrintCount: 0, orderList: [] }; }, @@ -109,6 +148,30 @@ `unreviewedCount=${encodeURIComponent(String(item.unreviewedCount || 0))}` ]; this.$tools.routerTo(`/pages/work/order/scatter-pick-goods-detail?${params.join('&')}`); + }, + handlePrintAllUnreviewed() { + const targetList = this.displayOrderList.filter(item => Number(item.unreviewedCount || 0) > 0); + if (!targetList.length) { + uni.showToast({ + title: '暂无未复核订单可打印', + icon: 'none' + }); + return; + } + this.pendingPrintCount = targetList.length; + this.printMessage = `待打印未复核订单 ${targetList.length} 条`; + this.showPrintPopup = true; + }, + handleConfirmPrint() { + if (this.pendingPrintCount <= 0) { + this.printMessage = '暂无可打印订单'; + return; + } + this.printMessage = `打印已发送,未复核订单 ${this.pendingPrintCount} 条`; + uni.showToast({ + title: `已发起打印${this.pendingPrintCount}条`, + icon: 'none' + }); } } }; @@ -178,13 +241,23 @@ .record-line { display: flex; align-items: center; - font-size: 28rpx; - line-height: 40rpx; + flex-wrap: nowrap; + font-size: 32rpx; + line-height: 52rpx; + } + + .record-line + .record-line { + margin-top: 8rpx; } .record-label { - width: 120rpx; + width: 170rpx; + min-width: 170rpx; color: #909399; + white-space: nowrap; + word-break: keep-all; + overflow-wrap: normal; + flex-shrink: 0; } .record-value { @@ -201,18 +274,24 @@ } .record-count { - font-size: 26rpx; - line-height: 34rpx; + font-size: 30rpx; + line-height: 40rpx; color: #fa8c16; } .record-status { - margin-top: 8rpx; - font-size: 26rpx; - line-height: 34rpx; + margin-top: 12rpx; + font-size: 30rpx; + line-height: 40rpx; color: #2979ff; } + .record-footer { + margin-top: 14rpx; + display: flex; + justify-content: flex-end; + } + .empty-state { height: 100%; display: flex; @@ -230,4 +309,51 @@ .safe-area-bottom { height: calc(30rpx + env(safe-area-inset-bottom)); } + + .print-popup { + padding: 24rpx; + } + + .print-popup-title { + font-size: 32rpx; + font-weight: 600; + color: #303133; + margin-bottom: 18rpx; + } + + .print-row { + display: flex; + align-items: flex-start; + padding: 16rpx 0; + border-bottom: 1rpx solid #f2f3f5; + } + + .print-row--action { + align-items: center; + } + + .print-row--message { + border-bottom: none; + } + + .print-label { + width: 130rpx; + font-size: 28rpx; + line-height: 40rpx; + color: #909399; + } + + .print-value { + flex: 1; + font-size: 28rpx; + line-height: 40rpx; + color: #303133; + } + + .print-message { + flex: 1; + font-size: 28rpx; + line-height: 40rpx; + color: #303133; + } \ No newline at end of file