fix: preserve confirmed fee guard after test sync
This commit is contained in:
@@ -61,6 +61,7 @@ import {
|
|||||||
calculateInboundFee,
|
calculateInboundFee,
|
||||||
confirmInboundFee,
|
confirmInboundFee,
|
||||||
createFeeActionIdempotencyKey,
|
createFeeActionIdempotencyKey,
|
||||||
|
getLatestInboundFee,
|
||||||
getInboundMeasurement,
|
getInboundMeasurement,
|
||||||
saveInboundMeasurementDraft,
|
saveInboundMeasurementDraft,
|
||||||
InboundFeePanel,
|
InboundFeePanel,
|
||||||
@@ -1453,6 +1454,20 @@ async function executeConfirmAndSendFee() {
|
|||||||
try {
|
try {
|
||||||
const tenantId = String(summary.tenantId)
|
const tenantId = String(summary.tenantId)
|
||||||
const inboundId = String(summary.inboundId)
|
const inboundId = String(summary.inboundId)
|
||||||
|
try {
|
||||||
|
const snapshot = await getLatestInboundFee(tenantId, inboundId)
|
||||||
|
if (snapshot.customerConfirmationStatus === 'CONFIRMED' || snapshot.customerConfirmedAt) {
|
||||||
|
ElMessage.warning('客户已确认该费用,费用已锁定,不允许再修改或重新发送')
|
||||||
|
feeConfirmOpen.value = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
const details = getApiErrorDetails(error, '费用状态查询失败,请刷新后重试')
|
||||||
|
if (details.code !== 'A0404') {
|
||||||
|
ElMessage.error(details.message)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
let snapshot = await calculateInboundFee(tenantId, inboundId, {
|
let snapshot = await calculateInboundFee(tenantId, inboundId, {
|
||||||
selectedWeightKg,
|
selectedWeightKg,
|
||||||
selectedVolumeCbm,
|
selectedVolumeCbm,
|
||||||
|
|||||||
Reference in New Issue
Block a user