|
@@ -97,6 +97,9 @@
|
|
|
<vxe-column title="操作" width="220px" fixed="right" align="center">
|
|
<vxe-column title="操作" width="220px" fixed="right" align="center">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<el-button
|
|
<el-button
|
|
|
|
|
+ v-if="hasPermission('psi:edit') && scope.row.status === '5' && !scope.row.statusReturn"
|
|
|
|
|
+ text type="primary" size="small" @click="exportByTemplate(scope.row)">下载领用单</el-button>
|
|
|
|
|
+ <el-button
|
|
|
v-if="hasPermission('psi:edit') && scope.row.createBy === $store.state.user.id && (scope.row.status === '1' || scope.row.status === '3')"
|
|
v-if="hasPermission('psi:edit') && scope.row.createBy === $store.state.user.id && (scope.row.status === '1' || scope.row.status === '3')"
|
|
|
text type="primary" size="small" @click="push(scope.row)">修改</el-button>
|
|
text type="primary" size="small" @click="push(scope.row)">修改</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
@@ -435,7 +438,7 @@ export default {
|
|
|
this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
|
this.refreshList()
|
|
this.refreshList()
|
|
|
} else {
|
|
} else {
|
|
|
- this.todo(row)
|
|
|
|
|
|
|
+ this.todo(row, "4")
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -446,12 +449,16 @@ export default {
|
|
|
this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
|
this.refreshList()
|
|
this.refreshList()
|
|
|
} else {
|
|
} else {
|
|
|
- this.todo(row)
|
|
|
|
|
|
|
+ this.todo(row, "2")
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
// 审核或重新调整跳转
|
|
// 审核或重新调整跳转
|
|
|
- todo(row) {
|
|
|
|
|
|
|
+ todo(row, status) {
|
|
|
|
|
+ let formReadOnly = true
|
|
|
|
|
+ if (status == "4") {
|
|
|
|
|
+ formReadOnly = false
|
|
|
|
|
+ }
|
|
|
let cUser = false
|
|
let cUser = false
|
|
|
taskService.getTaskDefInfo({
|
|
taskService.getTaskDefInfo({
|
|
|
taskId: row.taskId
|
|
taskId: row.taskId
|
|
@@ -461,7 +468,7 @@ export default {
|
|
|
query: {
|
|
query: {
|
|
|
...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
|
|
...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId'),
|
|
|
isShow: false,
|
|
isShow: false,
|
|
|
- formReadOnly: true,
|
|
|
|
|
|
|
+ formReadOnly: formReadOnly,
|
|
|
formTitle: `${data.taskName}`,
|
|
formTitle: `${data.taskName}`,
|
|
|
cUser: cUser,
|
|
cUser: cUser,
|
|
|
title: `审批【${data.taskName || ''}】`,
|
|
title: `审批【${data.taskName || ''}】`,
|
|
@@ -675,6 +682,23 @@ export default {
|
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
})
|
|
})
|
|
|
|
|
+ },
|
|
|
|
|
+ exportByTemplate(row) {
|
|
|
|
|
+ const options = {
|
|
|
|
|
+ filename: `${this.moment(new Date()).format('YYYY-MM-DD')}领用单`,
|
|
|
|
|
+ sheetName: '领用单',
|
|
|
|
|
+ mode: 'all'
|
|
|
|
|
+ }
|
|
|
|
|
+ this.loading = true
|
|
|
|
|
+ this.collectService.exportFileByTemplate({
|
|
|
|
|
+ ...options,
|
|
|
|
|
+ id: row.id
|
|
|
|
|
+ }).then((res) => {
|
|
|
|
|
+ this.$utils.downloadExcel(res, options.filename)
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|