Browse Source

完善厂家采购--数据权限、本人权限操作

master
yunuo970428 2 years ago
parent
commit
7271c46b2c
  1. 25
      anrui-scm/anrui-scm-ui/src/views/supplychain/cheliangpaichan/cheliangpaichan.vue

25
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: '确定',

Loading…
Cancel
Save