6.3重庆暂时添加退料申请权限
This commit is contained in:
parent
9238036a4e
commit
3e676efdad
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@
|
|||
}
|
||||
.upper-search{
|
||||
width: 85%;
|
||||
margin: 5vh auto;
|
||||
margin: 6vh auto;
|
||||
color: #fff;
|
||||
h4{
|
||||
margin-bottom: 1vh;
|
||||
|
|
|
|||
Loading…
Reference in New Issue