fix pargar mande

This commit is contained in:
2026-07-25 16:47:12 +03:30
parent 5b11dccbb8
commit 017e375c4d
21 changed files with 148 additions and 43 deletions
+84
View File
@@ -0,0 +1,84 @@
{
"globals": {
"Component": true,
"ComponentPublicInstance": true,
"ComputedRef": true,
"EffectScope": true,
"ExtractDefaultPropTypes": true,
"ExtractPropTypes": true,
"ExtractPublicPropTypes": true,
"InjectionKey": true,
"PropType": true,
"Ref": true,
"VNode": true,
"WritableComputedRef": true,
"acceptHMRUpdate": true,
"computed": true,
"createApp": true,
"createPinia": true,
"customRef": true,
"defineAsyncComponent": true,
"defineComponent": true,
"defineStore": true,
"effectScope": true,
"getActivePinia": true,
"getCurrentInstance": true,
"getCurrentScope": true,
"h": true,
"inject": true,
"isProxy": true,
"isReactive": true,
"isReadonly": true,
"isRef": true,
"mapActions": true,
"mapGetters": true,
"mapState": true,
"mapStores": true,
"mapWritableState": true,
"markRaw": true,
"nextTick": true,
"onActivated": true,
"onBeforeMount": true,
"onBeforeRouteLeave": true,
"onBeforeRouteUpdate": true,
"onBeforeUnmount": true,
"onBeforeUpdate": true,
"onDeactivated": true,
"onErrorCaptured": true,
"onMounted": true,
"onRenderTracked": true,
"onRenderTriggered": true,
"onScopeDispose": true,
"onServerPrefetch": true,
"onUnmounted": true,
"onUpdated": true,
"provide": true,
"reactive": true,
"readonly": true,
"ref": true,
"resolveComponent": true,
"setActivePinia": true,
"setMapStoreSuffix": true,
"shallowReactive": true,
"shallowReadonly": true,
"shallowRef": true,
"storeToRefs": true,
"toRaw": true,
"toRef": true,
"toRefs": true,
"toValue": true,
"triggerRef": true,
"unref": true,
"useAttrs": true,
"useCssModule": true,
"useCssVars": true,
"useLink": true,
"useRoute": true,
"useRouter": true,
"useSlots": true,
"watch": true,
"watchEffect": true,
"watchPostEffect": true,
"watchSyncEffect": true
}
}
+2 -1
View File
@@ -16,7 +16,6 @@ declare module '@vue/runtime-core' {
AButton: typeof import('ant-design-vue/es')['Button'] AButton: typeof import('ant-design-vue/es')['Button']
ACard: typeof import('ant-design-vue/es')['Card'] ACard: typeof import('ant-design-vue/es')['Card']
ACheckbox: typeof import('ant-design-vue/es')['Checkbox'] ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
ACheckboxGroup: typeof import('ant-design-vue/es')['CheckboxGroup']
ACol: typeof import('ant-design-vue/es')['Col'] ACol: typeof import('ant-design-vue/es')['Col']
ACollapse: typeof import('ant-design-vue/es')['Collapse'] ACollapse: typeof import('ant-design-vue/es')['Collapse']
ACollapsePanel: typeof import('ant-design-vue/es')['CollapsePanel'] ACollapsePanel: typeof import('ant-design-vue/es')['CollapsePanel']
@@ -56,9 +55,11 @@ declare module '@vue/runtime-core' {
ATable: typeof import('ant-design-vue/es')['Table'] ATable: typeof import('ant-design-vue/es')['Table']
ATabPane: typeof import('ant-design-vue/es')['TabPane'] ATabPane: typeof import('ant-design-vue/es')['TabPane']
ATabs: typeof import('ant-design-vue/es')['Tabs'] ATabs: typeof import('ant-design-vue/es')['Tabs']
ATag: typeof import('ant-design-vue/es')['Tag']
ATextarea: typeof import('ant-design-vue/es')['Textarea'] ATextarea: typeof import('ant-design-vue/es')['Textarea']
ATimePicker: typeof import('ant-design-vue/es')['TimePicker'] ATimePicker: typeof import('ant-design-vue/es')['TimePicker']
ATooltip: typeof import('ant-design-vue/es')['Tooltip'] ATooltip: typeof import('ant-design-vue/es')['Tooltip']
AUpload: typeof import('ant-design-vue/es')['Upload']
BaseButton: typeof import('./src/core/components/BaseButton/index.ts')['default'] BaseButton: typeof import('./src/core/components/BaseButton/index.ts')['default']
BaseCard: typeof import('./src/core/components/BaseCard/index.ts')['default'] BaseCard: typeof import('./src/core/components/BaseCard/index.ts')['default']
BaseCollapse: typeof import('./src/components/BaseCollapse.vue')['default'] BaseCollapse: typeof import('./src/components/BaseCollapse.vue')['default']
+2 -2
View File
@@ -81,8 +81,8 @@ export const dashboardDateMetrics = {
'جمع = fullPriceSood + fullPriceKarmozd' 'جمع = fullPriceSood + fullPriceKarmozd'
), ),
gifts: help( gifts: help(
'طلایی که ادمین به مشتریان هدیه داده در همین بازه.', 'طلای پاداشی که در این بازه به مشتریان داده شده: پاداش معرفی، پاداش ثبت‌نام و سود زیرمجموعه. شارژ دستی طلا و معاملات اینجا شمرده نمی‌شوند.',
'گرم هدیه = جمع طلای ثبت‌شده در تراکنش‌های ادمین' 'گرم هدیه = جمع طلای تراکنش‌های پاداش معرفی/ثبت‌نام و سود زیرمجموعه'
), ),
} as const satisfies Record<string, DashboardHelp> } as const satisfies Record<string, DashboardHelp>
@@ -1,5 +1,5 @@
import type { BaseTableColumn } from '@core/type/baseTable' import type { BaseTableColumn } from '@core/type/baseTable'
import { toJalaliNoTime, toTime } from '@core/utils/useDataTime' import { toJalali } from '@core/utils/useDataTime'
import CustomTag from '@/components/CustomTag.vue' import CustomTag from '@/components/CustomTag.vue'
/*import BudgetSelect from '@/components/BudgetSelect.vue' /*import BudgetSelect from '@/components/BudgetSelect.vue'
import { useStaticApiListsStore } from '@/store/staticApisStore' import { useStaticApiListsStore } from '@/store/staticApisStore'
@@ -138,7 +138,7 @@ export const cols: BaseTableColumn[] = [
key: 'created_at', key: 'created_at',
type: 'DateTime', type: 'DateTime',
customRender: (record: any) => { customRender: (record: any) => {
return toJalaliNoTime(record.record.created_at) return toJalali(record.record.created_at)
} }
},*/ },*/
{ {
@@ -9,7 +9,7 @@
<p class="pargar-wallet-sync__hint"> <p class="pargar-wallet-sync__hint">
{{ {{
canSync canSync
? 'موجودی را با ماندهٔ پرگار یکی می‌کند — تاریخچهٔ اسناد روی کیف replay نمی‌شود' ? 'ریال و طلای کیف اصلی را با ماندهٔ پرگار یکی می‌کند — فقط وقتی همهٔ اسناد در پرگار ثبت شده باشند'
: 'ابتدا کد حسابداری پرگار را برای این مشتری ثبت کنید' : 'ابتدا کد حسابداری پرگار را برای این مشتری ثبت کنید'
}} }}
</p> </p>
@@ -22,10 +22,28 @@
class="pargar-wallet-sync__btn" class="pargar-wallet-sync__btn"
:loading="loading" :loading="loading"
:disabled="!canSync || loading" :disabled="!canSync || loading"
@click="$emit('sync')" @click="$emit('sync', false)"
> >
همگام‌سازی مانده از پرگار همگام‌سازی مانده از پرگار
</a-button> </a-button>
<a-popconfirm
title="ماندهٔ پرگار بدون بررسی اعتبار روی کیف مشتری نوشته شود؟"
ok-text="بله، اعمال کن"
cancel-text="انصراف"
:disabled="!canSync || loading"
@confirm="$emit('sync', true)"
>
<a-button
type="link"
size="small"
block
danger
class="pargar-wallet-sync__force"
:disabled="!canSync || loading"
>
اعمال اجباری مانده
</a-button>
</a-popconfirm>
</div> </div>
</template> </template>
@@ -38,7 +56,7 @@ defineProps<{
}>() }>()
defineEmits<{ defineEmits<{
(e: 'sync'): void (e: 'sync', force: boolean): void
}>() }>()
</script> </script>
@@ -69,4 +87,8 @@ defineEmits<{
.pargar-wallet-sync__btn { .pargar-wallet-sync__btn {
@apply font-600; @apply font-600;
} }
.pargar-wallet-sync__force {
@apply mt-1 text-xs;
}
</style> </style>
@@ -1,5 +1,5 @@
import type { BaseTableColumn } from '@core/type/baseTable' import type { BaseTableColumn } from '@core/type/baseTable'
import { toJalaliNoTime, toTime } from '@core/utils/useDataTime' import { toJalali } from '@core/utils/useDataTime'
import CustomTag from '@/components/CustomTag.vue' import CustomTag from '@/components/CustomTag.vue'
import { usePrice } from '@core/utils/usePrice' import { usePrice } from '@core/utils/usePrice'
/*import BudgetSelect from '@/components/BudgetSelect.vue' /*import BudgetSelect from '@/components/BudgetSelect.vue'
@@ -157,7 +157,7 @@ export const cols: BaseTableColumn[] = [
key: 'created_at', key: 'created_at',
type: 'DateTime', type: 'DateTime',
customRender: (record: any) => { customRender: (record: any) => {
return toJalaliNoTime(record.record.created_at) return toJalali(record.record.created_at)
} }
},*/ },*/
] ]
+2 -2
View File
@@ -659,11 +659,11 @@ async function refreshWalletPanels() {
]) ])
} }
async function syncPargarWallet() { async function syncPargarWallet(force = false) {
if (!userInfo.value?.id || !pargarWalletCanSync.value || pargarSyncLoading.value) return if (!userInfo.value?.id || !pargarWalletCanSync.value || pargarSyncLoading.value) return
pargarSyncLoading.value = true pargarSyncLoading.value = true
try { try {
const res = await syncCustomerWalletFromPargar(userInfo.value.id) const res = await syncCustomerWalletFromPargar(userInfo.value.id, force)
const applied = const applied =
res.ok || res.ok ||
(res.result?.documents?.acknowledged ?? 0) > 0 || (res.result?.documents?.acknowledged ?? 0) > 0 ||
@@ -1,5 +1,5 @@
import type { BaseTableColumn } from '@core/type/baseTable' import type { BaseTableColumn } from '@core/type/baseTable'
import { toJalali, toJalaliNoTime, toTime } from '@core/utils/useDataTime' import { toJalali } from '@core/utils/useDataTime'
import CustomTag from '@/components/CustomTag.vue' import CustomTag from '@/components/CustomTag.vue'
import { usePrice } from '@core/utils/usePrice' import { usePrice } from '@core/utils/usePrice'
import { metalLabel } from '@/utils/adminMetalLabels' import { metalLabel } from '@/utils/adminMetalLabels'
@@ -227,7 +227,7 @@ export function getGiftCardColumns(): BaseTableColumn[] {
key: 'created_at', key: 'created_at',
type: 'DateTime', type: 'DateTime',
customRender: (record: any) => { customRender: (record: any) => {
return toJalaliNoTime(record.record.created_at) return toJalali(record.record.created_at)
} }
},*/ },*/
{ {
@@ -25,7 +25,7 @@
<span v-if="order.id" class="order-detail__dot">·</span> <span v-if="order.id" class="order-detail__dot">·</span>
<span v-if="order.id">کد {{ order.id }}</span> <span v-if="order.id">کد {{ order.id }}</span>
<span class="order-detail__dot">·</span> <span class="order-detail__dot">·</span>
<span class="order-detail__muted">{{ dateLabel }} {{ timeLabel }}</span> <span class="order-detail__muted">{{ dateLabel }}</span>
</p> </p>
<p class="order-detail__product-line m-0"> <p class="order-detail__product-line m-0">
<span class="order-detail__field-label">محصول</span> <span class="order-detail__field-label">محصول</span>
@@ -193,7 +193,7 @@
<script setup lang="ts"> <script setup lang="ts">
import type { Order } from '@/model/order' import type { Order } from '@/model/order'
import { isMobile } from '@core/utils/is' import { isMobile } from '@core/utils/is'
import { toJalaliNoTime, toTime } from '@core/utils/useDataTime' import { toJalali } from '@core/utils/useDataTime'
import { formatAmountWithUnit } from '@/utils/weightUnit' import { formatAmountWithUnit } from '@/utils/weightUnit'
import { import {
formatOrderRial, formatOrderRial,
@@ -241,10 +241,8 @@ const directionClass = computed(() =>
) )
const dateLabel = computed(() => const dateLabel = computed(() =>
order.value?.created_at ? toJalaliNoTime(order.value.created_at) : '—' order.value?.created_at ? toJalali(order.value.created_at) : '—'
) )
const timeLabel = computed(() => (order.value?.created_at ? toTime(order.value.created_at) : ''))
const paymentLabel = computed(() => const paymentLabel = computed(() =>
order.value?.direction === 2 ? 'مبلغ دریافتی مشتری' : 'مبلغ پرداختی مشتری' order.value?.direction === 2 ? 'مبلغ دریافتی مشتری' : 'مبلغ پرداختی مشتری'
) )
@@ -1,5 +1,5 @@
import type { BaseTableColumn } from '@core/type/baseTable' import type { BaseTableColumn } from '@core/type/baseTable'
import {toJalali, toJalaliNoTime, toTime} from '@core/utils/useDataTime' import { toJalali } from '@core/utils/useDataTime'
import CustomTag from '@/components/CustomTag.vue' import CustomTag from '@/components/CustomTag.vue'
/*import BudgetSelect from '@/components/BudgetSelect.vue' /*import BudgetSelect from '@/components/BudgetSelect.vue'
import { useStaticApiListsStore } from '@/store/staticApisStore' import { useStaticApiListsStore } from '@/store/staticApisStore'
@@ -207,7 +207,7 @@ export const cols: BaseTableColumn[] = [
key: 'created_at', key: 'created_at',
type: 'DateTime', type: 'DateTime',
customRender: (record: any) => { customRender: (record: any) => {
return toJalaliNoTime(record.record.created_at) return toJalali(record.record.created_at)
} }
},*/ },*/
{ {
@@ -30,7 +30,7 @@ import MobileInfoGrid from '@/components/mobile/MobileInfoGrid.vue'
import MobileSheetHeader from '@/components/mobile/MobileSheetHeader.vue' import MobileSheetHeader from '@/components/mobile/MobileSheetHeader.vue'
import MobileStatCard from '@/components/mobile/MobileStatCard.vue' import MobileStatCard from '@/components/mobile/MobileStatCard.vue'
import { isMobile } from '@core/utils/is' import { isMobile } from '@core/utils/is'
import { toJalaliNoTime } from '@core/utils/useDataTime' import { toJalali } from '@core/utils/useDataTime'
import { usePrice } from '@core/utils/usePrice' import { usePrice } from '@core/utils/usePrice'
import { metalLabel } from '@/utils/adminMetalLabels' import { metalLabel } from '@/utils/adminMetalLabels'
@@ -51,7 +51,7 @@ const visibleProxy = computed({
const sheetTitle = computed(() => props.item?.user?.name || `قیمت #${props.item?.id ?? '-'}`) const sheetTitle = computed(() => props.item?.user?.name || `قیمت #${props.item?.id ?? '-'}`)
function dateLabel(row: Price) { function dateLabel(row: Price) {
return row.created_at ? toJalaliNoTime(row.created_at) : '-' return row.created_at ? toJalali(row.created_at) : '-'
} }
function dateTimeLabel(row: Price) { function dateTimeLabel(row: Price) {
@@ -17,7 +17,7 @@
<script setup lang="ts"> <script setup lang="ts">
import type { PriceSyncLog } from '@/model/priceSyncLog' import type { PriceSyncLog } from '@/model/priceSyncLog'
import MobileCard from '@/components/mobile/MobileCard.vue' import MobileCard from '@/components/mobile/MobileCard.vue'
import { toJalaliNoTime } from '@core/utils/useDataTime' import { toJalali } from '@core/utils/useDataTime'
import { usePrice } from '@core/utils/usePrice' import { usePrice } from '@core/utils/usePrice'
const SOURCE_LABELS: Record<string, string> = { const SOURCE_LABELS: Record<string, string> = {
@@ -34,7 +34,7 @@ defineEmits<{
}>() }>()
const sourceLabel = computed(() => SOURCE_LABELS[props.item.source] ?? props.item.source) const sourceLabel = computed(() => SOURCE_LABELS[props.item.source] ?? props.item.source)
const dateLabel = computed(() => (props.item.created_at ? toJalaliNoTime(props.item.created_at) : '-')) const dateLabel = computed(() => (props.item.created_at ? toJalali(props.item.created_at) : '-'))
const priceLabel = computed(() => const priceLabel = computed(() =>
props.item.liquid_gold_price > 0 ? usePrice(props.item.liquid_gold_price, true, '') : '—' props.item.liquid_gold_price > 0 ? usePrice(props.item.liquid_gold_price, true, '') : '—'
) )
@@ -1,5 +1,5 @@
import type { BaseTableColumn } from '@core/type/baseTable' import type { BaseTableColumn } from '@core/type/baseTable'
import { toJalaliNoTime, toTime } from '@core/utils/useDataTime' import { toJalali } from '@core/utils/useDataTime'
import CustomTag from '@/components/CustomTag.vue' import CustomTag from '@/components/CustomTag.vue'
import { usePrice } from '@core/utils/usePrice' import { usePrice } from '@core/utils/usePrice'
import { metalLabel } from '@/utils/adminMetalLabels' import { metalLabel } from '@/utils/adminMetalLabels'
@@ -142,7 +142,7 @@ export function getPriceColumns(): BaseTableColumn[] {
key: 'created_at', key: 'created_at',
type: 'DateTime', type: 'DateTime',
customRender: (record: any) => { customRender: (record: any) => {
return toJalaliNoTime(record.record.created_at) return toJalali(record.record.created_at)
} }
}, },
{ {
@@ -1,5 +1,5 @@
import type { BaseTableColumn } from '@core/type/baseTable' import type { BaseTableColumn } from '@core/type/baseTable'
import { toJalaliNoTime, toTime } from '@core/utils/useDataTime' import { toJalali } from '@core/utils/useDataTime'
import { usePrice } from '@core/utils/usePrice' import { usePrice } from '@core/utils/usePrice'
const SOURCE_LABELS: Record<string, string> = { const SOURCE_LABELS: Record<string, string> = {
@@ -46,7 +46,7 @@ export const storePriceColumns: BaseTableColumn[] = [
dataIndex: 'created_at', dataIndex: 'created_at',
key: 'created_at', key: 'created_at',
type: 'DateTime', type: 'DateTime',
customRender: (record: any) => toJalaliNoTime(record.record.created_at) customRender: (record: any) => toJalali(record.record.created_at)
}, },
{ {
title: 'زمان', title: 'زمان',
@@ -64,7 +64,7 @@ import MobileInfoGrid from '@/components/mobile/MobileInfoGrid.vue'
import MobileSheetHeader from '@/components/mobile/MobileSheetHeader.vue' import MobileSheetHeader from '@/components/mobile/MobileSheetHeader.vue'
import MobileStatCard from '@/components/mobile/MobileStatCard.vue' import MobileStatCard from '@/components/mobile/MobileStatCard.vue'
import { isMobile } from '@core/utils/is' import { isMobile } from '@core/utils/is'
import { toJalaliNoTime } from '@core/utils/useDataTime' import { toJalali } from '@core/utils/useDataTime'
import { usePrice } from '@core/utils/usePrice' import { usePrice } from '@core/utils/usePrice'
import { metalLabel, transactionMetalAmountTitle } from '@/utils/adminMetalLabels' import { metalLabel, transactionMetalAmountTitle } from '@/utils/adminMetalLabels'
import { formatMetalDisplayValue, metalCellValue } from '@/utils/metalWeight' import { formatMetalDisplayValue, metalCellValue } from '@/utils/metalWeight'
@@ -102,7 +102,7 @@ function typeTagClass(row: Transaction) {
} }
function dateLabel(row: Transaction) { function dateLabel(row: Transaction) {
return row.created_at ? toJalaliNoTime(row.created_at) : '-' return row.created_at ? toJalali(row.created_at) : '-'
} }
function noteLabel(row: Transaction) { function noteLabel(row: Transaction) {
@@ -25,7 +25,7 @@
<script setup lang="ts"> <script setup lang="ts">
import type { Transaction } from '@/model/transaction' import type { Transaction } from '@/model/transaction'
import MobileCard from '@/components/mobile/MobileCard.vue' import MobileCard from '@/components/mobile/MobileCard.vue'
import { toJalaliNoTime } from '@core/utils/useDataTime' import { toJalali } from '@core/utils/useDataTime'
const props = defineProps<{ const props = defineProps<{
item: Transaction item: Transaction
@@ -45,5 +45,5 @@ const typeTagClass = computed(() =>
) )
const customerName = computed(() => props.item.customer?.name || '-') const customerName = computed(() => props.item.customer?.name || '-')
const dateLabel = computed(() => (props.item.created_at ? toJalaliNoTime(props.item.created_at) : '-')) const dateLabel = computed(() => (props.item.created_at ? toJalali(props.item.created_at) : '-'))
</script> </script>
@@ -1,5 +1,5 @@
import type { BaseTableColumn } from '@core/type/baseTable' import type { BaseTableColumn } from '@core/type/baseTable'
import { toJalaliNoTime } from '@core/utils/useDataTime' import { toJalali } from '@core/utils/useDataTime'
import CustomTag from '@/components/CustomTag.vue' import CustomTag from '@/components/CustomTag.vue'
import { usePrice } from '@core/utils/usePrice' import { usePrice } from '@core/utils/usePrice'
import { metalLabel, transactionMetalAmountTitle } from '@/utils/adminMetalLabels' import { metalLabel, transactionMetalAmountTitle } from '@/utils/adminMetalLabels'
@@ -169,7 +169,7 @@ export function buildTransactionsColumns(metals: TransactionMetalColumn[] = []):
key: 'created_at', key: 'created_at',
type: 'DateTime', type: 'DateTime',
customRender: (record: any) => { customRender: (record: any) => {
return toJalaliNoTime(record.record.created_at) return toJalali(record.record.created_at)
} }
} }
] ]
+2 -2
View File
@@ -86,7 +86,7 @@ import type { FormInstance } from 'ant-design-vue'
import BasicInfoModal from '@/components/BasicInfoModal/index.vue' import BasicInfoModal from '@/components/BasicInfoModal/index.vue'
import { message } from 'ant-design-vue/es' import { message } from 'ant-design-vue/es'
import type { Info } from '@/components/BasicInfoModal/model/Info' import type { Info } from '@/components/BasicInfoModal/model/Info'
import { toJalaliNoTime, toTime } from '@core/utils/useDataTime' import { toJalali, toTime } from '@core/utils/useDataTime'
import { confirmDeleteItem } from '@/utils/confirmModal' import { confirmDeleteItem } from '@/utils/confirmModal'
import { cloneDeep } from 'lodash' import { cloneDeep } from 'lodash'
import type { Item } from '@/model/Item' import type { Item } from '@/model/Item'
@@ -129,7 +129,7 @@ let infoParams = reactive<Info>({})
function info(val: Transaction) { function info(val: Transaction) {
infoParams.name = val.customer.name infoParams.name = val.customer.name
infoParams.type = val.transaction_type === '1' ? 'نقدی' : metalLabel.goldUnit() infoParams.type = val.transaction_type === '1' ? 'نقدی' : metalLabel.goldUnit()
infoParams.date = toJalaliNoTime(val.created_at) infoParams.date = toJalali(val.created_at)
infoParams.time = toTime(val.created_at) infoParams.time = toTime(val.created_at)
infoParams.itemsTitle = 'اطلاعات کاربری' infoParams.itemsTitle = 'اطلاعات کاربری'
infoParams.items = [ infoParams.items = [
@@ -17,7 +17,7 @@
<script setup lang="ts"> <script setup lang="ts">
import type { Withdraw } from '@/model/wallet' import type { Withdraw } from '@/model/wallet'
import MobileCard from '@/components/mobile/MobileCard.vue' import MobileCard from '@/components/mobile/MobileCard.vue'
import { toJalaliNoTime } from '@core/utils/useDataTime' import { toJalali } from '@core/utils/useDataTime'
import { import {
formatWithdrawAmountDisplay, formatWithdrawAmountDisplay,
withdrawAmountValue withdrawAmountValue
@@ -37,7 +37,7 @@ const noteLabel = computed(() => {
}) })
const customerName = computed(() => props.item.customer?.name || '-') const customerName = computed(() => props.item.customer?.name || '-')
const dateLabel = computed(() => (props.item.created_at ? toJalaliNoTime(props.item.created_at) : '-')) const dateLabel = computed(() => (props.item.created_at ? toJalali(props.item.created_at) : '-'))
const amountLabel = computed(() => formatWithdrawAmountDisplay(props.item)) const amountLabel = computed(() => formatWithdrawAmountDisplay(props.item))
const amountClass = computed(() => { const amountClass = computed(() => {
const value = withdrawAmountValue(props.item) const value = withdrawAmountValue(props.item)
@@ -18,7 +18,7 @@
</div>--> </div>-->
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
<span class="text-gray-500 text-xs font-medium">تاریخ سفارش :</span> <span class="text-gray-500 text-xs font-medium">تاریخ سفارش :</span>
<span class="text-gray-700 text-sm font-medium">{{ toJalaliNoTime(withdraw?.created_at) }}</span> <span class="text-gray-700 text-sm font-medium">{{ toJalali(withdraw?.created_at) }}</span>
</div> </div>
<div class="flex items-center justify-between"> <div class="flex items-center justify-between">
<span class="text-gray-500 text-xs font-medium">شماره سفارش :</span> <span class="text-gray-500 text-xs font-medium">شماره سفارش :</span>
@@ -120,7 +120,7 @@ import { getWithdrawById , getWithdrawTable } from '@/api/wallet'
import { onMounted } from 'vue' import { onMounted } from 'vue'
import { usePrice } from '@core/utils/usePrice' import { usePrice } from '@core/utils/usePrice'
import Icon from '@core/components/BaseIcon/src/Icon.vue' import Icon from '@core/components/BaseIcon/src/Icon.vue'
import {toJalaliNoTime} from "../../../../core/utils/useDataTime"; import {toJalali} from "../../../../core/utils/useDataTime";
import {forEach} from "lodash"; import {forEach} from "lodash";
import {getConfigApp} from "@/utils/config"; import {getConfigApp} from "@/utils/config";
+2 -2
View File
@@ -106,7 +106,7 @@ import type { FormInstance } from 'ant-design-vue'
import BasicInfoModal from '@/components/BasicInfoModal/index.vue' import BasicInfoModal from '@/components/BasicInfoModal/index.vue'
import { message } from 'ant-design-vue/es' import { message } from 'ant-design-vue/es'
import type { Info } from '@/components/BasicInfoModal/model/Info' import type { Info } from '@/components/BasicInfoModal/model/Info'
import { toJalaliNoTime, toTime } from '@core/utils/useDataTime' import { toJalali, toJalaliNoTime, toTime } from '@core/utils/useDataTime'
import { confirmDeleteItem } from '@/utils/confirmModal' import { confirmDeleteItem } from '@/utils/confirmModal'
import { cloneDeep } from 'lodash' import { cloneDeep } from 'lodash'
import type { Item } from '@/model/Item' import type { Item } from '@/model/Item'
@@ -164,7 +164,7 @@ let infoParams = reactive<Info>({})
function info(val: Order) { function info(val: Order) {
infoParams.name = val.customer.name infoParams.name = val.customer.name
infoParams.type = val.customer.mobile infoParams.type = val.customer.mobile
infoParams.date = toJalaliNoTime(val.created_at) infoParams.date = toJalali(val.created_at)
infoParams.time = toTime(val.created_at) infoParams.time = toTime(val.created_at)
infoParams.itemsTitle = 'اطلاعات کاربری' infoParams.itemsTitle = 'اطلاعات کاربری'
infoParams.items = [ infoParams.items = [