🐛 修复账单预览翻页重置手动选择模式
This commit is contained in:
@@ -318,21 +318,23 @@ function queryGeneratePreview() {
|
|||||||
const query = buildGenerateQuery()
|
const query = buildGenerateQuery()
|
||||||
resetPreview()
|
resetPreview()
|
||||||
previewQuery.value = query
|
previewQuery.value = query
|
||||||
fetchPreview()
|
fetchPreview(true)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function fetchPreview() {
|
function fetchPreview(initializeSelectionMode = false) {
|
||||||
previewLoading.value = true
|
previewLoading.value = true
|
||||||
previewArBill(buildPreviewQuery()).then(res => {
|
previewArBill(buildPreviewQuery()).then(res => {
|
||||||
syncingPageSelection = true
|
syncingPageSelection = true
|
||||||
previewRows.value = res.rows || []
|
previewRows.value = res.rows || []
|
||||||
previewTotal.value = Number(res.total) || 0
|
previewTotal.value = Number(res.total) || 0
|
||||||
previewTotalAmount.value = Number(res.totalAmount) || 0
|
previewTotalAmount.value = Number(res.totalAmount) || 0
|
||||||
// 查询到可生成订单后默认采用“全选查询结果”模式;如需排除订单,再通过排除入口维护。
|
// 仅首次查询默认全选;翻页请求保留用户当前的选择模式。
|
||||||
selectionMode.value = previewTotal.value > 0
|
if (initializeSelectionMode) {
|
||||||
? AR_BILL_SELECTION_MODE.ALL_MATCHED
|
selectionMode.value = previewTotal.value > 0
|
||||||
: AR_BILL_SELECTION_MODE.EXPLICIT
|
? AR_BILL_SELECTION_MODE.ALL_MATCHED
|
||||||
|
: AR_BILL_SELECTION_MODE.EXPLICIT
|
||||||
|
}
|
||||||
previewSearched.value = true
|
previewSearched.value = true
|
||||||
nextTick(syncPageSelection)
|
nextTick(syncPageSelection)
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user