证书修复

lijinlong
许宏杰 2 years ago
parent 1415c5df6a
commit 8dcb3ca748

@ -30,3 +30,12 @@ export function editData(data) {
data, data,
}); });
} }
//获取个性化证书发放列表
export function dsbrecordsList(query) {
return request({
url: "/zhiyuanzhe/dsbrecords/list",
method: "get",
params: query,
});
}

@ -136,3 +136,9 @@
top: 20px; top: 20px;
} }
} }
.noData {
display: flex;
align-items: center;
justify-content: center;
}

@ -1,63 +1,25 @@
<template> <template>
<div class="app-container" ref="main"> <div class="app-container">
<div ref="search"> <el-form
<el-button ref="form"
style="margin-bottom: 15px" :model="form"
type="primary" :rules="rules"
size="small" label-width="80px"
@click="handleAdd" class="user-address"
>新增</el-button >
> <el-form-item label="姓名" prop="name">
</div> <el-input v-model="form.name"></el-input>
</el-form-item>
<el-table v-loading="loading" :data="tableData"> <el-form-item label="手机号" prop="name">
<el-table-column label="用户名称" align="center" prop="certificateId" /> <el-input v-model="form.name"></el-input>
<el-table-column label="手机号码" align="center" prop="uid" /> </el-form-item>
<el-table-column label="用户邮箱" align="center" prop="uid" /> <el-form-item label="详细地址" prop="name">
<el-table-column label="收货地址" align="center" prop="uid" /> <el-input v-model="form.name" type="textarea" :rows="3"></el-input>
<el-table-column </el-form-item>
label="操作" <el-form-item>
align="center" <el-button type="primary"> </el-button>
class-name="small-padding fixed-width" </el-form-item>
> </el-form>
<template slot-scope="scope">
<el-button size="mini" type="text" @click="handleFabu(scope.row)"
>编辑</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 发布对话框 -->
<el-dialog :visible.sync="open" width="500px" append-to-body>
<div slot="title" class="dialog-title">
<span class="title-line"></span>
{{ title }}
</div>
<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-item label="用户邮箱" prop="cover">
<el-input v-model="form.name" placeholder="请输入用户邮箱" />
</el-form-item>
<el-form-item label="收货地址" prop="cover">
<el-input
v-model="form.name"
type="textarea"
placeholder="请输入收货地址"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleSub"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -65,48 +27,24 @@
export default { export default {
data() { data() {
return { return {
total: 0,
queryParams: {},
loading: false,
tableData: [{}],
tableHeigth: 0,
form: {}, form: {},
rules: {}, rules: {},
open: false,
title: "",
}; };
}, },
created() {}, methods: {},
methods: {
handleAdd() {
this.title = "新增";
this.open = true;
},
getList() {},
handleFabu() {
this.title = "编辑";
this.open = true;
},
handleSub() {},
},
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/assets/styles/myTable.scss"; .app-container {
display: flex;
align-items: center;
justify-content: center;
}
// ::v-deep .search-container { .user-address {
// .el-form-item__content { padding: 30px 15px 0 15px;
// width: 550px; width: 500px;
// } box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
// .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> </style>

@ -4,7 +4,7 @@
<MyInput v-model="queryParams.name" @clickSearch="handleSearch" /> <MyInput v-model="queryParams.name" @clickSearch="handleSearch" />
</div> </div>
<ul class="book-main" :style="listStyle"> <ul class="book-main" :style="listStyle" v-if="certificatesList.length > 0">
<li <li
v-for="(item, index) in certificatesList" v-for="(item, index) in certificatesList"
:key="item.id" :key="item.id"
@ -27,6 +27,9 @@
</div> </div>
</li> </li>
</ul> </ul>
<div v-if="certificatesList.length == 0" :style="listStyle" class="noData">
<el-empty description="暂无证书"></el-empty>
</div>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"

@ -34,12 +34,12 @@
prop="id" prop="id"
width="55" width="55"
/> />
<el-table-column label="证书" align="center" prop="certificateId" /> <el-table-column label="证书名称" align="center" prop="certificateId" />
<el-table-column label="志愿者" align="center" prop="uid" /> <el-table-column label="志愿者" align="center" prop="userName" />
<el-table-column label="兑换时间" align="center" prop="uid" /> <el-table-column label="兑换时间" align="center" prop="createTime" />
<el-table-column label="状态" align="center" prop="type"> <el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.type == 1 ? "已发放" : "未发放" }} {{ scope.row.status == 1 ? "已发放" : "未发放" }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -48,8 +48,13 @@
class-name="small-padding fixed-width" class-name="small-padding fixed-width"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="handleFabu(scope.row)" <el-button size="mini" type="text">查看</el-button>
>发布</el-button <el-button
size="mini"
type="text"
@click="handleFabu(scope.row)"
v-if="scope.row.status != 1"
>发放</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
@ -70,24 +75,32 @@
</div> </div>
<div class="info-box"> <div class="info-box">
<div> <div>
<div class="info-form-title">
<span></span>
证书信息
</div>
<div class="info-item"> <div class="info-item">
<div class="item-lable">证书:</div> <div class="item-lable">证书名称:</div>
<div class="item-value">{{ form.certificateId }}</div> <div class="item-value">{{ form.certificateId }}</div>
</div> </div>
<div class="info-item"> <div class="info-item">
<div class="item-lable">志愿者:</div> <div class="item-lable">志愿者:</div>
<div class="item-value">{{ form.uid }}</div> <div class="item-value">{{ form.userName }}</div>
</div> </div>
<div class="info-item"> <div class="info-item">
<div class="item-lable">兑换时间:</div> <div class="item-lable">兑换时间:</div>
<div class="item-value">{{ form.uid }}</div> <div class="item-value">{{ form.createTime }}</div>
</div> </div>
<div class="info-item"> <div class="info-item">
<div class="item-lable">状态:</div> <div class="item-lable">状态:</div>
<div class="item-value"> <div class="item-value">
{{ form.type == 1 ? "已发放" : "未发放" }} {{ form.status == 1 ? "已发放" : "未发放" }}
</div> </div>
</div> </div>
<div class="info-form-title">
<span></span>
收货信息
</div>
<div class="info-item"> <div class="info-item">
<div class="item-lable">姓名:</div> <div class="item-lable">姓名:</div>
<div class="item-value"></div> <div class="item-value"></div>
@ -136,12 +149,7 @@
</template> </template>
<script> <script>
import { import { dsbrecordsList } from "@/api/volunteer/gxhzs/hdzsff/index.js";
getSellectall,
postElectron,
getInfo,
editData,
} from "@/api/volunteer/gxhzs/hdzsff/index.js";
export default { export default {
data() { data() {
return { return {
@ -156,7 +164,6 @@ export default {
tableData: [], tableData: [],
total: 1, total: 1,
queryParams: { queryParams: {
creType: 2,
pageNum: 1, pageNum: 1,
pageSize: 20, pageSize: 20,
}, },
@ -166,7 +173,7 @@ export default {
// // // //
this.$nextTick(() => { this.$nextTick(() => {
this.tableHeigth = this.tableHeigth =
this.$refs.main.offsetHeight - this.$refs.search.offsetHeight - 75; this.$refs.main.offsetHeight - this.$refs.search.offsetHeight - 80;
this.getList(); this.getList();
}); });
}, },
@ -222,39 +229,43 @@ export default {
/** 查询发放记录列表 */ /** 查询发放记录列表 */
getList() { getList() {
this.loading = true; this.loading = true;
getSellectall(this.queryParams).then((response) => { dsbrecordsList(this.queryParams).then((response) => {
this.tableData = response.data.list; this.tableData = response.rows;
this.total = response.data.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
}, },
handleFabu(row) { handleFabu(row) {
this.reset(); this.title = "发放查看";
let id = row.id; this.open = true;
getInfo(id).then((res) => { // this.reset();
this.form = res.data; // let id = row.id;
this.title = "发放查看"; // getInfo(id).then((res) => {
this.open = true; // this.form = res.data;
}); // this.title = "";
// this.open = true;
// });
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/assets/styles/myTable.scss"; @import "@/assets/styles/myTable.scss";
// ::v-deep .search-container { .info-form-title {
// .el-form-item__content { display: flex;
// width: 550px; align-items: center;
// } margin-bottom: 20px;
// .el-input-group__append { font-size: 17px;
// padding-left: 15px !important; font-family: "Alibaba-PuHuiTi-Regular";
// padding-right: 15px !important; font-weight: 500;
// background: #f8414d !important; color: #333;
// border-color: #f8414d !important; font-weight: bold;
// .search-btn { span {
// color: #fff !important; width: 5px;
// } height: 17px;
// } margin-right: 6px;
// } background: #f8414d;
}
}
</style> </style>

@ -5,7 +5,7 @@
<el-button type="primary" size="small" @click="handleAdd"></el-button> <el-button type="primary" size="small" @click="handleAdd"></el-button>
</div> </div>
<ul class="book-main" :style="listStyle"> <ul class="book-main" :style="listStyle" v-if="certificatesList.length > 0">
<li <li
v-for="(item, index) in certificatesList" v-for="(item, index) in certificatesList"
:key="item.id" :key="item.id"
@ -50,6 +50,9 @@
</div> </div>
</li> </li>
</ul> </ul>
<div v-if="certificatesList.length == 0" :style="listStyle" class="noData">
<el-empty description="暂无证书"></el-empty>
</div>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"

@ -34,12 +34,12 @@
prop="id" prop="id"
width="55" width="55"
/> />
<el-table-column label="证书" align="center" prop="certificateId" /> <el-table-column label="活动名称" align="center" prop="name" />
<el-table-column label="志愿者" align="center" prop="uid" /> <el-table-column label="志愿者" align="center" prop="userName" />
<el-table-column label="兑换时间" align="center" prop="uid" /> <el-table-column label="活动参与时间" align="center" prop="uid" />
<el-table-column label="状态" align="center" prop="type"> <el-table-column label="状态" align="center" prop="issuanceStatus">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.type == 1 ? "已发放" : "未发放" }} {{ scope.row.issuanceStatus == 1 ? "已发放" : "未发放" }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -49,7 +49,14 @@
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" type="text" @click="handleFabu(scope.row)" <el-button size="mini" type="text" @click="handleFabu(scope.row)"
>发布</el-button >查看</el-button
>
<el-button
v-if="scope.row.issuanceStatus != 1"
size="mini"
type="text"
@click="handleFabu(scope.row)"
>发放</el-button
> >
</template> </template>
</el-table-column> </el-table-column>
@ -70,8 +77,12 @@
</div> </div>
<div class="info-box"> <div class="info-box">
<div> <div>
<div class="info-form-title">
<span></span>
活动信息
</div>
<div class="info-item"> <div class="info-item">
<div class="item-lable">证书:</div> <div class="item-lable">活动名称:</div>
<div class="item-value">{{ form.certificateId }}</div> <div class="item-value">{{ form.certificateId }}</div>
</div> </div>
<div class="info-item"> <div class="info-item">
@ -79,7 +90,7 @@
<div class="item-value">{{ form.uid }}</div> <div class="item-value">{{ form.uid }}</div>
</div> </div>
<div class="info-item"> <div class="info-item">
<div class="item-lable">兑换时间:</div> <div class="item-lable">活动参与时间:</div>
<div class="item-value">{{ form.uid }}</div> <div class="item-value">{{ form.uid }}</div>
</div> </div>
<div class="info-item"> <div class="info-item">
@ -88,6 +99,10 @@
{{ form.type == 1 ? "已发放" : "未发放" }} {{ form.type == 1 ? "已发放" : "未发放" }}
</div> </div>
</div> </div>
<div class="info-form-title">
<span></span>
收货信息
</div>
<div class="info-item"> <div class="info-item">
<div class="item-lable">姓名:</div> <div class="item-lable">姓名:</div>
<div class="item-value"></div> <div class="item-value"></div>
@ -231,30 +246,34 @@ export default {
handleFabu(row) { handleFabu(row) {
this.reset(); this.reset();
let id = row.id; this.title = "发放查看";
getInfo(id).then((res) => { this.open = true;
this.form = res.data; // let id = row.id;
this.title = "发放查看"; // getInfo(id).then((res) => {
this.open = true; // this.form = res.data;
}); // this.title = "";
// this.open = true;
// });
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import "@/assets/styles/myTable.scss"; @import "@/assets/styles/myTable.scss";
// ::v-deep .search-container { .info-form-title {
// .el-form-item__content { display: flex;
// width: 550px; align-items: center;
// } margin-bottom: 20px;
// .el-input-group__append { font-size: 17px;
// padding-left: 15px !important; font-family: "Alibaba-PuHuiTi-Regular";
// padding-right: 15px !important; font-weight: 500;
// background: #f8414d !important; color: #333;
// border-color: #f8414d !important; font-weight: bold;
// .search-btn { span {
// color: #fff !important; width: 5px;
// } height: 17px;
// } margin-right: 6px;
// } background: #f8414d;
}
}
</style> </style>

Loading…
Cancel
Save