个性化活动对话

dev
许宏杰 2 years ago
parent c9974b189d
commit e9fd59ce78

@ -26,10 +26,15 @@
<template slot-scope="scope">
<span
:style="{
color: scope.row.status == 1 ? '#67C23A' : '#F56C6C',
color:
scope.row.status == 1
? '#67C23A'
: scope.row.status == 2 && scope.row.type == 2
? '#E6A23C'
: '#F56C6C',
}"
>
{{ scope.row.status == 1 ? "已发放" : "未发放" }}
{{ filterIissuanceStatus(scope.row) }}
</span>
</template>
</el-table-column>
@ -87,7 +92,7 @@
<div class="info-item">
<div class="item-lable">状态:</div>
<div class="item-value">
{{ form.status == 1 ? "已发放" : "未发放" }}
{{ filterIissuanceStatus(form) }}
</div>
</div>
<div class="info-form-title">
@ -113,9 +118,9 @@
<el-button type="warning" @click="submitPaper()"
>发放纸制证书</el-button
>
<el-button type="primary" @click="submitElectron()"
<!-- <el-button type="primary" @click="submitElectron()"
>发放电子证书</el-button
>
> -->
</div>
</el-dialog>
<!-- 纸制证书 -->
@ -172,7 +177,7 @@
</div>
<div class="list-left">
<div>状态</div>
<div>{{ form.status == 1 ? "已发放" : "未发放" }}</div>
<div>{{ filterIissuanceStatus(form) }}</div>
</div>
</div>
</div>
@ -283,6 +288,19 @@ export default {
});
},
methods: {
/**状态过滤 */
filterIissuanceStatus(row) {
if (row.status == 2 && !row.type) {
return "未发放";
} else if (
(row.status == 1 && row.type == 1) ||
(row.status == 1 && row.type == 2)
) {
return "已发放";
} else if (row.status == 2 && row.type == 2) {
return "已申请";
}
},
/**下载电子证书 */
downloadContentAsImage() {
const content = this.$refs.zs; // <div>DOM
@ -349,6 +367,7 @@ export default {
submitForm() {
this.$refs["form"].validate((valid) => {
let data = {
status: 1,
courierCompanies: this.form.courierCompanies,
id: this.form.id,
trackingNumber: this.form.trackingNumber,

@ -27,9 +27,14 @@
type="text"
size="mini"
:style="{
color: item.status == 1 ? '#67C23A' : '#F56C6C',
color:
item.status == 1
? '#67C23A'
: item.status == 2 && item.type == 2
? '#E6A23C'
: '#F56C6C',
}"
>{{ item.status == 1 ? "已发放" : "未发放" }}</el-button
>{{ filterIissuanceStatus(item) }}</el-button
>
<el-button
type="text"
@ -89,7 +94,7 @@
</div>
<div class="list-left">
<div>状态</div>
<div>{{ form.status == 1 ? "已发放" : "未发放" }}</div>
<div>{{ filterIissuanceStatus(form) }}</div>
</div>
</div>
</div>
@ -217,6 +222,19 @@ export default {
});
},
methods: {
/**状态过滤 */
filterIissuanceStatus(row) {
if (row.status == 2 && !row.type) {
return "未发放";
} else if (
(row.status == 1 && row.type == 1) ||
(row.status == 1 && row.type == 2)
) {
return "已发放";
} else if (row.status == 2 && row.type == 2) {
return "已申请";
}
},
/**电子 */
submitElectron() {
//status type
@ -226,13 +244,13 @@ export default {
let _this = this;
let title = "";
if (this.radio == 1) {
title = `您确定要申请“${this.currentRow.name}”电子证书吗?`;
title = `您确定要申请“${this.currentRow.certificateName}”电子证书吗?`;
} else {
title = `您确定要申请“${this.currentRow.name}”纸质证书吗?`;
title = `您确定要申请“${this.currentRow.certificateName}”纸质证书吗?`;
}
this.$modal.confirm(title).then(function () {
let data = {
status: _this.radio == 1 ? 1 : 2, //1. 2.
status: _this.radio, //1. 2.
id: _this.currentRow.id,
type: _this.radio, // 1: 2:
};

Loading…
Cancel
Save