|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="purchaseOrderEdit-wrap">
|
|
|
+ <div v-if="showPage" class="purchaseOrderEdit-wrap">
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
|
<a-page-header :ghost="false" :backIcon="false" class="purchaseOrderEdit-cont">
|
|
|
<!-- 自定义的二级文字标题 -->
|
|
@@ -254,6 +254,7 @@ export default {
|
|
|
components: { STable, VSelect, ProductType, ProductBrand, ImportGuideModal, outStockModal, Print, chooseAddressModal },
|
|
|
data () {
|
|
|
return {
|
|
|
+ showPage: false,
|
|
|
spinning: false,
|
|
|
detail: null, // 详细信息
|
|
|
subLoading: false,
|
|
@@ -544,22 +545,30 @@ export default {
|
|
|
this.$router.push({ path: '/purchasingManagement/purchaseOrder/list' })
|
|
|
},
|
|
|
pageInit () {
|
|
|
- this.getOrderDetail()
|
|
|
- this.resetPurchaseForm()
|
|
|
- this.resetSearchForm()
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.getOrderDetail()
|
|
|
+ this.resetPurchaseForm()
|
|
|
+ this.resetSearchForm()
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
+ this.showPage = true
|
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
this.pageInit()
|
|
|
}
|
|
|
},
|
|
|
activated () {
|
|
|
+ this.showPage = true
|
|
|
+ console.log(this.$store.state.app.isNewTab)
|
|
|
// 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
|
|
|
if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
|
|
|
this.pageInit()
|
|
|
}
|
|
|
},
|
|
|
+ deactivated () {
|
|
|
+ // this.showPage = false
|
|
|
+ },
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {})
|
|
|
}
|