证书修复

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

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

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

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

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

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

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

@ -34,12 +34,12 @@
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">
<el-table-column label="活动名称" align="center" prop="name" />
<el-table-column label="志愿者" align="center" prop="userName" />
<el-table-column label="活动参与时间" align="center" prop="uid" />
<el-table-column label="状态" align="center" prop="issuanceStatus">
<template slot-scope="scope">
{{ scope.row.type == 1 ? "已发放" : "未发放" }}
{{ scope.row.issuanceStatus == 1 ? "已发放" : "未发放" }}
</template>
</el-table-column>
<el-table-column
@ -49,7 +49,14 @@
>
<template slot-scope="scope">
<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>
</el-table-column>
@ -70,8 +77,12 @@
</div>
<div class="info-box">
<div>
<div class="info-form-title">
<span></span>
活动信息
</div>
<div class="info-item">
<div class="item-lable">证书:</div>
<div class="item-lable">活动名称:</div>
<div class="item-value">{{ form.certificateId }}</div>
</div>
<div class="info-item">
@ -79,7 +90,7 @@
<div class="item-value">{{ form.uid }}</div>
</div>
<div class="info-item">
<div class="item-lable">兑换时间:</div>
<div class="item-lable">活动参与时间:</div>
<div class="item-value">{{ form.uid }}</div>
</div>
<div class="info-item">
@ -88,6 +99,10 @@
{{ form.type == 1 ? "已发放" : "未发放" }}
</div>
</div>
<div class="info-form-title">
<span></span>
收货信息
</div>
<div class="info-item">
<div class="item-lable">姓名:</div>
<div class="item-value"></div>
@ -231,30 +246,34 @@ export default {
handleFabu(row) {
this.reset();
let id = row.id;
getInfo(id).then((res) => {
this.form = res.data;
this.title = "发放查看";
this.open = true;
});
// 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;
// }
// }
// }
.info-form-title {
display: flex;
align-items: center;
margin-bottom: 20px;
font-size: 17px;
font-family: "Alibaba-PuHuiTi-Regular";
font-weight: 500;
color: #333;
font-weight: bold;
span {
width: 5px;
height: 17px;
margin-right: 6px;
background: #f8414d;
}
}
</style>

Loading…
Cancel
Save