diff --git a/src/views/modules/quote/index.vue b/src/views/modules/quote/index.vue index 9f07e53..5d93da6 100644 --- a/src/views/modules/quote/index.vue +++ b/src/views/modules/quote/index.vue @@ -1189,14 +1189,20 @@ export default { size:this.size, createBy:this.$store.state.user.name, } + this.searchLoading = true queryQuotePage(params).then(({data})=>{ if (data && data.code === 0){ this.dataList = data.rows this.total = data.total if (this.total > 0){ this.currentQuote = {...this.dataList[0]} + // 跳转成功后清空路由参数,避免后续刷新时重复触发 + this.$router.replace({name: 'quote-index', params: {}}) + // 提示用户已定位到新建的报价单 + this.$message.success(`已定位到新建的报价单:${this.dataList[0].quoteVersionNo || ''}`) }else { this.currentQuote = {} + this.$message.warning('未查询到对应的报价单') } }else { this.$message.error(data.msg) @@ -1462,10 +1468,14 @@ export default { if (!this.isMenu){ return } + // 优先级最高:从待报价清单页面跳转过来,带有新建的报价单ids if (this.$route.params.ids){ this.handleQueryByIds(); - } else if (this.$route.params.type === 'tokenLogin') { - // 从OA系统跳转过来 + return // 直接返回,避免执行其他逻辑 + } + + // 从OA系统跳转过来 + if (this.$route.params.type === 'tokenLogin') { if (this.$route.params.docNo) { this.quoteForm = { ...this.quote, @@ -1474,13 +1484,18 @@ export default { } } this.handleSearch(0); - } else if (this.$route.params.type === 'project'){ + return + } + + // 从项目页面跳转过来 + if (this.$route.params.type === 'project'){ this.quoteForm = { ...this.quote, site: this.$store.state.user.site, quoteVersionNo: this.$route.params.quoteVersionNo, } this.handleSearch(0); + return } } }