|
|
|
@ -1,25 +1,10 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="app-container" ref="main">
|
|
|
|
|
<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>
|
|
|
|
|
<MyInput
|
|
|
|
|
v-model="queryParams.certificateName"
|
|
|
|
|
@clickSearch="handleSearch"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
@ -34,7 +19,7 @@
|
|
|
|
|
prop="id"
|
|
|
|
|
width="55"
|
|
|
|
|
/>
|
|
|
|
|
<el-table-column label="证书名称" align="center" prop="certificateId" />
|
|
|
|
|
<el-table-column label="证书名称" align="center" prop="certificateName" />
|
|
|
|
|
<el-table-column label="志愿者" align="center" prop="userName" />
|
|
|
|
|
<el-table-column label="兑换时间" align="center" prop="createTime" />
|
|
|
|
|
<el-table-column label="状态" align="center" prop="status">
|
|
|
|
@ -48,7 +33,9 @@
|
|
|
|
|
class-name="small-padding fixed-width"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button size="mini" type="text">查看</el-button>
|
|
|
|
|
<el-button size="mini" type="text" @click="handleInfo(scope.row)"
|
|
|
|
|
>查看</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
@ -81,7 +68,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="item-lable">证书名称:</div>
|
|
|
|
|
<div class="item-value">{{ form.certificateId }}</div>
|
|
|
|
|
<div class="item-value">{{ form.certificateName }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="item-lable">志愿者:</div>
|
|
|
|
@ -103,40 +90,44 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="item-lable">姓名:</div>
|
|
|
|
|
<div class="item-value"></div>
|
|
|
|
|
<div class="item-value">{{ form.userName }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="item-lable">手机号:</div>
|
|
|
|
|
<div class="item-value"></div>
|
|
|
|
|
<div class="item-value">{{ form.phonenumber }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
<div class="item-lable">详细地址:</div>
|
|
|
|
|
<div class="item-value"></div>
|
|
|
|
|
<div class="item-value">{{ form.address }}</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 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 label="快递公司" prop="courierCompanies">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.courierCompanies"
|
|
|
|
|
placeholder="请输入快递公司"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="快递单号" prop="serviceDuration">
|
|
|
|
|
<el-form-item label="快递单号" prop="trackingNumber">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="form.serviceDuration"
|
|
|
|
|
v-model="form.trackingNumber"
|
|
|
|
|
placeholder="请输入快递公司"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
@ -145,25 +136,100 @@
|
|
|
|
|
<el-button type="primary" @click="submitForm">提 交</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!-- 查看 -->
|
|
|
|
|
<el-dialog :visible.sync="infoShow" width="600px" append-to-body>
|
|
|
|
|
<div slot="title" class="dialog-title">
|
|
|
|
|
<span class="title-line"></span>
|
|
|
|
|
查看
|
|
|
|
|
</div>
|
|
|
|
|
<div class="conversionInfo">
|
|
|
|
|
<div class="basicInfo">
|
|
|
|
|
<div class="title">
|
|
|
|
|
<img src="@/assets/images/huodong.png" alt="" />
|
|
|
|
|
<span>证书详情</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info">
|
|
|
|
|
<div class="lists">
|
|
|
|
|
<div class="list-left">
|
|
|
|
|
<div>证书名称:</div>
|
|
|
|
|
<div>{{ form.certificateName }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="list-right">
|
|
|
|
|
<div>志愿者:</div>
|
|
|
|
|
<div>{{ form.userName }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="lists">
|
|
|
|
|
<div class="list-left">
|
|
|
|
|
<div>兑换时间:</div>
|
|
|
|
|
<div>{{ form.createTime }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="list-left">
|
|
|
|
|
<div>状态:</div>
|
|
|
|
|
<div>{{ form.status == 1 ? "已发放" : "未发放" }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="logisticsInfo" v-show="form.type == 2">
|
|
|
|
|
<div class="title">
|
|
|
|
|
<img src="@/assets/images/huodong.png" alt="" />
|
|
|
|
|
<span>纸制证书</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info">
|
|
|
|
|
<div class="lists">
|
|
|
|
|
<div class="list-left">
|
|
|
|
|
<div>快递公司:</div>
|
|
|
|
|
<div>{{ form.courierCompanies }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="list-right">
|
|
|
|
|
<div>快递单号:</div>
|
|
|
|
|
<div>{{ form.trackingNumber }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="logisticsInfo" v-show="form.type == 1">
|
|
|
|
|
<div class="title">
|
|
|
|
|
<img src="@/assets/images/huodong.png" alt="" />
|
|
|
|
|
<span>电子证书</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { dsbrecordsList } from "@/api/volunteer/gxhzs/hdzsff/index.js";
|
|
|
|
|
import {
|
|
|
|
|
dsbrecordsList,
|
|
|
|
|
dsbrecordsInfo,
|
|
|
|
|
issue,
|
|
|
|
|
} from "@/api/volunteer/gxhzs/hdzsff/index.js";
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
infoShow: false,
|
|
|
|
|
infoOpen: false,
|
|
|
|
|
form: {},
|
|
|
|
|
rules: {},
|
|
|
|
|
rules: {
|
|
|
|
|
courierCompanies: [
|
|
|
|
|
{ required: true, message: "请输入快递公司", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
trackingNumber: [
|
|
|
|
|
{ required: true, message: "请输入快递公司", trigger: "blur" },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
open: false,
|
|
|
|
|
title: "",
|
|
|
|
|
tableHeigth: 0,
|
|
|
|
|
queryParams: {},
|
|
|
|
|
loading: false,
|
|
|
|
|
tableData: [],
|
|
|
|
|
total: 1,
|
|
|
|
|
queryParams: {
|
|
|
|
|
certificateName: undefined,
|
|
|
|
|
creType: 2, //1:一次性证书发放,2:个性化证书发放
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
},
|
|
|
|
@ -178,29 +244,86 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/**纸质提交 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
editData(this.form).then((res) => {
|
|
|
|
|
this.submitElectron();
|
|
|
|
|
});
|
|
|
|
|
/**搜索 */
|
|
|
|
|
handleSearch(keyWord) {
|
|
|
|
|
this.queryParams = {
|
|
|
|
|
certificateName: keyWord,
|
|
|
|
|
creType: 2, //1:一次性证书发放,2:个性化证书发放
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
};
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
/**查详情 */
|
|
|
|
|
async handleInfo(row) {
|
|
|
|
|
let res = await this.getInfo(row.id);
|
|
|
|
|
this.form = res.data;
|
|
|
|
|
this.infoShow = true;
|
|
|
|
|
// console.log("详情", res);
|
|
|
|
|
},
|
|
|
|
|
async getInfo(id) {
|
|
|
|
|
let res = await dsbrecordsInfo(id);
|
|
|
|
|
return res;
|
|
|
|
|
},
|
|
|
|
|
/**纸质 */
|
|
|
|
|
//发放按钮
|
|
|
|
|
async handleFabu(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
let res = await this.getInfo(row.id);
|
|
|
|
|
this.form = res.data;
|
|
|
|
|
this.title = "发放查看";
|
|
|
|
|
this.open = true;
|
|
|
|
|
},
|
|
|
|
|
//点击制造或者电子验证收货信息是否完整
|
|
|
|
|
isComplete() {
|
|
|
|
|
if (!this.form.userName || !this.form.address || !this.form.phonenumber) {
|
|
|
|
|
this.$modal.msgError("请前往地址管理中添加详细地址!");
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/**纸制 */
|
|
|
|
|
submitPaper() {
|
|
|
|
|
this.infoOpen = true;
|
|
|
|
|
let isTrue = this.isComplete();
|
|
|
|
|
if (isTrue) {
|
|
|
|
|
this.infoOpen = true;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
/**电子 */
|
|
|
|
|
submitElectron() {
|
|
|
|
|
let data = {
|
|
|
|
|
activityId: this.form.activityId,
|
|
|
|
|
uid: this.form.uid,
|
|
|
|
|
};
|
|
|
|
|
postElectron(data).then((res) => {
|
|
|
|
|
/**纸制提交 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
|
|
let data = {
|
|
|
|
|
courierCompanies: this.form.courierCompanies,
|
|
|
|
|
id: this.form.id,
|
|
|
|
|
trackingNumber: this.form.trackingNumber,
|
|
|
|
|
type: 2, // 1:电子证书 2:纸制证书
|
|
|
|
|
};
|
|
|
|
|
this.subIssue(data);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//发放
|
|
|
|
|
subIssue(data) {
|
|
|
|
|
issue(data).then((res) => {
|
|
|
|
|
this.infoOpen = false;
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.$modal.msgSuccess("发放成功");
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$modal.msgSuccess("发放成功");
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**电子 */
|
|
|
|
|
submitElectron() {
|
|
|
|
|
let _this = this;
|
|
|
|
|
this.$modal
|
|
|
|
|
.confirm(`您确定要发放“${this.form.certificateName}”证书吗?`)
|
|
|
|
|
.then(function () {
|
|
|
|
|
let data = {
|
|
|
|
|
id: _this.form.id,
|
|
|
|
|
type: 1, // 1:电子证书 2:纸制证书
|
|
|
|
|
};
|
|
|
|
|
_this.subIssue(data);
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/**关闭 */
|
|
|
|
|
cancel() {
|
|
|
|
|
this.open = false;
|
|
|
|
@ -235,18 +358,6 @@ export default {
|
|
|
|
|
this.loading = false;
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
handleFabu(row) {
|
|
|
|
|
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>
|
|
|
|
|