This commit is contained in:
@@ -507,6 +507,7 @@
|
||||
CommissionSourceMap
|
||||
} from '@/config/constants/commission'
|
||||
import { RoutesAlias } from '@/router/routesAlias'
|
||||
import { normalizeApiError } from '@/utils/business/apiError'
|
||||
|
||||
defineOptions({ name: 'AgentCommission' })
|
||||
|
||||
@@ -1021,9 +1022,18 @@
|
||||
}
|
||||
|
||||
const handleCreditConflict = async () => {
|
||||
ElMessage.warning('资金概况已被更新,已刷新最新数据,请重新调整')
|
||||
creditDialogVisible.value = false
|
||||
const shopId = currentCreditShop.value?.shop_id
|
||||
await getTableData()
|
||||
|
||||
if (shopId) {
|
||||
const latest = summaryList.value.find((item) => item.shop_id === shopId)
|
||||
if (latest) {
|
||||
// 仅刷新后端版本和当前余额,保留用户刚填写的表单值,方便确认后重试。
|
||||
currentCreditShop.value = latest
|
||||
}
|
||||
}
|
||||
|
||||
ElMessage.warning('资金概况已被其他操作更新,已刷新最新版本;请确认后重新提交')
|
||||
}
|
||||
|
||||
const handleCreditSubmit = async () => {
|
||||
@@ -1058,6 +1068,7 @@
|
||||
await handleCreditConflict()
|
||||
} else {
|
||||
console.error('实际信用额度调整失败:', error)
|
||||
ElMessage.error(normalizeApiError(error).message)
|
||||
}
|
||||
} finally {
|
||||
creditSubmitting.value = false
|
||||
|
||||
Reference in New Issue
Block a user