|
@@ -421,6 +421,7 @@ export default {
|
|
|
_this.$message.success(res.message)
|
|
|
// _this.$refs.table.refresh()
|
|
|
_this.$refs.chooseTable.refresh()
|
|
|
+ _this.getDetail(true)
|
|
|
_this.spinning = false
|
|
|
} else {
|
|
|
_this.spinning = false
|
|
@@ -464,24 +465,28 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
// 获取详情
|
|
|
- getDetail () {
|
|
|
+ getDetail (type) {
|
|
|
purchaseReturnDetailSn({ sn: this.$route.params.sn }).then(res => {
|
|
|
this.detailData = res.data || null
|
|
|
- this.resetSearchForm()
|
|
|
+ if (!type) {
|
|
|
+ this.resetSearchForm()
|
|
|
+ } else {
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
this.$refs.chooseTable.refresh(true)
|
|
|
- this.getDetail()
|
|
|
+ this.getDetail(true)
|
|
|
}
|
|
|
},
|
|
|
activated () {
|
|
|
// 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
|
|
|
if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
|
|
|
this.$refs.chooseTable.refresh(true)
|
|
|
- this.getDetail()
|
|
|
+ this.getDetail(true)
|
|
|
}
|
|
|
},
|
|
|
beforeRouteEnter (to, from, next) {
|