|
@@ -63,7 +63,11 @@
|
|
|
<script>
|
|
<script>
|
|
|
import storageApi from '@/api/warehouseManagement';
|
|
import storageApi from '@/api/warehouseManagement';
|
|
|
import { cancel } from '@/api/bpm/components/purchasingManage/outSourceSend';
|
|
import { cancel } from '@/api/bpm/components/purchasingManage/outSourceSend';
|
|
|
- import { approveTaskWithVariables, rejectTask } from '@/api/bpm/task';
|
|
|
|
|
|
|
+ import {
|
|
|
|
|
+ approveTaskWithVariables,
|
|
|
|
|
+ rejectTask,
|
|
|
|
|
+ cancelTask
|
|
|
|
|
+ } from '@/api/bpm/task';
|
|
|
|
|
|
|
|
// 流程实例的详情页,可用于审批
|
|
// 流程实例的详情页,可用于审批
|
|
|
export default {
|
|
export default {
|
|
@@ -186,13 +190,19 @@
|
|
|
confirmButtonText: '确定'
|
|
confirmButtonText: '确定'
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
- cancel({
|
|
|
|
|
- id: this.taskId,
|
|
|
|
|
|
|
+ if (!this.form.reason) {
|
|
|
|
|
+ return this.$message.warning('审批建议不能为空');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ cancelTask({
|
|
|
|
|
+ id: this.id,
|
|
|
|
|
+ taskId: this.taskId,
|
|
|
reason: this.form.reason,
|
|
reason: this.form.reason,
|
|
|
businessId: this.businessId
|
|
businessId: this.businessId
|
|
|
})
|
|
})
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
this.$emit('handleClose');
|
|
this.$emit('handleClose');
|
|
|
|
|
+ this.$message.success('流程作废成功');
|
|
|
})
|
|
})
|
|
|
.catch(() => {
|
|
.catch(() => {
|
|
|
this.$message.error('流程作废失败');
|
|
this.$message.error('流程作废失败');
|