MrShi
2026-05-18 b099e758396f61b39d24cf5fa6be7bb0d10c2b4d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<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>