- Başvuru bedeli muhasebeleştir, izin bedeli muhasebeleştir popuplar bedel, kdv, toplam değerlr eklendi
- Dialog komponentine html içerik için ek alan - Dosya kapama datasına evrak:cekilisId eklendi
This commit is contained in:
@ -13,6 +13,10 @@
|
|||||||
v-if="localData.content !== undefined && localData.content !== ''">
|
v-if="localData.content !== undefined && localData.content !== ''">
|
||||||
{{ localData.content }}
|
{{ localData.content }}
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
class="dialog-content"
|
||||||
|
v-if="localData.contentHtml !== undefined && localData.contentHtml !== ''"
|
||||||
|
v-html="localData.contentHtml"></div>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<template
|
<template
|
||||||
v-if="localData.buttons !== undefined && localData.buttons.length > 0"
|
v-if="localData.buttons !== undefined && localData.buttons.length > 0"
|
||||||
@ -49,6 +53,7 @@
|
|||||||
const localData = reactive({
|
const localData = reactive({
|
||||||
title: '',
|
title: '',
|
||||||
content: '',
|
content: '',
|
||||||
|
contentHtml: '',
|
||||||
showClose: true,
|
showClose: true,
|
||||||
closeText: 'Kapat',
|
closeText: 'Kapat',
|
||||||
closeFunction: () => {
|
closeFunction: () => {
|
||||||
|
|||||||
@ -145,15 +145,11 @@
|
|||||||
import {
|
import {
|
||||||
connectToHub,
|
connectToHub,
|
||||||
onProgress,
|
onProgress,
|
||||||
onInsertProgress,
|
onCompleted
|
||||||
onCompleted,
|
|
||||||
onError
|
|
||||||
} from '../service/signalrService'
|
} from '../service/signalrService'
|
||||||
|
|
||||||
const uploadProgressValue = ref(0)
|
const uploadProgressValue = ref(0)
|
||||||
const uploadProgressPanel = ref(false)
|
const uploadProgressPanel = ref(false)
|
||||||
const today = ref<Date>(new Date())
|
|
||||||
const ilanTarihi = ref<Date>(new Date(piyangoStore.lotteryIlanTarihi!))
|
|
||||||
|
|
||||||
const tableHeader = ref<Record<string, any>[]>([
|
const tableHeader = ref<Record<string, any>[]>([
|
||||||
{
|
{
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onBeforeMount, watch } from 'vue'
|
import { ref, onBeforeMount, watch } from 'vue'
|
||||||
import { useGlobalStore } from '@/stores/globalStore'
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
import { usePiyangoStore } from '../../stores/piyangoStore'
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
@ -36,8 +36,6 @@
|
|||||||
|
|
||||||
import { usePiyangoIkramiyeStore } from '../../stores/piyangoIkramiyeStore'
|
import { usePiyangoIkramiyeStore } from '../../stores/piyangoIkramiyeStore'
|
||||||
const piyangoIkramiyeStore = usePiyangoIkramiyeStore()
|
const piyangoIkramiyeStore = usePiyangoIkramiyeStore()
|
||||||
import { usePiyangoIkramiyeService } from '../../service/piyangoIkramiyeService'
|
|
||||||
const piyangoIkramiyeService = usePiyangoIkramiyeService()
|
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
isPreview?: boolean
|
isPreview?: boolean
|
||||||
@ -45,8 +43,6 @@
|
|||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), { isPreview: false })
|
const props = withDefaults(defineProps<Props>(), { isPreview: false })
|
||||||
|
|
||||||
const loaded = ref<boolean>(false)
|
|
||||||
|
|
||||||
const ikramiyeTableHeader = ref<Record<string, any>>([
|
const ikramiyeTableHeader = ref<Record<string, any>>([
|
||||||
{
|
{
|
||||||
name: 'cinsi',
|
name: 'cinsi',
|
||||||
|
|||||||
@ -1,9 +1,11 @@
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import { useGlobalStore } from '@/stores/globalStore'
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
|
import { usePiyangoStore } from './piyangoStore'
|
||||||
|
|
||||||
export const usePiyangoDosyaKapamaStore = defineStore('piyangoDosyaKapamaStore', () => {
|
export const usePiyangoDosyaKapamaStore = defineStore('piyangoDosyaKapamaStore', () => {
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
|
const piyangoStore = usePiyangoStore()
|
||||||
|
|
||||||
const baseDosyaKapamaData = reactive<Record<string, any>>({
|
const baseDosyaKapamaData = reactive<Record<string, any>>({
|
||||||
katilimSekli: '',
|
katilimSekli: '',
|
||||||
@ -36,7 +38,8 @@ export const usePiyangoDosyaKapamaStore = defineStore('piyangoDosyaKapamaStore',
|
|||||||
kuponAsli: false,
|
kuponAsli: false,
|
||||||
duyuruMateryali: false,
|
duyuruMateryali: false,
|
||||||
ikramiyelerinSonTeslimTarihi: '',
|
ikramiyelerinSonTeslimTarihi: '',
|
||||||
teminatIadeTarihi: ''
|
teminatIadeTarihi: '',
|
||||||
|
evrak: { cekilisId: piyangoStore.selectedLottery }
|
||||||
})
|
})
|
||||||
const baseDosyaKapamaIkramiyeData = reactive<Record<string, any>>({
|
const baseDosyaKapamaIkramiyeData = reactive<Record<string, any>>({
|
||||||
taahhutEdilenIkramiye: '',
|
taahhutEdilenIkramiye: '',
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<h4>Piyango Bilgileri</h4>
|
<h4>Piyango Bilgileri</h4>
|
||||||
<div class="form-part-title-buttons" v-if="!isPreview">
|
<div class="form-part-title-buttons" v-if="!isPreview">
|
||||||
<button
|
<button
|
||||||
@click="BasvuruBedeliMuhasebelestir"
|
@click="BasvuruBedeliDialog"
|
||||||
v-if="
|
v-if="
|
||||||
(piyangoStore.lotteryApprove === 1 || piyangoStore.lotteryApprove === 4) &&
|
(piyangoStore.lotteryApprove === 1 || piyangoStore.lotteryApprove === 4) &&
|
||||||
(!piyangoStore.lotteryBasvuruBedeliStatus ||
|
(!piyangoStore.lotteryBasvuruBedeliStatus ||
|
||||||
@ -44,14 +44,41 @@
|
|||||||
<label>Oran Seçiniz:</label>
|
<label>Oran Seçiniz:</label>
|
||||||
<select @change="OnOranChange" class="form-select">
|
<select @change="OnOranChange" class="form-select">
|
||||||
<option value="">Lütfen bir oran seçiniz</option>
|
<option value="">Lütfen bir oran seçiniz</option>
|
||||||
<option
|
<option v-for="oran in izinBedelOranlari" :key="oran.id" :value="oran.id">
|
||||||
v-for="oran in izinBedelOranlari"
|
|
||||||
:key="oran.id"
|
|
||||||
:value="oran.id">
|
|
||||||
{{ oran.oran }}% - {{ oran.adi }}
|
{{ oran.oran }}% - {{ oran.adi }}
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="">
|
||||||
|
<table class="table-bordered">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Toplam İkramiye Bedeli:</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
globalStore.toTrLocale(piyangoIkramiyeStore.totalIkramiyeValues)
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>KDV:</td>
|
||||||
|
<td>
|
||||||
|
{{ globalStore.toTrLocale(calculatedKdv) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Toplam Bedel:</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
globalStore.toTrLocale(
|
||||||
|
Number(piyangoIkramiyeStore.totalIkramiyeValues) + calculatedKdv
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button class="button-c button-cancel" @click="CloseIzinBedeliModal">
|
<button class="button-c button-cancel" @click="CloseIzinBedeliModal">
|
||||||
@ -67,10 +94,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onBeforeMount } from 'vue'
|
import { ref, onBeforeMount, computed } from 'vue'
|
||||||
|
|
||||||
import { useToastStore } from '@/components/global/toastStore'
|
import { useToastStore } from '@/components/global/toastStore'
|
||||||
const toastStore = useToastStore()
|
const toastStore = useToastStore()
|
||||||
|
import { usePiyangoIkramiyeStore } from '@/module/cekilisler/stores/piyangoIkramiyeStore'
|
||||||
|
const piyangoIkramiyeStore = usePiyangoIkramiyeStore()
|
||||||
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
|
const globalStore = useGlobalStore()
|
||||||
|
import { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
const dialogStore = useDialogStore()
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
isPreview?: boolean
|
isPreview?: boolean
|
||||||
@ -85,16 +118,20 @@
|
|||||||
|
|
||||||
import { useDataStore } from '@/stores/dataStore'
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
import { usePreviewStore } from '@/stores/previewStore'
|
|
||||||
const previewStore = usePreviewStore()
|
|
||||||
import { usePiyangoStore } from '@/module/cekilisler/stores/piyangoStore'
|
import { usePiyangoStore } from '@/module/cekilisler/stores/piyangoStore'
|
||||||
const piyangoStore = usePiyangoStore()
|
const piyangoStore = usePiyangoStore()
|
||||||
|
import { useMuhasebeSettingsStore } from '@/module/muhasebe/store/muhasebeSettingsStore'
|
||||||
|
const muhasebeSettingsStore = useMuhasebeSettingsStore()
|
||||||
|
|
||||||
const loaded = ref<boolean>(false)
|
const loaded = ref<boolean>(false)
|
||||||
const showIzinBedeliModal = ref<boolean>(false)
|
const showIzinBedeliModal = ref<boolean>(false)
|
||||||
const selectedOran = ref<number | null>(null)
|
const selectedOran = ref<number | null>(null)
|
||||||
const izinBedelOranlari = ref<Record<string, any>[]>([])
|
const izinBedelOranlari = ref<Record<string, any>[]>([])
|
||||||
const selectedOranId = ref<number | null>(null)
|
const selectedOranId = ref<number | null>(null)
|
||||||
|
const calculatedKdv = ref<number>(0)
|
||||||
|
const calculatedBasvuruKdv = computed<number>(
|
||||||
|
() => (Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli) * 20) / 100
|
||||||
|
)
|
||||||
|
|
||||||
const GetData = async () => {
|
const GetData = async () => {
|
||||||
let data = await dataStore.dataGet(
|
let data = await dataStore.dataGet(
|
||||||
@ -140,12 +177,55 @@
|
|||||||
izinBedelOranlari.value = data
|
izinBedelOranlari.value = data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const BasvuruBedeliDialog = () => {
|
||||||
|
dialogStore.CreateDialog({
|
||||||
|
title: 'Başvuru Bedelini Muhasebeleştir',
|
||||||
|
id: 'basvurubedelimuhasebelestir',
|
||||||
|
contentHtml: `<table class="table-bordered">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Başvuru Bedeli:</td>
|
||||||
|
<td>${globalStore.toTrLocale(
|
||||||
|
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli
|
||||||
|
)} ₺</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>KDV %20):</td>
|
||||||
|
<td>
|
||||||
|
${globalStore.toTrLocale(calculatedBasvuruKdv.value)}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Toplam Bedel:</td>
|
||||||
|
<td>
|
||||||
|
${globalStore.toTrLocale(
|
||||||
|
Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli) +
|
||||||
|
calculatedBasvuruKdv.value
|
||||||
|
)}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>`,
|
||||||
|
closeText: 'Vazgeç',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
label: 'Başvuru Bedelini Muhasebeleştir',
|
||||||
|
type: 'alert',
|
||||||
|
function: () => BasvuruBedeliMuhasebelestir
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
const BasvuruBedeliMuhasebelestir = async () => {
|
const BasvuruBedeliMuhasebelestir = async () => {
|
||||||
let data = await dataStore.dataGet(
|
let data = await dataStore.dataGet(
|
||||||
'MuhasebeSettings/BasvuruBedeli/' + piyangoStore.selectedLottery
|
'MuhasebeSettings/BasvuruBedeli/' + piyangoStore.selectedLottery
|
||||||
)
|
)
|
||||||
if (data !== 'errorfalse') {
|
if (data !== 'errorfalse') {
|
||||||
toastStore.AddToast('Başvuru bedeli başarıyla muhasebeleştirildi. Fatura No: '+data.belgeNo, 'success', 30000)
|
toastStore.AddToast(
|
||||||
|
'Başvuru bedeli başarıyla muhasebeleştirildi. Fatura No: ' + data.belgeNo,
|
||||||
|
'success',
|
||||||
|
30000
|
||||||
|
)
|
||||||
loaded.value = false
|
loaded.value = false
|
||||||
await GetData()
|
await GetData()
|
||||||
piyangoStore.lotteryBasvuruBedeliStatus = true
|
piyangoStore.lotteryBasvuruBedeliStatus = true
|
||||||
@ -172,7 +252,9 @@
|
|||||||
const OnOranChange = (event: Event) => {
|
const OnOranChange = (event: Event) => {
|
||||||
const target = event.target as HTMLSelectElement
|
const target = event.target as HTMLSelectElement
|
||||||
const selectedId = parseInt(target.value)
|
const selectedId = parseInt(target.value)
|
||||||
const selectedOranData = izinBedelOranlari.value.find(item => item.id === selectedId)
|
const selectedOranData = izinBedelOranlari.value.find(
|
||||||
|
(item) => item.id === selectedId
|
||||||
|
)
|
||||||
|
|
||||||
if (selectedOranData) {
|
if (selectedOranData) {
|
||||||
selectedOranId.value = selectedOranData.id
|
selectedOranId.value = selectedOranData.id
|
||||||
@ -181,6 +263,9 @@
|
|||||||
selectedOranId.value = null
|
selectedOranId.value = null
|
||||||
selectedOran.value = null
|
selectedOran.value = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
calculatedKdv.value =
|
||||||
|
(Number(piyangoIkramiyeStore.totalIkramiyeValues) * Number(selectedOran!)) / 100
|
||||||
}
|
}
|
||||||
|
|
||||||
const IzinBedeliMuhasebelestir = async () => {
|
const IzinBedeliMuhasebelestir = async () => {
|
||||||
@ -190,10 +275,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
let data = await dataStore.dataGet(
|
let data = await dataStore.dataGet(
|
||||||
'MuhasebeSettings/IzinBasvuruBedeli/' + piyangoStore.selectedLottery + '/' + selectedOranId.value
|
'MuhasebeSettings/IzinBasvuruBedeli/' +
|
||||||
|
piyangoStore.selectedLottery +
|
||||||
|
'/' +
|
||||||
|
selectedOranId.value
|
||||||
)
|
)
|
||||||
if (data !== 'errorfalse') {
|
if (data !== 'errorfalse') {
|
||||||
toastStore.AddToast('İzin bedeli başarıyla muhasebeleştirildi. Fatura No: '+data.izinBelgeNo , 'success', 30000)
|
toastStore.AddToast(
|
||||||
|
'İzin bedeli başarıyla muhasebeleştirildi. Fatura No: ' + data.izinBelgeNo,
|
||||||
|
'success',
|
||||||
|
30000
|
||||||
|
)
|
||||||
loaded.value = false
|
loaded.value = false
|
||||||
await GetData()
|
await GetData()
|
||||||
piyangoStore.lotteryIzinBedeliStatus = true
|
piyangoStore.lotteryIzinBedeliStatus = true
|
||||||
@ -340,4 +432,11 @@
|
|||||||
.button-save:hover {
|
.button-save:hover {
|
||||||
background-color: #2563eb;
|
background-color: #2563eb;
|
||||||
}
|
}
|
||||||
|
.table-bordered {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.table-bordered tr td {
|
||||||
|
border-bottom: 1px solid #d8d8d8;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user