diff --git a/pages/work/order/order-review.vue b/pages/work/order/order-review.vue index 7b80076..0c88c36 100644 --- a/pages/work/order/order-review.vue +++ b/pages/work/order/order-review.vue @@ -2211,17 +2211,34 @@ import ReviewDetail from './order-review-comps/ReviewDetail.vue'; return; } const weighKg = this.weighWeight / 1000; + const listType = String(this.detailInfo?.listType || '').trim(); const orderId = Number(this.detailInfo?.orderId || this.detailInfo?.recordId || 0); - if (!orderId) { - uni.showToast({ title: '缺少订单ID', icon: 'none' }); - return; - } + const waybillNo = String(this.detailInfo?.waybillNo || '').trim(); uni.showLoading({ title: '提交称重中...' }); try { - await this.$http('order.recheckOrder.updateExpressWeighingWeight', { - order_id: orderId, - weighing_weight: weighKg - }); + // 团购模式使用运单号模式(order_id=0 + waybill_code) + if (listType === 'group') { + if (!waybillNo) { + uni.showToast({ title: '缺少运单号', icon: 'none' }); + uni.hideLoading(); + return; + } + await this.$http('order.recheckOrder.updateExpressWeighingWeight', { + order_id: 0, + waybill_code: waybillNo, + weighing_weight: weighKg + }); + } else { + if (!orderId) { + uni.showToast({ title: '缺少订单ID', icon: 'none' }); + uni.hideLoading(); + return; + } + await this.$http('order.recheckOrder.updateExpressWeighingWeight', { + order_id: orderId, + weighing_weight: weighKg + }); + } uni.hideLoading(); uni.showToast({ title: '称重完成', icon: 'success' }); this.showWeighPopup = false;