diff --git a/pages/home/home.vue b/pages/home/home.vue index 6234032..de63c44 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -38,7 +38,7 @@ export default { data() { return { - userName: this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).username : '', + userName: '', menuList: [ {menu_id: '1', icon: 'RF06', name: '仓储管理', sonTree: [ {menu_id: '1', name: '半成品入库', path: '/pages/modules/SemifinishedInStore'}, @@ -52,6 +52,9 @@ }, created () { this.$store.dispatch('setPublicObj', '') + if (this.$store.getters.userInfo) { + this.userName = JSON.parse(this.$store.getters.userInfo).username + } }, methods: { async _authority () { diff --git a/pages/modules/SemifinishedInStore.vue b/pages/modules/SemifinishedInStore.vue index 46b8f19..043e457 100644 --- a/pages/modules/SemifinishedInStore.vue +++ b/pages/modules/SemifinishedInStore.vue @@ -141,7 +141,7 @@ /** 确认 */ async toSure () { this.disabled = true - if (!this.val1 || !this.val3 || !this.bar_code || !index2 ) { + if (!this.val1 || !this.val3 || !this.bar_code || !this.index2 ) { this.disabled = false return }