解决搜索和重置按钮点击时,只主表刷新,子表不刷新问题

This commit is contained in:
猫猫guowen
2025-08-18 14:45:19 +08:00
parent cd09975b85
commit e2789f1d80
6 changed files with 38 additions and 0 deletions

View File

@@ -375,6 +375,12 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
// 清空子表数据和当前选中行
this.mydoJobDetailList = []
this.detailTotal = 0
this.currentRow = null
this.queryDetailParams.jobId = null
this.queryDetailParams.status = null
this.getList() this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */

View File

@@ -357,6 +357,12 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
// 清空子表数据和当前选中行
this.mydoJobDetailList = []
this.detailTotal = 0
this.currentRow = null
this.queryDetailParams.jobId = null
this.queryDetailParams.status = null
this.getList() this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */

View File

@@ -367,6 +367,11 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
// 清空子表数据和相关状态
this.stockCheckDetailList = []
this.detailTotal = 0
this.queryDetailParams.stockCheckGuid = null
this.queryDetailParams.status = null
this.getList() this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */

View File

@@ -367,6 +367,11 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
// 清空子表数据和当前选中行
this.mydoJobDetailList = []
this.detailTotal = 0
this.currentRow = null
this.queryDetailParams.jobId = null
this.getList() this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */

View File

@@ -321,6 +321,12 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
// 清空子表数据和当前选中行
this.mydoJobDetailList = []
this.detailTotal = 0
this.currentRow = null
this.queryDetailParams.jobId = null
this.queryDetailParams.status = null
this.getList() this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */

View File

@@ -322,6 +322,11 @@ export default {
this.outStockoutList = response.rows this.outStockoutList = response.rows
this.total = response.total this.total = response.total
this.loading = false this.loading = false
// 如果有数据,自动选中第一行
if (this.outStockoutList.length > 0) {
this.handleRowClick(this.outStockoutList[0]);
}
}) })
}, },
/** 查询子表数据 */ /** 查询子表数据 */
@@ -338,6 +343,11 @@ export default {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1 this.queryParams.pageNum = 1
// 清空子表数据
this.outStockDetailList = []
this.detailTotal = 0
this.detailQueryParams.stockoutGuid = null
this.detailQueryParams.status = null
this.getList() this.getList()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */