|
|
@ -117,7 +117,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { delBySids, pagerList, revokeProcess } from '@/api/chukuguanli/chukubanli' |
|
|
|
import { typeValues, selectHaveMessage } from '@/api/dictcommons/dictcommons' |
|
|
|
import { typeValues, selectHaveMessage, getButtonPermissions } from '@/api/dictcommons/dictcommons' |
|
|
|
import { getStorage } from '@/utils/auth' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
@ -149,6 +149,7 @@ export default { |
|
|
|
payType: [], |
|
|
|
list: [], |
|
|
|
sids: [], // 用于导出的时候保存已选择的SIDs |
|
|
|
multipleSelection: [], |
|
|
|
FormLoading: false, |
|
|
|
listLoading: false, |
|
|
|
// 翻页 |
|
|
@ -163,7 +164,9 @@ export default { |
|
|
|
applySid: '', // 申请人sid |
|
|
|
contractNo: '', // 合同编号 |
|
|
|
name: '', // 客户名称 |
|
|
|
paymentMethodKey: '' |
|
|
|
paymentMethodKey: '', |
|
|
|
menuUrl: '', |
|
|
|
orgPath: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
btnList: [ |
|
|
@ -199,7 +202,18 @@ export default { |
|
|
|
mounted() { |
|
|
|
// 在外部vue的window上添加postMessage的监听,而且绑定处理函数handleMessage |
|
|
|
window.addEventListener('message', this.handleMessage) |
|
|
|
this.$refs['btnbar'].setButtonList(this.btnList) |
|
|
|
getButtonPermissions({ userSid: window.sessionStorage.getItem('userSid'), url: this.$route.path, type: 0 }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
for (var i = 0; i < res.data.length; i++) { |
|
|
|
for (var k = 0; k < this.btnList.length; k++) { |
|
|
|
if (res.data[i].buttonId === this.btnList[k].btnKey) { |
|
|
|
this.btnList.splice(k, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.$refs['btnbar'].setButtonList(this.btnList) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
async handleMessage(event) { |
|
|
@ -289,6 +303,7 @@ export default { |
|
|
|
// 信息条数 获取点击时当前的sid |
|
|
|
handleSelectionChange(row) { |
|
|
|
const aa = [] |
|
|
|
this.multipleSelection = row |
|
|
|
row.forEach(element => { |
|
|
|
aa.push(element.sid) |
|
|
|
}) |
|
|
@ -300,6 +315,8 @@ export default { |
|
|
|
getList() { |
|
|
|
this.listLoading = true |
|
|
|
this.listQuery.params.applySid = window.sessionStorage.getItem('userSid') |
|
|
|
this.listQuery.params.menuUrl = this.$route.path |
|
|
|
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|
|
|
pagerList(this.listQuery).then(response => { // 拦截器 |
|
|
|
this.listLoading = false |
|
|
|
if (response.success) { |
|
|
@ -329,7 +346,9 @@ export default { |
|
|
|
applySid: '', // 申请人sid |
|
|
|
contractNo: '', // 合同编号 |
|
|
|
name: '', // 客户名称 |
|
|
|
paymentMethodKey: '' |
|
|
|
paymentMethodKey: '', |
|
|
|
menuUrl: '', |
|
|
|
orgPath: '' |
|
|
|
} |
|
|
|
} |
|
|
|
this.getList() |
|
|
@ -344,8 +363,12 @@ export default { |
|
|
|
}, |
|
|
|
// 办理 |
|
|
|
toEdit(row) { |
|
|
|
this.viewState = 3 |
|
|
|
this.$refs['divadd'].showEdit(row) |
|
|
|
if (row.allowModify) { |
|
|
|
this.viewState = 3 |
|
|
|
this.$refs['divadd'].showEdit(row) |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '非本人发起的申请,无权限操作' }) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 打开查看 |
|
|
|
toInfo(row) { |
|
|
@ -358,6 +381,12 @@ export default { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' }) |
|
|
|
return |
|
|
|
} |
|
|
|
for (var i = 0; i < this.multipleSelection.length; i++) { |
|
|
|
if (!this.multipleSelection[i].allowModify) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '非本人发起的申请,无权限操作' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?' |
|
|
|
this.$confirm(tip, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|