diff --git a/klp-ui/src/views/hrm/flow/node.vue b/klp-ui/src/views/hrm/flow/node.vue
index 17b57e05..6fcd11d4 100644
--- a/klp-ui/src/views/hrm/flow/node.vue
+++ b/klp-ui/src/views/hrm/flow/node.vue
@@ -295,11 +295,11 @@ export default {
],
approverRuleOptions: [
{ label: '固定人员(选择)', value: 'fixed_user' },
- { label: '角色(选择/输入编码)', value: 'role' },
- { label: '岗位(选择)', value: 'position' },
- { label: '部门负责人(自动)', value: 'dept_leader' },
- { label: '发起人本人(自动)', value: 'initiator' },
- { label: '表单字段指定(字段名)', value: 'form_field' }
+ // { label: '角色(选择/输入编码)', value: 'role' },
+ // { label: '岗位(选择)', value: 'position' },
+ // { label: '部门负责人(自动)', value: 'dept_leader' },
+ // { label: '发起人本人(自动)', value: 'initiator' },
+ // { label: '表单字段指定(字段名)', value: 'form_field' }
],
rules: {
tplId: [{ required: true, message: '请选择模板', trigger: 'change' }],
diff --git a/klp-ui/src/views/hrm/requests/index.vue b/klp-ui/src/views/hrm/requests/index.vue
index b53245e3..dd8ae42a 100644
--- a/klp-ui/src/views/hrm/requests/index.vue
+++ b/klp-ui/src/views/hrm/requests/index.vue
@@ -85,6 +85,7 @@
通过
驳回
转发
+ 抄送
@@ -114,20 +115,55 @@
+
+
+
+
+ 选择抄送人
+
+
+ {{ u.nickName || u.userName || ('ID:' + u.userId) }}
+
+
+ 未选择抄送人
+
+
+
+
+
+
+
+
-
+
diff --git a/klp-ui/src/views/hrm/requests/leave.vue b/klp-ui/src/views/hrm/requests/leave.vue
index 27fe9fbc..b875fb48 100644
--- a/klp-ui/src/views/hrm/requests/leave.vue
+++ b/klp-ui/src/views/hrm/requests/leave.vue
@@ -381,13 +381,16 @@ export default {
const payload = {
...this.form,
status: 'pending',
- tplId: this.tplId,
+ // tplId: this.tplId,
manualAssigneeUserId: this.assigneeUserId
}
+ if (this.approverMode === 'template') {
+ payload.tplId = this.tplId
+ }
try {
await addLeaveReq(payload)
this.$message.success('提交成功')
- this.$router.push('/hrm/requests')
+ this.$router.push('/hrm/apply')
} finally {
this.submitting = false
}
diff --git a/klp-ui/src/views/hrm/requests/leaveDetail.vue b/klp-ui/src/views/hrm/requests/leaveDetail.vue
index a8842d85..79510524 100644
--- a/klp-ui/src/views/hrm/requests/leaveDetail.vue
+++ b/klp-ui/src/views/hrm/requests/leaveDetail.vue
@@ -9,7 +9,7 @@
驳回
-
+
@@ -233,6 +233,11 @@ export default {
canWithdraw() {
// 只有待审批状态且是当前用户提交的才能撤回
return this.detail.status === 'pending' && this.detail.createBy === this.$store.getters.name
+ },
+ canApprove() {
+ // 只有待审批状态且是当前用户待审批的才能审批
+ console.log(this.currentTask, this.$store.getters.name, this.$store.getters.id)
+ return this.detail.status === 'pending' && (this.currentTask?.assigneeUserName === this.$store.getters.name || this.currentTask?.assigneeUserId === this.$store.getters.id)
}
},
created() {
diff --git a/klp-ui/src/views/hrm/requests/reimburse.vue b/klp-ui/src/views/hrm/requests/reimburse.vue
index 93485a95..da1feeaf 100644
--- a/klp-ui/src/views/hrm/requests/reimburse.vue
+++ b/klp-ui/src/views/hrm/requests/reimburse.vue
@@ -342,12 +342,15 @@ export default {
accessoryReceiptIds: this.normalizeOssIds(this.form.accessoryReceiptIds),
remark: this.form.remark,
status: 'pending',
- tplId: this.tplId,
+ // tplId: this.tplId,
manualAssigneeUserId: this.assigneeUserId
}
+ if (this.approverMode === 'template') {
+ payload.tplId = this.tplId
+ }
await addReimburseReq(payload)
this.$message.success('提交成功')
- this.$router.push('/hrm/requests')
+ this.$router.push('/hrm/apply')
} catch (err) {
// no-op
} finally {
diff --git a/klp-ui/src/views/hrm/requests/reimburseDetail.vue b/klp-ui/src/views/hrm/requests/reimburseDetail.vue
index 01f739cc..961eaf1d 100644
--- a/klp-ui/src/views/hrm/requests/reimburseDetail.vue
+++ b/klp-ui/src/views/hrm/requests/reimburseDetail.vue
@@ -9,7 +9,7 @@
驳回
-
+
@@ -236,8 +236,13 @@ export default {
}
return empId ? `员工ID:${empId}` : '-'
},
+ canApprove() {
+ // 只有待审批状态且是当前用户待审批的才能审批
+ console.log(this.currentTask, this.$store.getters.name, this.$store.getters.id)
+ return this.detail.status === 'pending' && (this.currentTask?.assigneeUserName === this.$store.getters.name || this.currentTask?.assigneeUserId === this.$store.getters.id)
+ },
canWithdraw() {
- return this.detail.status === 'pending' && this.detail.createBy === this.$store.getters.userId
+ return this.detail.status === 'pending' && this.detail.createBy === this.$store.getters.name
}
},
created() {
diff --git a/klp-ui/src/views/hrm/requests/seal.vue b/klp-ui/src/views/hrm/requests/seal.vue
index 38c7d3ea..cbceab04 100644
--- a/klp-ui/src/views/hrm/requests/seal.vue
+++ b/klp-ui/src/views/hrm/requests/seal.vue
@@ -386,13 +386,15 @@ export default {
urgentLevel: this.form.urgentLevel,
remark,
status: 'pending',
- tplId: this.tplId,
+ // tplId: this.tplId,
manualAssigneeUserId: this.normalizeUserId(this.assigneeUserId)
}
-
+ if (this.approverMode === 'template') {
+ payload.tplId = this.tplId
+ }
await addSealReq(payload)
this.$message.success('提交成功')
- this.$router.push('/hrm/requests')
+ this.$router.push('/hrm/apply')
} finally {
this.submitting = false
}
diff --git a/klp-ui/src/views/hrm/requests/sealDetail.vue b/klp-ui/src/views/hrm/requests/sealDetail.vue
index 8182240d..2234bfe4 100644
--- a/klp-ui/src/views/hrm/requests/sealDetail.vue
+++ b/klp-ui/src/views/hrm/requests/sealDetail.vue
@@ -244,9 +244,9 @@
- 通过
- 驳回
- 撤回
+ 通过
+ 驳回
+ 撤回
当前无待办任务(可能已处理完成,或你不是当前审批人)
@@ -361,10 +361,18 @@ export default {
}
return empId ? `员工ID:${empId}` : '-'
},
+ canApprove() {
+ // 只有待审批状态且是当前用户待审批的才能审批
+ return this.seal.status === 'pending' && (this.currentTask?.assigneeUserName === this.$store.getters.name || this.currentTask?.assigneeUserId === this.$store.getters.id)
+ },
canStamp() {
// 审批通过后,且尚未生成回执时,可以盖章
return this.seal.status === 'approved' && !this.seal.receiptFileIds && this.targetPdfFile && this.attachmentList.length > 0
- }
+ },
+ canWithdraw() {
+ console.log(this.seal.createBy, this.$store.getters.name)
+ return this.seal.status === 'running' && this.seal.createBy === this.$store.getters.name
+ },
},
created() {
this.loadEmployees()
diff --git a/klp-ui/src/views/hrm/requests/travel.vue b/klp-ui/src/views/hrm/requests/travel.vue
index 884df268..7c7d4035 100644
--- a/klp-ui/src/views/hrm/requests/travel.vue
+++ b/klp-ui/src/views/hrm/requests/travel.vue
@@ -408,13 +408,16 @@ export default {
bankName: this.form.bankName,
bankAccount: this.form.bankAccount,
remark: this.form.remark,
- tplId: this.tplId,
+ // tplId: this.tplId,
manualAssigneeUserId: this.assigneeUserId
}
+ if (this.approverMode === 'template') {
+ payload.tplId = this.tplId
+ }
try {
await addTravelReq(payload)
this.$message.success('提交成功')
- this.$router.push('/hrm/requests')
+ this.$router.push('/hrm/apply')
} catch (e) {
this.$message.error('提交失败,请稍后重试')
} finally {
diff --git a/klp-ui/src/views/hrm/requests/travelDetail.vue b/klp-ui/src/views/hrm/requests/travelDetail.vue
index 0bf95f2c..accd3914 100644
--- a/klp-ui/src/views/hrm/requests/travelDetail.vue
+++ b/klp-ui/src/views/hrm/requests/travelDetail.vue
@@ -160,9 +160,9 @@
- 通过
- 驳回
- 撤回
+ 通过
+ 驳回
+ 撤回
当前无待办任务(可能已处理完成,或你不是当前审批人)
@@ -225,7 +225,14 @@ export default {
return `${name || '员工'}${no}${dept}`.trim()
}
return empId ? `员工ID:${empId}` : '-'
- }
+ },
+ canApprove() {
+ // 只有待审批状态且是当前用户待审批的才能审批
+ return this.travel.status === 'pending' && (this.currentTask?.assigneeUserName === this.$store.getters.name || this.currentTask?.assigneeUserId === this.$store.getters.id)
+ },
+ canWithdraw() {
+ return this.travel.status === 'pending' && this.travel.createBy === this.$store.getters.name
+ },
},
created() {
this.loadEmployees()