diff --git a/src/views/modules/quote/detail/quoteDetail.vue b/src/views/modules/quote/detail/quoteDetail.vue index 8c9abd6..90694e1 100644 --- a/src/views/modules/quote/detail/quoteDetail.vue +++ b/src/views/modules/quote/detail/quoteDetail.vue @@ -778,6 +778,10 @@ export default { }, methods:{ handleSaveQuoteDetail(row){ + if (row && !this.canOperateQuoteDetail()) { + this.$message.warning('审批中状态下仅当前审批人可编辑') + return + } this.$nextTick(()=>{ if (this.$refs.handleSaveQuoteDetailClick){ this.$refs.saveQuoteDetailForm.clearValidate(); @@ -881,6 +885,10 @@ export default { }) }, handleDeleteQuoteDetail(row){ + if (!this.canOperateQuoteDetail()) { + this.$message.warning('审批中状态下仅当前审批人可删除') + return + } this.$confirm('确认删除该条报价明细吗?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -1055,6 +1063,10 @@ export default { } }, handleAgainQuoteDetail(row){ + if (!this.canOperateQuoteDetail()) { + this.$message.warning('审批中状态下仅当前审批人可复制明细') + return + } this.againRow = { ...row, showFlag: 'Y' @@ -1194,6 +1206,19 @@ export default { const defaultItemNo = this.internalDefaultItemNoMap[row.quoteGroupDetailId] return defaultItemNo != null && defaultItemNo === row.itemNo; }, + isQuoteApprover() { + const approvalUsername = this.quote && this.quote.approvalUsername + if (!approvalUsername) { + return false + } + return approvalUsername.split(';').includes(this.$store.state.user.name) + }, + canOperateQuoteDetail() { + if (this.quote && this.quote.status === '审批中') { + return this.isQuoteApprover() + } + return true + }, }, watch:{ quote(newVal,oldVal){ @@ -1311,14 +1336,14 @@ export default {