Bläddra i källkod

产品物品管理新增页面返回页面缓存值

huang_an 1 år sedan
förälder
incheckning
3f7d460ae8

+ 38 - 18
src/views/material/product/detail.vue

@@ -69,7 +69,11 @@
 
 
           <el-col
           <el-col
             :span="8"
             :span="8"
-            v-if="[1, 23, 9, 28].includes(Number(categoryLevelPathId  || $route.query.rootTreeId))"
+            v-if="
+              [1, 23, 9, 28].includes(
+                Number(categoryLevelPathId || $route.query.rootTreeId)
+              )
+            "
           >
           >
             <el-form-item label="加工类型" prop="isConsumable">
             <el-form-item label="加工类型" prop="isConsumable">
               <el-select
               <el-select
@@ -608,8 +612,23 @@
       },
       },
 
 
       cancel() {
       cancel() {
-        finishPageTab();
-        this.$router.go(-1);
+        // finishPageTab();
+        // this.$router.go(-1);
+        if (this.$route.query.rootTreeId == 9) {
+          this.$router.push({
+            path: '/product/oneProduct',
+            query: {
+              categoryLevelId: this.form.categoryLevelId
+            }
+          });
+        } else {
+          this.$router.push({
+            path: '/material/product',
+            query: {
+              categoryLevelId: this.form.categoryLevelId
+            }
+          });
+        }
       },
       },
 
 
       // 保存
       // 保存
@@ -741,21 +760,22 @@
               this.$message.success(msg);
               this.$message.success(msg);
               // reloadPageTab({ fullPath: '/material/product' });
               // reloadPageTab({ fullPath: '/material/product' });
               // this.$router.go(-1);
               // this.$router.go(-1);
-              if (this.$route.query.rootTreeId == 9) {
-                this.$router.push({
-                  path: '/product/oneProduct',
-                  query: {
-                    categoryLevelId: this.form.categoryLevelId
-                  }
-                });
-              } else {
-                this.$router.push({
-                  path: '/material/product',
-                  query: {
-                    categoryLevelId: this.form.categoryLevelId
-                  }
-                });
-              }
+              this.cancel();
+              // if (this.$route.query.rootTreeId == 9) {
+              //   this.$router.push({
+              //     path: '/product/oneProduct',
+              //     query: {
+              //       categoryLevelId: this.form.categoryLevelId
+              //     }
+              //   });
+              // } else {
+              //   this.$router.push({
+              //     path: '/material/product',
+              //     query: {
+              //       categoryLevelId: this.form.categoryLevelId
+              //     }
+              //   });
+              // }
             })
             })
             .catch((e) => {
             .catch((e) => {
               this.loading = false;
               this.loading = false;

+ 1 - 1
src/views/material/product/index.vue

@@ -66,7 +66,7 @@
                   <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
                   <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
                     <el-form-item label="层级全览:">
                     <el-form-item label="层级全览:">
                       <div class="ele-text-secondary">
                       <div class="ele-text-secondary">
-                        {{ fullName }}
+                        {{ currentData.categoryLevelPath }}
                       </div>
                       </div>
                     </el-form-item>
                     </el-form-item>
                   </el-col>
                   </el-col>

+ 1 - 1
src/views/material/product/oneProduct.vue

@@ -66,7 +66,7 @@
                   <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
                   <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
                     <el-form-item label="层级全览:">
                     <el-form-item label="层级全览:">
                       <div class="ele-text-secondary">
                       <div class="ele-text-secondary">
-                        {{ fullName }}
+                        {{ currentData.categoryLevelPath }}
                       </div>
                       </div>
                     </el-form-item>
                     </el-form-item>
                   </el-col>
                   </el-col>