ソースを参照

基础资料跳转快捷创建

caojunjie 3 年 前
コミット
66b41aa9ca

+ 20 - 0
src/components/e-crop-jump/index.vue

@@ -18,6 +18,26 @@ export default {
           path: '/basicData/portinformation/index',
           query: {customerName: this.value},
         });
+      }else if (this.corpType == 'CD'){
+        this.$router.push({
+          path: '/basicData/fleetInformation/index',
+          query: {customerName: this.value},
+        });
+      }else if (this.corpType == 'GC'){
+        this.$router.push({
+          path: '/basicData/factoryInformation/factoryInformation/index',
+          query: {customerName: this.value},
+        });
+      }else if (this.corpType == 'GYS'){
+        this.$router.push({
+          path: '/basicData/customerManagement/supplierMaterial/index',
+          query: {customerName: this.value},
+        });
+      }else if (this.corpType == 'GS'){
+        this.$router.push({
+          path: '/basicData/customerManagement/companyMaterial/index',
+          query: {customerName: this.value},
+        });
       }else {
         this.$router.push({
           path: '/basicData/customerInformation/index',

+ 0 - 1
src/views/basicData/customerInformation/index.vue

@@ -129,7 +129,6 @@
         </el-col>
       </el-row>
     </div>
-
     <detail-page
         @goBack="goBack"
         :detailData="detailData"

+ 19 - 2
src/views/basicData/customerManagement/companyMaterial/detailsPageEdit.vue

@@ -612,6 +612,19 @@ export default {
       });
     } else if (this.detailData.treeDeptId) {
       this.$set(this.form, "corpsTypeId", this.detailData.treeDeptId);
+      if (this.$route.query.customerName){
+        this.$set(this.form, "cname", this.$route.query.customerName);
+        this.$router.$avueRouter.closeTag(window.location.hash.slice(1))
+      }else if (this.$route.query) {
+        this.$set(this.form, "cname", this.$route.query.corpName);
+      }
+    } else {
+      if (this.$route.query.customerName){
+        this.$set(this.form, "cname", this.$route.query.customerName);
+        this.$router.$avueRouter.closeTag(window.location.hash.slice(1))
+      }else if (this.$route.query) {
+        this.$set(this.form, "cname", this.$route.query.corpName);
+      }
     }
     gainUser().then(res => {
       this.userList = res.data.data;
@@ -772,8 +785,12 @@ export default {
         }
       });
     },
-    backToList() {
-      this.$emit("goBack");
+    backToList(value) {
+      if (value == '0'){
+        this.$emit("goBack");
+      }else {
+        this.$emit('goBack', true)
+      }
     },
     openFlow() {
       this.switchDialog = !this.switchDialog;

+ 14 - 1
src/views/basicData/customerManagement/companyMaterial/index.vue

@@ -245,6 +245,14 @@ export default {
         res.data.data;
     });
   },
+  activated() {
+    if (this.$route.query.customerName) {
+      this.show = false;
+      this.detailData = {
+        treeDeptId: this.treeDeptId
+      };
+    }
+  },
   // watch:{
   //   'excelForm.isCovered'() {
   //     if (this.excelForm.isCovered !== '') {
@@ -451,9 +459,14 @@ export default {
     onClose(val) {
       this.switchDialog = val;
     },
-    goBack() {
+    goBack(type) {
       this.detailData = this.$options.data().detailData;
       this.show = true;
+      if (type){
+        this.$router.push({
+          path: '/basicData/customerManagement/companyMaterial/index'
+        });
+      }
       this.onLoad(this.page, this.search);
     }
   }

+ 19 - 2
src/views/basicData/customerManagement/supplierMaterial/detailsPageEdit.vue

@@ -655,6 +655,19 @@ export default {
       });
     } else if (this.detailData.treeDeptId) {
       this.$set(this.form, "corpsTypeId", this.detailData.treeDeptId);
+      if (this.$route.query.customerName){
+        this.$set(this.form, "cname", this.$route.query.customerName);
+        this.$router.$avueRouter.closeTag(window.location.hash.slice(1))
+      }else if (this.$route.query) {
+        this.$set(this.form, "cname", this.$route.query.corpName);
+      }
+    } else {
+      if (this.$route.query.customerName){
+        this.$set(this.form, "cname", this.$route.query.customerName);
+        this.$router.$avueRouter.closeTag(window.location.hash.slice(1))
+      }else if (this.$route.query) {
+        this.$set(this.form, "cname", this.$route.query.corpName);
+      }
     }
     gainUser().then(res => {
       this.userList = res.data.data;
@@ -816,8 +829,12 @@ export default {
         }
       });
     },
-    backToList() {
-      this.$emit("goBack");
+    backToList(value) {
+      if (value == '0'){
+        this.$emit("goBack");
+      }else {
+        this.$emit('goBack', true)
+      }
     },
     openFlow() {
       this.switchDialog = !this.switchDialog;

+ 14 - 1
src/views/basicData/customerManagement/supplierMaterial/index.vue

@@ -249,6 +249,14 @@ export default {
         res.data.data;
     });
   },
+  activated() {
+    if (this.$route.query.customerName) {
+      this.show = false;
+      this.detailData = {
+        treeDeptId: this.treeDeptId
+      };
+    }
+  },
   // watch:{
   //   'excelForm.isCovered'() {
   //     if (this.excelForm.isCovered !== '') {
@@ -455,9 +463,14 @@ export default {
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
     },
-    goBack() {
+    goBack(type) {
       this.detailData = this.$options.data().detailData;
       this.show = true;
+      if (type){
+        this.$router.push({
+          path: '/basicData/customerManagement/supplierMaterial/index'
+        });
+      }
       this.onLoad(this.page, this.search);
     }
   }

+ 19 - 2
src/views/basicData/factoryInformation/factoryInformation/detailsPageEdit.vue

@@ -773,6 +773,19 @@ export default {
       });
     } else if (this.detailData.treeDeptId) {
       this.$set(this.form, 'corpsTypeId', this.detailData.treeDeptId)
+      if (this.$route.query.customerName){
+        this.$set(this.form, "cname", this.$route.query.customerName);
+        this.$router.$avueRouter.closeTag(window.location.hash.slice(1))
+      }else if (this.$route.query) {
+        this.$set(this.form, "cname", this.$route.query.corpName);
+      }
+    } else {
+      if (this.$route.query.customerName){
+        this.$set(this.form, "cname", this.$route.query.customerName);
+        this.$router.$avueRouter.closeTag(window.location.hash.slice(1))
+      }else if (this.$route.query) {
+        this.$set(this.form, "cname", this.$route.query.corpName);
+      }
     }
     gainUser().then(res => {
       this.userList = res.data.data;
@@ -979,8 +992,12 @@ export default {
         }
       })
     },
-    backToList() {
-      this.$emit("goBack");
+    backToList(value) {
+      if (value == '0'){
+        this.$emit("goBack");
+      }else {
+        this.$emit('goBack', true)
+      }
     },
     openFlow() {
       this.switchDialog = !this.switchDialog;

+ 14 - 1
src/views/basicData/factoryInformation/factoryInformation/index.vue

@@ -237,6 +237,14 @@ export default {
         res.data.data;
     });
   },
+  activated() {
+    if (this.$route.query.customerName) {
+      this.show = false;
+      this.detailData = {
+        treeDeptId: this.treeDeptId
+      };
+    }
+  },
   // watch:{
   //   'excelForm.isCovered'() {
   //     if (this.excelForm.isCovered !== '') {
@@ -417,9 +425,14 @@ export default {
     onClose(val) {
       this.switchDialog = val;
     },
-    goBack() {
+    goBack(type) {
       this.detailData = this.$options.data().detailData;
       this.show = true;
+      if (type){
+        this.$router.push({
+          path: '/basicData/factoryInformation/factoryInformation/index'
+        });
+      }
       this.onLoad(this.page, this.search);
     }
   }

+ 19 - 2
src/views/basicData/fleetInformation/detailsPageEdit.vue

@@ -926,6 +926,19 @@ export default {
       });
     } else if (this.detailData.treeDeptId) {
       this.$set(this.form, 'corpsTypeId', this.detailData.treeDeptId)
+      if (this.$route.query.customerName){
+        this.$set(this.form, "cname", this.$route.query.customerName);
+        this.$router.$avueRouter.closeTag(window.location.hash.slice(1))
+      }else if (this.$route.query) {
+        this.$set(this.form, "cname", this.$route.query.corpName);
+      }
+    } else {
+      if (this.$route.query.customerName){
+        this.$set(this.form, "cname", this.$route.query.customerName);
+        this.$router.$avueRouter.closeTag(window.location.hash.slice(1))
+      }else if (this.$route.query) {
+        this.$set(this.form, "cname", this.$route.query.corpName);
+      }
     }
     gainUser().then(res => {
       this.userList = res.data.data;
@@ -1163,8 +1176,12 @@ export default {
         }
       });
     },
-    backToList() {
-      this.$emit("goBack");
+    backToList(value) {
+      if (value == '0'){
+        this.$emit("goBack");
+      }else {
+        this.$emit('goBack', true)
+      }
     },
     openFlow() {
       this.switchDialog = !this.switchDialog;

+ 14 - 2
src/views/basicData/fleetInformation/index.vue

@@ -117,7 +117,6 @@
         </el-col>
       </el-row>
     </div>
-
     <detail-page
       @goBack="goBack"
       :detailData="detailData"
@@ -240,6 +239,14 @@ export default {
         res.data.data;
     });
   },
+  activated() {
+    if (this.$route.query.customerName) {
+      this.show = false;
+      this.detailData = {
+        treeDeptId: this.treeDeptId
+      };
+    }
+  },
   // watch:{
   //   'excelForm.isCovered'() {
   //     if (this.excelForm.isCovered !== '') {
@@ -420,9 +427,14 @@ export default {
     onClose(val) {
       this.switchDialog = val;
     },
-    goBack() {
+    goBack(type) {
       this.detailData = this.$options.data().detailData;
       this.show = true;
+      if (type){
+        this.$router.push({
+          path: '/basicData/fleetInformation/index'
+        });
+      }
       this.onLoad(this.page, this.search);
     }
   }