From 9d84b1aae0de1b1f9f6758f640d98ce31d1b9adc Mon Sep 17 00:00:00 2001 From: dk <1260500659@qq.com> Date: Wed, 3 Jun 2026 21:04:51 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=8A=A0=E7=8F=AD=E7=94=B3=E8=AF=B7):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=8A=A0=E7=8F=AD=E7=94=B3=E8=AF=B7=E4=B8=AD?= =?UTF-8?q?=EF=BC=8C=E5=92=8C=E7=8A=B6=E6=80=81=E6=9C=BA=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81=E7=9A=84=E4=B8=8D=E5=90=88=E7=90=86?= =?UTF-8?q?=E7=9A=84=E5=9C=B0=E6=96=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../personal-center/overtime-application/index.vue | 4 ++-- .../modules/overtime-application-action-dialog.vue | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/views/personal-center/overtime-application/index.vue b/src/views/personal-center/overtime-application/index.vue index ffee8f1..63aedb6 100644 --- a/src/views/personal-center/overtime-application/index.vue +++ b/src/views/personal-center/overtime-application/index.vue @@ -171,7 +171,7 @@ function getRowActions(row: Api.OvertimeApplication.OvertimeApplication): Busine } ]; - if (row.statusCode === 'rejected' && row.allowEdit) { + if ((row.statusCode === 'rejected' || row.statusCode === 'cancelled') && row.allowEdit) { actions.push({ key: 'edit', label: '修改', @@ -189,7 +189,7 @@ function getRowActions(row: Api.OvertimeApplication.OvertimeApplication): Busine onClick: () => openStatusLog(row) }); - if (row.statusCode === 'pending' || row.statusCode === 'rejected') { + if (row.statusCode === 'pending') { actions.push({ key: 'cancel', label: '撤销', diff --git a/src/views/personal-center/overtime-application/modules/overtime-application-action-dialog.vue b/src/views/personal-center/overtime-application/modules/overtime-application-action-dialog.vue index c19dce5..3b12aae 100644 --- a/src/views/personal-center/overtime-application/modules/overtime-application-action-dialog.vue +++ b/src/views/personal-center/overtime-application/modules/overtime-application-action-dialog.vue @@ -51,7 +51,15 @@ const reasonLabel = computed(() => { return map[props.actionType]; }); -const reasonRequired = computed(() => props.actionType !== 'approve'); +const reasonRequired = computed(() => props.actionType === 'reject'); + +const reasonPlaceholder = computed(() => { + if (reasonRequired.value) { + return `请输入${reasonLabel.value}`; + } + + return props.actionType === 'cancel' ? '可填写撤销原因' : '可填写审核意见'; +}); const rules = computed(() => ({ reason: reasonRequired.value @@ -105,7 +113,7 @@ watch( :rows="5" maxlength="1000" show-word-limit - :placeholder="reasonRequired ? `请输入${reasonLabel}` : '可填写审核意见'" + :placeholder="reasonPlaceholder" />