Browse Source

完善存放地点变更--数据权限、本人权限操作

master
yunuo970428 2 years ago
parent
commit
b88c4abe02
  1. 27
      anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangeng.vue

27
anrui-scm/anrui-scm-ui/src/views/supplychain/cunfangdidianbiangeng/cunfangdidianbiangeng.vue

@ -331,7 +331,8 @@ export default {
locationSid: '', locationSid: '',
operator: '', operator: '',
userSid: '', userSid: '',
orgPath: '' orgPath: '',
menuUrl: ''
} }
}, },
btnList: [ btnList: [
@ -428,18 +429,6 @@ export default {
} }
}) })
}, },
toEdit() {
if (this.multipleSelection.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行编辑' })
return
}
if (this.multipleSelection.length > 1) {
this.$message({ showClose: true, type: 'error', message: '只能选择一条记录进行编辑' })
return
}
this.viewState = 3
this.$refs['divadd'].showEdit(this.sids[0])
},
doDel() { doDel() {
if (this.multipleSelection.length === 0) { if (this.multipleSelection.length === 0) {
this.$message({ this.$message({
@ -447,6 +436,10 @@ export default {
}) })
return return
} }
if (!this.multipleSelection[0].allowModify) {
this.$message({ showClose: true, type: 'error', message: '非本人发起的申请,无权限操作' })
return
}
const _this = this const _this = this
const tip = '请确认是否删除所选 ' + this.multipleSelection.length + ' 条记录?' const tip = '请确认是否删除所选 ' + this.multipleSelection.length + ' 条记录?'
this.$confirm(tip, '提示', { this.$confirm(tip, '提示', {
@ -475,8 +468,12 @@ export default {
}) })
}, },
handleEdit(row) { handleEdit(row) {
if (row.allowModify) {
this.viewState = 3 this.viewState = 3
this.$refs['divadd'].showEdit(row.sid) this.$refs['divadd'].showEdit(row.sid)
} else {
this.$message({ showClose: true, type: 'error', message: '非本人发起的申请,无权限操作' })
}
}, },
handleReplenish(row) { handleReplenish(row) {
getErtraState({ sid: row.sid, userSid: window.sessionStorage.getItem('userSid') }).then((resp) => { getErtraState({ sid: row.sid, userSid: window.sessionStorage.getItem('userSid') }).then((resp) => {
@ -567,7 +564,8 @@ export default {
locationSid: '', locationSid: '',
operator: '', operator: '',
userSid: '', userSid: '',
orgPath: '' orgPath: '',
menuUrl: ''
} }
} }
this.getList() this.getList()
@ -576,6 +574,7 @@ export default {
this.tableLoading = true this.tableLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
selectCarTransferList(this.listQuery).then((resp) => { selectCarTransferList(this.listQuery).then((resp) => {
this.tableLoading = false this.tableLoading = false
if (resp.success) { if (resp.success) {

Loading…
Cancel
Save