|
|
|
@ -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){ |
|
|
|
|