瀏覽代碼

bug 修复

lilei 2 年之前
父節點
當前提交
e176176c3f

+ 5 - 7
src/views/salesReturnManagement/billOfLading/add.vue

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

+ 1 - 0
src/views/salesReturnManagement/billOfLading/list.vue

@@ -235,6 +235,7 @@ export default {
     },
     // 新增
     handleAdd () {
+      this.$store.state.app.tempBillOfData = null
       this.$router.push({ name: 'billOfLadingAdd' })
     },
     // 编辑