新购验收权限
This commit is contained in:
parent
c0f90cc4ee
commit
0831f5ee11
|
|
@ -240,14 +240,19 @@ const handleItem = (item) => {
|
||||||
console.log('🚀 ~ handleItem ~ item:', item)
|
console.log('🚀 ~ handleItem ~ item:', item)
|
||||||
// 是否完成
|
// 是否完成
|
||||||
const isFinished = item.taskStatusName == '已完成'
|
const isFinished = item.taskStatusName == '已完成'
|
||||||
const singLevel = {
|
const signLevel = {
|
||||||
2: '技术科',
|
2: ['技术科'],
|
||||||
3: '库管',
|
3: ['库管', '修试二班'],
|
||||||
}
|
}
|
||||||
const deptName = uni.getStorageSync('deptName')
|
const deptName = uni.getStorageSync('deptName')
|
||||||
if (!deptName.includes(singLevel[item.signLevel]) && !isFinished) {
|
const targetDepts = signLevel[item.signLevel] || []
|
||||||
|
const hasPermission = targetDepts.some(name => deptName.includes(name))
|
||||||
|
|
||||||
|
if (!hasPermission && !isFinished) {
|
||||||
|
const contactText = targetDepts.length > 1 ? targetDepts.join('、') : targetDepts[0] || '相关部门'
|
||||||
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: `请联系${singLevel[item.signLevel || 2]}进行审核`,
|
title: `请联系${contactText}进行审核`,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue