Browse Source

商品详情切换语言调整

qymljy 4 months ago
parent
commit
44a53fb454
1 changed files with 15 additions and 5 deletions
  1. 15 5
      src/SDrpManagement/ProductGroup/modules/GroupDetail/groupDetail.vue

+ 15 - 5
src/SDrpManagement/ProductGroup/modules/GroupDetail/groupDetail.vue

@@ -277,13 +277,23 @@ export default {
   },
   methods: {
     async getDetail() {
-      this.param.content.sa_itemgroupid = this.$route.query.id;
-      if (this.$route.query.sys_enterpriseid) {
-        this.param.content.sys_enterpriseid =
-          this.$route.query.sys_enterpriseid;
+
+      if (this.$route.query.id) {
+        localStorage.setItem('proGroupId',this.$route.query.id)
+        localStorage.setItem('proEnterpriseId',this.$route.query.sys_enterpriseid)
+        this.param.content.sa_itemgroupid = this.$route.query.id;
+        if (this.$route.query.sys_enterpriseid) {
+          this.param.content.sys_enterpriseid =
+              this.$route.query.sys_enterpriseid;
+        } else {
+          delete this.param.content.sys_enterpriseid;
+        }
       } else {
-        delete this.param.content.sys_enterpriseid;
+        this.param.content.sa_itemgroupid = localStorage.getItem('proGroupId')
+        this.param.content.sys_enterpriseid = localStorage.getItem('proEnterpriseId')
+        this.$router.back()
       }
+
       let res = await this.$api.requested(this.param);
       res.code === 0 ? this.$message.error(res.msg) : "";
       console.log(res.data,'details')