<template>
|
<view class="success-page">
|
<view class="result-block">
|
<view class="result-icon-wrap">
|
<image class="result-icon" src="/shop/static/icon/ic_paysu1ccess@2x.png" mode="widthFix"></image>
|
</view>
|
<view class="result-title">开票成功</view>
|
</view>
|
|
<view class="info-card">
|
<view v-for="item in displayFields" :key="item.label" class="info-row">
|
<text class="info-label">{{ item.label }}</text>
|
<text class="info-value" :class="item.valueClass || ''">{{ item.value }}</text>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
titleType: 'company',
|
successIcon: '',
|
invoiceInfo: {
|
invoiceType: '电子普通发票',
|
titleTypeText: '企业',
|
title: '安徽豆米科技有限公司',
|
content: '明细',
|
amount: '¥100.00',
|
taxNo: '913401000967388111',
|
bankName: '中国银行',
|
bankAccount: '合肥市中国银芜湖路支行',
|
companyAddress: '安徽省合肥市经济技术开发区莲花路标准厂房F401室',
|
companyPhone: '0551-62738237'
|
},
|
personalInfo: {
|
invoiceType: '电子普通发票',
|
titleTypeText: '个人/事业单位',
|
title: '李春梅',
|
content: '明细',
|
amount: '¥100.00'
|
}
|
};
|
},
|
computed: {
|
displayFields() {
|
const base = this.titleType === 'company' ? this.invoiceInfo : this.personalInfo;
|
const fields = [
|
{ label: '发票类型', value: base.invoiceType },
|
{ label: '抬头类型', value: base.titleTypeText },
|
{ label: '发票抬头', value: base.title },
|
{ label: '发票内容', value: base.content },
|
{ label: '开票金额', value: base.amount }
|
];
|
|
if (this.titleType === 'company') {
|
fields.push(
|
{ label: '税号', value: base.taxNo },
|
{ label: '开户银行', value: base.bankName },
|
{ label: '银行账号', value: base.bankAccount },
|
{ label: '企业地址', value: base.companyAddress, valueClass: 'is-multiline' },
|
{ label: '企业电话', value: base.companyPhone }
|
);
|
}
|
|
return fields;
|
}
|
}
|
};
|
</script>
|
|
<style lang="scss" scoped>
|
.success-page {
|
min-height: 100vh;
|
padding: 56rpx 24rpx 40rpx;
|
background: #ffffff;
|
box-sizing: border-box;
|
}
|
|
.result-block {
|
display: flex;
|
flex-direction: column;
|
align-items: center;
|
justify-content: center;
|
}
|
|
.result-icon-wrap {
|
display: flex;
|
align-items: center;
|
justify-content: center;
|
width: 172rpx;
|
height: 172rpx;
|
border-radius: 50%;
|
}
|
|
.result-icon,
|
.icon-placeholder {
|
width: 128rpx;
|
height: 128rpx;
|
border-radius: 50%;
|
}
|
|
.icon-placeholder {
|
background: linear-gradient(135deg, #29c2ff 0%, #1ea6ff 100%);
|
}
|
|
.result-title {
|
margin-top: 28rpx;
|
font-size: 48rpx;
|
font-weight: 700;
|
line-height: 68rpx;
|
color: #222222;
|
}
|
|
.info-card {
|
padding: 18rpx 28rpx;
|
margin-top: 52rpx;
|
background: #fafafa;
|
border-radius: 20rpx;
|
}
|
|
.info-row {
|
display: flex;
|
align-items: flex-start;
|
justify-content: space-between;
|
gap: 24rpx;
|
padding: 14rpx 0;
|
}
|
|
.info-label {
|
flex-shrink: 0;
|
font-size: 34rpx;
|
line-height: 48rpx;
|
color: #a3a3a3;
|
}
|
|
.info-value {
|
flex: 1;
|
font-size: 34rpx;
|
font-weight: 500;
|
line-height: 48rpx;
|
color: #333333;
|
text-align: right;
|
word-break: break-all;
|
}
|
|
.is-multiline {
|
max-width: 430rpx;
|
}
|
</style>
|