修改订单复核的称重接口

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; return;
} }
const weighKg = this.weighWeight / 1000; const weighKg = this.weighWeight / 1000;
const listType = String(this.detailInfo?.listType || '').trim();
const orderId = Number(this.detailInfo?.orderId || this.detailInfo?.recordId || 0); const orderId = Number(this.detailInfo?.orderId || this.detailInfo?.recordId || 0);
if (!orderId) { const waybillNo = String(this.detailInfo?.waybillNo || '').trim();
uni.showToast({ title: '缺少订单ID', icon: 'none' });
return;
}
uni.showLoading({ title: '提交称重中...' }); uni.showLoading({ title: '提交称重中...' });
try { try {
await this.$http('order.recheckOrder.updateExpressWeighingWeight', { // 团购模式使用运单号模式(order_id=0 + waybill_code)
order_id: orderId, if (listType === 'group') {
weighing_weight: weighKg 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.hideLoading();
uni.showToast({ title: '称重完成', icon: 'success' }); uni.showToast({ title: '称重完成', icon: 'success' });
this.showWeighPopup = false; this.showWeighPopup = false;