feat ui设计稿bug修复
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
import { computed, onMounted } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { AppButton } from '@/components'
|
||||
// 页面容器:数据只经 store,不直接 import api
|
||||
import { useFinanceStore } from '@/stores/modules/finance'
|
||||
import { formatMoney } from '@/utils/format'
|
||||
@@ -32,52 +31,73 @@ onMounted(() => {
|
||||
|
||||
<template>
|
||||
<div class="pay-result">
|
||||
<nav class="pay-result__breadcrumb text-secondary">
|
||||
<RouterLink to="/finance" class="link">
|
||||
财务中心
|
||||
</RouterLink>
|
||||
<span> > </span>
|
||||
<RouterLink to="/finance/bills" class="link">
|
||||
账单明细
|
||||
</RouterLink>
|
||||
<span> > </span>
|
||||
<span>支付结果</span>
|
||||
</nav>
|
||||
<div class="container">
|
||||
<!-- 面包屑 (67,95)「财务中心 / 账单明细 /」+「支付成功」13/500 #4B5563 -->
|
||||
<nav class="pay-result__breadcrumb">
|
||||
<RouterLink to="/finance" class="pay-result__crumb-link">
|
||||
财务中心 /
|
||||
</RouterLink>
|
||||
<RouterLink to="/finance/bills" class="pay-result__crumb-link">
|
||||
账单明细 /
|
||||
</RouterLink>
|
||||
<span class="pay-result__crumb-current">支付成功</span>
|
||||
</nav>
|
||||
|
||||
<template v-if="result">
|
||||
<section class="pay-result__card card">
|
||||
<div class="pay-result__head">
|
||||
<span class="pay-result__check">✓</span>
|
||||
<div class="pay-result__head-text">
|
||||
<h2 class="pay-result__title">
|
||||
支付成功
|
||||
</h2>
|
||||
<p class="pay-result__count text-secondary">
|
||||
共{{ result.bills.length }}个订单
|
||||
</p>
|
||||
<p class="pay-result__amount">
|
||||
付款金额 ¥{{ formatMoney(result.amount) }}
|
||||
</p>
|
||||
<template v-if="result">
|
||||
<!-- 主列 316 居中(设计 x799→1115) -->
|
||||
<section class="pay-result__col">
|
||||
<!-- 绿圆勾 (897,187) 120×120 #7ED321,✓ 56/400 白字居中 -->
|
||||
<div class="pay-result__check" aria-hidden="true">
|
||||
✓
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pay-result__grid">
|
||||
<div class="pay-result__grid-item">
|
||||
<span class="pay-result__grid-label text-secondary">支付方式</span>
|
||||
<span class="pay-result__grid-value">{{ methodLabel }}</span>
|
||||
</div>
|
||||
<div class="pay-result__grid-item">
|
||||
<span class="pay-result__grid-label text-secondary">支付时间</span>
|
||||
<span class="pay-result__grid-value">{{ result.payTime }}</span>
|
||||
</div>
|
||||
<div class="pay-result__grid-item">
|
||||
<span class="pay-result__grid-label text-secondary">交易流水号</span>
|
||||
<span class="pay-result__grid-value">{{ result.tradeNo }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 标题 (900.3,331) 22/700 #1F2937,字距 6 -->
|
||||
<h2 class="pay-result__title">
|
||||
支付成功
|
||||
</h2>
|
||||
|
||||
<div class="pay-result__bills">
|
||||
<!-- 金额行 (852.9,379):13/400 灰 + ¥ 18/700 #EF4444,基线对齐 -->
|
||||
<p class="pay-result__amount-row">
|
||||
<span class="pay-result__amount-label">共{{ result.bills.length }}个订单 支付金额:</span>
|
||||
<span class="pay-result__amount">¥ {{ formatMoney(result.amount, 0) }}</span>
|
||||
</p>
|
||||
|
||||
<!-- 分割线 (799,428) 316×1 #F0F1F3 -->
|
||||
<div class="pay-result__divider" />
|
||||
|
||||
<!-- 支付信息 (799,449) 13/700 -->
|
||||
<h4 class="pay-result__sub-title">
|
||||
支付信息
|
||||
</h4>
|
||||
<dl class="pay-result__fields">
|
||||
<div class="pay-result__field">
|
||||
<dt class="pay-result__label">
|
||||
支付方式
|
||||
</dt>
|
||||
<dd class="pay-result__value">
|
||||
{{ methodLabel }}
|
||||
</dd>
|
||||
</div>
|
||||
<div class="pay-result__field">
|
||||
<dt class="pay-result__label">
|
||||
支付时间
|
||||
</dt>
|
||||
<dd class="pay-result__value">
|
||||
{{ result.payTime }}
|
||||
</dd>
|
||||
</div>
|
||||
<div class="pay-result__field">
|
||||
<dt class="pay-result__label">
|
||||
交易流水号
|
||||
</dt>
|
||||
<dd class="pay-result__value">
|
||||
{{ result.tradeNo || '—' }}
|
||||
</dd>
|
||||
</div>
|
||||
</dl>
|
||||
|
||||
<!-- 已支付订单 (799,574) 13/700 -->
|
||||
<h4 class="pay-result__sub-title pay-result__sub-title--bills">
|
||||
已支付订单
|
||||
</h4>
|
||||
<ul class="pay-result__bill-list">
|
||||
@@ -86,184 +106,240 @@ onMounted(() => {
|
||||
:key="bill.id"
|
||||
class="pay-result__bill"
|
||||
>
|
||||
<span class="pay-result__bill-name">{{ bill.planName }}</span>
|
||||
<span class="pay-result__bill-no text-secondary">{{ bill.billNo }}</span>
|
||||
<span class="pay-result__bill-amount">¥{{ formatMoney(bill.amount) }}</span>
|
||||
<div class="pay-result__bill-head">
|
||||
<span class="pay-result__bill-name">{{ bill.planName }}</span>
|
||||
<span class="pay-result__bill-amount">¥ {{ formatMoney(bill.amount, 0) }}</span>
|
||||
</div>
|
||||
<p class="pay-result__bill-meta">
|
||||
账单号:{{ bill.billNo }}
|
||||
</p>
|
||||
<p class="pay-result__bill-meta">
|
||||
关联项目:{{ bill.projectName }}
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="pay-result__footer">
|
||||
<AppButton type="primary" @click="router.push('/finance/bills')">
|
||||
返回
|
||||
</AppButton>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
<!-- 返回 (1031,711) 84×32 #024FFF 12/500 白字,右对齐 -->
|
||||
<div class="pay-result__footer">
|
||||
<button
|
||||
class="pay-result__back"
|
||||
type="button"
|
||||
@click="router.push('/finance/bills')"
|
||||
>
|
||||
返回
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<p v-else class="pay-result__empty text-secondary">
|
||||
暂无支付结果
|
||||
</p>
|
||||
<p v-else class="pay-result__empty">
|
||||
暂无支付结果
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
// 设计「支付成功」c56193d1(1920 画布 1:1)——316 居中窄列坐在页面底色上
|
||||
.pay-result {
|
||||
width: 100%;
|
||||
max-width: @container-width;
|
||||
margin: 0 auto;
|
||||
padding: @spacing-lg @spacing-base @spacing-xxl;
|
||||
padding-bottom: 344px; // 列底 743 → 页脚 1087
|
||||
background: @contract-page-bg;
|
||||
|
||||
// 设计 32:面包屑 13 设计px → 11px,前缀灰、当前页深灰
|
||||
// 面包屑 (67,95):头部底 73 → 文字盒顶 95 = 22
|
||||
&__breadcrumb {
|
||||
margin-bottom: @spacing-base;
|
||||
font-size: 11px;
|
||||
color: @text-color-disabled;
|
||||
.flex(row, flex-start, center);
|
||||
padding-top: 22px;
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
line-height: 17px;
|
||||
color: @project-muted;
|
||||
}
|
||||
|
||||
> span:last-child {
|
||||
color: @text-color;
|
||||
&__crumb-link {
|
||||
color: @project-muted;
|
||||
|
||||
&:hover {
|
||||
color: @primary-strong;
|
||||
}
|
||||
}
|
||||
|
||||
// 设计 32:内容为居中窄列,直接坐在页面底色上(无外层大卡)
|
||||
&__card {
|
||||
width: 300px;
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
&__crumb-current {
|
||||
margin-left: 3px;
|
||||
color: @finance-entry-text; // 设计 #4B5563
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
// 头部:大绿圆勾 + 标题 + 「共 N 个订单 / 付款金额」同一行
|
||||
&__head {
|
||||
.flex(column, center, center);
|
||||
gap: 12px;
|
||||
padding-bottom: 16px;
|
||||
border-bottom: 1px solid @project-divider;
|
||||
// 主列 316,居中(面包屑底 112 → 圆顶 187 = 75)
|
||||
&__col {
|
||||
width: 316px;
|
||||
margin: 75px auto 0;
|
||||
}
|
||||
|
||||
// 绿圆勾 120×120 #7ED321
|
||||
&__check {
|
||||
.flex(row, center);
|
||||
width: 76px;
|
||||
height: 76px;
|
||||
border-radius: @radius-round;
|
||||
.flex(row, center, center);
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
margin: 0 auto;
|
||||
border-radius: 50%;
|
||||
background: @finance-result-circle;
|
||||
color: @white;
|
||||
font-size: 42px;
|
||||
font-size: 56px;
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
&__head-text {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
align-items: baseline;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
// 标题:圆底 307 → 331 = 24;盒 113.3 ≈ 4×22 + 4×6 字距
|
||||
&__title {
|
||||
flex-basis: 100%;
|
||||
margin: 24px -6px 0 0;
|
||||
text-align: center;
|
||||
font-size: 17px;
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
color: @heading-color;
|
||||
line-height: 29px;
|
||||
letter-spacing: 6px;
|
||||
color: @finance-ink;
|
||||
}
|
||||
|
||||
// 金额行:标题底 360 → 374 = 14;13/400 灰 + 18/700 #EF4444 基线对齐
|
||||
&__amount-row {
|
||||
.flex(row, center, baseline);
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
&__amount-label {
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
line-height: 17px;
|
||||
color: @finance-muted-text;
|
||||
}
|
||||
|
||||
&__amount {
|
||||
font-size: 14px;
|
||||
color: @danger-color;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
line-height: 24px;
|
||||
color: @danger-color; // 设计 #EF4444
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&__count {
|
||||
font-size: 11px;
|
||||
// 分割线:金额行底 398 → 428 = 30
|
||||
&__divider {
|
||||
height: 1px;
|
||||
margin-top: 30px;
|
||||
background: @project-divider;
|
||||
}
|
||||
|
||||
// 支付信息:标签左灰、值右粗(设计 32 竖排行)
|
||||
&__grid {
|
||||
&__sub-title {
|
||||
margin-top: 20px; // 线底 429 → 449 = 20
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
line-height: 17px;
|
||||
color: @finance-ink;
|
||||
|
||||
&--bills {
|
||||
margin-top: 22px; // 末行底 552 → 574 = 22
|
||||
}
|
||||
}
|
||||
|
||||
// 支付信息三行:标题底 466 → 首行 480 = 14;行高 16 步进 28 → gap 12
|
||||
&__fields {
|
||||
.flex(column, flex-start, stretch);
|
||||
gap: 14px;
|
||||
margin-top: 16px;
|
||||
gap: 12px;
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
&__grid-item {
|
||||
.flex(row, space-between, center);
|
||||
gap: @spacing-base;
|
||||
&__field {
|
||||
.flex(row, space-between, flex-start);
|
||||
}
|
||||
|
||||
&__grid-label {
|
||||
font-size: 11px;
|
||||
color: @text-color-secondary;
|
||||
&__label {
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 16px;
|
||||
color: @finance-muted-text;
|
||||
}
|
||||
|
||||
&__grid-value {
|
||||
font-size: 11px;
|
||||
&__value {
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
color: @heading-color;
|
||||
line-height: 16px;
|
||||
color: @finance-ink;
|
||||
text-align: right;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
&__bills {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
&__sub-title {
|
||||
margin-bottom: 8px;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
color: @heading-color;
|
||||
}
|
||||
|
||||
// 已支付订单行卡:白底圆角(设计 32 实取)
|
||||
// 白卡:标题底 591 → 601 = 10;316×84 白底描边 #F0F1F3
|
||||
&__bill-list {
|
||||
.flex(column, flex-start, stretch);
|
||||
gap: 6px;
|
||||
margin-top: 10px;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&__bill {
|
||||
.flex(row, flex-start, center);
|
||||
gap: 8px;
|
||||
padding: 10px;
|
||||
border-radius: 6px;
|
||||
box-sizing: border-box;
|
||||
height: 84px;
|
||||
padding: 15px 17px;
|
||||
border: 1px solid @project-divider;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
font-size: 11px;
|
||||
color: @text-color;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
&__bill-head {
|
||||
.flex(row, space-between, baseline);
|
||||
}
|
||||
|
||||
&__bill-name {
|
||||
color: @heading-color;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
&__bill-no {
|
||||
flex: 1;
|
||||
font-size: 11px;
|
||||
color: @text-color-disabled;
|
||||
line-height: 16px;
|
||||
color: @finance-ink;
|
||||
.ellipsis();
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
&__bill-amount {
|
||||
flex-shrink: 0;
|
||||
margin-left: 12px;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
color: @heading-color;
|
||||
white-space: nowrap;
|
||||
line-height: 16px;
|
||||
color: @finance-ink;
|
||||
}
|
||||
|
||||
// 返回按钮右对齐(设计 32 在列右下)
|
||||
&__bill-meta {
|
||||
margin-top: 6px;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 16px;
|
||||
color: @project-muted; // 设计 #9CA3AF
|
||||
.ellipsis();
|
||||
|
||||
+ .pay-result__bill-meta {
|
||||
margin-top: 0; // 账单号 638 → 关联项目 654 连排
|
||||
}
|
||||
}
|
||||
|
||||
// 返回按钮:卡底 685 → 711 = 26,右对齐 84×32 #024FFF
|
||||
&__footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 16px;
|
||||
.flex(row, flex-end, flex-start);
|
||||
margin-top: 26px;
|
||||
}
|
||||
|
||||
:deep(.app-button--primary) {
|
||||
&__back {
|
||||
width: 84px;
|
||||
height: 32px;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
background: @primary-strong;
|
||||
color: @white;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
line-height: 16px;
|
||||
cursor: pointer;
|
||||
transition: background 0.2s;
|
||||
|
||||
&:hover {
|
||||
background: @primary-color;
|
||||
@@ -271,9 +347,10 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
&__empty {
|
||||
padding: @spacing-xl 0;
|
||||
padding: 80px 0;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
font-size: 13px;
|
||||
color: @project-muted;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user