diff --git a/src/pages/new-purchase/accept/index.vue b/src/pages/new-purchase/accept/index.vue index 6c67d5f..6390b27 100644 --- a/src/pages/new-purchase/accept/index.vue +++ b/src/pages/new-purchase/accept/index.vue @@ -240,14 +240,19 @@ const handleItem = (item) => { console.log('🚀 ~ handleItem ~ item:', item) // 是否完成 const isFinished = item.taskStatusName == '已完成' - const singLevel = { - 2: '技术科', - 3: '库管', + const signLevel = { + 2: ['技术科'], + 3: ['库管', '修试二班'], } 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({ - title: `请联系${singLevel[item.signLevel || 2]}进行审核`, + title: `请联系${contactText}进行审核`, icon: 'none', }) return