From 46ede19ccfb7acbba3f3e6fceb9f266fa8403458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Fri, 26 May 2023 09:37:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E6=9F=A5=E8=AF=A2=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=BE=9B=E5=BA=94=E5=95=86=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/auth/authAdmin.js | 10 ++++++++++ src/views/inventory/InvPreProducts.vue | 13 +++++++++---- src/views/inventory/InvProducts.vue | 13 +++++++++---- src/views/inventory/InvSupPreInProducts.vue | 13 +++++++++---- 4 files changed, 37 insertions(+), 12 deletions(-) diff --git a/src/api/auth/authAdmin.js b/src/api/auth/authAdmin.js index 3ee60184..1523a56e 100644 --- a/src/api/auth/authAdmin.js +++ b/src/api/auth/authAdmin.js @@ -58,3 +58,13 @@ export function updateInv(data) { }); } +//获取当前登陆人用户信息 +export function selectUser(query) { + return axios({ + url: "/admin/auth/admin/selectUser", + method: "get", + params: query + }); +} + + diff --git a/src/views/inventory/InvPreProducts.vue b/src/views/inventory/InvPreProducts.vue index b59b5a2d..9bf7bbd5 100644 --- a/src/views/inventory/InvPreProducts.vue +++ b/src/views/inventory/InvPreProducts.vue @@ -229,6 +229,7 @@ import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain"; import {isBlank} from "@/utils/strUtil"; import invPreProductsDetail from "@/views/inventory/InvPreProductsDetail.vue"; import {getInvSpaceList} from "@/api/inventory/invSpace"; +import {selectUser} from "@/api/auth/authAdmin"; export default { name: "InvPreProducts", @@ -456,10 +457,14 @@ export default { }; }, created() { - let supId = this.$store.getters.customerId; - if (supId == "110") { - this.showSup = true; - } + selectUser().then((res) => { + let supId = res.data.customerId + if (supId == "110") { + this.showSup = true; + } + }).catch(() => { + this.corpLoading = false; + }); this.findMethod(); this.getInvList(); //this.getList(); diff --git a/src/views/inventory/InvProducts.vue b/src/views/inventory/InvProducts.vue index d8caacec..b76515e2 100644 --- a/src/views/inventory/InvProducts.vue +++ b/src/views/inventory/InvProducts.vue @@ -245,6 +245,7 @@ import {isBlank} from "@/utils/strUtil"; import invProductsDetail from "@/views/inventory/InvProductsDetail.vue"; import addInvRemindSetDialog from "@/views/inventory/addInvRemindSetDialog.vue"; import {getInvSpaceList} from "@/api/inventory/invSpace"; +import {selectUser} from "@/api/auth/authAdmin"; export default { name: "InvProducts", @@ -481,10 +482,14 @@ export default { }, created() { this.filterQuery.invCode = this.$store.getters.locInvCode - let supId = this.$store.getters.customerId; - if (supId == "110") { - this.showSup = true; - } + selectUser().then((res) => { + let supId = res.data.customerId + if (supId == "110") { + this.showSup = true; + } + }).catch(() => { + this.corpLoading = false; + }); this.findMethod(); this.getInvList(); this.getList(); diff --git a/src/views/inventory/InvSupPreInProducts.vue b/src/views/inventory/InvSupPreInProducts.vue index d13ba678..f4a773b1 100644 --- a/src/views/inventory/InvSupPreInProducts.vue +++ b/src/views/inventory/InvSupPreInProducts.vue @@ -223,6 +223,7 @@ import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain"; import {isBlank} from "@/utils/strUtil"; import invPreProductsDetail from "@/views/inventory/InvPreInProductsDetail.vue"; import {getInvSpaceList} from "@/api/inventory/invSpace"; +import {selectUser} from "@/api/auth/authAdmin"; export default { name: "InvPreProducts", @@ -449,10 +450,14 @@ export default { }; }, created() { - let supId = this.$store.getters.customerId; - if (supId == "110") { - this.showSup = true; - } + selectUser().then((res) => { + let supId = res.data.customerId + if (supId == "110") { + this.showSup = true; + } + }).catch(() => { + this.corpLoading = false; + }); this.findMethod(); this.getInvList(); // this.getList();