6.3重庆暂时添加退料申请权限

This commit is contained in:
FrancisHu 2024-06-03 16:20:28 +08:00
parent 9238036a4e
commit 3e676efdad
3 changed files with 34 additions and 11 deletions

View File

@ -220,7 +220,8 @@ import { basePath } from '../../public'
backPerson: '',
remark: ''
},
fetchedList: []
fetchedList: [],
ableRoleArr: ['admin', 'em04', 'me02', 'dm03']
}
},
methods: {
@ -341,7 +342,24 @@ import { basePath } from '../../public'
}
},
onNavigationBarButtonTap() {
this.$refs.popup.open()
let that = this
let nowRole = uni.getStorageSync('roles')
let found = false
console.log(nowRole);
for (let role of nowRole) {
if (that.ableRoleArr.includes(role)) {
found = true;
break;
}
}
if (!found) {
uni.showToast({
icon: 'none',
title: '当前角色没有申请权限!'
})
} else {
that.$refs.popup.open()
}
},
onShow() {
let that = this

View File

@ -196,14 +196,19 @@ import { authPath, basePath, publicPath, systemPath } from '../../public';
console.log(err);
})
//
that.$api.index.fetchCompanyName({
ancestors: uni.getStorageSync('userInfo').sysUser.dept.ancestors
}).then(res => {
console.log(res);
if (res.data.code == 200) uni.setStorageSync('companyName', res.data.msg)
}).catch(err => {
console.log(err);
})
let dept = uni.getStorageSync('userInfo').sysUser.dept.ancestors
if (dept == null) {
uni.setStorageSync('companyName', '')
} else {
that.$api.index.fetchCompanyName({
ancestors: dept
}).then(res => {
console.log(res);
if (res.data.code == 200) uni.setStorageSync('companyName', res.data.msg)
}).catch(err => {
console.log(err);
})
}
},
onNavigationBarButtonTap(e) {
console.log(e);

View File

@ -161,7 +161,7 @@
}
.upper-search{
width: 85%;
margin: 5vh auto;
margin: 6vh auto;
color: #fff;
h4{
margin-bottom: 1vh;