批量到期权限修改中

This commit is contained in:
caoqianming 2020-12-10 17:48:24 +08:00
parent be2f863aac
commit 76adf5928b
2 changed files with 45 additions and 6 deletions

View File

@ -142,4 +142,11 @@ export function getConsumerPermAll(query) {
method: 'get',
params: query
})
}
export function updateendConsumers(data) {
return request({
url: `/crm/consumer/updateends/`,
method: 'post',
data
})
}

View File

@ -160,14 +160,16 @@
@click="exportConsumer"
v-if="checkPermission(['consumer__export'])"
>导出Excel</el-button>
<el-button-group>
<el-button
type="danger"
icon="el-icon-delete"
round
@click="handleDeletes"
v-if="checkPermission(['consumer__deletes'])"
>批量删除</el-button>
<el-button
@click="handleUpdateends"
v-if="checkPermission(['consumer__updateends'])"
>批量修改到期</el-button>
<!-- <el-button
type="primary"
icon="el-icon-search"
@ -175,7 +177,6 @@
@click="handleCands"
v-if="checkPermission(['consumer__candidates'])"
>批量查证</el-button> -->
</el-button-group>
<el-checkbox
v-model="showCreate"
class="filter-item"
@ -219,11 +220,11 @@
<el-tag v-if="scope.row.workscope_name">{{ scope.row.workscope_name }}</el-tag>
</template>
</el-table-column>
<el-table-column label="证书信息">
<!-- <el-table-column label="证书信息">
<template slot-scope="scope">
<!-- <el-tag v-if="scope.row.workscope_name">{{ scope.row.workscope_name }}</el-tag> -->
<el-tag v-if="scope.row.workscope_name">{{ scope.row.workscope_name }}</el-tag>
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="创建信息" sortable="custom" prop="create_time" v-if="showCreate" >
<template slot-scope="scope">
<span v-if="scope.row.create_admin_">{{ scope.row.create_admin_.username }}/</span>
@ -269,6 +270,17 @@
@pagination="getList"
/>
</el-card>
<el-dialog :visible.sync="dateVisible" title='修改截止期限'>
<el-date-picker
v-model="exceed_date"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd">
</el-date-picker>
<div style="text-align:right;">
<el-button type="primary" @click="confirmupdateend">确认</el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible" :title="dialogType==='edit'?'编辑用户':'新增用户'">
<el-form
:model="consumer"
@ -377,6 +389,7 @@ import {
deleteConsumers,
unbindConsumer,
getConsumerRoleAll,
updateendConsumers
} from "@/api/crm";
import { getSubjectAll } from "@/api/question";
import { getWorkScopeAll } from "@/api/examtest";
@ -412,6 +425,8 @@ export default {
},
data() {
return {
dateVisible:false,
exceed_date:'',
dgVisiable: false,
tableKey: 0,
showCreate: true,
@ -778,6 +793,23 @@ export default {
handleCompanyClick(row, column, event){
this.listQuery.company = row.id
this.getList()
},
handleUpdateends() {
if (this.selects.length) {
this.dateVisible = true
} else {
this.$message({
message: "请先选择",
type: "warning",
});
}
},
confirmupdateend(){
if(this.exceed_date.length()>0){
updateendConsumers({ ids: this.selects,exceed_date:this.exceed_date }).then(res=>{
this.$message.success('成功')
})
}
}
},
};