feat 完善注释
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
import { computed, onMounted, watch } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
// 页面容器:数据只经 store,不直接 import api
|
||||
import { useFinanceStore } from '@/stores/modules/finance'
|
||||
import type { Bill, BillStatus } from '@/types/business/finance'
|
||||
import { formatMoney } from '@/utils/format'
|
||||
@@ -15,11 +14,6 @@ const { currentBill } = storeToRefs(financeStore)
|
||||
|
||||
const billId = computed(() => String(route.params.id))
|
||||
|
||||
/**
|
||||
* 设计 31 是三张并排状态卡(523/825/1127 各 270×476):
|
||||
* 已支付(红金额)+ 待支付(橙金额)+ 未到期(灰金额)。
|
||||
* 页面实际只展示当前账单状态那一张,其余两张是同一组件的另外两种状态。
|
||||
*/
|
||||
const STATUS_CARDS: BillStatus[] = ['已支付', '待支付', '未到期']
|
||||
|
||||
const AMOUNT_CLASS: Record<BillStatus, string> = {
|
||||
@@ -29,7 +23,6 @@ const AMOUNT_CLASS: Record<BillStatus, string> = {
|
||||
已取消: 'is-idle',
|
||||
}
|
||||
|
||||
/** 演示用:三张卡各自的账单数据(当前账单代入对应状态卡) */
|
||||
const cards = computed<Array<{ status: BillStatus; bill: Bill | null }>>(() =>
|
||||
STATUS_CARDS.map((status) => ({
|
||||
status,
|
||||
@@ -38,12 +31,10 @@ const cards = computed<Array<{ status: BillStatus; bill: Bill | null }>>(() =>
|
||||
)
|
||||
|
||||
async function load(): Promise<void> {
|
||||
// 支付信息(渠道 / 时间 / 流水号)已由后端回写在账单本身上,无需再查支付结果
|
||||
await financeStore.fetchDetail(billId.value)
|
||||
}
|
||||
|
||||
function onPay(id: string): void {
|
||||
// 进收银台(确认支付):选支付方式 → 微信出码 / 支付宝跳转
|
||||
void router.push({ path: '/finance/checkout', query: { ids: id } })
|
||||
}
|
||||
|
||||
@@ -59,7 +50,6 @@ onMounted(() => {
|
||||
<template>
|
||||
<div class="bill-detail">
|
||||
<div class="container">
|
||||
<!-- 面包屑 (70,117)「财务中心 / 账单明细 /」 + 「账单详情」 -->
|
||||
<nav class="bill-detail__breadcrumb">
|
||||
<RouterLink to="/finance" class="bill-detail__breadcrumb-link">
|
||||
财务中心 /
|
||||
@@ -70,14 +60,12 @@ onMounted(() => {
|
||||
<span class="bill-detail__breadcrumb-current">账单详情</span>
|
||||
</nav>
|
||||
|
||||
<!-- 三张状态卡 (523/825/1127,158) 各 270×476 -->
|
||||
<div v-if="currentBill" class="bill-detail__cards">
|
||||
<section
|
||||
v-for="card in cards"
|
||||
:key="card.status"
|
||||
class="bill-detail__card"
|
||||
>
|
||||
<!-- 卡头:对勾圆 + 状态词 (539,278) 238×21 16/700 #1F2937 -->
|
||||
<div class="bill-detail__head">
|
||||
<span class="bill-detail__check" aria-hidden="true">✓</span>
|
||||
<h3 class="bill-detail__status">
|
||||
@@ -85,7 +73,6 @@ onMounted(() => {
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<!-- 付款金额:标签 (590.23,315) + 金额 (653.8,309) 18/700 -->
|
||||
<div class="bill-detail__amount-row">
|
||||
<span class="bill-detail__amount-label">付款金额:</span>
|
||||
<span
|
||||
@@ -94,7 +81,6 @@ onMounted(() => {
|
||||
>¥ {{ formatMoney(card.bill?.amount ?? currentBill.amount, 0) }}</span>
|
||||
</div>
|
||||
|
||||
<!-- 支付信息四行:标签 (547,y) 12/400 #6B7280 + 值 12/700 #1F2937 -->
|
||||
<dl class="bill-detail__fields">
|
||||
<div class="bill-detail__field">
|
||||
<dt class="bill-detail__label">
|
||||
@@ -122,7 +108,6 @@ onMounted(() => {
|
||||
</div>
|
||||
</dl>
|
||||
|
||||
<!-- 订单小卡 (555.5/857.5/1159.5,481..) 205 宽 -->
|
||||
<div class="bill-detail__order">
|
||||
<span class="bill-detail__order-title">
|
||||
{{ card.status }}订单
|
||||
@@ -137,7 +122,6 @@ onMounted(() => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 返回 (727.4,594) 43.2×16 12/500 -->
|
||||
<button
|
||||
v-if="card.status === '待支付'"
|
||||
class="bill-detail__cta"
|
||||
@@ -163,13 +147,11 @@ onMounted(() => {
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
// 设计 31 账单详情(1920 画布 1:1)——内容区 x70→1850 = 1780
|
||||
.bill-detail {
|
||||
width: 100%;
|
||||
padding-bottom: 325px; // 卡片底 634 → 页脚 1087
|
||||
padding-bottom: 325px;
|
||||
background: @contract-page-bg;
|
||||
|
||||
// 面包屑 (70,117):文字 ink y117,卡片顶 158 → 面包屑盒 86..131
|
||||
&__breadcrumb {
|
||||
.flex(row, flex-start, center);
|
||||
height: 86px;
|
||||
@@ -195,11 +177,10 @@ onMounted(() => {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
// 三张卡并排:x523 / 825 / 1127,间距 32
|
||||
&__cards {
|
||||
.flex(row, flex-start, flex-start);
|
||||
gap: 32px;
|
||||
padding-left: 453px; // 内容区起点 70 → 首卡 523
|
||||
padding-left: 453px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -212,11 +193,9 @@ onMounted(() => {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
// 卡头:对勾圆 (645.27,204) 34/400 白字 + 状态词 (539,278)
|
||||
&__head {
|
||||
.flex(row, flex-start, center);
|
||||
gap: 0;
|
||||
// 状态词盒 y278(卡内 120)、对勾圆 y204(卡内 46)→ 用 align-items:flex-start + 各自 margin
|
||||
align-items: flex-start;
|
||||
padding: 46px 0 0 16px;
|
||||
height: 141px;
|
||||
@@ -236,32 +215,30 @@ onMounted(() => {
|
||||
line-height: 1;
|
||||
order: 2;
|
||||
flex-shrink: 0;
|
||||
// 设计圆 x629.27(卡内 106.27);渲染值 714 → 左移 84.75
|
||||
transform: translateX(-84.75px);
|
||||
}
|
||||
|
||||
&__status {
|
||||
order: 1;
|
||||
width: 238px;
|
||||
margin-top: 74px; // 卡内 46 → 120(状态词顶)
|
||||
margin-top: 74px;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
line-height: 21px;
|
||||
color: @finance-ink;
|
||||
}
|
||||
|
||||
// 付款金额行:标签卡内 (67.23,157),金额卡内 (130.8,151)
|
||||
&__amount-row {
|
||||
position: relative;
|
||||
width: 238px;
|
||||
height: 51px; // 行顶 = 卡内 130(金额盒顶 309−158=151 − 行内偏移 21)
|
||||
height: 51px;
|
||||
margin: 0 0 0 16px;
|
||||
}
|
||||
|
||||
&__amount-label {
|
||||
position: absolute;
|
||||
top: 16px; // 设计 ink y315(卡内 157)
|
||||
left: 51.23px; // 卡内 67.23 − 16
|
||||
top: 16px;
|
||||
left: 51.23px;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 16px;
|
||||
@@ -270,8 +247,8 @@ onMounted(() => {
|
||||
|
||||
&__amount {
|
||||
position: absolute;
|
||||
top: 10px; // 设计盒顶 y309(卡内 151)
|
||||
left: 114.8px; // 卡内 130.8 − 16
|
||||
top: 10px;
|
||||
left: 114.8px;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
line-height: 24px;
|
||||
@@ -282,7 +259,6 @@ onMounted(() => {
|
||||
&.is-idle { color: @finance-idle; }
|
||||
}
|
||||
|
||||
// 支付信息:标签卡内 (24,207) 起,行距 28
|
||||
&__fields {
|
||||
.flex(column, flex-start, stretch);
|
||||
gap: 12px;
|
||||
@@ -297,7 +273,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
&__label {
|
||||
flex: 0 0 77.52px; // 值统一从卡内 101.52 起
|
||||
flex: 0 0 77.52px;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 16px;
|
||||
@@ -314,7 +290,6 @@ onMounted(() => {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
// 订单小卡:卡内 x32.5,标题顶卡内 323(设计 481−158)
|
||||
&__order {
|
||||
.flex(column, flex-start, flex-start);
|
||||
gap: 0;
|
||||
@@ -368,11 +343,10 @@ onMounted(() => {
|
||||
color: @finance-ink;
|
||||
}
|
||||
|
||||
// 底部按钮 (727.4,594) 43.2×16 文字;盒宽 90 居中于 270 卡
|
||||
&__cta {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 428px; // 按钮文字 y594(卡内 436),盒高 32 → 盒顶 428
|
||||
top: 428px;
|
||||
width: 90px;
|
||||
height: 32px;
|
||||
border: none;
|
||||
@@ -381,7 +355,6 @@ onMounted(() => {
|
||||
color: @white;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
/* 按钮基线:文字 ink y594 → 盒顶 428 + (32−16)/2 = 436 */
|
||||
padding-bottom: 6px;
|
||||
box-sizing: border-box;
|
||||
transform: translateX(-50%);
|
||||
|
||||
@@ -3,7 +3,6 @@ import { computed, onMounted, ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { PaginationBar } from '@/components'
|
||||
// 页面容器:数据只经 store,不直接 import api
|
||||
import { useFinanceStore } from '@/stores/modules/finance'
|
||||
import type { BillStatus } from '@/types/business/finance'
|
||||
import BillSummaryBar from './cpns/BillSummaryBar.vue'
|
||||
@@ -16,7 +15,6 @@ const { query, list, total } = storeToRefs(financeStore)
|
||||
const keyword = ref('')
|
||||
const selectedIds = ref<string[]>([])
|
||||
|
||||
/** 设计 30:状态分段组 4 项,「全部」选中态为实底 #024FFF */
|
||||
const STATUS_TABS: Array<{ label: string; value: BillStatus | 'all' }> = [
|
||||
{ label: '全部', value: 'all' },
|
||||
{ label: '待支付', value: '待支付' },
|
||||
@@ -24,7 +22,6 @@ const STATUS_TABS: Array<{ label: string; value: BillStatus | 'all' }> = [
|
||||
{ label: '未到期', value: '未到期' },
|
||||
]
|
||||
|
||||
/** 统计卡三组(设计 30:(71/663.67/1256.33, 155) 各 592.67×60) */
|
||||
const STATS = computed(() => [
|
||||
{ label: '总笔数', value: String(total.value) },
|
||||
{ label: '总金额', value: String(list.value.reduce((sum, bill) => sum + bill.amount, 0)) },
|
||||
@@ -63,7 +60,6 @@ function onPay(id: string): void {
|
||||
|
||||
function onBatchPay(ids: string[]): void {
|
||||
if (ids.length === 0) return
|
||||
// 单笔 / 多笔都进收银台(收银台按 `?ids=` 聚合出「订单明细」与合计)
|
||||
void router.push({ path: '/finance/checkout', query: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
@@ -76,7 +72,6 @@ onMounted(() => {
|
||||
<template>
|
||||
<div class="bills">
|
||||
<div class="container">
|
||||
<!-- 面包屑:(70,103) 「财务中心 >」13/400 #9CA3AF + 「账单明细」13/500 #4B5563 -->
|
||||
<nav class="bills__breadcrumb">
|
||||
<RouterLink to="/finance" class="bills__breadcrumb-link">
|
||||
财务中心 >
|
||||
@@ -84,7 +79,6 @@ onMounted(() => {
|
||||
<span class="bills__breadcrumb-current">账单明细</span>
|
||||
</nav>
|
||||
|
||||
<!-- 统计卡:(70,132) 1780×106 白底 + #F0F1F3 描边,三组等宽 592.67 -->
|
||||
<div class="bills__stats">
|
||||
<div v-for="item in STATS" :key="item.label" class="bills__stat">
|
||||
<span class="bills__stat-label">{{ item.label }}</span>
|
||||
@@ -92,7 +86,6 @@ onMounted(() => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 工具条:(70,252) 1780×71;Tab 组 (92,270.5) 279×34、搜索框 (405,269) 1300×37 -->
|
||||
<div class="bills__toolbar">
|
||||
<div class="bills__tabs">
|
||||
<button
|
||||
@@ -121,7 +114,6 @@ onMounted(() => {
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 表格卡:(70,337) 1780×365.36,表头 (77.5,344.5) 1765×41.77 -->
|
||||
<div class="bills__board">
|
||||
<BillTable
|
||||
:bills="list"
|
||||
@@ -140,7 +132,6 @@ onMounted(() => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 汇总条:通栏白条 (0,718) 1920×66 -->
|
||||
<BillSummaryBar
|
||||
:bills="list"
|
||||
:selected-ids="selectedIds"
|
||||
@@ -150,18 +141,17 @@ onMounted(() => {
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
// 设计 30 账单明细(1920 画布 1:1)——内容区 x70→1850 = 1780
|
||||
.bills {
|
||||
.flex(column, flex-start);
|
||||
align-items: stretch;
|
||||
gap: 0;
|
||||
width: 100%;
|
||||
padding-bottom: 14px; // 汇总条底 784 → 页脚 1087 的留白由页脚自身高度承担
|
||||
padding-bottom: 14px;
|
||||
background: @contract-page-bg;
|
||||
|
||||
&__breadcrumb {
|
||||
.flex(row, flex-start, center);
|
||||
height: 49px; // 组 6 (0,89) 高 31 + 上下留白 → 盒 y72..121,文字 ink y103
|
||||
height: 49px;
|
||||
padding-top: 14px;
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
@@ -179,18 +169,16 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
&__breadcrumb-current {
|
||||
// 设计:账单明细起点 x138.84;「 > 」由 CSS 绘制,宽 4.44px
|
||||
margin-left: 4.44px;
|
||||
color: @finance-entry-text;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
// 统计卡 (70,132) 1780×106
|
||||
&__stats {
|
||||
.flex(row, flex-start, flex-start);
|
||||
gap: 0;
|
||||
height: 106px;
|
||||
margin-top: 11px; // 面包屑盒底 121 → 卡顶 132
|
||||
margin-top: 11px;
|
||||
border: 1px solid @finance-card-line;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
@@ -201,7 +189,7 @@ onMounted(() => {
|
||||
.flex(column, flex-start, flex-start);
|
||||
gap: 6px;
|
||||
width: 592.67px;
|
||||
padding: 22px 0 0 269px; // 标签 x340,卡边框内起点 x71 → 内缩 269
|
||||
padding: 22px 0 0 269px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -219,20 +207,18 @@ onMounted(() => {
|
||||
color: @finance-ink;
|
||||
}
|
||||
|
||||
// 工具条 (70,252) 1780×71
|
||||
&__toolbar {
|
||||
.flex(row, flex-start, center);
|
||||
gap: 0;
|
||||
height: 71px;
|
||||
margin-top: 14px; // 统计卡底 238 → 工具条顶 252
|
||||
padding: 0 0 0 22px; // Tab 组 x92,卡边框内起点 x70 → 内缩 22
|
||||
margin-top: 14px;
|
||||
padding: 0 0 0 22px;
|
||||
border: 1px solid @finance-card-line;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
// Tab 组 (92,270.5) 279×34
|
||||
&__tabs {
|
||||
.flex(row, flex-start, center);
|
||||
gap: 0;
|
||||
@@ -243,7 +229,6 @@ onMounted(() => {
|
||||
overflow: hidden;
|
||||
flex-shrink: 0;
|
||||
box-sizing: border-box;
|
||||
// Tab 盒 (92,270.5) 279×34 → 文字 ink x103.57;等分 69.75
|
||||
padding: 0 11.3px 0 9.2px;
|
||||
}
|
||||
|
||||
@@ -276,11 +261,10 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
|
||||
// 搜索框 (405,269) 1300×37 底 #F3F4F6
|
||||
&__search {
|
||||
width: 1300px;
|
||||
height: 37px;
|
||||
margin-left: 33px; // Tab 组右缘 371 → 搜索框 405
|
||||
margin-left: 33px;
|
||||
padding: 0 16px;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
@@ -306,8 +290,8 @@ onMounted(() => {
|
||||
flex-shrink: 0;
|
||||
|
||||
&--reset {
|
||||
width: 62.2px; // 重置 x1721.4 文字 43.2 居中
|
||||
margin-left: 15.4px; // 搜索框右缘 1705 → 重置盒 1721.4
|
||||
width: 62.2px;
|
||||
margin-left: 15.4px;
|
||||
color: @finance-entry-text;
|
||||
|
||||
&:hover {
|
||||
@@ -316,7 +300,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
&--primary {
|
||||
width: 62.2px; // 搜索 x1783.4 文字 43.2 居中
|
||||
width: 62.2px;
|
||||
color: @white;
|
||||
background: @primary-strong;
|
||||
|
||||
@@ -326,20 +310,18 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
|
||||
// 表格卡 (70,337) 1780×365.36(含分页)
|
||||
&__board {
|
||||
margin-top: 14px; // 工具条底 323 → 表格卡顶 337
|
||||
margin-top: 14px;
|
||||
border: 1px solid @finance-card-line;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
// 分页:右对齐,页码 12/400;设计 (1631.93~1823.93, 670.36)
|
||||
:deep(.pagination) {
|
||||
justify-content: flex-end;
|
||||
gap: 3.7px; // 设计页码间距:盒距 6 → 页码字距 3.7
|
||||
padding: 8px 26px 30px 0; // 下行上缘 662 → 表格底,页码 ink 670.36
|
||||
gap: 3.7px;
|
||||
padding: 8px 26px 30px 0;
|
||||
}
|
||||
|
||||
:deep(.pagination__btn) {
|
||||
|
||||
@@ -3,7 +3,6 @@ import { computed, onBeforeUnmount, ref, watch } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus'
|
||||
// 页面容器:数据只经 store,不直接 import api
|
||||
import { useFinanceStore } from '@/stores/modules/finance'
|
||||
import type { PayMethod } from '@/types/business/finance'
|
||||
import { createMerchantOrderNo, PAY_METHODS } from '@/utils/payMeta'
|
||||
@@ -12,55 +11,22 @@ import CheckoutBillCard from './cpns/CheckoutBillCard.vue'
|
||||
import PayMethodList from './cpns/PayMethodList.vue'
|
||||
import WechatQrDialog from './cpns/WechatQrDialog.vue'
|
||||
|
||||
/**
|
||||
* 收银台(确认支付)页 —— 路由 `/finance/checkout?requirementId=<需求id>[&ids=<期次id>]`。
|
||||
*
|
||||
* <p><b>版式(Web 两栏)</b>:面包屑 → 左栏「订单明细卡 + 选择支付方式卡」(占满剩余宽)
|
||||
* + 右栏 360px **粘性**「支付金额 / 订单数量 / 支付方式 / 确认支付」;窄屏(≤992px)回落单栏。</p>
|
||||
*
|
||||
* <p>⚠️ 与移动端设计稿的差异(本轮改动原因):早期按「支付」移动端设计稿(250 设计px ≈ 375 视口)
|
||||
* 做成一根 **480px 居中窄列 + 底部固定橙色操作条**,在 PC 上左右各留一大片空白(实测 1229 视口下
|
||||
* 卡片仅占 480px)。本轮改成 Web 两栏,并同步把卡片从移动端尺度抬到桌面尺度:卡标题 14→16px
|
||||
* (与同目录 `PayMethodDialog` / `FinanceChart` / `WechatQrDialog` 的 16px/600 对齐)、
|
||||
* 条目内边距 12/14→16/18px、金额字号上调;**底部固定操作条取消**,CTA 移入右侧汇总栏。</p>
|
||||
*
|
||||
* <p><b>订单明细数据源</b>:**复用项目详情「合同财务」那个现成接口**
|
||||
* `GET /web/requirementPool/get/finance/{需求id}` —— 入参是需求 id,后端把「需求 + 项目」
|
||||
* 拼成联合结构后把付款计划下发在 `billPlans` 里。本栈支付口径是 `vm_bill_plan.id`,
|
||||
* 故订单明细直接取这份 `billPlans`(见 `api/finance.ts#getCheckoutBills`)。</p>
|
||||
*
|
||||
* <p><b>支付</b>(后端 `controller/pc/pay/WebScanPayController`,类级 `@SaIgnore`):</p>
|
||||
* <ul>
|
||||
* <li>微信 → `POST /pay/web/wechat/native` `{orderNo, amount, billIds}` ⇒ `codeUrl` → 本页弹窗渲染二维码;</li>
|
||||
* <li>支付宝 → `POST /pay/web/alipay/page` `{outTradeNo, amount, billIds}` ⇒ `formBody`
|
||||
* (实测是收银台跳转地址,新标签页打开)。</li>
|
||||
* </ul>
|
||||
*
|
||||
* <p><b>`billIds` 为什么必须下发</b>:后端在下单成功时落一条 `vm_finance_payment`
|
||||
* (status = CREATED),并把期次 id 列表写进 `request_payload`;支付成功回调再按这张清单
|
||||
* 为**每期**落一行 `vm_finance_payment_bill` 并把 `vm_bill_plan` 置为 DONE。
|
||||
* 不带 `billIds` 时后端只落支付单,分摊明细与回写都会跳过。</p>
|
||||
*/
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const financeStore = useFinanceStore()
|
||||
const { checkoutBills, checkoutLoading, payOrder } = storeToRefs(financeStore)
|
||||
|
||||
/** 路由带入的**需求 id**(项目详情「立即支付」跳转时带上) */
|
||||
const requirementId = computed(() => {
|
||||
const raw = route.query.requirementId
|
||||
return String(Array.isArray(raw) ? raw[0] : (raw ?? '')).trim()
|
||||
})
|
||||
|
||||
/** 路由**可选**带入的期次 id(`?ids=`):用于精确指定付哪一期 */
|
||||
const planIds = computed(() => {
|
||||
const raw = route.query.ids
|
||||
const text = Array.isArray(raw) ? raw.join(',') : String(raw ?? '')
|
||||
return text.split(',').map((id) => id.trim()).filter(Boolean)
|
||||
})
|
||||
|
||||
/** 下单要带的期次清单(`billIds`):以**实际加载到的期次**为准(`vm_bill_plan.id`) */
|
||||
const billIds = computed(() => checkoutBills.value.map((bill) => bill.id))
|
||||
|
||||
const method = ref<PayMethod>('wechat')
|
||||
@@ -71,7 +37,6 @@ const totalAmount = computed(() =>
|
||||
checkoutBills.value.reduce((sum, bill) => sum + Number(bill.amount || 0), 0),
|
||||
)
|
||||
|
||||
/** 右侧汇总栏的「支付方式」展示名:与左侧选择卡同源(`PAY_METHODS`),不另写一份文案 */
|
||||
const methodLabel = computed(
|
||||
() => PAY_METHODS.find((item) => item.value === method.value)?.label ?? '—',
|
||||
)
|
||||
@@ -82,12 +47,6 @@ async function load(): Promise<void> {
|
||||
await financeStore.loadCheckout(requirementId.value, planIds.value)
|
||||
}
|
||||
|
||||
/**
|
||||
* 打开支付宝收银台。
|
||||
*
|
||||
* <p>后端 `pageExecute(request, "GET")` 实测返回的是**跳转地址**(`https://…/gateway.do?…`),
|
||||
* 直接开新标签页即可;万一日后改回 POST 模式返回自动提交的 HTML 表单,这里也兜住。</p>
|
||||
*/
|
||||
function openAlipay(body: string): void {
|
||||
if (/^\s*https?:\/\//i.test(body)) {
|
||||
window.open(body, '_blank', 'noopener')
|
||||
@@ -114,7 +73,6 @@ async function onConfirm(): Promise<void> {
|
||||
if (!canPay.value) return
|
||||
submitting.value = true
|
||||
try {
|
||||
// 商户订单号由前端生成(后端两个下单接口都要求调用方传 outTradeNo)
|
||||
const orderNo = createMerchantOrderNo()
|
||||
|
||||
if (method.value === 'wechat') {
|
||||
@@ -137,35 +95,24 @@ async function onConfirm(): Promise<void> {
|
||||
openAlipay(body)
|
||||
}
|
||||
catch {
|
||||
// 失败原因已由 utils/request.ts 拦截器统一弹出,这里只需兜住 Promise 拒绝
|
||||
}
|
||||
finally {
|
||||
submitting.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** 二维码过期 / 用户主动刷新:换一个新商户单号重新下单 */
|
||||
async function onRefreshQr(): Promise<void> {
|
||||
try {
|
||||
await financeStore.payByWechatNative(createMerchantOrderNo(), totalAmount.value, billIds.value)
|
||||
}
|
||||
catch {
|
||||
// 同上
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 「我已完成支付」→ 结果页。
|
||||
*
|
||||
* <p>⚠️ 账单置为 PAID 由**后端异步回调**(微信/支付宝 → MQ → `WechatPayController#handleCallback`)
|
||||
* 完成,用户点按钮这一刻回调可能还没到,结果页会短暂显示「暂无支付结果」,
|
||||
* 刷新即可。若要做成稳定体感,需要后端提供「按订单号查支付状态」的端点供结果页轮询。</p>
|
||||
*/
|
||||
function onPaid(): void {
|
||||
qrVisible.value = false
|
||||
const first = checkoutBills.value[0]
|
||||
if (!first) return
|
||||
// 结果页同样按「需求 id + 期次 id」查(复用财务接口),故把需求 id 一并带过去
|
||||
void router.push({
|
||||
path: `/finance/bills/${first.id}/pay/result`,
|
||||
query: { requirementId: requirementId.value },
|
||||
@@ -261,22 +208,15 @@ onBeforeUnmount(() => {
|
||||
|
||||
<style lang="less" scoped>
|
||||
.checkout {
|
||||
// ⚠️ 第三个参数必须给 stretch:`.flex()` 的 align 默认 center,会给面包屑这类
|
||||
// 内容宽子元素「压窄 + 水平居中」——实测面包屑跑到页面正中间去了。
|
||||
.flex(column, flex-start, stretch);
|
||||
gap: @spacing-base;
|
||||
padding-top: @spacing-lg;
|
||||
// 底部固定操作条已取消(Web 版 CTA 在右侧汇总栏),这里只留常规页脚呼吸位
|
||||
padding-bottom: @spacing-xxl;
|
||||
|
||||
&__breadcrumb {
|
||||
font-size: @font-size-base;
|
||||
}
|
||||
|
||||
// Web 两栏:左「订单明细 + 选择支付方式」自适应,右 360px 汇总栏
|
||||
// ⚠️ 这里**不能**写 `align-items: start` —— 那会让右栏收缩成自身内容高度,
|
||||
// 侧栏里的 `position: sticky` 就没有可滑动空间,粘性会整个失效(实测踩过)。
|
||||
// 保持默认 stretch,右栏与左栏等高,sticky 才有生效范围。
|
||||
&__layout {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) 360px;
|
||||
@@ -285,7 +225,6 @@ onBeforeUnmount(() => {
|
||||
}
|
||||
|
||||
&__main {
|
||||
// `.flex()` 的 align 默认 center,会让两张卡按内容宽度收缩 ⇒ 必须显式拉满
|
||||
.flex(column, flex-start, stretch);
|
||||
gap: @spacing-base;
|
||||
min-width: 0;
|
||||
@@ -295,7 +234,6 @@ onBeforeUnmount(() => {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
// 汇总栏:跟随滚动(顶栏 64px 是 sticky,故留出顶栏高度 + 一档间距)
|
||||
&__summary {
|
||||
position: sticky;
|
||||
top: calc(@header-height + @spacing-base);
|
||||
@@ -391,8 +329,6 @@ onBeforeUnmount(() => {
|
||||
font-size: @font-size-base;
|
||||
}
|
||||
|
||||
// 窄屏兜底:全站未启用响应式,这里只做「侧栏落到主栏下方」的单栏回落,
|
||||
// 避免主栏被 360px 侧栏挤成一条缝。
|
||||
@media (max-width: 992px) {
|
||||
&__layout {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
|
||||
@@ -27,7 +27,6 @@ function onBatchPay(): void {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- 设计 30:通栏白条 (0,718) 1920×66,左右内容对齐 x27.25 / x1625.03~1855.4 -->
|
||||
<div class="bill-summary">
|
||||
<div class="bill-summary__inner">
|
||||
<div class="bill-summary__left">
|
||||
@@ -62,7 +61,6 @@ function onBatchPay(): void {
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
|
||||
// 汇总条内容与页面内容区同步留白 70,与上方卡片左右对齐
|
||||
&__inner {
|
||||
.flex(row, space-between, center);
|
||||
width: 1920px;
|
||||
|
||||
@@ -16,7 +16,6 @@ const emit = defineEmits<{
|
||||
'update:selection': [ids: string[]]
|
||||
}>()
|
||||
|
||||
/** 本地勾选集合(由 selectedIds prop 同步) */
|
||||
const selection = ref<Set<string>>(new Set(props.selectedIds))
|
||||
|
||||
watch(
|
||||
@@ -50,8 +49,6 @@ function toggleAll(): void {
|
||||
emit('update:selection', [...selection.value])
|
||||
}
|
||||
|
||||
/** 列宽(设计 30 表头实测:序号 x121.5 / 账单名称 x384.9 / 账单号 x695.09 / 流水号 x843.12 /
|
||||
* 项目名称 x1237.19 / 订单金额 x1576.6 / 状态 x1673.6 / 操作 x1768.6) */
|
||||
const COLUMNS = [
|
||||
{ key: 'index', label: '序号', className: 'bill-table__col--index' },
|
||||
{ key: 'planName', label: '账单名称', className: 'bill-table__col--name' },
|
||||
@@ -148,17 +145,14 @@ const COLUMNS = [
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
// 设计 30:表头 (77.5,344.5) 1765×41.77 底 #F1F3F5;行高 43.77;文字 12px #4B5563
|
||||
.bill-table {
|
||||
width: 1765px;
|
||||
margin: 6.5px 0 0 14.5px; // 表头 x77.5 / y344.5,卡片内缘 x71 / y338
|
||||
margin: 6.5px 0 0 14.5px;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed;
|
||||
font-size: 12px;
|
||||
color: @finance-entry-text;
|
||||
|
||||
// 列宽按设计表头 x 递推(表头起点 x78,实宽 1765):
|
||||
// 序号 x121.5|账单名称 x384.9|账单号 x695.09|流水 x843.12|项目 x1237.19|金额 x1576.6|状态 x1673.6|操作 x1768.6
|
||||
&__col--check { width: 51px; }
|
||||
&__col--index { width: 235.4px; }
|
||||
&__col--name { width: 310.2px; }
|
||||
@@ -180,31 +174,28 @@ const COLUMNS = [
|
||||
text-overflow: ellipsis;
|
||||
box-sizing: border-box;
|
||||
|
||||
// 单元格统一左内缩 10(除已单独指定的列)
|
||||
&:not(&--check):not(&--ops) {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
&--check {
|
||||
padding-left: 43.5px; // 勾选框/序号文字 x121.5 → 表头起点 78
|
||||
padding-left: 43.5px;
|
||||
}
|
||||
|
||||
// 操作列内层 flex 已负责右对齐;单元格本身只管纵向居中
|
||||
&--ops {
|
||||
padding-right: 22px;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
// 各列文字起点对齐设计 x(表头起点 78):内缩 = 设计 x − 列起点
|
||||
@col-pad-1: 43.5px; // 序号 121.5
|
||||
@col-pad-2: 149.9px; // 账单名称 384.9
|
||||
@col-pad-3: 8px; // 账单号 695.09
|
||||
@col-pad-4: 17px; // 流水号 843.12
|
||||
@col-pad-5: 5px; // 项目名称 1237.19
|
||||
@col-pad-6: 14.6px; // 订单金额 1576.6
|
||||
@col-pad-7: 4.6px; // 状态 1673.6
|
||||
@col-pad-8: 6px; // 操作 1768.6(右对齐由内层 flex 兜)
|
||||
@col-pad-1: 43.5px;
|
||||
@col-pad-2: 149.9px;
|
||||
@col-pad-3: 8px;
|
||||
@col-pad-4: 17px;
|
||||
@col-pad-5: 5px;
|
||||
@col-pad-6: 14.6px;
|
||||
@col-pad-7: 4.6px;
|
||||
@col-pad-8: 6px;
|
||||
|
||||
thead &__cell,
|
||||
tbody &__cell {
|
||||
@@ -253,7 +244,6 @@ const COLUMNS = [
|
||||
}
|
||||
|
||||
&__link {
|
||||
// 设计:操作列起点 1746,末位「详情」右缘 1820.36 → 单元格右缘 1842.5
|
||||
padding: 0;
|
||||
border: none;
|
||||
background: transparent;
|
||||
@@ -262,7 +252,6 @@ const COLUMNS = [
|
||||
font-weight: 400;
|
||||
transition: color 0.2s;
|
||||
|
||||
// 「去支付」「详情」并排:设计文字盒距 18.36
|
||||
+ .bill-table__link {
|
||||
margin-left: 18.36px;
|
||||
}
|
||||
|
||||
@@ -3,26 +3,12 @@ import { computed } from 'vue'
|
||||
import type { Bill } from '@/types/business/finance'
|
||||
import { formatMoney } from '@/utils/format'
|
||||
|
||||
/**
|
||||
* 收银台「订单明细」卡。
|
||||
*
|
||||
* <p>结构:卡标题「订单明细」→ 每笔账单一条**描边内嵌行**(期次名 / 账单号 / 关联项目 + 右侧金额)
|
||||
* → 底部「已选 N笔订单,合计」+ 橙色合计金额。</p>
|
||||
*
|
||||
* <p>多笔账单时内嵌行依次堆叠(原型只画了 1 笔,这里按同一规格扩展)。</p>
|
||||
*
|
||||
* <p>⚠️ 字号/内边距按 **Web(桌面)** 尺度取值,不再是移动端设计稿那套:
|
||||
* 卡标题 16px/600 与同目录 `PayMethodDialog`、`FinanceChart`、`WechatQrDialog` 对齐;
|
||||
* 内嵌行内边距 16×18、字段行 12px、金额 16px、合计 20px/700。</p>
|
||||
*/
|
||||
interface Props {
|
||||
/** 待支付账单(一笔或多笔合并支付) */
|
||||
bills: Bill[]
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
||||
/** ⚠️ 金额可能以字符串下发(BigDecimal 序列化)⇒ 必须 Number() 归一,否则 reduce 会拼字符串 */
|
||||
const totalAmount = computed(() =>
|
||||
props.bills.reduce((sum, bill) => sum + Number(bill.amount || 0), 0),
|
||||
)
|
||||
@@ -74,13 +60,11 @@ const totalAmount = computed(() =>
|
||||
|
||||
&__list {
|
||||
.flex(column, flex-start);
|
||||
// `.flex()` 的 align 默认 center,会让内嵌行按内容宽度收缩 ⇒ 这里必须显式拉满
|
||||
align-items: stretch;
|
||||
gap: @spacing-sm;
|
||||
margin-top: @spacing-base;
|
||||
}
|
||||
|
||||
// 描边内嵌行(移动端设计稿实取描边 #e1e1e1、圆角约 7 设计px ≈ 10px)
|
||||
&__item {
|
||||
.flex(row, space-between, center);
|
||||
gap: @spacing-base;
|
||||
@@ -92,7 +76,6 @@ const totalAmount = computed(() =>
|
||||
|
||||
&__main {
|
||||
.flex(column, flex-start);
|
||||
// 同上:期次名 / 账单号 / 关联项目 必须左对齐,不能居中
|
||||
align-items: flex-start;
|
||||
gap: @spacing-xs;
|
||||
min-width: 0;
|
||||
|
||||
@@ -15,7 +15,6 @@ const props = defineProps<Props>()
|
||||
|
||||
const total = computed(() => props.distribution.reduce((sum, item) => sum + item.value, 0))
|
||||
|
||||
/** CSS conic-gradient(无图表库):按 value 占比切分色环(本页隐藏,仅保留绑定) */
|
||||
const gradient = computed(() => {
|
||||
if (total.value <= 0) return 'conic-gradient(#e4e7ec 0% 100%)'
|
||||
let acc = 0
|
||||
@@ -32,9 +31,7 @@ function percentOf(value: number): number {
|
||||
return Math.round((value / total.value) * 100)
|
||||
}
|
||||
|
||||
/** 设计稿 Y 轴刻度(等距 5 档) */
|
||||
const AXIS = [250, 200, 150, 100, 50]
|
||||
/** 设计稿 X 轴月份刻度 */
|
||||
const MONTHS = ['1月', '2月', '3月', '4月', '5月']
|
||||
</script>
|
||||
|
||||
@@ -45,7 +42,6 @@ const MONTHS = ['1月', '2月', '3月', '4月', '5月']
|
||||
</h3>
|
||||
|
||||
<div class="finance-chart__body">
|
||||
<!-- Y 轴刻度 10/400 #9CA3AF -->
|
||||
<ul class="finance-chart__axis" aria-hidden="true">
|
||||
<li v-for="v in AXIS" :key="v" class="finance-chart__axis-item">
|
||||
{{ v }}
|
||||
@@ -53,7 +49,6 @@ const MONTHS = ['1月', '2月', '3月', '4月', '5月']
|
||||
</ul>
|
||||
|
||||
<div class="finance-chart__plot">
|
||||
<!-- 5 条横向网格线(设计 #EDEFF2,1px) -->
|
||||
<div class="finance-chart__grid" aria-hidden="true">
|
||||
<i v-for="v in AXIS" :key="v" class="finance-chart__line" />
|
||||
</div>
|
||||
@@ -67,10 +62,8 @@ const MONTHS = ['1月', '2月', '3月', '4月', '5月']
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 数据源色环:设计稿为柱状图,此处仅保留绑定(隐藏)以免游离变量 -->
|
||||
<div class="finance-chart__pie" :style="{ background: gradient }" />
|
||||
|
||||
<!-- X 轴 11/400 #6B7280 -->
|
||||
<ul class="finance-chart__months" aria-hidden="true">
|
||||
<li v-for="m in MONTHS" :key="m" class="finance-chart__month">
|
||||
{{ m }}
|
||||
@@ -92,16 +85,11 @@ const MONTHS = ['1月', '2月', '3月', '4月', '5月']
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
// 设计 6cd4aa76:图表卡 (70,344) 1780×378、白底 + #F0F1F3 描边;
|
||||
// 标题 ink (82,367) 15/700 #1F2937(竖条 4×20 @#024FFF);
|
||||
// Y 轴刻度 ink100 (103,403/461.5/520/578.5/637) 10/400 #9CA3AF,等距 58.5;
|
||||
// 网格线 x137..1823 宽 1686 @408/466.5/525/583.5/642;X 轴月份 ink100 y649 11/400;
|
||||
// 图例 ink100 y684(互联网软件 x809 / 物联网全案 x903 / 硬件电路 x997 / 生产制造 x1080)11/400
|
||||
.finance-chart {
|
||||
position: relative;
|
||||
height: 378px; // 设计 6cd4aa76:图表卡 (70,344) 1780×378
|
||||
margin-top: 14px; // 概览行底 330 → 图表卡顶 344
|
||||
padding: 23px 23px 0; // 标题 ink y367 → 卡内 23(含 1px 描边);左右 x82 → 卡内 12
|
||||
height: 378px;
|
||||
margin-top: 14px;
|
||||
padding: 23px 23px 0;
|
||||
border: 1px solid @finance-card-line;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
@@ -128,18 +116,16 @@ const MONTHS = ['1月', '2月', '3月', '4月', '5月']
|
||||
}
|
||||
}
|
||||
|
||||
// 绘图区:标题盒底 387 → 首条网格线 408(21)
|
||||
&__body {
|
||||
.flex(row, flex-start, flex-start);
|
||||
gap: 0;
|
||||
margin-top: 21px;
|
||||
}
|
||||
|
||||
// Y 轴刻度列:刻度 ink x103(卡内 33)→ 网格线 x137(卡内 67)
|
||||
&__axis {
|
||||
.flex(column, space-between, flex-start);
|
||||
width: 34px;
|
||||
height: 234px; // 网格线 408 → 642(5 档 4 段,段距 58.5)
|
||||
height: 234px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
@@ -151,7 +137,7 @@ const MONTHS = ['1月', '2月', '3月', '4月', '5月']
|
||||
font-weight: 400;
|
||||
line-height: 14px;
|
||||
color: @finance-axis-text;
|
||||
transform: translateY(-7px); // 刻度 ink 与网格线同一 y 对齐(去掉行盒偏移)
|
||||
transform: translateY(-7px);
|
||||
}
|
||||
|
||||
&__plot {
|
||||
@@ -188,12 +174,10 @@ const MONTHS = ['1月', '2月', '3月', '4月', '5月']
|
||||
background: @finance-chart-bar;
|
||||
}
|
||||
|
||||
// 设计稿无色环:绑定保留但不参与展示
|
||||
&__pie {
|
||||
display: none;
|
||||
}
|
||||
|
||||
// X 轴月份:网格线底 642 → 月份 ink 649(行盒顶 645)
|
||||
&__months {
|
||||
.flex(row, space-around, flex-start);
|
||||
position: absolute;
|
||||
@@ -212,12 +196,11 @@ const MONTHS = ['1月', '2月', '3月', '4月', '5月']
|
||||
color: @finance-muted-text;
|
||||
}
|
||||
|
||||
// 图例:月份盒底 662 → 图例 ink 684(行盒顶 681)
|
||||
&__legend {
|
||||
.flex(row, flex-start, center);
|
||||
gap: 27px;
|
||||
margin: 41px 0 0;
|
||||
padding: 0 0 0 662px; // 图例首项 ink x809 → 卡内 692(轴 34 + 网格起点)
|
||||
padding: 0 0 0 662px;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ const emit = defineEmits<{
|
||||
|
||||
<template>
|
||||
<div class="finance-overview">
|
||||
<!-- 卡内文字块:相对卡顶 26(设计 221 − 195) -->
|
||||
<div class="finance-overview__main">
|
||||
<p class="finance-overview__label">
|
||||
累计消费总额
|
||||
@@ -26,7 +25,6 @@ const emit = defineEmits<{
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- 右上角「2026年账单 ›」 -->
|
||||
<button class="finance-overview__period-link" @click="emit('periodChange', 'year')">
|
||||
{{ stats?.month || '2026年账单' }}
|
||||
<span aria-hidden="true">›</span>
|
||||
@@ -35,8 +33,6 @@ const emit = defineEmits<{
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
// 设计 6cd4aa76:渐变卡 (70,195) 1093.84×135;标签 (100,221) 13/400 #FFFFFF;
|
||||
// 金额 (100,254) 38/700;右上角「2026年账单 ›」(1066.98,220) 11/500
|
||||
.finance-overview {
|
||||
position: relative;
|
||||
flex: 1 1 auto;
|
||||
@@ -48,8 +44,8 @@ const emit = defineEmits<{
|
||||
|
||||
&__main {
|
||||
.flex(column, flex-start, flex-start);
|
||||
padding: 26px 0 0 30px; // 标签 ink (100,221) → 卡内 (30,26)
|
||||
gap: 16px; // 标签盒底 238 → 金额盒顶 254
|
||||
padding: 26px 0 0 30px;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
&__label {
|
||||
@@ -66,7 +62,6 @@ const emit = defineEmits<{
|
||||
color: @white;
|
||||
}
|
||||
|
||||
// 右上角链接:设计 x1066.98 y220 → 卡内右缘 27、顶 25
|
||||
&__period-link {
|
||||
position: absolute;
|
||||
top: 25px;
|
||||
|
||||
@@ -15,7 +15,6 @@ const emit = defineEmits<{
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- 设计 35/36:整幅宽卡——左侧「默认抬头」蓝胶囊,右侧操作按钮;下方三栏字段 -->
|
||||
<div class="invoice-title-card">
|
||||
<div class="invoice-title-card__top">
|
||||
<span v-if="invoiceTitle.isDefault" class="invoice-title-card__badge">默认抬头</span>
|
||||
@@ -54,27 +53,24 @@ const emit = defineEmits<{
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
// 设计 35:卡片 (70,229) 1780×129 / (70,372) 1780×88
|
||||
.invoice-title-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
width: 1780px;
|
||||
min-height: 88px;
|
||||
padding: 0 33.56px 0 27px; // 徽标 x98.58、按钮右缘 1820.6(卡内 1750.6)
|
||||
padding: 0 33.56px 0 27px;
|
||||
border: 1px solid @finance-card-line;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
box-sizing: border-box;
|
||||
|
||||
// 顶行:徽标 (98.58,249) 88.17×22 + 操作按钮 (1632.4,277.5) 各 12/500
|
||||
&__top {
|
||||
.flex(row, space-between, center);
|
||||
height: 49px; // 徽标盒 y249(卡顶 229 + 20 居中)
|
||||
height: 49px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
// 「默认抬头」胶囊:蓝底白字 11/500
|
||||
&__badge {
|
||||
.flex(row, center, center);
|
||||
height: 22px;
|
||||
@@ -91,7 +87,6 @@ const emit = defineEmits<{
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
// 操作按钮:纯文字 12/500 #4B5563,盒距 20.8(文字盒 67.2/43.2/43.2 + 间隔 4)
|
||||
&__actions {
|
||||
.flex(row, flex-end, center);
|
||||
gap: 24px;
|
||||
@@ -112,17 +107,16 @@ const emit = defineEmits<{
|
||||
}
|
||||
}
|
||||
|
||||
// 三栏:列起点(卡内,卡 x70 → 内容 x97/579/1061)= 0 / 482 / 964
|
||||
&__cols {
|
||||
.flex(row, flex-start, flex-start);
|
||||
gap: 0;
|
||||
padding-top: 2px; // 顶行 59 → 标签 ink y293(卡内 64)
|
||||
padding-bottom: 30px; // 值底 y335(卡内 106)→ 卡底 358
|
||||
padding-top: 2px;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
&__col {
|
||||
.flex(column, flex-start, flex-start);
|
||||
gap: 8px; // 标签 ink 293 → 值 ink 316
|
||||
gap: 8px;
|
||||
width: 482px;
|
||||
box-sizing: border-box;
|
||||
|
||||
|
||||
@@ -2,21 +2,7 @@
|
||||
import type { PayMethod } from '@/types/business/finance'
|
||||
import { PAY_METHODS } from '@/utils/payMeta'
|
||||
|
||||
/**
|
||||
* 收银台「选择支付方式」卡。
|
||||
*
|
||||
* <p>结构:卡头「选择支付方式」+ 下方两行支付方式**满宽铺满卡片**(选中行整行底色点亮,
|
||||
* 微信 = 浅绿),右侧圆形单选钮。</p>
|
||||
*
|
||||
* <p>⚠️ 卡头**不带序号徽标**:早期按移动端设计稿做过一个黄色方形「1」,
|
||||
* 与原型 `docs/prototype/财务中心-演示.html` 的「选择支付方式」弹窗(只有标题 + × 关闭)
|
||||
* 不一致,已按用户要求删除。</p>
|
||||
*
|
||||
* <p>⚠️ 字号/尺寸按 **Web(桌面)** 尺度取值:卡标题 16px/600(与同目录 `PayMethodDialog` 对齐)、
|
||||
* 行高 72px、图标 40px、单选钮 20px —— 不再沿用移动端设计稿那套 57px 行高 / 32px 图标。</p>
|
||||
*/
|
||||
interface Props {
|
||||
/** 当前选中的支付方式 */
|
||||
modelValue: PayMethod
|
||||
}
|
||||
|
||||
@@ -53,7 +39,6 @@ function select(value: PayMethod): void {
|
||||
@keydown.space.prevent="select(item.value)"
|
||||
>
|
||||
<span class="pay-method__icon" :class="`pay-method__icon--${item.value}`" aria-hidden="true">
|
||||
<!-- 微信:绿底白双气泡 -->
|
||||
<svg
|
||||
v-if="item.value === 'wechat'"
|
||||
class="pay-method__logo"
|
||||
@@ -74,7 +59,6 @@ function select(value: PayMethod): void {
|
||||
<circle class="pay-method__eye" cx="19" cy="20" r="1.3" />
|
||||
<circle class="pay-method__eye" cx="24" cy="20" r="1.3" />
|
||||
</svg>
|
||||
<!-- 支付宝:蓝底白「支」 -->
|
||||
<template v-else>支</template>
|
||||
</span>
|
||||
|
||||
@@ -98,7 +82,6 @@ function select(value: PayMethod): void {
|
||||
background: @checkout-card;
|
||||
overflow: hidden;
|
||||
|
||||
// 卡头:与「订单明细」卡标题同规格(左右内边距与卡内其它内容对齐)
|
||||
&__head {
|
||||
padding: @spacing-lg @spacing-lg @spacing-base;
|
||||
}
|
||||
@@ -109,7 +92,6 @@ function select(value: PayMethod): void {
|
||||
color: @heading-color;
|
||||
}
|
||||
|
||||
// 支付方式行:满宽铺满卡片(移动端设计稿实取 x 5..242 = 整卡宽)
|
||||
&__row {
|
||||
.flex(row, flex-start, center);
|
||||
gap: @spacing-base;
|
||||
@@ -157,7 +139,6 @@ function select(value: PayMethod): void {
|
||||
fill: @white;
|
||||
}
|
||||
|
||||
// 前景气泡描边取图标底色 → 与后景气泡之间留出白-绿分隔缝
|
||||
&__bubble-front {
|
||||
fill: @white;
|
||||
stroke: @checkout-wechat;
|
||||
@@ -170,7 +151,6 @@ function select(value: PayMethod): void {
|
||||
|
||||
&__text {
|
||||
.flex(column, flex-start);
|
||||
// `.flex()` 的 align 默认 center,会让「名称 / 副标题」各自居中 ⇒ 必须显式左对齐
|
||||
align-items: flex-start;
|
||||
gap: 2px;
|
||||
flex: 1;
|
||||
@@ -198,7 +178,6 @@ function select(value: PayMethod): void {
|
||||
flex-shrink: 0;
|
||||
transition: all 0.2s;
|
||||
|
||||
// 选中:实心圆 + 白色对勾
|
||||
&.is-checked::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
|
||||
@@ -4,23 +4,10 @@ import qrcode from 'qrcode-generator'
|
||||
import { useCountDown } from '@/composables/useCountDown'
|
||||
import { formatMoney } from '@/utils/format'
|
||||
|
||||
/**
|
||||
* 微信 Native 支付二维码弹窗。
|
||||
*
|
||||
* <p>后端 `/pay/web/wechat/native` 返回 `codeUrl`(形如 `weixin://wxpay/bizpayurl?pr=xxx`),
|
||||
* 本组件用 `qrcode-generator` 把它渲染成二维码(`createSvgTag` → `v-html`),
|
||||
* 用户用微信「扫一扫」完成支付。</p>
|
||||
*
|
||||
* <p>⚠️ 后端**没有「查询支付结果」接口**,所以没有轮询——付完由用户点「我已完成支付」
|
||||
* 进入支付结果页;二维码倒计时只是展示(Native 侧 `code_url` 真实有效期由微信控制)。</p>
|
||||
*/
|
||||
interface Props {
|
||||
visible: boolean
|
||||
/** 二维码内容(微信 codeUrl) */
|
||||
content: string
|
||||
/** 订单金额(元) */
|
||||
amount: number
|
||||
/** 二维码倒计时(秒),默认 5 分钟 */
|
||||
expiresIn?: number
|
||||
}
|
||||
|
||||
@@ -28,9 +15,7 @@ const props = withDefaults(defineProps<Props>(), { expiresIn: 300 })
|
||||
|
||||
const emit = defineEmits<{
|
||||
'update:visible': [visible: boolean]
|
||||
/** 重新下单换一张二维码 */
|
||||
refresh: []
|
||||
/** 用户声明已付款 */
|
||||
paid: []
|
||||
}>()
|
||||
|
||||
@@ -45,7 +30,6 @@ const countdownText = computed(() => {
|
||||
return `${String(m).padStart(2, '0')}:${String(s).padStart(2, '0')}`
|
||||
})
|
||||
|
||||
/** 内容仅来自后端下发的 codeUrl,本地生成 SVG,非用户输入 */
|
||||
const qrSvg = computed(() => {
|
||||
if (!props.content) return ''
|
||||
try {
|
||||
@@ -105,7 +89,6 @@ function onBoxClick(): void {
|
||||
:class="{ 'is-expired': expired }"
|
||||
@click="onBoxClick"
|
||||
>
|
||||
<!-- eslint-disable-next-line vue/no-v-html -- 内容由本地 QR 库生成,非用户输入 -->
|
||||
<div v-if="!expired && qrSvg" class="wx-qr__code" v-html="qrSvg" />
|
||||
<div v-else class="wx-qr__mask">
|
||||
<span class="wx-qr__mask-icon">⟳</span>
|
||||
@@ -185,7 +168,6 @@ function onBoxClick(): void {
|
||||
height: 100%;
|
||||
padding: @spacing-sm;
|
||||
|
||||
// v-html 注入的 SVG 拿不到 scoped 属性,必须 :deep
|
||||
:deep(svg) {
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
||||
@@ -5,7 +5,6 @@ import { storeToRefs } from 'pinia'
|
||||
import { RouterLink } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { PageHead } from '@/components'
|
||||
// 页面容器:只做组件组合与事件中转,数据只经 store
|
||||
import { useFinanceStore } from '@/stores/modules/finance'
|
||||
import FinanceChart from './cpns/FinanceChart.vue'
|
||||
import FinanceOverview from './cpns/FinanceOverview.vue'
|
||||
@@ -75,28 +74,22 @@ onMounted(() => {
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
// 财务中心概览(设计 6cd4aa76,1920 画布 1:1)
|
||||
// 页头区 (70,162) 1780×17 副标语 13/400 #6B7280(标题 22/700 由全站页头统一渲染)
|
||||
// 概览行 y195 h135:左渐变卡 1093.84 宽、右白卡 672.16 宽(间距 14)
|
||||
// 图表卡 (70,344) 1780×378,白底 + #F0F1F3 描边
|
||||
.finance {
|
||||
width: 100%;
|
||||
|
||||
// 顶部行:左渐变卡 + 右快捷卡,间距 14
|
||||
&__top {
|
||||
.flex(row, flex-start, stretch);
|
||||
gap: 14px;
|
||||
margin-top: -56px; // 页头白条通栏高 179,卡片按设计压在 y195
|
||||
margin-top: -56px;
|
||||
}
|
||||
|
||||
// 右侧快捷入口白卡 672.16×135
|
||||
&__entries {
|
||||
.flex(row, space-between, center);
|
||||
flex: 0 0 672px;
|
||||
height: 135px;
|
||||
padding: 0 34px;
|
||||
border: 1px solid @finance-card-line;
|
||||
border-radius: @radius-base; // 设计无圆角?——卡面 8 以内,与全站一致
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ import { computed, onMounted, ref } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { ConfirmDialog } from '@/components'
|
||||
// 页面容器:数据只经 store,不直接 import api
|
||||
import { useFinanceStore } from '@/stores/modules/finance'
|
||||
import type { InvoiceTitle, InvoiceTitlePayload } from '@/types/business/finance'
|
||||
import InvoiceTitleCard from './cpns/InvoiceTitleCard.vue'
|
||||
@@ -25,7 +24,6 @@ const pageCount = computed(() => Math.max(1, Math.ceil(titles.value.length / PAG
|
||||
const pagedTitles = computed(() =>
|
||||
titles.value.slice((page.value - 1) * PAGE_SIZE, page.value * PAGE_SIZE),
|
||||
)
|
||||
/** 页码序列:设计 35 实取 1~5 */
|
||||
const pages = computed(() => Array.from({ length: Math.max(5, pageCount.value) }, (_, i) => i + 1))
|
||||
|
||||
function go(next: number): void {
|
||||
@@ -80,7 +78,6 @@ onMounted(() => {
|
||||
<template>
|
||||
<div class="invoice-titles">
|
||||
<div class="container">
|
||||
<!-- 面包屑 (70,124)「财务中心 /」13/400 #9CA3AF +「发票抬头管理」13/500 #4B5563 -->
|
||||
<nav class="invoice-titles__breadcrumb">
|
||||
<RouterLink to="/finance" class="invoice-titles__breadcrumb-link">
|
||||
财务中心 /
|
||||
@@ -88,7 +85,6 @@ onMounted(() => {
|
||||
<span class="invoice-titles__breadcrumb-current">发票抬头管理</span>
|
||||
</nav>
|
||||
|
||||
<!-- 标题条 (70,153) 1780×62:标题 x106 y174 15/700 + 右侧「+ 新增抬头」 -->
|
||||
<header class="invoice-titles__head">
|
||||
<h2 class="invoice-titles__title">
|
||||
发票管理
|
||||
@@ -98,7 +94,6 @@ onMounted(() => {
|
||||
</button>
|
||||
</header>
|
||||
|
||||
<!-- 抬头卡列表 (70,229) 起 1780×129 / (70,372) 1780×88 -->
|
||||
<div class="invoice-titles__list">
|
||||
<InvoiceTitleCard
|
||||
v-for="item in pagedTitles"
|
||||
@@ -113,7 +108,6 @@ onMounted(() => {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- 分页 (1684.93~1881.07,505) 12/400 -->
|
||||
<nav class="invoice-titles__pager" aria-label="分页">
|
||||
<button class="invoice-titles__page" :disabled="page <= 1" @click="go(page - 1)">
|
||||
‹
|
||||
@@ -151,16 +145,14 @@ onMounted(() => {
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
// 设计 35/36 发票抬头管理(1920 画布 1:1)——内容区 x70→1850 = 1780
|
||||
.invoice-titles {
|
||||
width: 100%;
|
||||
padding-bottom: 459px; // 分页底 521 → 页脚 1087
|
||||
padding-bottom: 459px;
|
||||
background: @contract-page-bg;
|
||||
|
||||
// 面包屑 (70,124)
|
||||
&__breadcrumb {
|
||||
.flex(row, flex-start, center);
|
||||
height: 81px; // 顶栏 72 → 标题条 153,面包屑盒 72..133
|
||||
height: 81px;
|
||||
padding-top: 36px;
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
@@ -178,16 +170,15 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
&__breadcrumb-current {
|
||||
margin-left: 5.25px; // 「财务中心 /」墨迹宽 65.25 → 发票抬头管理 x135.25
|
||||
margin-left: 5.25px;
|
||||
color: @finance-entry-text;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
// 标题条 (70,153) 1780×62
|
||||
&__head {
|
||||
.flex(row, space-between, center);
|
||||
height: 62px;
|
||||
padding: 0 33.56px 0 36px; // 标题 x106;按钮右缘 1822
|
||||
padding: 0 33.56px 0 36px;
|
||||
border: 1px solid @finance-card-line;
|
||||
border-radius: @radius-base;
|
||||
background: @white;
|
||||
@@ -201,11 +192,10 @@ onMounted(() => {
|
||||
color: @finance-ink;
|
||||
}
|
||||
|
||||
// 「+ 新增抬头」(1735.56,167) 110.44×34
|
||||
&__create {
|
||||
width: 110.44px;
|
||||
height: 34px;
|
||||
margin-right: -5px; // 按钮右缘 1822 → 卡内缩 33.56 得 1816.44,再右移 5
|
||||
margin-right: -5px;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
background: @primary-strong;
|
||||
@@ -219,11 +209,10 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
|
||||
// 抬头卡纵排:首卡 (70,229)、次卡 (70,372) → 间距 14
|
||||
&__list {
|
||||
.flex(column, flex-start, stretch);
|
||||
gap: 14px;
|
||||
margin-top: 14px; // 标题条底 215 → 首卡 229
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
&__empty {
|
||||
@@ -233,12 +222,11 @@ onMounted(() => {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
// 分页:右对齐到内容区右缘,页码 12/400
|
||||
&__pager {
|
||||
.flex(row, flex-end, center);
|
||||
gap: 3.7px;
|
||||
margin-top: 8px; // 次卡底 460 → 页码 ink 505
|
||||
padding-right: 2.4px; // 末位「›」右缘 1881.07 → 内容右缘 1850
|
||||
margin-top: 8px;
|
||||
padding-right: 2.4px;
|
||||
}
|
||||
|
||||
&__page {
|
||||
|
||||
@@ -4,7 +4,6 @@ import { storeToRefs } from 'pinia'
|
||||
import { RouterLink } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { FilterPanel, PaginationBar, StatusTag } from '@/components'
|
||||
// 页面容器:数据只经 store,不直接 import api
|
||||
import { useFinanceStore } from '@/stores/modules/finance'
|
||||
import type { Invoice, InvoiceStatus } from '@/types/business/finance'
|
||||
import { formatMoney } from '@/utils/format'
|
||||
@@ -220,7 +219,6 @@ onMounted(() => {
|
||||
margin: 0 auto;
|
||||
padding: @spacing-lg @spacing-base @spacing-xxl;
|
||||
|
||||
// 与财务中心其他页一致:面包屑 11px、前缀灰当前页深灰
|
||||
&__breadcrumb {
|
||||
font-size: 11px;
|
||||
color: @text-color-disabled;
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
import { computed, onMounted } from 'vue'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
// 页面容器:数据只经 store,不直接 import api
|
||||
import { useFinanceStore } from '@/stores/modules/finance'
|
||||
import { formatMoney } from '@/utils/format'
|
||||
|
||||
@@ -13,7 +12,6 @@ const { result } = storeToRefs(financeStore)
|
||||
|
||||
const billId = computed(() => String(route.params.id))
|
||||
|
||||
/** 需求 id(收银台带过来):有它就走「需求 + 期次」的财务口径查支付结果 */
|
||||
const requirementId = computed(() => {
|
||||
const raw = route.query.requirementId
|
||||
return String(Array.isArray(raw) ? raw[0] : (raw ?? '')).trim()
|
||||
@@ -32,7 +30,6 @@ onMounted(() => {
|
||||
<template>
|
||||
<div class="pay-result">
|
||||
<div class="container">
|
||||
<!-- 面包屑 (67,95)「财务中心 / 账单明细 /」+「支付成功」13/500 #4B5563 -->
|
||||
<nav class="pay-result__breadcrumb">
|
||||
<RouterLink to="/finance" class="pay-result__crumb-link">
|
||||
财务中心 /
|
||||
@@ -44,28 +41,22 @@ onMounted(() => {
|
||||
</nav>
|
||||
|
||||
<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>
|
||||
|
||||
<!-- 标题 (900.3,331) 22/700 #1F2937,字距 6 -->
|
||||
<h2 class="pay-result__title">
|
||||
支付成功
|
||||
</h2>
|
||||
|
||||
<!-- 金额行 (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>
|
||||
@@ -96,7 +87,6 @@ onMounted(() => {
|
||||
</div>
|
||||
</dl>
|
||||
|
||||
<!-- 已支付订单 (799,574) 13/700 -->
|
||||
<h4 class="pay-result__sub-title pay-result__sub-title--bills">
|
||||
已支付订单
|
||||
</h4>
|
||||
@@ -119,7 +109,6 @@ onMounted(() => {
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- 返回 (1031,711) 84×32 #024FFF 12/500 白字,右对齐 -->
|
||||
<div class="pay-result__footer">
|
||||
<button
|
||||
class="pay-result__back"
|
||||
@@ -140,13 +129,11 @@ onMounted(() => {
|
||||
</template>
|
||||
|
||||
<style lang="less" scoped>
|
||||
// 设计「支付成功」c56193d1(1920 画布 1:1)——316 居中窄列坐在页面底色上
|
||||
.pay-result {
|
||||
width: 100%;
|
||||
padding-bottom: 344px; // 列底 743 → 页脚 1087
|
||||
padding-bottom: 344px;
|
||||
background: @contract-page-bg;
|
||||
|
||||
// 面包屑 (67,95):头部底 73 → 文字盒顶 95 = 22
|
||||
&__breadcrumb {
|
||||
.flex(row, flex-start, center);
|
||||
padding-top: 22px;
|
||||
@@ -166,17 +153,15 @@ onMounted(() => {
|
||||
|
||||
&__crumb-current {
|
||||
margin-left: 3px;
|
||||
color: @finance-entry-text; // 设计 #4B5563
|
||||
color: @finance-entry-text;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
// 主列 316,居中(面包屑底 112 → 圆顶 187 = 75)
|
||||
&__col {
|
||||
width: 316px;
|
||||
margin: 75px auto 0;
|
||||
}
|
||||
|
||||
// 绿圆勾 120×120 #7ED321
|
||||
&__check {
|
||||
.flex(row, center, center);
|
||||
width: 120px;
|
||||
@@ -190,7 +175,6 @@ onMounted(() => {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
// 标题:圆底 307 → 331 = 24;盒 113.3 ≈ 4×22 + 4×6 字距
|
||||
&__title {
|
||||
margin: 24px -6px 0 0;
|
||||
text-align: center;
|
||||
@@ -201,7 +185,6 @@ onMounted(() => {
|
||||
color: @finance-ink;
|
||||
}
|
||||
|
||||
// 金额行:标题底 360 → 374 = 14;13/400 灰 + 18/700 #EF4444 基线对齐
|
||||
&__amount-row {
|
||||
.flex(row, center, baseline);
|
||||
margin-top: 14px;
|
||||
@@ -218,11 +201,10 @@ onMounted(() => {
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
line-height: 24px;
|
||||
color: @danger-color; // 设计 #EF4444
|
||||
color: @danger-color;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
// 分割线:金额行底 398 → 428 = 30
|
||||
&__divider {
|
||||
height: 1px;
|
||||
margin-top: 30px;
|
||||
@@ -230,18 +212,17 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
&__sub-title {
|
||||
margin-top: 20px; // 线底 429 → 449 = 20
|
||||
margin-top: 20px;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
line-height: 17px;
|
||||
color: @finance-ink;
|
||||
|
||||
&--bills {
|
||||
margin-top: 22px; // 末行底 552 → 574 = 22
|
||||
margin-top: 22px;
|
||||
}
|
||||
}
|
||||
|
||||
// 支付信息三行:标题底 466 → 首行 480 = 14;行高 16 步进 28 → gap 12
|
||||
&__fields {
|
||||
.flex(column, flex-start, stretch);
|
||||
gap: 12px;
|
||||
@@ -268,7 +249,6 @@ onMounted(() => {
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
// 白卡:标题底 591 → 601 = 10;316×84 白底描边 #F0F1F3
|
||||
&__bill-list {
|
||||
.flex(column, flex-start, stretch);
|
||||
margin-top: 10px;
|
||||
@@ -314,15 +294,14 @@ onMounted(() => {
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
line-height: 16px;
|
||||
color: @project-muted; // 设计 #9CA3AF
|
||||
color: @project-muted;
|
||||
.ellipsis();
|
||||
|
||||
+ .pay-result__bill-meta {
|
||||
margin-top: 0; // 账单号 638 → 关联项目 654 连排
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 返回按钮:卡底 685 → 711 = 26,右对齐 84×32 #024FFF
|
||||
&__footer {
|
||||
.flex(row, flex-end, flex-start);
|
||||
margin-top: 26px;
|
||||
|
||||
@@ -4,7 +4,6 @@ import { storeToRefs } from 'pinia'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { AppButton, QrCodePanel } from '@/components'
|
||||
// 页面容器:数据只经 store,不直接 import api
|
||||
import { useFinanceStore } from '@/stores/modules/finance'
|
||||
import type { PayMethod } from '@/types/business/finance'
|
||||
import { formatMoney } from '@/utils/format'
|
||||
@@ -74,7 +73,6 @@ onMounted(() => {
|
||||
<span>扫码支付</span>
|
||||
</nav>
|
||||
|
||||
<!-- 设计 33/34:单张大白卡——左(渠道说明 + 切换)/ 中(金额 + 二维码)/ 右(步骤 + 订单明细 + 安全提示) -->
|
||||
<div class="pay__body card">
|
||||
<section class="pay__left">
|
||||
<div class="pay__left-top">
|
||||
@@ -142,7 +140,6 @@ onMounted(() => {
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!-- 设计 33:操作按钮在大卡右下方 -->
|
||||
<div class="pay__footer">
|
||||
<AppButton type="primary" size="lg" @click="onPaid">
|
||||
完成支付
|
||||
@@ -167,7 +164,6 @@ onMounted(() => {
|
||||
margin: 0 auto;
|
||||
padding: @spacing-lg @spacing-base @spacing-xxl;
|
||||
|
||||
// 设计 33:面包屑 13 设计px → 11px,前缀灰、当前页深灰
|
||||
&__breadcrumb {
|
||||
margin-bottom: @spacing-base;
|
||||
font-size: 11px;
|
||||
@@ -178,7 +174,6 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
|
||||
// 设计 33:整页单张大白卡,左中右三区
|
||||
&__body {
|
||||
.flex(row, flex-start, flex-start);
|
||||
gap: 24px;
|
||||
@@ -195,7 +190,6 @@ onMounted(() => {
|
||||
gap: @spacing-base;
|
||||
}
|
||||
|
||||
// 左区顶行:渠道说明靠左、切换支付方式胶囊靠右(设计 33 右上角)
|
||||
&__left-top {
|
||||
.flex(row, space-between, center);
|
||||
align-self: stretch;
|
||||
@@ -230,7 +224,6 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
|
||||
// 中区:支付金额标签 15 设计px → 12px,金额 34 设计px → 26px 粗体红
|
||||
&__amount-block {
|
||||
text-align: center;
|
||||
}
|
||||
@@ -248,14 +241,12 @@ onMounted(() => {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
// 二维码占位(QrCodePanel 内部压成设计稿的灰色方块)
|
||||
:deep(.qr-panel__box) {
|
||||
border: none;
|
||||
background: @contract-qr-bg;
|
||||
border-radius: @radius-base;
|
||||
}
|
||||
|
||||
// 倒计时行 → 浅红胶囊(设计 33「二维码将在 04:32 后失效」)
|
||||
:deep(.qr-panel__status) {
|
||||
font-size: 11px;
|
||||
color: @danger-color;
|
||||
@@ -269,7 +260,6 @@ onMounted(() => {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
// 右区:步骤 + 订单明细 + 安全提示(设计 33 右列 400 设计px ≈ 310px)
|
||||
&__right {
|
||||
flex: 0 0 310px;
|
||||
display: flex;
|
||||
@@ -283,7 +273,6 @@ onMounted(() => {
|
||||
font-weight: 700;
|
||||
color: @heading-color;
|
||||
|
||||
// 「订单明细」小节按设计 33 降为 13 设计px → 11px
|
||||
}
|
||||
|
||||
&__detail &__sub-title {
|
||||
@@ -294,7 +283,6 @@ onMounted(() => {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
// 三步指引:序号实底蓝圆 024FFF,步骤文字 14 设计px → 11px
|
||||
&__step-list {
|
||||
.flex(column, flex-start, stretch);
|
||||
gap: 12px;
|
||||
@@ -323,7 +311,6 @@ onMounted(() => {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
// 订单明细:浅灰底板 + 白底行卡(设计 33 实取 #F7F8F9 / #FFFFFF)
|
||||
&__detail-list {
|
||||
.flex(column, flex-start, stretch);
|
||||
gap: 6px;
|
||||
@@ -356,7 +343,6 @@ onMounted(() => {
|
||||
color: @danger-color;
|
||||
}
|
||||
|
||||
// 安全提示横幅:浅绿底 + 绿字(设计 33 实取 #D2EEDC / #16A34A)
|
||||
&__safe {
|
||||
padding: 8px 12px;
|
||||
border-radius: @radius-sm;
|
||||
@@ -367,7 +353,6 @@ onMounted(() => {
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
// 卡下操作区:右对齐(设计 33 返回按钮在卡右下)
|
||||
&__footer {
|
||||
.flex(row, flex-end, center);
|
||||
gap: @spacing-base;
|
||||
|
||||
Reference in New Issue
Block a user