Browse Source

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

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

21
anrui-scm/anrui-scm-ui/src/views/supplychain/cheliangpaichan/cheliangpaichan.vue

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

Loading…
Cancel
Save