From 9b2d14dd127e97067ff6509ba818899712a5838f Mon Sep 17 00:00:00 2001
From: zm2000 <18386612143@163.com>
Date: Thu, 19 Nov 2026 20:18:13 +0800
Subject: [PATCH] =?UTF-8?q?feat(B2BOperation):=20=E6=96=B0=E5=A2=9EB2B?=
=?UTF-8?q?=E5=A4=87=E8=B4=A7=E4=B8=8E=E6=8F=90=E8=B4=A7=E4=BD=9C=E4=B8=9A?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=8F=8A=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 新增备货作业列表页 stockPreparation.vue
- 支持待处理B2B订单搜索、备货状态筛选(未备货/备货中/已完成)
- 卡片点击按状态处理:未备货自动开始备货、备货中校验工号、已完成进入详情
- 备货中卡片支持取消备货
- 新增备货明细页 stockPreparationDetail.vue
- 展示商品明细与分箱快照,支持编辑/保存分箱及自动保存
- 支持提交完成备货、取消备货
- 集成备货凭证照片上传(uploadImgCos + updateB2bOrderImages)
- 新增提货作业页 pickupOperation.vue
- 待提货/已提货两个状态切换,按运单号/发货单号搜索
- 已提货卡片展示备货人、备货/提货照片缩略图
- 待提货卡片弹窗确认提货,输入/扫码提货车牌号
- 注册页面路由:stockPreparation、stockPreparationDetail、pickupOperation
- core/request/apis.js 新增B2B接口:
- order.pendingOrder2b.list(B2B待处理订单列表)
- order.deliveryOrder2b.list(B2B配送订单列表,dispatch/m4)
- order.startB2bPrep / cancelB2bPrep / finishB2bPrep(备货开始/取消/完成)
- order.getB2bPackingSnapshot / updateB2bPackingItems(分箱快照/更新)
- order.updateB2bOrderImages(订单图片同步)
- order.pickupB2b(提货确认)
---
src/core/request/apis.js | 59 +
src/pages.json | 21 +
src/pages/B2BOperation/pickupOperation.vue | 1009 +++++++++++++++++
src/pages/B2BOperation/stockPreparation.vue | 587 ++++++++++
.../B2BOperation/stockPreparationDetail.vue | 895 +++++++++++++++
5 files changed, 2571 insertions(+)
create mode 100644 src/pages/B2BOperation/pickupOperation.vue
create mode 100644 src/pages/B2BOperation/stockPreparation.vue
create mode 100644 src/pages/B2BOperation/stockPreparationDetail.vue
diff --git a/src/core/request/apis.js b/src/core/request/apis.js
index cd2e2b3..9490bab 100644
--- a/src/core/request/apis.js
+++ b/src/core/request/apis.js
@@ -700,6 +700,56 @@ export default {
isSystemApi: true
}
},
+ pendingOrder2b: {
+ list: {
+ path: "order.pendingOrder2b.list",
+ auth: true,
+ method: "POST",
+ isSystemApi: true
+ }
+ },
+ startB2bPrep: {
+ path: "order.startB2bPrep",
+ auth: true,
+ method: "POST",
+ isSystemApi: true
+ },
+ getB2bPackingSnapshot: {
+ path: "order.getB2bPackingSnapshot",
+ auth: true,
+ method: "POST",
+ isSystemApi: true
+ },
+ updateB2bPackingItems: {
+ path: "order.updateB2bPackingItems",
+ auth: true,
+ method: "POST",
+ isSystemApi: true
+ },
+ cancelB2bPrep: {
+ path: "order.cancelB2bPrep",
+ auth: true,
+ method: "POST",
+ isSystemApi: true
+ },
+ updateB2bOrderImages: {
+ path: "order.updateB2bOrderImages",
+ auth: true,
+ method: "POST",
+ isSystemApi: true
+ },
+ finishB2bPrep: {
+ path: "order.finishB2bPrep",
+ auth: true,
+ method: "POST",
+ isSystemApi: true
+ },
+ pickupB2b: {
+ path: "order.pickupB2b",
+ auth: true,
+ method: "POST",
+ isSystemApi: true
+ },
recheckOrder: {
recheckOrderList: {
path: "order.recheckOrder.recheckOrderList",
@@ -764,6 +814,15 @@ export default {
isSystemApi: true
}
},
+ // B2B 配送订单列表:dispatch 分表 + 默认 dispatch_lane=m4,强制 is_b2b='Y'
+ deliveryOrder2b: {
+ list: {
+ path: "order.deliveryOrder2b.list",
+ auth: true,
+ method: "POST",
+ isSystemApi: true
+ }
+ },
detail: {
path: "order.detail",
auth: true,
diff --git a/src/pages.json b/src/pages.json
index d25e6c6..b8a893d 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -380,6 +380,27 @@
{
"titleNView": false
}
+ },
+ {
+ "path" : "pages/B2BOperation/stockPreparation",
+ "style" :
+ {
+ "titleNView": false
+ }
+ },
+ {
+ "path" : "pages/B2BOperation/pickupOperation",
+ "style" :
+ {
+ "titleNView": false
+ }
+ },
+ {
+ "path" : "pages/B2BOperation/stockPreparationDetail",
+ "style" :
+ {
+ "titleNView": false
+ }
}
],
diff --git a/src/pages/B2BOperation/pickupOperation.vue b/src/pages/B2BOperation/pickupOperation.vue
new file mode 100644
index 0000000..662509f
--- /dev/null
+++ b/src/pages/B2BOperation/pickupOperation.vue
@@ -0,0 +1,1009 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ tab.label }}
+
+
+
+
+
+
+
+ 加载中...
+
+
+
+ 暂无B2B提货订单
+
+
+
+
+
+
+
+ 货主:
+ {{ getStoreOwner(item) }}
+
+
+ 总箱数:
+ {{ item.total_box_count || 0 }}
+
+
+ 提货车牌号:
+ {{ item.pickup_plate_number || '--' }}
+
+
+ 提货时间:
+ {{ formatDateTime(item.picked_up_at) }}
+
+
+
+ 备货人:
+ {{ getPrepOperatorName(item) }}
+
+
+ 备货照片:
+
+
+
+
+
+ 提货照片:
+
+
+
+
+
+
+
+
+
+
+
+ {{ noMore ? '没有更多了' : '上拉加载更多' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提示
+ 确认提货?提货后该订单将标记为已提货。
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/B2BOperation/stockPreparation.vue b/src/pages/B2BOperation/stockPreparation.vue
new file mode 100644
index 0000000..2ba66bd
--- /dev/null
+++ b/src/pages/B2BOperation/stockPreparation.vue
@@ -0,0 +1,587 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ tab.label }}
+
+
+
+
+
+
+
+ 加载中...
+
+
+
+ 暂无B2B待处理订单
+
+
+
+
+
+
+
+ 货主:
+ {{ getStoreOwner(item) }}
+
+
+ 总箱数:
+ {{ item.total_box_count || 0 }}
+
+
+ 备货人:
+ {{ item.prep_operator_name || '--' }}
+
+
+ 备注:
+ {{ item.prep_remark || '--' }}
+
+
+
+
+
+
+
+ {{ noMore ? '没有更多了' : '上拉加载更多' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/B2BOperation/stockPreparationDetail.vue b/src/pages/B2BOperation/stockPreparationDetail.vue
new file mode 100644
index 0000000..f95671a
--- /dev/null
+++ b/src/pages/B2BOperation/stockPreparationDetail.vue
@@ -0,0 +1,895 @@
+
+
+
+
+
+ 保存分箱
+
+
+
+
+
+
+
+ 加载中...
+
+
+
+
+ 发货单号:
+ {{ detail.delivery_order_code || '--' }}
+
+
+ 备货状态:
+ {{ prepStatusText }}
+
+
+ 总箱数:
+ {{ displayTotalBoxCount }}
+
+
+ 取货储位:
+ {{ detail.pick_location_count || 0 }} 个
+
+
+
+
+
+ 同一商品行 + 箱号不能重复;分箱数量合计需等于应拣数量(超量会被拦截)。
+
+
+
+
+ 应拣
+ {{ it.plan_qty || 0 }}
+ 已分箱
+ {{ getItemPackedQty(it) }}
+ {{ getDiffLabel(it) }}
+ {{ getItemDiffAbs(it) }}
+
+
+ 取货储位
+ {{ getPickLocations(it) }}
+
+
+
+
+ 删除
+
+
+ + 添加箱号
+
+
+
+
+
+
+ 暂无商品明细
+
+
+
+
+
+ 应拣:
+ {{ it.plan_qty || 0 }}
+ 已分箱:
+ {{ it.packed_quantity || 0 }}
+
+
+ 分箱:
+
+ {{ box.box_no || '--' }} × {{ box.quantity || 0 }}
+
+
+
+ 取货储位:
+ {{ getPickLocations(it) }}
+
+
+
+
+
+
+
+
+
+
+
+ 总箱数:
+ {{ displayTotalBoxCount }}
+
+
+
+
+
+
+
+
+
+ 取消备货
+ 完成备货
+
+
+
+
+
+
+