|
|
|
@ -1,33 +1,59 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="app-container" ref="main">
|
|
|
|
|
<div class="search" ref="search">
|
|
|
|
|
<MyInput v-model="queryParams.name" @clickSearch="handleSearch" />
|
|
|
|
|
<div ref="search">
|
|
|
|
|
<el-form
|
|
|
|
|
:model="queryParams"
|
|
|
|
|
ref="queryForm"
|
|
|
|
|
size="small"
|
|
|
|
|
:inline="true"
|
|
|
|
|
class="search-container"
|
|
|
|
|
>
|
|
|
|
|
<el-form-item prop="name">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.input"
|
|
|
|
|
placeholder="请输入关键字"
|
|
|
|
|
clearable
|
|
|
|
|
>
|
|
|
|
|
<div class="search-btn" slot="append">
|
|
|
|
|
<i class="el-icon-search"></i>
|
|
|
|
|
</div>
|
|
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<ul class="book-main" :style="listStyle">
|
|
|
|
|
<li
|
|
|
|
|
v-for="(item, index) in certificatesList"
|
|
|
|
|
:key="item.id"
|
|
|
|
|
:style="{ marginBottom: isLastRow(index) ? '0px' : '' }"
|
|
|
|
|
<el-table
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
:data="tableData"
|
|
|
|
|
:height="tableHeigth + 'px'"
|
|
|
|
|
>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="序号"
|
|
|
|
|
align="center"
|
|
|
|
|
type="index"
|
|
|
|
|
prop="id"
|
|
|
|
|
width="55"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column label="证书" align="center" prop="certificateId" />
|
|
|
|
|
<el-table-column label="志愿者" align="center" prop="uid" />
|
|
|
|
|
<el-table-column label="兑换时间" align="center" prop="uid" />
|
|
|
|
|
<el-table-column label="状态" align="center" prop="type">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
{{ scope.row.type == 1 ? "已发放" : "未发放" }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
label="操作"
|
|
|
|
|
align="center"
|
|
|
|
|
class-name="small-padding fixed-width"
|
|
|
|
|
>
|
|
|
|
|
<div class="integral-num">积分:50</div>
|
|
|
|
|
<el-image
|
|
|
|
|
style="width: 100%; height: 87%"
|
|
|
|
|
:src="baseUrl + item.cover"
|
|
|
|
|
fit="fill"
|
|
|
|
|
:preview-src-list="[`${baseUrl + item.cover}`]"
|
|
|
|
|
>
|
|
|
|
|
</el-image>
|
|
|
|
|
<div class="operate">
|
|
|
|
|
<div class="integral">
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="operate-child">
|
|
|
|
|
<div class="exchange-btn" @click="conversion(item)">兑 换</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button size="mini" type="text" @click="handleFabu(scope.row)"
|
|
|
|
|
>发布</el-button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="total > 0"
|
|
|
|
|
:total="total"
|
|
|
|
@ -35,82 +61,152 @@
|
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<!-- 发布对话框 -->
|
|
|
|
|
<el-dialog :visible.sync="open" width="500px" append-to-body>
|
|
|
|
|
<div slot="title" class="dialog-title">
|
|
|
|
|
<span class="title-line"></span>
|
|
|
|
|
{{ title }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-box">
|
|
|
|
|
<div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="item-lable">证书:</div>
|
|
|
|
|
<div class="item-value">{{ form.certificateId }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="item-lable">志愿者:</div>
|
|
|
|
|
<div class="item-value">{{ form.uid }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="item-lable">兑换时间:</div>
|
|
|
|
|
<div class="item-value">{{ form.uid }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="item-lable">状态:</div>
|
|
|
|
|
<div class="item-value">
|
|
|
|
|
{{ form.type == 1 ? "已发放" : "未发放" }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="item-lable">姓名:</div>
|
|
|
|
|
<div class="item-value"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="item-lable">手机号:</div>
|
|
|
|
|
<div class="item-value"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="item-lable">详细地址:</div>
|
|
|
|
|
<div class="item-value"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="cancel">关 闭</el-button>
|
|
|
|
|
<el-button type="warning" @click="submitPaper">发放纸质证书</el-button>
|
|
|
|
|
<el-button type="primary" @click="submitElectron"
|
|
|
|
|
>发放电子证书</el-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!-- 纸质证书 -->
|
|
|
|
|
<el-dialog :visible.sync="infoOpen" width="500px" append-to-body>
|
|
|
|
|
<div slot="title" class="dialog-title">
|
|
|
|
|
<span class="title-line"></span>
|
|
|
|
|
邮政信息
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <Editor v-model="form.content" :min-height="192" /> -->
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
<el-form-item label="快递公司" prop="name">
|
|
|
|
|
<el-input v-model="form.name" placeholder="请输入快递公司" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="快递单号" prop="serviceDuration">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.serviceDuration"
|
|
|
|
|
placeholder="请输入快递公司"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitForm">提 交</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { listCertificates } from "@/api/volunteer/gxhzs/gxhzsgl/index.js";
|
|
|
|
|
import {
|
|
|
|
|
getSellectall,
|
|
|
|
|
postElectron,
|
|
|
|
|
getInfo,
|
|
|
|
|
editData,
|
|
|
|
|
} from "@/api/volunteer/gxhzs/hdzsff/index.js";
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
listStyle: {
|
|
|
|
|
height: 0,
|
|
|
|
|
overflowY: "auto",
|
|
|
|
|
},
|
|
|
|
|
baseUrl: process.env.VUE_APP_BASE_API,
|
|
|
|
|
certificatesList: [],
|
|
|
|
|
infoOpen: false,
|
|
|
|
|
form: {},
|
|
|
|
|
rules: {},
|
|
|
|
|
open: false,
|
|
|
|
|
title: "",
|
|
|
|
|
tableHeigth: 0,
|
|
|
|
|
queryParams: {},
|
|
|
|
|
loading: false,
|
|
|
|
|
tableData: [],
|
|
|
|
|
total: 0,
|
|
|
|
|
total: 1,
|
|
|
|
|
queryParams: {
|
|
|
|
|
name: undefined,
|
|
|
|
|
creType: 2,
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
},
|
|
|
|
|
form: {},
|
|
|
|
|
rules: {},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
// //给表格一个固定值
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.listStyle.height =
|
|
|
|
|
this.$refs.main.offsetHeight -
|
|
|
|
|
40 -
|
|
|
|
|
this.$refs.search.offsetHeight -
|
|
|
|
|
42 +
|
|
|
|
|
"px";
|
|
|
|
|
this.tableHeigth =
|
|
|
|
|
this.$refs.main.offsetHeight - this.$refs.search.offsetHeight - 75;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
isLastRow(index) {
|
|
|
|
|
const rowCount = Math.ceil(this.certificatesList.length / 5);
|
|
|
|
|
const row = Math.floor(index / 5);
|
|
|
|
|
return row === rowCount - 1;
|
|
|
|
|
/**纸质提交 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
editData(this.form).then((res) => {
|
|
|
|
|
this.submitElectron();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/**兑换 */
|
|
|
|
|
conversion(item) {
|
|
|
|
|
console.log(item);
|
|
|
|
|
/**纸质 */
|
|
|
|
|
submitPaper() {
|
|
|
|
|
this.infoOpen = true;
|
|
|
|
|
},
|
|
|
|
|
/**搜索 */
|
|
|
|
|
handleSearch(keyWord) {
|
|
|
|
|
this.queryParams = {
|
|
|
|
|
name: keyWord,
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
/**电子 */
|
|
|
|
|
submitElectron() {
|
|
|
|
|
let data = {
|
|
|
|
|
activityId: this.form.activityId,
|
|
|
|
|
uid: this.form.uid,
|
|
|
|
|
};
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
/** 查询证书管理列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
listCertificates(this.queryParams).then((response) => {
|
|
|
|
|
this.certificatesList = response.rows;
|
|
|
|
|
this.total = response.total;
|
|
|
|
|
this.loading = false;
|
|
|
|
|
postElectron(data).then((res) => {
|
|
|
|
|
this.infoOpen = false;
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.$modal.msgSuccess("发放成功");
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 表单重置
|
|
|
|
|
/**关闭 */
|
|
|
|
|
cancel() {
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.reset();
|
|
|
|
|
},
|
|
|
|
|
/**重置 */
|
|
|
|
|
reset() {
|
|
|
|
|
this.form = {
|
|
|
|
|
id: null,
|
|
|
|
|
name: null,
|
|
|
|
|
type: null,
|
|
|
|
|
cover: null,
|
|
|
|
|
activityId: null,
|
|
|
|
|
certificateId: null,
|
|
|
|
|
uId: null,
|
|
|
|
|
content: null,
|
|
|
|
|
datetime: null,
|
|
|
|
|
serviceDuration: null,
|
|
|
|
|
createId: null,
|
|
|
|
|
createBy: null,
|
|
|
|
|
createTime: null,
|
|
|
|
@ -120,17 +216,45 @@ export default {
|
|
|
|
|
remark: null,
|
|
|
|
|
userId: null,
|
|
|
|
|
deptId: null,
|
|
|
|
|
type: null,
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
},
|
|
|
|
|
// 取消按钮
|
|
|
|
|
cancel() {
|
|
|
|
|
this.open = false;
|
|
|
|
|
/** 查询发放记录列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
getSellectall(this.queryParams).then((response) => {
|
|
|
|
|
this.tableData = response.data.list;
|
|
|
|
|
this.total = response.data.total;
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleFabu(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
let id = row.id;
|
|
|
|
|
getInfo(id).then((res) => {
|
|
|
|
|
this.form = res.data;
|
|
|
|
|
this.title = "发放查看";
|
|
|
|
|
this.open = true;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
@import "@/assets/styles/myTable.scss";
|
|
|
|
|
// ::v-deep .search-container {
|
|
|
|
|
// .el-form-item__content {
|
|
|
|
|
// width: 550px;
|
|
|
|
|
// }
|
|
|
|
|
// .el-input-group__append {
|
|
|
|
|
// padding-left: 15px !important;
|
|
|
|
|
// padding-right: 15px !important;
|
|
|
|
|
// background: #f8414d !important;
|
|
|
|
|
// border-color: #f8414d !important;
|
|
|
|
|
// .search-btn {
|
|
|
|
|
// color: #fff !important;
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
</style>
|
|
|
|
|