2026-02-27 16:44:41 +08:00
|
|
|
|
<template>
|
2026-05-29 13:30:56 +08:00
|
|
|
|
<div class="order-page">
|
2026-05-31 18:36:52 +08:00
|
|
|
|
<header class="order-topbar">
|
|
|
|
|
|
<button class="topbar-icon" type="button" aria-label="返回" @click="router.back()">
|
|
|
|
|
|
<LeftOutlined />
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<h1>订单中心</h1>
|
|
|
|
|
|
<button class="topbar-icon" type="button" aria-label="购物车" @click="router.push('/cart')">
|
|
|
|
|
|
<ShoppingOutlined />
|
|
|
|
|
|
</button>
|
2026-02-27 16:44:41 +08:00
|
|
|
|
</header>
|
|
|
|
|
|
|
2026-05-29 13:30:56 +08:00
|
|
|
|
<main class="order-content">
|
|
|
|
|
|
<section v-if="orders.length" class="status-tabs" aria-label="订单状态筛选">
|
|
|
|
|
|
<button
|
|
|
|
|
|
v-for="tab in statusTabs"
|
|
|
|
|
|
:key="String(tab.value)"
|
|
|
|
|
|
class="status-tab"
|
|
|
|
|
|
:class="{ active: filters.status === tab.value }"
|
|
|
|
|
|
type="button"
|
|
|
|
|
|
@click="setStatusFilter(tab.value)"
|
|
|
|
|
|
>
|
|
|
|
|
|
<span>{{ tab.label }}</span>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
|
|
<section v-if="!orders.length" class="empty-state">
|
|
|
|
|
|
<a-empty description="暂无订单">
|
|
|
|
|
|
<a-button type="primary" @click="router.push('/products')">去逛逛</a-button>
|
|
|
|
|
|
</a-empty>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
<section v-else-if="!filteredOrders.length" class="empty-state">
|
|
|
|
|
|
<a-empty description="没有符合条件的订单">
|
|
|
|
|
|
<a-button @click="resetFilters">清空筛选</a-button>
|
|
|
|
|
|
</a-empty>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
<section v-else class="order-list">
|
|
|
|
|
|
<article
|
|
|
|
|
|
v-for="order in filteredOrders"
|
|
|
|
|
|
:key="order.id"
|
|
|
|
|
|
class="order-card"
|
|
|
|
|
|
:class="{ focused: sameId(focusedOrderId, order.id) }"
|
2026-05-23 21:56:18 +08:00
|
|
|
|
>
|
2026-05-31 18:36:52 +08:00
|
|
|
|
<div
|
|
|
|
|
|
class="order-card__cover"
|
|
|
|
|
|
:class="{ focused: sameId(focusedOrderItemId, orderPrimaryItem(order)?.id) }"
|
|
|
|
|
|
@click="router.push(`/orders/${order.id}`)"
|
|
|
|
|
|
>
|
|
|
|
|
|
<img
|
|
|
|
|
|
v-if="orderCoverImage(order)"
|
|
|
|
|
|
:src="orderCoverImage(order)"
|
|
|
|
|
|
:alt="orderPrimaryTitle(order)"
|
|
|
|
|
|
loading="lazy"
|
|
|
|
|
|
decoding="async"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<span v-else>{{ orderCoverFallback(order) }}</span>
|
2026-02-27 16:44:41 +08:00
|
|
|
|
</div>
|
2026-05-29 13:30:56 +08:00
|
|
|
|
|
2026-05-31 18:36:52 +08:00
|
|
|
|
<div class="order-card__body">
|
|
|
|
|
|
<div class="order-card__head">
|
|
|
|
|
|
<div class="order-card__title-block">
|
|
|
|
|
|
<h2>{{ orderPrimaryTitle(order) }}</h2>
|
|
|
|
|
|
<p>
|
|
|
|
|
|
<UserOutlined />
|
|
|
|
|
|
<span>美甲师:{{ orderArtistName(order) }}</span>
|
|
|
|
|
|
</p>
|
2026-05-29 13:30:56 +08:00
|
|
|
|
</div>
|
2026-05-31 18:36:52 +08:00
|
|
|
|
<span class="status-pill" :class="orderStatusClass(order)">{{ orderDisplayStatus(order) }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="order-info-grid">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<span>{{ orderTimeLabel(order) }}</span>
|
|
|
|
|
|
<strong>{{ orderTimeText(order) }}</strong>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<span>{{ orderAmountLabel(order) }}</span>
|
|
|
|
|
|
<strong class="amount">{{ formatAmount(order.actualAmount || order.totalAmount) }}</strong>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="order-card__meta">
|
|
|
|
|
|
<span>{{ order.shopName || '待确认门店' }}</span>
|
|
|
|
|
|
<span v-if="orderItemCount(order) > 1">共 {{ orderItemCount(order) }} 个项目</span>
|
|
|
|
|
|
<button type="button" @click="copyOrderNo(order.orderNo)">复制订单号</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
2026-06-04 16:39:06 +08:00
|
|
|
|
<section v-if="isQuoteConfirming(order)" class="quote-panel" :class="{ 'quote-panel--collapsed': isQuoteHistoryCollapsed(order) }">
|
|
|
|
|
|
<div class="quote-panel__head">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<span>报价摘要</span>
|
|
|
|
|
|
<strong>{{ quoteStatusText(order) }}</strong>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="quote-panel__head-actions">
|
|
|
|
|
|
<em>{{ quoteExpireText(order) }}</em>
|
|
|
|
|
|
<button
|
|
|
|
|
|
v-if="order.quoteUserConfirmed"
|
|
|
|
|
|
type="button"
|
|
|
|
|
|
class="quote-history-toggle"
|
|
|
|
|
|
@click="toggleQuoteHistory(order)"
|
|
|
|
|
|
>
|
|
|
|
|
|
{{ isQuoteHistoryCollapsed(order) ? '展开历史' : '收起历史' }}
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div v-if="isQuoteHistoryCollapsed(order)" class="quote-collapsed-summary">
|
|
|
|
|
|
<span>你已确认当前报价</span>
|
|
|
|
|
|
<span>{{ quoteHistoryCountText(order) }}</span>
|
|
|
|
|
|
<span>{{ quoteExpireText(order) }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<template v-else>
|
|
|
|
|
|
<p class="quote-remark">客户备注:{{ order.customerRemark || '暂无备注' }}</p>
|
|
|
|
|
|
<div class="quote-flags">
|
|
|
|
|
|
<span :class="{ active: order.quoteUserConfirmed }">用户{{ order.quoteUserConfirmed ? '已确认' : '待确认' }}</span>
|
|
|
|
|
|
<span :class="{ active: order.quoteShopConfirmed }">门店{{ order.quoteShopConfirmed ? '已确认' : '待确认' }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="quote-items">
|
|
|
|
|
|
<div v-for="item in orderItems(order)" :key="item.id || item.productId" class="quote-item">
|
|
|
|
|
|
<strong>{{ item.productTitle || '预约项目' }}</strong>
|
|
|
|
|
|
<span>参考价 {{ formatQuoteAmount(quoteReferencePrice(item), '待确认') }}</span>
|
|
|
|
|
|
<span>当前报价 {{ formatQuoteAmount(item.quotedPrice, '待报价') }}</span>
|
|
|
|
|
|
<span>最终价 {{ formatQuoteAmount(item.confirmedPrice, '待确认') }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="quote-history">
|
|
|
|
|
|
<strong>报价历史</strong>
|
|
|
|
|
|
<div v-if="quoteMessages(order).length" class="quote-history__list">
|
|
|
|
|
|
<article v-for="(quoteMessage, index) in quoteMessages(order)" :key="quoteMessageKey(quoteMessage, index)" class="quote-history__item">
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<span>{{ quoteActorText(quoteMessage) }}</span>
|
|
|
|
|
|
<em>{{ quoteActionText(quoteMessage) }}</em>
|
|
|
|
|
|
<small>{{ formatTimelineTime(quoteMessage.createTime) || '--' }}</small>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p v-if="quoteMessage.remark">{{ quoteMessage.remark }}</p>
|
|
|
|
|
|
<div v-if="quoteMessageItems(quoteMessage).length" class="quote-history__prices">
|
|
|
|
|
|
<span v-for="quoteItem in quoteMessageItems(quoteMessage)" :key="quoteMessageItemKey(quoteItem)">
|
|
|
|
|
|
{{ quoteMessageItemText(order, quoteItem) }}
|
|
|
|
|
|
</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</article>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<p v-else>暂无报价历史</p>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div v-if="!order.quoteUserConfirmed" class="quote-reply">
|
|
|
|
|
|
<a-textarea
|
|
|
|
|
|
v-model:value="quoteReplyForms[String(order.id)]"
|
|
|
|
|
|
:rows="2"
|
|
|
|
|
|
:maxlength="300"
|
|
|
|
|
|
placeholder="给门店补充说明或回复当前报价"
|
|
|
|
|
|
/>
|
|
|
|
|
|
<div class="quote-reply__actions">
|
|
|
|
|
|
<button type="button" class="order-action" :disabled="isQuoteBusy(order)" @click="submitQuoteReply(order)">发送回复</button>
|
|
|
|
|
|
<button
|
|
|
|
|
|
type="button"
|
|
|
|
|
|
class="order-action order-action--primary"
|
|
|
|
|
|
:disabled="isQuoteBusy(order) || !orderHasCurrentQuote(order)"
|
|
|
|
|
|
@click="confirmQuote(order)"
|
|
|
|
|
|
>
|
|
|
|
|
|
确认当前报价
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div v-else class="quote-confirmed-bar">你已确认当前报价,报价内容已归档为历史</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
2026-05-31 18:36:52 +08:00
|
|
|
|
<div v-if="orderExtensionItems(order).length" class="order-extension-list">
|
|
|
|
|
|
<div
|
|
|
|
|
|
v-for="item in orderExtensionItems(order)"
|
|
|
|
|
|
:key="item.id"
|
|
|
|
|
|
class="order-extension"
|
|
|
|
|
|
:class="{ focused: sameId(focusedOrderItemId, item.id) }"
|
|
|
|
|
|
>
|
2026-05-29 13:30:56 +08:00
|
|
|
|
<div v-if="submittedReviewForItem(order, item)" class="review-summary">
|
|
|
|
|
|
已评价:{{ formatRating(submittedReviewForItem(order, item)?.rating) }} 分
|
|
|
|
|
|
<span v-if="submittedReviewForItem(order, item)?.content"> · {{ submittedReviewForItem(order, item)?.content }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div v-else-if="pendingReviewForItem(order, item)" class="review-action">
|
|
|
|
|
|
<span>待评价:{{ pendingReviewForItem(order, item)?.artistName || item.artistName || '美甲师' }}</span>
|
2026-05-31 18:36:52 +08:00
|
|
|
|
<button type="button" @click="openReviewModal(pendingReviewForItem(order, item))">评价</button>
|
2026-05-29 13:30:56 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div v-if="pendingChangeRequestForItem(order, item)" class="change-request">
|
|
|
|
|
|
<div class="change-info">
|
|
|
|
|
|
<strong>待处理改派申请</strong>
|
|
|
|
|
|
<span>原美甲师:{{ artistChangeDisplay(pendingChangeRequestForItem(order, item), item).originalArtistName }}</span>
|
|
|
|
|
|
<span>新美甲师:{{ artistChangeDisplay(pendingChangeRequestForItem(order, item), item).requestedArtistName }}</span>
|
|
|
|
|
|
<span v-if="pendingChangeRequestForItem(order, item)?.reason">原因:{{ pendingChangeRequestForItem(order, item)?.reason }}</span>
|
|
|
|
|
|
<div class="impact-list">
|
|
|
|
|
|
<span v-for="line in artistChangeDisplay(pendingChangeRequestForItem(order, item), item).impactLines" :key="line">{{ line }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="change-actions">
|
2026-05-31 18:36:52 +08:00
|
|
|
|
<button type="button" class="order-action order-action--primary" @click="approveArtistChange(pendingChangeRequestForItem(order, item))">同意</button>
|
|
|
|
|
|
<button type="button" class="order-action order-action--danger" @click="openRejectArtistChange(pendingChangeRequestForItem(order, item))">拒绝</button>
|
2026-05-29 13:30:56 +08:00
|
|
|
|
</div>
|
2026-05-23 21:56:18 +08:00
|
|
|
|
</div>
|
2026-05-23 15:16:40 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2026-03-19 20:19:41 +08:00
|
|
|
|
|
2026-05-31 18:36:52 +08:00
|
|
|
|
<div class="order-card__actions">
|
|
|
|
|
|
<button v-if="orderNeedsReview(order)" type="button" class="order-action order-action--primary" @click="openReviewModal(firstPendingReview(order))">去评价</button>
|
|
|
|
|
|
<button v-if="canPreparePayment(order)" type="button" class="order-action order-action--primary" @click="preparePayment(order)">立即支付</button>
|
|
|
|
|
|
<button v-if="canMockPay(order)" type="button" class="order-action order-action--primary" @click="mockPay(order)">立即支付</button>
|
|
|
|
|
|
<button type="button" class="order-action" @click="router.push(`/orders/${order.id}`)">查看详情</button>
|
|
|
|
|
|
<button v-if="canApplyAfterSale(order)" type="button" class="order-action" @click="openAfterSaleModal(order)">申请售后</button>
|
|
|
|
|
|
<button v-if="hasRebookableItems(order)" type="button" class="order-action order-action--primary" @click="rebookOrder(order)">复刻同款</button>
|
|
|
|
|
|
<button v-if="Number(order.status) === 1" type="button" class="order-action order-action--danger" @click="cancelOrder(order.id)">取消订单</button>
|
2026-05-29 13:30:56 +08:00
|
|
|
|
</div>
|
2026-05-23 21:56:18 +08:00
|
|
|
|
</div>
|
2026-05-29 13:30:56 +08:00
|
|
|
|
</article>
|
|
|
|
|
|
</section>
|
2026-03-19 20:19:41 +08:00
|
|
|
|
</main>
|
2026-05-23 15:16:40 +08:00
|
|
|
|
|
|
|
|
|
|
<a-modal
|
|
|
|
|
|
v-model:open="reviewModalOpen"
|
|
|
|
|
|
title="评价美甲师"
|
|
|
|
|
|
:confirm-loading="reviewSubmitting"
|
|
|
|
|
|
@ok="submitReview"
|
|
|
|
|
|
@cancel="closeReviewModal"
|
|
|
|
|
|
>
|
|
|
|
|
|
<a-form layout="vertical">
|
|
|
|
|
|
<a-form-item label="评分" required>
|
|
|
|
|
|
<a-input-number
|
|
|
|
|
|
v-model:value="reviewForm.rating"
|
|
|
|
|
|
class="rating-input"
|
|
|
|
|
|
:min="0.5"
|
|
|
|
|
|
:max="5"
|
|
|
|
|
|
:step="0.5"
|
|
|
|
|
|
placeholder="0.5-5 分"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
<a-form-item label="评价内容">
|
|
|
|
|
|
<a-textarea v-model:value="reviewForm.content" :rows="4" :maxlength="500" placeholder="写下这次服务体验" />
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
</a-form>
|
|
|
|
|
|
</a-modal>
|
|
|
|
|
|
|
|
|
|
|
|
<a-modal
|
|
|
|
|
|
v-model:open="rejectModalOpen"
|
|
|
|
|
|
title="拒绝改派申请"
|
|
|
|
|
|
:confirm-loading="changeProcessing"
|
|
|
|
|
|
@ok="submitRejectArtistChange"
|
|
|
|
|
|
@cancel="closeRejectArtistChange"
|
|
|
|
|
|
>
|
|
|
|
|
|
<a-form layout="vertical">
|
2026-05-23 21:56:18 +08:00
|
|
|
|
<div v-if="activeChangeRequest" class="reject-change-summary">
|
|
|
|
|
|
<span>原美甲师:{{ artistChangeDisplay(activeChangeRequest).originalArtistName }}</span>
|
|
|
|
|
|
<span>新美甲师:{{ artistChangeDisplay(activeChangeRequest).requestedArtistName }}</span>
|
|
|
|
|
|
<span v-if="activeChangeRequest.reason">原因:{{ activeChangeRequest.reason }}</span>
|
|
|
|
|
|
<span v-for="line in artistChangeDisplay(activeChangeRequest).impactLines" :key="line">{{ line }}</span>
|
|
|
|
|
|
</div>
|
2026-05-23 15:16:40 +08:00
|
|
|
|
<a-form-item label="拒绝原因">
|
|
|
|
|
|
<a-textarea v-model:value="rejectForm.rejectReason" :rows="3" :maxlength="300" placeholder="可选,请填写拒绝原因" />
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
</a-form>
|
|
|
|
|
|
</a-modal>
|
2026-05-24 18:09:11 +08:00
|
|
|
|
|
|
|
|
|
|
<a-modal
|
|
|
|
|
|
v-model:open="afterSaleModalOpen"
|
|
|
|
|
|
title="申请售后"
|
|
|
|
|
|
:confirm-loading="afterSaleSubmitting"
|
|
|
|
|
|
@ok="submitAfterSale"
|
|
|
|
|
|
@cancel="closeAfterSaleModal"
|
|
|
|
|
|
>
|
|
|
|
|
|
<a-form layout="vertical">
|
|
|
|
|
|
<a-form-item label="订单">
|
|
|
|
|
|
<a-input :value="activeAfterSaleOrder?.orderNo || ''" disabled />
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
<a-form-item label="订单项">
|
|
|
|
|
|
<a-select v-model:value="afterSaleForm.orderItemId" allow-clear placeholder="可选,默认整单">
|
|
|
|
|
|
<a-select-option v-for="item in activeAfterSaleOrder?.items || []" :key="item.id" :value="item.id">
|
|
|
|
|
|
{{ item.productTitle }}
|
|
|
|
|
|
</a-select-option>
|
|
|
|
|
|
</a-select>
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
<a-form-item label="类型" required>
|
|
|
|
|
|
<a-select v-model:value="afterSaleForm.type">
|
|
|
|
|
|
<a-select-option value="REFUND">退款</a-select-option>
|
|
|
|
|
|
<a-select-option value="AFTER_SALE">售后</a-select-option>
|
|
|
|
|
|
</a-select>
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
<a-form-item label="退款金额">
|
|
|
|
|
|
<a-input-number v-model:value="afterSaleForm.refundAmount" :min="0" :step="0.01" style="width: 100%" />
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
<a-form-item label="原因" required>
|
|
|
|
|
|
<a-textarea v-model:value="afterSaleForm.reason" :rows="4" :maxlength="300" placeholder="请说明申请原因" />
|
|
|
|
|
|
</a-form-item>
|
|
|
|
|
|
</a-form>
|
|
|
|
|
|
</a-modal>
|
2026-02-27 16:44:41 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2026-05-18 09:46:11 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* OrderView page script.
|
|
|
|
|
|
* Call guide: the template binds the reactive state below, and the methods are triggered by button clicks, lifecycle hooks, or router events.
|
|
|
|
|
|
*/
|
2026-05-23 21:56:18 +08:00
|
|
|
|
import { computed, inject, onMounted, reactive, ref } from 'vue'
|
|
|
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
2026-05-31 18:36:52 +08:00
|
|
|
|
import { LeftOutlined, ShoppingOutlined, UserOutlined } from '@ant-design/icons-vue'
|
2026-02-27 16:44:41 +08:00
|
|
|
|
import { message, Modal } from 'ant-design-vue'
|
2026-05-23 21:56:18 +08:00
|
|
|
|
import { cartApi } from '../api/cart'
|
2026-05-31 18:36:52 +08:00
|
|
|
|
import { afterSaleApi, orderApi, paymentApi } from '../api/order'
|
|
|
|
|
|
import type { OrderArtistChangeRequestVO, OrderArtistReviewVO } from '../api/order'
|
2026-05-18 09:46:11 +08:00
|
|
|
|
import { userApi } from '@/api/user'
|
2026-03-27 14:55:41 +08:00
|
|
|
|
import type { IdType } from '@/utils/id'
|
2026-05-13 12:43:01 +08:00
|
|
|
|
import { runWithGlobalLoading } from '@/utils/action-loading'
|
2026-05-23 21:56:18 +08:00
|
|
|
|
import { buildRecoveryActions, getRecoveryMessage } from '@/utils/recovery'
|
|
|
|
|
|
import { resolveOrderReviewFocus } from '@/utils/order-review-focus'
|
2026-05-29 13:30:56 +08:00
|
|
|
|
import { extractLegacyFileId, getCachedSignedImageUrl, getCachedSignedImageUrlSync } from '@/utils/signed-image-cache'
|
2026-02-27 16:44:41 +08:00
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: router supports OrderView.vue by holding or executing the router page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-02-27 16:44:41 +08:00
|
|
|
|
const router = useRouter()
|
2026-05-23 21:56:18 +08:00
|
|
|
|
const route = useRoute()
|
|
|
|
|
|
const updateCartCount = inject<() => Promise<void>>('updateCartCount', async () => {})
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: orders supports OrderView.vue by holding or executing the orders page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-02-27 16:44:41 +08:00
|
|
|
|
const orders = ref<any[]>([])
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: pendingReviews supports OrderView.vue by holding or executing the pending reviews page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const pendingReviews = ref<OrderArtistReviewVO[]>([])
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: orderReviews supports OrderView.vue by holding or executing the order reviews page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const orderReviews = ref<Record<string, OrderArtistReviewVO[]>>({})
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: pendingChangeRequests supports OrderView.vue by holding or executing the pending change requests page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const pendingChangeRequests = ref<OrderArtistChangeRequestVO[]>([])
|
2026-06-04 16:39:06 +08:00
|
|
|
|
type OrderStatusFilter = 'all' | 'priceConfirming' | 'pendingPayment' | 'active' | 'pendingReview' | 'completed'
|
|
|
|
|
|
const ORDER_STATUS_FILTER_VALUES: OrderStatusFilter[] = ['all', 'priceConfirming', 'pendingPayment', 'active', 'pendingReview', 'completed']
|
|
|
|
|
|
const normalizeRouteStatusFilter = (value: unknown): OrderStatusFilter | undefined => {
|
|
|
|
|
|
const raw = Array.isArray(value) ? value[0] : value
|
|
|
|
|
|
return ORDER_STATUS_FILTER_VALUES.includes(raw as OrderStatusFilter) ? raw as OrderStatusFilter : undefined
|
|
|
|
|
|
}
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: reviewModalOpen supports OrderView.vue by holding or executing the review modal open page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const reviewModalOpen = ref(false)
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: reviewSubmitting supports OrderView.vue by holding or executing the review submitting page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const reviewSubmitting = ref(false)
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: activeReview supports OrderView.vue by holding or executing the active review page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const activeReview = ref<OrderArtistReviewVO | null>(null)
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: rejectModalOpen supports OrderView.vue by holding or executing the reject modal open page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const rejectModalOpen = ref(false)
|
2026-05-24 18:09:11 +08:00
|
|
|
|
const afterSaleModalOpen = ref(false)
|
|
|
|
|
|
const afterSaleSubmitting = ref(false)
|
|
|
|
|
|
const activeAfterSaleOrder = ref<any | null>(null)
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: changeProcessing supports OrderView.vue by holding or executing the change processing page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const changeProcessing = ref(false)
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: activeChangeRequest supports OrderView.vue by holding or executing the active change request page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const activeChangeRequest = ref<OrderArtistChangeRequestVO | null>(null)
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: filters supports OrderView.vue by holding or executing the filters page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-18 09:46:11 +08:00
|
|
|
|
const filters = reactive({
|
|
|
|
|
|
keyword: '',
|
2026-05-31 18:36:52 +08:00
|
|
|
|
status: 'all' as OrderStatusFilter,
|
2026-05-18 09:46:11 +08:00
|
|
|
|
date: null as any,
|
|
|
|
|
|
minAmount: undefined as number | undefined,
|
|
|
|
|
|
maxAmount: undefined as number | undefined
|
|
|
|
|
|
})
|
2026-06-04 16:39:06 +08:00
|
|
|
|
const routeStatusFilter = normalizeRouteStatusFilter(route.query.status)
|
|
|
|
|
|
if (routeStatusFilter) {
|
|
|
|
|
|
filters.status = routeStatusFilter
|
|
|
|
|
|
}
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: reviewForm supports OrderView.vue by holding or executing the review form page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const reviewForm = reactive({
|
|
|
|
|
|
rating: undefined as number | undefined,
|
|
|
|
|
|
content: ''
|
|
|
|
|
|
})
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: rejectForm supports OrderView.vue by holding or executing the reject form page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const rejectForm = reactive({
|
|
|
|
|
|
rejectReason: ''
|
|
|
|
|
|
})
|
2026-02-27 16:44:41 +08:00
|
|
|
|
|
2026-05-24 18:09:11 +08:00
|
|
|
|
const afterSaleForm = reactive({
|
|
|
|
|
|
orderItemId: undefined as IdType | undefined,
|
|
|
|
|
|
type: 'REFUND',
|
|
|
|
|
|
reason: '',
|
|
|
|
|
|
refundAmount: undefined as number | undefined
|
|
|
|
|
|
})
|
2026-06-04 16:39:06 +08:00
|
|
|
|
const quoteReplyForms = reactive<Record<string, string>>({})
|
|
|
|
|
|
const quoteActionLoading = reactive<Record<string, boolean>>({})
|
|
|
|
|
|
const quoteHistoryExpanded = reactive<Record<string, boolean>>({})
|
2026-05-24 18:09:11 +08:00
|
|
|
|
|
2026-05-29 13:30:56 +08:00
|
|
|
|
const statusTabs = computed(() => {
|
2026-05-31 18:36:52 +08:00
|
|
|
|
const tabs: Array<{ label: string, value: OrderStatusFilter }> = [
|
2026-05-29 13:30:56 +08:00
|
|
|
|
{ label: '全部', value: 'all' },
|
2026-06-04 16:39:06 +08:00
|
|
|
|
{ label: '确认价格中', value: 'priceConfirming' },
|
2026-05-31 18:36:52 +08:00
|
|
|
|
{ label: '待支付', value: 'pendingPayment' },
|
|
|
|
|
|
{ label: '预约中', value: 'active' },
|
|
|
|
|
|
{ label: '待评价', value: 'pendingReview' },
|
|
|
|
|
|
{ label: '已完成', value: 'completed' }
|
2026-05-29 13:30:56 +08:00
|
|
|
|
]
|
2026-05-31 18:36:52 +08:00
|
|
|
|
return tabs
|
2026-05-29 13:30:56 +08:00
|
|
|
|
})
|
|
|
|
|
|
|
2026-05-31 18:36:52 +08:00
|
|
|
|
const setStatusFilter = (value: OrderStatusFilter) => {
|
2026-05-29 13:30:56 +08:00
|
|
|
|
filters.status = value
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-18 09:46:11 +08:00
|
|
|
|
/** filteredOrders is a reactive state variable used by the template and event handlers. */
|
|
|
|
|
|
const filteredOrders = computed(() => {
|
|
|
|
|
|
const keyword = filters.keyword.trim().toLowerCase()
|
|
|
|
|
|
const targetDate = filters.date?.format?.('YYYY-MM-DD')
|
|
|
|
|
|
return orders.value.filter(order => {
|
2026-05-31 18:36:52 +08:00
|
|
|
|
if (!orderMatchesStatus(order, filters.status)) return false
|
2026-05-18 09:46:11 +08:00
|
|
|
|
const amount = Number(order.actualAmount || 0)
|
|
|
|
|
|
if (filters.minAmount !== undefined && amount < filters.minAmount) return false
|
|
|
|
|
|
if (filters.maxAmount !== undefined && amount > filters.maxAmount) return false
|
|
|
|
|
|
const items = order.items || []
|
|
|
|
|
|
if (targetDate && !items.some((item: any) => String(item.appointmentTime || '').slice(0, 10) === targetDate)) {
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
if (keyword) {
|
|
|
|
|
|
const haystack = [
|
|
|
|
|
|
order.orderNo,
|
|
|
|
|
|
order.shopName,
|
|
|
|
|
|
order.statusText,
|
|
|
|
|
|
...items.flatMap((item: any) => [item.productTitle, item.artistName, item.appointmentTime])
|
|
|
|
|
|
].filter(Boolean).join(' ').toLowerCase()
|
|
|
|
|
|
if (!haystack.includes(keyword)) return false
|
|
|
|
|
|
}
|
|
|
|
|
|
return true
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
|
2026-05-23 21:56:18 +08:00
|
|
|
|
/** focusedOrderId stores message/deep-link focus for reviews or artist-change cards. */
|
|
|
|
|
|
const focusedOrderId = ref('')
|
|
|
|
|
|
/** focusedOrderItemId stores message/deep-link item focus. */
|
|
|
|
|
|
const focusedOrderItemId = ref('')
|
|
|
|
|
|
/** focusedReviewId stores message/deep-link review focus. */
|
|
|
|
|
|
const focusedReviewId = ref('')
|
|
|
|
|
|
|
2026-06-04 16:39:06 +08:00
|
|
|
|
const isQuoteConfirming = (order: any) => Number(order?.status) === 0
|
2026-05-31 18:36:52 +08:00
|
|
|
|
const orderPaymentStatus = (order: any) => String(order.paymentStatus || order.payStatus || '').toUpperCase()
|
|
|
|
|
|
const isOrderPaid = (order: any) => orderPaymentStatus(order) === 'PAID'
|
|
|
|
|
|
const orderNeedsPayment = (order: any) => Number(order.status) === 1 && !isOrderPaid(order)
|
|
|
|
|
|
const canPreparePayment = (order: any) => orderNeedsPayment(order) && orderPaymentStatus(order) !== 'PAYING'
|
|
|
|
|
|
const canMockPay = (order: any) => Number(order.status) === 1 && orderPaymentStatus(order) === 'PAYING'
|
2026-06-04 16:39:06 +08:00
|
|
|
|
const canApplyAfterSale = (order: any) => !isQuoteConfirming(order) && (Number(order.status) === 2 || isOrderPaid(order))
|
2026-05-24 18:09:11 +08:00
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: sameId supports OrderView.vue by holding or executing the same id page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const sameId = (left: unknown, right: unknown) => {
|
|
|
|
|
|
return left !== undefined && left !== null && right !== undefined && right !== null && String(left) === String(right)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: embeddedForItem supports OrderView.vue by holding or executing the embedded for item page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const embeddedForItem = <T extends { orderItemId?: IdType }>(order: any, item: any, field: string): T | undefined => {
|
|
|
|
|
|
const itemValue = item?.[field] as T | undefined
|
|
|
|
|
|
if (itemValue) return itemValue
|
|
|
|
|
|
const orderValue = order?.[field] as T | undefined
|
|
|
|
|
|
if (!orderValue) return undefined
|
|
|
|
|
|
return sameId(orderValue.orderItemId, item.id) || (order.items || []).length === 1 ? orderValue : undefined
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: pendingReviewForItem supports OrderView.vue by holding or executing the pending review for item page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const pendingReviewForItem = (order: any, item: any): OrderArtistReviewVO | undefined => {
|
|
|
|
|
|
const embedded = embeddedForItem<OrderArtistReviewVO>(order, item, 'pendingReview')
|
|
|
|
|
|
if (embedded) return embedded
|
|
|
|
|
|
return pendingReviews.value.find(review => sameId(review.orderId, order.id) && sameId(review.orderItemId, item.id))
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: submittedReviewForItem supports OrderView.vue by holding or executing the submitted review for item page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const submittedReviewForItem = (order: any, item: any): OrderArtistReviewVO | undefined => {
|
|
|
|
|
|
const embedded = embeddedForItem<OrderArtistReviewVO>(order, item, 'reviewSummary')
|
|
|
|
|
|
if (embedded) return embedded
|
|
|
|
|
|
return (orderReviews.value[String(order.id)] || []).find(review => sameId(review.orderItemId, item.id) && Number(review.status) === 1)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: pendingChangeRequestForItem supports OrderView.vue by holding or executing the pending change request for item page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const pendingChangeRequestForItem = (order: any, item: any): OrderArtistChangeRequestVO | undefined => {
|
|
|
|
|
|
const embedded = embeddedForItem<OrderArtistChangeRequestVO>(order, item, 'pendingArtistChangeRequest')
|
|
|
|
|
|
if (embedded) return embedded
|
|
|
|
|
|
return pendingChangeRequests.value.find(request => sameId(request.orderId, order.id) && sameId(request.orderItemId, item.id))
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-31 18:36:52 +08:00
|
|
|
|
const orderItems = (order: any) => Array.isArray(order?.items) ? order.items : []
|
|
|
|
|
|
|
|
|
|
|
|
const orderPrimaryItem = (order: any) => orderItems(order)[0]
|
|
|
|
|
|
|
|
|
|
|
|
const orderItemCount = (order: any) => orderItems(order).length
|
|
|
|
|
|
|
|
|
|
|
|
const orderPrimaryTitle = (order: any) => {
|
|
|
|
|
|
return orderPrimaryItem(order)?.productTitle || order.title || order.orderNo || '美甲预约'
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const orderCoverImage = (order: any) => {
|
|
|
|
|
|
return orderItems(order).map((item: any) => item?.productImage).find(Boolean)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const orderCoverFallback = (order: any) => {
|
|
|
|
|
|
return String(orderPrimaryTitle(order)).trim().charAt(0) || '美'
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const orderArtistName = (order: any) => {
|
|
|
|
|
|
return orderItems(order).map((item: any) => item?.artistName).find(Boolean) || '待确认'
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const firstPendingReview = (order: any) => {
|
|
|
|
|
|
return orderItems(order).map((item: any) => pendingReviewForItem(order, item)).find(Boolean)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const orderNeedsReview = (order: any) => {
|
|
|
|
|
|
return Number(order.status) === 2 && Boolean(firstPendingReview(order))
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const orderIsActive = (order: any) => {
|
|
|
|
|
|
return Number(order.status) === 1 && !orderNeedsPayment(order)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const orderMatchesStatus = (order: any, status: OrderStatusFilter) => {
|
|
|
|
|
|
if (status === 'all') return true
|
2026-06-04 16:39:06 +08:00
|
|
|
|
if (status === 'priceConfirming') return isQuoteConfirming(order)
|
2026-05-31 18:36:52 +08:00
|
|
|
|
if (status === 'pendingPayment') return orderNeedsPayment(order)
|
|
|
|
|
|
if (status === 'active') return orderIsActive(order)
|
|
|
|
|
|
if (status === 'pendingReview') return orderNeedsReview(order)
|
|
|
|
|
|
if (status === 'completed') return Number(order.status) === 2
|
|
|
|
|
|
return true
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const orderDisplayStatus = (order: any) => {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
if (isQuoteConfirming(order)) return order.statusText || '确认价格中'
|
2026-05-31 18:36:52 +08:00
|
|
|
|
if (Number(order.status) === 3) return '已取消'
|
|
|
|
|
|
if (orderNeedsPayment(order)) return '待支付'
|
|
|
|
|
|
if (orderNeedsReview(order)) return '待评价'
|
|
|
|
|
|
if (Number(order.status) === 1) return order.statusText || '预约中'
|
|
|
|
|
|
if (Number(order.status) === 2) return '已完成'
|
|
|
|
|
|
return order.statusText || '订单状态'
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const orderStatusClass = (order: any) => {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
if (isQuoteConfirming(order)) return 'price-confirming'
|
2026-05-31 18:36:52 +08:00
|
|
|
|
if (Number(order.status) === 3) return 'cancelled'
|
|
|
|
|
|
if (orderNeedsPayment(order)) return 'pending-payment'
|
|
|
|
|
|
if (orderNeedsReview(order)) return 'pending-review'
|
|
|
|
|
|
if (Number(order.status) === 1) return 'active'
|
|
|
|
|
|
if (Number(order.status) === 2) return 'completed'
|
|
|
|
|
|
return 'active'
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const orderTimeLabel = (order: any) => {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
if (isQuoteConfirming(order)) return '报价有效期'
|
2026-05-31 18:36:52 +08:00
|
|
|
|
return Number(order.status) === 2 ? '完成时间' : '预约时间'
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const orderTimeText = (order: any) => {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
if (isQuoteConfirming(order)) {
|
|
|
|
|
|
return formatTimelineTime(order.quoteExpireTime) || '待门店确认'
|
|
|
|
|
|
}
|
2026-05-31 18:36:52 +08:00
|
|
|
|
if (Number(order.status) === 2) {
|
|
|
|
|
|
return formatTimelineTime(order.completeTime || order.updateTime) || orderAppointmentTime(order)
|
|
|
|
|
|
}
|
|
|
|
|
|
if (Number(order.status) === 3) {
|
|
|
|
|
|
return formatTimelineTime(order.cancelTime || order.updateTime) || orderAppointmentTime(order)
|
|
|
|
|
|
}
|
|
|
|
|
|
return orderAppointmentTime(order)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const orderAmountLabel = (order: any) => {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
if (isQuoteConfirming(order)) return '参考金额'
|
2026-05-31 18:36:52 +08:00
|
|
|
|
return orderNeedsPayment(order) ? '订单金额' : '实付金额'
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const orderExtensionItems = (order: any) => {
|
|
|
|
|
|
return orderItems(order).filter((item: any) => (
|
|
|
|
|
|
submittedReviewForItem(order, item) ||
|
|
|
|
|
|
pendingReviewForItem(order, item) ||
|
|
|
|
|
|
pendingChangeRequestForItem(order, item)
|
|
|
|
|
|
))
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 21:56:18 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: formatChangePrice supports OrderView.vue by turning optional impact prices into stable customer-facing copy.
|
|
|
|
|
|
* Usage: call it when rendering artist-change impact cards and confirmation dialogs.
|
|
|
|
|
|
*/
|
|
|
|
|
|
const formatChangePrice = (price?: number | string) => {
|
|
|
|
|
|
const value = Number(price)
|
|
|
|
|
|
return Number.isFinite(value) ? `¥${value.toFixed(2)}` : ''
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: formatChangeTime supports OrderView.vue by normalizing backend or order-item appointment values for impact copy.
|
|
|
|
|
|
* Usage: call it when rendering artist-change impact cards and confirmation dialogs.
|
|
|
|
|
|
*/
|
|
|
|
|
|
const formatChangeTime = (time?: string) => {
|
|
|
|
|
|
return String(time || '').replace('T', ' ').slice(0, 16)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: artistChangeDisplay supports OrderView.vue by deriving visible impact text from a pending artist-change request.
|
|
|
|
|
|
* Usage: use it in cards and confirmation dialogs so the user sees the same time and price impact.
|
|
|
|
|
|
*/
|
|
|
|
|
|
const artistChangeDisplay = (request?: OrderArtistChangeRequestVO, item?: any) => {
|
|
|
|
|
|
const originalArtistName = request?.originalArtistName || request?.fromArtistName || item?.artistName || '原美甲师'
|
|
|
|
|
|
const requestedArtistName = request?.requestedArtistName || request?.toArtistName || '新美甲师'
|
|
|
|
|
|
const appointmentTime = formatChangeTime(request?.appointmentTime || item?.appointmentTime)
|
|
|
|
|
|
const timeImpactText = request?.timeImpactText || (request?.timeAffected ? '预约时间可能调整' : '预约时间不变')
|
|
|
|
|
|
const priceImpactText = request?.priceImpactText || (request?.priceAffected ? '订单价格可能调整' : '价格不变')
|
|
|
|
|
|
const priceValue = request?.priceAffected ? request?.newPrice : (request?.newPrice ?? request?.originalPrice ?? item?.price)
|
|
|
|
|
|
const priceText = formatChangePrice(priceValue)
|
|
|
|
|
|
const impactLines = [
|
|
|
|
|
|
appointmentTime ? `${timeImpactText}:${appointmentTime}` : timeImpactText,
|
|
|
|
|
|
priceText ? `${priceImpactText}:${priceText}` : priceImpactText
|
|
|
|
|
|
].filter(Boolean)
|
|
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
originalArtistName,
|
|
|
|
|
|
requestedArtistName,
|
|
|
|
|
|
impactLines
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** formatTimelineTime normalizes backend timestamps for the compact order timeline. */
|
|
|
|
|
|
const formatTimelineTime = (value?: string) => {
|
|
|
|
|
|
return String(value || '').replace('T', ' ').slice(0, 16)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-29 13:30:56 +08:00
|
|
|
|
const formatAppointmentTime = (value?: string) => {
|
|
|
|
|
|
return formatTimelineTime(value) || '待确认'
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const orderAppointmentTime = (order: any) => {
|
|
|
|
|
|
const firstAppointment = (order.items || []).map((item: any) => item.appointmentTime).find(Boolean)
|
|
|
|
|
|
return formatAppointmentTime(firstAppointment)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const formatAmount = (value: unknown) => {
|
|
|
|
|
|
const amount = Number(value || 0)
|
|
|
|
|
|
return `¥${Number.isFinite(amount) ? amount.toFixed(2) : '0.00'}`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-04 16:39:06 +08:00
|
|
|
|
const hasAmount = (value: unknown) => value !== undefined && value !== null && value !== '' && Number.isFinite(Number(value))
|
|
|
|
|
|
|
|
|
|
|
|
const formatQuoteAmount = (value: unknown, fallback = '--') => {
|
|
|
|
|
|
return hasAmount(value) ? formatAmount(value) : fallback
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const quoteReferencePrice = (item: any) => item?.referencePrice ?? item?.price
|
|
|
|
|
|
|
|
|
|
|
|
const quoteMessages = (order: any) => Array.isArray(order?.quoteMessages) ? order.quoteMessages : []
|
|
|
|
|
|
|
|
|
|
|
|
const quoteMessageItems = (quoteMessage: any) => Array.isArray(quoteMessage?.items) ? quoteMessage.items : []
|
|
|
|
|
|
|
|
|
|
|
|
const quoteStatusText = (order: any) => order?.quoteStatusText || order?.statusText || '确认价格中'
|
|
|
|
|
|
|
|
|
|
|
|
const quoteExpireText = (order: any) => {
|
|
|
|
|
|
const expireTime = formatTimelineTime(order?.quoteExpireTime)
|
|
|
|
|
|
return expireTime ? `有效期至 ${expireTime}` : '等待门店报价'
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const quoteActorText = (quoteMessage: any) => {
|
|
|
|
|
|
if (quoteMessage?.actorTypeText) return quoteMessage.actorTypeText
|
|
|
|
|
|
if (String(quoteMessage?.actorType || '').toUpperCase() === 'USER') return '用户'
|
|
|
|
|
|
if (String(quoteMessage?.actorType || '').toUpperCase() === 'SHOP') return '门店'
|
|
|
|
|
|
return '系统'
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const quoteActionText = (quoteMessage: any) => quoteMessage?.actionText || quoteMessage?.action || '报价更新'
|
|
|
|
|
|
|
|
|
|
|
|
const quoteMessageKey = (quoteMessage: any, index: string | number) => {
|
|
|
|
|
|
return String(quoteMessage?.id ?? `${quoteMessage?.createTime || 'quote'}-${quoteMessage?.action || index}`)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const quoteMessageItemKey = (quoteItem: any) => {
|
|
|
|
|
|
return String(quoteItem?.orderItemId ?? quoteItem?.productId ?? quoteItem?.id ?? JSON.stringify(quoteItem))
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const quoteMessageItemText = (order: any, quoteItem: any) => {
|
|
|
|
|
|
const sourceItem = orderItems(order).find((item: any) => sameId(item.id, quoteItem?.orderItemId) || sameId(item.productId, quoteItem?.productId))
|
|
|
|
|
|
const title = quoteItem?.productTitle || sourceItem?.productTitle || '预约项目'
|
|
|
|
|
|
const amount = quoteItem?.confirmedPrice ?? quoteItem?.quotedPrice ?? quoteItem?.price
|
|
|
|
|
|
return hasAmount(amount) ? `${title}:${formatAmount(amount)}` : title
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const orderHasCurrentQuote = (order: any) => {
|
|
|
|
|
|
return orderItems(order).some((item: any) => hasAmount(item?.quotedPrice ?? item?.confirmedPrice))
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const quoteOrderKey = (order: any) => String(order?.id || '')
|
|
|
|
|
|
|
|
|
|
|
|
const isQuoteHistoryCollapsed = (order: any) => {
|
|
|
|
|
|
return Boolean(order?.quoteUserConfirmed) && !quoteHistoryExpanded[quoteOrderKey(order)]
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const toggleQuoteHistory = (order: any) => {
|
|
|
|
|
|
const key = quoteOrderKey(order)
|
|
|
|
|
|
if (!key) return
|
|
|
|
|
|
quoteHistoryExpanded[key] = !quoteHistoryExpanded[key]
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const quoteHistoryCountText = (order: any) => {
|
|
|
|
|
|
const count = quoteMessages(order).length
|
|
|
|
|
|
return count > 0 ? `${count} 条报价历史` : '暂无报价历史'
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const isQuoteBusy = (order: any) => Boolean(quoteActionLoading[quoteOrderKey(order)])
|
|
|
|
|
|
|
|
|
|
|
|
const setQuoteBusy = (order: any, busy: boolean) => {
|
|
|
|
|
|
const key = quoteOrderKey(order)
|
|
|
|
|
|
if (key) quoteActionLoading[key] = busy
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: formatRating supports OrderView.vue by holding or executing the format rating page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const formatRating = (rating?: number) => {
|
|
|
|
|
|
return Number(rating || 0).toFixed(1)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-18 09:46:11 +08:00
|
|
|
|
/** resetFilters is a local helper used by this page script. */
|
|
|
|
|
|
const resetFilters = () => {
|
|
|
|
|
|
filters.keyword = ''
|
|
|
|
|
|
filters.status = 'all'
|
|
|
|
|
|
filters.date = null
|
|
|
|
|
|
filters.minAmount = undefined
|
|
|
|
|
|
filters.maxAmount = undefined
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-24 18:09:11 +08:00
|
|
|
|
const preparePayment = async (order: any) => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
await runWithGlobalLoading(async () => {
|
|
|
|
|
|
await paymentApi.prepareOrderPayment(order.id)
|
|
|
|
|
|
await loadOrders()
|
|
|
|
|
|
})
|
2026-05-31 18:36:52 +08:00
|
|
|
|
message.success('支付已准备,请继续完成支付')
|
2026-05-24 18:09:11 +08:00
|
|
|
|
} catch (error: any) {
|
2026-05-31 18:36:52 +08:00
|
|
|
|
message.error(error?.message || '支付准备失败')
|
2026-05-24 18:09:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const mockPay = async (order: any) => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
await runWithGlobalLoading(async () => {
|
|
|
|
|
|
await paymentApi.mockSuccess(order.id)
|
|
|
|
|
|
await loadOrders()
|
|
|
|
|
|
})
|
2026-05-31 18:36:52 +08:00
|
|
|
|
message.success('支付成功')
|
2026-05-24 18:09:11 +08:00
|
|
|
|
} catch (error: any) {
|
2026-05-31 18:36:52 +08:00
|
|
|
|
message.error(error?.message || '支付失败')
|
2026-05-24 18:09:11 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-04 16:39:06 +08:00
|
|
|
|
const submitQuoteReply = async (order: any) => {
|
|
|
|
|
|
const key = quoteOrderKey(order)
|
|
|
|
|
|
const remark = String(quoteReplyForms[key] || '').trim()
|
|
|
|
|
|
if (!remark) {
|
|
|
|
|
|
message.warning('请先填写回复内容')
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
setQuoteBusy(order, true)
|
|
|
|
|
|
try {
|
|
|
|
|
|
await runWithGlobalLoading(async () => {
|
|
|
|
|
|
await orderApi.replyQuote(order.id, { remark })
|
|
|
|
|
|
await loadOrders()
|
|
|
|
|
|
})
|
|
|
|
|
|
quoteReplyForms[key] = ''
|
|
|
|
|
|
message.success('报价回复已发送')
|
|
|
|
|
|
} catch (error: any) {
|
|
|
|
|
|
message.error(error?.message || '发送报价回复失败')
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
setQuoteBusy(order, false)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const confirmQuote = (order: any) => {
|
|
|
|
|
|
if (!orderHasCurrentQuote(order)) {
|
|
|
|
|
|
message.warning('当前暂无可确认报价')
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
Modal.confirm({
|
|
|
|
|
|
title: '确认当前报价',
|
|
|
|
|
|
content: '确认后门店会继续处理预约,请确认当前报价无误。',
|
|
|
|
|
|
onOk: async () => {
|
|
|
|
|
|
setQuoteBusy(order, true)
|
|
|
|
|
|
try {
|
|
|
|
|
|
await runWithGlobalLoading(async () => {
|
|
|
|
|
|
await orderApi.confirmUserQuote(order.id)
|
|
|
|
|
|
await loadOrders()
|
|
|
|
|
|
})
|
|
|
|
|
|
message.success('已确认当前报价')
|
|
|
|
|
|
} catch (error: any) {
|
|
|
|
|
|
message.error(error?.message || '确认报价失败')
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
setQuoteBusy(order, false)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-24 18:09:11 +08:00
|
|
|
|
const openAfterSaleModal = (order: any) => {
|
|
|
|
|
|
activeAfterSaleOrder.value = order
|
|
|
|
|
|
const firstItem = (order.items || [])[0]
|
|
|
|
|
|
afterSaleForm.orderItemId = firstItem?.id
|
|
|
|
|
|
afterSaleForm.type = 'REFUND'
|
|
|
|
|
|
afterSaleForm.reason = ''
|
|
|
|
|
|
afterSaleForm.refundAmount = Number(order.actualAmount || order.totalAmount || 0)
|
|
|
|
|
|
afterSaleModalOpen.value = true
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const closeAfterSaleModal = () => {
|
|
|
|
|
|
afterSaleModalOpen.value = false
|
|
|
|
|
|
activeAfterSaleOrder.value = null
|
|
|
|
|
|
afterSaleForm.orderItemId = undefined
|
|
|
|
|
|
afterSaleForm.type = 'REFUND'
|
|
|
|
|
|
afterSaleForm.reason = ''
|
|
|
|
|
|
afterSaleForm.refundAmount = undefined
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const submitAfterSale = async () => {
|
|
|
|
|
|
if (!activeAfterSaleOrder.value) return
|
|
|
|
|
|
if (!afterSaleForm.reason.trim()) {
|
|
|
|
|
|
message.warning('请填写售后原因')
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
afterSaleSubmitting.value = true
|
|
|
|
|
|
try {
|
|
|
|
|
|
await runWithGlobalLoading(async () => {
|
|
|
|
|
|
await afterSaleApi.apply({
|
|
|
|
|
|
orderId: activeAfterSaleOrder.value.id,
|
|
|
|
|
|
orderItemId: afterSaleForm.orderItemId,
|
|
|
|
|
|
type: afterSaleForm.type,
|
|
|
|
|
|
reason: afterSaleForm.reason.trim(),
|
|
|
|
|
|
refundAmount: afterSaleForm.refundAmount
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
message.success('售后申请已提交')
|
|
|
|
|
|
closeAfterSaleModal()
|
|
|
|
|
|
} catch (error: any) {
|
|
|
|
|
|
message.error(error?.message || '提交售后失败')
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
afterSaleSubmitting.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 21:56:18 +08:00
|
|
|
|
const normalizeRebookQuantity = (quantity: unknown) => {
|
|
|
|
|
|
const value = Number(quantity)
|
|
|
|
|
|
return Number.isFinite(value) && value > 0 ? Math.max(1, Math.floor(value)) : 1
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const getRebookableOrderItems = (order: any) => {
|
|
|
|
|
|
return (order.items || []).filter((item: any) => item?.productId !== undefined && item?.productId !== null)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const hasRebookableItems = (order: any) => {
|
|
|
|
|
|
return Number(order.status) === 2 && getRebookableOrderItems(order).length > 0
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const rebookOrder = async (order: any) => {
|
|
|
|
|
|
if (Number(order.status) !== 2) {
|
|
|
|
|
|
message.warning('仅已完成订单支持再次预约')
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
const items = getRebookableOrderItems(order)
|
|
|
|
|
|
if (!items.length) {
|
|
|
|
|
|
message.warning('这笔订单暂无可复刻作品')
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
await runWithGlobalLoading(async () => {
|
|
|
|
|
|
for (const item of items) {
|
|
|
|
|
|
await cartApi.addToCart({
|
|
|
|
|
|
productId: item.productId,
|
|
|
|
|
|
quantity: normalizeRebookQuantity(item.quantity)
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
await updateCartCount()
|
|
|
|
|
|
})
|
|
|
|
|
|
message.success('已加入购物车,请重新选择美甲师和时间')
|
|
|
|
|
|
router.push('/cart')
|
|
|
|
|
|
} catch (error: any) {
|
|
|
|
|
|
message.error(error?.message || '复刻同款失败,请稍后重试')
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: copyOrderNo supports OrderView.vue by holding or executing the copy order no page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-21 18:43:59 +08:00
|
|
|
|
const copyOrderNo = async (orderNo: string) => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
await navigator.clipboard.writeText(orderNo)
|
|
|
|
|
|
message.success('订单号已复制')
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
message.warning('复制失败,请手动复制订单号')
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: loadPendingReviews supports OrderView.vue by holding or executing the load pending reviews page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const loadPendingReviews = async () => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
pendingReviews.value = (await orderApi.getMyPendingReviews()) || []
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
pendingReviews.value = []
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: loadOrderReviews supports OrderView.vue by holding or executing the load order reviews page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const loadOrderReviews = async () => {
|
|
|
|
|
|
const orderIds = orders.value.map(order => order.id).filter(Boolean)
|
|
|
|
|
|
const entries = await Promise.all(orderIds.map(async (orderId) => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
return [String(orderId), await orderApi.getOrderReviews(orderId)] as const
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
return [String(orderId), []] as const
|
|
|
|
|
|
}
|
|
|
|
|
|
}))
|
|
|
|
|
|
orderReviews.value = Object.fromEntries(entries)
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: loadPendingArtistChangeRequests supports OrderView.vue by holding or executing the load pending artist change requests page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const loadPendingArtistChangeRequests = async () => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
pendingChangeRequests.value = (await orderApi.getMyPendingArtistChangeRequests()) || []
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
pendingChangeRequests.value = []
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: refreshOrderExtensions supports OrderView.vue by holding or executing the refresh order extensions page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const refreshOrderExtensions = async () => {
|
|
|
|
|
|
await Promise.all([
|
|
|
|
|
|
loadPendingReviews(),
|
|
|
|
|
|
loadOrderReviews(),
|
|
|
|
|
|
loadPendingArtistChangeRequests()
|
|
|
|
|
|
])
|
2026-05-23 21:56:18 +08:00
|
|
|
|
resolveRouteFocus()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/** resolveRouteFocus handles message jumps for review or order focus. */
|
|
|
|
|
|
const resolveRouteFocus = () => {
|
|
|
|
|
|
const focus = resolveOrderReviewFocus({
|
|
|
|
|
|
orders: orders.value,
|
|
|
|
|
|
pendingReviews: pendingReviews.value,
|
|
|
|
|
|
orderReviews: orderReviews.value,
|
|
|
|
|
|
query: route.query
|
|
|
|
|
|
})
|
|
|
|
|
|
focusedOrderId.value = focus.focusOrderId
|
|
|
|
|
|
focusedOrderItemId.value = focus.focusOrderItemId
|
|
|
|
|
|
focusedReviewId.value = focus.focusReviewId
|
|
|
|
|
|
if (focus.message) {
|
|
|
|
|
|
message.info(focus.message)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const openOrdersRecovery = (error: unknown) => {
|
|
|
|
|
|
const actions = buildRecoveryActions([
|
|
|
|
|
|
{ key: 'retry', text: '重试' },
|
|
|
|
|
|
{ key: 'products', text: '去逛作品' }
|
|
|
|
|
|
])
|
|
|
|
|
|
const retryAction = actions[0]
|
|
|
|
|
|
const productsAction = actions[1]
|
|
|
|
|
|
Modal.confirm({
|
|
|
|
|
|
title: '订单列表加载失败',
|
|
|
|
|
|
content: `${getRecoveryMessage(error, '订单暂时没有加载出来,请重试或稍后再查看。')}。你可以重试,或先去浏览作品。`,
|
|
|
|
|
|
okText: retryAction?.text || '重试',
|
|
|
|
|
|
cancelText: productsAction?.text || '去逛作品',
|
|
|
|
|
|
onOk: () => loadOrders(),
|
|
|
|
|
|
onCancel: () => router.push(productsAction?.route || '/products')
|
|
|
|
|
|
})
|
2026-05-23 15:16:40 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-18 09:46:11 +08:00
|
|
|
|
/** loadOrders is an async page action. Trigger it from the template or lifecycle hook, then await the result. */
|
2026-03-19 20:19:41 +08:00
|
|
|
|
const loadOrders = async () => {
|
|
|
|
|
|
try {
|
2026-05-18 09:46:11 +08:00
|
|
|
|
const userInfo = await userApi.getUserInfo()
|
|
|
|
|
|
if (userInfo.type === 2 || userInfo.type === 3) {
|
|
|
|
|
|
router.replace('/artist-orders')
|
2026-05-23 15:16:40 +08:00
|
|
|
|
return false
|
2026-05-18 09:46:11 +08:00
|
|
|
|
}
|
2026-03-19 20:19:41 +08:00
|
|
|
|
orders.value = (await orderApi.getOrderList() as unknown as any[]) || []
|
|
|
|
|
|
for (const order of orders.value) {
|
|
|
|
|
|
for (const item of order.items || []) {
|
2026-05-29 13:30:56 +08:00
|
|
|
|
const imageId = extractLegacyFileId(item.productImage)
|
|
|
|
|
|
if (!imageId) continue
|
|
|
|
|
|
const cachedUrl = getCachedSignedImageUrlSync(imageId)
|
|
|
|
|
|
if (cachedUrl) item.productImage = cachedUrl
|
|
|
|
|
|
item.productImage = await getCachedSignedImageUrl(imageId)
|
2026-02-27 16:44:41 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-05-23 15:16:40 +08:00
|
|
|
|
await refreshOrderExtensions()
|
|
|
|
|
|
return true
|
2026-05-23 21:56:18 +08:00
|
|
|
|
} catch (error) {
|
|
|
|
|
|
orders.value = []
|
|
|
|
|
|
openOrdersRecovery(error)
|
2026-05-23 15:16:40 +08:00
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: openReviewModal supports OrderView.vue by holding or executing the open review modal page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const openReviewModal = (review?: OrderArtistReviewVO) => {
|
|
|
|
|
|
if (!review) return
|
|
|
|
|
|
activeReview.value = review
|
|
|
|
|
|
reviewForm.rating = review.rating ? Number(review.rating) : undefined
|
|
|
|
|
|
reviewForm.content = review.content || ''
|
|
|
|
|
|
reviewModalOpen.value = true
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: closeReviewModal supports OrderView.vue by holding or executing the close review modal page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const closeReviewModal = () => {
|
|
|
|
|
|
reviewModalOpen.value = false
|
|
|
|
|
|
activeReview.value = null
|
|
|
|
|
|
reviewForm.rating = undefined
|
|
|
|
|
|
reviewForm.content = ''
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: submitReview supports OrderView.vue by holding or executing the submit review page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const submitReview = async () => {
|
|
|
|
|
|
if (!activeReview.value) return
|
|
|
|
|
|
const rating = Number(reviewForm.rating)
|
|
|
|
|
|
if (!rating || rating < 0.5 || rating > 5) {
|
|
|
|
|
|
message.warning('请填写 0.5-5 分的评分')
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
const normalizedRating = Math.round(rating * 2) / 2
|
|
|
|
|
|
if (Math.abs(normalizedRating - rating) > 0.001) {
|
|
|
|
|
|
message.warning('评分请按 0.5 分递增')
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
|
|
|
|
|
reviewSubmitting.value = true
|
|
|
|
|
|
try {
|
|
|
|
|
|
await orderApi.submitArtistReview(activeReview.value.id, {
|
|
|
|
|
|
rating: normalizedRating,
|
|
|
|
|
|
content: reviewForm.content.trim() || undefined,
|
|
|
|
|
|
imageFileIds: []
|
|
|
|
|
|
})
|
|
|
|
|
|
message.success('评价已提交')
|
|
|
|
|
|
closeReviewModal()
|
|
|
|
|
|
await Promise.all([loadPendingReviews(), loadOrderReviews()])
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
message.error('提交评价失败')
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
reviewSubmitting.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: approveArtistChange supports OrderView.vue by holding or executing the approve artist change page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const approveArtistChange = (request?: OrderArtistChangeRequestVO) => {
|
|
|
|
|
|
if (!request) return
|
2026-05-23 21:56:18 +08:00
|
|
|
|
const display = artistChangeDisplay(request)
|
2026-05-23 15:16:40 +08:00
|
|
|
|
Modal.confirm({
|
|
|
|
|
|
title: '同意改派申请',
|
2026-05-23 21:56:18 +08:00
|
|
|
|
content: [
|
|
|
|
|
|
`原美甲师:${display.originalArtistName}`,
|
|
|
|
|
|
`新美甲师:${display.requestedArtistName}`,
|
|
|
|
|
|
request.reason ? `原因:${request.reason}` : '',
|
|
|
|
|
|
...display.impactLines
|
|
|
|
|
|
].filter(Boolean).join('\n'),
|
2026-05-23 15:16:40 +08:00
|
|
|
|
onOk: async () => {
|
|
|
|
|
|
try {
|
|
|
|
|
|
await runWithGlobalLoading(async () => {
|
|
|
|
|
|
await orderApi.approveArtistChange(request.id)
|
|
|
|
|
|
await loadOrders()
|
|
|
|
|
|
})
|
|
|
|
|
|
message.success('已同意改派')
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
message.error('处理改派申请失败')
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: openRejectArtistChange supports OrderView.vue by holding or executing the open reject artist change page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const openRejectArtistChange = (request?: OrderArtistChangeRequestVO) => {
|
|
|
|
|
|
if (!request) return
|
|
|
|
|
|
activeChangeRequest.value = request
|
|
|
|
|
|
rejectForm.rejectReason = ''
|
|
|
|
|
|
rejectModalOpen.value = true
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: closeRejectArtistChange supports OrderView.vue by holding or executing the close reject artist change page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const closeRejectArtistChange = () => {
|
|
|
|
|
|
rejectModalOpen.value = false
|
|
|
|
|
|
activeChangeRequest.value = null
|
|
|
|
|
|
rejectForm.rejectReason = ''
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-23 18:44:57 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* Purpose: submitRejectArtistChange supports OrderView.vue by holding or executing the submit reject artist change page or API role.
|
|
|
|
|
|
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
|
|
|
|
|
*/
|
2026-05-23 15:16:40 +08:00
|
|
|
|
const submitRejectArtistChange = async () => {
|
|
|
|
|
|
if (!activeChangeRequest.value) return
|
|
|
|
|
|
changeProcessing.value = true
|
|
|
|
|
|
try {
|
|
|
|
|
|
await orderApi.rejectArtistChange(activeChangeRequest.value.id, {
|
|
|
|
|
|
rejectReason: rejectForm.rejectReason.trim() || undefined
|
|
|
|
|
|
})
|
|
|
|
|
|
message.success('已拒绝改派')
|
|
|
|
|
|
closeRejectArtistChange()
|
|
|
|
|
|
await loadOrders()
|
|
|
|
|
|
} catch {
|
|
|
|
|
|
message.error('拒绝改派申请失败')
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
changeProcessing.value = false
|
2026-02-27 16:44:41 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-18 09:46:11 +08:00
|
|
|
|
/** cancelOrder is a local helper used by this page script. */
|
2026-03-27 14:55:41 +08:00
|
|
|
|
const cancelOrder = (orderId: IdType) => {
|
2026-02-27 16:44:41 +08:00
|
|
|
|
Modal.confirm({
|
|
|
|
|
|
title: '确认取消订单',
|
|
|
|
|
|
content: '确定要取消这个订单吗?',
|
|
|
|
|
|
onOk: async () => {
|
|
|
|
|
|
try {
|
2026-05-13 12:43:01 +08:00
|
|
|
|
await runWithGlobalLoading(() => orderApi.cancelOrder(orderId))
|
2026-02-27 16:44:41 +08:00
|
|
|
|
message.success('订单已取消')
|
2026-03-19 20:19:41 +08:00
|
|
|
|
await loadOrders()
|
|
|
|
|
|
} catch {
|
2026-02-27 16:44:41 +08:00
|
|
|
|
message.error('取消订单失败')
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-24 18:09:11 +08:00
|
|
|
|
onMounted(async () => {
|
|
|
|
|
|
await loadOrders()
|
|
|
|
|
|
})
|
2026-02-27 16:44:41 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
2026-05-29 13:30:56 +08:00
|
|
|
|
.order-page {
|
2026-05-30 18:31:35 +08:00
|
|
|
|
--order-shell-width: var(--frontend-page-max-width);
|
2026-05-29 13:30:56 +08:00
|
|
|
|
min-height: 100vh;
|
|
|
|
|
|
min-height: 100svh;
|
|
|
|
|
|
padding-top: 64px;
|
|
|
|
|
|
padding-bottom: calc(28px + env(safe-area-inset-bottom));
|
|
|
|
|
|
overflow-x: hidden;
|
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
|
background:
|
|
|
|
|
|
linear-gradient(180deg, color-mix(in srgb, var(--theme-primary-soft) 56%, var(--theme-page-bg)) 0%, var(--theme-page-bg) 42%, color-mix(in srgb, var(--theme-secondary-soft) 18%, var(--theme-page-bg)) 100%),
|
|
|
|
|
|
var(--theme-background-image),
|
|
|
|
|
|
var(--theme-page-bg);
|
|
|
|
|
|
background-size: auto, cover, auto;
|
|
|
|
|
|
background-position: center top;
|
|
|
|
|
|
}
|
2026-05-21 18:43:59 +08:00
|
|
|
|
|
2026-05-29 13:30:56 +08:00
|
|
|
|
.order-header {
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
top: 0;
|
2026-05-30 18:31:35 +08:00
|
|
|
|
left: 50%;
|
2026-05-29 13:30:56 +08:00
|
|
|
|
z-index: 20;
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: 42px minmax(0, 1fr) 42px;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 10px;
|
2026-05-30 18:31:35 +08:00
|
|
|
|
width: min(100%, var(--order-shell-width));
|
2026-05-29 13:30:56 +08:00
|
|
|
|
height: 64px;
|
|
|
|
|
|
padding: 8px 18px;
|
|
|
|
|
|
border-bottom: 1px solid color-mix(in srgb, var(--theme-border) 72%, transparent);
|
|
|
|
|
|
background: color-mix(in srgb, var(--theme-card-bg) 88%, transparent);
|
|
|
|
|
|
-webkit-backdrop-filter: blur(18px);
|
|
|
|
|
|
backdrop-filter: blur(18px);
|
2026-05-30 18:31:35 +08:00
|
|
|
|
transform: translateX(-50%);
|
2026-05-29 13:30:56 +08:00
|
|
|
|
}
|
2026-03-24 09:50:55 +08:00
|
|
|
|
|
2026-05-29 13:30:56 +08:00
|
|
|
|
.order-header__back,
|
|
|
|
|
|
.order-header__spacer {
|
|
|
|
|
|
width: 40px;
|
|
|
|
|
|
height: 40px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-header__back {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
color: var(--theme-primary-action);
|
|
|
|
|
|
background: color-mix(in srgb, var(--theme-card-bg) 72%, transparent);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-header__copy {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
justify-items: center;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-header__copy span {
|
|
|
|
|
|
color: var(--theme-primary-action);
|
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
line-height: 1.2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-header__title {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
|
font-size: 19px;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
line-height: 1.2;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-content {
|
2026-05-30 18:31:35 +08:00
|
|
|
|
width: min(100%, var(--order-shell-width));
|
|
|
|
|
|
max-width: var(--order-shell-width);
|
2026-05-29 13:30:56 +08:00
|
|
|
|
margin: 0 auto;
|
|
|
|
|
|
padding: 14px 16px 30px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-tabs {
|
|
|
|
|
|
position: sticky;
|
|
|
|
|
|
top: 64px;
|
|
|
|
|
|
z-index: 12;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
gap: 10px;
|
|
|
|
|
|
margin: 0 -16px 14px;
|
|
|
|
|
|
padding: 12px 16px;
|
|
|
|
|
|
overflow-x: auto;
|
|
|
|
|
|
background: linear-gradient(180deg, color-mix(in srgb, var(--theme-page-bg) 94%, transparent), color-mix(in srgb, var(--theme-page-bg) 76%, transparent));
|
|
|
|
|
|
-webkit-backdrop-filter: blur(12px);
|
|
|
|
|
|
backdrop-filter: blur(12px);
|
|
|
|
|
|
scrollbar-width: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-tabs::-webkit-scrollbar {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-tab {
|
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
|
flex: 0 0 auto;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
gap: 7px;
|
|
|
|
|
|
min-width: 82px;
|
|
|
|
|
|
height: 38px;
|
|
|
|
|
|
padding: 0 16px;
|
|
|
|
|
|
border: 1px solid var(--theme-border);
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
|
background: color-mix(in srgb, var(--theme-card-bg) 82%, transparent);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-tab em {
|
|
|
|
|
|
min-width: 18px;
|
|
|
|
|
|
font-style: normal;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
line-height: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-tab.active {
|
|
|
|
|
|
color: var(--theme-card-bg);
|
|
|
|
|
|
border-color: var(--theme-primary-action);
|
|
|
|
|
|
background: var(--theme-primary-action);
|
|
|
|
|
|
box-shadow: var(--theme-button-shadow);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-tab:active {
|
|
|
|
|
|
transform: scale(.98);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.growth-panel,
|
|
|
|
|
|
.after-sale-panel,
|
|
|
|
|
|
.filter-panel,
|
|
|
|
|
|
.order-card,
|
|
|
|
|
|
.empty-state {
|
|
|
|
|
|
border: 1px solid color-mix(in srgb, var(--theme-card-bg) 72%, var(--theme-border));
|
|
|
|
|
|
border-radius: 24px;
|
|
|
|
|
|
background: color-mix(in srgb, var(--theme-card-bg) 84%, transparent);
|
|
|
|
|
|
box-shadow: 0 18px 44px color-mix(in srgb, var(--theme-neutral) 8%, transparent);
|
|
|
|
|
|
-webkit-backdrop-filter: blur(16px);
|
|
|
|
|
|
backdrop-filter: blur(16px);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.growth-panel {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
gap: 14px;
|
|
|
|
|
|
margin-bottom: 14px;
|
|
|
|
|
|
padding: 18px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.growth-panel__copy {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 4px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.growth-panel__copy span,
|
|
|
|
|
|
.section-title span,
|
|
|
|
|
|
.order-card__identity span,
|
|
|
|
|
|
.order-meta-grid span,
|
|
|
|
|
|
.footer-total span {
|
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
line-height: 1.2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.growth-panel__copy strong,
|
|
|
|
|
|
.section-title strong {
|
|
|
|
|
|
overflow-wrap: anywhere;
|
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
font-weight: 800;
|
|
|
|
|
|
line-height: 1.25;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.growth-panel__copy p {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
line-height: 1.5;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.after-sale-panel {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
margin-bottom: 14px;
|
|
|
|
|
|
padding: 18px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.section-title {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 3px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.after-sale-row {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
padding-top: 10px;
|
|
|
|
|
|
border-top: 1px solid color-mix(in srgb, var(--theme-border) 72%, transparent);
|
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.after-sale-row span {
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.after-sale-row strong {
|
|
|
|
|
|
flex: 0 0 auto;
|
|
|
|
|
|
color: var(--theme-primary-action);
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.filter-panel {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 10px;
|
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
padding: 14px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.filter-row {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
|
|
|
|
gap: 10px;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.filter-row--amount {
|
|
|
|
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.filter-date,
|
|
|
|
|
|
.filter-number {
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.filter-summary {
|
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
text-align: right;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.empty-state {
|
|
|
|
|
|
padding: 28px 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-list {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 16px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 14px;
|
|
|
|
|
|
padding: 16px;
|
|
|
|
|
|
transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card.focused {
|
|
|
|
|
|
border-color: var(--theme-primary-action);
|
|
|
|
|
|
box-shadow: 0 20px 48px color-mix(in srgb, var(--theme-primary) 22%, transparent);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card:active {
|
|
|
|
|
|
transform: translateY(1px);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__head,
|
|
|
|
|
|
.footer {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__identity {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 4px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__identity strong {
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
|
line-height: 1.3;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__head-actions {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex: 0 0 auto;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: 6px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status {
|
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
min-height: 26px;
|
|
|
|
|
|
padding: 4px 10px;
|
|
|
|
|
|
border: 1px solid var(--theme-border);
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
line-height: 1;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.pending {
|
|
|
|
|
|
color: var(--theme-secondary);
|
|
|
|
|
|
background: color-mix(in srgb, var(--theme-secondary-soft) 58%, var(--theme-card-bg));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.completed {
|
|
|
|
|
|
color: var(--theme-primary-action);
|
|
|
|
|
|
background: color-mix(in srgb, var(--theme-primary-soft) 70%, var(--theme-card-bg));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.cancelled {
|
|
|
|
|
|
color: var(--theme-accent);
|
|
|
|
|
|
background: color-mix(in srgb, var(--theme-border) 76%, var(--theme-card-bg));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-meta-grid {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
|
|
|
|
gap: 1px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
border: 1px solid color-mix(in srgb, var(--theme-border) 76%, transparent);
|
|
|
|
|
|
border-radius: 18px;
|
|
|
|
|
|
background: color-mix(in srgb, var(--theme-border) 70%, transparent);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-meta-grid div {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 5px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
padding: 12px;
|
|
|
|
|
|
background: color-mix(in srgb, var(--theme-card-bg) 84%, transparent);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-meta-grid__shop {
|
|
|
|
|
|
grid-column: 1 / -1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-meta-grid strong {
|
|
|
|
|
|
overflow-wrap: anywhere;
|
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
line-height: 1.35;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-meta-grid .amount {
|
|
|
|
|
|
color: var(--theme-primary-action);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-timeline {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-auto-flow: column;
|
|
|
|
|
|
grid-auto-columns: minmax(94px, 1fr);
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
padding: 0 0 2px;
|
|
|
|
|
|
overflow-x: auto;
|
|
|
|
|
|
list-style: none;
|
|
|
|
|
|
scrollbar-width: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-timeline::-webkit-scrollbar {
|
|
|
|
|
|
display: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-timeline li {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 4px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
padding: 9px 10px;
|
|
|
|
|
|
border: 1px solid color-mix(in srgb, var(--theme-border) 70%, transparent);
|
|
|
|
|
|
border-radius: 14px;
|
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
|
background: color-mix(in srgb, var(--theme-primary-soft) 42%, var(--theme-card-bg));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-timeline li.done {
|
|
|
|
|
|
color: var(--theme-primary-action);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-timeline li.active {
|
|
|
|
|
|
border-color: var(--theme-primary-action);
|
|
|
|
|
|
box-shadow: var(--theme-focus-shadow);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-timeline strong {
|
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
line-height: 1.2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-timeline span {
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
|
line-height: 1.25;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-items {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-item {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: 94px minmax(0, 1fr);
|
|
|
|
|
|
gap: 13px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
padding: 10px;
|
|
|
|
|
|
border: 1px solid color-mix(in srgb, var(--theme-border) 66%, transparent);
|
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
|
background: color-mix(in srgb, var(--theme-primary-soft) 34%, var(--theme-card-bg));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-item.focused {
|
|
|
|
|
|
border-color: var(--theme-primary-action);
|
|
|
|
|
|
background: color-mix(in srgb, var(--theme-primary-soft) 70%, var(--theme-card-bg));
|
|
|
|
|
|
box-shadow: var(--theme-focus-shadow);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.thumb {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
width: 94px;
|
|
|
|
|
|
height: 94px;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
border-radius: 16px;
|
|
|
|
|
|
color: var(--theme-primary-action);
|
|
|
|
|
|
background: var(--theme-gradient-soft);
|
|
|
|
|
|
font-size: 26px;
|
|
|
|
|
|
font-weight: 800;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.thumb img {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
object-fit: cover;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.item-main {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
align-content: start;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.item-title {
|
|
|
|
|
|
margin-bottom: 5px;
|
|
|
|
|
|
overflow-wrap: anywhere;
|
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
font-weight: 800;
|
|
|
|
|
|
line-height: 1.35;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.line {
|
|
|
|
|
|
margin-top: 4px;
|
|
|
|
|
|
overflow-wrap: anywhere;
|
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
line-height: 1.45;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.appointment {
|
|
|
|
|
|
color: var(--theme-primary-action);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.review-summary,
|
|
|
|
|
|
.review-action,
|
|
|
|
|
|
.change-request,
|
|
|
|
|
|
.reject-change-summary {
|
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
border: 1px solid color-mix(in srgb, var(--theme-border) 70%, transparent);
|
|
|
|
|
|
border-radius: 14px;
|
|
|
|
|
|
background: color-mix(in srgb, var(--theme-card-bg) 72%, var(--theme-primary-soft));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.review-summary {
|
|
|
|
|
|
padding: 9px 11px;
|
|
|
|
|
|
color: var(--theme-primary-action);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
line-height: 1.45;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.review-action {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
padding: 8px 10px;
|
|
|
|
|
|
color: var(--theme-primary-action);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.review-action span {
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
overflow-wrap: anywhere;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.change-request {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 10px;
|
|
|
|
|
|
padding: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.change-info,
|
|
|
|
|
|
.impact-list,
|
|
|
|
|
|
.reject-change-summary {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 5px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.change-info {
|
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
line-height: 1.45;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.change-info strong {
|
|
|
|
|
|
color: var(--text-primary);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.impact-list {
|
|
|
|
|
|
color: var(--theme-primary-action);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.change-actions {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.footer {
|
|
|
|
|
|
align-items: flex-end;
|
|
|
|
|
|
padding-top: 2px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.footer-total {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 4px;
|
|
|
|
|
|
flex: 1 1 90px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.footer-total strong {
|
|
|
|
|
|
color: var(--theme-primary-action);
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
line-height: 1.2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.footer-actions {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex: 1 1 190px;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.rating-input {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.reject-change-summary {
|
|
|
|
|
|
margin-bottom: 14px;
|
|
|
|
|
|
padding: 10px 12px;
|
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.ant-btn) {
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.ant-btn-primary) {
|
|
|
|
|
|
border-color: var(--theme-primary-action);
|
|
|
|
|
|
background: var(--theme-primary-action);
|
|
|
|
|
|
box-shadow: var(--theme-button-shadow);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.ant-btn-link) {
|
|
|
|
|
|
color: var(--theme-primary-action);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.ant-btn-dangerous) {
|
|
|
|
|
|
color: var(--theme-accent);
|
|
|
|
|
|
border-color: color-mix(in srgb, var(--theme-accent) 46%, var(--theme-border));
|
|
|
|
|
|
background: color-mix(in srgb, var(--theme-card-bg) 82%, transparent);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.filter-panel :deep(.ant-input-affix-wrapper),
|
|
|
|
|
|
.filter-panel :deep(.ant-picker),
|
|
|
|
|
|
.filter-panel :deep(.ant-input-number),
|
|
|
|
|
|
.filter-panel :deep(.ant-select-selector) {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
border-color: var(--theme-border) !important;
|
|
|
|
|
|
border-radius: 16px !important;
|
|
|
|
|
|
background: color-mix(in srgb, var(--theme-card-bg) 82%, transparent) !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.filter-panel :deep(.ant-input-affix-wrapper-focused),
|
|
|
|
|
|
.filter-panel :deep(.ant-picker-focused),
|
|
|
|
|
|
.filter-panel :deep(.ant-input-number-focused),
|
|
|
|
|
|
.filter-panel :deep(.ant-select-focused .ant-select-selector) {
|
|
|
|
|
|
border-color: var(--theme-primary-action) !important;
|
|
|
|
|
|
box-shadow: var(--theme-focus-shadow) !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@media (max-width: 374px) {
|
|
|
|
|
|
.order-content {
|
|
|
|
|
|
padding-right: 12px;
|
|
|
|
|
|
padding-left: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-tabs {
|
|
|
|
|
|
margin-right: -12px;
|
|
|
|
|
|
margin-left: -12px;
|
|
|
|
|
|
padding-right: 12px;
|
|
|
|
|
|
padding-left: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-item {
|
|
|
|
|
|
grid-template-columns: 82px minmax(0, 1fr);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.thumb {
|
|
|
|
|
|
width: 82px;
|
|
|
|
|
|
height: 82px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@media (min-width: 768px) {
|
|
|
|
|
|
.order-content {
|
2026-05-30 18:31:35 +08:00
|
|
|
|
padding: 14px 16px 30px;
|
2026-05-29 13:30:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card {
|
2026-05-30 18:31:35 +08:00
|
|
|
|
padding: 18px;
|
2026-05-29 13:30:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-item {
|
2026-05-30 18:31:35 +08:00
|
|
|
|
grid-template-columns: 94px minmax(0, 1fr);
|
2026-05-29 13:30:56 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.thumb {
|
2026-05-30 18:31:35 +08:00
|
|
|
|
width: 94px;
|
|
|
|
|
|
height: 94px;
|
2026-05-29 13:30:56 +08:00
|
|
|
|
}
|
2026-03-24 09:50:55 +08:00
|
|
|
|
}
|
2026-05-31 18:36:52 +08:00
|
|
|
|
|
|
|
|
|
|
.order-page {
|
|
|
|
|
|
--order-shell-width: min(100%, var(--frontend-page-max-width, 780px));
|
|
|
|
|
|
--order-bg: #fff8f4;
|
|
|
|
|
|
--order-surface: rgba(255, 255, 255, 0.8);
|
|
|
|
|
|
--order-surface-solid: #ffffff;
|
|
|
|
|
|
--order-surface-low: #fcf2ea;
|
|
|
|
|
|
--order-text: #1f1b17;
|
|
|
|
|
|
--order-muted: #504444;
|
|
|
|
|
|
--order-primary: #7c5357;
|
|
|
|
|
|
--order-primary-soft: #ffdadc;
|
|
|
|
|
|
--order-primary-dim: #eeb9bd;
|
|
|
|
|
|
--order-gold: #775a19;
|
|
|
|
|
|
--order-gold-soft: #ffdea5;
|
|
|
|
|
|
--order-outline: #d4c2c3;
|
|
|
|
|
|
--order-outline-strong: #827474;
|
|
|
|
|
|
--order-shadow: rgba(74, 68, 63, 0.04);
|
|
|
|
|
|
padding-top: 64px;
|
|
|
|
|
|
padding-bottom: calc(32px + env(safe-area-inset-bottom));
|
|
|
|
|
|
color: var(--order-text);
|
|
|
|
|
|
background: var(--order-bg);
|
|
|
|
|
|
background-image:
|
|
|
|
|
|
radial-gradient(circle at 92% 8%, rgba(232, 180, 184, 0.22), transparent 30%),
|
|
|
|
|
|
radial-gradient(circle at 8% 18%, rgba(254, 212, 136, 0.22), transparent 28%);
|
|
|
|
|
|
font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-topbar {
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
left: 50%;
|
|
|
|
|
|
z-index: 50;
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: 44px minmax(0, 1fr) 44px;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
width: var(--order-shell-width);
|
|
|
|
|
|
height: 64px;
|
|
|
|
|
|
padding: 8px 20px;
|
|
|
|
|
|
background: rgba(255, 248, 244, 0.82);
|
|
|
|
|
|
box-shadow: 0 6px 18px rgba(74, 68, 63, 0.05);
|
|
|
|
|
|
backdrop-filter: blur(18px);
|
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-topbar h1 {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
color: var(--order-primary);
|
|
|
|
|
|
font-family: Georgia, 'Times New Roman', serif;
|
|
|
|
|
|
font-size: 28px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
line-height: 1.2;
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.topbar-icon {
|
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
width: 44px;
|
|
|
|
|
|
height: 44px;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
border: 0;
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
color: var(--order-primary);
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
transition: opacity .18s ease, transform .18s ease;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.topbar-icon :deep(.anticon) {
|
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.topbar-icon:active {
|
|
|
|
|
|
transform: scale(.95);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-content {
|
|
|
|
|
|
width: var(--order-shell-width);
|
|
|
|
|
|
max-width: var(--order-shell-width);
|
2026-06-04 16:39:06 +08:00
|
|
|
|
padding: 8px 16px 32px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-tabs {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
position: static;
|
|
|
|
|
|
top: auto;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
z-index: 40;
|
2026-06-04 16:39:06 +08:00
|
|
|
|
gap: 8px;
|
|
|
|
|
|
margin: 0 -16px 14px;
|
|
|
|
|
|
padding: 10px 16px 12px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
background: rgba(255, 248, 244, 0.72);
|
|
|
|
|
|
backdrop-filter: blur(12px);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-tab {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
gap: 6px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
min-width: auto;
|
2026-06-04 16:39:06 +08:00
|
|
|
|
height: 36px;
|
|
|
|
|
|
padding: 0 16px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
border: 1px solid rgba(212, 194, 195, 0.38);
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
color: var(--order-muted);
|
|
|
|
|
|
background: var(--order-surface-solid);
|
2026-06-04 16:39:06 +08:00
|
|
|
|
font-size: 13px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-tab em {
|
|
|
|
|
|
color: inherit;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
opacity: .72;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-tab.active {
|
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
border-color: var(--order-primary);
|
|
|
|
|
|
background: var(--order-primary);
|
|
|
|
|
|
box-shadow: 0 10px 22px rgba(124, 83, 87, 0.2);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-list {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
gap: 16px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card,
|
|
|
|
|
|
.empty-state {
|
|
|
|
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
background: var(--order-surface);
|
|
|
|
|
|
box-shadow: 0 10px 30px var(--order-shadow);
|
|
|
|
|
|
backdrop-filter: blur(16px);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: 116px minmax(0, 1fr);
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
align-items: start;
|
|
|
|
|
|
padding: 12px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
transform: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card.focused {
|
|
|
|
|
|
border-color: rgba(124, 83, 87, 0.46);
|
|
|
|
|
|
box-shadow: 0 16px 34px rgba(124, 83, 87, 0.12);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card:active {
|
|
|
|
|
|
transform: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__cover {
|
|
|
|
|
|
display: grid;
|
2026-06-04 16:39:06 +08:00
|
|
|
|
grid-row: 1 / span 3;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
|
aspect-ratio: 1;
|
|
|
|
|
|
place-items: center;
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
color: var(--order-primary);
|
|
|
|
|
|
background: rgba(235, 225, 218, 0.42);
|
|
|
|
|
|
font-size: 34px;
|
|
|
|
|
|
font-weight: 800;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__cover img {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
object-fit: cover;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__cover.focused {
|
|
|
|
|
|
outline: 2px solid var(--order-primary);
|
|
|
|
|
|
outline-offset: 3px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__body {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
display: contents;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
flex: 1;
|
|
|
|
|
|
gap: 12px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__head {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
|
justify-content: space-between;
|
2026-06-04 16:39:06 +08:00
|
|
|
|
gap: 8px;
|
|
|
|
|
|
grid-column: 2;
|
|
|
|
|
|
min-width: 0;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__title-block {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 6px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__title-block h2 {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
overflow-wrap: anywhere;
|
|
|
|
|
|
color: var(--order-text);
|
|
|
|
|
|
font-family: Georgia, 'Times New Roman', serif;
|
2026-06-04 16:39:06 +08:00
|
|
|
|
font-size: 17px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
line-height: 1.3;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__title-block p {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2026-06-04 16:39:06 +08:00
|
|
|
|
gap: 6px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
margin: 0;
|
|
|
|
|
|
color: var(--order-primary);
|
2026-06-04 16:39:06 +08:00
|
|
|
|
font-size: 13px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
line-height: 1.35;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__title-block :deep(.anticon) {
|
|
|
|
|
|
flex: 0 0 auto;
|
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-pill {
|
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
|
flex: 0 0 auto;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
min-height: 28px;
|
|
|
|
|
|
padding: 5px 12px;
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
line-height: 1;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-pill.pending-payment {
|
|
|
|
|
|
color: #5d4201;
|
|
|
|
|
|
background: var(--order-gold-soft);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-04 16:39:06 +08:00
|
|
|
|
.status-pill.price-confirming {
|
|
|
|
|
|
color: #6b4600;
|
|
|
|
|
|
background: #fff2cc;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-31 18:36:52 +08:00
|
|
|
|
.status-pill.active,
|
|
|
|
|
|
.status-pill.pending-review {
|
|
|
|
|
|
color: #623c40;
|
|
|
|
|
|
background: var(--order-primary-soft);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-pill.completed {
|
|
|
|
|
|
color: var(--order-muted);
|
|
|
|
|
|
background: #f1e6df;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-pill.cancelled {
|
|
|
|
|
|
color: #93000a;
|
|
|
|
|
|
background: #ffdad6;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-info-grid {
|
|
|
|
|
|
display: grid;
|
2026-06-04 16:39:06 +08:00
|
|
|
|
grid-column: 2;
|
|
|
|
|
|
grid-template-columns: minmax(0, 1fr);
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
padding: 8px 0;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
border-top: 1px solid rgba(212, 194, 195, 0.22);
|
|
|
|
|
|
border-bottom: 1px solid rgba(212, 194, 195, 0.22);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-info-grid div {
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-info-grid span {
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
margin-bottom: 4px;
|
|
|
|
|
|
color: var(--order-muted);
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
line-height: 1.2;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-info-grid strong {
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
overflow-wrap: anywhere;
|
|
|
|
|
|
color: var(--order-text);
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
line-height: 1.35;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-info-grid .amount {
|
|
|
|
|
|
color: var(--order-primary);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__meta {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
2026-06-04 16:39:06 +08:00
|
|
|
|
grid-column: 2;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
gap: 8px 12px;
|
|
|
|
|
|
align-items: center;
|
2026-06-04 16:39:06 +08:00
|
|
|
|
min-width: 0;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
color: var(--order-muted);
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
line-height: 1.45;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__meta button {
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
border: 0;
|
|
|
|
|
|
color: var(--order-primary);
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
font: inherit;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-04 16:39:06 +08:00
|
|
|
|
.quote-panel {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-column: 1 / -1;
|
|
|
|
|
|
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
|
|
|
|
gap: 8px 10px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
padding: 10px;
|
|
|
|
|
|
border: 1px solid rgba(212, 194, 195, 0.36);
|
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
|
background: rgba(255, 248, 236, 0.72);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-panel--collapsed {
|
|
|
|
|
|
gap: 7px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-panel__head {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-column: 1 / -1;
|
|
|
|
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
align-items: start;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-panel__head-actions {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
gap: 6px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-panel__head div {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 4px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-panel__head span,
|
|
|
|
|
|
.quote-panel__head em,
|
|
|
|
|
|
.quote-collapsed-summary span,
|
|
|
|
|
|
.quote-flags span,
|
|
|
|
|
|
.quote-item span,
|
|
|
|
|
|
.quote-history__item small,
|
|
|
|
|
|
.quote-confirmed {
|
|
|
|
|
|
color: var(--order-muted);
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
font-style: normal;
|
|
|
|
|
|
line-height: 1.35;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-history-toggle {
|
|
|
|
|
|
min-height: 24px;
|
|
|
|
|
|
padding: 0 9px;
|
|
|
|
|
|
border: 1px solid rgba(130, 116, 116, 0.28);
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
color: var(--order-primary);
|
|
|
|
|
|
background: rgba(255, 255, 255, 0.62);
|
|
|
|
|
|
font: inherit;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-collapsed-summary,
|
|
|
|
|
|
.quote-confirmed-bar {
|
|
|
|
|
|
grid-column: 1 / -1;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
|
background: rgba(255, 255, 255, 0.56);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-collapsed-summary {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
|
|
|
|
gap: 5px 10px;
|
|
|
|
|
|
padding: 8px 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-collapsed-summary span:first-child {
|
|
|
|
|
|
color: var(--order-primary);
|
|
|
|
|
|
font-weight: 800;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-collapsed-summary span:last-child {
|
|
|
|
|
|
grid-column: 1 / -1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-confirmed-bar {
|
|
|
|
|
|
padding: 8px 10px;
|
|
|
|
|
|
color: var(--order-primary);
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
font-weight: 800;
|
|
|
|
|
|
line-height: 1.4;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-panel__head strong {
|
|
|
|
|
|
color: var(--order-text);
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
line-height: 1.35;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-remark {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
overflow-wrap: anywhere;
|
|
|
|
|
|
color: var(--order-muted);
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
line-height: 1.45;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-flags {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
gap: 6px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-flags span {
|
|
|
|
|
|
padding: 3px 8px;
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
background: rgba(255, 255, 255, 0.56);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-flags span.active {
|
|
|
|
|
|
color: var(--order-primary);
|
|
|
|
|
|
background: rgba(124, 83, 87, 0.12);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-items {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-column: 1 / -1;
|
|
|
|
|
|
gap: 6px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-item {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
|
|
|
|
|
|
gap: 5px 10px;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
padding: 8px 10px;
|
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
|
background: rgba(255, 255, 255, 0.58);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-item strong {
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
overflow-wrap: anywhere;
|
|
|
|
|
|
color: var(--order-text);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
line-height: 1.35;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-history {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-column: 1 / -1;
|
|
|
|
|
|
gap: 6px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-history > strong {
|
|
|
|
|
|
color: var(--order-text);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-history > p {
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
color: var(--order-muted);
|
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-history__list {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 6px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-history__item {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
|
|
|
|
gap: 5px 10px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
padding: 8px 10px;
|
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
|
background: rgba(255, 255, 255, 0.58);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-history__item div {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
grid-column: 1 / -1;
|
|
|
|
|
|
gap: 5px 8px;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-history__item span,
|
|
|
|
|
|
.quote-history__item em {
|
|
|
|
|
|
color: var(--order-primary);
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
font-style: normal;
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-history__item p {
|
|
|
|
|
|
grid-column: 1 / -1;
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
overflow-wrap: anywhere;
|
|
|
|
|
|
color: var(--order-muted);
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
line-height: 1.4;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-history__prices {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
grid-column: 1 / -1;
|
|
|
|
|
|
gap: 6px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-history__prices span {
|
|
|
|
|
|
padding: 3px 7px;
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
color: var(--order-muted);
|
|
|
|
|
|
background: rgba(252, 242, 234, 0.82);
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-reply {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
grid-column: 1 / -1;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-reply__actions {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
gap: 8px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-confirmed {
|
|
|
|
|
|
display: inline-flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
min-height: 38px;
|
|
|
|
|
|
color: var(--order-primary);
|
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-31 18:36:52 +08:00
|
|
|
|
.order-extension-list {
|
|
|
|
|
|
display: grid;
|
2026-06-04 16:39:06 +08:00
|
|
|
|
grid-column: 1 / -1;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
gap: 10px;
|
|
|
|
|
|
padding-top: 2px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-extension {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
gap: 10px;
|
|
|
|
|
|
min-width: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-extension.focused {
|
|
|
|
|
|
outline: 2px solid rgba(124, 83, 87, 0.32);
|
|
|
|
|
|
outline-offset: 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.review-summary,
|
|
|
|
|
|
.review-action,
|
|
|
|
|
|
.change-request,
|
|
|
|
|
|
.reject-change-summary {
|
|
|
|
|
|
border: 1px solid rgba(212, 194, 195, 0.34);
|
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
|
background: rgba(252, 242, 234, 0.74);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.review-summary {
|
|
|
|
|
|
color: var(--order-primary);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.review-action {
|
|
|
|
|
|
color: var(--order-primary);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.review-action button,
|
|
|
|
|
|
.order-action {
|
|
|
|
|
|
min-height: 38px;
|
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
|
border: 1px solid var(--order-outline-strong);
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
color: var(--order-muted);
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
transition: background .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.review-action button,
|
|
|
|
|
|
.order-action--primary {
|
|
|
|
|
|
color: #ffffff;
|
|
|
|
|
|
border-color: var(--order-primary);
|
|
|
|
|
|
background: var(--order-primary);
|
|
|
|
|
|
box-shadow: 0 10px 22px rgba(124, 83, 87, 0.18);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-action--danger {
|
|
|
|
|
|
color: #93000a;
|
|
|
|
|
|
border-color: rgba(186, 26, 26, 0.38);
|
|
|
|
|
|
background: #fff8f4;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-action:active,
|
|
|
|
|
|
.review-action button:active {
|
|
|
|
|
|
transform: scale(.98);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-06-04 16:39:06 +08:00
|
|
|
|
.order-action:disabled {
|
|
|
|
|
|
cursor: not-allowed;
|
|
|
|
|
|
opacity: .55;
|
|
|
|
|
|
transform: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-31 18:36:52 +08:00
|
|
|
|
.change-request {
|
|
|
|
|
|
padding: 12px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.change-info {
|
|
|
|
|
|
color: var(--order-muted);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.change-info strong,
|
|
|
|
|
|
.impact-list {
|
|
|
|
|
|
color: var(--order-primary);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.change-actions {
|
|
|
|
|
|
gap: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__actions {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-wrap: wrap;
|
2026-06-04 16:39:06 +08:00
|
|
|
|
grid-column: 1 / -1;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
gap: 12px;
|
|
|
|
|
|
justify-content: flex-end;
|
|
|
|
|
|
padding-top: 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.empty-state {
|
|
|
|
|
|
padding: 36px 18px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.ant-btn) {
|
|
|
|
|
|
border-radius: 999px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.ant-btn-primary) {
|
|
|
|
|
|
border-color: var(--order-primary);
|
|
|
|
|
|
background: var(--order-primary);
|
|
|
|
|
|
box-shadow: 0 10px 22px rgba(124, 83, 87, 0.18);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@media (max-width: 374px) {
|
|
|
|
|
|
.order-content {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
padding-top: 6px;
|
|
|
|
|
|
padding-right: 12px;
|
|
|
|
|
|
padding-left: 12px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-tabs {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
gap: 6px;
|
|
|
|
|
|
margin-right: -12px;
|
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
|
margin-left: -12px;
|
|
|
|
|
|
padding-right: 12px;
|
|
|
|
|
|
padding-left: 12px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-tab {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
height: 34px;
|
|
|
|
|
|
padding: 0 14px;
|
|
|
|
|
|
font-size: 12px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
grid-template-columns: 96px minmax(0, 1fr);
|
|
|
|
|
|
padding: 12px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__head,
|
|
|
|
|
|
.order-card__actions {
|
|
|
|
|
|
align-items: stretch;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@media (min-width: 768px) {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
.order-page {
|
|
|
|
|
|
--order-shell-width: min(calc(100vw - 48px), var(--frontend-content-max-width, 1120px));
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-31 18:36:52 +08:00
|
|
|
|
.order-content {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
padding: 18px 0 42px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.status-tabs {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
position: sticky;
|
|
|
|
|
|
top: 64px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
margin-right: 0;
|
2026-06-04 16:39:06 +08:00
|
|
|
|
margin-bottom: 20px;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
margin-left: 0;
|
|
|
|
|
|
padding-right: 0;
|
|
|
|
|
|
padding-left: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card {
|
2026-06-04 16:39:06 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: flex-start;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
gap: 24px;
|
|
|
|
|
|
padding: 24px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__cover {
|
|
|
|
|
|
flex: 0 0 160px;
|
2026-06-04 16:39:06 +08:00
|
|
|
|
grid-row: auto;
|
2026-05-31 18:36:52 +08:00
|
|
|
|
width: 160px;
|
2026-06-04 16:39:06 +08:00
|
|
|
|
height: 160px;
|
|
|
|
|
|
align-self: flex-start;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__body {
|
|
|
|
|
|
display: grid;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__head,
|
|
|
|
|
|
.order-info-grid,
|
|
|
|
|
|
.order-card__meta,
|
|
|
|
|
|
.quote-panel,
|
|
|
|
|
|
.order-extension-list,
|
|
|
|
|
|
.order-card__actions {
|
|
|
|
|
|
grid-column: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-info-grid {
|
|
|
|
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
|
|
|
|
gap: 16px;
|
|
|
|
|
|
padding: 12px 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.order-card__title-block h2 {
|
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.quote-item {
|
|
|
|
|
|
grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(82px, auto));
|
2026-05-31 18:36:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-03-19 20:19:41 +08:00
|
|
|
|
</style>
|