fix price

This commit is contained in:
2026-07-29 16:02:41 +03:30
parent 2cf4ec1bd9
commit 96fa254abb
13 changed files with 313 additions and 43 deletions
@@ -27,7 +27,8 @@
<MobileDetailRow label="مشتری" :value="pargarCustomerLabel(row)" />
<MobileDetailRow label="موبایل" :value="row.customer?.mobile || '-'" />
<MobileDetailRow label="نوع" :value="pargarTypeLabel(row.type)" />
<MobileDetailRow label="مقدار" :value="pargarAmountLabel(row)" />
<MobileDetailRow label="مقدار" :value="pargarMetalAmountLabel(row)" />
<MobileDetailRow label="مبلغ ریالی" :value="pargarRialAmountLabel(row)" />
<MobileDetailRow label="شرح" full-width :value="pargarDescLabel(row)" />
<MobileDetailRow label="وضعیت" :value="pargarStatusLabel(row.sync_status, row.pargar_ref, row.desc)" />
<MobileDetailRow v-if="parsedPayload?.accountId" label="کد حساب پرگار" :value="parsedPayload.accountId" />
@@ -79,9 +80,10 @@ import { canRetryPargar, pargarStatusLabel } from '@/pages/menuPages/accounting/
import {
formatTransactionAmount,
parsePargarPayload,
pargarAmountLabel,
pargarCustomerLabel,
pargarDescLabel,
pargarMetalAmountLabel,
pargarRialAmountLabel,
pargarTypeLabel
} from '@/pages/menuPages/accounting/utils/pargarDisplay'
import { isMobile } from '@core/utils/is'
@@ -9,7 +9,8 @@
</div>
<div class="flex flex-wrap items-center gap-x-3 gap-y-0.5 text-xs text-gray-600">
<span>نوع: <span class="font-600 text-gray-900">{{ pargarTypeLabel(item.type) }}</span></span>
<span>مقدار: <span class="font-600 text-gray-900">{{ pargarAmountLabel(item) }}</span></span>
<span>مقدار: <span class="font-600 text-gray-900">{{ metalLabel }}</span></span>
<span>ریال: <span class="font-600 text-gray-900">{{ rialLabel }}</span></span>
</div>
<div class="text-xs text-gray-400">{{ createdAtLabel }}</div>
</div>
@@ -22,8 +23,9 @@ import MobileCard from '@/components/mobile/MobileCard.vue'
import { toJalali } from '@core/utils/useDataTime'
import { pargarStatusLabel } from '@/pages/menuPages/accounting/utils/pargarStatus'
import {
pargarAmountLabel,
pargarCustomerLabel,
pargarMetalAmountLabel,
pargarRialAmountLabel,
pargarTypeLabel
} from '@/pages/menuPages/accounting/utils/pargarDisplay'
@@ -39,6 +41,8 @@ const customerName = computed(() => pargarCustomerLabel(props.item))
const createdAtLabel = computed(() =>
props.item.created_at ? toJalali(props.item.created_at) : '-'
)
const metalLabel = computed(() => pargarMetalAmountLabel(props.item))
const rialLabel = computed(() => pargarRialAmountLabel(props.item))
const statusText = computed(() =>
pargarStatusLabel(props.item.sync_status, props.item.pargar_ref, props.item.desc)
)
@@ -27,7 +27,8 @@
<MobileDetailRow label="مشتری" :value="row.customer?.name || '-'" />
<MobileDetailRow label="موبایل" :value="row.customer?.mobile || '-'" />
<MobileDetailRow label="نوع" :value="row.type || '-'" />
<MobileDetailRow label="مقدار" :value="row.amount ?? '-'" />
<MobileDetailRow label="مقدار" :value="metalAmountLabel(row)" />
<MobileDetailRow label="مبلغ ریالی" :value="rialAmountLabel(row)" />
<MobileDetailRow label="شرح" full-width :value="row.desc || '-'" />
<MobileDetailRow label="وضعیت" :value="tahesabStatusLabel(row.sync_status, row.tahesab_id)" />
<MobileDetailRow label="کد ته‌حساب" :value="row.tahesab_id || '-'" />
@@ -52,6 +53,10 @@ import MobileDetailSheet from '@/components/mobile/MobileDetailSheet.vue'
import MobileIconButton from '@/components/mobile/MobileIconButton.vue'
import MobileInfoGrid from '@/components/mobile/MobileInfoGrid.vue'
import MobileSheetHeader from '@/components/mobile/MobileSheetHeader.vue'
import {
metalAmountLabel,
rialAmountLabel,
} from '@/pages/menuPages/accounting/utils/accountingDocAmounts'
import { canRetryTahesab, tahesabStatusLabel } from '@/pages/menuPages/accounting/utils/tahesabStatus'
import { isMobile } from '@core/utils/is'
import { toJalali } from '@core/utils/useDataTime'
@@ -9,7 +9,8 @@
</div>
<div class="flex flex-wrap items-center gap-x-3 gap-y-0.5 text-xs text-gray-600">
<span>نوع: <span class="font-600 text-gray-900">{{ item.type || '-' }}</span></span>
<span>مقدار: <span class="font-600 text-gray-900">{{ item.amount ?? '-' }}</span></span>
<span>مقدار: <span class="font-600 text-gray-900">{{ metalLabel }}</span></span>
<span>ریال: <span class="font-600 text-gray-900">{{ rialLabel }}</span></span>
</div>
<div class="text-xs text-gray-400">{{ createdAtLabel }}</div>
</div>
@@ -20,6 +21,10 @@
import type { TahesabRecord } from '@/api/tahesab'
import MobileCard from '@/components/mobile/MobileCard.vue'
import { toJalali } from '@core/utils/useDataTime'
import {
metalAmountLabel,
rialAmountLabel,
} from '@/pages/menuPages/accounting/utils/accountingDocAmounts'
import { tahesabStatusLabel } from '@/pages/menuPages/accounting/utils/tahesabStatus'
const props = defineProps<{
@@ -34,6 +39,8 @@ const customerName = computed(() => props.item.customer?.name || '-')
const createdAtLabel = computed(() =>
props.item.created_at ? toJalali(props.item.created_at) : '-'
)
const metalLabel = computed(() => metalAmountLabel(props.item))
const rialLabel = computed(() => rialAmountLabel(props.item))
const statusText = computed(() =>
tahesabStatusLabel(props.item.sync_status, props.item.tahesab_id)
)
@@ -27,7 +27,8 @@
<MobileDetailRow label="مشتری" :value="row.customer?.name || '-'" />
<MobileDetailRow label="موبایل" :value="row.customer?.mobile || '-'" />
<MobileDetailRow label="نوع" :value="row.type || '-'" />
<MobileDetailRow label="مقدار" :value="row.amount ?? '-'" />
<MobileDetailRow label="مقدار" :value="metalAmountLabel(row)" />
<MobileDetailRow label="مبلغ ریالی" :value="rialAmountLabel(row)" />
<MobileDetailRow label="شرح" full-width :value="row.desc || '-'" />
<MobileDetailRow label="وضعیت" :value="zarinStatusLabel(row.sync_status, row.zarin_id)" />
<MobileDetailRow label="کد زرین" :value="row.zarin_id || '-'" />
@@ -52,6 +53,10 @@ import MobileDetailSheet from '@/components/mobile/MobileDetailSheet.vue'
import MobileIconButton from '@/components/mobile/MobileIconButton.vue'
import MobileInfoGrid from '@/components/mobile/MobileInfoGrid.vue'
import MobileSheetHeader from '@/components/mobile/MobileSheetHeader.vue'
import {
metalAmountLabel,
rialAmountLabel,
} from '@/pages/menuPages/accounting/utils/accountingDocAmounts'
import { canRetryZarin, zarinStatusLabel } from '@/pages/menuPages/accounting/utils/zarinStatus'
import { isMobile } from '@core/utils/is'
import { toJalali } from '@core/utils/useDataTime'
@@ -9,7 +9,8 @@
</div>
<div class="flex flex-wrap items-center gap-x-3 gap-y-0.5 text-xs text-gray-600">
<span>نوع: <span class="font-600 text-gray-900">{{ item.type || '-' }}</span></span>
<span>مقدار: <span class="font-600 text-gray-900">{{ item.amount ?? '-' }}</span></span>
<span>مقدار: <span class="font-600 text-gray-900">{{ metalLabel }}</span></span>
<span>ریال: <span class="font-600 text-gray-900">{{ rialLabel }}</span></span>
</div>
<div class="text-xs text-gray-400">{{ createdAtLabel }}</div>
</div>
@@ -20,6 +21,10 @@
import type { ZarinRecord } from '@/api/zarin'
import MobileCard from '@/components/mobile/MobileCard.vue'
import { toJalali } from '@core/utils/useDataTime'
import {
metalAmountLabel,
rialAmountLabel,
} from '@/pages/menuPages/accounting/utils/accountingDocAmounts'
import { zarinStatusLabel } from '@/pages/menuPages/accounting/utils/zarinStatus'
const props = defineProps<{
@@ -34,6 +39,8 @@ const customerName = computed(() => props.item.customer?.name || '-')
const createdAtLabel = computed(() =>
props.item.created_at ? toJalali(props.item.created_at) : '-'
)
const metalLabel = computed(() => metalAmountLabel(props.item))
const rialLabel = computed(() => rialAmountLabel(props.item))
const statusText = computed(() =>
zarinStatusLabel(props.item.sync_status, props.item.zarin_id)
)
@@ -130,9 +130,10 @@ import { canRetryPargar, pargarStatusLabel } from '@/pages/menuPages/accounting/
import {
formatTransactionAmount,
parsePargarPayload,
pargarAmountLabel,
pargarCustomerLabel,
pargarDescLabel,
pargarMetalAmountLabel,
pargarRialAmountLabel,
pargarTypeLabel
} from '@/pages/menuPages/accounting/utils/pargarDisplay'
import { toJalali } from '@core/utils/useDataTime'
@@ -155,7 +156,23 @@ const columns = [
},
{ title: 'مشتری', dataIndex: 'customer.name', key: 'customer.name', type: 'Text', customRender: (r: any) => pargarCustomerLabel(r.record) },
{ title: 'نوع', dataIndex: 'type', key: 'type', type: 'Text', customRender: (r: any) => pargarTypeLabel(r.record.type) },
{ title: 'مقدار', dataIndex: 'amount', key: 'amount', type: 'Number', customRender: (r: any) => pargarAmountLabel(r.record) },
{
title: 'مقدار',
dataIndex: 'amount',
key: 'amount',
type: 'Number',
filterable: false,
customRender: (r: any) => pargarMetalAmountLabel(r.record),
},
{
title: 'مبلغ ریالی',
dataIndex: 'rial_amount',
key: 'rial_amount',
type: 'Text',
filterable: false,
sortable: false,
customRender: (r: any) => pargarRialAmountLabel(r.record),
},
{ title: 'شرح', dataIndex: 'desc', key: 'desc', type: 'Text', customRender: (r: any) => pargarDescLabel(r.record) },
{
title: 'وضعیت',
@@ -197,7 +214,8 @@ const infoItems = computed(() => {
{ label: 'موبایل', value: row.customer?.mobile || '-' },
{ label: 'کد حساب پرگار', value: payload?.accountId || row.pargar_ref || '-' },
{ label: 'نوع', value: pargarTypeLabel(row.type) },
{ label: 'مقدار', value: pargarAmountLabel(row) },
{ label: 'مقدار', value: pargarMetalAmountLabel(row) },
{ label: 'مبلغ ریالی', value: pargarRialAmountLabel(row) },
{ label: 'شرح', value: pargarDescLabel(row) },
{ label: 'تعداد سطر سند', value: payload?.transactions.length ? String(payload.transactions.length) : '-' },
{ label: 'زمان ثبت', value: row.created_at ? toJalali(row.created_at) : '-' },
@@ -92,6 +92,10 @@ import BasicModal from '@/components/BasicModal.vue'
import TahesabRetryModal from '@/components/TahesabRetryModal.vue'
import TahesabMobileCardList from '@/pages/menuPages/accounting/components/TahesabMobileCardList.vue'
import { tahesabStatusLabel } from '@/pages/menuPages/accounting/utils/tahesabStatus'
import {
metalAmountLabel,
rialAmountLabel,
} from '@/pages/menuPages/accounting/utils/accountingDocAmounts'
import { toJalali } from '@core/utils/useDataTime'
const [submit, reload] = useBaseTable()
@@ -112,7 +116,23 @@ const columns = [
},
{ title: 'مشتری', dataIndex: 'customer.name', key: 'customer.name', type: 'Text' },
{ title: 'نوع', dataIndex: 'type', key: 'type', type: 'Text' },
{ title: 'مقدار', dataIndex: 'amount', key: 'amount', type: 'Number' },
{
title: 'مقدار',
dataIndex: 'amount',
key: 'amount',
type: 'Number',
filterable: false,
customRender: (r: any) => metalAmountLabel(r.record),
},
{
title: 'مبلغ ریالی',
dataIndex: 'rial_amount',
key: 'rial_amount',
type: 'Text',
filterable: false,
sortable: false,
customRender: (r: any) => rialAmountLabel(r.record),
},
{ title: 'شرح', dataIndex: 'desc', key: 'desc', type: 'Text' },
{
title: 'وضعیت',
@@ -152,7 +172,8 @@ const infoItems = computed(() => {
{ label: 'مشتری', value: row.customer?.name },
{ label: 'موبایل', value: row.customer?.mobile },
{ label: 'نوع', value: row.type },
{ label: 'مقدار', value: row.amount },
{ label: 'مقدار', value: metalAmountLabel(row) },
{ label: 'مبلغ ریالی', value: rialAmountLabel(row) },
{ label: 'شرح', value: row.desc },
{ label: 'زمان ثبت', value: row.created_at ? toJalali(row.created_at) : '-' },
{ label: 'وضعیت', value: tahesabStatusLabel(row.sync_status, row.tahesab_id) },
@@ -92,6 +92,10 @@ import BasicModal from '@/components/BasicModal.vue'
import ZarinRetryModal from '@/components/ZarinRetryModal.vue'
import ZarinMobileCardList from '@/pages/menuPages/accounting/components/ZarinMobileCardList.vue'
import { zarinStatusLabel } from '@/pages/menuPages/accounting/utils/zarinStatus'
import {
metalAmountLabel,
rialAmountLabel,
} from '@/pages/menuPages/accounting/utils/accountingDocAmounts'
import { toJalali } from '@core/utils/useDataTime'
const [submit, reload] = useBaseTable()
@@ -112,7 +116,23 @@ const columns = [
},
{ title: 'مشتری', dataIndex: 'customer.name', key: 'customer.name', type: 'Text' },
{ title: 'نوع', dataIndex: 'type', key: 'type', type: 'Text' },
{ title: 'مقدار', dataIndex: 'amount', key: 'amount', type: 'Number' },
{
title: 'مقدار',
dataIndex: 'amount',
key: 'amount',
type: 'Number',
filterable: false,
customRender: (r: any) => metalAmountLabel(r.record),
},
{
title: 'مبلغ ریالی',
dataIndex: 'rial_amount',
key: 'rial_amount',
type: 'Text',
filterable: false,
sortable: false,
customRender: (r: any) => rialAmountLabel(r.record),
},
{ title: 'شرح', dataIndex: 'desc', key: 'desc', type: 'Text' },
{
title: 'وضعیت',
@@ -152,7 +172,8 @@ const infoItems = computed(() => {
{ label: 'مشتری', value: row.customer?.name },
{ label: 'موبایل', value: row.customer?.mobile },
{ label: 'نوع', value: row.type },
{ label: 'مقدار', value: row.amount },
{ label: 'مقدار', value: metalAmountLabel(row) },
{ label: 'مبلغ ریالی', value: rialAmountLabel(row) },
{ label: 'شرح', value: row.desc },
{ label: 'زمان ثبت', value: row.created_at ? toJalali(row.created_at) : '-' },
{ label: 'وضعیت', value: zarinStatusLabel(row.sync_status, row.zarin_id) },