feat: show meter price and hide supplier quota
Customers see the admin unit price after pricing, and the preorder cart no longer shows the supplier cap or remaining meterage. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -71,7 +71,7 @@ async function submit() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AuthShell back-to="/welcome">
|
||||
<AuthShell back-to="/welcome" wave>
|
||||
<h1 class="auth-title">به نادمی تکس خوش آمدید</h1>
|
||||
<p class="auth-lead">برای ادامه، وارد حساب کاربری خود شوید</p>
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ async function submit() {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AuthShell back-to="/login">
|
||||
<AuthShell back-to="/login" wave>
|
||||
<h1 class="auth-title">ثبتنام</h1>
|
||||
<p class="auth-lead">برای ساخت حساب کاربری، اطلاعات زیر را وارد کنید</p>
|
||||
|
||||
|
||||
@@ -165,17 +165,6 @@ const quickLinks = [
|
||||
</span>
|
||||
<strong>{{ formatMeterage(totalMeterage) }}</strong>
|
||||
</div>
|
||||
<div
|
||||
v-for="row in companySummaries ?? []"
|
||||
:key="row.companyId"
|
||||
class="cart-summary-card__row cart-summary-card__row--sub"
|
||||
>
|
||||
<span class="cart-summary-card__row-label">{{ row.companyName }}</span>
|
||||
<strong>
|
||||
{{ formatMeterage(row.meterage) }}
|
||||
<span class="cart-summary-card__cap">/ {{ formatMeterage(row.maxMeterage) }}</span>
|
||||
</strong>
|
||||
</div>
|
||||
<div class="cart-summary-card__row cart-summary-card__row--hint">
|
||||
<span class="cart-summary-card__row-label">
|
||||
<IconOrders :size="16" />
|
||||
@@ -217,10 +206,6 @@ const quickLinks = [
|
||||
</h3>
|
||||
<p class="cart-guide-card__text">
|
||||
محصولات موردنظر را به سبد اضافه کنید، متراژ کل را بررسی کنید و «ثبت پیشسفارش» را بزنید.
|
||||
<template v-if="!isEmpty">
|
||||
سقف مجاز: {{ formatMeterage(maxMeterage) }} — باقیمانده:
|
||||
{{ formatMeterage(remainingCapacity) }}.
|
||||
</template>
|
||||
پس از قیمتگذاری، از صفحه سفارش روش تسویه را انتخاب میکنید.
|
||||
</p>
|
||||
</div>
|
||||
@@ -510,17 +495,6 @@ const quickLinks = [
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.cart-summary-card__row--sub {
|
||||
padding-block: 6px;
|
||||
font-size: 0.8125rem;
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.cart-summary-card__cap {
|
||||
font-weight: 500;
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.cart-summary-card__row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
@@ -82,27 +82,6 @@ const emit = defineEmits<{
|
||||
<span>جمع متراژ کل</span>
|
||||
<strong>{{ formatMeterage(totalMeterage) }}</strong>
|
||||
</div>
|
||||
<template v-if="companySummaries?.length">
|
||||
<div
|
||||
v-for="row in companySummaries"
|
||||
:key="row.companyId"
|
||||
class="cart-mobile-summary__row cart-mobile-summary__row--sub"
|
||||
>
|
||||
<span>{{ row.companyName }}</span>
|
||||
<strong>
|
||||
{{ formatMeterage(row.meterage) }}
|
||||
<span class="cart-mobile-summary__cap">/ {{ formatMeterage(row.maxMeterage) }}</span>
|
||||
</strong>
|
||||
</div>
|
||||
</template>
|
||||
<div v-else class="cart-mobile-summary__row">
|
||||
<span>حداکثر مجاز</span>
|
||||
<strong>{{ formatMeterage(maxMeterage) }}</strong>
|
||||
</div>
|
||||
<div class="cart-mobile-summary__row cart-mobile-summary__row--remain">
|
||||
<span>باقی مانده</span>
|
||||
<strong>{{ formatMeterage(remainingCapacity) }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<PreorderPaymentFields
|
||||
:settlement-type="settlementType"
|
||||
@@ -296,22 +275,7 @@ const emit = defineEmits<{
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.cart-mobile-summary__row--sub {
|
||||
color: var(--color-text-muted);
|
||||
font-size: 0.8125rem;
|
||||
}
|
||||
|
||||
.cart-mobile-summary__cap {
|
||||
font-weight: 500;
|
||||
color: var(--color-text-muted);
|
||||
}
|
||||
|
||||
.cart-mobile-summary__row:not(:last-child) {
|
||||
border-bottom: 1px solid #e8edf3;
|
||||
}
|
||||
|
||||
.cart-mobile-summary__row--remain strong {
|
||||
color: #1e293b;
|
||||
font-weight: 800;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -33,7 +33,13 @@ import { getStatusHero, getTrackingFooterLabel } from '@/utils/orderTracking'
|
||||
import OrderTrackingTimeline from '@/components/orders/OrderTrackingTimeline.vue'
|
||||
import OrderStatusHero from '@/components/orders/OrderStatusHero.vue'
|
||||
import OrderTrackingSummary from '@/components/orders/OrderTrackingSummary.vue'
|
||||
import { canSubmitCashReceipt, isInvoicePriced, orderItemMeterage } from '@/utils/orderInvoice'
|
||||
import {
|
||||
canSubmitCashReceipt,
|
||||
isInvoicePriced,
|
||||
orderItemMeterage,
|
||||
orderItemUnitPrice,
|
||||
orderUnitPriceRows,
|
||||
} from '@/utils/orderInvoice'
|
||||
import {
|
||||
isInCashPaymentPhase,
|
||||
isInCheckPhase,
|
||||
@@ -49,6 +55,7 @@ const isDesktopLayout = useMediaQuery('(min-width: 768px)')
|
||||
|
||||
const orderId = computed(() => route.params.id as string)
|
||||
const order = computed(() => orderStore.getOrderById(orderId.value))
|
||||
const unitPriceRows = computed(() => orderUnitPriceRows(order.value))
|
||||
const showTracking = ref(route.query.track === '1' || route.query.receipt === '1')
|
||||
const showReceiptForm = ref(false)
|
||||
const showTimeline = ref(true)
|
||||
@@ -410,6 +417,13 @@ async function submitReceipt() {
|
||||
<BaseButton block :loading="planSaving" @click="savePaymentPlan">ثبت روش پرداخت</BaseButton>
|
||||
</div>
|
||||
|
||||
<div v-for="row in unitPriceRows" :key="row.id" class="order-info-card__row">
|
||||
<span class="order-info-card__key">{{ row.label }}</span>
|
||||
<span class="order-info-card__value order-info-card__value--accent">
|
||||
{{ formatCurrency(row.price) }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="order-info-card__row order-info-card__row--last">
|
||||
<span class="order-info-card__key">مبلغ فاکتور</span>
|
||||
<strong class="order-info-card__amount">
|
||||
@@ -487,6 +501,9 @@ async function submitReceipt() {
|
||||
<div>
|
||||
<strong>{{ item.productName }}</strong>
|
||||
<p class="item-row__meta">کالیته {{ item.catalogCode }} · {{ item.color }}</p>
|
||||
<p v-if="orderItemUnitPrice(item) != null" class="item-row__meta">
|
||||
قیمت هر متر: {{ formatCurrency(orderItemUnitPrice(item)!) }}
|
||||
</p>
|
||||
</div>
|
||||
<span>{{ formatMeterage(orderItemMeterage(item)) }}</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user