Compare commits
2 Commits
Piyango-Do
...
Dosya-Kapa
| Author | SHA1 | Date | |
|---|---|---|---|
| 216cf1fb73 | |||
| 0d58b0ad10 |
@ -237,18 +237,4 @@
|
||||
d="M16.1362 14.1067H14.7781C14.3632 14.1067 14.0268 14.4424 14.0268 14.8564V19.8401C14.0268 20.2541 14.3632 20.5897 14.7781 20.5897H16.1362C16.5511 20.5897 16.8875 20.2541 16.8875 19.8401V14.8564C16.8875 14.4424 16.5511 14.1067 16.1362 14.1067Z"
|
||||
/>
|
||||
</symbol>
|
||||
<symbol id="trash" viewBox="0 0 20 22">
|
||||
<path
|
||||
d="M19.4015 6.14128H18.7672L18.8227 5.47865C18.8227 5.47865 18.8227 5.44229 18.8227 5.42613C18.8227 3.9837 17.6691 2.80795 16.2538 2.80795H14.8544V1.78976C14.8544 0.803906 14.0695 0.00390625 13.1022 0.00390625H6.88614C5.91885 0.00390625 5.13391 0.803906 5.13391 1.78976V2.80795H3.73451C2.31924 2.80795 1.16563 3.9837 1.16563 5.42613C1.16563 5.44229 1.16563 5.46249 1.16563 5.47865L1.22113 6.14128H0.586836C0.257797 6.14128 -0.0078125 6.41199 -0.0078125 6.74734C-0.0078125 7.08269 0.257797 7.3534 0.586836 7.3534H1.3242L2.35096 19.41C2.36682 20.8403 3.5125 21.9999 4.91984 21.9999H15.0645C16.4719 21.9999 17.6176 20.8403 17.6334 19.41L18.6602 7.3534H19.3975C19.7266 7.3534 19.9922 7.08269 19.9922 6.74734C19.9922 6.41199 19.7266 6.14128 19.3975 6.14128H19.4015ZM6.32321 1.78572C6.32321 1.46653 6.57692 1.21199 6.88614 1.21199H13.1022C13.4154 1.21199 13.6651 1.47057 13.6651 1.78572V2.80391H6.32321V1.78572ZM2.35492 5.40189C2.36682 4.63825 2.98129 4.02007 3.73451 4.02007H16.2578C17.011 4.02007 17.6255 4.63825 17.6374 5.40189L17.5739 6.14128H2.41835L2.35492 5.40189ZM16.452 19.3292C16.452 19.3292 16.452 19.3655 16.452 19.3817C16.452 20.1574 15.8336 20.7877 15.0725 20.7877H4.9238C4.16265 20.7877 3.54422 20.1574 3.54422 19.3817C3.54422 19.3655 3.54422 19.3453 3.54422 19.3292L2.52539 7.3534H17.4748L16.456 19.3292H16.452Z"
|
||||
/>
|
||||
<path
|
||||
d="M14.7236 13.9756H5.2687C4.93966 13.9756 4.67405 14.2463 4.67405 14.5817C4.67405 14.917 4.93966 15.1877 5.2687 15.1877H14.7196C15.0487 15.1877 15.3143 14.917 15.3143 14.5817C15.3143 14.2463 15.0487 13.9756 14.7196 13.9756H14.7236Z"
|
||||
/>
|
||||
<path
|
||||
d="M4.87227 11.6766H15.1161C15.4451 11.6766 15.7107 11.4059 15.7107 11.0706C15.7107 10.7352 15.4451 10.4645 15.1161 10.4645H4.87227C4.54323 10.4645 4.27762 10.7352 4.27762 11.0706C4.27762 11.4059 4.54323 11.6766 4.87227 11.6766Z"
|
||||
/>
|
||||
<path
|
||||
d="M14.3272 17.4867H5.66513C5.33609 17.4867 5.07048 17.7574 5.07048 18.0928C5.07048 18.4281 5.33609 18.6989 5.66513 18.6989H14.3232C14.6522 18.6989 14.9179 18.4281 14.9179 18.0928C14.9179 17.7574 14.6522 17.4867 14.3232 17.4867H14.3272Z"
|
||||
/>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 41 KiB |
@ -18,8 +18,6 @@
|
||||
{{ fileName }}
|
||||
</div>
|
||||
</a>
|
||||
<div class="actions-c" v-if="editable || $slots.actionButtons">
|
||||
<slot name="actionButtons"></slot>
|
||||
<i
|
||||
class="ico-c ico-section ico-section-header-btn ico-replace"
|
||||
@click="OnClick"
|
||||
@ -28,7 +26,6 @@
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="form-item-picture only-image clickable">
|
||||
@ -78,8 +75,8 @@
|
||||
|
||||
if (props.filePath !== undefined && props.filePath !== null) {
|
||||
localFilePath.value = props.usePath
|
||||
? (props.filePath as string)
|
||||
: (((axios.defaults.baseURL as string) + props.filePath) as string as string)
|
||||
? props.filePath as string
|
||||
: (axios.defaults.baseURL as string + props.filePath as string) as string
|
||||
|
||||
fileType.value = globalStore.FileType(localFilePath.value)
|
||||
fileName.value = globalStore.FileName(localFilePath.value)
|
||||
@ -99,19 +96,8 @@
|
||||
() => props.filePath,
|
||||
() => {
|
||||
localFilePath.value = props.usePath
|
||||
? (props.filePath as string)
|
||||
: (((axios.defaults.baseURL as string) + props.filePath) as string as string)
|
||||
? props.filePath as string
|
||||
: (axios.defaults.baseURL as string + props.filePath as string) as string
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<style scoped>
|
||||
.actions-c {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
height: 100%;
|
||||
padding: 8px;
|
||||
align-items: center;
|
||||
pointer-events: fill;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -91,9 +91,9 @@
|
||||
|
||||
const emit = defineEmits(['update:modelValue', 'change', 'click'])
|
||||
|
||||
const localValue = ref<(string | number)[] | boolean | null | string | number|undefined>(
|
||||
props.modelValue
|
||||
)
|
||||
const localValue = ref<
|
||||
(string | number)[] | boolean | null | string | number | undefined
|
||||
>(props.modelValue)
|
||||
|
||||
const InvalidMessageText = reactive<Record<string, any>>({})
|
||||
const InvalidMessages = computed<string>(() => {
|
||||
|
||||
@ -355,8 +355,6 @@
|
||||
const globalDataStore = useGlobalDataStore()
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
const validationStore = useValidationStore()
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
import { useAuthValidationStore } from '../stores/authValidationStore'
|
||||
const authValidationStore = useAuthValidationStore()
|
||||
import router from '@/router'
|
||||
@ -365,12 +363,6 @@
|
||||
const uyeBilgileriStore = useUyeBilgileriStore()
|
||||
uyeBilgileriStore.ResetStore()
|
||||
|
||||
interface IIl {
|
||||
[key: string]: any
|
||||
ad: string
|
||||
id: number
|
||||
}
|
||||
|
||||
const kvkkCheck = ref([
|
||||
{
|
||||
label: '',
|
||||
|
||||
10
src/module/cekilisler/components/TabPiyangoDosyaKapama.vue
Normal file
10
src/module/cekilisler/components/TabPiyangoDosyaKapama.vue
Normal file
@ -0,0 +1,10 @@
|
||||
<template>
|
||||
<div class="form-content">
|
||||
<div class="form-inner-content form-inner-content-left">
|
||||
<form-piyango-dosya-kapama/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import FormPiyangoDosyaKapama from './form/FormPiyangoDosyaKapama.vue'
|
||||
</script>
|
||||
@ -39,7 +39,7 @@
|
||||
</panel-wrapper>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, computed, onBeforeMount } from 'vue'
|
||||
import { ref, onBeforeMount } from 'vue'
|
||||
import { usePDF } from 'vue3-pdfmake'
|
||||
import { useUsersStore } from '@/stores/usersStore'
|
||||
const usersStore = useUsersStore()
|
||||
|
||||
@ -10,15 +10,7 @@
|
||||
:editable="false"
|
||||
:data="file"
|
||||
title="dokumanAdi"
|
||||
:filePath="file.url">
|
||||
<template #actionButtons v-if="usersStore.isPanelUser">
|
||||
<i
|
||||
class="ico-c ico-btn ico-section back-grad-alert"
|
||||
@click="DeleteDocumentPop(file)">
|
||||
<svg><use href="/src/assets/images/icons.svg#trash"></use></svg>
|
||||
</i>
|
||||
</template>
|
||||
</file-list-item>
|
||||
:filePath="file.url" />
|
||||
</template>
|
||||
</template>
|
||||
<template v-else>
|
||||
@ -41,35 +33,6 @@
|
||||
const piyangoDocumentStore = usePiyangoDocumentStore()
|
||||
import { usePiyangoDocumentService } from '../../service/piyangoDocumentService'
|
||||
const piyangoDocumentService = usePiyangoDocumentService()
|
||||
import { useDialogStore } from '@/components/global/dialogStore'
|
||||
const dialogStore = useDialogStore()
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
const dataStore = useDataStore()
|
||||
|
||||
const DeleteDocumentPop = (data: Record<string, any>) => {
|
||||
dialogStore.CreateDialog({
|
||||
title: 'Doküman Sil',
|
||||
id: 'deletedoc',
|
||||
content: 'Dokümanı silmek istediğinize emin misiniz? Bu işlem geri alınamaz.',
|
||||
closeText: 'Vazgeç',
|
||||
buttons: [
|
||||
{
|
||||
label: 'Doküman Sil',
|
||||
type: 'alert',
|
||||
function: () => DeleteDocument(data.id)
|
||||
}
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
const DeleteDocument = async (id: number | string) => {
|
||||
var dt = await dataStore.dataDelete('Popup/' + id)
|
||||
|
||||
if (dt !== 'errorfalse') {
|
||||
dialogStore.CloseDialog('deletedoc')
|
||||
await piyangoDocumentService.GetDocumentList()
|
||||
}
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
await piyangoDocumentService.GetDocumentList()
|
||||
|
||||
244
src/module/cekilisler/components/form/FormPiyangoDosyaKapama.vue
Normal file
244
src/module/cekilisler/components/form/FormPiyangoDosyaKapama.vue
Normal file
@ -0,0 +1,244 @@
|
||||
<template>
|
||||
<div class="form-part form-title" v-if="piyangoDosyaKapamaStore.isNew">
|
||||
<div class="form-title-buttons">
|
||||
<div
|
||||
class="button-c button-save"
|
||||
@click="piyangoDosyaKapamaService.SaveDosyaKapama()">
|
||||
Kaydet
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
:class="[
|
||||
'form-part',
|
||||
piyangoDosyaKapamaStore.formChanged && !piyangoDosyaKapamaStore.isNew
|
||||
? 'changed'
|
||||
: ''
|
||||
]">
|
||||
<div class="form-part-title">
|
||||
<h4>Teminat İade Evrak Kontrol</h4>
|
||||
</div>
|
||||
<div class="form-part-content" v-if="piyangoDosyaKapamaStore.loaded">
|
||||
<form-input
|
||||
modelKey="katilimSekli"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.katilimSekli"
|
||||
label="1. Katılım Şekli"
|
||||
placeholder="Katılım Şekli"
|
||||
@keyup="OnKeyup" />
|
||||
|
||||
<form-checkbox
|
||||
label="2. CD"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.cD"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="3. Kutu Mühürleme Tutanağı"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.kutuMuhurlemeTutanagi"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="4. Kutu Açma Tutanağı"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.kutuAcmaTutanagi"
|
||||
@change="OnKeyup" />
|
||||
|
||||
<div class="form-part-title">
|
||||
<h4>5. Çekiliş Tutanağı</h4>
|
||||
</div>
|
||||
<form-checkbox
|
||||
label="Çekiliş Tutanağı"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.cekilisTutanagi"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="Çekiliş izin alınan tarih, saat, adreste yapılmış"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.cekilisIzinAlinanTarihSaatAdres"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="Çekilişte önceden belirlenen ikramiyeler çekiliş"
|
||||
v-model="
|
||||
piyangoDosyaKapamaStore.dosyaKapamaData.cekilisOncedenBelirlenenIkramiyeler
|
||||
"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="Çekilişte önceden belirlenen ikramiyeler çekiliş"
|
||||
v-model="
|
||||
piyangoDosyaKapamaStore.dosyaKapamaData.cekilisOncedenBelirlenenIkramiyeler
|
||||
"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="Çekiliş numara üzerinden/isimden"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.cekilisNumaraUzerindenCekilis"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="Dağıtılmayan kupon tespiti"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.dagitilmayanKuponTespiti"
|
||||
@change="OnKeyup" />
|
||||
|
||||
<div class="form-part-title">
|
||||
<h4>6. Çekiliş Sonucu İlan</h4>
|
||||
</div>
|
||||
<form-checkbox
|
||||
label="Çekiliş Sonucu İlan"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.cekilisSonucuIlani"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="Taahhüt edilen tarih ve gazetede ilan"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.ilandaTarihGazete"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="İlanda toplam katılımcı sayısı"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.ilandaToplamKatilimci"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="Çekiliş tutanağı ile uyumlu kazanan numara/isim"
|
||||
v-model="
|
||||
piyangoDosyaKapamaStore.dosyaKapamaData.cekilisTutanagiIleUyumluKazananlar
|
||||
"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="İlanda ikramiyeler son teslim süresi"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.ilanSonBasvuruTeslimSuresi"
|
||||
@change="OnKeyup" />
|
||||
|
||||
<form-input
|
||||
modelKey="taahhutEdilenIkramiyeAdedi"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.taahhutEdilenIkramiyeAdedi"
|
||||
label="7. Taahhüt Edilen İkramiye"
|
||||
placeholder="Taahhüt Edilen İkramiye"
|
||||
@keyup="OnKeyup" />
|
||||
|
||||
<div class="form-part-title">
|
||||
<h4>8. Teslim Edilen İkramiye</h4>
|
||||
</div>
|
||||
<form-input
|
||||
modelKey="teslimEdilenIkramiyeAdedi"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.teslimEdilenIkramiyeAdedi"
|
||||
label="Teslim Edilen İkramiye"
|
||||
placeholder="Teslim Edilen İkramiye"
|
||||
@keyup="OnKeyup" />
|
||||
<form-input
|
||||
modelKey="asilIkramiyeSayisi"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.asilIkramiyeSayisi"
|
||||
label="Teslim Edilen Asıl İkramiye"
|
||||
placeholder="Teslim Edilen Asıl İkramiye"
|
||||
@keyup="OnKeyup" />
|
||||
<form-input
|
||||
modelKey="yedekIkramiyeSayisi"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.yedekIkramiyeSayisi"
|
||||
label="Teslim Edilen Yedek İkramiye"
|
||||
placeholder="Teslim Edilen Yedek İkramiye"
|
||||
@keyup="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="Nüfus Cüzdanları"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.nufusCuzdani"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="Kazanan numaralı noter onaylı ibraname"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.noterOnayliIbraname"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="Teslim Belgesi"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.teslimBelgesi"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="Fatura fotokopileri"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.faturaFotokopileri"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="Tescile ait belgeler"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.tescileAitBelgeler"
|
||||
@change="OnKeyup" />
|
||||
<div class="form-part-title">
|
||||
<h4>9. Süresi İçinde Alınmayan İkramiye</h4>
|
||||
</div>
|
||||
<form-input
|
||||
modelKey="sureIcindesAlinmayanIkramiyeAdedi"
|
||||
v-model="
|
||||
piyangoDosyaKapamaStore.dosyaKapamaData.sureIcindesAlinmayanIkramiyeAdedi
|
||||
"
|
||||
label="Süresi İçinde Alınmayan İkramiye"
|
||||
placeholder="Süresi İçinde Alınmayan İkramiye"
|
||||
@keyup="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="Tebligat"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.tebligat"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="Feragat"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.feragat"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="Bağış"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.bagis"
|
||||
@change="OnKeyup" />
|
||||
|
||||
<div class="form-part-title">
|
||||
<h4>10. Kupon (Aslı) ve Duyuru Örneği</h4>
|
||||
</div>
|
||||
<form-checkbox
|
||||
label="Kupon Aslı"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.kuponAsli"
|
||||
@change="OnKeyup" />
|
||||
<form-checkbox
|
||||
label="Duyuru Örneği"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.duyuruMateryali"
|
||||
@change="OnKeyup" />
|
||||
|
||||
<form-date
|
||||
type="date"
|
||||
modelKey="ikramiyelerinSonTeslimTarihi"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.ikramiyelerinSonTeslimTarihi"
|
||||
label="11. İkramiyelerin Son Teslim Tarihi"
|
||||
@change="OnKeyup" />
|
||||
<form-date
|
||||
type="date"
|
||||
modelKey="teminatIadeTarihi"
|
||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.teminatIadeTarihi"
|
||||
label="12. Teminat İade Tarihi"
|
||||
@change="OnKeyup" />
|
||||
|
||||
<div
|
||||
class="form-item"
|
||||
v-if="piyangoDosyaKapamaStore.formChanged && !piyangoDosyaKapamaStore.isNew">
|
||||
<button
|
||||
class="button-c button-save"
|
||||
@click="piyangoDosyaKapamaService.SaveDosyaKapama()">
|
||||
Kaydet
|
||||
</button>
|
||||
<button class="button-c button-cancel" @click="CancelSave">Vazgeç</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-part form-title" v-if="piyangoDosyaKapamaStore.isNew">
|
||||
<div class="form-title-buttons">
|
||||
<div
|
||||
class="button-c button-save"
|
||||
@click="piyangoDosyaKapamaService.SaveDosyaKapama()">
|
||||
Kaydet
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onBeforeMount } from 'vue'
|
||||
|
||||
import { usePiyangoDosyaKapamaStore } from '../../stores/piyangoDosyaKapamaStore'
|
||||
const piyangoDosyaKapamaStore = usePiyangoDosyaKapamaStore()
|
||||
import { usePiyangoDosyaKapamaService } from '../../service/piyangoDosyaKapamaService'
|
||||
const piyangoDosyaKapamaService = usePiyangoDosyaKapamaService()
|
||||
|
||||
const OnKeyup = () => {
|
||||
piyangoDosyaKapamaStore.formChanged = true
|
||||
}
|
||||
|
||||
const CancelSave = () => {
|
||||
piyangoDosyaKapamaStore.RestoreFormData()
|
||||
piyangoDosyaKapamaStore.formChanged = false
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
await piyangoDosyaKapamaService.GetDosyaKapama()
|
||||
|
||||
if (piyangoDosyaKapamaStore.isNew) {
|
||||
piyangoDosyaKapamaStore.ResetFormData()
|
||||
piyangoDosyaKapamaStore.loaded = true
|
||||
}
|
||||
})
|
||||
</script>
|
||||
57
src/module/cekilisler/service/piyangoDosyaKapamaService.ts
Normal file
57
src/module/cekilisler/service/piyangoDosyaKapamaService.ts
Normal file
@ -0,0 +1,57 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { useDataStore } from '@/stores/dataStore'
|
||||
import { usePiyangoStore } from '../stores/piyangoStore'
|
||||
import { usePiyangoDosyaKapamaStore } from '../stores/piyangoDosyaKapamaStore'
|
||||
import { usePiyangoDosyaKapamaValidationStore } from '../validation/piyangoDosyaKapamaValidationStore'
|
||||
|
||||
export const usePiyangoDosyaKapamaService = defineStore(
|
||||
'piyangoDosyaKapamaService',
|
||||
() => {
|
||||
const dataStore = useDataStore()
|
||||
const piyangoStore = usePiyangoStore()
|
||||
const piyangoDosyaKapamaStore = usePiyangoDosyaKapamaStore()
|
||||
const piyangoDosyaKapamaValidationStore = usePiyangoDosyaKapamaValidationStore()
|
||||
|
||||
const GetDosyaKapama = async () => {
|
||||
let data: Record<string, any> | any = await dataStore.dataGet(
|
||||
'TeminatIadeEvrakKontrol/' + piyangoStore.selectedLottery
|
||||
)
|
||||
|
||||
if (data !== 'errorfalse' || data.data.id === undefined) {
|
||||
Object.assign(piyangoDosyaKapamaStore.dosyaKapamaData, data.data)
|
||||
Object.assign(piyangoDosyaKapamaStore.safeDosyaKapamaData, data.data)
|
||||
piyangoDosyaKapamaStore.isNew = false
|
||||
setTimeout(() => {
|
||||
piyangoDosyaKapamaStore.loaded = true
|
||||
}, 30)
|
||||
} else {
|
||||
piyangoDosyaKapamaStore.isNew = true
|
||||
}
|
||||
}
|
||||
|
||||
const SaveDosyaKapama = async () => {
|
||||
let dt: any
|
||||
dataStore.panelData.yayinlanacagiTarih = new Date(
|
||||
dataStore.panelData.yayinlanacagiTarih
|
||||
)
|
||||
if (!piyangoDosyaKapamaStore.isUpdate) {
|
||||
dt = await dataStore.dataPost('TeminatIadeEvrakKontrol', {
|
||||
data: piyangoDosyaKapamaStore.dosyaKapamaData
|
||||
})
|
||||
} else {
|
||||
dt = await dataStore.dataPut(
|
||||
'TeminatIadeEvrakKontrol/' + piyangoDosyaKapamaStore.dosyaKapamaData.id,
|
||||
{
|
||||
data: piyangoDosyaKapamaStore.dosyaKapamaData
|
||||
}
|
||||
)
|
||||
}
|
||||
if (dt !== 'errorfalse') {
|
||||
piyangoDosyaKapamaStore.isUpdate = false
|
||||
await GetDosyaKapama()
|
||||
}
|
||||
}
|
||||
|
||||
return { GetDosyaKapama, SaveDosyaKapama }
|
||||
}
|
||||
)
|
||||
70
src/module/cekilisler/stores/piyangoDosyaKapamaStore.ts
Normal file
70
src/module/cekilisler/stores/piyangoDosyaKapamaStore.ts
Normal file
@ -0,0 +1,70 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useGlobalStore } from '@/stores/globalStore'
|
||||
|
||||
export const usePiyangoDosyaKapamaStore = defineStore('piyangoDosyaKapamaStore', () => {
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
const baseDosyaKapamaData = reactive<Record<string, any>>({
|
||||
katilimSekli: '',
|
||||
cD: false,
|
||||
kutuMuhurlemeTutanagi: false,
|
||||
kutuAcmaTutanagi: false,
|
||||
cekilisTutanagi: false,
|
||||
cekilisIzinAlinanTarihSaatAdres: false,
|
||||
oncedenBelirlenenIkramiyeCekilis: false,
|
||||
cekilisNumaraUzerindenCekilis: false,
|
||||
dagitilmayanKuponTespiti: false,
|
||||
cekilisSonucuIlan: false,
|
||||
ilandaTarihGazete: false,
|
||||
ilandaToplamKatilimci: false,
|
||||
cekilisTutanagiIleUyumluKazananlar: false,
|
||||
ilanSonBasvuruTeslimSuresi: false,
|
||||
taahhutEdilenIkramiyeAdedi: null,
|
||||
teslimEdilenIkramiyeAdedi: null,
|
||||
asilIkramiyeSayisi: null,
|
||||
yedekIkramiyeSayisi: null,
|
||||
nufusCuzdani: false,
|
||||
noterOnayliIbraname: false,
|
||||
teslimBelgesi: false,
|
||||
faturaFotokopileri: false,
|
||||
tescileAitBelgeler: false,
|
||||
sureIcindesAlinmayanIkramiyeAdedi: null,
|
||||
tebligat: false,
|
||||
feragat: false,
|
||||
bagis: false,
|
||||
kuponAsli: false,
|
||||
duyuruMateryali: false,
|
||||
ikramiyelerinSonTeslimTarihi: '',
|
||||
teminatIadeTarihi: ''
|
||||
})
|
||||
const dosyaKapamaData = reactive<Record<string, any>>({})
|
||||
const safeDosyaKapamaData = reactive<Record<string, any>>({})
|
||||
const isNew = ref<boolean>(false)
|
||||
const isUpdate = ref<boolean>(false)
|
||||
const formChanged = ref<boolean>(false)
|
||||
const loaded = ref<boolean>(false)
|
||||
|
||||
|
||||
const ResetFormData = () => {
|
||||
globalStore.ResetObject(dosyaKapamaData, baseDosyaKapamaData)
|
||||
Object.assign(dosyaKapamaData, baseDosyaKapamaData)
|
||||
}
|
||||
|
||||
const RestoreFormData = () => {
|
||||
globalStore.ResetObject(dosyaKapamaData, baseDosyaKapamaData)
|
||||
Object.assign(dosyaKapamaData, safeDosyaKapamaData)
|
||||
}
|
||||
|
||||
return {
|
||||
baseDosyaKapamaData,
|
||||
dosyaKapamaData,
|
||||
safeDosyaKapamaData,
|
||||
isNew,
|
||||
isUpdate,
|
||||
formChanged,
|
||||
loaded,
|
||||
ResetFormData,
|
||||
RestoreFormData
|
||||
}
|
||||
})
|
||||
@ -0,0 +1,35 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, reactive } from 'vue'
|
||||
import { useValidationStore } from '@/stores/validationStore'
|
||||
import { usePiyangoDosyaKapamaStore } from '../stores/piyangoDosyaKapamaStore'
|
||||
|
||||
export const usePiyangoDosyaKapamaValidationStore = defineStore(
|
||||
'piyangoDosyaKapamaValidationStore',
|
||||
() => {
|
||||
const piyangoDosyaKapamaStore = usePiyangoDosyaKapamaStore()
|
||||
const validationStore = useValidationStore()
|
||||
|
||||
const isFormValid = ref<boolean>(true)
|
||||
const invalidTexts = reactive<Record<string, any>>({})
|
||||
|
||||
const FormCheck = (): boolean => {
|
||||
Object.assign(invalidTexts, {})
|
||||
|
||||
validationStore.IsFieldEmpty(
|
||||
piyangoDosyaKapamaStore.dosyaKapamaData,
|
||||
invalidTexts,
|
||||
'mecraAdi',
|
||||
'Yayınlanacak mecranın adını yazınız.'
|
||||
)
|
||||
|
||||
isFormValid.value = Object.keys(invalidTexts).length === 0
|
||||
return isFormValid.value
|
||||
}
|
||||
|
||||
return {
|
||||
isFormValid,
|
||||
invalidTexts,
|
||||
FormCheck
|
||||
}
|
||||
}
|
||||
)
|
||||
@ -16,7 +16,7 @@
|
||||
<template #talihliler><tab-piyango-talihli-listesi /></template>
|
||||
<template #itirazsikayet><tab-piyango-itiraz /></template>
|
||||
<template #piyangologlari><tab-piyango-loglari /></template>
|
||||
<template #yetkilendirme>
|
||||
<template #yetkilendirme v-if="usersStore.isPanelUser">
|
||||
<tab-piyango-yetkilendirme />
|
||||
</template>
|
||||
<template #onaydurumu>
|
||||
@ -26,6 +26,9 @@
|
||||
<template #teminatlistesi>
|
||||
<tab-piyango-teminat-durumu />
|
||||
</template>
|
||||
<template #dosyakapama v-if="usersStore.isPanelUser && piyangoStore.lotteryDrawState">
|
||||
<tab-piyango-dosya-kapama />
|
||||
</template>
|
||||
</tabs>
|
||||
</AdminLayout>
|
||||
</template>
|
||||
@ -52,6 +55,7 @@
|
||||
import TabPiyangoBilgileri from '@/module/cekilisler/components/TabPiyangoBilgileri.vue'
|
||||
import TabPiyangoBilgileriDisplay from '../components/TabPiyangoBilgileriDisplay.vue'
|
||||
import TabPiyangoItiraz from '@/module/cekilisler/components/TabPiyangoItiraz.vue'
|
||||
import TabPiyangoDosyaKapama from '@/module/cekilisler/components/TabPiyangoDosyaKapama.vue'
|
||||
|
||||
const loaded = ref<boolean>(false)
|
||||
const tabList = ref<Record<string, any>[]>([
|
||||
@ -85,6 +89,10 @@
|
||||
if (piyangoStore.lotteryApprove !== 0) {
|
||||
tabList.value.push({ text: 'Teminat Listesi', id: 'teminatlistesi' })
|
||||
}
|
||||
|
||||
if (usersStore.isPanelUser && piyangoStore.lotteryDrawState) {
|
||||
tabList.value.push({ text: 'Dossya Kapama', id: 'dosyakapama' })
|
||||
}
|
||||
}
|
||||
|
||||
onBeforeMount(async () => {
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
</AdminLayout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, computed } from 'vue'
|
||||
import { ref, computed } from 'vue'
|
||||
import AdminLayout from '@/layouts/AdminLayout.vue'
|
||||
import { Breadcrumb } from '@/components/global'
|
||||
import router from '@/router'
|
||||
|
||||
Reference in New Issue
Block a user