- 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 !== ''">
|
||||
{{ localData.content }}
|
||||
</div>
|
||||
<div
|
||||
class="dialog-content"
|
||||
v-if="localData.contentHtml !== undefined && localData.contentHtml !== ''"
|
||||
v-html="localData.contentHtml"></div>
|
||||
<div class="dialog-footer">
|
||||
<template
|
||||
v-if="localData.buttons !== undefined && localData.buttons.length > 0"
|
||||
@ -49,6 +53,7 @@
|
||||
const localData = reactive({
|
||||
title: '',
|
||||
content: '',
|
||||
contentHtml: '',
|
||||
showClose: true,
|
||||
closeText: 'Kapat',
|
||||
closeFunction: () => {
|
||||
|
||||
@ -145,15 +145,11 @@
|
||||
import {
|
||||
connectToHub,
|
||||
onProgress,
|
||||
onInsertProgress,
|
||||
onCompleted,
|
||||
onError
|
||||
onCompleted
|
||||
} from '../service/signalrService'
|
||||
|
||||
const uploadProgressValue = ref(0)
|
||||
const uploadProgressPanel = ref(false)
|
||||
const today = ref<Date>(new Date())
|
||||
const ilanTarihi = ref<Date>(new Date(piyangoStore.lotteryIlanTarihi!))
|
||||
|
||||
const tableHeader = ref<Record<string, any>[]>([
|
||||
{
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
</template>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onBeforeMount, watch } from 'vue'
|
||||
import { ref, onBeforeMount, watch } from 'vue'
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
const globalStore = useGlobalStore()
|
||||
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||
@ -36,8 +36,6 @@
|
||||
|
||||
import { usePiyangoIkramiyeStore } from '../../stores/piyangoIkramiyeStore'
|
||||
const piyangoIkramiyeStore = usePiyangoIkramiyeStore()
|
||||
import { usePiyangoIkramiyeService } from '../../service/piyangoIkramiyeService'
|
||||
const piyangoIkramiyeService = usePiyangoIkramiyeService()
|
||||
|
||||
export interface Props {
|
||||
isPreview?: boolean
|
||||
@ -45,8 +43,6 @@
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), { isPreview: false })
|
||||
|
||||
const loaded = ref<boolean>(false)
|
||||
|
||||
const ikramiyeTableHeader = ref<Record<string, any>>([
|
||||
{
|
||||
name: 'cinsi',
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
import { usePiyangoStore } from './piyangoStore'
|
||||
|
||||
export const usePiyangoDosyaKapamaStore = defineStore('piyangoDosyaKapamaStore', () => {
|
||||
const globalStore = useGlobalStore()
|
||||
const piyangoStore = usePiyangoStore()
|
||||
|
||||
const baseDosyaKapamaData = reactive<Record<string, any>>({
|
||||
katilimSekli: '',
|
||||
@ -36,7 +38,8 @@ export const usePiyangoDosyaKapamaStore = defineStore('piyangoDosyaKapamaStore',
|
||||
kuponAsli: false,
|
||||
duyuruMateryali: false,
|
||||
ikramiyelerinSonTeslimTarihi: '',
|
||||
teminatIadeTarihi: ''
|
||||
teminatIadeTarihi: '',
|
||||
evrak: { cekilisId: piyangoStore.selectedLottery }
|
||||
})
|
||||
const baseDosyaKapamaIkramiyeData = reactive<Record<string, any>>({
|
||||
taahhutEdilenIkramiye: '',
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<h4>Piyango Bilgileri</h4>
|
||||
<div class="form-part-title-buttons" v-if="!isPreview">
|
||||
<button
|
||||
@click="BasvuruBedeliMuhasebelestir"
|
||||
@click="BasvuruBedeliDialog"
|
||||
v-if="
|
||||
(piyangoStore.lotteryApprove === 1 || piyangoStore.lotteryApprove === 4) &&
|
||||
(!piyangoStore.lotteryBasvuruBedeliStatus ||
|
||||
@ -44,14 +44,41 @@
|
||||
<label>Oran Seçiniz:</label>
|
||||
<select @change="OnOranChange" class="form-select">
|
||||
<option value="">Lütfen bir oran seçiniz</option>
|
||||
<option
|
||||
v-for="oran in izinBedelOranlari"
|
||||
:key="oran.id"
|
||||
:value="oran.id">
|
||||
<option v-for="oran in izinBedelOranlari" :key="oran.id" :value="oran.id">
|
||||
{{ oran.oran }}% - {{ oran.adi }}
|
||||
</option>
|
||||
</select>
|
||||
</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 class="modal-footer">
|
||||
<button class="button-c button-cancel" @click="CloseIzinBedeliModal">
|
||||
@ -67,10 +94,16 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onBeforeMount } from 'vue'
|
||||
import { ref, onBeforeMount, computed } from 'vue'
|
||||
|
||||
import { useToastStore } from '@/components/global/toastStore'
|
||||
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 {
|
||||
isPreview?: boolean
|
||||
@ -85,16 +118,20 @@
|
||||
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
import { usePreviewStore } from '@/stores/previewStore'
|
||||
const previewStore = usePreviewStore()
|
||||
import { usePiyangoStore } from '@/module/cekilisler/stores/piyangoStore'
|
||||
const piyangoStore = usePiyangoStore()
|
||||
import { useMuhasebeSettingsStore } from '@/module/muhasebe/store/muhasebeSettingsStore'
|
||||
const muhasebeSettingsStore = useMuhasebeSettingsStore()
|
||||
|
||||
const loaded = ref<boolean>(false)
|
||||
const showIzinBedeliModal = ref<boolean>(false)
|
||||
const selectedOran = ref<number | null>(null)
|
||||
const izinBedelOranlari = ref<Record<string, any>[]>([])
|
||||
const selectedOranId = ref<number | null>(null)
|
||||
const calculatedKdv = ref<number>(0)
|
||||
const calculatedBasvuruKdv = computed<number>(
|
||||
() => (Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli) * 20) / 100
|
||||
)
|
||||
|
||||
const GetData = async () => {
|
||||
let data = await dataStore.dataGet(
|
||||
@ -140,12 +177,55 @@
|
||||
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 () => {
|
||||
let data = await dataStore.dataGet(
|
||||
'MuhasebeSettings/BasvuruBedeli/' + piyangoStore.selectedLottery
|
||||
)
|
||||
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
|
||||
await GetData()
|
||||
piyangoStore.lotteryBasvuruBedeliStatus = true
|
||||
@ -172,7 +252,9 @@
|
||||
const OnOranChange = (event: Event) => {
|
||||
const target = event.target as HTMLSelectElement
|
||||
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) {
|
||||
selectedOranId.value = selectedOranData.id
|
||||
@ -181,6 +263,9 @@
|
||||
selectedOranId.value = null
|
||||
selectedOran.value = null
|
||||
}
|
||||
|
||||
calculatedKdv.value =
|
||||
(Number(piyangoIkramiyeStore.totalIkramiyeValues) * Number(selectedOran!)) / 100
|
||||
}
|
||||
|
||||
const IzinBedeliMuhasebelestir = async () => {
|
||||
@ -190,10 +275,17 @@
|
||||
}
|
||||
|
||||
let data = await dataStore.dataGet(
|
||||
'MuhasebeSettings/IzinBasvuruBedeli/' + piyangoStore.selectedLottery + '/' + selectedOranId.value
|
||||
'MuhasebeSettings/IzinBasvuruBedeli/' +
|
||||
piyangoStore.selectedLottery +
|
||||
'/' +
|
||||
selectedOranId.value
|
||||
)
|
||||
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
|
||||
await GetData()
|
||||
piyangoStore.lotteryIzinBedeliStatus = true
|
||||
@ -213,7 +305,7 @@
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.modal-overlay {
|
||||
.modal-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
@ -224,9 +316,9 @@
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 9999;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
.modal-content {
|
||||
background: white;
|
||||
border-radius: 8px;
|
||||
padding: 0;
|
||||
@ -235,24 +327,24 @@
|
||||
max-height: 90vh;
|
||||
overflow-y: auto;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
.modal-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20px 24px;
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-header h3 {
|
||||
.modal-header h3 {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #1f2937;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-close {
|
||||
.modal-close {
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 24px;
|
||||
@ -266,28 +358,28 @@
|
||||
justify-content: center;
|
||||
border-radius: 4px;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-close:hover {
|
||||
.modal-close:hover {
|
||||
background-color: #f3f4f6;
|
||||
}
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
.modal-body {
|
||||
padding: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.form-group {
|
||||
.form-group {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.form-group label {
|
||||
.form-group label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
font-weight: 500;
|
||||
color: #374151;
|
||||
}
|
||||
}
|
||||
|
||||
.form-select {
|
||||
.form-select {
|
||||
width: 100%;
|
||||
padding: 12px;
|
||||
border: 1px solid #d1d5db;
|
||||
@ -295,15 +387,15 @@
|
||||
font-size: 14px;
|
||||
background-color: white;
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
}
|
||||
|
||||
.form-select:focus {
|
||||
.form-select:focus {
|
||||
outline: none;
|
||||
border-color: #3b82f6;
|
||||
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
.modal-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 12px;
|
||||
@ -311,9 +403,9 @@
|
||||
border-top: 1px solid #e5e7eb;
|
||||
background-color: #f9fafb;
|
||||
border-radius: 0 0 8px 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.button-c {
|
||||
.button-c {
|
||||
padding: 10px 20px;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
@ -321,23 +413,30 @@
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
}
|
||||
|
||||
.button-cancel {
|
||||
.button-cancel {
|
||||
background-color: #6b7280;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.button-cancel:hover {
|
||||
.button-cancel:hover {
|
||||
background-color: #4b5563;
|
||||
}
|
||||
}
|
||||
|
||||
.button-save {
|
||||
.button-save {
|
||||
background-color: #3b82f6;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
|
||||
.button-save:hover {
|
||||
.button-save:hover {
|
||||
background-color: #2563eb;
|
||||
}
|
||||
}
|
||||
.table-bordered {
|
||||
width: 100%;
|
||||
}
|
||||
.table-bordered tr td {
|
||||
border-bottom: 1px solid #d8d8d8;
|
||||
padding: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user