|
@@ -371,28 +371,38 @@ export default {
|
|
this.form.attachmentList = ''
|
|
this.form.attachmentList = ''
|
|
this.$refs.attachList.setFileList('')
|
|
this.$refs.attachList.setFileList('')
|
|
this.$refs.ruleForm.resetFields()
|
|
this.$refs.ruleForm.resetFields()
|
|
- if (this.$route.params.sn && this.$store.state.app.isNewTab) { // 编辑页
|
|
|
|
|
|
+
|
|
|
|
+ if (this.$route.params.sn) { // 编辑页
|
|
this.form.theme = ''
|
|
this.form.theme = ''
|
|
this.getDetail()
|
|
this.getDetail()
|
|
this.getReturnOrderList()
|
|
this.getReturnOrderList()
|
|
} else {
|
|
} else {
|
|
- // 新增
|
|
|
|
- // 如果是从销售退货列表过来的数据
|
|
|
|
|
|
+ // 从销售退货列表过来的数据
|
|
const cd = this.$store.state.app.tempBillOfData
|
|
const cd = this.$store.state.app.tempBillOfData
|
|
if (cd) {
|
|
if (cd) {
|
|
|
|
+ this.chooseData = []
|
|
this.chooseData.push(cd)
|
|
this.chooseData.push(cd)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ watch: {
|
|
|
|
+ '$store.state.app.tempBillOfData' (newValue, oldValue) {
|
|
|
|
+ console.log(newValue)
|
|
|
|
+ this.chooseData = []
|
|
|
|
+ this.chooseData.push(newValue)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
mounted () {
|
|
mounted () {
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
this.pageInit()
|
|
this.pageInit()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
activated () {
|
|
activated () {
|
|
- this.chooseData = []
|
|
|
|
- this.pageInit()
|
|
|
|
|
|
+ // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
|
|
|
|
+ if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
|
|
|
|
+ this.pageInit()
|
|
|
|
+ }
|
|
},
|
|
},
|
|
beforeRouteEnter (to, from, next) {
|
|
beforeRouteEnter (to, from, next) {
|
|
next(vm => {})
|
|
next(vm => {})
|