This commit is contained in:
Leo
2026-02-05 12:09:24 +08:00
parent b01c71fdb1
commit 7a39dd32cf

View File

@@ -1819,29 +1819,17 @@ export default {
return 'info' // 其他状态
},
/** 准备查询参数:去除空格并在关键词搜索时清空日期 */
/** 准备查询参数:去除空格,保留日期等所有搜索条件 */
prepareQueryParams() {
const textKeys = ['remark', 'orderSearch', 'distributionMark', 'modelNumber', 'link', 'buyer', 'address', 'status']
let hasKeyword = false
textKeys.forEach(key => {
const value = this.queryParams[key]
if (typeof value === 'string') {
const trimmed = value.trim()
if (trimmed) {
this.queryParams[key] = trimmed
hasKeyword = true
} else {
this.queryParams[key] = undefined
}
this.queryParams[key] = trimmed || undefined
}
})
if (hasKeyword) {
this.dateRange = []
this.queryParams.beginTime = null
this.queryParams.endTime = null
}
},
/** 退货复制 */