fix(product): show formula price beside pricing fields for melted products
Formula section was only in non-melted automatic mode; now appears next to adjustment fields for melted app/reference/fixed and all non-melted sources. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -23,124 +23,34 @@
|
|||||||
<div class="product-spec-label">
|
<div class="product-spec-label">
|
||||||
<DashboardLabelWithHelp label="مرجع قیمت" :help="meltedPriceSourceHelp" size="sm" />
|
<DashboardLabelWithHelp label="مرجع قیمت" :help="meltedPriceSourceHelp" size="sm" />
|
||||||
</div>
|
</div>
|
||||||
<a-radio-group :value="meltedPriceOption" name="meltedPriceGroup" @update:value="$emit('update:meltedPriceOption', $event)">
|
<a-radio-group
|
||||||
<a-radio value="app">قیمت صفحه اصلی اپلیکیشن</a-radio>
|
:value="meltedPriceOption"
|
||||||
<a-radio value="fixed">ثابت</a-radio>
|
name="meltedPriceGroup"
|
||||||
<a-radio value="reference">مرجع متفاوت</a-radio>
|
button-style="solid"
|
||||||
|
@update:value="$emit('update:meltedPriceOption', $event)"
|
||||||
|
>
|
||||||
|
<a-radio-button value="app">قیمت صفحه اصلی اپلیکیشن</a-radio-button>
|
||||||
|
<a-radio-button value="fixed">ثابت</a-radio-button>
|
||||||
|
<a-radio-button value="reference">مرجع متفاوت</a-radio-button>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="meltedPriceOption === 'fixed'" class="grid gap-4 md:grid-cols-3">
|
<div v-if="meltedPriceOption === 'fixed'" class="grid items-start gap-4 md:grid-cols-3">
|
||||||
<a-form-item name="price" class="!mb-0">
|
<a-form-item name="price" class="!mb-0">
|
||||||
<template #label>
|
<template #label>
|
||||||
<DashboardLabelWithHelp label="قیمت ثابت" :help="fixedPriceHelp" size="sm" />
|
<DashboardLabelWithHelp label="قیمت ثابت" :help="fixedPriceHelp" size="sm" />
|
||||||
</template>
|
</template>
|
||||||
<BasicInput addon-before="ریال" type="price" v-model:value="form.price" />
|
<BasicInput addon-before="ریال" type="price" v-model:value="form.price" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<FormulaPriceSection
|
||||||
|
class="md:col-span-2"
|
||||||
|
:model-value="form"
|
||||||
|
:reference-middle-price="formulaReferenceMiddlePrice"
|
||||||
|
:product-amount="Number(form.amount) || 0"
|
||||||
|
@update:model-value="onFormulaFormPatch"
|
||||||
|
@enabled-change="onFormulaEnabledChange"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="meltedPriceOption === 'reference'" class="grid gap-4 md:grid-cols-3">
|
<div v-if="meltedPriceOption === 'reference'" class="grid items-start gap-4 md:grid-cols-4">
|
||||||
<a-form-item name="reading_method" class="!mb-0 md:col-span-2">
|
|
||||||
<template #label>
|
|
||||||
<DashboardLabelWithHelp label="مرجع قیمت" :help="priceReferenceHelp" size="sm" />
|
|
||||||
</template>
|
|
||||||
<div class="flex flex-col gap-1.5">
|
|
||||||
<div class="flex flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3">
|
|
||||||
<BasicSelect
|
|
||||||
class="price-reference-select min-w-0 flex-1"
|
|
||||||
allowClear
|
|
||||||
:hasTooltip="false"
|
|
||||||
popup-class-name="price-reference-select-dropdown"
|
|
||||||
:dropdown-match-select-width="false"
|
|
||||||
:dropdown-style="{ minWidth: '28rem' }"
|
|
||||||
:items="pricesList"
|
|
||||||
valueName="name"
|
|
||||||
keyName="id"
|
|
||||||
v-model:value="form.reading_method"
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
v-if="selectedReferenceTotal > 0"
|
|
||||||
class="price-reference-live shrink-0 text-sm font-700"
|
|
||||||
>
|
|
||||||
{{ usePrice(selectedReferenceTotal) }}
|
|
||||||
</span>
|
|
||||||
<span
|
|
||||||
v-else-if="isOrphanReference"
|
|
||||||
class="price-reference-live-empty shrink-0 text-sm"
|
|
||||||
>
|
|
||||||
در لیست فعلی نیست
|
|
||||||
</span>
|
|
||||||
<span
|
|
||||||
v-else-if="form.reading_method"
|
|
||||||
class="price-reference-live-empty shrink-0 text-sm"
|
|
||||||
>
|
|
||||||
قیمت مرجع در دسترس نیست
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<a-alert
|
|
||||||
v-if="isOrphanReference"
|
|
||||||
type="warning"
|
|
||||||
show-icon
|
|
||||||
class="!mb-0"
|
|
||||||
message="این مرجع قبلاً روی محصول ذخیره شده، ولی الان در لیست قیمت همکار نیست. یک مرجع معتبر انتخاب کنید یا فیلد را پاک کنید."
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item name="price_offset_percent" class="!mb-0">
|
|
||||||
<template #label>
|
|
||||||
<DashboardLabelWithHelp label="تعدیل مرجع (٪)" :help="referencePriceOffsetHelp" size="sm" />
|
|
||||||
</template>
|
|
||||||
<BasicInput type="number" v-model:value="form.price_offset_percent" placeholder="مثلاً 5 یا -3" />
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item name="use_last_price_if_zero" class="!mb-0">
|
|
||||||
<template #label>
|
|
||||||
<DashboardLabelWithHelp label="قیمت صفر از مرجع" :help="useLastPriceIfZeroHelp" size="sm" />
|
|
||||||
</template>
|
|
||||||
<a-switch v-model:checked="form.use_last_price_if_zero" />
|
|
||||||
</a-form-item>
|
|
||||||
</div>
|
|
||||||
<div v-if="meltedPriceOption === 'app'" class="grid gap-4 md:grid-cols-3">
|
|
||||||
<a-form-item name="price_offset_percent" class="!mb-0">
|
|
||||||
<template #label>
|
|
||||||
<DashboardLabelWithHelp label="تعدیل قیمت صفحه اصلی اپلیکیشن (٪)" :help="appPriceOffsetHelp" size="sm" />
|
|
||||||
</template>
|
|
||||||
<BasicInput type="number" v-model:value="form.price_offset_percent" placeholder="مثلاً 5 یا -3" />
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item name="use_last_price_if_zero" class="!mb-0">
|
|
||||||
<template #label>
|
|
||||||
<DashboardLabelWithHelp label="قیمت صفر از مرجع" :help="useLastPriceIfZeroHelp" size="sm" />
|
|
||||||
</template>
|
|
||||||
<a-switch v-model:checked="form.use_last_price_if_zero" />
|
|
||||||
</a-form-item>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="!usesMeltedPricing" class="flex flex-col gap-4">
|
|
||||||
<div class="product-spec-switch-row">
|
|
||||||
<div class="product-spec-label">
|
|
||||||
<DashboardLabelWithHelp label="دریافت قیمت از" :help="priceSourceHelp" size="sm" />
|
|
||||||
</div>
|
|
||||||
<a-radio-group :value="methodOption" name="radioGroup" @update:value="$emit('update:methodOption', $event)">
|
|
||||||
<a-radio value="1">دستی</a-radio>
|
|
||||||
<a-radio value="2">اتوماتیک</a-radio>
|
|
||||||
<a-radio value="3">قیمت صفحه اصلی اپلیکیشن</a-radio>
|
|
||||||
</a-radio-group>
|
|
||||||
</div>
|
|
||||||
<div v-if="methodOption === '1' && !form.price_formula_enabled" class="grid gap-4 md:grid-cols-3">
|
|
||||||
<a-form-item name="price" class="!mb-0 md:col-span-2">
|
|
||||||
<template #label>
|
|
||||||
<DashboardLabelWithHelp label="قیمت وسط" :help="manualPriceHelp" size="sm" />
|
|
||||||
</template>
|
|
||||||
<div class="flex items-center gap-2">
|
|
||||||
<BasicInput class="flex-1" addon-before="ریال" type="price" v-model:value="form.price" />
|
|
||||||
<AButton class="border-green text-green shrink-0 rounded-full aspect-square" size="small" shape="circle" @click="$emit('addPrice')">
|
|
||||||
<template #icon><Icon icon="vuesax-linear:add" size="20" /></template>
|
|
||||||
</AButton>
|
|
||||||
<AButton class="border-red text-red shrink-0 rounded-full" size="small" shape="circle" @click="$emit('minusPrice')">
|
|
||||||
<template #icon><Icon icon="vuesax-linear:minus" size="20" /></template>
|
|
||||||
</AButton>
|
|
||||||
</div>
|
|
||||||
</a-form-item>
|
|
||||||
</div>
|
|
||||||
<div v-if="methodOption === '2' || form.price_formula_enabled" class="grid gap-4 md:grid-cols-3">
|
|
||||||
<a-form-item name="reading_method" class="!mb-0 md:col-span-2">
|
<a-form-item name="reading_method" class="!mb-0 md:col-span-2">
|
||||||
<template #label>
|
<template #label>
|
||||||
<DashboardLabelWithHelp label="مرجع قیمت" :help="priceReferenceHelp" size="sm" />
|
<DashboardLabelWithHelp label="مرجع قیمت" :help="priceReferenceHelp" size="sm" />
|
||||||
@@ -193,6 +103,13 @@
|
|||||||
</template>
|
</template>
|
||||||
<BasicInput type="number" v-model:value="form.price_offset_percent" placeholder="مثلاً 5 یا -3" />
|
<BasicInput type="number" v-model:value="form.price_offset_percent" placeholder="مثلاً 5 یا -3" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<FormulaPriceSection
|
||||||
|
:model-value="form"
|
||||||
|
:reference-middle-price="formulaReferenceMiddlePrice"
|
||||||
|
:product-amount="Number(form.amount) || 0"
|
||||||
|
@update:model-value="onFormulaFormPatch"
|
||||||
|
@enabled-change="onFormulaEnabledChange"
|
||||||
|
/>
|
||||||
<a-form-item name="use_last_price_if_zero" class="!mb-0">
|
<a-form-item name="use_last_price_if_zero" class="!mb-0">
|
||||||
<template #label>
|
<template #label>
|
||||||
<DashboardLabelWithHelp label="قیمت صفر از مرجع" :help="useLastPriceIfZeroHelp" size="sm" />
|
<DashboardLabelWithHelp label="قیمت صفر از مرجع" :help="useLastPriceIfZeroHelp" size="sm" />
|
||||||
@@ -200,9 +117,141 @@
|
|||||||
<a-switch v-model:checked="form.use_last_price_if_zero" />
|
<a-switch v-model:checked="form.use_last_price_if_zero" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="methodOption === '3' && !form.price_formula_enabled" class="flex flex-col gap-3">
|
<div v-if="meltedPriceOption === 'app'" class="grid items-start gap-4 md:grid-cols-4">
|
||||||
<div class="grid gap-4 md:grid-cols-3">
|
<a-form-item v-if="!form.price_formula_enabled" name="price_offset_percent" class="!mb-0">
|
||||||
<a-form-item name="price_offset_percent" class="!mb-0">
|
<template #label>
|
||||||
|
<DashboardLabelWithHelp label="تعدیل قیمت صفحه اصلی اپلیکیشن (٪)" :help="appPriceOffsetHelp" size="sm" />
|
||||||
|
</template>
|
||||||
|
<BasicInput type="number" v-model:value="form.price_offset_percent" placeholder="مثلاً 5 یا -3" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item name="use_last_price_if_zero" class="!mb-0">
|
||||||
|
<template #label>
|
||||||
|
<DashboardLabelWithHelp label="قیمت صفر از مرجع" :help="useLastPriceIfZeroHelp" size="sm" />
|
||||||
|
</template>
|
||||||
|
<a-switch v-model:checked="form.use_last_price_if_zero" />
|
||||||
|
</a-form-item>
|
||||||
|
<FormulaPriceSection
|
||||||
|
class="md:col-span-2"
|
||||||
|
:model-value="form"
|
||||||
|
:reference-middle-price="formulaReferenceMiddlePrice"
|
||||||
|
:product-amount="Number(form.amount) || 0"
|
||||||
|
@update:model-value="onFormulaFormPatch"
|
||||||
|
@enabled-change="onFormulaEnabledChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="!usesMeltedPricing" class="flex flex-col gap-4">
|
||||||
|
<div class="product-spec-switch-row">
|
||||||
|
<div class="product-spec-label">
|
||||||
|
<DashboardLabelWithHelp label="دریافت قیمت از" :help="priceSourceHelp" size="sm" />
|
||||||
|
</div>
|
||||||
|
<a-radio-group
|
||||||
|
:value="methodOption"
|
||||||
|
name="radioGroup"
|
||||||
|
button-style="solid"
|
||||||
|
@update:value="$emit('update:methodOption', $event)"
|
||||||
|
>
|
||||||
|
<a-radio-button value="1">دستی</a-radio-button>
|
||||||
|
<a-radio-button value="2">اتوماتیک</a-radio-button>
|
||||||
|
<a-radio-button value="3">قیمت صفحه اصلی اپلیکیشن</a-radio-button>
|
||||||
|
</a-radio-group>
|
||||||
|
</div>
|
||||||
|
<div v-if="methodOption === '1'" class="grid items-start gap-4 md:grid-cols-4">
|
||||||
|
<a-form-item v-if="!form.price_formula_enabled" name="price" class="!mb-0 md:col-span-2">
|
||||||
|
<template #label>
|
||||||
|
<DashboardLabelWithHelp label="قیمت وسط" :help="manualPriceHelp" size="sm" />
|
||||||
|
</template>
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
<BasicInput class="flex-1" addon-before="ریال" type="price" v-model:value="form.price" />
|
||||||
|
<AButton class="border-green text-green shrink-0 rounded-full aspect-square" size="small" shape="circle" @click="$emit('addPrice')">
|
||||||
|
<template #icon><Icon icon="vuesax-linear:add" size="20" /></template>
|
||||||
|
</AButton>
|
||||||
|
<AButton class="border-red text-red shrink-0 rounded-full" size="small" shape="circle" @click="$emit('minusPrice')">
|
||||||
|
<template #icon><Icon icon="vuesax-linear:minus" size="20" /></template>
|
||||||
|
</AButton>
|
||||||
|
</div>
|
||||||
|
</a-form-item>
|
||||||
|
<FormulaPriceSection
|
||||||
|
:class="form.price_formula_enabled ? 'md:col-span-4' : 'md:col-span-2'"
|
||||||
|
:model-value="form"
|
||||||
|
:reference-middle-price="formulaReferenceMiddlePrice"
|
||||||
|
:product-amount="Number(form.amount) || 0"
|
||||||
|
@update:model-value="onFormulaFormPatch"
|
||||||
|
@enabled-change="onFormulaEnabledChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div v-if="methodOption === '2' || form.price_formula_enabled" class="grid gap-4 md:grid-cols-4">
|
||||||
|
<a-form-item name="reading_method" class="!mb-0 md:col-span-2">
|
||||||
|
<template #label>
|
||||||
|
<DashboardLabelWithHelp label="مرجع قیمت" :help="priceReferenceHelp" size="sm" />
|
||||||
|
</template>
|
||||||
|
<div class="flex flex-col gap-1.5">
|
||||||
|
<div class="flex flex-col gap-1.5 sm:flex-row sm:items-center sm:gap-3">
|
||||||
|
<BasicSelect
|
||||||
|
class="price-reference-select min-w-0 flex-1"
|
||||||
|
allowClear
|
||||||
|
:hasTooltip="false"
|
||||||
|
popup-class-name="price-reference-select-dropdown"
|
||||||
|
:dropdown-match-select-width="false"
|
||||||
|
:dropdown-style="{ minWidth: '28rem' }"
|
||||||
|
:items="pricesList"
|
||||||
|
valueName="name"
|
||||||
|
keyName="id"
|
||||||
|
v-model:value="form.reading_method"
|
||||||
|
/>
|
||||||
|
<span
|
||||||
|
v-if="selectedReferenceTotal > 0"
|
||||||
|
class="price-reference-live shrink-0 text-sm font-700"
|
||||||
|
>
|
||||||
|
{{ usePrice(selectedReferenceTotal) }}
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
v-else-if="isOrphanReference"
|
||||||
|
class="price-reference-live-empty shrink-0 text-sm"
|
||||||
|
>
|
||||||
|
در لیست فعلی نیست
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
v-else-if="form.reading_method"
|
||||||
|
class="price-reference-live-empty shrink-0 text-sm"
|
||||||
|
>
|
||||||
|
قیمت مرجع در دسترس نیست
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<a-alert
|
||||||
|
v-if="isOrphanReference"
|
||||||
|
type="warning"
|
||||||
|
show-icon
|
||||||
|
class="!mb-0"
|
||||||
|
message="این مرجع قبلاً روی محصول ذخیره شده، ولی الان در لیست قیمت همکار نیست. یک مرجع معتبر انتخاب کنید یا فیلد را پاک کنید."
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item v-if="!form.price_formula_enabled" name="price_offset_percent" class="!mb-0">
|
||||||
|
<template #label>
|
||||||
|
<DashboardLabelWithHelp label="تعدیل مرجع (٪)" :help="referencePriceOffsetHelp" size="sm" />
|
||||||
|
</template>
|
||||||
|
<BasicInput type="number" v-model:value="form.price_offset_percent" placeholder="مثلاً 5 یا -3" />
|
||||||
|
</a-form-item>
|
||||||
|
<FormulaPriceSection
|
||||||
|
class="md:col-span-1"
|
||||||
|
:model-value="form"
|
||||||
|
:reference-middle-price="formulaReferenceMiddlePrice"
|
||||||
|
:product-amount="Number(form.amount) || 0"
|
||||||
|
@update:model-value="onFormulaFormPatch"
|
||||||
|
@enabled-change="onFormulaEnabledChange"
|
||||||
|
/>
|
||||||
|
<a-form-item name="use_last_price_if_zero" class="!mb-0">
|
||||||
|
<template #label>
|
||||||
|
<DashboardLabelWithHelp label="قیمت صفر از مرجع" :help="useLastPriceIfZeroHelp" size="sm" />
|
||||||
|
</template>
|
||||||
|
<a-switch v-model:checked="form.use_last_price_if_zero" />
|
||||||
|
</a-form-item>
|
||||||
|
</div>
|
||||||
|
<div v-if="methodOption === '3'" class="flex flex-col gap-3">
|
||||||
|
<div class="grid items-start gap-4 md:grid-cols-4">
|
||||||
|
<a-form-item v-if="!form.price_formula_enabled" name="price_offset_percent" class="!mb-0">
|
||||||
<template #label>
|
<template #label>
|
||||||
<DashboardLabelWithHelp label="تعدیل قیمت صفحه اصلی اپلیکیشن (٪)" :help="appPriceOffsetHelp" size="sm" />
|
<DashboardLabelWithHelp label="تعدیل قیمت صفحه اصلی اپلیکیشن (٪)" :help="appPriceOffsetHelp" size="sm" />
|
||||||
</template>
|
</template>
|
||||||
@@ -214,60 +263,59 @@
|
|||||||
</template>
|
</template>
|
||||||
<a-switch v-model:checked="form.use_last_price_if_zero" />
|
<a-switch v-model:checked="form.use_last_price_if_zero" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<FormulaPriceSection
|
||||||
|
class="md:col-span-2"
|
||||||
|
:model-value="form"
|
||||||
|
:reference-middle-price="formulaReferenceMiddlePrice"
|
||||||
|
:product-amount="Number(form.amount) || 0"
|
||||||
|
@update:model-value="onFormulaFormPatch"
|
||||||
|
@enabled-change="onFormulaEnabledChange"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="rounded-lg border border-solid border-amber-200 bg-amber-50 px-3 py-2 text-xs leading-6 text-amber-800">
|
<div
|
||||||
|
v-if="!form.price_formula_enabled"
|
||||||
|
class="rounded-lg border border-solid border-amber-200 bg-amber-50 px-3 py-2 text-xs leading-6 text-amber-800"
|
||||||
|
>
|
||||||
قیمت هر واحد این محصول = «قیمت هر گرم اپ» × «وزن محصول به گرم». مثلاً برای وزن ۱٫۵ گرم، قیمت = ۱٫۵ برابر قیمت هر گرم اپ. برای فعال بودن، «وزن محصول» را «دارد» بگذارید.
|
قیمت هر واحد این محصول = «قیمت هر گرم اپ» × «وزن محصول به گرم». مثلاً برای وزن ۱٫۵ گرم، قیمت = ۱٫۵ برابر قیمت هر گرم اپ. برای فعال بودن، «وزن محصول» را «دارد» بگذارید.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="grid gap-4 md:grid-cols-2">
|
<div class="live-price-preview rounded-lg border border-solid px-3 py-2">
|
||||||
<FormulaPriceSection
|
<div class="flex flex-col gap-2 md:flex-row md:items-center md:justify-between md:gap-3">
|
||||||
:model-value="form"
|
<div class="flex flex-wrap items-center gap-x-3 gap-y-1 md:min-w-0 md:flex-1">
|
||||||
:reference-middle-price="formulaReferenceMiddlePrice"
|
<DashboardLabelWithHelp
|
||||||
:product-amount="Number(form.amount) || 0"
|
label="قیمت لحظهای"
|
||||||
@update:model-value="onFormulaFormPatch"
|
:help="livePriceHelp"
|
||||||
@enabled-change="onFormulaEnabledChange"
|
size="sm"
|
||||||
/>
|
text-class="live-price-preview__label"
|
||||||
|
/>
|
||||||
<div class="live-price-preview rounded-lg border border-solid px-3 py-2 self-start">
|
<span
|
||||||
<div class="flex flex-col gap-2">
|
v-if="livePricePreview.status === 'ready'"
|
||||||
<div class="flex flex-wrap items-center gap-x-3 gap-y-1">
|
class="live-price-preview__amount text-base font-700"
|
||||||
<DashboardLabelWithHelp
|
>
|
||||||
label="قیمت لحظهای"
|
{{ usePrice(livePricePreview.amount) }}
|
||||||
:help="livePriceHelp"
|
</span>
|
||||||
size="sm"
|
<span
|
||||||
text-class="live-price-preview__label"
|
v-else-if="livePricePreview.message"
|
||||||
/>
|
class="live-price-preview__message text-sm"
|
||||||
<span
|
>
|
||||||
v-if="livePricePreview.status === 'ready'"
|
{{ livePricePreview.message }}
|
||||||
class="live-price-preview__amount text-base font-700"
|
</span>
|
||||||
>
|
<span
|
||||||
{{ usePrice(livePricePreview.amount) }}
|
v-if="livePricePreview.status === 'ready'"
|
||||||
|
class="live-price-preview__source truncate text-xs"
|
||||||
|
>
|
||||||
|
مبنا: {{ livePricePreview.source }}
|
||||||
|
<span v-if="!form.price_formula_enabled && Number(form.price_offset_percent) !== 0">
|
||||||
|
— تعدیل {{ form.price_offset_percent }}٪
|
||||||
</span>
|
</span>
|
||||||
<span
|
</span>
|
||||||
v-else-if="livePricePreview.message"
|
|
||||||
class="live-price-preview__message text-sm"
|
|
||||||
>
|
|
||||||
{{ livePricePreview.message }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="flex items-center justify-between gap-2">
|
|
||||||
<span
|
|
||||||
v-if="livePricePreview.status === 'ready'"
|
|
||||||
class="live-price-preview__source truncate text-xs"
|
|
||||||
>
|
|
||||||
مبنا: {{ livePricePreview.source }}
|
|
||||||
<span v-if="!form.price_formula_enabled && Number(form.price_offset_percent) !== 0">
|
|
||||||
— تعدیل {{ form.price_offset_percent }}٪
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
<AButton size="small" class="shrink-0" @click="$emit('refreshPrices')">
|
|
||||||
بروزرسانی
|
|
||||||
</AButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<AButton size="small" class="shrink-0 self-end md:self-auto" @click="$emit('refreshPrices')">
|
||||||
|
بروزرسانی
|
||||||
|
</AButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user