一次行证书

dev
许宏杰 2 years ago
parent 0b2a0d18db
commit c9974b189d

@ -31,6 +31,13 @@
}"
>{{ item.status == 1 ? "已发放" : "未发放" }}</el-button
>
<el-button
type="text"
size="mini"
@click="handleApplyfor(item)"
v-if="item.status != 1 && !item.type"
>申请</el-button
>
<el-button
type="text"
size="mini"
@ -145,6 +152,20 @@
</div>
</div>
</el-dialog>
<!-- 申请 -->
<el-dialog :visible.sync="applyShow" width="350px" append-to-body>
<div slot="title" class="dialog-title">
<span class="title-line"></span>
申请操作
</div>
<el-radio-group v-model="radio">
<el-radio-button :label="1">电子证书</el-radio-button>
<el-radio-button :label="2">纸质证书</el-radio-button>
</el-radio-group>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitElectron"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -153,6 +174,7 @@ import html2canvas from "html2canvas";
import {
dsbrecordsList,
dsbrecordsInfo,
issue,
} from "@/api/volunteer/gxhzs/hdzsff/index.js";
export default {
data() {
@ -161,6 +183,9 @@ export default {
height: 0,
overflowY: "auto",
},
currentRow: {},
radio: 1,
applyShow: false,
infoShow: false,
baseUrl: process.env.VUE_APP_BASE_API,
certificatesList: [],
@ -192,6 +217,46 @@ export default {
});
},
methods: {
/**电子 */
submitElectron() {
//status type
//1 1
//2 2
//1 2
let _this = this;
let title = "";
if (this.radio == 1) {
title = `您确定要申请“${this.currentRow.name}”电子证书吗?`;
} else {
title = `您确定要申请“${this.currentRow.name}”纸质证书吗?`;
}
this.$modal.confirm(title).then(function () {
let data = {
status: _this.radio == 1 ? 1 : 2, //1. 2.
id: _this.currentRow.id,
type: _this.radio, // 1: 2:
};
_this.subIssue(data);
});
this.applyShow = false;
},
//
subIssue(data) {
issue(data).then((res) => {
this.applyShow = false;
this.getList();
if (data.type == 1) {
this.$modal.msgSuccess("发放成功");
} else {
this.$modal.msgSuccess("申请成功");
}
});
},
/**申请操作 */
handleApplyfor(row) {
this.currentRow = row;
this.applyShow = true;
},
/**下载电子证书 */
downloadContentAsImage() {
const content = this.$refs.zs; // <div>DOM

@ -52,7 +52,7 @@
>查看</el-button
>
<el-button
v-if="scope.row.issuanceStatus == false && scope.row.type == null"
v-if="!scope.row.recordsId"
size="mini"
type="text"
@click="handleApplyfor(scope.row)"
@ -264,7 +264,7 @@ export default {
}
this.$modal.confirm(title).then(function () {
let data = {
issuanceStatus: _this.radio == 1 ? true : false,
status: _this.radio,
id: _this.currentRow.id,
type: _this.radio, // 1: 2:
};

@ -383,7 +383,8 @@ export default {
id: this.form.id,
trackingNumber: this.form.trackingNumber,
type: 2, // 1: 2:
issuanceStatus: true,
status: 1,
recordsId: this.form.recordsId,
};
this.subIssue(data);
});

Loading…
Cancel
Save