Commit aa5b1ae3 authored by Mac's avatar Mac

批量审核 首店

parent d7d22159
<template> <template>
<div class="firstStoreApply"> <div class="firstStoreApply">
<div class="head-title"> <div class="head-title" >
首店申请 首店申请
<el-button style="float:right;margin-top: -5px;" size="small" type="primary" @click="Export()"> <div style="float:right;margin-top:-5px">
下载excel <el-button type="primary" size="small" @click="batchadopt(1)">批量审核通过</el-button>
</el-button> <el-button type="primary" size="small" @click="batchadopt(2)">批量审核拒绝</el-button>
<el-button style="" size="small" type="primary" @click="Export()">
下载excel
</el-button>
</div>
</div> </div>
<div class="content"> <div class="content">
<div> <div>
...@@ -43,7 +48,11 @@ ...@@ -43,7 +48,11 @@
<el-option label="审核不通过" :value="3"></el-option> <el-option label="审核不通过" :value="3"></el-option>
</el-select> </el-select>
</div> </div>
<el-table :data="tableData" v-loading="loading" border style="width: 100%;margin:20px 0"> <el-table :data="tableData" v-loading="loading" border style="width: 100%;margin:20px 0" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
:selectable="checkSelectable"
width="55"></el-table-column>
<el-table-column prop="Name" width="200" label="首店名称"> <el-table-column prop="Name" width="200" label="首店名称">
</el-table-column> </el-table-column>
<el-table-column prop="CoverImage" label="封面图" width="150"> <el-table-column prop="CoverImage" label="封面图" width="150">
...@@ -104,6 +113,17 @@ ...@@ -104,6 +113,17 @@
<el-button @click="sureJujue" size="small" type="primary">确 定</el-button> <el-button @click="sureJujue" size="small" type="primary">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="批量审核拒绝" :visible.sync="resondialog2" width="600px">
<el-form label-width="80px">
<el-form-item label="拒绝原因" class="is-required">
<el-input type="textarea" :rows="6" v-model="batchmsg.AuditRemark"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="resondialog2 = false">取 消</el-button>
<el-button @click="BatchAuthenticationAudit(1)" size="small" type="primary">确 定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
...@@ -124,11 +144,18 @@ ...@@ -124,11 +144,18 @@
total: 0, total: 0,
tableData: [], //数据列表 tableData: [], //数据列表
auditMsg: { auditMsg: {
AuthenticationId: 0, AuthenticationId: '',
AuditState: 2, AuditState: 2,
AuditRemark: '' AuditRemark: ''
}, },
resondialog: false batchmsg:{
AuthenticationIds:'',
AuditState:2,
AuditRemark:'',
},
choiceList:[],
resondialog: false,
resondialog2: false,
}; };
}, },
created() { created() {
...@@ -213,6 +240,58 @@ ...@@ -213,6 +240,58 @@
"首店申请列表.xls" "首店申请列表.xls"
); );
}, },
handleSelectionChange(e){
this.choiceList =[]
e.map(x=>{
this.choiceList.push(x.Id)
})
},
batchadopt(type){
let that = this;
if(that.choiceList.length==0){
that.Error('请选择要审核的首店')
}else{
that.batchmsg.AuthenticationIds = that.choiceList.join(',');
if(type==1){
that.batchmsg.AuditState = 2;
that.batchmsg.AuditRemark = '';
that.Confirm("确定批量审核通过?", function () {
that.BatchAuthenticationAudit()
});
}else if(type==2){
that.resondialog2 = true;
that.batchmsg.AuditState = 3;
that.batchmsg.AuditRemark = '';
}
}
},
BatchAuthenticationAudit(type=0){
if(type==1 && this.batchmsg.AuditRemark==''){
this.Error('请输入拒绝原因');
return;
}
this.apipost(
"/api/Trade/BatchAuthenticationAudit", this.batchmsg,
res => {
if (res.data.resultCode == 1) {
this.Success(res.data.message);
this.getList();
this.resondialog2 = false;
} else {
this.Error(res.data.message);
}
},
);
},
checkSelectable(row){//判断是否可以选择
return row.AuditState==1
},
}, },
mounted() {} mounted() {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment