修改死锁

This commit is contained in:
wuweihua
2026-10-21 10:34:45 +08:00
parent d7f7ebd981
commit dd2efef456
3 changed files with 109 additions and 19 deletions
+28 -16
View File
@@ -295,14 +295,27 @@ function currentIdentifiers() {
}
function buildRebillFilter() {
const q = tableRef.value?.getQueryParams?.() || {}
const filter = { orderIdentifiers: currentIdentifiers() }
if (Array.isArray(q.customerCodes) && q.customerCodes.length) {
filter.customerCodes = q.customerCodes
const q = applySearchRanges(tableRef.value?.getQueryParams?.() || {})
const filter = {
scopeMode: 'ALL',
orderIdentifiers: currentIdentifiers(),
customerCodes: Array.isArray(q.customerCodes) ? q.customerCodes : [],
productCodes: Array.isArray(q.productCodes) ? q.productCodes : [],
orderStatuses: Array.isArray(q.orderStatuses) ? q.orderStatuses : [],
billingFailStatuses: Array.isArray(q.billingFailStatuses) ? q.billingFailStatuses : [],
beginBizDate: q.params?.beginBizDate || null,
endBizDate: q.params?.endBizDate || null
}
return filter
}
function hasRebillFilter(filter) {
const ids = filter.orderIdentifiers || []
if (ids.length) return true
const hasCustomer = Array.isArray(filter.customerCodes) && filter.customerCodes.length > 0
const hasBizDate = !!(filter.beginBizDate && filter.endBizDate)
return hasCustomer && hasBizDate
}
function buildCheckQuery() {
const q = tableRef.value?.getQueryParams?.() || {}
@@ -383,24 +396,23 @@ async function runLocalRebill(payload, confirmText) {
}
function openFilterRebill() {
const identifiers = currentIdentifiers()
if (!identifiers.length) {
ElMessage.warning('请输入单号后再重新计费,或勾选订单后点重新计费选中')
const filter = buildRebillFilter()
const identifiers = filter.orderIdentifiers || []
if (!hasRebillFilter(filter)) {
ElMessage.warning('请输入单号,或选择客户并选择计费时间后再重新计费;也可勾选订单后点重新计费选中')
return
}
if (identifiers.length > MAX_REBILL) {
ElMessage.warning('单次最多重新计费 ' + MAX_REBILL + ' 个单号')
return
}
const filter = buildRebillFilter()
runLocalRebill(
{
scopeMode: 'ALL',
orderIdentifiers: filter.orderIdentifiers || identifiers,
customerCodes: filter.customerCodes || []
},
'将按 ' + identifiers.length + ' 个单号从本地订单表重新计费(不查上游),确认继续?'
)
let confirmText
if (identifiers.length) {
confirmText = '将按 ' + identifiers.length + ' 个单号从本地订单表重新计费(不查上游),确认继续?'
} else {
confirmText = '将按当前列表筛选(客户 + 计费时间等)从本地订单表重新计费(不查上游),确认继续?'
}
runLocalRebill(filter, confirmText)
}
function handleBatchRebill(selection) {