|
|
@@ -1,6 +1,18 @@
|
|
|
<template>
|
|
|
<el-col :span="16" :offset="6">
|
|
|
<el-form label-width="100px" ref="formRef" :model="form">
|
|
|
+ <el-form-item
|
|
|
+ v-if="taskDefinitionKey === 'deptLeaderAssign'"
|
|
|
+ label="采购部门"
|
|
|
+ prop="userId"
|
|
|
+ style="margin-bottom: 20px"
|
|
|
+ >
|
|
|
+ <deptSelect
|
|
|
+ :disabled="type == 'detail'"
|
|
|
+ v-model="form.useDeptId"
|
|
|
+ @changeGroup="searchDeptNodeClick"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
<el-form-item
|
|
|
v-if="taskDefinitionKey === 'deptLeaderAssign'"
|
|
|
label="采购员"
|
|
|
@@ -51,10 +63,13 @@
|
|
|
>通过
|
|
|
</el-button>
|
|
|
|
|
|
- <el-dropdown @command="(command) => handleCommand(command)" style="margin-left: 30px;">
|
|
|
- <span class="el-dropdown-link">
|
|
|
- 更多<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
- </span>
|
|
|
+ <el-dropdown
|
|
|
+ @command="(command) => handleCommand(command)"
|
|
|
+ style="margin-left: 30px"
|
|
|
+ >
|
|
|
+ <span class="el-dropdown-link">
|
|
|
+ 更多<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
+ </span>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item command="cancel">作废</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
@@ -96,16 +111,21 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
|
|
|
+ import { approveTaskWithVariables, rejectTask } from '@/api/bpm/task';
|
|
|
import { listAllUserBind } from '@/api/system/organization';
|
|
|
- import { assign, cancel,UpdateInformation } from '@/api/bpm/components/purchasingManage/purchasePlanManage';
|
|
|
-
|
|
|
+ import {
|
|
|
+ assign,
|
|
|
+ cancel,
|
|
|
+ UpdateInformation
|
|
|
+ } from '@/api/bpm/components/purchasingManage/purchasePlanManage';
|
|
|
+ import deptSelect from '@/components/CommomSelect/dept-select.vue';
|
|
|
+ import { getUserPage } from '@/api/system/organization';
|
|
|
|
|
|
// 流程实例的详情页,可用于审批
|
|
|
export default {
|
|
|
name: '',
|
|
|
components: {
|
|
|
- // Parser
|
|
|
+ deptSelect
|
|
|
},
|
|
|
props: {
|
|
|
businessId: {
|
|
|
@@ -125,7 +145,8 @@ import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
|
|
|
return {
|
|
|
form: {
|
|
|
userId: '',
|
|
|
- reason: ''
|
|
|
+ reason: '',
|
|
|
+ useDeptId:''
|
|
|
},
|
|
|
userOptions: []
|
|
|
};
|
|
|
@@ -145,6 +166,15 @@ import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
|
|
|
handleBackList() {
|
|
|
this.$emit('handleBackList');
|
|
|
},
|
|
|
+ searchDeptNodeClick(val){
|
|
|
+ console.log(val,'val')
|
|
|
+ getUserPage({
|
|
|
+ groupId: val,
|
|
|
+ size:999
|
|
|
+ }).then((data) => {
|
|
|
+ this.userOptions=data.list
|
|
|
+ });
|
|
|
+ },
|
|
|
|
|
|
async handleAudit(status) {
|
|
|
let userInfo = this.userOptions.find(
|
|
|
@@ -176,9 +206,9 @@ import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
|
|
|
API({
|
|
|
id: this.taskId,
|
|
|
reason: this.form.reason,
|
|
|
- variables:{
|
|
|
+ variables: {
|
|
|
userId: userInfo?.id,
|
|
|
- pass:!!status
|
|
|
+ pass: !!status
|
|
|
}
|
|
|
});
|
|
|
this.$emit('handleAudit', {
|
|
|
@@ -196,24 +226,27 @@ import {approveTaskWithVariables, rejectTask} from '@/api/bpm/task';
|
|
|
//更多
|
|
|
handleCommand(command) {
|
|
|
if (command === 'cancel') {
|
|
|
- this.$confirm("是否确认作废?", {
|
|
|
+ this.$confirm('是否确认作废?', {
|
|
|
type: 'warning',
|
|
|
cancelButtonText: '取消',
|
|
|
confirmButtonText: '确定'
|
|
|
- }).then(() => {
|
|
|
- cancel({
|
|
|
- id: this.taskId,
|
|
|
- reason: this.form.reason,
|
|
|
- businessId: this.businessId,
|
|
|
- }).then(() => {
|
|
|
- this.$emit('handleClose');
|
|
|
- }).catch(() => {
|
|
|
- this.$message.error("流程作废失败");
|
|
|
- });
|
|
|
- }).catch(() => {});
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ cancel({
|
|
|
+ id: this.taskId,
|
|
|
+ reason: this.form.reason,
|
|
|
+ businessId: this.businessId
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.$emit('handleClose');
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message.error('流程作废失败');
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
}
|
|
|
- },
|
|
|
-
|
|
|
+ }
|
|
|
}
|
|
|
};
|
|
|
</script>
|