修改订单复核的称重接口

This commit is contained in:
zm2000 2026-07-03 17:32:00 +08:00
parent 533ad0a856
commit 4d98e54b8e

View File

@ -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;