Commit 293b7c06 by 陈浩建

活动清单批量审核

parent 85dfb431
......@@ -5,7 +5,7 @@ const prefix = '/manager/ciop';
let getList = (params) => postAction(prefix + "/activityRecord/list" , params);
// 审核活动参与记录
let audit = (params) => postAction(prefix + "/activityRecord/auditActivityRecord" , params);
let audit = (params) => postAction(prefix + "/activityRecord/auditActivityRecords" , params);
export {
getList,audit
......
......@@ -130,10 +130,11 @@
import {getList,addActivity,updateActivity,deleteActivity,uploadImg} from "../../../api/school-center/activity/activityAPI"
import {cloneObject} from '@/utils/util';
import { initSubstName} from "../../../api/school-center/userManager/newUserAPI";
import moment from "moment";
export default {
name: "activity",
components: {
STable,
STable,moment
},
data: function () {
return {
......@@ -182,7 +183,15 @@
{dataIndex: 'subclass', width: 200, title: '活动小类', align: "center"},
{dataIndex: 'sort', width: 200, title: '排序号', align: "center"},
{dataIndex: 'creator', width: 200, title: '创建人', align: "center"},
{dataIndex: 'createTime', width: 200, title: '创建时间', align: "center"},
{dataIndex: 'createTime', width: 200, title: '创建时间', align: "center",
customRender: function (text, record, index) {
//text:当前行的值,record: 当前行的数据, index:索引
if (text == null) {
return "";
}
return moment(text).format("YYYY-MM-DD HH:mm:ss");
},
},
{
dataIndex: 'operation',
width: 200,
......
......@@ -51,7 +51,10 @@
<span class="table-page-search-submitButtons" style="float: left; overflow: hidden;">
<a-col :md="6" :sm="24">
<a-button @click="search()" type="primary">查询</a-button>
<a-button @click="search()" type="primary">查询</a-button><a-divider type="vertical"/>
<a-button type="primary" :disabled="hasSelected" :loading="loading" @click="start()">
审核
</a-button>
</a-col>
</span>
</a-row>
......@@ -59,18 +62,22 @@
</div>
<!--列表-->
<s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling">
<s-table :locale="emptyText" :columns="columns" :data="rowdata" bordered ref="table" size="small" class="flex-filling"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }">
<template slot="status" slot-scope="text">
<span v-if="text=='1'">未审核</span>
<span v-if="text=='2'">审核通过</span>
<span v-if="text=='3'">审核不通过</span>
</template>
<template slot="operation" slot-scope="text,record">
<a @click="modifyfunction(record)">审核</a>
<a @click="modifyfunction(record)">查看</a>
</template>
</s-table>
<!--编辑----弹框-->
<a-modal :title="titleName" :visible="modifyvisible" @ok="createfunctionOk" @cancel="createfunctionCancel" html-type="submit" width="840px">
<a-form :form="Formtable">
<a-form-item :labelCol="{span: 6}" :wrapperCol="{span: 8, offset: 1}" label="审核状态">
<a-radio-group v-decorator="['status', {rules: [{ required: true, message: '审核状态不能为空!'}]} ]">
<a-radio value="2">通过</a-radio>
......@@ -95,10 +102,12 @@
import STable from '@/components/table';
import {getList,audit} from "../../../api/school-center/activityRecordAPI"
import {cloneObject} from '@/utils/util';
import moment from "moment";
import {queryById, update} from "../../../api/school-center/uploadVerify/studentCardVerifyAPI";
export default {
name: "activityRecord",
components: {
STable,
STable,moment
},
data: function () {
return {
......@@ -137,12 +146,20 @@
{dataIndex: 'activityType', width: 200, title: '活动类型', align: "center"},
{dataIndex: 'subclass', width: 200, title: '活动小类', align: "center"},
{dataIndex: 'integral', width: 200, title: '活动积分', align: "center"},
{dataIndex: 'status', width: 200, title: '审核状态', align: "center"},
{dataIndex: 'status', width: 200, title: '审核状态', align: "center", scopedSlots: {customRender: "status"}},
{dataIndex: 'remark', width: 200, title: '审核备注', align: "center"},
{dataIndex: 'recordIntegral', width: 200, title: '所得积分', align: "center"},
{dataIndex: 'creator', width: 200, title: '参与者', align: "center"},
{dataIndex: 'message', width: 200, title: '活动留言', align: "center"},
{dataIndex: 'createTime', width: 200, title: '参与时间', align: "center"},
{dataIndex: 'createTime', width: 200, title: '参与时间', align: "center",
customRender: function (text, record, index) {
//text:当前行的值,record: 当前行的数据, index:索引
if (text == null) {
return "";
}
return moment(text).format("YYYY-MM-DD HH:mm:ss");
},
},
{dataIndex: 'isRepeal', width: 200, title: '是否重复参与', align: "center"},
{
dataIndex: 'operation',
......@@ -151,7 +168,8 @@
align: "center",
scopedSlots: {customRender: 'operation'},
fixed: "right"
}]
},
]
,
rowdata: parameter => {
let params = {
......@@ -184,7 +202,9 @@
}
return data
})
}
},
selectedRowKeys: [],
hasSelected: true,
}
},
methods:{
......@@ -195,29 +215,36 @@
this.$refs.table.refresh({search: true})
},
modifyfunction(data){
//初始化
this.titleName="审核"
alert(data.id);
this.modifyForm.id = data.id
this.modifyvisible=true;
console.log(data);
},
//提交表单
createfunctionOk(){
this.Formtable.validateFields(['status', "integral","remark"], {force: true}, (err, values)=>{
if (!err){
let params = {
ids: this.selectedRowKeys
}
//表示
this.modifyForm.status=values.status
this.modifyForm.remark=values.remark
this.modifyForm.integral=values.integral
//表示
let obj = cloneObject(this.modifyForm)
//修改数据
audit(this.modifyForm).then(res=>{
audit(Object.assign(params, obj)).then(res=>{
if (res.state=="success") {
this.$message.success(res.data ? res.data : '审核成功!', 5);
this.search();
this.modifyvisible=false
setTimeout(() => {
this.loading = false;
this.selectedRowKeys = [];
}, 1000);
this.hasSelected = true;
this.modifyvisible=false
this.$message.success(res.data ? res.data : '审核成功!', 5);
this.search();
return null;
}
this.$message.error(res.data ? res.data : '审核失败!', 5);
})
}
})
......@@ -230,7 +257,29 @@
})
this.modifyForm.id=""
this.modifyvisible=false;
}
},
start() {
this.Formtable.setFieldsValue({
status: '',
remark: '',
integral: ''
});
if(this.selectedRowKeys.length == 0){
this.$message.error("请勾选审核项!!!", 5);
return;
}
//初始化
this.titleName="审核"
this.modifyvisible=true;
},
onSelectChange(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys;
if(this.selectedRowKeys.length > 0){
this.hasSelected = false;
}else{
this.hasSelected = true;
}
},
}
}
</script>
......
......@@ -258,7 +258,7 @@
{dataIndex: 'idCard', width: 100, title: '身份证'},
{dataIndex: 'uploadDate', width: 100, title: '上传时间', scopedSlots: {customRender: "uploadDate"}},
{dataIndex: 'isFirstUpload', width: 100, title: '是否首次上传', ellipsis: true, scopedSlots: {customRender: "isFirstUpload"}},
{ dataIndex: 'auditState',width: 100,title: '是否通过审核',ellipsis: true,scopedSlots: {customRender: "auditState"}},
{dataIndex: 'auditState',width: 100,title: '是否通过审核',ellipsis: true,scopedSlots: {customRender: "auditState"}},
{dataIndex: 'auditName', width: 100, title: '审核人姓名'},
{dataIndex: 'studentCardUrl', width: 180, title: '学生证封面照片', scopedSlots: {customRender: "studentCardUrl"}},
{dataIndex: 'otherImgUrl1', width: 180, title: '学生证内页照片', scopedSlots: {customRender: "otherImgUrl1"}},
......
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