- izin bedeli toplam bedel toplam düzenleme
- Onay Durumları edit özelliği eklendi
This commit is contained in:
@ -55,16 +55,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onBeforeMount } from 'vue'
|
import { onBeforeMount } from 'vue'
|
||||||
|
|
||||||
import { useDataStore } from '@/stores/dataStore'
|
|
||||||
const dataStore = useDataStore()
|
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
|
||||||
const usersStore = useUsersStore()
|
|
||||||
import { useValidationStore } from '@/stores/validationStore'
|
|
||||||
const validationStore = useValidationStore()
|
|
||||||
import { usePiyangoStore } from '../../stores/piyangoStore'
|
|
||||||
const piyangoStore = usePiyangoStore()
|
|
||||||
import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore'
|
import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore'
|
||||||
const piyangoOnayStore = usePiyangoOnayStore()
|
const piyangoOnayStore = usePiyangoOnayStore()
|
||||||
import { usePiyangoOnayValidationStore } from '../../validation/piyangoOnayValidationStore'
|
import { usePiyangoOnayValidationStore } from '../../validation/piyangoOnayValidationStore'
|
||||||
|
|||||||
@ -2,28 +2,44 @@
|
|||||||
<list-table-content
|
<list-table-content
|
||||||
v-if="loaded"
|
v-if="loaded"
|
||||||
:tableHeader="tableHeader"
|
:tableHeader="tableHeader"
|
||||||
|
:rowAction="EditOnay"
|
||||||
formTitle="Piyango Onay Durumları"
|
formTitle="Piyango Onay Durumları"
|
||||||
listText="Kayıt"
|
listText="Kayıt"
|
||||||
:apiList="'OnayDurumu/GetSonOnayDurumlariList/' + piyangoStore.selectedLottery"
|
:apiList="'OnayDurumu/GetSonOnayDurumlariList/' + piyangoStore.selectedLottery"
|
||||||
apiText="Piyango Onay Log Listesi"
|
apiText="Piyango Onay Log Listesi"
|
||||||
page="form"
|
page="form"
|
||||||
:refresh="piyangoOnayStore.refreshList" />
|
:refresh="piyangoOnayStore.refreshList" />
|
||||||
|
<panel-wrapper
|
||||||
|
v-if="piyangoOnayStore.onayFormPanel"
|
||||||
|
v-model="piyangoOnayStore.onayFormPanel"
|
||||||
|
panel-title="Onay Durumunu Düzenle">
|
||||||
|
<template #panelContent>
|
||||||
|
<panel-piyango-onay />
|
||||||
|
</template>
|
||||||
|
<template #footerButton>
|
||||||
|
<div class="button-c button-save" @click="piyangoOnayService.SaveOnayDurumPanel">
|
||||||
|
Kaydet
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</panel-wrapper>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onBeforeMount, computed } from 'vue'
|
import { ref, onBeforeMount, computed } from 'vue'
|
||||||
import axios from 'axios'
|
import PanelPiyangoOnay from '../panel/PanelPiyangoOnay.vue'
|
||||||
|
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||||
|
|
||||||
import { useDateStore } from '@/stores/dateStore'
|
import { useDateStore } from '@/stores/dateStore'
|
||||||
const dateStore = useDateStore()
|
const dateStore = useDateStore()
|
||||||
import { useGlobalStore } from '@/stores/globalStore'
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore'
|
import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore'
|
||||||
const piyangoOnayStore = usePiyangoOnayStore()
|
const piyangoOnayStore = usePiyangoOnayStore()
|
||||||
|
import { usePiyangoOnayService } from '../../service/piyangoOnayService'
|
||||||
|
const piyangoOnayService = usePiyangoOnayService()
|
||||||
import { usePiyangoStore } from '../../stores/piyangoStore'
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
const piyangoStore = usePiyangoStore()
|
const piyangoStore = usePiyangoStore()
|
||||||
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
|
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
|
||||||
const piyangoDataStore = usePiyangoDataStore()
|
const piyangoDataStore = usePiyangoDataStore()
|
||||||
import { usePiyangoServices } from '../../service/piyangoServices'
|
|
||||||
const piyangoServices = usePiyangoServices()
|
|
||||||
|
|
||||||
const loaded = ref<boolean>(false)
|
const loaded = ref<boolean>(false)
|
||||||
|
|
||||||
@ -82,6 +98,11 @@
|
|||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
const EditOnay = (d: Record<string, any>) => {
|
||||||
|
Object.assign(piyangoOnayStore.piyangoPanelOnayForm, d)
|
||||||
|
piyangoOnayStore.onayFormPanel = true
|
||||||
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
loaded.value = true
|
loaded.value = true
|
||||||
})
|
})
|
||||||
|
|||||||
@ -11,26 +11,15 @@
|
|||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onBeforeMount, computed } from 'vue'
|
import { ref, onBeforeMount, computed } from 'vue'
|
||||||
import axios from 'axios'
|
|
||||||
import { useDateStore } from '@/stores/dateStore'
|
import { useDateStore } from '@/stores/dateStore'
|
||||||
const dateStore = useDateStore()
|
const dateStore = useDateStore()
|
||||||
import { useGlobalStore } from '@/stores/globalStore'
|
|
||||||
const globalStore = useGlobalStore()
|
|
||||||
import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore'
|
import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore'
|
||||||
const piyangoOnayStore = usePiyangoOnayStore()
|
const piyangoOnayStore = usePiyangoOnayStore()
|
||||||
import { usePiyangoStore } from '../../stores/piyangoStore'
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
const piyangoStore = usePiyangoStore()
|
const piyangoStore = usePiyangoStore()
|
||||||
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
|
|
||||||
const piyangoDataStore = usePiyangoDataStore()
|
|
||||||
import { usePiyangoServices } from '../../service/piyangoServices'
|
|
||||||
const piyangoServices = usePiyangoServices()
|
|
||||||
|
|
||||||
const loaded = ref<boolean>(false)
|
const loaded = ref<boolean>(false)
|
||||||
|
|
||||||
const piyangoOnayDurumlari = computed<Record<string, any>[]>(() => {
|
|
||||||
return piyangoDataStore.piyangoOnayDurumlari
|
|
||||||
})
|
|
||||||
|
|
||||||
const tableHeader = ref<Record<string, any>[]>([
|
const tableHeader = ref<Record<string, any>[]>([
|
||||||
{
|
{
|
||||||
name: 'tarih',
|
name: 'tarih',
|
||||||
@ -54,11 +43,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'eskiDurum',
|
name: 'eskiDurum',
|
||||||
title: 'Eski Durum',
|
title: 'Eski Durum'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'yeniDurum',
|
name: 'yeniDurum',
|
||||||
title: 'Yeni Durum',
|
title: 'Yeni Durum'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'aciklama',
|
name: 'aciklama',
|
||||||
|
|||||||
65
src/module/cekilisler/components/panel/PanelPiyangoOnay.vue
Normal file
65
src/module/cekilisler/components/panel/PanelPiyangoOnay.vue
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
<template>
|
||||||
|
<div class="form-part-content" v-if="piyangoOnayStore.onayPanelLoaded">
|
||||||
|
<form-select
|
||||||
|
label="İşlem"
|
||||||
|
:listData="piyangoDataStore.piyangoOnayDurumlari"
|
||||||
|
listText="tipAdi"
|
||||||
|
listVal="islemId"
|
||||||
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId"
|
||||||
|
required
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.onayDurumuIslemTipiId" />
|
||||||
|
<template v-if="piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === 4">
|
||||||
|
<form-input
|
||||||
|
modelKey="izinSayisi"
|
||||||
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.izinSayisi"
|
||||||
|
required
|
||||||
|
label="İzin Sayı No"
|
||||||
|
placeholder="İzin Sayı No"
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinSayisi"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
|
<form-date
|
||||||
|
type="date"
|
||||||
|
required
|
||||||
|
modelKey="izinTarihi"
|
||||||
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.izinTarihi"
|
||||||
|
label="İzin Tarihi"
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinTarihi"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
<form-textarea
|
||||||
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi"
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinAciklamasi"
|
||||||
|
label="İzin Açıklaması"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
|
</template>
|
||||||
|
<form-file
|
||||||
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.file"
|
||||||
|
elclass="panel-documents-item"
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.file" />
|
||||||
|
<form-textarea
|
||||||
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.aciklama"
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.aciklama"
|
||||||
|
label="Açıklama"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { onBeforeMount } from 'vue'
|
||||||
|
import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore'
|
||||||
|
const piyangoOnayStore = usePiyangoOnayStore()
|
||||||
|
import { usePiyangoOnayValidationStore } from '../../validation/piyangoOnayValidationStore'
|
||||||
|
const piyangoOnayValidationStore = usePiyangoOnayValidationStore()
|
||||||
|
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
|
||||||
|
const piyangoDataStore = usePiyangoDataStore()
|
||||||
|
import { usePiyangoServices } from '../../service/piyangoServices'
|
||||||
|
const piyangoServices = usePiyangoServices()
|
||||||
|
|
||||||
|
const OnKeyup = () => {
|
||||||
|
piyangoOnayValidationStore.formChanged = true
|
||||||
|
}
|
||||||
|
|
||||||
|
onBeforeMount(async () => {
|
||||||
|
await piyangoServices.GetPiyangoOnayDurumList()
|
||||||
|
piyangoDataStore.RemoveOnayDurumIncelemeBekleniyor()
|
||||||
|
piyangoOnayStore.onayPanelLoaded = true
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@ -55,5 +55,48 @@ export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
|
|||||||
piyangoOnayValidationStore.isFormValid = true
|
piyangoOnayValidationStore.isFormValid = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return { SaveOnayDurum }
|
|
||||||
|
const SaveOnayDurumPanel = async () => {
|
||||||
|
if (piyangoOnayValidationStore.FormPanelCheck()) {
|
||||||
|
let form: any
|
||||||
|
let dataForm = new FormData()
|
||||||
|
|
||||||
|
if (piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId !== 4) {
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.izinSayisi = ''
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.izinTarihi = ''
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi = ''
|
||||||
|
}
|
||||||
|
dataForm.append(
|
||||||
|
'onayDurumuIslemTipiId',
|
||||||
|
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId
|
||||||
|
)
|
||||||
|
dataForm.append('id', piyangoOnayStore.piyangoPanelOnayForm.id)
|
||||||
|
dataForm.append('onayCekilisId', String(piyangoStore.selectedLottery))
|
||||||
|
dataForm.append('kisiId', String(usersStore.userId))
|
||||||
|
dataForm.append('file', piyangoOnayStore.piyangoPanelOnayForm.file)
|
||||||
|
dataForm.append('aciklama', piyangoOnayStore.piyangoPanelOnayForm.aciklama)
|
||||||
|
dataForm.append('izinSayisi', piyangoOnayStore.piyangoPanelOnayForm.izinSayisi)
|
||||||
|
dataForm.append('izinTarihi', piyangoOnayStore.piyangoPanelOnayForm.izinTarihi)
|
||||||
|
dataForm.append(
|
||||||
|
'izinAciklamasi',
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi
|
||||||
|
)
|
||||||
|
|
||||||
|
form = await dataStore.dataPut(
|
||||||
|
'OnayDurumu/' + piyangoOnayStore.piyangoPanelOnayForm.id,
|
||||||
|
{
|
||||||
|
data: dataForm,
|
||||||
|
headers: { 'Content-Type': 'multipart/form-data' },
|
||||||
|
toast: { toast: 'Onay durumu başarıyla kaydedildi', type: 'success' }
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
if (form !== 'errorfalse') {
|
||||||
|
piyangoOnayStore.refreshList = true
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
piyangoOnayValidationStore.isPanelFormValid = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return { SaveOnayDurum, SaveOnayDurumPanel }
|
||||||
})
|
})
|
||||||
|
|||||||
@ -18,10 +18,13 @@ export const usePiyangoOnayStore = defineStore('piyangoOnayStore', () => {
|
|||||||
izinAciklamasi: ''
|
izinAciklamasi: ''
|
||||||
})
|
})
|
||||||
const piyangoOnayForm = reactive<Record<string, any>>({})
|
const piyangoOnayForm = reactive<Record<string, any>>({})
|
||||||
|
const piyangoPanelOnayForm = reactive<Record<string, any>>({})
|
||||||
const piyangoOnaySafeForm = reactive<Record<string, any>>({})
|
const piyangoOnaySafeForm = reactive<Record<string, any>>({})
|
||||||
const isUpdate = ref<boolean>(false)
|
const isUpdate = ref<boolean>(false)
|
||||||
const refreshList = ref<boolean>(false)
|
const refreshList = ref<boolean>(false)
|
||||||
const loaded = ref<boolean>(false)
|
const loaded = ref<boolean>(false)
|
||||||
|
const onayPanelLoaded = ref<boolean>(false)
|
||||||
|
const onayFormPanel = ref<boolean>(false)
|
||||||
|
|
||||||
const ResetForm = () => {
|
const ResetForm = () => {
|
||||||
Object.assign(piyangoOnayForm, piyangoOnayBaseForm)
|
Object.assign(piyangoOnayForm, piyangoOnayBaseForm)
|
||||||
@ -30,10 +33,13 @@ export const usePiyangoOnayStore = defineStore('piyangoOnayStore', () => {
|
|||||||
return {
|
return {
|
||||||
piyangoOnayBaseForm,
|
piyangoOnayBaseForm,
|
||||||
piyangoOnayForm,
|
piyangoOnayForm,
|
||||||
|
piyangoPanelOnayForm,
|
||||||
piyangoOnaySafeForm,
|
piyangoOnaySafeForm,
|
||||||
isUpdate,
|
isUpdate,
|
||||||
refreshList,
|
refreshList,
|
||||||
loaded,
|
loaded,
|
||||||
|
onayPanelLoaded,
|
||||||
|
onayFormPanel,
|
||||||
ResetForm
|
ResetForm
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -12,6 +12,8 @@ export const usePiyangoOnayValidationStore = defineStore(
|
|||||||
const formChanged = ref<boolean>(false)
|
const formChanged = ref<boolean>(false)
|
||||||
const isFormValid = ref<boolean>(true)
|
const isFormValid = ref<boolean>(true)
|
||||||
const invalidTexts = reactive<Record<string, any>>({})
|
const invalidTexts = reactive<Record<string, any>>({})
|
||||||
|
const isPanelFormValid = ref<boolean>(true)
|
||||||
|
const invalidTextsPanel = reactive<Record<string, any>>({})
|
||||||
|
|
||||||
const FormCheck = (): boolean => {
|
const FormCheck = (): boolean => {
|
||||||
Object.assign(invalidTexts, {})
|
Object.assign(invalidTexts, {})
|
||||||
@ -40,11 +42,41 @@ export const usePiyangoOnayValidationStore = defineStore(
|
|||||||
return isFormValid.value
|
return isFormValid.value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const FormPanelCheck = (): boolean => {
|
||||||
|
Object.assign(invalidTextsPanel, {})
|
||||||
|
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm,
|
||||||
|
invalidTextsPanel,
|
||||||
|
'onayDurumuIslemTipiId',
|
||||||
|
'Bir işlem tipi seçmelisinz.'
|
||||||
|
)
|
||||||
|
if (piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === 4) {
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm,
|
||||||
|
invalidTextsPanel,
|
||||||
|
'izinSayisi',
|
||||||
|
'İzin sayı no girmelisiniz.'
|
||||||
|
)
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm,
|
||||||
|
invalidTextsPanel,
|
||||||
|
'izinTarihi',
|
||||||
|
'İzin tarihi seçmelisiniz.'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
isPanelFormValid.value = Object.keys(invalidTextsPanel).length === 0
|
||||||
|
return isPanelFormValid.value
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
formChanged,
|
formChanged,
|
||||||
isFormValid,
|
isFormValid,
|
||||||
|
isPanelFormValid,
|
||||||
invalidTexts,
|
invalidTexts,
|
||||||
FormCheck
|
invalidTextsPanel,
|
||||||
|
FormCheck,
|
||||||
|
FormPanelCheck
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@ -79,7 +79,7 @@
|
|||||||
<td>
|
<td>
|
||||||
{{
|
{{
|
||||||
globalStore.toTrLocale(
|
globalStore.toTrLocale(
|
||||||
Number(piyangoIkramiyeStore.totalIkramiyeValue) + calculatedKdv
|
Number(calculatedOran) + Number(calculatedKdv)
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user