2025-03-21 14:20:43 +03:30
|
|
|
|
<template>
|
|
|
|
|
|
<v-toolbar color="toolbar" :title="$t('dialog.bid_info')">
|
|
|
|
|
|
<template v-slot:prepend>
|
|
|
|
|
|
<v-tooltip :text="$t('dialog.back')" location="bottom">
|
|
|
|
|
|
<template v-slot:activator="{ props }">
|
|
|
|
|
|
<v-btn v-bind="props" @click="$router.back()" class="d-none d-sm-flex" variant="text"
|
|
|
|
|
|
icon="mdi-arrow-right" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</v-tooltip>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<v-spacer></v-spacer>
|
|
|
|
|
|
<v-btn :loading="loading" @click="submit()" icon="" color="green">
|
|
|
|
|
|
<v-tooltip activator="parent" :text="$t('dialog.save')" location="bottom" />
|
|
|
|
|
|
<v-icon icon="mdi-content-save"></v-icon>
|
|
|
|
|
|
</v-btn>
|
|
|
|
|
|
<template v-slot:extension>
|
|
|
|
|
|
<v-tabs color="primary" class="bg-light" grow v-model="tabs">
|
|
|
|
|
|
<v-tab value="0">
|
|
|
|
|
|
{{ $t('dialog.basic_info') }}
|
|
|
|
|
|
</v-tab>
|
|
|
|
|
|
<v-tab value="1">
|
|
|
|
|
|
{{ $t('dialog.year_label') }}
|
|
|
|
|
|
</v-tab>
|
|
|
|
|
|
<v-tab value="2">
|
|
|
|
|
|
{{ $t('dialog.global_settings') }}
|
|
|
|
|
|
</v-tab>
|
2025-08-13 18:34:04 +03:30
|
|
|
|
<v-tab value="3" v-if="showBackupTab">
|
|
|
|
|
|
نسخه پشتیبان
|
|
|
|
|
|
</v-tab>
|
2025-03-21 14:20:43 +03:30
|
|
|
|
</v-tabs>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</v-toolbar>
|
|
|
|
|
|
<v-row class="pa-1">
|
|
|
|
|
|
<v-col>
|
|
|
|
|
|
<v-tabs-window v-model="tabs">
|
|
|
|
|
|
<v-tabs-window-item value="0">
|
|
|
|
|
|
<v-card>
|
|
|
|
|
|
<v-card-text>
|
|
|
|
|
|
<h3 class="text-primary">اطلاعات کسب و کار</h3>
|
2025-04-03 14:16:18 +03:30
|
|
|
|
<v-row>
|
|
|
|
|
|
<v-col cols="12" md="6">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.name"
|
|
|
|
|
|
label="نام کسب و کار"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
required
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" md="6">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.legal_name"
|
|
|
|
|
|
label="نام قانونی کسب و کار"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
required
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" md="6">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.field"
|
|
|
|
|
|
label="زمینه فعالیت"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" md="6">
|
|
|
|
|
|
<v-select
|
|
|
|
|
|
v-model="content.type"
|
|
|
|
|
|
:items="['شرکت', 'مغازه', 'فروشگاه', 'اتحادیه', 'باشگاه', 'موسسه', 'شخصی']"
|
|
|
|
|
|
label="نوع فعالیت"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-select>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
</v-row>
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="text-primary mt-4">اطلاعات اقتصادی</h3>
|
|
|
|
|
|
<v-row>
|
|
|
|
|
|
<v-col cols="12" md="6">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.shenasemeli"
|
|
|
|
|
|
label="شناسه ملی"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" md="6">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.codeeqtesadi"
|
|
|
|
|
|
label="کد اقتصادی"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" md="6">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.shomaresabt"
|
|
|
|
|
|
label="شماره ثبت"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
</v-row>
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="text-primary mt-4">اطلاعات تماس</h3>
|
|
|
|
|
|
<v-row>
|
|
|
|
|
|
<v-col cols="12" md="4">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.country"
|
|
|
|
|
|
label="کشور"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" md="4">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.ostan"
|
|
|
|
|
|
label="استان"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" md="4">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.shahrestan"
|
|
|
|
|
|
label="شهر"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" md="4">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.postalcode"
|
|
|
|
|
|
label="کد پستی"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" md="4">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.tel"
|
|
|
|
|
|
label="تلفن"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" md="4">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.mobile"
|
|
|
|
|
|
label="موبایل"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.address"
|
|
|
|
|
|
label="آدرس"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" md="6">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.website"
|
|
|
|
|
|
label="وبسایت"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" md="6">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.email"
|
|
|
|
|
|
label="پست الکترونیکی"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
</v-row>
|
|
|
|
|
|
|
|
|
|
|
|
<h3 class="text-primary mt-4">اطلاعات مالی</h3>
|
|
|
|
|
|
<v-row>
|
|
|
|
|
|
<v-col cols="12" md="6">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.maliyatafzode"
|
|
|
|
|
|
label="مالیات بر ارزش افزوده"
|
|
|
|
|
|
type="number"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
required
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
</v-row>
|
2025-03-21 14:20:43 +03:30
|
|
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
|
|
|
|
|
</v-tabs-window-item>
|
|
|
|
|
|
<v-tabs-window-item value="1">
|
|
|
|
|
|
<v-card>
|
|
|
|
|
|
<v-card-text>
|
|
|
|
|
|
<h3 class="text-primary">سال مالی</h3>
|
2025-04-03 14:16:18 +03:30
|
|
|
|
<v-row>
|
|
|
|
|
|
<v-col cols="12" md="6">
|
|
|
|
|
|
<Hdatepicker
|
|
|
|
|
|
v-model="content.year.startShamsi"
|
|
|
|
|
|
label="شروع سال مالی"
|
|
|
|
|
|
:rules="[v => !!v || 'این فیلد الزامی است']"
|
|
|
|
|
|
:ignore-year-range="true"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12" md="6">
|
|
|
|
|
|
<Hdatepicker
|
|
|
|
|
|
v-model="content.year.endShamsi"
|
|
|
|
|
|
label="اتمام سال مالی"
|
|
|
|
|
|
:rules="[v => !!v || 'این فیلد الزامی است']"
|
|
|
|
|
|
:ignore-year-range="true"
|
|
|
|
|
|
:min="content.year.startShamsi"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12">
|
|
|
|
|
|
<v-text-field
|
|
|
|
|
|
v-model="content.year.label"
|
|
|
|
|
|
label="عنوان سال مالی"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
required
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
></v-text-field>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
</v-row>
|
2025-03-21 14:20:43 +03:30
|
|
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
|
|
|
|
|
</v-tabs-window-item>
|
|
|
|
|
|
<v-tabs-window-item value="2">
|
|
|
|
|
|
<v-card>
|
|
|
|
|
|
<v-card-text>
|
2025-08-13 19:44:16 +03:30
|
|
|
|
<h3 class="text-primary mb-6">تنظیمات سراسری کسب و کار</h3>
|
|
|
|
|
|
|
2025-04-03 14:16:18 +03:30
|
|
|
|
<v-row>
|
|
|
|
|
|
<v-col cols="12" md="8">
|
2025-08-13 19:44:16 +03:30
|
|
|
|
<!-- بخش پیوندهای یکتا -->
|
|
|
|
|
|
<v-card variant="outlined" class="mb-6">
|
|
|
|
|
|
<v-card-title class="text-h6 text-primary">
|
|
|
|
|
|
<v-icon icon="mdi-link-variant" class="mr-2"></v-icon>
|
|
|
|
|
|
نمایش پیوند یکتا
|
|
|
|
|
|
</v-card-title>
|
|
|
|
|
|
<v-card-text>
|
|
|
|
|
|
<v-switch
|
|
|
|
|
|
v-model="content.shortlinks"
|
|
|
|
|
|
label="فعالسازی پیوندهای یکتا"
|
|
|
|
|
|
color="primary"
|
|
|
|
|
|
hide-details
|
|
|
|
|
|
class="mb-2"
|
|
|
|
|
|
></v-switch>
|
|
|
|
|
|
<div class="text-body-2 text-medium-emphasis">
|
|
|
|
|
|
این قابلیت برای تولید پیوندهای یکتا برای ارسال به مشتری جهت مشاهده فاکتورها است.
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
2025-04-03 14:16:18 +03:30
|
|
|
|
|
2025-08-13 19:44:16 +03:30
|
|
|
|
<!-- بخش کیف پول -->
|
|
|
|
|
|
<v-card variant="outlined" class="mb-6">
|
|
|
|
|
|
<v-card-title class="text-h6 text-primary">
|
|
|
|
|
|
<v-icon icon="mdi-wallet" class="mr-2"></v-icon>
|
|
|
|
|
|
دریافت مبلغ فاکتور از طریق کیف پول
|
|
|
|
|
|
</v-card-title>
|
|
|
|
|
|
<v-card-text>
|
|
|
|
|
|
<v-switch
|
|
|
|
|
|
v-model="content.walletEnabled"
|
|
|
|
|
|
label="فعالسازی دریافت آنلاین از طریق کیف پول"
|
|
|
|
|
|
color="primary"
|
|
|
|
|
|
@change="checkBanksExist"
|
|
|
|
|
|
hide-details
|
|
|
|
|
|
class="mb-2"
|
|
|
|
|
|
></v-switch>
|
|
|
|
|
|
<div class="text-body-2 text-medium-emphasis mb-4">
|
|
|
|
|
|
با فعال سازی این قابلیت قادر خواهید بود مبالغ فاکتورهای ثبت شده را به صورت آنلاین از مشتریان خود دریافت کنید.
|
2025-03-21 14:20:43 +03:30
|
|
|
|
</div>
|
2025-08-13 19:44:16 +03:30
|
|
|
|
|
|
|
|
|
|
<v-expand-transition>
|
|
|
|
|
|
<div v-if="content.walletEnabled">
|
|
|
|
|
|
<v-divider class="mb-4"></v-divider>
|
|
|
|
|
|
<v-row>
|
|
|
|
|
|
<v-col cols="12" md="8">
|
|
|
|
|
|
<v-select
|
|
|
|
|
|
v-model="content.walletMatchBank"
|
|
|
|
|
|
:items="listBanks"
|
|
|
|
|
|
item-title="name"
|
|
|
|
|
|
item-value="id"
|
|
|
|
|
|
label="حساب بانکی متصل به کیف پول"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
prepend-icon="mdi-bank"
|
|
|
|
|
|
></v-select>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
<v-col cols="12">
|
|
|
|
|
|
<v-alert
|
|
|
|
|
|
type="info"
|
|
|
|
|
|
variant="tonal"
|
|
|
|
|
|
class="mt-2"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template v-slot:prepend>
|
|
|
|
|
|
<v-icon icon="mdi-information"></v-icon>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
برای تسویه اتوماتیک به حساب انتخاب شده حتما باید تمام موارد از جمله شماره شبا و شماره کارت و ... به درستی تکمیل شده باشد در غیر این صورت تراکنش با خطا مواجه خواهد شد.
|
|
|
|
|
|
</v-alert>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
</v-row>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</v-expand-transition>
|
|
|
|
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
2025-03-21 14:20:43 +03:30
|
|
|
|
|
2025-08-13 19:44:16 +03:30
|
|
|
|
<!-- بخش کالا و خدمات -->
|
|
|
|
|
|
<v-card variant="outlined">
|
|
|
|
|
|
<v-card-title class="text-h6 text-primary">
|
|
|
|
|
|
<v-icon icon="mdi-package-variant" class="mr-2"></v-icon>
|
|
|
|
|
|
کالا و خدمات
|
|
|
|
|
|
</v-card-title>
|
|
|
|
|
|
<v-card-text>
|
|
|
|
|
|
<v-row>
|
|
|
|
|
|
<v-col cols="12">
|
|
|
|
|
|
<v-switch
|
|
|
|
|
|
v-model="content.updateBuyPrice"
|
|
|
|
|
|
label="به روز رسانی قیمت خرید هنگام صدور فاکتور"
|
|
|
|
|
|
color="primary"
|
|
|
|
|
|
hide-details
|
|
|
|
|
|
class="mb-2"
|
|
|
|
|
|
></v-switch>
|
|
|
|
|
|
<div class="text-body-2 text-medium-emphasis mb-4">
|
|
|
|
|
|
با صدور فاکتور خرید یا برگشت از خرید قیمت خرید کالا و خدمات به روزرسانی خواهد شد.
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
|
|
|
|
|
|
<v-col cols="12">
|
|
|
|
|
|
<v-switch
|
|
|
|
|
|
v-model="content.updateSellPrice"
|
|
|
|
|
|
label="به روز رسانی قیمت فروش هنگام صدور فاکتور"
|
|
|
|
|
|
color="primary"
|
|
|
|
|
|
hide-details
|
|
|
|
|
|
class="mb-2"
|
|
|
|
|
|
></v-switch>
|
|
|
|
|
|
<div class="text-body-2 text-medium-emphasis mb-4">
|
|
|
|
|
|
با صدور فاکتور فروش یا برگشت از فروش قیمت فروش کالا و خدمات به روزرسانی خواهد شد.
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
|
|
|
|
|
|
<v-col cols="12" md="8">
|
|
|
|
|
|
<v-select
|
|
|
|
|
|
v-model="content.profitCalcType"
|
|
|
|
|
|
:items="[
|
|
|
|
|
|
{ title: 'بر اساس اختلاف قیمت خرید و فروش', value: 'simple' },
|
|
|
|
|
|
{ title: 'بر اساس آخرین قیمت ورود به انبار', value: 'lis' },
|
|
|
|
|
|
{ title: 'بر اساس میانگین قیمت ورود به انبار', value: 'avgis' }
|
|
|
|
|
|
]"
|
|
|
|
|
|
item-title="title"
|
|
|
|
|
|
item-value="value"
|
|
|
|
|
|
label="نحوه محاسبه سود فاکتور"
|
|
|
|
|
|
variant="outlined"
|
|
|
|
|
|
density="compact"
|
|
|
|
|
|
prepend-icon="mdi-calculator"
|
|
|
|
|
|
></v-select>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
</v-row>
|
|
|
|
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
2025-04-03 14:16:18 +03:30
|
|
|
|
</v-col>
|
2025-08-13 19:44:16 +03:30
|
|
|
|
|
|
|
|
|
|
<v-col cols="12" md="4">
|
|
|
|
|
|
<!-- کارت راهنما -->
|
|
|
|
|
|
<v-card variant="outlined" class="mb-4">
|
|
|
|
|
|
<v-card-title class="text-h6 text-primary">
|
|
|
|
|
|
<v-icon icon="mdi-help-circle" class="mr-2"></v-icon>
|
|
|
|
|
|
راهنما
|
|
|
|
|
|
</v-card-title>
|
|
|
|
|
|
<v-card-text>
|
|
|
|
|
|
<v-list density="compact">
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-link-variant" title="پیوند یکتا" class="text-body-2">
|
|
|
|
|
|
<template v-slot:subtitle>
|
|
|
|
|
|
<span class="text-caption">برای اشتراکگذاری فاکتورها</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</v-list-item>
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-wallet" title="کیف پول" class="text-body-2">
|
|
|
|
|
|
<template v-slot:subtitle>
|
|
|
|
|
|
<span class="text-caption">دریافت آنلاین مبالغ</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</v-list-item>
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-package-variant" title="کالا و خدمات" class="text-body-2">
|
|
|
|
|
|
<template v-slot:subtitle>
|
|
|
|
|
|
<span class="text-caption">مدیریت قیمتها و سود</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</v-list-item>
|
|
|
|
|
|
</v-list>
|
|
|
|
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- کارت نکات مهم -->
|
|
|
|
|
|
<v-card variant="outlined" color="info">
|
|
|
|
|
|
<v-card-title class="text-h6">
|
|
|
|
|
|
<v-icon icon="mdi-lightbulb" class="mr-2"></v-icon>
|
|
|
|
|
|
نکات مهم
|
|
|
|
|
|
</v-card-title>
|
|
|
|
|
|
<v-card-text>
|
|
|
|
|
|
<div class="text-body-2">
|
|
|
|
|
|
<ul class="pl-4">
|
|
|
|
|
|
<li class="mb-2">تنظیمات سراسری بر تمام عملیات کسب و کار تأثیر میگذارد</li>
|
|
|
|
|
|
<li class="mb-2">تغییرات پس از ذخیره اعمال میشوند</li>
|
|
|
|
|
|
<li class="mb-2">برای کیف پول حتماً حساب بانکی معتبر انتخاب کنید</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
2025-04-03 14:16:18 +03:30
|
|
|
|
</v-col>
|
|
|
|
|
|
</v-row>
|
2025-03-21 14:20:43 +03:30
|
|
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
|
|
|
|
|
</v-tabs-window-item>
|
2025-08-13 18:34:04 +03:30
|
|
|
|
<v-tabs-window-item value="3" v-if="showBackupTab">
|
|
|
|
|
|
<v-card>
|
|
|
|
|
|
<v-card-text>
|
|
|
|
|
|
<h3 class="text-primary mb-4">نسخه پشتیبان از اطلاعات کسب و کار</h3>
|
|
|
|
|
|
|
|
|
|
|
|
<v-row>
|
|
|
|
|
|
<v-col cols="12" md="8">
|
|
|
|
|
|
<v-card variant="outlined" class="mb-6">
|
|
|
|
|
|
<v-card-text>
|
|
|
|
|
|
<div class="text-body-1 text-medium-emphasis mb-4">
|
|
|
|
|
|
با استفاده از این قابلیت میتوانید از تمام اطلاعات کسب و کار خود نسخه پشتیبان تهیه کنید.
|
|
|
|
|
|
فایل خروجی در قالب اکسل خواهد بود و شامل تمام اطلاعات مهم کسب و کار شما میباشد.
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<v-btn
|
|
|
|
|
|
:loading="backupLoading"
|
|
|
|
|
|
@click="createBackup()"
|
|
|
|
|
|
color="primary"
|
|
|
|
|
|
variant="elevated"
|
|
|
|
|
|
size="large"
|
|
|
|
|
|
prepend-icon="mdi-download"
|
|
|
|
|
|
class="mb-4"
|
|
|
|
|
|
>
|
|
|
|
|
|
ایجاد نسخه پشتیبان
|
|
|
|
|
|
</v-btn>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="text-body-2 text-medium-emphasis">
|
|
|
|
|
|
<v-icon icon="mdi-information" class="mr-2" color="info"></v-icon>
|
|
|
|
|
|
فایل اکسل شامل اطلاعات زیر خواهد بود:
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
|
|
|
|
|
|
|
|
|
|
|
<v-card variant="outlined">
|
|
|
|
|
|
<v-card-title class="text-h6 text-primary">
|
|
|
|
|
|
<v-icon icon="mdi-file-excel" class="mr-2"></v-icon>
|
|
|
|
|
|
محتوای فایل نسخه پشتیبان
|
|
|
|
|
|
</v-card-title>
|
|
|
|
|
|
<v-card-text>
|
|
|
|
|
|
<v-row>
|
|
|
|
|
|
<v-col cols="12" md="6">
|
|
|
|
|
|
<h4 class="text-subtitle-1 text-primary mb-3">اطلاعات پایه</h4>
|
|
|
|
|
|
<v-list density="compact" class="bg-grey-lighten-5 rounded">
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-information" title="اطلاعات کسب و کار" class="text-body-2"></v-list-item>
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-account-group" title="اشخاص" class="text-body-2"></v-list-item>
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-package-variant" title="کالاها" class="text-body-2"></v-list-item>
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-bank" title="حسابهای بانکی" class="text-body-2"></v-list-item>
|
|
|
|
|
|
</v-list>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
|
|
|
|
|
|
<v-col cols="12" md="6">
|
|
|
|
|
|
<h4 class="text-subtitle-1 text-primary mb-3">اطلاعات مالی</h4>
|
|
|
|
|
|
<v-list density="compact" class="bg-grey-lighten-5 rounded">
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-file-document" title="اسناد حسابداری" class="text-body-2"></v-list-item>
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-calculator" title="جدول حسابها" class="text-body-2"></v-list-item>
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-format-list-bulleted" title="تراکنشها" class="text-body-2"></v-list-item>
|
|
|
|
|
|
</v-list>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
</v-row>
|
|
|
|
|
|
|
|
|
|
|
|
<v-row class="mt-4">
|
|
|
|
|
|
<v-col cols="12" md="6">
|
|
|
|
|
|
<h4 class="text-subtitle-1 text-primary mb-3">فاکتورها</h4>
|
|
|
|
|
|
<v-list density="compact" class="bg-grey-lighten-5 rounded">
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-cart" title="فاکتورهای فروش" class="text-body-2"></v-list-item>
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-cart-arrow-up" title="فاکتورهای خرید" class="text-body-2"></v-list-item>
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-cart-remove" title="برگشت از خرید" class="text-body-2"></v-list-item>
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-cart-return" title="برگشت از فروش" class="text-body-2"></v-list-item>
|
|
|
|
|
|
</v-list>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
|
|
|
|
|
|
<v-col cols="12" md="6">
|
|
|
|
|
|
<h4 class="text-subtitle-1 text-primary mb-3">سایر اطلاعات</h4>
|
|
|
|
|
|
<v-list density="compact" class="bg-grey-lighten-5 rounded">
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-warehouse" title="انبار" class="text-body-2"></v-list-item>
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-cash-plus" title="دریافت از اشخاص" class="text-body-2"></v-list-item>
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-cash-minus" title="پرداخت به اشخاص" class="text-body-2"></v-list-item>
|
|
|
|
|
|
</v-list>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
</v-row>
|
|
|
|
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
|
|
|
|
|
|
<v-col cols="12" md="4">
|
|
|
|
|
|
<v-card variant="outlined" class="mb-4">
|
|
|
|
|
|
<v-card-title class="text-h6 text-primary">
|
|
|
|
|
|
<v-icon icon="mdi-lightbulb" class="mr-2"></v-icon>
|
|
|
|
|
|
نکات مهم
|
|
|
|
|
|
</v-card-title>
|
|
|
|
|
|
<v-card-text>
|
|
|
|
|
|
<v-list density="compact">
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-check-circle" title="فایل اکسل با فرمت استاندارد" class="text-body-2 text-success"></v-list-item>
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-check-circle" title="شامل تمام اطلاعات مهم" class="text-body-2 text-success"></v-list-item>
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-check-circle" title="قابل استفاده در نرمافزارهای دیگر" class="text-body-2 text-success"></v-list-item>
|
|
|
|
|
|
<v-list-item prepend-icon="mdi-check-circle" title="امن و قابل اعتماد" class="text-body-2 text-success"></v-list-item>
|
|
|
|
|
|
</v-list>
|
|
|
|
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
|
|
|
|
|
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
</v-row>
|
|
|
|
|
|
</v-card-text>
|
|
|
|
|
|
</v-card>
|
|
|
|
|
|
</v-tabs-window-item>
|
2025-03-21 14:20:43 +03:30
|
|
|
|
</v-tabs-window>
|
|
|
|
|
|
</v-col>
|
|
|
|
|
|
</v-row>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import axios from "axios";
|
|
|
|
|
|
import Swal from "sweetalert2";
|
2025-04-03 14:16:18 +03:30
|
|
|
|
import Hdatepicker from "@/components/forms/Hdatepicker.vue";
|
2025-03-21 14:20:43 +03:30
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: "bussiness",
|
2025-04-03 14:16:18 +03:30
|
|
|
|
components: {
|
|
|
|
|
|
Hdatepicker
|
|
|
|
|
|
},
|
2025-03-21 14:20:43 +03:30
|
|
|
|
data: () => {
|
|
|
|
|
|
return {
|
|
|
|
|
|
tabs: '',
|
2025-08-13 18:34:04 +03:30
|
|
|
|
loading: false,
|
|
|
|
|
|
backupLoading: false,
|
|
|
|
|
|
showBackupTab: false,
|
2025-03-21 14:20:43 +03:30
|
|
|
|
moneys: [],
|
|
|
|
|
|
content: {
|
|
|
|
|
|
name: '',
|
|
|
|
|
|
legal_name: '',
|
|
|
|
|
|
field: '',
|
|
|
|
|
|
type: 'مغازه',
|
|
|
|
|
|
shenasemeli: '',
|
|
|
|
|
|
codeeqtesadi: '',
|
|
|
|
|
|
shomaresabt: '',
|
|
|
|
|
|
country: '',
|
|
|
|
|
|
ostan: '',
|
|
|
|
|
|
shahrestan: '',
|
|
|
|
|
|
postalcode: '',
|
|
|
|
|
|
tel: '',
|
|
|
|
|
|
mobile: '',
|
|
|
|
|
|
address: '',
|
|
|
|
|
|
website: '',
|
|
|
|
|
|
email: '',
|
|
|
|
|
|
arzmain: [],
|
|
|
|
|
|
maliyatafzode: 9,
|
|
|
|
|
|
shortlinks: false,
|
|
|
|
|
|
walletEnabled: false,
|
2025-04-03 23:01:18 +03:30
|
|
|
|
walletMatchBank: null,
|
|
|
|
|
|
year: {
|
|
|
|
|
|
startShamsi: '',
|
|
|
|
|
|
endShamsi: '',
|
|
|
|
|
|
label: ''
|
|
|
|
|
|
},
|
2025-03-21 14:20:43 +03:30
|
|
|
|
updateSellPrice: false,
|
|
|
|
|
|
updateBuyPrice: false,
|
|
|
|
|
|
profitCalcType: 'lis'
|
|
|
|
|
|
},
|
|
|
|
|
|
listBanks: [],
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-04-03 23:01:18 +03:30
|
|
|
|
watch: {
|
|
|
|
|
|
'content.year.endShamsi': {
|
|
|
|
|
|
handler(newVal) {
|
|
|
|
|
|
if (newVal) {
|
|
|
|
|
|
this.content.year.label = `سال مالی منتهی به ${newVal}`;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-03-21 14:20:43 +03:30
|
|
|
|
methods: {
|
|
|
|
|
|
checkBanksExist() {
|
|
|
|
|
|
if (this.listBanks.length === 0) {
|
|
|
|
|
|
Swal.fire({
|
|
|
|
|
|
text: 'هنوز هیچ حساب بانکی تعریف نشده است.',
|
|
|
|
|
|
icon: 'error',
|
|
|
|
|
|
confirmButtonText: 'تعریف حساب جدید',
|
|
|
|
|
|
cancelButtonText: 'بازگشت',
|
|
|
|
|
|
showCancelButton: true
|
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
|
if (res.isConfirmed) {
|
|
|
|
|
|
this.$router.push('/acc/banks/mod/');
|
|
|
|
|
|
}
|
|
|
|
|
|
else {
|
|
|
|
|
|
this.content.walletEnabled = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-08-13 18:34:04 +03:30
|
|
|
|
async createBackup() {
|
|
|
|
|
|
this.backupLoading = true;
|
|
|
|
|
|
try {
|
|
|
|
|
|
const response = await axios.post('/api/backup/create', {}, {
|
|
|
|
|
|
responseType: 'blob'
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// ایجاد لینک دانلود
|
|
|
|
|
|
const url = window.URL.createObjectURL(new Blob([response.data]));
|
|
|
|
|
|
const link = document.createElement('a');
|
|
|
|
|
|
link.href = url;
|
|
|
|
|
|
link.setAttribute('download', `backup_${this.content.name}_${new Date().toISOString().slice(0, 19).replace(/:/g, '-')}.xlsx`);
|
|
|
|
|
|
document.body.appendChild(link);
|
|
|
|
|
|
link.click();
|
|
|
|
|
|
link.remove();
|
|
|
|
|
|
window.URL.revokeObjectURL(url);
|
|
|
|
|
|
|
|
|
|
|
|
Swal.fire({
|
|
|
|
|
|
text: 'نسخه پشتیبان با موفقیت ایجاد شد.',
|
|
|
|
|
|
icon: 'success',
|
|
|
|
|
|
confirmButtonText: 'قبول'
|
|
|
|
|
|
});
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
console.error('خطا در ایجاد نسخه پشتیبان:', error);
|
|
|
|
|
|
Swal.fire({
|
|
|
|
|
|
text: 'خطا در ایجاد نسخه پشتیبان',
|
|
|
|
|
|
icon: 'error',
|
|
|
|
|
|
confirmButtonText: 'قبول'
|
|
|
|
|
|
});
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
this.backupLoading = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-03-21 14:20:43 +03:30
|
|
|
|
submit() {
|
|
|
|
|
|
if (this.content.year.label === '' || this.content.name === '' || this.content.legal_name === '' || this.content.maliyatafzode === '') {
|
|
|
|
|
|
Swal.fire({
|
|
|
|
|
|
text: 'تکمیل موارد ستاره دار الزامی است.',
|
|
|
|
|
|
icon: 'error',
|
|
|
|
|
|
confirmButtonText: 'قبول'
|
|
|
|
|
|
});
|
2025-04-03 23:01:18 +03:30
|
|
|
|
return;
|
2025-03-21 14:20:43 +03:30
|
|
|
|
}
|
|
|
|
|
|
if (this.content.walletEnabled && (this.content.walletMatchBank === undefined || this.content.walletMatchBank === null)) {
|
|
|
|
|
|
Swal.fire({
|
|
|
|
|
|
text: 'حساب بانکی متصل به کیف پول انتخاب نشده است',
|
|
|
|
|
|
icon: 'error',
|
|
|
|
|
|
confirmButtonText: 'قبول'
|
|
|
|
|
|
});
|
2025-04-03 23:01:18 +03:30
|
|
|
|
return;
|
2025-03-21 14:20:43 +03:30
|
|
|
|
}
|
2025-04-03 23:01:18 +03:30
|
|
|
|
|
2025-08-13 18:34:04 +03:30
|
|
|
|
//submit data
|
|
|
|
|
|
this.loading = true;
|
2025-04-03 23:01:18 +03:30
|
|
|
|
let data = {
|
2025-08-13 18:34:04 +03:30
|
|
|
|
'bid': localStorage.getItem('activeBid'),
|
|
|
|
|
|
'name': this.content.name,
|
|
|
|
|
|
'legal_name': this.content.legal_name,
|
|
|
|
|
|
'field': this.content.field,
|
|
|
|
|
|
'type': this.content.type,
|
|
|
|
|
|
'shenasemeli': this.content.shenasemeli,
|
|
|
|
|
|
'codeeqtesadi': this.content.codeeqtesadi,
|
|
|
|
|
|
'shomaresabt': this.content.shomaresabt,
|
|
|
|
|
|
'country': this.content.country,
|
|
|
|
|
|
'ostan': this.content.ostan,
|
|
|
|
|
|
'shahrestan': this.content.shahrestan,
|
|
|
|
|
|
'postalcode': this.content.postalcode,
|
|
|
|
|
|
'tel': this.content.tel,
|
|
|
|
|
|
'mobile': this.content.mobile,
|
|
|
|
|
|
'address': this.content.address,
|
|
|
|
|
|
'website': this.content.website,
|
|
|
|
|
|
'email': this.content.email,
|
|
|
|
|
|
'arzmain': this.content.arzmain,
|
|
|
|
|
|
'maliyatafzode': this.content.maliyatafzode,
|
|
|
|
|
|
'shortlinks': this.content.shortlinks,
|
|
|
|
|
|
'walletEnabled': this.content.walletEnabled,
|
|
|
|
|
|
'walletMatchBank': this.content.walletMatchBank,
|
|
|
|
|
|
'year': this.content.year,
|
|
|
|
|
|
'commodityUpdateBuyPriceAuto': this.content.updateBuyPrice,
|
|
|
|
|
|
'commodityUpdateSellPriceAuto': this.content.updateSellPrice,
|
|
|
|
|
|
'profitCalcType': this.content.profitCalcType
|
2025-04-03 23:01:18 +03:30
|
|
|
|
};
|
2025-03-21 14:20:43 +03:30
|
|
|
|
|
2025-04-03 23:01:18 +03:30
|
|
|
|
axios.post('/api/business/insert', data)
|
2025-08-13 18:34:04 +03:30
|
|
|
|
.then((response) => {
|
|
|
|
|
|
this.loading = false;
|
|
|
|
|
|
if (response.data.result == 1) {
|
|
|
|
|
|
Swal.fire({
|
|
|
|
|
|
text: 'با موفقیت ثبت شد.',
|
|
|
|
|
|
icon: 'success',
|
|
|
|
|
|
confirmButtonText: 'قبول',
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (response.data.result === 0) {
|
|
|
|
|
|
Swal.fire({
|
|
|
|
|
|
text: 'تکمیل موارد ستاره دار الزامی است.',
|
|
|
|
|
|
icon: 'error',
|
|
|
|
|
|
confirmButtonText: 'قبول'
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2025-04-03 23:01:18 +03:30
|
|
|
|
.catch((error) => {
|
|
|
|
|
|
this.loading = false;
|
|
|
|
|
|
Swal.fire({
|
|
|
|
|
|
text: 'خطا در ثبت اطلاعات',
|
|
|
|
|
|
icon: 'error',
|
|
|
|
|
|
confirmButtonText: 'قبول'
|
|
|
|
|
|
});
|
|
|
|
|
|
});
|
2025-03-21 14:20:43 +03:30
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
async beforeMount() {
|
|
|
|
|
|
this.loading = true
|
|
|
|
|
|
//get all money types
|
|
|
|
|
|
axios.post("/api/money/get/all").then((response) => {
|
|
|
|
|
|
this.moneys = response.data;
|
|
|
|
|
|
this.content.arzmain = this.moneys[0];
|
|
|
|
|
|
})
|
|
|
|
|
|
|
2025-04-03 23:01:18 +03:30
|
|
|
|
//get list of banks
|
|
|
|
|
|
await axios.post('/api/bank/list').then((response) => {
|
|
|
|
|
|
this.listBanks = response.data;
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2025-03-21 14:20:43 +03:30
|
|
|
|
//get business info
|
2025-04-03 23:01:18 +03:30
|
|
|
|
let data = await axios.post('/api/business/get/info/' + localStorage.getItem('activeBid'))
|
2025-03-21 14:20:43 +03:30
|
|
|
|
.then((response) => {
|
|
|
|
|
|
this.content = response.data;
|
2025-04-03 23:01:18 +03:30
|
|
|
|
// اگر walletMatchBank یک آبجکت است، فقط id آن را نگه میداریم
|
|
|
|
|
|
if (this.content.walletMatchBank && typeof this.content.walletMatchBank === 'object') {
|
|
|
|
|
|
this.content.walletMatchBank = this.content.walletMatchBank.id;
|
|
|
|
|
|
}
|
2025-03-21 14:20:43 +03:30
|
|
|
|
this.loading = false;
|
|
|
|
|
|
});
|
2025-08-13 18:34:04 +03:30
|
|
|
|
|
|
|
|
|
|
// بررسی دسترسی settings و فعال بودن افزونه accpro
|
|
|
|
|
|
try {
|
|
|
|
|
|
const permissionsResponse = await axios.post('/api/business/get/user/permissions');
|
|
|
|
|
|
if (permissionsResponse.data.settings) {
|
|
|
|
|
|
// بررسی فعال بودن افزونه accpro
|
|
|
|
|
|
const pluginResponse = await axios.post('/api/plugin/check/accpro/' + localStorage.getItem('activeBid'));
|
|
|
|
|
|
this.showBackupTab = pluginResponse.data.active;
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
console.error('خطا در بررسی دسترسیها:', error);
|
|
|
|
|
|
this.showBackupTab = false;
|
|
|
|
|
|
}
|
2025-03-21 14:20:43 +03:30
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
.required label:before {
|
|
|
|
|
|
content: "*";
|
|
|
|
|
|
color: red;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|