|
@@ -27,25 +27,20 @@
|
|
|
:visible="visible"
|
|
|
:reload="reload"
|
|
|
width="1200px"
|
|
|
+ props="visible"
|
|
|
@cancel="beforeCancel"
|
|
|
>
|
|
|
<template>
|
|
|
<!-- 按钮部分 -->
|
|
|
<div class="flex-justify-between padding-right-20 padding-left-20">
|
|
|
<div>
|
|
|
- <el-button type="primary" size="small">转派</el-button>
|
|
|
- <el-button type="primary" @click="handleApprove" size="small"
|
|
|
- >审批</el-button
|
|
|
- >
|
|
|
- <el-button type="primary" @click="handleTrack" size="small"
|
|
|
- >流程跟踪</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary">转派</el-button>
|
|
|
+ <el-button type="primary" @click="handleApprove">审批</el-button>
|
|
|
+ <el-button type="primary" @click="handleTrack">流程跟踪</el-button>
|
|
|
<el-button type="primary" size="small">导出</el-button>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-button @click="handleCancel" type="primary" size="small"
|
|
|
- >返回</el-button
|
|
|
- >
|
|
|
+ <el-button @click="handleCancel('visible')" type="primary">返回</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 主体部分 -->
|
|
@@ -55,10 +50,10 @@
|
|
|
</simple-dialog>
|
|
|
<simple-dialog
|
|
|
title="审批"
|
|
|
- fullscreen
|
|
|
:visible="approve_visible"
|
|
|
:reload="reload"
|
|
|
width="500px"
|
|
|
+ props="approve_visible"
|
|
|
@cancel="beforeCancel"
|
|
|
>
|
|
|
<el-form :model="approveForm" :rules="approverules" ref="approveForm"
|
|
@@ -71,20 +66,20 @@
|
|
|
<template v-slot:footer
|
|
|
><div>
|
|
|
<div v-if="type === '1'">
|
|
|
- <el-button @click="handleCancel">结束</el-button>
|
|
|
+ <el-button @click="handleCancel('approve_visible')">结束</el-button>
|
|
|
<el-button @click="handleTurn(type)" type="primary"
|
|
|
>转副总审批</el-button
|
|
|
>
|
|
|
</div>
|
|
|
<div v-else-if="type === '2'">
|
|
|
- <el-button @click="handleCancel">结束</el-button>
|
|
|
- <el-button @click="handleCancel">打回</el-button>
|
|
|
+ <el-button @click="handleCancel('approve_visible')">结束</el-button>
|
|
|
+ <el-button @click="handleCancel('approve_visible')">打回</el-button>
|
|
|
<el-button @click="handleTurn(type)" type="primary"
|
|
|
>转总经理审批</el-button
|
|
|
>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
- <el-button @click="handleCancel">打回</el-button>
|
|
|
+ <el-button @click="handleCancel('approve_visible')">打回</el-button>
|
|
|
<el-button @click="handleTurn(type)" type="primary">同意</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -92,10 +87,10 @@
|
|
|
</simple-dialog>
|
|
|
<simple-dialog
|
|
|
title="流程跟踪"
|
|
|
- fullscreen
|
|
|
:visible="track_visible"
|
|
|
:reload="reload"
|
|
|
width="600px"
|
|
|
+ props="track_visible"
|
|
|
@confirm="handleConfirm"
|
|
|
@cancel="beforeCancel"
|
|
|
>
|
|
@@ -327,33 +322,24 @@ export default {
|
|
|
// dialog事件
|
|
|
//权限管理事件
|
|
|
handleApprove() {
|
|
|
- this.reload++;
|
|
|
- this.visible = false;
|
|
|
this.approve_visible = true;
|
|
|
},
|
|
|
handleTrack() {
|
|
|
- this.reload++;
|
|
|
- this.visible = false;
|
|
|
this.track_visible = true;
|
|
|
},
|
|
|
- beforeCancel(data) {
|
|
|
- this.visible = data;
|
|
|
- this.approve_visible = data;
|
|
|
- this.track_visible = data;
|
|
|
+ beforeCancel({visible,props}) {
|
|
|
+ this[props] = visible;
|
|
|
},
|
|
|
handleTurn(type) {
|
|
|
console.log(type);
|
|
|
},
|
|
|
handleConfirm(visible) {
|
|
|
- this.reload++;
|
|
|
+ console.log(visible);
|
|
|
this.track_visible = visible;
|
|
|
},
|
|
|
// 关闭方法
|
|
|
- handleCancel() {
|
|
|
- this.reload++;
|
|
|
- this.visible = false;
|
|
|
- this.approve_visible = false;
|
|
|
- this.track_visible = false;
|
|
|
+ handleCancel(data) {
|
|
|
+ this[data] = false;
|
|
|
},
|
|
|
},
|
|
|
};
|