fix(filling): 修改下属公司归档状态

This commit is contained in:
dj
2025-07-27 20:39:21 +08:00
parent 94bd9930b6
commit 9560a964e7

View File

@@ -321,8 +321,13 @@ const tableConfig = reactive({
let buttons = new Set(Array.from(row.buttons))
if (!buttons.has("openFileSwitch") && row.state != 1) {
console.log('row', row)
if (!buttons.has("openFileSwitch") && !buttons.has("closeFileSwitch") && row.state == 4) {
//下属公司, 没这两个按钮时, 状态为4
return (<Tag dictType={'project_filing'} value={'4'}/>)
} else {
return (<Tag dictType={'project_filing'} value={'0'}/>)
}else if (buttons.has("openFileSwitch")) {
}
} else if (buttons.has("openFileSwitch")) {//科创部, 有这权限时
return (<Tag dictType={'project_filing'} value={'4'}/>)
} else {
if (row.state !== null) {
@@ -344,22 +349,52 @@ const tableConfig = reactive({
let btn = []
let buttons = new Set(Array.from(row.buttons))
if (buttons.has("details")) {
btn.push({label: '详情', prem: ['project:management:filing:detail'], func: () => handleDetail(row), type: 'primary'})
btn.push({
label: '详情',
prem: ['project:management:filing:detail'],
func: () => handleDetail(row),
type: 'primary'
})
}
if (buttons.has("attachments")) {
btn.push({label: '附件', prem: ['project:management:filing:attachment'], func: () => handleAttachment(row), type: 'primary'})
btn.push({
label: '附件',
prem: ['project:management:filing:attachment'],
func: () => handleAttachment(row),
type: 'primary'
})
}
if (buttons.has("entry")) {
btn.push({label: '结项', prem: ['project:management:filing:conclusion'], func: () => handleConclusion(row), type: 'primary'})
btn.push({
label: '结项',
prem: ['project:management:filing:conclusion'],
func: () => handleConclusion(row),
type: 'primary'
})
}
if (buttons.has("edit")) {
btn.push({label: '编辑', prem: ['project:management:filing:conclusion'], func: () => handleEdit(row), type: 'primary'})
btn.push({
label: '编辑',
prem: ['project:management:filing:conclusion'],
func: () => handleEdit(row),
type: 'primary'
})
}
if (buttons.has("openFileSwitch")) {
btn.push({label: '开启上传', prem: ['filing:attachment:switch'], func: () => handleOpenUpload(row,true), type: 'primary'})
btn.push({
label: '开启上传',
prem: ['filing:attachment:switch'],
func: () => handleOpenUpload(row, true),
type: 'primary'
})
}
if (buttons.has("closeFileSwitch")) {
btn.push({label: '关闭上传', prem: ['filing:attachment:switch'], func: () => handleOpenUpload(row,false), type: 'primary'})
btn.push({
label: '关闭上传',
prem: ['filing:attachment:switch'],
func: () => handleOpenUpload(row, false),
type: 'primary'
})
}
return (
<div style={{width: '100%'}}>