|
@@ -44,7 +44,7 @@
|
|
|
|
|
|
<el-form-item style="margin-left:20px;">
|
|
|
<el-button @click="batchApprove(true)" style="margin-left:10px;" :loading="batchApproveLoading" :disabled="multipleSelection.length==0" size="mini">批量通过</el-button>
|
|
|
- <el-button @click="batchApprove(false)" :loading="batchDenyLoading" :disabled="multipleSelection.length==0" size="mini">批量驳回</el-button>
|
|
|
+ <el-button @click="batchApprove(false)" :disabled="multipleSelection.length==0" size="mini">批量驳回</el-button>
|
|
|
</el-form-item>
|
|
|
<el-form-item style="margin-left:20px;">
|
|
|
<el-link type="primary" @click="recordList(),recordDialogVisible = true,pageIndexList = 1,pageSizeList = 20">审核记录</el-link>
|
|
@@ -170,6 +170,16 @@
|
|
|
<el-button type="primary" @click="deny()" >确定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!--批量驳回弹出框 -->
|
|
|
+ <el-dialog title="请输入原因" v-if="batchDenyDialog" :visible.sync="batchDenyDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
|
|
|
+ <div>
|
|
|
+ <el-input type="textarea" v-model="batchDenyData.reason" rows="2" placeholder="请输入您决定驳回的原因" />
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="batchDenyDialog = false" >取消</el-button>
|
|
|
+ <el-button type="primary" @click="batchDenyClick()" :loading="batchDenyLoading">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
<!--工具条-->
|
|
|
<!-- <el-col v-if="search.value != -1" :span="24" class="toolbar">
|
|
|
<el-pagination
|
|
@@ -191,7 +201,7 @@
|
|
|
<el-table-column prop="userName" label="操作人" width="120"></el-table-column>
|
|
|
|
|
|
<el-table-column prop="indate" label="审核时间"></el-table-column>
|
|
|
- <el-table-column prop="result" label="审核结果" width="120"></el-table-column>
|
|
|
+ <el-table-column prop="result" label="审核结果" width="120" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="date" label="员工/日期" width="200">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
@@ -289,6 +299,8 @@
|
|
|
data() {
|
|
|
return {
|
|
|
batchDenyLoading: false,
|
|
|
+ batchDenyDialog: false,
|
|
|
+ batchDenyData: {ids:'',reason:''},
|
|
|
batchApproveLoading: false,
|
|
|
denyForm:null,
|
|
|
denyReasonDialog:false,
|
|
@@ -470,28 +482,59 @@
|
|
|
ids = ids.substring(0, ids.length-1);
|
|
|
}
|
|
|
//等待
|
|
|
- isPass?this.batchApproveLoading = true:this.batchDenyLoading = true;
|
|
|
- this.listLoading = true;
|
|
|
- this.http.post(isPass?'/report/batchApproveReport':'/report/batchDenyReport', {ids: ids},
|
|
|
- res => {
|
|
|
- isPass?this.batchApproveLoading = false:this.batchDenyLoading = false;
|
|
|
- this.listLoading = false;
|
|
|
- if (res.code == "ok") {
|
|
|
- this.getList();
|
|
|
- } else {
|
|
|
+ if(isPass){
|
|
|
+ this.batchApproveLoading = true
|
|
|
+ this.listLoading = true;
|
|
|
+ this.http.post('/report/batchApproveReport', {ids: ids},
|
|
|
+ res => {
|
|
|
+ this.batchApproveLoading = false
|
|
|
+ this.listLoading = false;
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.getList();
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.listLoading = false;
|
|
|
this.$message({
|
|
|
- message: res.msg,
|
|
|
- type: "error"
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ this.batchDenyDialog = true
|
|
|
+ this.batchDenyData.ids = ids
|
|
|
+ this.batchDenyData.reason = ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ batchDenyClick(){
|
|
|
+ this.batchDenyLoading = true
|
|
|
+ this.listLoading = true;
|
|
|
+ this.http.post('/report/batchDenyReport', this.batchDenyData,
|
|
|
+ res => {
|
|
|
+ this.batchDenyLoading = false;
|
|
|
+ this.batchDenyDialog = false
|
|
|
+ this.listLoading = false;
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.getList();
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.listLoading = false;
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
});
|
|
|
- }
|
|
|
- },
|
|
|
- error => {
|
|
|
- this.listLoading = false;
|
|
|
- this.$message({
|
|
|
- message: error,
|
|
|
- type: "error"
|
|
|
});
|
|
|
- });
|
|
|
},
|
|
|
//分页
|
|
|
handleCurrentChange(val) {
|