added pargar accounting

This commit is contained in:
2026-07-05 16:41:45 +03:30
parent 86e6c3c16f
commit 8d8be02d96
18 changed files with 1649 additions and 31 deletions
@@ -66,6 +66,15 @@
<template #title><span>در ته‌حساب ثبت نشده — کلیک برای ثبت</span></template>
<Icon icon="vuesax-linear:profile-add" color="#CA8A04" />
</a-tooltip>
<a-tooltip
v-if="pargarEnabled && !record.pargar_account_id"
placement="bottom"
class="cursor-pointer"
@click="openPargarRegister(record)"
>
<template #title><span>در پرگار ثبت نشده — کلیک برای ثبت</span></template>
<Icon icon="vuesax-linear:profile-add" color="#7C3AED" />
</a-tooltip>
<a-tooltip placement="bottom" class="cursor-pointer" @click="emits('info', record)">
<template #title><span>مشخصات</span></template>
<Icon icon="vuesax-linear:stickynote" color="#10913A" />
@@ -148,6 +157,14 @@
:customer-name="tahesabCustomer?.name"
@success="fetch"
/>
<PargarRetryModal
v-if="pargarEnabled"
v-model="pargarRegisterVisible"
mode="register-customer"
:customer-id="pargarCustomer?.id"
:customer-name="pargarCustomer?.name"
@success="fetch"
/>
</BasicShowContext>
</div>
</template>
@@ -173,7 +190,8 @@ import { MODAL_ABOVE_ACTION_SHEET_Z_INDEX } from '@/constants/overlayZIndex'
import { isMobile } from '@core/utils/is'
import { metalLabel } from '@/utils/adminMetalLabels'
import TahesabRetryModal from '@/components/TahesabRetryModal.vue'
import { tahesabEnabledSetting, initTahesabSettingFromApi } from '@/utils/config'
import PargarRetryModal from '@/components/PargarRetryModal.vue'
import { tahesabEnabledSetting, pargarEnabledSetting, initAccountingSettingsFromApi } from '@/utils/config'
const [submit, reload] = useBaseTable()
const emits = defineEmits(['delete', 'edit', 'add', 'info', 'chargeMoney', 'chargeGold'])
@@ -184,6 +202,9 @@ const confirmInfo = ref<Customer>()
const tahesabRegisterVisible = ref(false)
const tahesabCustomer = ref<Customer>()
const tahesabEnabled = tahesabEnabledSetting
const pargarRegisterVisible = ref(false)
const pargarCustomer = ref<Customer>()
const pargarEnabled = pargarEnabledSetting
const mobileListRef = ref<null | { fetch: () => Promise<void> }>(null)
const tblProps = ref<any>({
@@ -203,7 +224,7 @@ const fetch = async () => {
defineExpose({ fetch })
onMounted(() => {
void initTahesabSettingFromApi()
void initAccountingSettingsFromApi()
})
async function changeCustomerActivationFunction(id: number) {
@@ -229,6 +250,11 @@ function openTahesabRegister(user: Customer) {
tahesabRegisterVisible.value = true
}
function openPargarRegister(user: Customer) {
pargarCustomer.value = user
pargarRegisterVisible.value = true
}
function handleArchive(customer: Customer) {
Modal.confirm({
title: 'آیا مشتری را بایگانی می کنید؟',