diff --git a/src/views/business/voucher-manage.vue b/src/views/business/voucher-manage.vue index fc3dac2..376915b 100644 --- a/src/views/business/voucher-manage.vue +++ b/src/views/business/voucher-manage.vue @@ -1044,6 +1044,10 @@ const openBatchDialog = async row => { batchDialogMode.value = voucher?.id ? 'change' : 'upload'; batchTarget.value = voucher?.id ? voucher : undefined; batchSelection.value = []; + // 弹窗内的搜索条件是模块级状态,不重置就会带着上一次的筛选条件打开。 + resetBatchSearch(); + batchRows.value = []; + batchPage.total = 0; batchVisible.value = true; if (!projectOptions.value.length) await loadProjects(); await loadBatches(); @@ -1076,7 +1080,7 @@ const handleWaybillCountInput = value => { batchQuery.waybillCount = filtered.replace(/^0+/, ''); } }; -const resetBatchQuery = () => { +const resetBatchSearch = () => { Object.assign(batchQuery, { batchNo: '', projectId: '', @@ -1085,6 +1089,9 @@ const resetBatchQuery = () => { }); batchCreateRange.value = []; batchPage.current = 1; +}; +const resetBatchQuery = () => { + resetBatchSearch(); loadBatches(); }; const updateWaybillBatch = async (target, selected) => {