个性化活动对话

dev
许宏杰 2 years ago
parent c9974b189d
commit e9fd59ce78

@ -26,10 +26,15 @@
<template slot-scope="scope"> <template slot-scope="scope">
<span <span
:style="{ :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> </span>
</template> </template>
</el-table-column> </el-table-column>
@ -87,7 +92,7 @@
<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.status == 1 ? "已发放" : "未发放" }} {{ filterIissuanceStatus(form) }}
</div> </div>
</div> </div>
<div class="info-form-title"> <div class="info-form-title">
@ -113,9 +118,9 @@
<el-button type="warning" @click="submitPaper()" <el-button type="warning" @click="submitPaper()"
>发放纸制证书</el-button >发放纸制证书</el-button
> >
<el-button type="primary" @click="submitElectron()" <!-- <el-button type="primary" @click="submitElectron()"
>发放电子证书</el-button >发放电子证书</el-button
> > -->
</div> </div>
</el-dialog> </el-dialog>
<!-- 纸制证书 --> <!-- 纸制证书 -->
@ -172,7 +177,7 @@
</div> </div>
<div class="list-left"> <div class="list-left">
<div>状态</div> <div>状态</div>
<div>{{ form.status == 1 ? "已发放" : "未发放" }}</div> <div>{{ filterIissuanceStatus(form) }}</div>
</div> </div>
</div> </div>
</div> </div>
@ -283,6 +288,19 @@ export default {
}); });
}, },
methods: { 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() { downloadContentAsImage() {
const content = this.$refs.zs; // <div>DOM const content = this.$refs.zs; // <div>DOM
@ -349,6 +367,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
let data = { let data = {
status: 1,
courierCompanies: this.form.courierCompanies, courierCompanies: this.form.courierCompanies,
id: this.form.id, id: this.form.id,
trackingNumber: this.form.trackingNumber, trackingNumber: this.form.trackingNumber,

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

Loading…
Cancel
Save