|
@@ -3,7 +3,6 @@
|
|
|
<el-form label-width="100px" ref="formRef" :model="form">
|
|
<el-form label-width="100px" ref="formRef" :model="form">
|
|
|
<el-form-item
|
|
<el-form-item
|
|
|
label="审批建议"
|
|
label="审批建议"
|
|
|
-
|
|
|
|
|
style="margin-bottom: 20px"
|
|
style="margin-bottom: 20px"
|
|
|
:rules="{
|
|
:rules="{
|
|
|
required: true,
|
|
required: true,
|
|
@@ -31,24 +30,34 @@
|
|
|
type="danger"
|
|
type="danger"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
@click="handleAudit(0)"
|
|
@click="handleAudit(0)"
|
|
|
-
|
|
|
|
|
>驳回
|
|
>驳回
|
|
|
</el-button>
|
|
</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-menu slot="dropdown">
|
|
|
<el-dropdown-item command="cancel">作废</el-dropdown-item>
|
|
<el-dropdown-item command="cancel">作废</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
|
-
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
- import { UpdateInformation, cancel } from '@/api/bpm/components/contractManage/contractBook';
|
|
|
|
|
- import {approveTaskWithVariables, rejectTask,cancelTask} from '@/api/bpm/task';
|
|
|
|
|
|
|
+ import {
|
|
|
|
|
+ UpdateInformation,
|
|
|
|
|
+ cancel
|
|
|
|
|
+ } from '@/api/bpm/components/contractManage/contractBook';
|
|
|
|
|
+ import {
|
|
|
|
|
+ approveTaskWithVariables,
|
|
|
|
|
+ rejectTask,
|
|
|
|
|
+ cancelTask
|
|
|
|
|
+ } from '@/api/bpm/task';
|
|
|
import { listAllUserBind } from '@/api/system/organization';
|
|
import { listAllUserBind } from '@/api/system/organization';
|
|
|
|
|
|
|
|
// 流程实例的详情页,可用于审批
|
|
// 流程实例的详情页,可用于审批
|
|
@@ -81,7 +90,6 @@
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
-
|
|
|
|
|
this.userOptions = [];
|
|
this.userOptions = [];
|
|
|
listAllUserBind().then((data) => {
|
|
listAllUserBind().then((data) => {
|
|
|
this.userOptions.push(...data);
|
|
this.userOptions.push(...data);
|
|
@@ -97,12 +105,13 @@
|
|
|
this.$emit('handleBackList');
|
|
this.$emit('handleBackList');
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
-
|
|
|
|
|
async handleAudit(status) {
|
|
async handleAudit(status) {
|
|
|
let variables = {
|
|
let variables = {
|
|
|
pass: !!status
|
|
pass: !!status
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ let { formData } = await this.getTableValue();
|
|
|
|
|
+
|
|
|
let API = !!status ? approveTaskWithVariables : rejectTask;
|
|
let API = !!status ? approveTaskWithVariables : rejectTask;
|
|
|
API({
|
|
API({
|
|
|
id: this.taskId,
|
|
id: this.taskId,
|
|
@@ -129,25 +138,28 @@
|
|
|
//更多
|
|
//更多
|
|
|
handleCommand(command) {
|
|
handleCommand(command) {
|
|
|
if (command === 'cancel') {
|
|
if (command === 'cancel') {
|
|
|
- this.$confirm("是否确认作废?", {
|
|
|
|
|
|
|
+ this.$confirm('是否确认作废?', {
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
|
confirmButtonText: '确定'
|
|
confirmButtonText: '确定'
|
|
|
- }).then(() => {
|
|
|
|
|
- cancelTask({
|
|
|
|
|
- id: this.id,
|
|
|
|
|
- taskId: this.taskId,
|
|
|
|
|
- reason: this.form.reason,
|
|
|
|
|
- businessId: this.businessId,
|
|
|
|
|
- }).then(() => {
|
|
|
|
|
- this.$emit('handleClose');
|
|
|
|
|
- }).catch(() => {
|
|
|
|
|
- this.$message.error("流程作废失败");
|
|
|
|
|
- });
|
|
|
|
|
- }).catch(() => {});
|
|
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ cancelTask({
|
|
|
|
|
+ id: this.id,
|
|
|
|
|
+ taskId: this.taskId,
|
|
|
|
|
+ reason: this.form.reason,
|
|
|
|
|
+ businessId: this.businessId
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ this.$emit('handleClose');
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+ this.$message.error('流程作废失败');
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {});
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|