Hide Zaarbox key on Montzar and tighten product pricing UI.
Hide zaarbox_price_key when price_provider is montzar, add +/- for fixed melted and manual prices, drop formula on fixed, and remove the show-in-assets switch. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -253,6 +253,11 @@ export function isSettingVisible(key: string | undefined | null): boolean {
|
||||
const provider = (priceProviderSetting.value || '').trim().toLowerCase()
|
||||
if (provider && provider !== 'montzar') return false
|
||||
}
|
||||
// شناسه ردیف تابلو فقط برای منبع zaarbox معنی دارد
|
||||
if (k === 'zaarbox_price_key') {
|
||||
const provider = (priceProviderSetting.value || '').trim().toLowerCase()
|
||||
if (provider === 'montzar') return false
|
||||
}
|
||||
// تنظیمات قابلویرایش کانال فقط وقتی دسترسی دیپلوی روشن است
|
||||
if (PRICE_CHANNEL_PANEL_KEYS.has(k) && !priceChannelAccessSetting.value) return false
|
||||
return true
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class="flex flex-col gap-4">
|
||||
<div
|
||||
v-if="usesMeltedPricing"
|
||||
class="product-editor-panel flex flex-col gap-3"
|
||||
class="product-editor-panel flex flex-col gap-3 p-3"
|
||||
>
|
||||
<div class="product-spec-switch-row">
|
||||
<div class="product-spec-label">
|
||||
@@ -34,21 +34,41 @@
|
||||
<a-radio-button value="reference">مرجع متفاوت</a-radio-button>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
<div v-if="meltedPriceOption === 'fixed'" class="grid items-start gap-4 md:grid-cols-3">
|
||||
<div v-if="meltedPriceOption === 'fixed'" class="flex flex-col gap-2">
|
||||
<a-form-item name="price" class="!mb-0">
|
||||
<template #label>
|
||||
<DashboardLabelWithHelp label="قیمت ثابت" :help="fixedPriceHelp" size="sm" />
|
||||
</template>
|
||||
<BasicInput addon-before="ریال" type="price" v-model:value="form.price" />
|
||||
<div class="flex w-full min-w-0 flex-col gap-2 sm:flex-row sm:items-center">
|
||||
<BasicInput
|
||||
class="min-w-0 w-full flex-1"
|
||||
addon-before="ریال"
|
||||
type="price"
|
||||
v-model:value="form.price"
|
||||
/>
|
||||
<div class="grid w-full grid-cols-2 gap-1.5 sm:w-auto sm:shrink-0">
|
||||
<AButton
|
||||
class="border-green text-green !flex items-center justify-center gap-1"
|
||||
size="middle"
|
||||
@click="$emit('addPrice')"
|
||||
>
|
||||
<Icon icon="vuesax-linear:add" size="18" />
|
||||
<span>۱۰ هزار</span>
|
||||
</AButton>
|
||||
<AButton
|
||||
class="border-red text-red !flex items-center justify-center gap-1"
|
||||
size="middle"
|
||||
@click="$emit('minusPrice')"
|
||||
>
|
||||
<Icon icon="vuesax-linear:minus" size="18" />
|
||||
<span>۱۰ هزار</span>
|
||||
</AButton>
|
||||
</div>
|
||||
</div>
|
||||
</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"
|
||||
/>
|
||||
<p class="m-0 text-xs leading-5" style="color: var(--admin-text-secondary)">
|
||||
با دکمههای مثبت و منفی هر بار ۱۰٬۰۰۰ ریال کم یا زیاد میشود؛ برای اعمال نهایی «ثبت» را بزنید.
|
||||
</p>
|
||||
</div>
|
||||
<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">
|
||||
@@ -158,21 +178,41 @@
|
||||
<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 name="price" class="!mb-0 md:col-span-2">
|
||||
<div v-if="methodOption === '1'" class="flex flex-col gap-2">
|
||||
<a-form-item name="price" class="!mb-0">
|
||||
<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 class="flex w-full min-w-0 flex-col gap-2 sm:flex-row sm:items-center">
|
||||
<BasicInput
|
||||
class="min-w-0 w-full flex-1"
|
||||
addon-before="ریال"
|
||||
type="price"
|
||||
v-model:value="form.price"
|
||||
/>
|
||||
<div class="grid w-full grid-cols-2 gap-1.5 sm:w-auto sm:shrink-0">
|
||||
<AButton
|
||||
class="border-green text-green !flex items-center justify-center gap-1"
|
||||
size="middle"
|
||||
@click="$emit('addPrice')"
|
||||
>
|
||||
<Icon icon="vuesax-linear:add" size="18" />
|
||||
<span>۱۰ هزار</span>
|
||||
</AButton>
|
||||
<AButton
|
||||
class="border-red text-red !flex items-center justify-center gap-1"
|
||||
size="middle"
|
||||
@click="$emit('minusPrice')"
|
||||
>
|
||||
<Icon icon="vuesax-linear:minus" size="18" />
|
||||
<span>۱۰ هزار</span>
|
||||
</AButton>
|
||||
</div>
|
||||
</div>
|
||||
</a-form-item>
|
||||
<p class="m-0 text-xs leading-5" style="color: var(--admin-text-secondary)">
|
||||
با دکمههای مثبت و منفی هر بار ۱۰٬۰۰۰ ریال کم یا زیاد میشود؛ برای اعمال نهایی «ثبت» را بزنید.
|
||||
</p>
|
||||
</div>
|
||||
<div v-if="methodOption === '2'" class="grid gap-4 md:grid-cols-4">
|
||||
<a-form-item name="reading_method" class="!mb-0 md:col-span-2">
|
||||
@@ -459,10 +499,6 @@
|
||||
<span class="text-sm">نمایش در لیست محصولات</span>
|
||||
<a-switch v-model:checked="form.show_in_list" />
|
||||
</div>
|
||||
<div class="product-visibility-row">
|
||||
<span class="text-sm">نمایش در داراییها</span>
|
||||
<a-switch v-model:checked="form.show_in_assets" />
|
||||
</div>
|
||||
<div class="product-visibility-row">
|
||||
<span class="text-sm">نمایش در تابلو TV</span>
|
||||
<a-switch v-model:checked="form.show_on_tv" />
|
||||
@@ -674,7 +710,7 @@ const manualPriceHelp: DashboardHelp = {
|
||||
}
|
||||
|
||||
const fixedPriceHelp: DashboardHelp = {
|
||||
description: 'مبلغ ثابت خرید/فروش این محصول آبشدهای.',
|
||||
description: 'مبلغ ثابت خرید/فروش این محصول آبشدهای. دکمههای +/− هر بار ۱۰٬۰۰۰ ریال تنظیم میکنند.',
|
||||
}
|
||||
|
||||
const priceReferenceHelp: DashboardHelp = {
|
||||
@@ -733,10 +769,6 @@ const cashFeeSellHelp: DashboardHelp = {
|
||||
formula: 'نقدی: −۲۰۰٬۰۰۰ ریال | درصدی: ۰.۵٪ یا ۱۰٪ از قیمت پایه',
|
||||
}
|
||||
|
||||
const showInAssetsHelp: DashboardHelp = {
|
||||
description: 'روشن: این محصول در صفحه داراییهای مشتری نمایش داده میشود.',
|
||||
}
|
||||
|
||||
const showOnTvHelp: DashboardHelp = {
|
||||
description: 'روشن: این محصول در صفحه تابلو قیمت مشتری (/tv) نمایش داده میشود.',
|
||||
}
|
||||
@@ -937,6 +969,7 @@ watch(
|
||||
if (option === 'fixed') {
|
||||
props.form.direct_price = 1
|
||||
props.form.price_offset_percent = 0
|
||||
props.form.price_formula_enabled = false
|
||||
}
|
||||
if (option === 'reference') {
|
||||
props.form.direct_price = 0
|
||||
|
||||
Reference in New Issue
Block a user