新购验收权限

This commit is contained in:
bb_pan 2025-11-04 10:43:21 +08:00
parent c0f90cc4ee
commit 0831f5ee11
1 changed files with 10 additions and 5 deletions

View File

@ -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