diff --git a/anrui-scm/anrui-scm-ui/src/views/supplychain/cheliangpaichan/cheliangpaichan.vue b/anrui-scm/anrui-scm-ui/src/views/supplychain/cheliangpaichan/cheliangpaichan.vue index 2b1a29283c..2354fd1f19 100644 --- a/anrui-scm/anrui-scm-ui/src/views/supplychain/cheliangpaichan/cheliangpaichan.vue +++ b/anrui-scm/anrui-scm-ui/src/views/supplychain/cheliangpaichan/cheliangpaichan.vue @@ -146,6 +146,7 @@ export default { ], // sid数组 sids: [], // 用于导出的时候保存已选择SID + multipleSelection: [], nodeState_list: [], schedulingType_list: [], applyType_list: [], @@ -160,7 +161,8 @@ export default { applyTypeKey: '', schedulingTypeKey: '', userSid: '', - orgPath: '' + orgPath: '', + menuUrl: '' } }, row: {} @@ -242,6 +244,7 @@ export default { handleSelectionChange(row) { const aa = [] const bb = [] + this.multipleSelection = row row.forEach(element => { aa.push(element.sid) bb.push(element.nodeState) @@ -264,9 +267,13 @@ export default { const sid = row.sid this.$refs['divinfo'].showInfo(sid, row) }, - handleEdit(row){ - this.viewState = 3 - this.$refs['divadd'].showEdit(row.sid, row) + handleEdit(row) { + if (row.allowModify) { + this.viewState = 3 + this.$refs['divadd'].showEdit(row.sid, row) + } else { + this.$message({ showClose: true, type: 'error', message: '非本人发起的申请,无权限操作' }) + } }, // 查询 dosearch() { @@ -286,16 +293,18 @@ export default { applyTypeKey: '', schedulingTypeKey: '', userSid: '', - orgPath: '' + orgPath: '', + menuUrl: '' } } - this.dosearch() + this.loadList() }, // 加载分页列表 loadList() { this.tableLoading = true this.queryParams.params.userSid = window.sessionStorage.getItem('userSid') this.queryParams.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') + this.queryParams.params.menuUrl = this.$route.path req.listPage(this.queryParams).then(resp => { console.log('查询列表', resp) this.tableLoading = false @@ -318,6 +327,10 @@ export default { this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) return } + if (!this.multipleSelection[0].allowModify) { + this.$message({ showClose: true, type: 'error', message: '非本人发起的申请,无权限操作' }) + return + } const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' this.$confirm(tip, '提示', { confirmButtonText: '确定',