added fallback
This commit is contained in:
@@ -24,6 +24,7 @@ export interface Product{
|
|||||||
open_sell: boolean
|
open_sell: boolean
|
||||||
show: boolean
|
show: boolean
|
||||||
show_in_assets?: boolean
|
show_in_assets?: boolean
|
||||||
|
trade_by_quantity?: boolean
|
||||||
use_last_price_if_zero?: boolean
|
use_last_price_if_zero?: boolean
|
||||||
title: string
|
title: string
|
||||||
updated_at: string
|
updated_at: string
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ const KEY_TYPE_FALLBACK: Record<string, SettingFieldType> = {
|
|||||||
tahesab_bank_account: 'text',
|
tahesab_bank_account: 'text',
|
||||||
support_messenger_id: 'text',
|
support_messenger_id: 'text',
|
||||||
support_messenger_text: 'longtext',
|
support_messenger_text: 'longtext',
|
||||||
|
invite_link_text: 'longtext',
|
||||||
support_messenger: 'select',
|
support_messenger: 'select',
|
||||||
deposit_sms_support_number: 'number',
|
deposit_sms_support_number: 'number',
|
||||||
zaarbox_price_key: 'select'
|
zaarbox_price_key: 'select'
|
||||||
|
|||||||
@@ -225,6 +225,16 @@
|
|||||||
<a-form-item label="نمایش در صفحه داراییها" name="show_in_assets">
|
<a-form-item label="نمایش در صفحه داراییها" name="show_in_assets">
|
||||||
<a-switch v-model:checked="form.show_in_assets" />
|
<a-switch v-model:checked="form.show_in_assets" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item
|
||||||
|
v-if="!isMeltedCategory"
|
||||||
|
label="معامله مقداری"
|
||||||
|
name="trade_by_quantity"
|
||||||
|
>
|
||||||
|
<a-switch v-model:checked="form.trade_by_quantity" />
|
||||||
|
<div class="text-xs text-gray-500 mt-1 leading-6">
|
||||||
|
روشن: فرم خرید/فروش با «ارزش کل» و «مقدار» (مستقل از دستهبندی)
|
||||||
|
</div>
|
||||||
|
</a-form-item>
|
||||||
<template v-if="form.order_limit_enabled">
|
<template v-if="form.order_limit_enabled">
|
||||||
<div class="col-span-2 text-xs text-gray-500 -mt-2 mb-1">
|
<div class="col-span-2 text-xs text-gray-500 -mt-2 mb-1">
|
||||||
حداقل یکی از «حداقل» یا «حداکثر» الزامی است؛ میتوانید فقط یکی را پر کنید.
|
حداقل یکی از «حداقل» یا «حداکثر» الزامی است؛ میتوانید فقط یکی را پر کنید.
|
||||||
|
|||||||
@@ -64,6 +64,7 @@
|
|||||||
<MobileDetailRow label="دسته بندی محصول" :value="row.group_type || '-'" />
|
<MobileDetailRow label="دسته بندی محصول" :value="row.group_type || '-'" />
|
||||||
<MobileDetailRow label="واحد" :value="row.unit || '-'" />
|
<MobileDetailRow label="واحد" :value="row.unit || '-'" />
|
||||||
<MobileDetailRow label="وزن" :value="row.amount ?? '-'" />
|
<MobileDetailRow label="وزن" :value="row.amount ?? '-'" />
|
||||||
|
<MobileDetailRow label="معامله مقداری" :value="row.trade_by_quantity ? 'بله' : 'خیر'" />
|
||||||
</MobileInfoGrid>
|
</MobileInfoGrid>
|
||||||
</template>
|
</template>
|
||||||
</MobileDetailSheet>
|
</MobileDetailSheet>
|
||||||
|
|||||||
@@ -316,6 +316,7 @@ async function edit(record: Product) {
|
|||||||
form.value = normalizeProductOrderLimitForm({
|
form.value = normalizeProductOrderLimitForm({
|
||||||
...productData,
|
...productData,
|
||||||
show_in_assets: productData.show_in_assets ?? false,
|
show_in_assets: productData.show_in_assets ?? false,
|
||||||
|
trade_by_quantity: productData.trade_by_quantity ?? false,
|
||||||
price_offset_percent: productData.price_offset_percent ?? 0,
|
price_offset_percent: productData.price_offset_percent ?? 0,
|
||||||
direct_price: productData.direct_price ?? 0,
|
direct_price: productData.direct_price ?? 0,
|
||||||
auto_open_at: start.isValid() ? start : dayjs('00:00:00', 'HH:mm:ss'),
|
auto_open_at: start.isValid() ? start : dayjs('00:00:00', 'HH:mm:ss'),
|
||||||
@@ -358,6 +359,7 @@ function resetData() {
|
|||||||
file: undefined,
|
file: undefined,
|
||||||
order_limit_enabled: false,
|
order_limit_enabled: false,
|
||||||
show_in_assets: false,
|
show_in_assets: false,
|
||||||
|
trade_by_quantity: false,
|
||||||
use_last_price_if_zero: false,
|
use_last_price_if_zero: false,
|
||||||
inventory: 0,
|
inventory: 0,
|
||||||
min_order_cash: undefined,
|
min_order_cash: undefined,
|
||||||
@@ -395,6 +397,7 @@ async function ok() {
|
|||||||
}
|
}
|
||||||
if (isMeltedTradeGroup(payload.group_type)) {
|
if (isMeltedTradeGroup(payload.group_type)) {
|
||||||
payload.amount = 1
|
payload.amount = 1
|
||||||
|
payload.trade_by_quantity = true
|
||||||
payload.direct_price = meltedPriceOption.value === 'fixed' ? 1 : 0
|
payload.direct_price = meltedPriceOption.value === 'fixed' ? 1 : 0
|
||||||
payload.cash_fee_buy = payload.cash_fee_buy ?? 0
|
payload.cash_fee_buy = payload.cash_fee_buy ?? 0
|
||||||
payload.cash_fee_sell = payload.cash_fee_sell ?? 0
|
payload.cash_fee_sell = payload.cash_fee_sell ?? 0
|
||||||
|
|||||||
Reference in New Issue
Block a user