- 新增 invoice_title、showcase、wallet_log 模型及对应语言包 - 新增后台控制器、视图及搜索字段配置 - 修复服务类目删除保护逻辑 - 优化后台登录页面文案及样式 - 新增前端角色切换逻辑及页面拦截 - 新增 SVG 图标及样式变量 - 修复接口权限及下拉框默认值问题
1049 行
24 KiB
Vue
1049 行
24 KiB
Vue
<template>
|
|
<view class="page">
|
|
<YjyfNavBar theme="orange" title="确认开票信息" :fixed="true" :placeholder="true" />
|
|
|
|
<template v-if="!loadingInit && orders.length > 0">
|
|
<view class="main-body">
|
|
<!-- 1. 顶部信封式发票抬头选择卡 -->
|
|
<view class="title-card clickable-hover" @tap="handleTitleCardTap">
|
|
<image class="title-card-ico" src="/static/icons/invoice-addr-card.svg" mode="aspectFit" />
|
|
|
|
<view class="title-card-body" v-if="currentTitle">
|
|
<view class="tc-line1">
|
|
<text class="tc-tag" v-if="currentTitle.is_default">默认</text>
|
|
<text class="tc-name">{{ currentTitle.title }}</text>
|
|
</view>
|
|
|
|
<text class="tc-tax" v-if="currentTitle.title_type === 'enterprise' && currentTitle.tax_no">
|
|
{{ currentTitle.tax_no }}
|
|
</text>
|
|
|
|
<template v-if="invoiceType === 'special' && currentTitle.title_type === 'enterprise'">
|
|
<text class="tc-spec-line" v-if="currentTitle.can_special">
|
|
{{ currentTitle.bank_name }} · {{ currentTitle.bank_account }}
|
|
</text>
|
|
<view class="tc-spec-warn" v-else @tap.stop="completeSpecialInfo">
|
|
<text class="tc-warn-txt">去补全开户行与注册地址</text>
|
|
<image class="tc-warn-arrow" src="/static/icons/arrow-right-orange.svg" mode="aspectFit" />
|
|
</view>
|
|
</template>
|
|
</view>
|
|
|
|
<view class="title-card-empty" v-else>
|
|
<text class="empty-main">选择或添加发票抬头</text>
|
|
</view>
|
|
|
|
<image class="arrow-ico" src="/static/icons/arrow-right.svg" mode="aspectFit" />
|
|
</view>
|
|
|
|
<!-- 2. 发票信息卡片 -->
|
|
<view class="card">
|
|
<text class="section-title">发票信息</text>
|
|
|
|
<view class="form-row">
|
|
<text class="row-label">发票类型</text>
|
|
<view class="seg-track">
|
|
<view
|
|
class="seg-item clickable-hover"
|
|
:class="{ on: invoiceType === 'normal' }"
|
|
@tap="switchInvoiceType('normal')"
|
|
>
|
|
普通发票
|
|
</view>
|
|
<view
|
|
class="seg-item clickable-hover"
|
|
:class="{ on: invoiceType === 'special' }"
|
|
@tap="switchInvoiceType('special')"
|
|
>
|
|
专用发票
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="form-row">
|
|
<text class="row-label">发票内容</text>
|
|
<text class="row-static">*现代服务*安装维修服务费</text>
|
|
</view>
|
|
|
|
<view class="form-row clickable-hover" @tap="showOrderItems = !showOrderItems">
|
|
<text class="row-label">关联订单</text>
|
|
<view class="order-fold-r">
|
|
<text class="fold-txt">{{ orders.length }} 笔订单</text>
|
|
<image
|
|
class="fold-ico"
|
|
:src="showOrderItems ? '/static/icons/chevron-up-gray.svg' : '/static/icons/chevron-down-gray.svg'"
|
|
mode="aspectFit"
|
|
/>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="mini-orders" v-if="showOrderItems">
|
|
<view class="mo-row" v-for="ord in orders" :key="ord.id">
|
|
<text class="mo-name">{{ ord.service_name }}</text>
|
|
<text class="mo-amt">¥{{ Number(ord.invoiceable_amount).toFixed(2) }}</text>
|
|
</view>
|
|
<view class="mo-more clickable-hover" v-if="unbilledCount > orders.length" @tap="goMergeMore">
|
|
<text class="mo-more-txt">重新选择订单</text>
|
|
<image class="tc-warn-arrow" src="/static/icons/arrow-right-orange.svg" mode="aspectFit" />
|
|
</view>
|
|
</view>
|
|
|
|
<view class="form-row no-border">
|
|
<text class="row-label">发票备注</text>
|
|
<input
|
|
class="row-input"
|
|
v-model="remark"
|
|
maxlength="200"
|
|
placeholder="选填"
|
|
/>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 3. 接收方式卡片 -->
|
|
<view class="card">
|
|
<text class="section-title">接收方式</text>
|
|
|
|
<view class="form-row">
|
|
<text class="row-label required">电子邮箱</text>
|
|
<input
|
|
class="row-input"
|
|
v-model="email"
|
|
maxlength="100"
|
|
placeholder="必填,接收电子发票"
|
|
/>
|
|
</view>
|
|
|
|
<view class="form-row no-border">
|
|
<text class="row-label">通知手机</text>
|
|
<input
|
|
class="row-input"
|
|
type="number"
|
|
maxlength="11"
|
|
v-model="receiveMobile"
|
|
placeholder="选填"
|
|
/>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 底部固定提交栏 -->
|
|
<view class="bottom-bar">
|
|
<view class="bar-sum">
|
|
<text class="bar-sum-k">开票金额</text>
|
|
<view class="bar-amt-line">
|
|
<text class="bar-sym">¥</text>
|
|
<text class="bar-int">{{ splitAmt(totalAmount).int }}</text>
|
|
<text class="bar-dec">.{{ splitAmt(totalAmount).dec }}</text>
|
|
</view>
|
|
</view>
|
|
<view
|
|
class="submit-btn clickable-hover"
|
|
:class="{ disabled: submitting }"
|
|
@tap="openConfirmDialog"
|
|
>
|
|
{{ submitting ? '提交中...' : '提交申请' }}
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<!-- 加载态 -->
|
|
<view class="state-box" v-else-if="loadingInit">
|
|
<text class="state-txt">加载中...</text>
|
|
</view>
|
|
|
|
<!-- 无有效待开票订单兜底态 -->
|
|
<view class="state-box" v-else>
|
|
<image class="empty-ico" src="/static/icons/empty-invoice-records.svg" mode="aspectFit" />
|
|
<text class="state-title">所选订单暂不可开票</text>
|
|
<view class="ghost-btn clickable-hover" @tap="rechooseOrders">重新选择</view>
|
|
</view>
|
|
|
|
<!-- 提交前二次核对模态框 -->
|
|
<view class="confirm-mask" v-if="showConfirmModal" @tap="showConfirmModal = false">
|
|
<view class="confirm-dialog" @tap.stop>
|
|
<view class="cd-hero">
|
|
<text class="cd-title">核对开票信息</text>
|
|
<view class="cd-amt-row">
|
|
<text class="cd-sym">¥</text>
|
|
<text class="cd-int">{{ splitAmt(totalAmount).int }}</text>
|
|
<text class="cd-dec">.{{ splitAmt(totalAmount).dec }}</text>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="cd-divider">
|
|
<view class="cd-notch left"></view>
|
|
<view class="cd-dash"></view>
|
|
<view class="cd-notch right"></view>
|
|
</view>
|
|
|
|
<view class="cd-body" v-if="currentTitle">
|
|
<view class="cd-row">
|
|
<text class="cd-k">发票类型</text>
|
|
<text class="cd-v tag">{{ invoiceType === 'special' ? '增值税专用发票' : '电子普通发票' }}</text>
|
|
</view>
|
|
<view class="cd-row">
|
|
<text class="cd-k">发票抬头</text>
|
|
<text class="cd-v bold">{{ currentTitle.title }}</text>
|
|
</view>
|
|
<view class="cd-row" v-if="currentTitle.title_type === 'enterprise'">
|
|
<text class="cd-k">纳税人识别号</text>
|
|
<text class="cd-v mono">{{ currentTitle.tax_no }}</text>
|
|
</view>
|
|
<view class="cd-row">
|
|
<text class="cd-k">接收邮箱</text>
|
|
<text class="cd-v mono">{{ email }}</text>
|
|
</view>
|
|
</view>
|
|
|
|
<text class="cd-tip">电子发票开具后不可直接修改</text>
|
|
|
|
<view class="cd-actions">
|
|
<view class="cd-btn cancel clickable-hover" @tap="showConfirmModal = false">返回修改</view>
|
|
<view class="cd-btn primary clickable-hover" :class="{ disabled: submitting }" @tap="confirmSubmit">
|
|
{{ submitting ? '提交中...' : '确认开票' }}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ref, computed } from 'vue';
|
|
import { onLoad, onShow, onUnload } from '@dcloudio/uni-app';
|
|
import YjyfNavBar from '@/components/YjyfNavBar.vue';
|
|
import api from '@/utils/api.js';
|
|
import { isLogin, toLogin } from '@/utils/request.js';
|
|
|
|
const orderIdsParam = ref([]);
|
|
const orders = ref([]);
|
|
const titles = ref([]);
|
|
const unbilledCount = ref(0);
|
|
const currentTitle = ref(null);
|
|
const invoiceType = ref('normal');
|
|
const email = ref('');
|
|
const receiveMobile = ref('');
|
|
const remark = ref('');
|
|
const showOrderItems = ref(false);
|
|
const loadingInit = ref(true);
|
|
const showConfirmModal = ref(false);
|
|
const submitting = ref(false);
|
|
const initializedOnce = ref(false);
|
|
|
|
const totalAmount = computed(() => {
|
|
let sum = 0;
|
|
for (const ord of orders.value) {
|
|
sum += Number(ord.invoiceable_amount || 0);
|
|
}
|
|
return Math.round(sum * 100) / 100;
|
|
});
|
|
|
|
function splitAmt(v) {
|
|
const n = Number(v || 0);
|
|
const s = (Number.isFinite(n) ? n : 0).toFixed(2);
|
|
const p = s.split('.');
|
|
return { int: p[0] || '0', dec: p[1] || '00' };
|
|
}
|
|
|
|
function applySelectedTitle(item) {
|
|
if (!item || !item.id) return;
|
|
currentTitle.value = item;
|
|
if (item.title_type === 'personal' && invoiceType.value === 'special') {
|
|
invoiceType.value = 'normal';
|
|
} else if (item.default_invoice_type === 'special' && item.can_special) {
|
|
invoiceType.value = 'special';
|
|
}
|
|
if (item.email) {
|
|
email.value = item.email;
|
|
}
|
|
if (item.receive_mobile) {
|
|
receiveMobile.value = item.receive_mobile;
|
|
}
|
|
}
|
|
|
|
onLoad((q) => {
|
|
const raw = (q && (q.order_ids || q.order_id)) ? String(q.order_ids || q.order_id) : '';
|
|
orderIdsParam.value = raw
|
|
.split(',')
|
|
.map((s) => Number(s.trim()))
|
|
.filter((n) => n > 0);
|
|
|
|
uni.$on('yjyf:selectInvoiceTitle', applySelectedTitle);
|
|
uni.$on('yjyf:savedInvoiceTitle', applySelectedTitle);
|
|
});
|
|
|
|
onUnload(() => {
|
|
uni.$off('yjyf:selectInvoiceTitle', applySelectedTitle);
|
|
uni.$off('yjyf:savedInvoiceTitle', applySelectedTitle);
|
|
});
|
|
|
|
onShow(() => {
|
|
if (!isLogin()) {
|
|
toLogin();
|
|
return;
|
|
}
|
|
loadData();
|
|
});
|
|
|
|
async function loadData() {
|
|
if (!orderIdsParam.value.length) {
|
|
loadingInit.value = false;
|
|
orders.value = [];
|
|
return;
|
|
}
|
|
if (!initializedOnce.value) {
|
|
loadingInit.value = true;
|
|
}
|
|
try {
|
|
const [ordRes, sumRes] = await Promise.all([
|
|
api.invoiceOrders({ order_ids: orderIdsParam.value.join(','), limit: 100 }),
|
|
api.invoiceSummary()
|
|
]);
|
|
|
|
orders.value = (ordRes && ordRes.list) || [];
|
|
const q = (sumRes && sumRes.quota) || {};
|
|
const tList = (sumRes && sumRes.titles) || [];
|
|
titles.value = tList;
|
|
unbilledCount.value = Number(q.unbilled_order_count || 0);
|
|
|
|
if (currentTitle.value && currentTitle.value.id) {
|
|
const refreshed = tList.find((t) => Number(t.id) === Number(currentTitle.value.id));
|
|
if (refreshed) {
|
|
applySelectedTitle(refreshed);
|
|
} else {
|
|
currentTitle.value = tList.length > 0 ? tList[0] : null;
|
|
}
|
|
} else if (tList.length > 0) {
|
|
applySelectedTitle(tList[0]);
|
|
}
|
|
|
|
if (!email.value && q.default_email) {
|
|
email.value = q.default_email;
|
|
}
|
|
if (!receiveMobile.value && q.default_mobile) {
|
|
receiveMobile.value = q.default_mobile;
|
|
}
|
|
initializedOnce.value = true;
|
|
} catch (e) {
|
|
// request.js 已统一提示
|
|
} finally {
|
|
loadingInit.value = false;
|
|
}
|
|
}
|
|
|
|
function handleTitleCardTap() {
|
|
if (titles.value.length === 0) {
|
|
const targetType = invoiceType.value === 'special' ? 'enterprise' : 'personal';
|
|
uni.navigateTo({
|
|
url: `/pages/invoice/title-edit?type=${targetType}&invoice_type=${invoiceType.value}&auto_select=1`
|
|
});
|
|
return;
|
|
}
|
|
uni.navigateTo({ url: '/pages/invoice/titles?select=1' });
|
|
}
|
|
|
|
function completeSpecialInfo() {
|
|
if (!currentTitle.value || !currentTitle.value.id) return;
|
|
uni.navigateTo({
|
|
url: `/pages/invoice/title-edit?id=${currentTitle.value.id}&invoice_type=special&auto_select=1`
|
|
});
|
|
}
|
|
|
|
function switchInvoiceType(target) {
|
|
if (target === 'normal') {
|
|
invoiceType.value = 'normal';
|
|
return;
|
|
}
|
|
if (currentTitle.value && currentTitle.value.title_type === 'personal') {
|
|
const ent = titles.value.find((t) => t.title_type === 'enterprise');
|
|
if (ent) {
|
|
invoiceType.value = 'special';
|
|
applySelectedTitle(ent);
|
|
uni.showToast({ title: '已切换至企业抬头', icon: 'none' });
|
|
return;
|
|
}
|
|
uni.showModal({
|
|
title: '专票需使用企业抬头',
|
|
content: '增值税专用发票仅支持企业单位申请,是否立即添加企业发票抬头?',
|
|
confirmText: '去添加',
|
|
confirmColor: '#F0710D',
|
|
success: (res) => {
|
|
if (res.confirm) {
|
|
invoiceType.value = 'special';
|
|
uni.navigateTo({
|
|
url: '/pages/invoice/title-edit?type=enterprise&invoice_type=special&auto_select=1'
|
|
});
|
|
}
|
|
}
|
|
});
|
|
return;
|
|
}
|
|
invoiceType.value = 'special';
|
|
}
|
|
|
|
function goMergeMore() {
|
|
const ids = orders.value.map((o) => o.id).join(',');
|
|
uni.redirectTo({ url: `/pages/invoice/orders?preselect=${ids}` });
|
|
}
|
|
|
|
function rechooseOrders() {
|
|
uni.redirectTo({ url: '/pages/invoice/orders' });
|
|
}
|
|
|
|
function openConfirmDialog() {
|
|
if (!orders.value.length) {
|
|
uni.showToast({ title: '未找到可开票订单', icon: 'none' });
|
|
return;
|
|
}
|
|
if (!currentTitle.value || !currentTitle.value.id) {
|
|
uni.showToast({ title: '请先选择或添加发票抬头', icon: 'none' });
|
|
handleTitleCardTap();
|
|
return;
|
|
}
|
|
if (invoiceType.value === 'special') {
|
|
if (currentTitle.value.title_type !== 'enterprise') {
|
|
uni.showToast({ title: '增值税专票请选择企业单位抬头', icon: 'none' });
|
|
return;
|
|
}
|
|
if (!currentTitle.value.can_special) {
|
|
uni.showModal({
|
|
title: '需完善专票信息',
|
|
content: '当前企业抬头尚未填写完整的开户银行、账号及注册地址电话,请先补全后再提交。',
|
|
confirmText: '去完善',
|
|
confirmColor: '#F0710D',
|
|
success: (res) => {
|
|
if (res.confirm) completeSpecialInfo();
|
|
}
|
|
});
|
|
return;
|
|
}
|
|
}
|
|
|
|
const mail = email.value.trim();
|
|
if (!mail) {
|
|
uni.showToast({ title: '请填写接收电子发票的邮箱', icon: 'none' });
|
|
return;
|
|
}
|
|
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(mail)) {
|
|
uni.showToast({ title: '电子邮箱格式不正确', icon: 'none' });
|
|
return;
|
|
}
|
|
|
|
const mob = receiveMobile.value.trim();
|
|
if (mob && !/^1\d{10}$/.test(mob)) {
|
|
uni.showToast({ title: '通知手机号格式不正确', icon: 'none' });
|
|
return;
|
|
}
|
|
|
|
showConfirmModal.value = true;
|
|
}
|
|
|
|
async function confirmSubmit() {
|
|
if (submitting.value || !currentTitle.value) return;
|
|
submitting.value = true;
|
|
try {
|
|
const res = await api.invoiceApply({
|
|
order_ids: orders.value.map((o) => o.id),
|
|
title_id: currentTitle.value.id,
|
|
type: invoiceType.value,
|
|
title_type: currentTitle.value.title_type,
|
|
email: email.value.trim(),
|
|
receive_mobile: receiveMobile.value.trim(),
|
|
remark: remark.value.trim()
|
|
});
|
|
showConfirmModal.value = false;
|
|
uni.showToast({ title: '开票申请已提交', icon: 'success' });
|
|
setTimeout(() => {
|
|
if (res && res.invoice_id) {
|
|
uni.redirectTo({ url: `/pages/invoice/detail?id=${res.invoice_id}` });
|
|
} else {
|
|
uni.redirectTo({ url: '/pages/invoice/records' });
|
|
}
|
|
}, 400);
|
|
} catch (e) {
|
|
// request.js 已统一提示错误
|
|
} finally {
|
|
submitting.value = false;
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.page {
|
|
min-height: 100vh;
|
|
background: $yjyf-bg-page;
|
|
padding-bottom: calc(180rpx + env(safe-area-inset-bottom));
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.main-body {
|
|
padding: $yjyf-space-md $yjyf-space-lg 0;
|
|
}
|
|
|
|
/* 1. 顶部抬头选择名片 */
|
|
.title-card {
|
|
position: relative;
|
|
overflow: hidden;
|
|
background: $yjyf-bg-card;
|
|
border-radius: $yjyf-radius-card;
|
|
padding: $yjyf-space-lg $yjyf-space-md 36rpx;
|
|
margin-bottom: 20rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
box-shadow: 0 6rpx 20rpx rgba(31, 31, 31, 0.04);
|
|
|
|
&::after {
|
|
content: '';
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
height: 6rpx;
|
|
background: repeating-linear-gradient(
|
|
-45deg,
|
|
$yjyf-primary 0,
|
|
$yjyf-primary 20rpx,
|
|
transparent 20rpx,
|
|
transparent 30rpx,
|
|
$yjyf-info 30rpx,
|
|
$yjyf-info 50rpx,
|
|
transparent 50rpx,
|
|
transparent 60rpx
|
|
);
|
|
}
|
|
}
|
|
|
|
.title-card-ico {
|
|
width: 72rpx;
|
|
height: 72rpx;
|
|
flex-shrink: 0;
|
|
margin-right: $yjyf-space-md;
|
|
}
|
|
|
|
.title-card-body,
|
|
.title-card-empty {
|
|
flex: 1;
|
|
min-width: 0;
|
|
margin-right: $yjyf-space-sm;
|
|
}
|
|
|
|
.tc-line1 {
|
|
display: flex;
|
|
align-items: center;
|
|
min-width: 0;
|
|
}
|
|
|
|
.tc-tag {
|
|
height: 36rpx;
|
|
padding: 0 12rpx;
|
|
border-radius: 8rpx;
|
|
font-size: $yjyf-font-micro;
|
|
font-weight: 600;
|
|
color: $yjyf-primary;
|
|
background: $yjyf-primary-bg;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
margin-right: 12rpx;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.tc-name {
|
|
flex: 1;
|
|
min-width: 0;
|
|
font-size: $yjyf-font-title;
|
|
font-weight: 700;
|
|
color: $yjyf-text-main;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.tc-tax {
|
|
display: block;
|
|
font-size: $yjyf-font-micro;
|
|
color: $yjyf-text-secondary;
|
|
margin-top: 8rpx;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.tc-spec-line {
|
|
display: block;
|
|
font-size: $yjyf-font-micro;
|
|
color: $yjyf-text-muted;
|
|
margin-top: 4rpx;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.tc-spec-warn {
|
|
margin-top: 10rpx;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.tc-warn-txt {
|
|
font-size: $yjyf-font-micro;
|
|
color: $yjyf-primary;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.tc-warn-arrow {
|
|
width: 22rpx;
|
|
height: 22rpx;
|
|
margin-left: 4rpx;
|
|
}
|
|
|
|
.empty-main {
|
|
font-size: $yjyf-font-title;
|
|
font-weight: 700;
|
|
color: $yjyf-primary;
|
|
}
|
|
|
|
.arrow-ico {
|
|
width: 26rpx;
|
|
height: 26rpx;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* 2. 通用分组卡片 */
|
|
.card {
|
|
background: $yjyf-bg-card;
|
|
border-radius: $yjyf-radius-card;
|
|
padding: $yjyf-space-md;
|
|
margin-bottom: 20rpx;
|
|
box-shadow: 0 6rpx 20rpx rgba(31, 31, 31, 0.04);
|
|
}
|
|
|
|
.section-title {
|
|
display: block;
|
|
font-size: $yjyf-font-title;
|
|
font-weight: 700;
|
|
color: $yjyf-text-main;
|
|
margin-bottom: 8rpx;
|
|
}
|
|
|
|
.form-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
min-height: 92rpx;
|
|
padding: 4rpx 0;
|
|
border-bottom: 1rpx solid $yjyf-border-color;
|
|
|
|
&.no-border {
|
|
border-bottom: none;
|
|
padding-bottom: 0;
|
|
}
|
|
}
|
|
|
|
.row-label {
|
|
font-size: $yjyf-font-body;
|
|
color: $yjyf-text-regular;
|
|
width: 156rpx;
|
|
flex-shrink: 0;
|
|
|
|
&.required::after {
|
|
content: '*';
|
|
color: $yjyf-danger;
|
|
margin-left: 4rpx;
|
|
}
|
|
}
|
|
|
|
.seg-track {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding: 6rpx;
|
|
border-radius: $yjyf-radius-pill;
|
|
background: $yjyf-bg-page;
|
|
}
|
|
|
|
.seg-item {
|
|
height: 56rpx;
|
|
padding: 0 28rpx;
|
|
border-radius: $yjyf-radius-pill;
|
|
font-size: $yjyf-font-sub;
|
|
color: $yjyf-text-secondary;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.18s ease;
|
|
|
|
&.on {
|
|
background: $yjyf-bg-card;
|
|
color: $yjyf-primary;
|
|
font-weight: 700;
|
|
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.06);
|
|
}
|
|
}
|
|
|
|
.row-static {
|
|
font-size: $yjyf-font-body;
|
|
color: $yjyf-text-main;
|
|
text-align: right;
|
|
}
|
|
|
|
.order-fold-r {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.fold-txt {
|
|
font-size: $yjyf-font-body;
|
|
color: $yjyf-text-main;
|
|
margin-right: 8rpx;
|
|
}
|
|
|
|
.fold-ico {
|
|
width: 26rpx;
|
|
height: 26rpx;
|
|
}
|
|
|
|
.mini-orders {
|
|
background: $yjyf-bg-page;
|
|
border-radius: 14rpx;
|
|
padding: 12rpx 20rpx;
|
|
margin: 8rpx 0;
|
|
}
|
|
|
|
.mo-row {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12rpx 0;
|
|
border-bottom: 1rpx dashed $yjyf-border-color;
|
|
|
|
&:last-child {
|
|
border-bottom: none;
|
|
}
|
|
}
|
|
|
|
.mo-name {
|
|
flex: 1;
|
|
min-width: 0;
|
|
font-size: $yjyf-font-sub;
|
|
color: $yjyf-text-regular;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
margin-right: $yjyf-space-sm;
|
|
}
|
|
|
|
.mo-amt {
|
|
font-size: $yjyf-font-sub;
|
|
font-weight: 600;
|
|
color: $yjyf-text-main;
|
|
font-variant-numeric: tabular-nums;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.mo-more {
|
|
padding-top: 12rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.mo-more-txt {
|
|
font-size: $yjyf-font-micro;
|
|
color: $yjyf-primary;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.row-input {
|
|
flex: 1;
|
|
height: 80rpx;
|
|
font-size: $yjyf-font-body;
|
|
color: $yjyf-text-main;
|
|
text-align: right;
|
|
}
|
|
|
|
/* 底部操作栏 */
|
|
.bottom-bar {
|
|
position: fixed;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(255, 255, 255, 0.95);
|
|
backdrop-filter: blur(16px);
|
|
border-top: 1rpx solid $yjyf-border-color;
|
|
box-shadow: $yjyf-shadow-bar;
|
|
padding: 20rpx $yjyf-space-lg calc(20rpx + env(safe-area-inset-bottom));
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
z-index: 20;
|
|
}
|
|
|
|
.bar-sum {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.bar-sum-k {
|
|
font-size: $yjyf-font-micro;
|
|
color: $yjyf-text-secondary;
|
|
}
|
|
|
|
.bar-amt-line {
|
|
display: flex;
|
|
align-items: baseline;
|
|
margin-top: 2rpx;
|
|
}
|
|
|
|
.bar-sym {
|
|
font-size: $yjyf-font-sub;
|
|
font-weight: 700;
|
|
color: $yjyf-primary;
|
|
margin-right: 2rpx;
|
|
}
|
|
|
|
.bar-int {
|
|
font-size: 40rpx;
|
|
font-weight: 700;
|
|
color: $yjyf-primary;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.bar-dec {
|
|
font-size: $yjyf-font-body;
|
|
font-weight: 700;
|
|
color: $yjyf-primary;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.submit-btn {
|
|
min-width: 260rpx;
|
|
height: 86rpx;
|
|
padding: 0 $yjyf-space-xl;
|
|
border-radius: $yjyf-radius-pill;
|
|
background: $yjyf-gradient-primary;
|
|
box-shadow: $yjyf-shadow-button;
|
|
color: $yjyf-text-inverse;
|
|
font-size: $yjyf-font-body;
|
|
font-weight: 700;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
&.disabled {
|
|
background: $yjyf-text-disabled;
|
|
box-shadow: none;
|
|
}
|
|
}
|
|
|
|
.state-box {
|
|
padding: 160rpx $yjyf-space-lg;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
|
|
.empty-ico {
|
|
width: 168rpx;
|
|
height: 168rpx;
|
|
margin-bottom: $yjyf-space-md;
|
|
}
|
|
|
|
.state-title {
|
|
font-size: $yjyf-font-title;
|
|
font-weight: 600;
|
|
color: $yjyf-text-main;
|
|
}
|
|
|
|
.state-txt {
|
|
font-size: $yjyf-font-sub;
|
|
color: $yjyf-text-secondary;
|
|
}
|
|
|
|
.ghost-btn {
|
|
margin-top: $yjyf-space-lg;
|
|
height: 72rpx;
|
|
padding: 0 $yjyf-space-xl;
|
|
border-radius: $yjyf-radius-pill;
|
|
border: 2rpx solid $yjyf-primary;
|
|
background: $yjyf-bg-card;
|
|
color: $yjyf-primary;
|
|
font-size: $yjyf-font-sub;
|
|
font-weight: 600;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
/* 二次核对弹窗 */
|
|
.confirm-mask {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
backdrop-filter: blur(4px);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 0 $yjyf-space-xl;
|
|
z-index: 100;
|
|
}
|
|
|
|
.confirm-dialog {
|
|
position: relative;
|
|
overflow: hidden;
|
|
width: 100%;
|
|
background: $yjyf-bg-card;
|
|
border-radius: $yjyf-radius-lg;
|
|
box-sizing: border-box;
|
|
box-shadow: 0 24rpx 64rpx rgba(0, 0, 0, 0.16);
|
|
}
|
|
|
|
.cd-hero {
|
|
background: linear-gradient(180deg, $yjyf-primary-bg 0%, $yjyf-bg-card 100%);
|
|
padding: 36rpx $yjyf-space-lg 16rpx;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
|
|
.cd-title {
|
|
font-size: $yjyf-font-title;
|
|
font-weight: 700;
|
|
color: $yjyf-text-main;
|
|
}
|
|
|
|
.cd-amt-row {
|
|
margin-top: 12rpx;
|
|
display: flex;
|
|
align-items: baseline;
|
|
}
|
|
|
|
.cd-sym {
|
|
font-size: $yjyf-font-body;
|
|
font-weight: 700;
|
|
color: $yjyf-primary;
|
|
margin-right: 4rpx;
|
|
}
|
|
|
|
.cd-int {
|
|
font-size: 52rpx;
|
|
font-weight: 700;
|
|
color: $yjyf-primary;
|
|
line-height: 1.1;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.cd-dec {
|
|
font-size: $yjyf-font-title;
|
|
font-weight: 700;
|
|
color: $yjyf-primary;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.cd-divider {
|
|
position: relative;
|
|
height: 24rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.cd-dash {
|
|
flex: 1;
|
|
margin: 0 $yjyf-space-lg;
|
|
border-top: 2rpx dashed $yjyf-border-color;
|
|
}
|
|
|
|
.cd-notch {
|
|
position: absolute;
|
|
width: 24rpx;
|
|
height: 24rpx;
|
|
border-radius: $yjyf-radius-pill;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
|
|
&.left {
|
|
left: -12rpx;
|
|
}
|
|
|
|
&.right {
|
|
right: -12rpx;
|
|
}
|
|
}
|
|
|
|
.cd-body {
|
|
padding: 8rpx $yjyf-space-lg;
|
|
}
|
|
|
|
.cd-row {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
padding: 12rpx 0;
|
|
}
|
|
|
|
.cd-k {
|
|
font-size: $yjyf-font-sub;
|
|
color: $yjyf-text-secondary;
|
|
width: 164rpx;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.cd-v {
|
|
flex: 1;
|
|
font-size: $yjyf-font-sub;
|
|
color: $yjyf-text-main;
|
|
text-align: right;
|
|
word-break: break-all;
|
|
|
|
&.bold {
|
|
font-weight: 700;
|
|
}
|
|
|
|
&.mono {
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
&.tag {
|
|
color: $yjyf-primary;
|
|
font-weight: 600;
|
|
}
|
|
}
|
|
|
|
.cd-tip {
|
|
display: block;
|
|
text-align: center;
|
|
font-size: $yjyf-font-micro;
|
|
color: $yjyf-text-muted;
|
|
margin: 16rpx 0 24rpx;
|
|
}
|
|
|
|
.cd-actions {
|
|
padding: 0 $yjyf-space-lg $yjyf-space-lg;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: $yjyf-space-md;
|
|
}
|
|
|
|
.cd-btn {
|
|
flex: 1;
|
|
height: 82rpx;
|
|
border-radius: $yjyf-radius-pill;
|
|
font-size: $yjyf-font-body;
|
|
font-weight: 700;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
|
|
&.cancel {
|
|
background: $yjyf-bg-page;
|
|
color: $yjyf-text-regular;
|
|
}
|
|
|
|
&.primary {
|
|
background: $yjyf-gradient-primary;
|
|
box-shadow: $yjyf-shadow-button;
|
|
color: $yjyf-text-inverse;
|
|
}
|
|
|
|
&.disabled {
|
|
background: $yjyf-text-disabled;
|
|
box-shadow: none;
|
|
}
|
|
}
|
|
</style>
|