diff --git a/src/views/modules/quote/index.vue b/src/views/modules/quote/index.vue index 22a0ef0..4995086 100644 --- a/src/views/modules/quote/index.vue +++ b/src/views/modules/quote/index.vue @@ -405,7 +405,7 @@ export default { } }, methods:{ - handleSearch(){ + handleSearch(index){ let params = { ...this.quoteForm, no: this.no, @@ -416,10 +416,8 @@ export default { if (data && data.code === 0){ this.dataList = data.rows this.total = data.total - if (this.total > 0){ - this.currentQuote = {...this.dataList[0]} - }else { - this.currentQuote = {} + if (index !== undefined){ + this.handleSelect(this.dataList[index]) } }else { this.$message.error(data.msg) @@ -430,6 +428,13 @@ export default { this.searchLoading = false }) }, + handleSelect(row){ + if (row){ + this.currentQuote = {...row} + }else { + this.currentQuote = {} + } + }, handleSave(row){ this.$nextTick(()=>{ if (this.$refs.saveForm){ @@ -590,7 +595,11 @@ export default { removeQuote(params).then(({data})=>{ if (data && data.code === 0){ this.$message.success(data.msg) - this.handleSearch(); + if (row.id === this.currentQuote.id){ + this.handleSearch(0); + }else { + this.handleSearch(); + } }else { this.$message.warning(data.msg) } @@ -752,7 +761,7 @@ export default { createBy: this.$store.state.user.name, } this.handleQueryBu();// 查询 BU - this.handleSearch();// 查询报价信息 + this.handleSearch(0);// 查询报价信息 }, watch:{ 'quoteForm.customerNo'(newVal, oldVal){ diff --git a/src/views/modules/quote/primary/quoteTable.vue b/src/views/modules/quote/primary/quoteTable.vue index 5c9c9f8..3b3d289 100644 --- a/src/views/modules/quote/primary/quoteTable.vue +++ b/src/views/modules/quote/primary/quoteTable.vue @@ -21,12 +21,15 @@ export default { }, methods:{ handleRowClick(row, column, event){ + if (column.label === '操作'){ + return + } this.$emit('rowClick',row) }, handleSaveClick(row){ this.$emit('save',row) }, - handleRemoveClick(row){ + handleRemoveClick(row,$index){ this.$emit('remove',row) }, handleUpdateStatus(row){ @@ -71,7 +74,7 @@ export default { label="操作">