Compare commits
110 Commits
Dosya-Kapa
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| a10f6997eb | |||
| 2bbb30525e | |||
| 2ecda61ad4 | |||
| 3c4db6d312 | |||
| e9e83827dc | |||
| 1b8c10a8a0 | |||
| 83acb64944 | |||
| cbbd5b2abe | |||
| a75158379d | |||
| 46d0cac892 | |||
| f8a3940643 | |||
| 078a5a020a | |||
| edb1d23d71 | |||
| bf9c2b25f9 | |||
| 4f29c18dab | |||
| 8cfda2449e | |||
| ddd8594372 | |||
| 4a081fe249 | |||
| 9c2f02d617 | |||
| 927cdfd7e8 | |||
| e8f914b321 | |||
| bd93496e4d | |||
| 9da5f9946b | |||
| b0386d53e5 | |||
| f6c1b242b2 | |||
| b422187704 | |||
| 678a96d76f | |||
| cb9d2f220f | |||
| 03689a01e3 | |||
| f31bd6ba9e | |||
| 5fe3a36893 | |||
| 4dae2824fb | |||
| 6d4d0c8be9 | |||
| bf047e36f3 | |||
| 5d49f96c98 | |||
| 3355085a1d | |||
| 095f877224 | |||
| 2b3b09c88b | |||
| 0e3c6e658f | |||
| cab06c51a2 | |||
| 5e83a11ecc | |||
| 07c73d39db | |||
| 6e2f77f576 | |||
| 060cfab843 | |||
| 8cae0be757 | |||
| 4024d539d7 | |||
| 1ba8b9b269 | |||
| da432261ba | |||
| 58cd065977 | |||
| 4f6b14b43c | |||
| 51264f9e72 | |||
| 674c0b2e1e | |||
| e07a867023 | |||
| b31b075e1f | |||
| 76523182da | |||
| fe132ec672 | |||
| 206eb2ab44 | |||
| f7d47af153 | |||
| fb99deeaeb | |||
| c34d64d505 | |||
| 457cb58256 | |||
| eff6b4e27e | |||
| bb2765c0ac | |||
| db77c305ce | |||
| fdc2372288 | |||
| 97f60c8df9 | |||
| 95da9eb689 | |||
| 7379f4ae5e | |||
| 847b1c1b37 | |||
| 62dbaef278 | |||
| aae7512498 | |||
| 75ff9823fe | |||
| 3b9173b881 | |||
| fb1ddf085a | |||
| b1274cf3ab | |||
| 9650194cb9 | |||
| 9e6c1f3840 | |||
| 343e93c168 | |||
| b1c23985ff | |||
| a4358afa11 | |||
| 9869edf4a6 | |||
| 624b8fae56 | |||
| 6c44487489 | |||
| 7353d957c1 | |||
| 915aa1757e | |||
| 10d95b6763 | |||
| 97a77a2a37 | |||
| 2338cf04d8 | |||
| de3a1f549a | |||
| b521ad0278 | |||
| 7872259102 | |||
| 7cff75e82c | |||
| 92d0a0dde7 | |||
| a4e2a922d3 | |||
| 190815193a | |||
| 26f843416d | |||
| 7adabf5abd | |||
| ed8b6fd3eb | |||
| 7776e24ddd | |||
| 408724cf67 | |||
| f4c0511afb | |||
| 7998b7bd6c | |||
| 6ff319cb1d | |||
| 10011eacd6 | |||
| 36d646e0bf | |||
| 908e63b896 | |||
| 0e130eafff | |||
| f6850853b2 | |||
| ff0304b4d9 | |||
| 9a66af25c2 |
2
.env.development
Normal file
2
.env.development
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
VITE_API_URL=http://panelapi.cekilisevitest.gov.tr/
|
||||||
|
VITE_SOCKET_URL=http://panelapi.cekilisevitest.gov.tr/uploadHub
|
||||||
2
.env.localdev
Normal file
2
.env.localdev
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
VITE_API_URL=https://localhost:7241/
|
||||||
|
VITE_SOCKET_URL=https://localhost:7241/uploadHub
|
||||||
2
.env.production
Normal file
2
.env.production
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
VITE_API_URL=https://panelapi.cekilisevi.gov.tr/
|
||||||
|
VITE_SOCKET_URL=https://panelapi.cekilisevi.gov.tr/uploadHub
|
||||||
23
Configs.ts
Normal file
23
Configs.ts
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// build olurken bazı klasorlerin ayri script olarak kaydedilmesi
|
||||||
|
export const TEMPLATE_CHUNK_GROUPS: Record<string, (RegExp | string)[]> = {
|
||||||
|
store: [/\/src\/stores\//],
|
||||||
|
//lott: [/\/src\/module\/cekilisler\//],
|
||||||
|
//user: [/\/src\/module\/kullanicilar\//],
|
||||||
|
//cust: [/\/src\/module\/uyeler\//],
|
||||||
|
//acc: [/\/src\/module\/muhasebe\//],
|
||||||
|
//site: [/\/src\/module\/site-yonetimi\//],
|
||||||
|
//aut: [/\/src\/module\/auth\//]
|
||||||
|
}
|
||||||
|
|
||||||
|
// id -> group_name
|
||||||
|
export function SetTemplateGroup(id: string): string | undefined {
|
||||||
|
const cleanId = id.split('?')[0]
|
||||||
|
for (const [group, pats] of Object.entries(TEMPLATE_CHUNK_GROUPS)) {
|
||||||
|
if (
|
||||||
|
pats.some((p) => (typeof p === 'string' ? cleanId.includes(p) : p.test(cleanId)))
|
||||||
|
) {
|
||||||
|
return group
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
7
env.d.ts
vendored
7
env.d.ts
vendored
@ -1,2 +1,9 @@
|
|||||||
/// <reference types="vite/client" />
|
/// <reference types="vite/client" />
|
||||||
|
|
||||||
|
interface ImportMetaEnv {
|
||||||
|
readonly VITE_API_URL: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface ImportMeta {
|
||||||
|
readonly env: ImportMetaEnv;
|
||||||
|
}
|
||||||
716
package-lock.json
generated
716
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -5,9 +5,12 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
"localdev": "vite --mode localdev",
|
||||||
"build": "run-p type-check \"build-only {@}\" --",
|
"build": "run-p type-check \"build-only {@}\" --",
|
||||||
|
"buildtest": "run-p type-check \"build-only-test {@}\" --",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"build-only": "vite build",
|
"build-only": "vite build",
|
||||||
|
"build-only-test": "vite build --mode development",
|
||||||
"type-check": "vue-tsc --build --force"
|
"type-check": "vue-tsc --build --force"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -18,8 +21,6 @@
|
|||||||
"jquery": "^3.7.1",
|
"jquery": "^3.7.1",
|
||||||
"parchment": "^3.0.0",
|
"parchment": "^3.0.0",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.7",
|
||||||
"quill": "^2.0.3",
|
|
||||||
"quill-image-resize-module": "^3.0.0",
|
|
||||||
"summernote": "^0.9.1",
|
"summernote": "^0.9.1",
|
||||||
"uuid": "^11.1.0",
|
"uuid": "^11.1.0",
|
||||||
"vue": "^3.4.29",
|
"vue": "^3.4.29",
|
||||||
|
|||||||
BIN
public/data/mpi-sablon.zip
Normal file
BIN
public/data/mpi-sablon.zip
Normal file
Binary file not shown.
BIN
public/docs/KVKK_Sartlari.docx
Normal file
BIN
public/docs/KVKK_Sartlari.docx
Normal file
Binary file not shown.
BIN
public/docs/cekilisevi.gov.tr_Uyelik_Sozlesmesi.docx
Normal file
BIN
public/docs/cekilisevi.gov.tr_Uyelik_Sozlesmesi.docx
Normal file
Binary file not shown.
17
public/web.config
Normal file
17
public/web.config
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
<system.webServer>
|
||||||
|
<rewrite>
|
||||||
|
<rules>
|
||||||
|
<rule name="Handle History Mode and custom 404/500" stopProcessing="true">
|
||||||
|
<match url="(.*)" />
|
||||||
|
<conditions logicalGrouping="MatchAll">
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
|
||||||
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
|
||||||
|
</conditions>
|
||||||
|
<action type="Rewrite" url="/" />
|
||||||
|
</rule>
|
||||||
|
</rules>
|
||||||
|
</rewrite>
|
||||||
|
</system.webServer>
|
||||||
|
</configuration>
|
||||||
167
sql_query_updated.sql
Normal file
167
sql_query_updated.sql
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
SELECT c.Id, c.PiyangoId, c.Baslik, ISNULL(c.CreateDate, '0001-01-01') AS OlusturmaTarihi, MIN(ISNULL(cb.BaslangicTarihi, '0001-01-01')) AS BaslangicTarihi, MIN(ISNULL(cb.BitisTarihi, '0001-01-01')) AS BitisTarihi,
|
||||||
|
|
||||||
|
/* DÜZENLEYEN (mevcut)*/ COALESCE (NULLIF (d .DernekUnvan, ''), NULLIF (d .GercekTicariUnvan, ''), NULLIF (d .kamuUnvan, ''), NULLIF (d .SirketUnvan, ''), NULLIF (d .TuzelUnvan, ''), LTRIM(RTRIM(COALESCE (d .GercekAdi,
|
||||||
|
|
||||||
|
'') + ' ' + COALESCE (d .GercekSoyadi, ''))), iblist.IrtibatAdSoyad, 'Bilinmiyor') AS Duzenleyen, ISNULL(d .Id, 0) AS DuzenleyenId,
|
||||||
|
|
||||||
|
/* MÜDÜRLÜK (yeni - 2. başlık)*/
|
||||||
|
CASE
|
||||||
|
WHEN odlast.Mudurluk = 1 THEN '1 No''lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü'
|
||||||
|
WHEN odlast.Mudurluk = 2 THEN '2 No''lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü'
|
||||||
|
WHEN odlast.Mudurluk = 3 THEN '3 No''lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü'
|
||||||
|
ELSE ISNULL(birim.BirimAdi, '')
|
||||||
|
END AS Mudurluk,
|
||||||
|
|
||||||
|
MIN(cy.Deger) AS CekilisYontemi, MIN(cb.CekilisYontemiId) AS CekilisYontemiId, MIN(cb.KatilimciListesiTeslimYontemiId) AS KatilimciListesiTeslimYontemiId, MIN(klt.Deger) AS KatilimciListesiTeslimYontemi, ik.Ikramiyeler,
|
||||||
|
|
||||||
|
ISNULL(odlast.OnayDurumuIslemTipiId, 0) AS DurumId, ISNULL(odlast.IslemTipi, 'Yeni Piyango') AS Durum, MIN(ISNULL(cb.CekilisTarihi, '0001-01-01')) AS CekilisTarihi, ap.AmacAdi AS piyangoamac,
|
||||||
|
|
||||||
|
c.amacpiyangoId AS piyangoAmacId, ISNULL(oc.OnayVerecekKisi1Id, 0) AS OnayVerecekKisi1Id, ISNULL(oc.OnayVerecekKisi2Id, 0) AS OnayVerecekKisi2Id, ISNULL(oc.OnayVerecekKisi3Id, 0) AS OnayVerecekKisi3Id,
|
||||||
|
|
||||||
|
c.izinBedelNo, c.BasvuruBedelNo, c.izinBedeliDurum, c.basvuruBedeliDurum, c.baglisirketId, /* Atanmis (mevcut)*/ CASE WHEN ISNULL(oc.OnayVerecekKisi1Id, 0) > 0 OR
|
||||||
|
|
||||||
|
ISNULL(oc.OnayVerecekKisi2Id, 0) > 0 OR
|
||||||
|
|
||||||
|
ISNULL(oc.OnayVerecekKisi3Id, 0) > 0 THEN CAST(1 AS BIT) ELSE CAST(0 AS BIT) END AS Atanmis, ISNULL(atananlar.AlananIsimler, '') AS Atananlar, /* ARACI FİRMA (yeni - 5. başlık)*/ CASE WHEN EXISTS
|
||||||
|
|
||||||
|
(SELECT 1
|
||||||
|
|
||||||
|
FROM AspNetUserRoles ur INNER JOIN
|
||||||
|
|
||||||
|
AspNetRoles r ON ur.RoleId = r.Id
|
||||||
|
|
||||||
|
WHERE ur.UserId = d .ParentUserId AND r.Name = 'AraciFirma') THEN COALESCE (NULLIF (parentUser.DernekUnvan, ''), NULLIF (parentUser.GercekTicariUnvan, ''), NULLIF (parentUser.kamuUnvan, ''),
|
||||||
|
|
||||||
|
NULLIF (parentUser.SirketUnvan, ''), NULLIF (parentUser.TuzelUnvan, ''), LTRIM(RTRIM(COALESCE (parentUser.GercekAdi, '') + ' ' + COALESCE (parentUser.GercekSoyadi, ''))), '') ELSE '' END AS AraciFirma,
|
||||||
|
|
||||||
|
/* İZİN TARİHİ (yeni - 7. başlık)*/ odlast.IzinTarihi AS IzinTarihi, /* İZİN SAYISI (yeni - 8. başlık)*/ odlast.IzinSayisi AS IzinSayisi,
|
||||||
|
|
||||||
|
/* ÇEKİLİŞ GÖREVLİSİ (yeni - 12. başlık)*/
|
||||||
|
CASE
|
||||||
|
WHEN odlast.CekilisGorevlisi = 1 THEN 'Antalya Şube Müdürlüğü'
|
||||||
|
WHEN odlast.CekilisGorevlisi = 2 THEN 'Gaziantep Şube Müdürlüğü'
|
||||||
|
WHEN odlast.CekilisGorevlisi = 3 THEN 'Aksaray Şube Müdürlüğü'
|
||||||
|
WHEN odlast.CekilisGorevlisi = 4 THEN 'Kadıköy Şube Müdürlüğü'
|
||||||
|
WHEN odlast.CekilisGorevlisi = 5 THEN 'Karşıyaka Şube Müdürlüğü'
|
||||||
|
WHEN odlast.CekilisGorevlisi = 6 THEN 'Muğla Şube Müdürlüğü'
|
||||||
|
WHEN odlast.CekilisGorevlisi = 7 THEN 'Trabzon Şube Müdürlüğü'
|
||||||
|
WHEN odlast.CekilisGorevlisi = 8 THEN 'Noter'
|
||||||
|
WHEN odlast.CekilisGorevlisi = 9 THEN 'Başkanlık Personeli'
|
||||||
|
ELSE COALESCE (LTRIM(RTRIM(COALESCE (personel.GercekAdi, '') + ' ' + COALESCE (personel.GercekSoyadi, ''))), LTRIM(RTRIM(COALESCE (birimSefi.GercekAdi, '') + ' ' + COALESCE (birimSefi.GercekSoyadi, ''))), '')
|
||||||
|
END AS CekilisGorevlisi,
|
||||||
|
|
||||||
|
/* GAZETE İLAN TARİHİ (yeni - 13. başlık)*/ MIN(cb.ilantarihi) AS GazeteIlanTarihi, /* GAZETE ADI (yeni - 14. başlık)*/ MIN(cb.ilanEdilecekGazete)
|
||||||
|
|
||||||
|
AS GazeteAdi, /* KDV Oranı = 0.20 (sabit)*/ CASE WHEN ikramiyeTutar.ToplamTutar IS NOT NULL AND izinBedelOrani.Oran IS NOT NULL THEN CAST((ikramiyeTutar.ToplamTutar * izinBedelOrani.Oran / 100.0)
|
||||||
|
|
||||||
|
* 1.20 AS DECIMAL(18, 2)) ELSE NULL END AS IzinBedeliTutari, /* İKRAMİYE TUTARI (yeni - 16. başlık)*/ ISNULL(ikramiyeTutar.ToplamTutar, 0) AS IkramiyeTutari,
|
||||||
|
|
||||||
|
/* TEMİNAT TARİHİ (yeni - 17. başlık)*/ ts .TeminantDate AS TeminatTarihi, /* TEMİNAT SAYISI (yeni - 18. başlık)*/ ts .TeminantNo AS TeminatSayisi, /* TEMİNAT BANKASI (yeni - 19. başlık)*/ ts .BankName AS TeminatBankasi,
|
||||||
|
|
||||||
|
/* TEMİNAT TUTARI (yeni - 20. başlık)*/ ts .Amount AS TeminatTutari, /* T. PARA CİNSİ (yeni - 21. başlık)*/ ISNULL(paraBirimi.ParaBirimiSembol, '') AS ParaBirimiSembol,
|
||||||
|
|
||||||
|
/* T. İADE TARİHİ (yeni - 22. başlık)*/ ts .RefundDate AS TeminatIadeTarihi, /* T. İADE SAYISI (yeni - 23. başlık)*/ ts .RefundCount AS TeminatIadeSayisi
|
||||||
|
|
||||||
|
FROM Cekilisler c LEFT JOIN
|
||||||
|
|
||||||
|
CekilisBilgiler cb ON cb.CekilisId = c.Id LEFT JOIN
|
||||||
|
|
||||||
|
AspNetUsers d ON d .Id = c.DuzenleyenId LEFT JOIN
|
||||||
|
|
||||||
|
Birimler birim ON birim.Id = d .BirimId /* MÜDÜRLÜK için*/ LEFT JOIN
|
||||||
|
|
||||||
|
AspNetUsers parentUser ON parentUser.Id = d .ParentUserId /* ARACI FİRMA için*/ LEFT JOIN
|
||||||
|
|
||||||
|
AspNetUsers personel ON personel.Id = c.PersonelId /* ÇEKİLİŞ GÖREVLİSİ için*/ LEFT JOIN
|
||||||
|
|
||||||
|
AspNetUsers birimSefi ON birimSefi.Id = c.BirimSefiId /* ÇEKİLİŞ GÖREVLİSİ için*/ LEFT JOIN
|
||||||
|
|
||||||
|
PiyangoAmacs ap ON ap.Id = c.amacpiyangoId LEFT JOIN
|
||||||
|
|
||||||
|
OnayCekilisler oc ON oc.CekilisId = c.Id LEFT JOIN
|
||||||
|
|
||||||
|
CekilisYontemleri cy ON cb.CekilisYontemiId = cy.Id LEFT JOIN
|
||||||
|
|
||||||
|
KatilimciListesiTeslimYontemleri klt ON cb.KatilimciListesiTeslimYontemiId = klt.Id /* APPLY ile son OnayDurumu (İZİN TARİHİ, İZİN SAYISI, MÜDÜRLÜK ve ÇEKİLİŞ GÖREVLİSİ dahil)*/ OUTER APPLY
|
||||||
|
|
||||||
|
(SELECT TOP 1 od.OnayDurumuIslemTipiId, od.IslemTipi, od.IzinTarihi, od.IzinSayisi, od.Mudurluk, od.CekilisGorevlisi
|
||||||
|
|
||||||
|
FROM OnayCekilisler oc2 INNER JOIN
|
||||||
|
|
||||||
|
OnayDurumlari od ON oc2.Id = od.OnayCekilisId
|
||||||
|
|
||||||
|
WHERE oc2.CekilisId = c.Id
|
||||||
|
|
||||||
|
ORDER BY od.Tarih DESC) odlast /* APPLY ile ikramiyeler string*/ OUTER APPLY
|
||||||
|
|
||||||
|
(SELECT STUFF
|
||||||
|
|
||||||
|
((SELECT ', ' + i2.Marka + ' ' + i2.Model
|
||||||
|
|
||||||
|
FROM Ikramiyeler i2
|
||||||
|
|
||||||
|
WHERE i2.CekilisId = c.Id FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 2, '')) ik(Ikramiyeler) /* APPLY ile ikramiye tutarı toplamı*/ OUTER APPLY
|
||||||
|
|
||||||
|
(SELECT SUM(i3.BirimFiyat * i3.AsilTalihliAdedi) AS ToplamTutar
|
||||||
|
|
||||||
|
FROM Ikramiyeler i3
|
||||||
|
|
||||||
|
WHERE i3.CekilisId = c.Id) ikramiyeTutar /* APPLY ile aktif izin bedel oranı (ilk aktif oran)*/ OUTER APPLY
|
||||||
|
|
||||||
|
(SELECT TOP 1 ibo.Oran
|
||||||
|
|
||||||
|
FROM IzinBedelOranlari ibo
|
||||||
|
|
||||||
|
WHERE ibo.Aktif = 1
|
||||||
|
|
||||||
|
ORDER BY ibo.Id) izinBedelOrani /* APPLY ile para birimi sembolü (ilk ikramiyenin para birimi)*/ OUTER APPLY
|
||||||
|
|
||||||
|
(SELECT TOP 1 pb.ParaBirimiSembol
|
||||||
|
|
||||||
|
FROM Ikramiyeler i4 LEFT JOIN
|
||||||
|
|
||||||
|
ParaBirimleri pb ON pb.Id = i4.ParaBirimiId
|
||||||
|
|
||||||
|
WHERE i4.CekilisId = c.Id AND pb.ParaBirimiSembol IS NOT NULL
|
||||||
|
|
||||||
|
ORDER BY i4.Id) paraBirimi /* APPLY ile irtibat bilgileri string*/ OUTER APPLY
|
||||||
|
|
||||||
|
(SELECT STUFF
|
||||||
|
|
||||||
|
((SELECT ', ' + ib2.AdSoyad
|
||||||
|
|
||||||
|
FROM IrtibatBilgiler ib2
|
||||||
|
|
||||||
|
WHERE ib2.CekilisId = c.Id FOR XML PATH(''), TYPE ).value('.', 'NVARCHAR(MAX)'), 1, 2, '')) iblist(IrtibatAdSoyad) /* APPLY ile atanan kullanıcı isimleri*/ OUTER APPLY
|
||||||
|
|
||||||
|
(SELECT STUFF
|
||||||
|
|
||||||
|
((SELECT ', ' + u.GercekAdi + ' ' + u.GercekSoyadi
|
||||||
|
|
||||||
|
FROM AspNetUsers u
|
||||||
|
|
||||||
|
WHERE u.Id IN (ISNULL(oc.OnayVerecekKisi1Id, 0), ISNULL(oc.OnayVerecekKisi2Id, 0), ISNULL(oc.OnayVerecekKisi3Id, 0)) FOR XML PATH(''), TYPE ).value('.',
|
||||||
|
|
||||||
|
'NVARCHAR(MAX)'), 1, 2, '')) atananlar(AlananIsimler) /* APPLY ile teminat bilgileri (son teminat kaydı)*/ OUTER APPLY
|
||||||
|
|
||||||
|
(SELECT TOP 1 ts2.TeminantDate, ts2.TeminantNo, ts2.BankName, ts2.Amount, ts2.RefundDate, ts2.RefundCount
|
||||||
|
|
||||||
|
FROM TeminantStates ts2
|
||||||
|
|
||||||
|
WHERE ts2.CekilisId = c.Id
|
||||||
|
|
||||||
|
ORDER BY ts2.Id DESC) ts
|
||||||
|
|
||||||
|
GROUP BY c.Id, c.PiyangoId, c.Baslik, c.CreateDate, d .DernekUnvan, d .GercekTicariUnvan, d .kamuUnvan, d .SirketUnvan, d .TuzelUnvan, d .GercekAdi, d .GercekSoyadi, d .Id, d .ParentUserId,
|
||||||
|
|
||||||
|
birim.BirimAdi, ap.AmacAdi, c.amacpiyangoId, oc.OnayVerecekKisi1Id, oc.OnayVerecekKisi2Id, oc.OnayVerecekKisi3Id, c.izinBedelNo, c.BasvuruBedelNo, c.izinBedeliDurum,
|
||||||
|
|
||||||
|
c.basvuruBedeliDurum, c.baglisirketId, ik.Ikramiyeler, iblist.IrtibatAdSoyad, odlast.OnayDurumuIslemTipiId, odlast.IslemTipi, odlast.IzinTarihi, odlast.IzinSayisi,
|
||||||
|
|
||||||
|
atananlar.AlananIsimler, personel.GercekAdi, personel.GercekSoyadi, birimSefi.GercekAdi, birimSefi.GercekSoyadi, parentUser.DernekUnvan, parentUser.GercekTicariUnvan,
|
||||||
|
|
||||||
|
parentUser.kamuUnvan, parentUser.SirketUnvan, parentUser.TuzelUnvan, parentUser.GercekAdi, parentUser.GercekSoyadi, ikramiyeTutar.ToplamTutar, izinBedelOrani.Oran,
|
||||||
|
|
||||||
|
paraBirimi.ParaBirimiSembol, ts .TeminantDate, ts .TeminantNo, ts .BankName, ts .Amount, ts .RefundDate, ts .RefundCount, odlast.Mudurluk, odlast.CekilisGorevlisi;
|
||||||
|
|
||||||
|
|
||||||
@ -237,4 +237,28 @@
|
|||||||
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"
|
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>
|
||||||
|
<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>
|
||||||
|
<symbol id="eyeclose" viewBox="0 0 59 22">
|
||||||
|
<path
|
||||||
|
d="M56.61,11.89l2.55-1.57L52.83.03l-2.55,1.57h0s-11.76,7.25-11.76,7.25c-.94.58-1.91,1.05-2.91,1.43l-2.61.74v.02c-2.43.5-4.94.45-7.36-.14l-1.2-.34c-1.28-.41-2.53-.98-3.72-1.71L7.68.82h0s-1.35-.82-1.35-.82L0,10.28l2.55,1.57,4.76-7.73,6.18,3.81-4.79,7.77,2.55,1.57,4.79-7.77,3.09,1.9c1.15.71,2.35,1.28,3.58,1.74l-2.48,8.78,2.89.82,2.48-8.76c1.32.27,2.66.41,4.01.41,1.41,0,2.82-.16,4.2-.46l2.46,8.7,2.89-.82-2.48-8.75c1.16-.44,2.3-.99,3.39-1.66l3.12-1.92,4.79,7.77,2.55-1.57-4.79-7.77,6.08-3.75,4.75,7.72Z" />
|
||||||
|
</symbol>
|
||||||
|
<symbol id="eye" viewBox="0 0 51 24">
|
||||||
|
<path
|
||||||
|
d="M25.59,24.58c-3.62,0-7.24-.99-10.47-2.98L0,12.29,15.11,2.98c6.46-3.98,14.48-3.98,20.94,0l15.11,9.31-15.11,9.31c-3.23,1.99-6.85,2.98-10.47,2.98ZM5.72,12.29l10.97,6.75c5.49,3.38,12.31,3.38,17.8,0l10.97-6.75-10.97-6.75c-5.49-3.38-12.31-3.38-17.8,0l-10.97,6.75Z" />
|
||||||
|
<path
|
||||||
|
d="M25.59,21.71c-5.19,0-9.42-4.23-9.42-9.42S20.39,2.87,25.59,2.87s9.42,4.23,9.42,9.42-4.23,9.42-9.42,9.42ZM25.59,5.87c-3.54,0-6.42,2.88-6.42,6.42s2.88,6.42,6.42,6.42,6.42-2.88,6.42-6.42-2.88-6.42-6.42-6.42Z" />
|
||||||
|
</symbol>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 44 KiB |
@ -454,6 +454,7 @@ label {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
label>span {
|
label>span {
|
||||||
@ -659,7 +660,9 @@ svg {
|
|||||||
max-width: 24px;
|
max-width: 24px;
|
||||||
max-height: 24px;
|
max-height: 24px;
|
||||||
}
|
}
|
||||||
|
.ico-c.ico-btn:hover{
|
||||||
|
background-color: navy;
|
||||||
|
}
|
||||||
/* colors */
|
/* colors */
|
||||||
.back-grad {
|
.back-grad {
|
||||||
padding: 6px 8px;
|
padding: 6px 8px;
|
||||||
@ -715,11 +718,108 @@ svg {
|
|||||||
color: #000;
|
color: #000;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
}
|
}
|
||||||
|
.back-grad-dgrey {
|
||||||
|
background-image: linear-gradient(24deg, #797979, #a1a1a1);
|
||||||
|
color: #000;
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
.back-grey {
|
.back-grey {
|
||||||
background-color: #f1f1f1;
|
background-color: #f1f1f1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* İşlem durumu badge stilleri - basit ve kompakt */
|
||||||
|
.islem-status-badge {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 4px 10px;
|
||||||
|
color: #fff;
|
||||||
|
border-radius: 12px;
|
||||||
|
font-size: 0.875em;
|
||||||
|
font-weight: 500;
|
||||||
|
white-space: nowrap;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-select-list-item .islem-status-badge {
|
||||||
|
display: inline-block;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-select-activator .islem-status-badge {
|
||||||
|
display: inline-block;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Her durum için benzersiz canlı renkler */
|
||||||
|
.islem-status-coral {
|
||||||
|
background: #e74c3c;
|
||||||
|
}
|
||||||
|
.islem-status-amber {
|
||||||
|
background: #f39c12;
|
||||||
|
}
|
||||||
|
.islem-status-sky {
|
||||||
|
background: #3498db;
|
||||||
|
}
|
||||||
|
.islem-status-rose {
|
||||||
|
background: #e91e63;
|
||||||
|
}
|
||||||
|
.islem-status-pink {
|
||||||
|
background: #ec407a;
|
||||||
|
}
|
||||||
|
.islem-status-slate {
|
||||||
|
background: #607d8b;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.islem-status-emerald {
|
||||||
|
background: #27ae60;
|
||||||
|
}
|
||||||
|
.islem-status-red {
|
||||||
|
background: #c0392b;
|
||||||
|
}
|
||||||
|
.islem-status-salmon {
|
||||||
|
background: #e67e22;
|
||||||
|
}
|
||||||
|
.islem-status-mint {
|
||||||
|
background: #2ecc71;
|
||||||
|
}
|
||||||
|
.islem-status-peach {
|
||||||
|
background: #ff9800;
|
||||||
|
}
|
||||||
|
.islem-status-yellow {
|
||||||
|
background: #f1c40f;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.islem-status-teal {
|
||||||
|
background: #1abc9c;
|
||||||
|
}
|
||||||
|
.islem-status-cyan {
|
||||||
|
background: #00bcd4;
|
||||||
|
}
|
||||||
|
.islem-status-orange {
|
||||||
|
background: #ff5722;
|
||||||
|
}
|
||||||
|
.islem-status-blue {
|
||||||
|
background: #2196f3;
|
||||||
|
}
|
||||||
|
.islem-status-gold {
|
||||||
|
background: #ffc107;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
.islem-status-lavender {
|
||||||
|
background: #9c27b0;
|
||||||
|
}
|
||||||
|
.islem-status-violet {
|
||||||
|
background: #673ab7;
|
||||||
|
}
|
||||||
|
.islem-status-crimson {
|
||||||
|
background: #d32f2f;
|
||||||
|
}
|
||||||
|
.islem-status-indigo {
|
||||||
|
background: #3f51b5;
|
||||||
|
}
|
||||||
|
.islem-status-default {
|
||||||
|
background: #757575;
|
||||||
|
}
|
||||||
|
|
||||||
/* login */
|
/* login */
|
||||||
.login-w {
|
.login-w {
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
@ -1146,6 +1246,44 @@ section {
|
|||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.list-wrapper-container {
|
||||||
|
width: 100%;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-wrapper-scrollbar-top {
|
||||||
|
width: 100%;
|
||||||
|
overflow-x: auto;
|
||||||
|
overflow-y: hidden;
|
||||||
|
height: 17px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
display: none;
|
||||||
|
position: relative;
|
||||||
|
z-index: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-wrapper-scrollbar-top .scrollbar-content {
|
||||||
|
height: 1px;
|
||||||
|
width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-wrapper-scrollbar-top::-webkit-scrollbar {
|
||||||
|
height: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-wrapper-scrollbar-top::-webkit-scrollbar-track {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-wrapper-scrollbar-top::-webkit-scrollbar-thumb {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-wrapper-scrollbar-top::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
.list-wrapper {
|
.list-wrapper {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -2155,7 +2293,7 @@ section {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.panel-wrapper {
|
.panel-wrapper {
|
||||||
max-width: 480px;
|
max-width: 600px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-wrapper.panel-wide {
|
.panel-wrapper.panel-wide {
|
||||||
@ -2168,7 +2306,7 @@ section {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.panel-wrapper.panel-right.showme {
|
.panel-wrapper.panel-right.showme {
|
||||||
left: calc(100% - 480px);
|
left: calc(100% - 600px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-wrapper.panel-right.panel-wide.showme {
|
.panel-wrapper.panel-right.panel-wide.showme {
|
||||||
@ -2274,6 +2412,14 @@ section {
|
|||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.list-wrapper-container {
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-wrapper-scrollbar-top {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
.list-wrapper {
|
.list-wrapper {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
overflow-x: visible;
|
overflow-x: visible;
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
</h1>
|
</h1>
|
||||||
<div class="section-header-buttons-c">
|
<div class="section-header-buttons-c">
|
||||||
<icon-button
|
<icon-button
|
||||||
toRoute="/piyangolar/piyango-listesi"
|
@click="goToListWithFilter"
|
||||||
icon="list"
|
icon="list"
|
||||||
iconClass="ico-section ico-section-header-btn" />
|
iconClass="ico-section ico-section-header-btn" />
|
||||||
</div>
|
</div>
|
||||||
@ -60,12 +60,14 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { useDateStore } from '@/stores/dateStore'
|
import { useDateStore } from '@/stores/dateStore'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
import icourl from '@/assets/images/icons.svg'
|
import icourl from '@/assets/images/icons.svg'
|
||||||
|
|
||||||
const dateStore = useDateStore()
|
const dateStore = useDateStore()
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
tableData: Record<string, any>
|
tableData: Record<string, any>[]
|
||||||
lineFunction?: Function
|
lineFunction?: Function
|
||||||
title?: string
|
title?: string
|
||||||
listText?: string
|
listText?: string
|
||||||
@ -76,6 +78,7 @@
|
|||||||
dateKey: string
|
dateKey: string
|
||||||
iconBack: string
|
iconBack: string
|
||||||
total: number
|
total: number
|
||||||
|
filterParams?: Record<string, any>
|
||||||
}>()
|
}>()
|
||||||
const totalData = ref<number>(props.total)
|
const totalData = ref<number>(props.total)
|
||||||
|
|
||||||
@ -92,4 +95,38 @@
|
|||||||
const OnClick = (e: Event, row: object) => {
|
const OnClick = (e: Event, row: object) => {
|
||||||
emit('click', row)
|
emit('click', row)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const goToListWithFilter = () => {
|
||||||
|
try {
|
||||||
|
const query: Record<string, any> = {}
|
||||||
|
|
||||||
|
// Filtre parametrelerini query'ye ekle (Filters[...] formatına dönüştür)
|
||||||
|
if (props.filterParams && typeof props.filterParams === 'object') {
|
||||||
|
Object.keys(props.filterParams).forEach((key) => {
|
||||||
|
const value = props.filterParams![key]
|
||||||
|
if (value !== undefined && value !== null && value !== '') {
|
||||||
|
// Değer zaten operatör içeriyorsa olduğu gibi kullan, yoksa '=' ekle
|
||||||
|
let filterValue = String(value)
|
||||||
|
// Eğer değer zaten operatör içermiyorsa '=' ekle
|
||||||
|
if (!filterValue.match(/^[<>=]/)) {
|
||||||
|
filterValue = '=' + filterValue
|
||||||
|
}
|
||||||
|
// Query parametresine string olarak ekle (Vue Router array'leri yanlış serialize ediyor)
|
||||||
|
query[`Filters[${key}]`] = filterValue
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
router.push({
|
||||||
|
path: '/piyangolar/piyango-listesi',
|
||||||
|
query: query
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
console.error('goToListWithFilter hatası:', error)
|
||||||
|
// Hata durumunda filtre olmadan yönlendir
|
||||||
|
router.push({
|
||||||
|
path: '/piyangolar/piyango-listesi'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="breadcrumb-wrapper">
|
<div class="breadcrumb-wrapper">
|
||||||
<icon-button
|
<icon-button
|
||||||
@click="$router.go(-1)"
|
@click="props.go ? $router.push(go!) : $router.go(-1)"
|
||||||
icon="arrow"
|
icon="arrow"
|
||||||
classList="breadcrumbs-back breadcrumb-link" />
|
classList="breadcrumbs-back breadcrumb-link" />
|
||||||
<div class="breadcrumbs-list">
|
<div class="breadcrumbs-list">
|
||||||
@ -13,5 +13,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
currentPageText: string
|
currentPageText: string
|
||||||
|
go?: string
|
||||||
}>()
|
}>()
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,5 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="list-wrapper">
|
<div class="list-wrapper-container">
|
||||||
|
<div class="list-wrapper-scrollbar-top" ref="scrollbarTopRef">
|
||||||
|
<div class="scrollbar-content"></div>
|
||||||
|
</div>
|
||||||
|
<div class="list-wrapper" ref="listWrapperRef" @scroll="onScroll">
|
||||||
<table class="table-border table-colored table-list">
|
<table class="table-border table-colored table-list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -136,16 +140,21 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<data-table-pagination
|
<data-table-pagination
|
||||||
v-if="pagination !== undefined && showPagination && !isPreview"
|
v-if="pagination !== undefined && showPagination && !isPreview"
|
||||||
v-model:pagination="localPagination" />
|
v-model:pagination="localPagination"
|
||||||
|
:isUseRoute="isUseRoute" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, computed, watch } from 'vue'
|
import { ref, reactive, computed, watch, onMounted, onUnmounted, nextTick } from 'vue'
|
||||||
import type { Ref } from 'vue'
|
import type { Ref } from 'vue'
|
||||||
import { useGlobalStore } from '@/stores/globalStore'
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
import icourl from '@/assets/images/icons.svg'
|
import icourl from '@/assets/images/icons.svg'
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
interface ITableHead {
|
interface ITableHead {
|
||||||
[key: string]: any
|
[key: string]: any
|
||||||
@ -168,7 +177,7 @@
|
|||||||
}
|
}
|
||||||
export interface Props {
|
export interface Props {
|
||||||
tableHeader: ITableHead[]
|
tableHeader: ITableHead[]
|
||||||
tableData: Record<string, any>
|
tableData: Record<string, any>[]
|
||||||
rowAction?: Function | string
|
rowAction?: Function | string
|
||||||
pagination?: IPagination
|
pagination?: IPagination
|
||||||
sortData?: ISort
|
sortData?: ISort
|
||||||
@ -178,12 +187,14 @@
|
|||||||
rowActions?: Record<string, any>[]
|
rowActions?: Record<string, any>[]
|
||||||
actionFixed?: boolean
|
actionFixed?: boolean
|
||||||
rowActionStyle?: string
|
rowActionStyle?: string
|
||||||
|
isUseRoute?: boolean
|
||||||
}
|
}
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
tableData: () => [],
|
tableData: () => [],
|
||||||
rowNumber: false,
|
rowNumber: false,
|
||||||
isPreview: false,
|
isPreview: false,
|
||||||
actionFixed: false
|
actionFixed: false,
|
||||||
|
isUseRoute: false
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['update:sortData', 'update:pagination'])
|
const emit = defineEmits(['update:sortData', 'update:pagination'])
|
||||||
@ -254,9 +265,19 @@
|
|||||||
localSort.value.sortColumn = d.name
|
localSort.value.sortColumn = d.name
|
||||||
localSort.value.sortOrder = 'desc'
|
localSort.value.sortOrder = 'desc'
|
||||||
}
|
}
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
router.push({
|
||||||
|
query: {
|
||||||
|
...route.query,
|
||||||
|
sortColumn: localSort.value.sortColumn,
|
||||||
|
sortOrder: localSort.value.sortOrder
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
emit('update:sortData', localSort.value)
|
emit('update:sortData', localSort.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const CellData = (d: Record<string, any>, key: string): any => {
|
const CellData = (d: Record<string, any>, key: string): any => {
|
||||||
if (d[key] === null) return d
|
if (d[key] === null) return d
|
||||||
else return d[key]
|
else return d[key]
|
||||||
@ -269,6 +290,95 @@
|
|||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
)
|
)
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.tableData,
|
||||||
|
() => {
|
||||||
|
// Tablo verisi değiştiğinde scrollbar'ı güncelle
|
||||||
|
setTimeout(() => {
|
||||||
|
syncScrollbars()
|
||||||
|
}, 100)
|
||||||
|
},
|
||||||
|
{ deep: true }
|
||||||
|
)
|
||||||
|
|
||||||
|
const listWrapperRef = ref<HTMLElement | null>(null)
|
||||||
|
const scrollbarTopRef = ref<HTMLElement | null>(null)
|
||||||
|
|
||||||
|
const onScroll = (e: Event) => {
|
||||||
|
const target = e.target as HTMLElement
|
||||||
|
if (scrollbarTopRef.value) {
|
||||||
|
scrollbarTopRef.value.scrollLeft = target.scrollLeft
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const syncScrollbars = () => {
|
||||||
|
if (listWrapperRef.value && scrollbarTopRef.value) {
|
||||||
|
const table = listWrapperRef.value.querySelector('table')
|
||||||
|
if (table) {
|
||||||
|
const tableWidth = table.scrollWidth
|
||||||
|
const wrapperWidth = listWrapperRef.value.clientWidth
|
||||||
|
|
||||||
|
if (tableWidth > wrapperWidth) {
|
||||||
|
scrollbarTopRef.value.style.display = 'block'
|
||||||
|
scrollbarTopRef.value.scrollLeft = listWrapperRef.value.scrollLeft
|
||||||
|
// Scrollbar wrapper'ın içeriğinin genişliğini tablo genişliğine eşitle
|
||||||
|
const scrollbarContent = scrollbarTopRef.value.querySelector('.scrollbar-content') as HTMLElement | null
|
||||||
|
if (scrollbarContent) {
|
||||||
|
scrollbarContent.style.width = tableWidth + 'px'
|
||||||
|
scrollbarContent.style.height = '1px'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
scrollbarTopRef.value.style.display = 'none'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const onTopScroll = (e: Event) => {
|
||||||
|
const target = e.target as HTMLElement
|
||||||
|
if (listWrapperRef.value) {
|
||||||
|
listWrapperRef.value.scrollLeft = target.scrollLeft
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await nextTick()
|
||||||
|
|
||||||
|
if (scrollbarTopRef.value) {
|
||||||
|
scrollbarTopRef.value.addEventListener('scroll', onTopScroll)
|
||||||
|
}
|
||||||
|
|
||||||
|
// İlk scrollbar senkronizasyonu
|
||||||
|
setTimeout(() => {
|
||||||
|
syncScrollbars()
|
||||||
|
}, 100)
|
||||||
|
|
||||||
|
const resizeObserver = new ResizeObserver(() => {
|
||||||
|
syncScrollbars()
|
||||||
|
})
|
||||||
|
|
||||||
|
if (listWrapperRef.value) {
|
||||||
|
resizeObserver.observe(listWrapperRef.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
const tableObserver = new MutationObserver(() => {
|
||||||
|
syncScrollbars()
|
||||||
|
})
|
||||||
|
|
||||||
|
if (listWrapperRef.value) {
|
||||||
|
const table = listWrapperRef.value.querySelector('table')
|
||||||
|
if (table) {
|
||||||
|
tableObserver.observe(table, { childList: true, subtree: true, attributes: true })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
if (scrollbarTopRef.value) {
|
||||||
|
scrollbarTopRef.value.removeEventListener('scroll', onTopScroll)
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.action-fixed {
|
.action-fixed {
|
||||||
|
|||||||
@ -29,10 +29,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed } from 'vue'
|
import { ref, onBeforeMount, watch } from 'vue'
|
||||||
import type { Ref } from 'vue'
|
import type { Ref } from 'vue'
|
||||||
import { useGlobalStore } from '@/stores/globalStore'
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
import { useValidationStore } from '@/stores/validationStore'
|
import { useValidationStore } from '@/stores/validationStore'
|
||||||
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
const validationStore = useValidationStore()
|
const validationStore = useValidationStore()
|
||||||
@ -45,9 +48,11 @@
|
|||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
pagination: IPagination
|
pagination: IPagination
|
||||||
|
isUseRoute?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
isUseRoute: false
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['update:pagination'])
|
const emit = defineEmits(['update:pagination'])
|
||||||
@ -66,23 +71,53 @@
|
|||||||
if (Number(pageNumber.value) < totalPage()) pageNumber.value++
|
if (Number(pageNumber.value) < totalPage()) pageNumber.value++
|
||||||
}
|
}
|
||||||
localPagination.value.pageNumber = pageNumber.value
|
localPagination.value.pageNumber = pageNumber.value
|
||||||
|
IfRouteUsing()
|
||||||
emit('update:pagination', localPagination.value)
|
emit('update:pagination', localPagination.value)
|
||||||
}
|
}
|
||||||
|
const IfRouteUsing = () => {
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
router.push({
|
||||||
|
query: {
|
||||||
|
...route.query,
|
||||||
|
pageNumber: pageNumber.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
const InputPageControl = (e: Event) => {
|
const InputPageControl = (e: Event) => {
|
||||||
if (Number((e.target as HTMLInputElement).value) < 1)
|
if (Number((e.target as HTMLInputElement).value) < 1)
|
||||||
(e.target as HTMLInputElement).value = '1'
|
(e.target as HTMLInputElement).value = '1'
|
||||||
if (Number((e.target as HTMLInputElement).value) > totalPage())
|
if (Number((e.target as HTMLInputElement).value) > totalPage())
|
||||||
(e.target as HTMLInputElement).value = String(totalPage())
|
(e.target as HTMLInputElement).value = String(totalPage())
|
||||||
pageNumber.value = Number((e.target as HTMLInputElement).value)
|
pageNumber.value = Number((e.target as HTMLInputElement).value)
|
||||||
|
if ((e as KeyboardEvent).key === 'Enter') getPage()
|
||||||
if((e as KeyboardEvent).key === 'Enter') getPage()
|
|
||||||
}
|
}
|
||||||
const PageNumberFocus = (e: Event) => {
|
const PageNumberFocus = (e: Event) => {
|
||||||
;(e.target as HTMLInputElement).select()
|
;(e.target as HTMLInputElement).select()
|
||||||
}
|
}
|
||||||
const getPage = () => {
|
const getPage = () => {
|
||||||
localPagination.value.pageNumber = pageNumber.value
|
localPagination.value.pageNumber = pageNumber.value
|
||||||
|
IfRouteUsing()
|
||||||
emit('update:pagination', localPagination.value)
|
emit('update:pagination', localPagination.value)
|
||||||
}
|
}
|
||||||
|
const SetPageNumber = () => {
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
if (route.query.pageNumber !== undefined && route.query.pageNumber !== '') {
|
||||||
|
localPagination.value.pageNumber = pageNumber.value = Number(
|
||||||
|
route.query.pageNumber
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
localPagination.value.pageNumber = pageNumber.value = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onBeforeMount(() => {
|
||||||
|
SetPageNumber()
|
||||||
|
})
|
||||||
|
watch(
|
||||||
|
() => route.query.pageNumber,
|
||||||
|
() => {
|
||||||
|
SetPageNumber()
|
||||||
|
}
|
||||||
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -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: () => {
|
||||||
|
|||||||
@ -18,14 +18,17 @@
|
|||||||
{{ fileName }}
|
{{ fileName }}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
<div class="actions-c" v-if="editable || $slots.actionButtons">
|
||||||
|
<slot name="actionButtons"></slot>
|
||||||
<i
|
<i
|
||||||
class="ico-c ico-section ico-section-header-btn ico-replace"
|
class="ico-c ico-section ico-btn back-grad-dgrey"
|
||||||
@click="OnClick"
|
@click="OnClick"
|
||||||
v-if="editable">
|
v-if="editable">
|
||||||
<svg><use href="/src/assets/images/icons.svg#replace"></use></svg>
|
<svg><use href="/src/assets/images/icons.svg#replace"></use></svg>
|
||||||
</i>
|
</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div class="form-item-picture only-image clickable">
|
<div class="form-item-picture only-image clickable">
|
||||||
@ -35,13 +38,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else>{{ fileType.toLocaleUpperCase() }}</div>
|
<div v-else>{{ fileType.toLocaleUpperCase() }}</div>
|
||||||
</a>
|
</a>
|
||||||
|
<div class="actions-c actions-top" v-if="editable || $slots.actionButtons">
|
||||||
|
<slot name="actionButtons"></slot>
|
||||||
<i
|
<i
|
||||||
class="ico-c ico-section ico-section-header-btn ico-replace"
|
class="ico-c ico-section ico-btn back-grad-dgrey"
|
||||||
@click="OnClick"
|
@click="OnClick"
|
||||||
v-if="editable">
|
v-if="editable">
|
||||||
<svg><use href="/src/assets/images/icons.svg#replace"></use></svg>
|
<svg><use href="/src/assets/images/icons.svg#replace"></use></svg>
|
||||||
</i>
|
</i>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -75,8 +81,8 @@
|
|||||||
|
|
||||||
if (props.filePath !== undefined && props.filePath !== null) {
|
if (props.filePath !== undefined && props.filePath !== null) {
|
||||||
localFilePath.value = props.usePath
|
localFilePath.value = props.usePath
|
||||||
? props.filePath as string
|
? (props.filePath as string)
|
||||||
: (axios.defaults.baseURL as string + props.filePath as string) as string
|
: (((axios.defaults.baseURL as string) + props.filePath) as string as string)
|
||||||
|
|
||||||
fileType.value = globalStore.FileType(localFilePath.value)
|
fileType.value = globalStore.FileType(localFilePath.value)
|
||||||
fileName.value = globalStore.FileName(localFilePath.value)
|
fileName.value = globalStore.FileName(localFilePath.value)
|
||||||
@ -96,8 +102,29 @@
|
|||||||
() => props.filePath,
|
() => props.filePath,
|
||||||
() => {
|
() => {
|
||||||
localFilePath.value = props.usePath
|
localFilePath.value = props.usePath
|
||||||
? props.filePath as string
|
? (props.filePath as string)
|
||||||
: (axios.defaults.baseURL as string + props.filePath as string) as string
|
: (((axios.defaults.baseURL as string) + props.filePath) as string as string)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.actions-c {
|
||||||
|
display: flex;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
height: 100%;
|
||||||
|
padding: 8px;
|
||||||
|
align-items: center;
|
||||||
|
pointer-events: fill;
|
||||||
|
}
|
||||||
|
.actions-c.actions-top{
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
.form-item-picture.only-image{
|
||||||
|
width: 140px;
|
||||||
|
height: 140px;
|
||||||
|
}
|
||||||
|
.actions-c .ico-btn:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@ -14,7 +14,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<template v-if="modelText !== undefined && modelText !== ''">
|
<template v-if="modelText !== undefined && modelText !== ''">
|
||||||
<template v-if="typeof modelText === 'string'">
|
<template v-if="typeof modelText === 'string'">
|
||||||
<span>{{ price ? globalStore.toTrLocale(modelText) : modelText }}</span>
|
<span :class="[size ? 'form-item-size form-item-size-' + size : '']">
|
||||||
|
{{ price ? globalStore.toTrLocale(modelText) : modelText }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="typeof modelText === 'object'">
|
<template v-if="typeof modelText === 'object'">
|
||||||
<ul>
|
<ul>
|
||||||
@ -25,7 +27,9 @@
|
|||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<span>{{ price ? globalStore.toTrLocale(localValue) : localValue }}</span>
|
<span :class="[size ? 'form-item-size form-item-size-' + size : '']">
|
||||||
|
{{ price ? globalStore.toTrLocale(localValue) : localValue }}
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<span
|
<span
|
||||||
class="form-item-alert"
|
class="form-item-alert"
|
||||||
@ -64,6 +68,7 @@
|
|||||||
modelText?: any
|
modelText?: any
|
||||||
invalidText?: string
|
invalidText?: string
|
||||||
price?: boolean
|
price?: boolean
|
||||||
|
size?: number | string
|
||||||
}
|
}
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
half: false,
|
half: false,
|
||||||
@ -71,13 +76,23 @@
|
|||||||
})
|
})
|
||||||
const localValue = ref<any>(props.modelValue)
|
const localValue = ref<any>(props.modelValue)
|
||||||
|
|
||||||
if (props.type === 'date' && props.modelValue !== null && props.modelValue !== undefined && props.modelValue !== '')
|
if (
|
||||||
|
props.type === 'date' &&
|
||||||
|
props.modelValue !== null &&
|
||||||
|
props.modelValue !== undefined &&
|
||||||
|
props.modelValue !== ''
|
||||||
|
)
|
||||||
localValue.value = dateStore.dateFormat({
|
localValue.value = dateStore.dateFormat({
|
||||||
date: props.modelValue as Date,
|
date: props.modelValue as Date,
|
||||||
pattern: 'dd-mm-yy'
|
pattern: 'dd-mm-yy'
|
||||||
})
|
})
|
||||||
|
|
||||||
if (props.type === 'datetime' && props.modelValue !== null && props.modelValue !== undefined && props.modelValue !== '')
|
if (
|
||||||
|
props.type === 'datetime' &&
|
||||||
|
props.modelValue !== null &&
|
||||||
|
props.modelValue !== undefined &&
|
||||||
|
props.modelValue !== ''
|
||||||
|
)
|
||||||
localValue.value = dateStore.dateFormat({
|
localValue.value = dateStore.dateFormat({
|
||||||
date: props.modelValue as Date,
|
date: props.modelValue as Date,
|
||||||
pattern: 'dd-mm-yy-t'
|
pattern: 'dd-mm-yy-t'
|
||||||
@ -108,3 +123,14 @@
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.form-item-size {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.form-item-size-1 {
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
.form-item-size-2 {
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<input
|
<input
|
||||||
:value="modelValue"
|
:value="modelValue"
|
||||||
:type="type"
|
:type="inputType"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
@input="OnInput"
|
@input="OnInput"
|
||||||
@ -22,12 +22,24 @@
|
|||||||
@keyup="OnKeyUp"
|
@keyup="OnKeyUp"
|
||||||
:class="[
|
:class="[
|
||||||
invalidText !== undefined && invalidText !== '' ? 'invalid' : '',
|
invalidText !== undefined && invalidText !== '' ? 'invalid' : '',
|
||||||
iclass || ''
|
iclass || '',
|
||||||
|
isPasswordVisible || props.type === 'password' ? 'password-visible' : ''
|
||||||
]"
|
]"
|
||||||
:min="min"
|
:min="min"
|
||||||
:max="max"
|
:max="max"
|
||||||
:minlength="minlength"
|
:minlength="minlength"
|
||||||
:maxlength="maxlength" />
|
:maxlength="maxlength" />
|
||||||
|
<i
|
||||||
|
class="ico-c ico-password-visible"
|
||||||
|
v-if="props.type === 'password'"
|
||||||
|
@click="PasswordVisibleToggle">
|
||||||
|
<svg>
|
||||||
|
<use
|
||||||
|
:href="
|
||||||
|
'/src/assets/images/icons.svg#' + (isPasswordVisible ? 'eye' : 'eyeclose')
|
||||||
|
"></use>
|
||||||
|
</svg>
|
||||||
|
</i>
|
||||||
<span
|
<span
|
||||||
class="form-item-alert"
|
class="form-item-alert"
|
||||||
v-if="InvalidMessages.length > 0 && InvalidMessages !== ''">
|
v-if="InvalidMessages.length > 0 && InvalidMessages !== ''">
|
||||||
@ -82,9 +94,18 @@
|
|||||||
'keydown',
|
'keydown',
|
||||||
'keyup'
|
'keyup'
|
||||||
])
|
])
|
||||||
const localValue = ref<any>()
|
const isPasswordVisible = ref<boolean>(false)
|
||||||
const InvalidMessageText = reactive<Record<string, any>>({})
|
const InvalidMessageText = reactive<Record<string, any>>({})
|
||||||
|
|
||||||
|
const inputType = computed(() => {
|
||||||
|
if (props.type !== 'password') {
|
||||||
|
return props.type
|
||||||
|
} else {
|
||||||
|
if (isPasswordVisible.value) return 'text'
|
||||||
|
else return 'password'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const InvalidMessages = computed<string>(() => {
|
const InvalidMessages = computed<string>(() => {
|
||||||
let text = ''
|
let text = ''
|
||||||
Object.keys(InvalidMessageText).forEach((k: string, i: number) => {
|
Object.keys(InvalidMessageText).forEach((k: string, i: number) => {
|
||||||
@ -138,7 +159,9 @@
|
|||||||
emit('update:modelValue', (e.target as HTMLInputElement).value)
|
emit('update:modelValue', (e.target as HTMLInputElement).value)
|
||||||
emit('keyup', e)
|
emit('keyup', e)
|
||||||
}
|
}
|
||||||
|
const PasswordVisibleToggle = () => {
|
||||||
|
if (props.type === 'password') isPasswordVisible.value = !isPasswordVisible.value
|
||||||
|
}
|
||||||
watch(
|
watch(
|
||||||
() => props.invalidText,
|
() => props.invalidText,
|
||||||
() => {
|
() => {
|
||||||
@ -151,3 +174,16 @@
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.ico-password-visible {
|
||||||
|
position: absolute;
|
||||||
|
right: 8px;
|
||||||
|
top: 32px;
|
||||||
|
min-width: 32px;
|
||||||
|
min-height: 32px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.password-visible {
|
||||||
|
padding: 8px 40px 8px 8px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@ -1,210 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div :class="['form-item', half ? 'form-item-half' : '', elclass || '']">
|
|
||||||
<span class="form-item-title" v-if="title !== undefined && title !== ''">
|
|
||||||
{{ title }}
|
|
||||||
</span>
|
|
||||||
<slot name="input">
|
|
||||||
<label>
|
|
||||||
<span v-if="label !== undefined && label !== ''">
|
|
||||||
{{ label }}
|
|
||||||
<i v-if="required" class="form-item-alert">*</i>
|
|
||||||
</span>
|
|
||||||
<div :ref="'quillContainer' + rnd"></div>
|
|
||||||
<span
|
|
||||||
class="form-item-alert"
|
|
||||||
v-if="InvalidMessages.length > 0 && InvalidMessages !== ''">
|
|
||||||
{{ InvalidMessages }}
|
|
||||||
</span>
|
|
||||||
<span
|
|
||||||
class="form-item-description"
|
|
||||||
v-if="description !== undefined && description !== ''">
|
|
||||||
{{ description }}
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
</slot>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref, reactive, computed, onMounted, useTemplateRef, watch } from 'vue'
|
|
||||||
import Quill from 'quill'
|
|
||||||
import 'quill/dist/quill.snow.css'
|
|
||||||
|
|
||||||
declare const window: any
|
|
||||||
|
|
||||||
window.Quill = Quill
|
|
||||||
|
|
||||||
export interface Props {
|
|
||||||
label?: string
|
|
||||||
disabled?: boolean
|
|
||||||
modelValue: string
|
|
||||||
half?: boolean
|
|
||||||
title?: string
|
|
||||||
invalidText?: string
|
|
||||||
description?: string
|
|
||||||
placeholder?: string
|
|
||||||
required?: boolean
|
|
||||||
maxlength?: string
|
|
||||||
minlength?: string
|
|
||||||
iclass?: string
|
|
||||||
elclass?: string
|
|
||||||
modelKey?: string
|
|
||||||
}
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
|
||||||
disabled: false,
|
|
||||||
half: false,
|
|
||||||
required: false,
|
|
||||||
placeholder: ''
|
|
||||||
})
|
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue', 'change', 'text-change'])
|
|
||||||
const rnd = ref<number>(Number(Math.random() * 10000000))
|
|
||||||
|
|
||||||
const toolbar = ref<any[]>([
|
|
||||||
[{ font: [] }, { size: [] }],
|
|
||||||
['bold', 'italic', 'underline', 'strike'],
|
|
||||||
[{ color: [] }, { background: [] }],
|
|
||||||
[{ script: 'super' }, { script: 'sub' }],
|
|
||||||
[{ header: '1' }, { header: '2' }, 'blockquote'],
|
|
||||||
[{ list: 'ordered' }, { list: 'bullet' }, { indent: '-1' }, { indent: '+1' }],
|
|
||||||
[{ align: [] }],
|
|
||||||
['link', 'image', 'video'],
|
|
||||||
['clean']
|
|
||||||
])
|
|
||||||
|
|
||||||
const options = reactive<Record<string, any>>({
|
|
||||||
theme: 'snow',
|
|
||||||
modules: {
|
|
||||||
toolbar: toolbar.value,
|
|
||||||
imageResize: {
|
|
||||||
modules: ['Resize', 'DisplaySize', 'Toolbar']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
placeholder: props.placeholder,
|
|
||||||
readOnly: false,
|
|
||||||
debug: false
|
|
||||||
})
|
|
||||||
|
|
||||||
const QuillImageResize = ref<any>()
|
|
||||||
|
|
||||||
const editor = useTemplateRef<any>('quillContainer' + rnd.value)
|
|
||||||
const quill = ref<Quill | null>(null)
|
|
||||||
|
|
||||||
const localValue = ref<string>(props.modelValue)
|
|
||||||
|
|
||||||
const InvalidMessageText = ref<Record<string, any>>({})
|
|
||||||
const InvalidMessages = computed(() => {
|
|
||||||
let text = ''
|
|
||||||
Object.keys(InvalidMessageText.value).forEach((k: string, i: number) => {
|
|
||||||
text += InvalidMessageText.value[k] + ', '
|
|
||||||
})
|
|
||||||
return text
|
|
||||||
})
|
|
||||||
|
|
||||||
const OnTextChange = (e: any) => {
|
|
||||||
if (props.minlength !== undefined) {
|
|
||||||
if (localValue.value.length < Number(props.minlength)) {
|
|
||||||
InvalidMessageText.value.minlength = `Girdiğiniz bilgi en az ${props.minlength} karakter uzunluğunda olmalı`
|
|
||||||
} else {
|
|
||||||
delete InvalidMessageText.value.minlength
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (quill.value !== null) {
|
|
||||||
localValue.value = quill.value!.container.querySelector('.ql-editor')!.innerHTML
|
|
||||||
}
|
|
||||||
|
|
||||||
emit('update:modelValue', localValue.value)
|
|
||||||
emit('change', e)
|
|
||||||
}
|
|
||||||
|
|
||||||
const InitializeEditor = async () => {
|
|
||||||
await setupQuillEditor()
|
|
||||||
SetContent()
|
|
||||||
RegisterEditorEventListeners()
|
|
||||||
}
|
|
||||||
|
|
||||||
const SetContent = () => {
|
|
||||||
if (props.modelValue) quill.value!.root.innerHTML = props.modelValue
|
|
||||||
}
|
|
||||||
|
|
||||||
const setupQuillEditor = async () => {
|
|
||||||
//let Parchment = Quill.import('parchment')
|
|
||||||
|
|
||||||
window.Quill.imports.parchment.Attributor.Style =
|
|
||||||
window.Quill.imports.parchment.StyleAttributor
|
|
||||||
|
|
||||||
//@ts-ignore
|
|
||||||
QuillImageResize.value = await import('quill-image-resize-module')
|
|
||||||
|
|
||||||
quill.value = new Quill(editor.value, options) as Quill
|
|
||||||
;(quill.value!.getModule('toolbar') as Record<
|
|
||||||
string,
|
|
||||||
any
|
|
||||||
>)!.container.addEventListener('mousedown', (e: Event) => {
|
|
||||||
e.preventDefault()
|
|
||||||
})
|
|
||||||
;(quill.value!.getModule('toolbar') as Record<
|
|
||||||
string,
|
|
||||||
any
|
|
||||||
>)!.container.addEventListener('click', (e: Event) => {
|
|
||||||
if ((e.target as HTMLElement).className !== 'ql-image') e.preventDefault()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const RegisterEditorEventListeners = () => {
|
|
||||||
quill.value!.on('text-change', OnTextChange)
|
|
||||||
quill.value!.on('editor-change', OnTextChange)
|
|
||||||
//image resize imaja tıklandığını anlamıyor.
|
|
||||||
quill.value!.root.addEventListener('mouseover', OnMouseOver, false)
|
|
||||||
ListenForEditorEvent('text-change')
|
|
||||||
}
|
|
||||||
const ListenForEditorEvent = (type: any) => {
|
|
||||||
quill.value!.on(type, (...args) => {
|
|
||||||
emit(type, ...args)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const OnMouseOver = (e: Event) => {
|
|
||||||
if (
|
|
||||||
(e.target as HTMLElement)!.firstChild &&
|
|
||||||
((e.target as HTMLElement)!.firstChild as HTMLElement)!.tagName &&
|
|
||||||
((e.target as HTMLElement)!.firstChild as HTMLElement)!.tagName.toUpperCase() ===
|
|
||||||
'IMG'
|
|
||||||
) {
|
|
||||||
;(e.target as HTMLElement)!.classList.add('remove-click-p')
|
|
||||||
;((e.target as HTMLElement)!.firstChild as HTMLElement)!.classList.add(
|
|
||||||
'add-click-img'
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
InitializeEditor()
|
|
||||||
})
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => props.invalidText,
|
|
||||||
() => {
|
|
||||||
if (props.invalidText !== undefined && props.invalidText !== '') {
|
|
||||||
InvalidMessageText.value.invalid = props.invalidText
|
|
||||||
} else {
|
|
||||||
delete InvalidMessageText.value.invalid
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
</script>
|
|
||||||
<style>
|
|
||||||
.ql-toolbar {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.ql-container {
|
|
||||||
width: 100%;
|
|
||||||
min-height: 120px;
|
|
||||||
}
|
|
||||||
.remove-click-p {
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.add-click-img {
|
|
||||||
pointer-events: all;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -142,7 +142,7 @@
|
|||||||
multipleText: 'Tümü'
|
multipleText: 'Tümü'
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['update:modelValue', 'change','clear'])
|
const emit = defineEmits(['update:modelValue', 'change', 'clear'])
|
||||||
|
|
||||||
const activated = ref<Boolean>(false)
|
const activated = ref<Boolean>(false)
|
||||||
const multipleAllSelected = ref<boolean>(false)
|
const multipleAllSelected = ref<boolean>(false)
|
||||||
@ -214,9 +214,8 @@
|
|||||||
} else {
|
} else {
|
||||||
let text = props.listData.filter((v: Record<string, any>) => {
|
let text = props.listData.filter((v: Record<string, any>) => {
|
||||||
let val = props.listVal !== undefined ? v[props.listVal] : v
|
let val = props.listVal !== undefined ? v[props.listVal] : v
|
||||||
return localValue.value === val
|
return String(localValue.value) === String(val)
|
||||||
})[0]
|
})[0]
|
||||||
|
|
||||||
return text !== undefined
|
return text !== undefined
|
||||||
? props.listText !== undefined
|
? props.listText !== undefined
|
||||||
? text[props.listText]
|
? text[props.listText]
|
||||||
@ -357,7 +356,7 @@
|
|||||||
|
|
||||||
const SetSelectedOption = () => {
|
const SetSelectedOption = () => {
|
||||||
selectedOption.value = props.listData.filter((v: Record<string, any>) => {
|
selectedOption.value = props.listData.filter((v: Record<string, any>) => {
|
||||||
return v[props.listVal as string] === props.modelValue
|
return String(v[props.listVal as string]) === String(props.modelValue)
|
||||||
})[0]
|
})[0]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -61,7 +61,7 @@
|
|||||||
@click="exportPanel = !exportPanel"
|
@click="exportPanel = !exportPanel"
|
||||||
icon="export" />
|
icon="export" />
|
||||||
<icon-button
|
<icon-button
|
||||||
v-if="filterable()"
|
v-if="filterable"
|
||||||
classList="ico-section ico-section-header-btn"
|
classList="ico-section ico-section-header-btn"
|
||||||
@click="OpenFilterPanel"
|
@click="OpenFilterPanel"
|
||||||
icon="filter" />
|
icon="filter" />
|
||||||
@ -85,7 +85,7 @@
|
|||||||
page === 'list' ? 'section-content section-inner' : '',
|
page === 'list' ? 'section-content section-inner' : '',
|
||||||
page === 'form' ? 'form-part-content' : ''
|
page === 'form' ? 'form-part-content' : ''
|
||||||
]">
|
]">
|
||||||
<div class="list-filter-wrapper" v-if="filters() || searched">
|
<div class="list-filter-wrapper" v-if="haveFilter || searched">
|
||||||
<h4>Filtreler ve Arama</h4>
|
<h4>Filtreler ve Arama</h4>
|
||||||
<div class="list-filter-content">
|
<div class="list-filter-content">
|
||||||
<template v-if="localQuery !== ''">
|
<template v-if="localQuery !== ''">
|
||||||
@ -97,15 +97,22 @@
|
|||||||
<span class="list-filter-close" @click="RemoveSearch"></span>
|
<span class="list-filter-close" @click="RemoveSearch"></span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="(filter, k) in filterParams">
|
<template v-for="(filterA, index) in filterParams" :key="index">
|
||||||
<div class="list-filter-item" data-filter="durum-onaylanmis">
|
<template v-for="(filter, filterIndex) in filterA.values" :key="filterIndex">
|
||||||
<strong>{{ filter.title }}:</strong>
|
<div
|
||||||
|
class="list-filter-item"
|
||||||
|
data-filter="durum-onaylanmis"
|
||||||
|
v-if="filterA.filter && (filter.text !== '' || filter.val !== '')">
|
||||||
|
<strong>{{ filterA.title }}:</strong>
|
||||||
<span>
|
<span>
|
||||||
{{ filter.text || filter.val }} {{ filter.op === '=' ? '' : filter.op }}
|
{{ filter.text || filter.val }} {{ filter.op === '=' ? '' : filter.op }}
|
||||||
</span>
|
</span>
|
||||||
<span class="list-filter-close" @click="RemoveFilterKey(k as string)"></span>
|
<span
|
||||||
|
class="list-filter-close"
|
||||||
|
@click="RemoveFilterKey(index, filterIndex)"></span>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<slot name="datatable">
|
<slot name="datatable">
|
||||||
@ -120,13 +127,14 @@
|
|||||||
:isPreview="isPreview"
|
:isPreview="isPreview"
|
||||||
:rowActions="rowActions"
|
:rowActions="rowActions"
|
||||||
:actionFixed="actionFixed"
|
:actionFixed="actionFixed"
|
||||||
:rowActionStyle="rowActionStyle" />
|
:rowActionStyle="rowActionStyle"
|
||||||
|
:isUseRoute="isUseRoute" />
|
||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<panel-wrapper v-if="filterPanel" v-model="filterPanel" :panel-title="'Filtreleme'">
|
<panel-wrapper v-if="filterPanel" v-model="filterPanel" :panel-title="'Filtreleme'">
|
||||||
<template #panelContent>
|
<template #panelContent>
|
||||||
<panel-filter :filterHead="tableHeader" v-model:filterParams="localFilterParams" />
|
<panel-filter :filterHead="tableHeader" :filterParams="localFilterParams" />
|
||||||
</template>
|
</template>
|
||||||
<template #footerButton>
|
<template #footerButton>
|
||||||
<div class="button-c button-save" @click="FilterData">Filtrele</div>
|
<div class="button-c button-save" @click="FilterData">Filtrele</div>
|
||||||
@ -140,8 +148,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onBeforeMount, watch, computed } from 'vue'
|
import { ref, reactive, onBeforeMount, watch, computed, nextTick } from 'vue'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
import { useGlobalStore } from '@/stores/globalStore'
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
@ -161,6 +172,7 @@
|
|||||||
computeHtml?: Function
|
computeHtml?: Function
|
||||||
sort?: boolean
|
sort?: boolean
|
||||||
filter?: Record<string, any>
|
filter?: Record<string, any>
|
||||||
|
style?: Record<string, any>
|
||||||
}
|
}
|
||||||
interface IPagination {
|
interface IPagination {
|
||||||
[key: string]: any
|
[key: string]: any
|
||||||
@ -199,7 +211,8 @@
|
|||||||
isPreview?: boolean
|
isPreview?: boolean
|
||||||
rowActions?: Record<string, any>[]
|
rowActions?: Record<string, any>[]
|
||||||
actionFixed?: boolean
|
actionFixed?: boolean
|
||||||
rowActionStyle?:string
|
rowActionStyle?: string
|
||||||
|
isUseRoute?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
@ -212,7 +225,8 @@
|
|||||||
search: true,
|
search: true,
|
||||||
rowNumber: false,
|
rowNumber: false,
|
||||||
isPreview: false,
|
isPreview: false,
|
||||||
actionFixed:false
|
actionFixed: false,
|
||||||
|
isUseRoute: false
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits([
|
const emit = defineEmits([
|
||||||
@ -237,6 +251,7 @@
|
|||||||
const localPagination = ref<IPagination>({} as IPagination)
|
const localPagination = ref<IPagination>({} as IPagination)
|
||||||
const localTotalValues = reactive<Record<string, any>>({})
|
const localTotalValues = reactive<Record<string, any>>({})
|
||||||
const searchFieldPos = ref<string>('')
|
const searchFieldPos = ref<string>('')
|
||||||
|
const localLoaded = ref<boolean>(false)
|
||||||
|
|
||||||
if (props.totalValues !== undefined) Object.assign(localTotalValues, props.totalValues)
|
if (props.totalValues !== undefined) Object.assign(localTotalValues, props.totalValues)
|
||||||
|
|
||||||
@ -249,11 +264,10 @@
|
|||||||
const localTotalRecord = ref<string | number>(0)
|
const localTotalRecord = ref<string | number>(0)
|
||||||
if (props.totalRecord !== undefined) localTotalRecord.value = props.totalRecord
|
if (props.totalRecord !== undefined) localTotalRecord.value = props.totalRecord
|
||||||
|
|
||||||
const localFilterParams = ref<Record<string, any>>({})
|
const localFilterParams = ref<Record<string, any>[]>([])
|
||||||
const filterParams = reactive<Record<string, any>>({})
|
const filterParams = ref<Record<string, any>[]>([])
|
||||||
|
|
||||||
const OpenFilterPanel = () => {
|
const OpenFilterPanel = () => {
|
||||||
Object.assign(localFilterParams.value, filterParams)
|
|
||||||
filterPanel.value = true
|
filterPanel.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -262,10 +276,74 @@
|
|||||||
if (dest[keys] === undefined) delete source[keys]
|
if (dest[keys] === undefined) delete source[keys]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const CreateFilterData = () => {
|
||||||
|
props.tableHeader.forEach((d: Record<string, any>, ind: number) => {
|
||||||
|
if (d.filter !== undefined) {
|
||||||
|
const filterKey = d.filter.filterId || d.name
|
||||||
|
const filterItem: Record<string, any> = {}
|
||||||
|
const firstVal: Record<string, any> = {}
|
||||||
|
const secondVal: Record<string, any> = {}
|
||||||
|
|
||||||
|
filterItem.title = d.title
|
||||||
|
filterItem.type = d.filter.type
|
||||||
|
filterItem.between = d.filter.between || false
|
||||||
|
filterItem.range = d.filter.range || false
|
||||||
|
filterItem.key = filterKey
|
||||||
|
filterItem.filter = false
|
||||||
|
filterItem.hIndex = ind
|
||||||
|
filterItem.values = []
|
||||||
|
|
||||||
|
const opKey =
|
||||||
|
d.filter.type === 'date'
|
||||||
|
? d.filter.between !== undefined && d.filter.between
|
||||||
|
? '>'
|
||||||
|
: '='
|
||||||
|
: '='
|
||||||
|
firstVal.op = opKey
|
||||||
|
firstVal.val = ''
|
||||||
|
firstVal.text = ''
|
||||||
|
filterItem.values.push(firstVal)
|
||||||
|
if (d.filter.between !== undefined && d.filter.between) {
|
||||||
|
secondVal.op = '<'
|
||||||
|
secondVal.val = ''
|
||||||
|
secondVal.text = ''
|
||||||
|
filterItem.values.push(secondVal)
|
||||||
|
}
|
||||||
|
|
||||||
|
localFilterParams.value.push(filterItem)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const AddParamsToObject = (obj: Record<string, any>) => {
|
||||||
|
filterParams.value.forEach((filter, index) => {
|
||||||
|
if (filter.filter) {
|
||||||
|
const key = 'Filters[' + filter.key + ']'
|
||||||
|
if (obj[key] === undefined) obj[key] = [] as string[]
|
||||||
|
filter.values.forEach((val: Record<string, any>, vIndex: number) => {
|
||||||
|
if (val.val !== '') {
|
||||||
|
;(obj[key] as string[]).push(val.op + val.val)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const ResetFilterQueries = async () => {
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
const newQuery: Record<string, any> = {
|
||||||
|
...route.query
|
||||||
|
}
|
||||||
|
Object.keys(newQuery).forEach((q) => {
|
||||||
|
if (q.includes('Filters[')) delete newQuery[q]
|
||||||
|
})
|
||||||
|
await router.replace({ query: newQuery })
|
||||||
|
AddParamsToObject(newQuery)
|
||||||
|
await router.push({ query: newQuery })
|
||||||
|
}
|
||||||
|
}
|
||||||
const FilterData = async () => {
|
const FilterData = async () => {
|
||||||
Object.assign(filterParams, localFilterParams.value)
|
filterParams.value = JSON.parse(JSON.stringify(localFilterParams.value))
|
||||||
EqualObjects(filterParams, localFilterParams.value)
|
ResetFilterQueries()
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
await GetLocalData()
|
await GetLocalData()
|
||||||
filterPanel.value = false
|
filterPanel.value = false
|
||||||
@ -277,37 +355,259 @@
|
|||||||
(props.addAction as Function)()
|
(props.addAction as Function)()
|
||||||
}
|
}
|
||||||
|
|
||||||
const filterable = () => {
|
const filterable = computed(() =>
|
||||||
return props.tableHeader.filter((e) => e.hasOwnProperty('filter')).length > 0
|
props.tableHeader.some((obj: Record<string, any>) => obj.filter !== undefined)
|
||||||
}
|
)
|
||||||
|
|
||||||
const filters = (): boolean => {
|
const haveFilter = computed(() =>
|
||||||
return Object.keys(filterParams).length > 0
|
filterParams.value.some((obj: Record<string, any>) => obj.filter)
|
||||||
}
|
)
|
||||||
|
|
||||||
const RemoveFilterKey = (k: string) => {
|
const RemoveFilterKey = (index: number, fIndex: number) => {
|
||||||
delete localFilterParams.value[k]
|
const query: Record<string, any> = { ...route.query }
|
||||||
delete filterParams[k]
|
|
||||||
GetLocalData()
|
filterParams.value[index].values[fIndex].val = ''
|
||||||
|
filterParams.value[index].values[fIndex].text = ''
|
||||||
|
|
||||||
|
const allEmpty: boolean = filterParams.value[index].values.every(
|
||||||
|
(obj: Record<string, any>) => obj.val === ''
|
||||||
|
)
|
||||||
|
if (allEmpty) filterParams.value[index].filter = false
|
||||||
|
|
||||||
|
localFilterParams.value = JSON.parse(JSON.stringify(filterParams.value))
|
||||||
|
|
||||||
|
ResetFilterQueries()
|
||||||
|
setTimeout(async () => {
|
||||||
|
await GetLocalData()
|
||||||
|
filterPanel.value = false
|
||||||
|
}, 50)
|
||||||
}
|
}
|
||||||
const RemoveSearch = () => {
|
const RemoveSearch = () => {
|
||||||
localQuery.value = ''
|
localQuery.value = ''
|
||||||
searched.value = false
|
searched.value = false
|
||||||
GetLocalData()
|
GetLocalData()
|
||||||
}
|
}
|
||||||
const GetLocalData = async () => {
|
const pageNumberChanging = ref<boolean>(false)
|
||||||
if (selectedExport.value !== null) {
|
const sortChanging = ref<boolean>(false)
|
||||||
const exportUrl =
|
const searchChanging = ref<boolean>(false)
|
||||||
axios.defaults.baseURL + dataStore.apiBase + props.apiList + '?isPdf=true'
|
const filterChanging = ref<boolean>(false)
|
||||||
|
|
||||||
|
const isQueryEqual = (a: Record<string, any>, b: Record<string, any>) => {
|
||||||
|
const keys = new Set([...Object.keys(a || {}), ...Object.keys(b || {})])
|
||||||
|
for (const k of keys) {
|
||||||
|
const va = a?.[k]
|
||||||
|
const vb = b?.[k]
|
||||||
|
if (Array.isArray(va) && Array.isArray(vb)) {
|
||||||
|
if (va.length !== vb.length || va.some((v: any, i: number) => v !== vb[i]))
|
||||||
|
return false
|
||||||
|
} else if (String(va ?? '') !== String(vb ?? '')) return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
const RoutePageControl = () => {
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
const q = { ...route.query } as Record<string, any>
|
||||||
|
pageNumberChanging.value = true
|
||||||
|
|
||||||
|
if (q.pageNumber !== undefined && q.pageNumber !== '') {
|
||||||
|
localPagination.value.pageNumber = Number(q.pageNumber)
|
||||||
|
} else {
|
||||||
|
q.pageNumber = String(1)
|
||||||
|
localPagination.value.pageNumber = localPagination.value.pageNumber || 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isQueryEqual(q, route.query as Record<string, any>)) {
|
||||||
|
router.push({ query: q })
|
||||||
|
}
|
||||||
|
nextTick(() => {
|
||||||
|
pageNumberChanging.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const RouteSortControl = () => {
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
const q = { ...route.query } as Record<string, any>
|
||||||
|
sortChanging.value = true
|
||||||
|
if (q.sortOrder !== undefined && q.sortOrder !== null && q.sortOrder !== '') {
|
||||||
|
localSort.value.sortColumn = q.sortColumn as string
|
||||||
|
localSort.value.sortOrder = q.sortOrder as string
|
||||||
|
} else {
|
||||||
|
delete q.sortOrder
|
||||||
|
delete q.sortColumn
|
||||||
|
delete localSort.value.sortColumn
|
||||||
|
delete localSort.value.sortOrder
|
||||||
|
}
|
||||||
|
if (!isQueryEqual(q, route.query as Record<string, any>)) {
|
||||||
|
router.push({ query: q })
|
||||||
|
}
|
||||||
|
nextTick(() => {
|
||||||
|
sortChanging.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const RouteSearchControl = () => {
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
const q = { ...route.query } as Record<string, any>
|
||||||
|
searchChanging.value = true
|
||||||
|
if (
|
||||||
|
q.searchString !== undefined &&
|
||||||
|
q.searchString !== null &&
|
||||||
|
q.searchString !== ''
|
||||||
|
) {
|
||||||
|
localQuery.value = q.searchString as string
|
||||||
|
} else {
|
||||||
|
localQuery.value = ''
|
||||||
|
delete q.searchString
|
||||||
|
}
|
||||||
|
if (!isQueryEqual(q, route.query as Record<string, any>)) {
|
||||||
|
router.push({ query: q })
|
||||||
|
}
|
||||||
|
nextTick(() => {
|
||||||
|
searchChanging.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const RouteFilterControl = () => {
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
filterChanging.value = true
|
||||||
|
if (Object.keys(route.query).length > 0) {
|
||||||
|
Object.keys(route.query).forEach((key) => {
|
||||||
|
if (key.includes('Filters[')) {
|
||||||
|
const newKey = key.match(/(?<=\[)[^\]]+(?=\])/)![0]
|
||||||
|
|
||||||
|
localFilterParams.value.forEach((filter: Record<string, any>) => {
|
||||||
|
if (filter.key === newKey) {
|
||||||
|
if (!filter.filter) {
|
||||||
|
const isArray = Array.isArray(route.query[key])
|
||||||
|
if (isArray) {
|
||||||
|
;(route.query[key]! as string[]).forEach((val, ind) => {
|
||||||
|
filter.values[ind].op = (route.query[key]! as string[])[ind].charAt(
|
||||||
|
0
|
||||||
|
)
|
||||||
|
filter.values[ind].val = (route.query[key]! as string[])[ind].slice(
|
||||||
|
1
|
||||||
|
)
|
||||||
|
if (filter.type === 'select') {
|
||||||
|
const filterData = props.tableHeader[filter.hIndex].filter!.data
|
||||||
|
if (filterData && Array.isArray(filterData)) {
|
||||||
|
const forText = filterData.find(
|
||||||
|
(o: Record<string, any>) =>
|
||||||
|
String(
|
||||||
|
o[props.tableHeader[filter.hIndex].filter!.listVal]
|
||||||
|
) === String(filter.values[ind].val)
|
||||||
|
)
|
||||||
|
if (forText) {
|
||||||
|
filter.values[ind].text =
|
||||||
|
forText[props.tableHeader[filter.hIndex].filter!.listText]
|
||||||
|
} else {
|
||||||
|
filter.values[ind].text = filter.values[ind].val
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
filter.values[ind].text = filter.values[ind].val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
filter.values[0].op = (route.query[key] as string).charAt(0)
|
||||||
|
filter.values[0].val = (route.query[key] as string).slice(1)
|
||||||
|
|
||||||
|
if (filter.type === 'select') {
|
||||||
|
const filterData = props.tableHeader[filter.hIndex].filter!.data
|
||||||
|
if (filterData && Array.isArray(filterData)) {
|
||||||
|
const forText = filterData.find(
|
||||||
|
(o: Record<string, any>) =>
|
||||||
|
String(o[props.tableHeader[filter.hIndex].filter!.listVal]) ===
|
||||||
|
String(filter.values[0].val)
|
||||||
|
)
|
||||||
|
if (forText) {
|
||||||
|
filter.values[0].text =
|
||||||
|
forText[props.tableHeader[filter.hIndex].filter!.listText]
|
||||||
|
} else {
|
||||||
|
filter.values[0].text = filter.values[0].val
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
filter.values[0].text = filter.values[0].val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
filter.filter = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
filterParams.value = JSON.parse(JSON.stringify(localFilterParams.value))
|
||||||
|
}
|
||||||
|
nextTick(() => {
|
||||||
|
filterChanging.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const GetLocalData = async () => {
|
||||||
|
localLoaded.value = false
|
||||||
|
if (selectedExport.value !== null) {
|
||||||
|
let exportUrl = ''
|
||||||
|
let fileType = ''
|
||||||
|
let fileName = ''
|
||||||
|
|
||||||
|
// Export tipine göre URL ve dosya ayarları
|
||||||
|
if (selectedExport.value === 1) {
|
||||||
|
// PDF
|
||||||
|
exportUrl = axios.defaults.baseURL + dataStore.apiBase + props.apiList + '/Pdf'
|
||||||
|
fileType = 'application/pdf'
|
||||||
|
fileName = 'export.pdf'
|
||||||
|
} else if (selectedExport.value === 2) {
|
||||||
|
// Excel
|
||||||
|
exportUrl = axios.defaults.baseURL + dataStore.apiBase + props.apiList + '/Excel'
|
||||||
|
fileType = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||||
|
fileName = 'export.xlsx'
|
||||||
|
}
|
||||||
|
|
||||||
|
// Export için parametreleri hazırla
|
||||||
|
let exportParams: Record<string, any> = {}
|
||||||
|
|
||||||
|
// Sıralama parametrelerini ekle
|
||||||
|
if (localSort.value.sortColumn !== undefined) {
|
||||||
|
exportParams.sortColumn = localSort.value.sortColumn
|
||||||
|
if (localSort.value.sortOrder !== undefined && localSort.value.sortOrder !== '')
|
||||||
|
exportParams.sortOrder = localSort.value.sortOrder
|
||||||
|
}
|
||||||
|
|
||||||
|
// Arama parametresini ekle
|
||||||
|
if (localQuery.value !== '') {
|
||||||
|
exportParams.searchString = localQuery.value
|
||||||
|
}
|
||||||
|
|
||||||
|
// Filtre parametrelerini ekle
|
||||||
|
if (haveFilter.value) AddParamsToObject(exportParams)
|
||||||
|
|
||||||
|
// Axios ile dosya indirme - interceptor otomatik olarak token ekleyecek
|
||||||
|
try {
|
||||||
|
const response = await axios.get(exportUrl, {
|
||||||
|
params: exportParams,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
|
||||||
|
const blob = new Blob([response.data], { type: fileType })
|
||||||
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
link.href = exportUrl
|
link.href = url
|
||||||
|
link.download = fileName
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.dispatchEvent(
|
link.dispatchEvent(
|
||||||
new MouseEvent('click', { bubbles: true, cancelable: true, view: window })
|
new MouseEvent('click', { bubbles: true, cancelable: true, view: window })
|
||||||
)
|
)
|
||||||
link.remove()
|
link.remove()
|
||||||
window.URL.revokeObjectURL(link.href)
|
window.URL.revokeObjectURL(url)
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Export error:', error)
|
||||||
|
}
|
||||||
|
|
||||||
selectedExport.value = null
|
selectedExport.value = null
|
||||||
exportPanel.value = false
|
exportPanel.value = false
|
||||||
@ -335,10 +635,8 @@
|
|||||||
|
|
||||||
var filterparam: Record<string, any> = {}
|
var filterparam: Record<string, any> = {}
|
||||||
|
|
||||||
if (filters()) {
|
if (haveFilter.value) {
|
||||||
Object.keys(filterParams).forEach((f, k) => {
|
AddParamsToObject(filterparam)
|
||||||
filterparam['Filters[' + f + ']'] = filterParams[f].op + filterParams[f].val
|
|
||||||
})
|
|
||||||
Object.assign(apiData.params, filterparam)
|
Object.assign(apiData.params, filterparam)
|
||||||
}
|
}
|
||||||
let dt = await dataStore.dataGet(props.apiList as string, apiData)
|
let dt = await dataStore.dataGet(props.apiList as string, apiData)
|
||||||
@ -362,6 +660,9 @@
|
|||||||
}
|
}
|
||||||
emit('update:refresh', false)
|
emit('update:refresh', false)
|
||||||
}
|
}
|
||||||
|
nextTick(() => {
|
||||||
|
localLoaded.value = true
|
||||||
|
})
|
||||||
}
|
}
|
||||||
const OpenMobileButtons = () => {
|
const OpenMobileButtons = () => {
|
||||||
searchForm.value = false
|
searchForm.value = false
|
||||||
@ -381,7 +682,7 @@
|
|||||||
let el: HTMLInputElement = document.getElementById(
|
let el: HTMLInputElement = document.getElementById(
|
||||||
'listsearch' + rnd.value
|
'listsearch' + rnd.value
|
||||||
) as HTMLInputElement
|
) as HTMLInputElement
|
||||||
el.focus
|
el.focus()
|
||||||
el.select()
|
el.select()
|
||||||
}, 50)
|
}, 50)
|
||||||
}
|
}
|
||||||
@ -392,6 +693,14 @@
|
|||||||
const SearchQuery = () => {
|
const SearchQuery = () => {
|
||||||
if (props.apiList !== undefined) GetLocalData()
|
if (props.apiList !== undefined) GetLocalData()
|
||||||
else emit('update:query', localQuery.value)
|
else emit('update:query', localQuery.value)
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
router.push({
|
||||||
|
query: {
|
||||||
|
...route.query,
|
||||||
|
searchString: localQuery.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
searchForm.value = false
|
searchForm.value = false
|
||||||
searched.value = true
|
searched.value = true
|
||||||
}
|
}
|
||||||
@ -399,28 +708,46 @@
|
|||||||
searchForm.value = false
|
searchForm.value = false
|
||||||
mobileButtons.value = false
|
mobileButtons.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
if (globalStore.screenWidth >= globalStore.breakPoints.tabletp)
|
if (globalStore.screenWidth >= globalStore.breakPoints.tabletp)
|
||||||
mobileButtons.value = true
|
mobileButtons.value = true
|
||||||
|
|
||||||
if (props.apiList !== undefined) GetLocalData()
|
CreateFilterData()
|
||||||
|
RoutePageControl()
|
||||||
|
RouteSortControl()
|
||||||
|
RouteSearchControl()
|
||||||
|
RouteFilterControl()
|
||||||
|
|
||||||
|
if (props.apiList !== undefined) GetLocalData()
|
||||||
window.addEventListener('resize', Resize)
|
window.addEventListener('resize', Resize)
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => localSort.value,
|
() => [localSort.value],
|
||||||
() => {
|
() => {
|
||||||
|
if (!sortChanging.value) GetLocalData()
|
||||||
|
},
|
||||||
|
{ deep: true }
|
||||||
|
)
|
||||||
|
watch(
|
||||||
|
() => [route],
|
||||||
|
() => {
|
||||||
|
RoutePageControl()
|
||||||
|
RouteSortControl()
|
||||||
|
RouteSearchControl()
|
||||||
|
RouteFilterControl()
|
||||||
GetLocalData()
|
GetLocalData()
|
||||||
},
|
},
|
||||||
{ deep: true }
|
{ deep: true }
|
||||||
)
|
)
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => localPagination.value.pageNumber,
|
() => localPagination.value.pageNumber,
|
||||||
() => {
|
() => {
|
||||||
|
if (!pageNumberChanging.value) {
|
||||||
GetLocalData()
|
GetLocalData()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
)
|
)
|
||||||
watch(
|
watch(
|
||||||
() => props.refresh,
|
() => props.refresh,
|
||||||
@ -431,8 +758,9 @@
|
|||||||
watch(
|
watch(
|
||||||
() => localQuery.value,
|
() => localQuery.value,
|
||||||
() => {
|
() => {
|
||||||
if (props.apiList !== undefined && localQuery.value.length === 0) GetLocalData()
|
if (props.apiList !== undefined && localQuery.value.length === 0) {
|
||||||
else if (localQuery.value.length === 0) emit('update:query', localQuery.value)
|
if (!searchChanging.value) GetLocalData()
|
||||||
|
} else if (localQuery.value.length === 0) emit('update:query', localQuery.value)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
watch(
|
watch(
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel-content-item" v-if="showExport">
|
<!-- <div class="panel-content-item" v-if="showExport">
|
||||||
<div class="button-c button-icon button-export" @click="SelectExport(3)">
|
<div class="button-c button-icon button-export" @click="SelectExport(3)">
|
||||||
<i class="ico-c">
|
<i class="ico-c">
|
||||||
<svg>
|
<svg>
|
||||||
@ -31,7 +31,7 @@
|
|||||||
</i>
|
</i>
|
||||||
<span class="panel-date">CSV</span>
|
<span class="panel-date">CSV</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -45,7 +45,7 @@
|
|||||||
const emit = defineEmits(['update:selectedExport'])
|
const emit = defineEmits(['update:selectedExport'])
|
||||||
|
|
||||||
const selected = ref<number>(0)
|
const selected = ref<number>(0)
|
||||||
const showExport = ref<boolean>(false)
|
const showExport = ref<boolean>(true)
|
||||||
|
|
||||||
const SelectExport = (exp: number) => {
|
const SelectExport = (exp: number) => {
|
||||||
selected.value = exp
|
selected.value = exp
|
||||||
|
|||||||
@ -1,103 +1,104 @@
|
|||||||
<template>
|
<template>
|
||||||
<template v-for="(filter, i) in filterHead">
|
<template v-for="(filter, i) in localFilterParams">
|
||||||
<template v-if="filter.filter !== undefined">
|
<template v-if="filter.type === 'datetime-local'">
|
||||||
<template v-if="filter.filter.type === 'datetime-local'">
|
|
||||||
<div class="panel-content-item">
|
<div class="panel-content-item">
|
||||||
<form-date
|
<form-date
|
||||||
v-model="localFilterData[filter.name]"
|
v-model="filter.values[0].val"
|
||||||
:label="filter.title"
|
:label="
|
||||||
@change="UpdateFilter(filter)" />
|
filter.title +
|
||||||
|
(filter.between !== undefined && filter.between ? ' (Başlangıç)' : '')
|
||||||
|
"
|
||||||
|
@change="UpdateFilter(filter, 0)" />
|
||||||
<form-select
|
<form-select
|
||||||
v-if="filter.filter.range !== undefined && filter.filter.range"
|
v-if="filter.range !== undefined && filter.range"
|
||||||
:listData="filterOperator"
|
:listData="filterOperator"
|
||||||
v-model="localFilterData[filter.name + 'op']"
|
v-model="filter.values[0].op"
|
||||||
@change="UpdateFilter(filter)" />
|
@change="UpdateFilter(filter, 0)"
|
||||||
|
label="Operator" />
|
||||||
|
<form-date
|
||||||
|
v-if="filter.between !== undefined && filter.between"
|
||||||
|
v-model="filter.values[1].val"
|
||||||
|
:label="
|
||||||
|
filter.title +
|
||||||
|
(filter.between !== undefined && filter.between ? ' (Bitiş)' : '')
|
||||||
|
"
|
||||||
|
@change="UpdateFilter(filter, 1)" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="filter.filter.type === 'date'">
|
<template v-if="filter.type === 'date'">
|
||||||
<div class="panel-content-item">
|
<div class="panel-content-item">
|
||||||
<form-date
|
<form-date
|
||||||
type="date"
|
type="date"
|
||||||
v-model="localFilterData[filter.name]"
|
v-model="filter.values[0].val"
|
||||||
:label="filter.title"
|
:label="
|
||||||
@change="UpdateFilter(filter)" />
|
filter.title +
|
||||||
|
(filter.between !== undefined && filter.between ? ' (Başlangıç)' : '')
|
||||||
|
"
|
||||||
|
@change="UpdateFilter(filter, 0)" />
|
||||||
<form-select
|
<form-select
|
||||||
v-if="filter.filter.range !== undefined && filter.filter.range"
|
v-if="filter.range !== undefined && filter.range"
|
||||||
:listData="filterOperator"
|
:listData="filterOperator"
|
||||||
v-model="localFilterData[filter.name + 'op']"
|
v-model="filter.values[0].op"
|
||||||
@change="UpdateFilter(filter)" />
|
@change="UpdateFilter(filter, 0)"
|
||||||
|
label="Operator" />
|
||||||
|
<form-date
|
||||||
|
v-if="filter.between !== undefined && filter.between"
|
||||||
|
type="date"
|
||||||
|
v-model="filter.values[1].val"
|
||||||
|
:label="
|
||||||
|
filter.title +
|
||||||
|
(filter.between !== undefined && filter.between ? ' (Bitiş)' : '')
|
||||||
|
"
|
||||||
|
@change="UpdateFilter(filter, 1)" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="filter.filter.type === 'text'">
|
<template v-if="filter.type === 'text'">
|
||||||
<div class="panel-content-item">
|
<div class="panel-content-item">
|
||||||
<form-input
|
<form-input
|
||||||
v-model="localFilterData[filter.name]"
|
v-model="filter.values[0].val"
|
||||||
:label="filter.title"
|
:label="filter.title"
|
||||||
@change="UpdateFilter(filter)" />
|
@change="UpdateFilter(filter, 0)" />
|
||||||
<form-select
|
<form-select
|
||||||
v-if="filter.filter.range !== undefined && filter.filter.range"
|
v-if="filter.range !== undefined && filter.range"
|
||||||
:listData="filterOperator"
|
:listData="filterOperator"
|
||||||
v-model="localFilterData[filter.name + 'op']"
|
v-model="filter.values[0].op"
|
||||||
@change="UpdateFilter(filter)" />
|
@change="UpdateFilter(filter, 0)"
|
||||||
|
label="Operator" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="filter.filter.type === 'select'">
|
<template v-if="filter.type === 'select'">
|
||||||
<div class="panel-content-item">
|
<div class="panel-content-item">
|
||||||
<form-select
|
<form-select
|
||||||
:listData="filter.filter.data"
|
:listData="filterHead[filter.hIndex].filter.data"
|
||||||
:listText="filter.filter.listText"
|
:listText="filterHead[filter.hIndex].filter.listText"
|
||||||
:listVal="filter.filter.listVal"
|
:listVal="filterHead[filter.hIndex].filter.listVal"
|
||||||
:extraData="filter"
|
:extraData="{ f: filter, k: filterHead[filter.hIndex].filter.listText }"
|
||||||
:label="filter.title"
|
:label="filter.title"
|
||||||
v-model="localFilterData[filter.filter.filterId || filter.name]"
|
v-model="filter.values[0].val"
|
||||||
@change="UpdateFilterSelect"
|
@change="UpdateFilterSelect"
|
||||||
clearable />
|
clearable />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onBeforeMount } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
filterHead: Record<string, any>
|
filterHead: Record<string, any>[]
|
||||||
filterParams: Record<string, any>
|
filterParams: Record<string, any>[]
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const emit = defineEmits(['update:filterParams'])
|
const emit = defineEmits(['update:filterParams'])
|
||||||
|
const localFilterParams = ref<Record<string, any>[]>(props.filterParams)
|
||||||
const localFilterData = reactive<Record<string, any>>({})
|
|
||||||
const localFilterParams = reactive<Record<string, any>>(
|
|
||||||
Object.assign(props.filterParams)
|
|
||||||
)
|
|
||||||
const filterOperator = ref<string[]>(['=', '<', '>'])
|
const filterOperator = ref<string[]>(['=', '<', '>'])
|
||||||
|
|
||||||
const createFilterData = () => {
|
const UpdateFilter = (filter: Record<string, any>, index: number) => {
|
||||||
props.filterHead.forEach((d: Record<string, any>) => {
|
const allEmpty: boolean = filter.values.every(
|
||||||
if (d.filter !== undefined) {
|
(obj: Record<string, any>) => obj.val === ''
|
||||||
let filterKey = d.filter.filterId || d.name
|
)
|
||||||
localFilterData[filterKey] = ''
|
if (filter.values[index].val === '') filter.values[index].text = ''
|
||||||
localFilterData[filterKey + 'op'] = '='
|
filter.filter = !allEmpty
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
Object.keys(localFilterParams).forEach((k, i) => {
|
|
||||||
localFilterData[k] = localFilterParams[k].val
|
|
||||||
localFilterData[k + 'op'] = localFilterParams[k].op
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const UpdateFilter = (k: Record<string, any>) => {
|
|
||||||
let filterKey = k.filter.filterId || k.name
|
|
||||||
if (localFilterData[filterKey] !== '') {
|
|
||||||
localFilterParams[filterKey] = {}
|
|
||||||
localFilterParams[filterKey].val = localFilterData[filterKey]
|
|
||||||
localFilterParams[filterKey].op = localFilterData[filterKey + 'op']
|
|
||||||
localFilterParams[filterKey].title = k.title
|
|
||||||
} else delete localFilterParams[filterKey]
|
|
||||||
|
|
||||||
emit('update:filterParams', localFilterParams)
|
|
||||||
}
|
}
|
||||||
const UpdateFilterSelect = (
|
const UpdateFilterSelect = (
|
||||||
e: Event,
|
e: Event,
|
||||||
@ -105,19 +106,13 @@
|
|||||||
d: Record<string, any>,
|
d: Record<string, any>,
|
||||||
ext: Record<string, any>
|
ext: Record<string, any>
|
||||||
) => {
|
) => {
|
||||||
let filterKey = ext.filter.filterId || ext.name
|
if (v !== '' && v !== null) {
|
||||||
if (v !== '' && v !== null && localFilterData[filterKey] !== '') {
|
ext.f.values[0].val = v
|
||||||
localFilterParams[filterKey] = {}
|
ext.f.values[0].text = d[ext.k]
|
||||||
localFilterParams[filterKey].val = localFilterData[filterKey]
|
ext.f.filter = true
|
||||||
localFilterParams[filterKey].op = localFilterData[filterKey + 'op']
|
|
||||||
localFilterParams[filterKey].title = ext.title
|
|
||||||
localFilterParams[filterKey].text = d[ext.filter.listText]
|
|
||||||
} else {
|
} else {
|
||||||
delete localFilterParams[filterKey]
|
ext.f.filter = false
|
||||||
|
ext.f.values[0].text = ''
|
||||||
}
|
}
|
||||||
emit('update:filterParams', localFilterParams)
|
|
||||||
}
|
}
|
||||||
onBeforeMount(() => {
|
|
||||||
createFilterData()
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -32,19 +32,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed, onMounted, watch } from 'vue'
|
import { ref, computed, onMounted, onBeforeMount, watch, nextTick } from 'vue'
|
||||||
import { useGlobalStore } from '@/stores/globalStore'
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
interface TabObj {
|
interface TabObj {
|
||||||
[key: string]: any
|
[key: string]: any
|
||||||
text: string
|
text: string
|
||||||
id: string
|
id: string
|
||||||
}
|
}
|
||||||
|
export interface Props {
|
||||||
const props = defineProps<{
|
|
||||||
tabList: TabObj[]
|
tabList: TabObj[]
|
||||||
}>()
|
isUseRoute?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
const props = withDefaults(defineProps<Props>(), { isUseRoute: false })
|
||||||
|
|
||||||
const currentTab = ref<number>(0)
|
const currentTab = ref<number>(0)
|
||||||
const rnd = ref<number>(Math.ceil(Number(Math.random() * 1000000000)))
|
const rnd = ref<number>(Math.ceil(Number(Math.random() * 1000000000)))
|
||||||
@ -79,6 +84,13 @@
|
|||||||
} else {
|
} else {
|
||||||
currentTab.value = Number(d)
|
currentTab.value = Number(d)
|
||||||
}
|
}
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
nextTick(() => {
|
||||||
|
router.push({
|
||||||
|
params: { ...route.params, tabid: props.tabList[currentTab.value].id }
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
CalculateNavPosition()
|
CalculateNavPosition()
|
||||||
}
|
}
|
||||||
const TabWidth = () => {
|
const TabWidth = () => {
|
||||||
@ -96,14 +108,31 @@
|
|||||||
TabWidth()
|
TabWidth()
|
||||||
CalculateNavPosition()
|
CalculateNavPosition()
|
||||||
}
|
}
|
||||||
|
const RouteTabControl = () => {
|
||||||
|
if (props.isUseRoute) {
|
||||||
|
if (route.params.tabid !== undefined && route.params.tabid !== '') {
|
||||||
|
currentTab.value = props.tabList.findIndex((t) => t.id === route.params.tabid)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
TabWidth()
|
TabWidth()
|
||||||
window.addEventListener('resize', Resize)
|
window.addEventListener('resize', Resize)
|
||||||
})
|
})
|
||||||
|
onBeforeMount(() => {
|
||||||
|
RouteTabControl()
|
||||||
|
})
|
||||||
watch(
|
watch(
|
||||||
() => globalStore.sideMenu,
|
() => globalStore.sideMenu,
|
||||||
() => {
|
() => {
|
||||||
TabWidth()
|
TabWidth()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
watch(
|
||||||
|
() => route.params.tabid,
|
||||||
|
(t) => {
|
||||||
|
RouteTabControl()
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import FormInput from './FormInput.vue'
|
|||||||
import FormDate from './FormDate.vue'
|
import FormDate from './FormDate.vue'
|
||||||
import FormFile from './FormFile.vue'
|
import FormFile from './FormFile.vue'
|
||||||
import FormTextarea from './FormTextarea.vue'
|
import FormTextarea from './FormTextarea.vue'
|
||||||
import FormQuill from './FormQuill.vue'
|
|
||||||
import FormSummer from './FormSummer.vue'
|
import FormSummer from './FormSummer.vue'
|
||||||
import FormSelect from './FormSelect.vue'
|
import FormSelect from './FormSelect.vue'
|
||||||
import FormRadio from './FormRadio.vue'
|
import FormRadio from './FormRadio.vue'
|
||||||
@ -25,7 +24,6 @@ export {
|
|||||||
FormDate,
|
FormDate,
|
||||||
FormFile,
|
FormFile,
|
||||||
FormTextarea,
|
FormTextarea,
|
||||||
FormQuill,
|
|
||||||
FormSummer,
|
FormSummer,
|
||||||
FormSelect,
|
FormSelect,
|
||||||
FormRadio,
|
FormRadio,
|
||||||
|
|||||||
@ -2,9 +2,26 @@ import axios from 'axios'
|
|||||||
import { useUsersStore } from '@/stores/usersStore'
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
|
|
||||||
axios.defaults.baseURL = 'https://panelapi.cekilisevi.gov.tr/'
|
axios.defaults.baseURL = import.meta.env.VITE_API_URL
|
||||||
//axios.defaults.timeout = 2000;
|
//axios.defaults.timeout = 2000;
|
||||||
axios.defaults.headers['Content-Type'] = 'application/json; charset=utf-8'
|
axios.defaults.headers['Content-Type'] = 'application/json; charset=utf-8'
|
||||||
|
//Filtrelerde aynı key birden fazla parametre array ile eklendiğinde url oluştururken [] ekleyerek oluşturmasını engellemek için serializer eklendi
|
||||||
|
axios.defaults.paramsSerializer = (params) => {
|
||||||
|
const queryParts: string[] = []
|
||||||
|
|
||||||
|
for (const key in params) {
|
||||||
|
const value = params[key]
|
||||||
|
if (Array.isArray(value)) {
|
||||||
|
value.forEach((v) => {
|
||||||
|
queryParts.push(`${key}=${encodeURIComponent(v)}`)
|
||||||
|
})
|
||||||
|
} else if (value !== undefined && value !== null) {
|
||||||
|
queryParts.push(`${key}=${encodeURIComponent(value)}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return queryParts.join('&')
|
||||||
|
}
|
||||||
import { useDataStore } from '@/stores/dataStore'
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
|
|
||||||
// İstek Öncesinde Çalışacak Bir Fonksiyon
|
// İstek Öncesinde Çalışacak Bir Fonksiyon
|
||||||
@ -42,9 +59,8 @@ axios.interceptors.response.use(
|
|||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
dataStore.isLoading = false
|
dataStore.isLoading = false
|
||||||
// Yanıtta hata oluşursa burada yakalanır
|
// Yanıtta hata oluşursa burada yakalanır (401 login'e yönlendir, diğerleri dataStore catch'te toast gösterir)
|
||||||
// error.status kodu undefined geliyor
|
if (error.response?.status === 401) {
|
||||||
if (error.response.status === 401) {
|
|
||||||
const token = sessionStorage.getItem(usersStore.userStorageKeys.TOKEN)
|
const token = sessionStorage.getItem(usersStore.userStorageKeys.TOKEN)
|
||||||
if (token !== undefined) {
|
if (token !== undefined) {
|
||||||
usersStore.ResetUserData()
|
usersStore.ResetUserData()
|
||||||
|
|||||||
@ -109,7 +109,7 @@
|
|||||||
{
|
{
|
||||||
title: 'Site Yönetimi',
|
title: 'Site Yönetimi',
|
||||||
ico: 'sitemanagement',
|
ico: 'sitemanagement',
|
||||||
show: usersStore.isPanelUser && !usersStore.isAccounting,
|
show: usersStore.isSuperAdmin,
|
||||||
sub: [
|
sub: [
|
||||||
{
|
{
|
||||||
title: 'Yeni Sayfa',
|
title: 'Yeni Sayfa',
|
||||||
@ -142,6 +142,10 @@
|
|||||||
title: 'Piyango Listesi',
|
title: 'Piyango Listesi',
|
||||||
to: '/muhasebe/piyango-listesi'
|
to: '/muhasebe/piyango-listesi'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'İzin Bedel Oranı',
|
||||||
|
to: '/muhasebe/izin-bedel-orani'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'Ayarlar',
|
title: 'Ayarlar',
|
||||||
to: '/muhasebe/ayarlar'
|
to: '/muhasebe/ayarlar'
|
||||||
|
|||||||
@ -80,8 +80,8 @@
|
|||||||
v-model="uyeBilgileriStore.formData.gercekVergiNo"
|
v-model="uyeBilgileriStore.formData.gercekVergiNo"
|
||||||
required
|
required
|
||||||
label="Vergi No"
|
label="Vergi No"
|
||||||
maxlength="11"
|
maxlength="10"
|
||||||
minlength="11"
|
minlength="10"
|
||||||
:invalidText="uyeBilgileriStore.invalidTexts.gercekVergiNo"
|
:invalidText="uyeBilgileriStore.invalidTexts.gercekVergiNo"
|
||||||
@keydown="validationStore.allowNumbersWithKeys" />
|
@keydown="validationStore.allowNumbersWithKeys" />
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,19 @@
|
|||||||
|
<template>
|
||||||
|
<form-piyango-cekilis-tutanagi-display
|
||||||
|
v-if="
|
||||||
|
usersStore.isPanelUser ||
|
||||||
|
(piyangoStore.lotteryApprove !== 0 &&
|
||||||
|
piyangoStore.lotteryApprove !== 3 &&
|
||||||
|
piyangoStore.lotteryApprove !== 8)
|
||||||
|
" />
|
||||||
|
<form-piyango-cekilis-tutanagi v-else />
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
|
const usersStore = useUsersStore()
|
||||||
|
import { usePiyangoStore } from '../stores/piyangoStore'
|
||||||
|
const piyangoStore = usePiyangoStore()
|
||||||
|
import FormPiyangoCekilisTutanagi from './form/FormPiyangoCekilisTutanagi.vue'
|
||||||
|
import FormPiyangoCekilisTutanagiDisplay from './display/FormPiyangoCekilisTutanagiDisplay.vue'
|
||||||
|
</script>
|
||||||
|
|
||||||
@ -1,10 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="form-content">
|
<div class="form-content">
|
||||||
<div class="form-inner-content form-inner-content-left">
|
<div class="form-inner-content form-inner-content-left">
|
||||||
<form-piyango-dosya-kapama/>
|
<form-piyango-dosya-kapama />
|
||||||
|
</div>
|
||||||
|
<div class="form-inner-content form-inner-content-left">
|
||||||
|
<form-piyango-dosya-kapama-ikramiye-listesi />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import FormPiyangoDosyaKapama from './form/FormPiyangoDosyaKapama.vue'
|
import FormPiyangoDosyaKapama from './form/FormPiyangoDosyaKapama.vue'
|
||||||
|
import FormPiyangoDosyaKapamaIkramiyeListesi from './form/FormPiyangoDosyaKapamaIkramiyeListesi.vue'
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -8,7 +8,8 @@
|
|||||||
:rowAction="OpenUser"
|
:rowAction="OpenUser"
|
||||||
:apiList="'Katilimci/ByCekilisId/' + piyangoStore.selectedLottery"
|
:apiList="'Katilimci/ByCekilisId/' + piyangoStore.selectedLottery"
|
||||||
v-model:pagination="paginationData"
|
v-model:pagination="paginationData"
|
||||||
v-model:refresh="piyangoKatilimciStore.refreshPiyangoKatilimciList">
|
v-model:refresh="piyangoKatilimciStore.refreshPiyangoKatilimciList"
|
||||||
|
isUseRoute>
|
||||||
<template #extraButtons>
|
<template #extraButtons>
|
||||||
<button
|
<button
|
||||||
class="button-c"
|
class="button-c"
|
||||||
@ -50,14 +51,62 @@
|
|||||||
</template>
|
</template>
|
||||||
</list-table-content>
|
</list-table-content>
|
||||||
<panel-wrapper
|
<panel-wrapper
|
||||||
|
wide
|
||||||
v-if="piyangoKatilimciStore.katilimciFilePanel"
|
v-if="piyangoKatilimciStore.katilimciFilePanel"
|
||||||
v-model="piyangoKatilimciStore.katilimciFilePanel"
|
v-model="piyangoKatilimciStore.katilimciFilePanel"
|
||||||
panel-title="Katılımcı Dosyası Yükle">
|
panel-title="Katılımcı Dosyası Yükle">
|
||||||
<template #panelContent>
|
<template #panelContent>
|
||||||
|
<div class="upload-panel-content">
|
||||||
|
<div v-if="uploadProgressPanel" class="upload-progress-section">
|
||||||
|
<h4 class="upload-progress-title">Aktif Yükleme</h4>
|
||||||
|
<div class="upload-warning">
|
||||||
|
İşlem sırasında tarayıcıyı veya bu sekmeyi kapatmayınız. Sayfa yenilerseniz bu paneli tekrar açarak takip edebilirsiniz.
|
||||||
|
</div>
|
||||||
|
<div class="progress-bar">
|
||||||
|
<div
|
||||||
|
class="progress-fill"
|
||||||
|
:style="{ width: uploadProgressValue + '%' }"></div>
|
||||||
|
</div>
|
||||||
|
<div class="progress-text">
|
||||||
|
<template v-if="uploadProgressValue === 0">
|
||||||
|
Dosya içeriği okunuyor, yükleme başlatılıyor...
|
||||||
|
</template>
|
||||||
|
<template v-else>{{ uploadProgressValue }}%</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="uploadJobsLoading || uploadJobs.length > 0" class="upload-history-section">
|
||||||
|
<h4 class="upload-history-title">Yükleme Geçmişi</h4>
|
||||||
|
<div v-if="uploadJobsLoading" class="history-loading">Yükleniyor...</div>
|
||||||
|
<div v-else-if="uploadJobs.length > 0" class="history-items">
|
||||||
|
<div
|
||||||
|
v-for="job in uploadJobs"
|
||||||
|
:key="job.guid"
|
||||||
|
:class="['history-item', job.status?.toLowerCase() === 'processing' ? 'processing' : '']"
|
||||||
|
@click="OpenUploadDetail(job.guid)">
|
||||||
|
<span class="history-file">{{ job.fileName }}</span>
|
||||||
|
<span :class="['history-status', 'status-' + job.status?.toLowerCase()]">{{ statusText(job.status) }}</span>
|
||||||
|
<span class="history-progress">{{ job.progress }}%</span>
|
||||||
|
<span v-if="job.status?.toLowerCase() === 'completed'" class="history-stats">
|
||||||
|
+{{ job.insertedCount ?? 0 }}
|
||||||
|
<template v-if="(job.duplicateCount ?? 0) > 0"> / {{ job.duplicateCount }} dpl</template>
|
||||||
|
</span>
|
||||||
|
<span class="history-date">{{ formatDate(job.createdAt) }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="upload-form-section">
|
||||||
|
<h4 class="upload-form-title">Yeni Dosya Yükle</h4>
|
||||||
<panel-katilimci-document />
|
<panel-katilimci-document />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #footerButton>
|
<template #footerButton>
|
||||||
<button class="button-c button-save" @click="FileUpload">Yükle</button>
|
<button
|
||||||
|
class="button-c button-save"
|
||||||
|
@click="FileUpload"
|
||||||
|
:disabled="uploadProgressPanel">
|
||||||
|
Yükle
|
||||||
|
</button>
|
||||||
</template>
|
</template>
|
||||||
</panel-wrapper>
|
</panel-wrapper>
|
||||||
<panel-wrapper
|
<panel-wrapper
|
||||||
@ -82,26 +131,12 @@
|
|||||||
</template>
|
</template>
|
||||||
</panel-wrapper>
|
</panel-wrapper>
|
||||||
<panel-wrapper
|
<panel-wrapper
|
||||||
v-if="uploadProgressPanel"
|
wide
|
||||||
v-model="uploadProgressPanel"
|
v-if="uploadDetailPanel"
|
||||||
panel-title="Yükleme Durumu">
|
v-model="uploadDetailPanel"
|
||||||
|
panel-title="Yükleme Detayı">
|
||||||
<template #panelContent>
|
<template #panelContent>
|
||||||
<div class="progress-container">
|
<panel-excel-upload-detail :jobGuid="selectedJobGuid" />
|
||||||
<div class="upload-warning">
|
|
||||||
📌 İşlem sırasında tarayıcıyı veya bu sekmeyi kapatmayınız.
|
|
||||||
</div>
|
|
||||||
<div class="progress-bar">
|
|
||||||
<div
|
|
||||||
class="progress-fill"
|
|
||||||
:style="{ width: uploadProgressValue + '%' }"></div>
|
|
||||||
</div>
|
|
||||||
<div class="progress-text">
|
|
||||||
<template v-if="uploadProgressValue === 0">
|
|
||||||
Dosya içeriği okunuyor, yükleme başlatılıyor...
|
|
||||||
</template>
|
|
||||||
<template v-else>{{ uploadProgressValue }}%</template>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
</panel-wrapper>
|
</panel-wrapper>
|
||||||
</section>
|
</section>
|
||||||
@ -111,15 +146,12 @@
|
|||||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||||
import PanelKatilimciDocument from '@/module/cekilisler/components/panel/PanelKatilimciDocument.vue'
|
import PanelKatilimciDocument from '@/module/cekilisler/components/panel/PanelKatilimciDocument.vue'
|
||||||
import PanelPiyangoKatilimci from '@/module/cekilisler/components/panel/PanelPiyangoKatilimci.vue'
|
import PanelPiyangoKatilimci from '@/module/cekilisler/components/panel/PanelPiyangoKatilimci.vue'
|
||||||
|
import PanelExcelUploadDetail from '@/module/cekilisler/components/panel/PanelExcelUploadDetail.vue'
|
||||||
import { useDateStore } from '@/stores/dateStore'
|
import { useDateStore } from '@/stores/dateStore'
|
||||||
|
|
||||||
const dateStore = useDateStore()
|
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
|
|
||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
import { useDataStore } from '@/stores/dataStore'
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
|
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
import { usePiyangoStore } from '../stores/piyangoStore'
|
import { usePiyangoStore } from '../stores/piyangoStore'
|
||||||
|
|
||||||
@ -136,24 +168,26 @@
|
|||||||
import { useDialogStore } from '@/components/global/dialogStore'
|
import { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
|
||||||
const dialogStore = useDialogStore()
|
const dialogStore = useDialogStore()
|
||||||
|
const toastStore = useToastStore()
|
||||||
|
|
||||||
import { usePiyangoOnayStore } from '../stores/piyangoOnayStore'
|
import { usePiyangoOnayStore } from '../stores/piyangoOnayStore'
|
||||||
const piyangoOnayStore = usePiyangoOnayStore()
|
const piyangoOnayStore = usePiyangoOnayStore()
|
||||||
import { usePiyangoOnayService } from '../service/piyangoOnayService'
|
import { usePiyangoOnayService } from '../service/piyangoOnayService'
|
||||||
const piyangoOnayService = usePiyangoOnayService()
|
const piyangoOnayService = usePiyangoOnayService()
|
||||||
|
|
||||||
import {
|
import { onUnmounted } from 'vue'
|
||||||
connectToHub,
|
import { connectToHub, onProgress, onInsertProgress, onCompleted, onError, removeUploadHandlers } from '../service/signalrService'
|
||||||
onProgress,
|
import { useToastStore } from '@/components/global/toastStore'
|
||||||
onInsertProgress,
|
|
||||||
onCompleted,
|
|
||||||
onError
|
|
||||||
} 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 uploadDetailPanel = ref(false)
|
||||||
const ilanTarihi = ref<Date>(new Date(piyangoStore.lotteryIlanTarihi!))
|
const uploadJobs = ref<Record<string, any>[]>([])
|
||||||
|
const uploadJobsLoading = ref(false)
|
||||||
|
const selectedJobGuid = ref('')
|
||||||
|
const connectionId = ref('')
|
||||||
|
const dateStore = useDateStore()
|
||||||
|
let pollInterval: ReturnType<typeof setInterval> | null = null
|
||||||
|
|
||||||
const tableHeader = ref<Record<string, any>[]>([
|
const tableHeader = ref<Record<string, any>[]>([
|
||||||
{
|
{
|
||||||
@ -259,12 +293,58 @@
|
|||||||
else return ''
|
else return ''
|
||||||
})
|
})
|
||||||
|
|
||||||
const AddNewDocument = () => {
|
const AddNewDocument = async () => {
|
||||||
dataStore.panelData = {
|
try {
|
||||||
title: '',
|
connectionId.value = await connectToHub()
|
||||||
file: ''
|
} catch {
|
||||||
|
connectionId.value = ''
|
||||||
}
|
}
|
||||||
|
dataStore.panelData = { title: '', file: '' }
|
||||||
piyangoKatilimciStore.katilimciFilePanel = true
|
piyangoKatilimciStore.katilimciFilePanel = true
|
||||||
|
uploadJobsLoading.value = true
|
||||||
|
const cekilisId = piyangoStore.selectedLottery
|
||||||
|
uploadJobs.value = cekilisId !== null ? await piyangoKatilimciService.GetUploadJobs(cekilisId) : []
|
||||||
|
uploadJobsLoading.value = false
|
||||||
|
|
||||||
|
removeUploadHandlers()
|
||||||
|
// İşleniyor durumundaki job varsa SignalR ile abone ol (gerçek zamanlı progress almak için)
|
||||||
|
const processingJob = uploadJobs.value.find(
|
||||||
|
(j: Record<string, any>) => j.status?.toLowerCase() === 'processing'
|
||||||
|
)
|
||||||
|
if (processingJob?.guid && connectionId.value) {
|
||||||
|
const updateProgress = (data: any) => {
|
||||||
|
const percent = data.Percent ?? 0
|
||||||
|
uploadProgressValue.value = percent
|
||||||
|
const idx = uploadJobs.value.findIndex((j: Record<string, any>) => j.guid === processingJob.guid)
|
||||||
|
if (idx >= 0) {
|
||||||
|
uploadJobs.value[idx] = {
|
||||||
|
...uploadJobs.value[idx],
|
||||||
|
progress: percent,
|
||||||
|
processedRows: data.Current ?? data.InsertedCount,
|
||||||
|
totalRows: data.Total ?? data.TotalCount
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onProgress(updateProgress)
|
||||||
|
onInsertProgress(updateProgress)
|
||||||
|
onCompleted(() => {
|
||||||
|
stopPolling()
|
||||||
|
uploadProgressPanel.value = false
|
||||||
|
piyangoKatilimciStore.refreshPiyangoKatilimciList = true
|
||||||
|
piyangoKatilimciStore.katilimciFilePanel = true
|
||||||
|
refreshUploadJobsAndPollProcessing()
|
||||||
|
})
|
||||||
|
onError(() => {
|
||||||
|
stopPolling()
|
||||||
|
uploadProgressPanel.value = false
|
||||||
|
refreshUploadJobsAndPollProcessing()
|
||||||
|
})
|
||||||
|
uploadProgressPanel.value = true
|
||||||
|
uploadProgressValue.value = processingJob.progress ?? 0
|
||||||
|
await piyangoKatilimciService.SubscribeToJob(processingJob.guid, connectionId.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
startPollingForAnyProcessingJob()
|
||||||
}
|
}
|
||||||
|
|
||||||
const AddNewKatilimci = () => {
|
const AddNewKatilimci = () => {
|
||||||
@ -284,64 +364,62 @@
|
|||||||
piyangoKatilimciStore.katilimciUserPanel = true
|
piyangoKatilimciStore.katilimciUserPanel = true
|
||||||
}
|
}
|
||||||
const FileUpload = async () => {
|
const FileUpload = async () => {
|
||||||
const connectionId = await connectToHub()
|
if (!piyangoKatilimciValidationStore.FileFormCheck()) {
|
||||||
|
piyangoKatilimciValidationStore.isFileFormValid = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Progress modal'ı aç
|
removeUploadHandlers()
|
||||||
uploadProgressValue.value = 0
|
uploadProgressValue.value = 0
|
||||||
uploadProgressPanel.value = true
|
uploadProgressPanel.value = true
|
||||||
|
|
||||||
onProgress((data) => {
|
onProgress((data) => {
|
||||||
uploadProgressValue.value = data.Percent
|
uploadProgressValue.value = data.Percent
|
||||||
console.log('Progress:', data.Percent)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
onCompleted((data) => {
|
onCompleted(() => {
|
||||||
console.log('Tamamlandı:', data)
|
stopPolling()
|
||||||
uploadProgressPanel.value = false
|
uploadProgressPanel.value = false
|
||||||
piyangoKatilimciStore.refreshPiyangoKatilimciList = true
|
piyangoKatilimciStore.refreshPiyangoKatilimciList = true
|
||||||
piyangoKatilimciStore.katilimciFilePanel = false
|
piyangoKatilimciStore.katilimciFilePanel = true
|
||||||
|
refreshUploadJobsAndPollProcessing()
|
||||||
|
})
|
||||||
|
|
||||||
|
onError(() => {
|
||||||
|
stopPolling()
|
||||||
|
uploadProgressPanel.value = false
|
||||||
})
|
})
|
||||||
|
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append(
|
formData.append('excelFile', piyangoKatilimciStore.piyangoKatilimciFileFormData.excelFile)
|
||||||
'excelFile',
|
|
||||||
piyangoKatilimciStore.piyangoKatilimciFileFormData.excelFile
|
const connId = connectionId.value || ''
|
||||||
)
|
|
||||||
console.log(dataStore.panelData)
|
|
||||||
const response = await dataStore.dataPost(
|
const response = await dataStore.dataPost(
|
||||||
`Katilimci/ExcelleYukle/${piyangoStore.selectedLottery}?connectionId=${connectionId}`,
|
`Katilimci/ExcelleYukle/${piyangoStore.selectedLottery}?connectionId=${connId}`,
|
||||||
{
|
{
|
||||||
data: formData,
|
data: formData,
|
||||||
headers: { 'Content-Type': 'multipart/form-data' }
|
headers: { 'Content-Type': 'multipart/form-data' },
|
||||||
|
skipErrorForStatuses: [409]
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (response.data !== 'errorfalse') {
|
if (response?._error && response.status === 409) {
|
||||||
// Başarı işlemi zaten onCompleted içinde yapıldı
|
uploadProgressPanel.value = false
|
||||||
|
const msg = response.data?.message || 'Bu çekiliş için zaten devam eden bir Excel yükleme işlemi var.'
|
||||||
|
toastStore.AddToast(msg, 'alert', 6000)
|
||||||
|
if (response.data?.existingJobId) {
|
||||||
|
refreshUploadJobsAndPollProcessing()
|
||||||
|
OpenUploadDetail(response.data.existingJobId)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (response !== 'errorfalse' && response?.jobId) {
|
||||||
|
startPolling(response.jobId)
|
||||||
} else {
|
} else {
|
||||||
// Hata olursa paneli kapat
|
|
||||||
uploadProgressPanel.value = false
|
uploadProgressPanel.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// const FileUpload = async () => {
|
|
||||||
// if (true) {
|
|
||||||
// const formData = new FormData()
|
|
||||||
// formData.append('excelFile', dataStore.panelData.file)
|
|
||||||
// let dt: any
|
|
||||||
//
|
|
||||||
// dt = await dataStore.dataPost(
|
|
||||||
// `Katilimci/ExcelleYukle/${piyangoStore.selectedLottery}?connectionId=${connectionId}`,
|
|
||||||
// {
|
|
||||||
// data: formData,
|
|
||||||
// headers: { 'Content-Type': 'multipart/form-data' }
|
|
||||||
// }
|
|
||||||
// )
|
|
||||||
// if (dt !== 'errorfalse') {
|
|
||||||
// piyangoKatilimciStore.refreshPiyangoKatilimciList = true
|
|
||||||
// piyangoKatilimciStore.katilimciFilePanel = false
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
const DeleteAllButton = () => {
|
const DeleteAllButton = () => {
|
||||||
dialogStore.CreateDialog({
|
dialogStore.CreateDialog({
|
||||||
title: 'Tüm Katılımcıları Sil',
|
title: 'Tüm Katılımcıları Sil',
|
||||||
@ -353,7 +431,7 @@
|
|||||||
{
|
{
|
||||||
label: 'Tüm katılımcıları Sil',
|
label: 'Tüm katılımcıları Sil',
|
||||||
type: 'alert',
|
type: 'alert',
|
||||||
function: () => DeleteAll
|
function: () => DeleteAll()
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
@ -375,16 +453,92 @@
|
|||||||
piyangoOnayStore.piyangoOnayForm.aciklama = ''
|
piyangoOnayStore.piyangoOnayForm.aciklama = ''
|
||||||
await piyangoOnayService.SaveOnayDurum()
|
await piyangoOnayService.SaveOnayDurum()
|
||||||
}
|
}
|
||||||
</script>
|
|
||||||
<style>
|
const statusText = (status: string) => {
|
||||||
.progress-container {
|
const map: Record<string, string> = {
|
||||||
width: 100%;
|
Pending: 'Bekliyor',
|
||||||
padding: 20px 0;
|
Processing: 'İşleniyor',
|
||||||
display: flex;
|
Completed: 'Tamamlandı',
|
||||||
flex-direction: column;
|
Failed: 'Başarısız'
|
||||||
align-items: center;
|
}
|
||||||
|
return map[status] || status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const formatDate = (val: string | Date) => {
|
||||||
|
if (!val) return '-'
|
||||||
|
return dateStore.dateFormat({ date: new Date(val), pattern: 'dd.mm.yyyy HH:MM' })
|
||||||
|
}
|
||||||
|
|
||||||
|
const OpenUploadDetail = (guid: string) => {
|
||||||
|
selectedJobGuid.value = guid
|
||||||
|
uploadDetailPanel.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const stopPolling = () => {
|
||||||
|
if (pollInterval) {
|
||||||
|
clearInterval(pollInterval)
|
||||||
|
pollInterval = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const startPolling = (jobId: string) => {
|
||||||
|
stopPolling()
|
||||||
|
pollInterval = setInterval(async () => {
|
||||||
|
const status = await piyangoKatilimciService.GetUploadJobStatus(jobId)
|
||||||
|
if (status && (status.status === 'Completed' || status.status === 'Failed')) {
|
||||||
|
stopPolling()
|
||||||
|
uploadProgressValue.value = status.status === 'Completed' ? 100 : status.progress || 0
|
||||||
|
uploadProgressPanel.value = false
|
||||||
|
piyangoKatilimciStore.refreshPiyangoKatilimciList = true
|
||||||
|
piyangoKatilimciStore.katilimciFilePanel = true
|
||||||
|
refreshUploadJobsAndPollProcessing()
|
||||||
|
} else if (status) {
|
||||||
|
uploadProgressValue.value = status.progress || 0
|
||||||
|
}
|
||||||
|
}, 2000)
|
||||||
|
}
|
||||||
|
|
||||||
|
const startPollingForExistingJob = (jobGuid: string) => {
|
||||||
|
stopPolling()
|
||||||
|
pollInterval = setInterval(async () => {
|
||||||
|
const status = await piyangoKatilimciService.GetUploadJobStatus(jobGuid)
|
||||||
|
if (status) {
|
||||||
|
const idx = uploadJobs.value.findIndex((j: Record<string, any>) => j.guid === jobGuid)
|
||||||
|
if (idx >= 0) {
|
||||||
|
uploadJobs.value[idx] = { ...uploadJobs.value[idx], ...status }
|
||||||
|
}
|
||||||
|
if (status.status === 'Completed' || status.status === 'Failed') {
|
||||||
|
stopPolling()
|
||||||
|
piyangoKatilimciStore.refreshPiyangoKatilimciList = true
|
||||||
|
refreshUploadJobsAndPollProcessing()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, 2000)
|
||||||
|
}
|
||||||
|
|
||||||
|
const refreshUploadJobsAndPollProcessing = async () => {
|
||||||
|
const cekilisId = piyangoStore.selectedLottery
|
||||||
|
if (cekilisId !== null) {
|
||||||
|
uploadJobs.value = await piyangoKatilimciService.GetUploadJobs(cekilisId)
|
||||||
|
startPollingForAnyProcessingJob()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const startPollingForAnyProcessingJob = () => {
|
||||||
|
const processingJob = uploadJobs.value.find(
|
||||||
|
(j: Record<string, any>) => j.status?.toLowerCase() === 'processing'
|
||||||
|
)
|
||||||
|
if (processingJob?.guid) {
|
||||||
|
startPollingForExistingJob(processingJob.guid)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
stopPolling()
|
||||||
|
removeUploadHandlers()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
.progress-bar {
|
.progress-bar {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
@ -407,6 +561,7 @@
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.upload-warning {
|
.upload-warning {
|
||||||
background: #fff8db;
|
background: #fff8db;
|
||||||
color: #856404;
|
color: #856404;
|
||||||
@ -417,4 +572,164 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.upload-panel-content {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 32px;
|
||||||
|
padding: 24px 24px 24px 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-progress-section {
|
||||||
|
background: #f0f9ff;
|
||||||
|
border: 1px solid #b6d4fe;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 16px 20px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-progress-title {
|
||||||
|
margin: 0 0 12px;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #1a1a2e;
|
||||||
|
align-self: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-progress-section .upload-warning {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-progress-section .progress-bar {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-progress-section .progress-text {
|
||||||
|
margin-top: 12px;
|
||||||
|
color: #1a1a2e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-history-section {
|
||||||
|
padding-bottom: 20px;
|
||||||
|
border-bottom: 1px solid #e8eaed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-history-title,
|
||||||
|
.upload-form-title {
|
||||||
|
margin: 0 0 14px;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #1a1a2e;
|
||||||
|
letter-spacing: 0.02em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-form-section {
|
||||||
|
padding-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-form-section :deep(.panel-documents-item) {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-form-section :deep(.form-item-description) {
|
||||||
|
margin-top: 8px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #5f6368;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-loading {
|
||||||
|
text-align: center;
|
||||||
|
padding: 20px;
|
||||||
|
color: #5f6368;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-items {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-item {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr auto auto auto;
|
||||||
|
align-items: center;
|
||||||
|
gap: 16px;
|
||||||
|
padding: 12px 16px;
|
||||||
|
border: 1px solid #e8eaed;
|
||||||
|
border-radius: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
background: #fafbfc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-item:hover {
|
||||||
|
background: #f1f3f5;
|
||||||
|
border-color: #d0d5dd;
|
||||||
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-file {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #1a1a2e;
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-status {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 4px 10px;
|
||||||
|
border-radius: 6px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-status.status-completed {
|
||||||
|
color: #0d6832;
|
||||||
|
background: #d4edda;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-status.status-failed {
|
||||||
|
color: #721c24;
|
||||||
|
background: #f8d7da;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-status.status-processing {
|
||||||
|
color: #004085;
|
||||||
|
background: #cce5ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-status.status-pending {
|
||||||
|
color: #856404;
|
||||||
|
background: #fff3cd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-progress {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #5f6368;
|
||||||
|
min-width: 36px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.history-date {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #80868b;
|
||||||
|
min-width: 100px;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* İşleniyor durumunda progress bar */
|
||||||
|
.history-item.processing .history-progress {
|
||||||
|
font-weight: 600;
|
||||||
|
color: #007bff;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -8,6 +8,11 @@
|
|||||||
<form-piyango-onay-kisiler />
|
<form-piyango-onay-kisiler />
|
||||||
</div>
|
</div>
|
||||||
</!--div-->
|
</!--div-->
|
||||||
|
<div class="form-inner-content">
|
||||||
|
<div class="form-part">
|
||||||
|
<form-piyango-onay-durum />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-inner-content">
|
<div class="form-inner-content">
|
||||||
<div class="form-part">
|
<div class="form-part">
|
||||||
<form-piyango-onay-log />
|
<form-piyango-onay-log />
|
||||||
@ -16,6 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import FormPiyangoOnayDurum from './form/FormPiyangoOnayDurum.vue'
|
||||||
import FormPiyangoOnayLog from './form/FormPiyangoOnayLog.vue'
|
import FormPiyangoOnayLog from './form/FormPiyangoOnayLog.vue'
|
||||||
import FormPiyangoOnay from './form/FormPiyangoOnay.vue'
|
import FormPiyangoOnay from './form/FormPiyangoOnay.vue'
|
||||||
import FormPiyangoOnayKisiler from './form/FormPiyangoOnayKisiler.vue'
|
import FormPiyangoOnayKisiler from './form/FormPiyangoOnayKisiler.vue'
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-inner-content">
|
<div class="form-inner-content">
|
||||||
<div class="form-part">
|
<div class="form-part">
|
||||||
<form-piyango-onay-log />
|
<form-piyango-onay-durum />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -19,6 +19,6 @@
|
|||||||
import { usePiyangoStore } from '../stores/piyangoStore'
|
import { usePiyangoStore } from '../stores/piyangoStore'
|
||||||
const piyangoStore = usePiyangoStore()
|
const piyangoStore = usePiyangoStore()
|
||||||
|
|
||||||
import FormPiyangoOnayLog from './form/FormPiyangoOnayLog.vue'
|
import FormPiyangoOnayDurum from './form/FormPiyangoOnayDurum.vue'
|
||||||
import FormPiyangoUserOnayaGonder from './form/FormPiyangoUserOnayaGonder.vue'
|
import FormPiyangoUserOnayaGonder from './form/FormPiyangoUserOnayaGonder.vue'
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
listText="Talihli"
|
listText="Talihli"
|
||||||
:apiList="'Katilimci/AsilYedek/' + piyangoStore.selectedLottery"
|
:apiList="'Katilimci/AsilYedek/' + piyangoStore.selectedLottery"
|
||||||
v-model:refresh='refreshList'
|
v-model:refresh='refreshList'
|
||||||
|
isUseRoute
|
||||||
>
|
>
|
||||||
<template #extraButtons>
|
<template #extraButtons>
|
||||||
<a href='/data/ornek-talihli-listesi.xlsx' target='_blank' class='button-c' v-if='piyangoStore.lotteryData.cekilisYontemi =="Fiziksel"'>
|
<a href='/data/ornek-talihli-listesi.xlsx' target='_blank' class='button-c' v-if='piyangoStore.lotteryData.cekilisYontemi =="Fiziksel"'>
|
||||||
@ -79,6 +80,11 @@
|
|||||||
sort: true,
|
sort: true,
|
||||||
style: { width: '20%' }
|
style: { width: '20%' }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'cekilisHakkiAdedi',
|
||||||
|
title: 'Çekiliş Hakkı Adedi',
|
||||||
|
style: { width: '10%' }
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'sifreCode',
|
name: 'sifreCode',
|
||||||
|
|||||||
@ -10,7 +10,8 @@
|
|||||||
:apiList="
|
:apiList="
|
||||||
'TeminantStates/GetTeminantStateCekilisList/' + piyangoStore.selectedLottery
|
'TeminantStates/GetTeminantStateCekilisList/' + piyangoStore.selectedLottery
|
||||||
"
|
"
|
||||||
v-model:refresh="piyangoTeminatStore.refreshList" />
|
v-model:refresh="piyangoTeminatStore.refreshList"
|
||||||
|
isUseRoute/>
|
||||||
</section>
|
</section>
|
||||||
<panel-wrapper
|
<panel-wrapper
|
||||||
wide
|
wide
|
||||||
@ -22,13 +23,20 @@
|
|||||||
v-if="
|
v-if="
|
||||||
usersStore.isPanelUser ||
|
usersStore.isPanelUser ||
|
||||||
(!usersStore.isPanelUser &&
|
(!usersStore.isPanelUser &&
|
||||||
|
piyangoStore.lotteryApprove !== 0 &&
|
||||||
|
piyangoStore.lotteryApprove !== 1 &&
|
||||||
|
piyangoStore.lotteryApprove !== 2 &&
|
||||||
piyangoStore.lotteryApprove !== 3 &&
|
piyangoStore.lotteryApprove !== 3 &&
|
||||||
!piyangoTeminatStore.isNew)
|
!piyangoTeminatStore.isNew)
|
||||||
" />
|
" />
|
||||||
<panel-piyango-teminat-durumu
|
<panel-piyango-teminat-durumu
|
||||||
v-if="
|
v-if="
|
||||||
!usersStore.isPanelUser &&
|
!usersStore.isPanelUser &&
|
||||||
(piyangoStore.lotteryApprove === 3 || piyangoTeminatStore.isNew)
|
(piyangoStore.lotteryApprove === 0 ||
|
||||||
|
piyangoStore.lotteryApprove === 1 ||
|
||||||
|
piyangoStore.lotteryApprove === 2 ||
|
||||||
|
piyangoStore.lotteryApprove === 3 ||
|
||||||
|
piyangoTeminatStore.isNew)
|
||||||
" />
|
" />
|
||||||
</template>
|
</template>
|
||||||
<template #footerButton>
|
<template #footerButton>
|
||||||
@ -36,14 +44,22 @@
|
|||||||
class="button-c button-save"
|
class="button-c button-save"
|
||||||
:disabled="!piyangoTeminatValidationStore.formChanged"
|
:disabled="!piyangoTeminatValidationStore.formChanged"
|
||||||
@click="piyangoTeminatService.SaveTeminatDurum"
|
@click="piyangoTeminatService.SaveTeminatDurum"
|
||||||
v-if="piyangoTeminatStore.isNew || usersStore.isPanelUser">
|
v-if="
|
||||||
|
usersStore.isPanelUser ||
|
||||||
|
(!usersStore.isPanelUser &&
|
||||||
|
(piyangoStore.lotteryApprove === 0 ||
|
||||||
|
piyangoStore.lotteryApprove === 1 ||
|
||||||
|
piyangoStore.lotteryApprove === 2 ||
|
||||||
|
piyangoStore.lotteryApprove === 3)) ||
|
||||||
|
piyangoTeminatStore.isNew
|
||||||
|
">
|
||||||
Kaydet
|
Kaydet
|
||||||
</button>
|
</button>
|
||||||
</template>
|
</template>
|
||||||
</panel-wrapper>
|
</panel-wrapper>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, computed,onBeforeMount } from 'vue'
|
import { ref, computed, onBeforeMount } from 'vue'
|
||||||
import PanelWrapper from '@/components/PanelWrapper.vue'
|
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||||
|
|
||||||
import PanelPiyangoTeminatDurumu from './panel/PanelPiyangoTeminatDurumu.vue'
|
import PanelPiyangoTeminatDurumu from './panel/PanelPiyangoTeminatDurumu.vue'
|
||||||
@ -143,10 +159,7 @@
|
|||||||
])
|
])
|
||||||
|
|
||||||
const teminatAddAction = computed(() => {
|
const teminatAddAction = computed(() => {
|
||||||
if (
|
if (!usersStore.isPanelUser) return NewTeminatDurum
|
||||||
!usersStore.isPanelUser
|
|
||||||
)
|
|
||||||
return NewTeminatDurum
|
|
||||||
else return ''
|
else return ''
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div class="form-inner-comment success-d" v-if="piyangoStore.lotteryApprove === 4">
|
<div class="form-inner-comment success-d" v-if="piyangoStore.lotteryApprove === 4">
|
||||||
Başvuru onaylanmıştır.
|
Başvuruya izin verildi.
|
||||||
</div>
|
</div>
|
||||||
<div class="form-inner-comment alert-d" v-if="piyangoStore.lotteryApprove === 5">
|
<div class="form-inner-comment alert-d" v-if="piyangoStore.lotteryApprove === 5">
|
||||||
Başvuru uygun görülmemiştir.
|
Başvuru uygun görülmemiştir.
|
||||||
@ -84,7 +84,7 @@
|
|||||||
Başvuru admin tarafından kapsam dışı olarak işaretlenmiştir.
|
Başvuru admin tarafından kapsam dışı olarak işaretlenmiştir.
|
||||||
</template>
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-inner-comment alert-d" v-if="piyangoStore.lotteryApprove === 11">
|
<div class="form-inner-comment alert-d" v-if="piyangoStore.lotteryApprove === 13">
|
||||||
Kampanya için cezai işlem uygulanmıştır.
|
Kampanya için cezai işlem uygulanmıştır.
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -3,6 +3,10 @@
|
|||||||
<lottery-states
|
<lottery-states
|
||||||
:piyangoAmac="piyangoStore.lotteryData.amacpiyangoId"
|
:piyangoAmac="piyangoStore.lotteryData.amacpiyangoId"
|
||||||
v-if="!isPreview" />
|
v-if="!isPreview" />
|
||||||
|
<form-display
|
||||||
|
v-model="piyangoStore.lotteryData.piyangoId"
|
||||||
|
label="Piyango ID"
|
||||||
|
size="1" />
|
||||||
<template
|
<template
|
||||||
v-if="
|
v-if="
|
||||||
usersStore.isPanelUser &&
|
usersStore.isPanelUser &&
|
||||||
@ -20,6 +24,19 @@
|
|||||||
v-model="piyangoStore.lotteryData.izinBedelNo"
|
v-model="piyangoStore.lotteryData.izinBedelNo"
|
||||||
label="İzin Bedel No" />
|
label="İzin Bedel No" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<form-display
|
||||||
|
type="date"
|
||||||
|
v-if="piyangoStore.lotteryData.izinTarihi !== undefined"
|
||||||
|
v-model="piyangoStore.lotteryData.izinTarihi"
|
||||||
|
half
|
||||||
|
label="İzin Tarihi" />
|
||||||
|
<form-display
|
||||||
|
v-if="piyangoStore.lotteryData.izinSayisi !== undefined"
|
||||||
|
v-model="piyangoStore.lotteryData.izinSayisi"
|
||||||
|
half
|
||||||
|
label="İzin Sayısı" />
|
||||||
|
|
||||||
<form-display
|
<form-display
|
||||||
v-model="piyangoStore.lotteryData.baslik"
|
v-model="piyangoStore.lotteryData.baslik"
|
||||||
label="Piyango Başlığı"
|
label="Piyango Başlığı"
|
||||||
|
|||||||
@ -19,6 +19,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-inner-comment waiting-d" v-if="!loaded">Yükleniyor, lütfen bekleyiniz...</div>
|
||||||
<piyango-bilgileri-display-content v-if="loaded" :isPreview="isPreview" />
|
<piyango-bilgileri-display-content v-if="loaded" :isPreview="isPreview" />
|
||||||
</div>
|
</div>
|
||||||
<panel-wrapper
|
<panel-wrapper
|
||||||
|
|||||||
@ -0,0 +1,107 @@
|
|||||||
|
<template>
|
||||||
|
<div class="form-part">
|
||||||
|
<div class="form-part-title">
|
||||||
|
<h4>Çekiliş Tutanağı</h4>
|
||||||
|
<div class="form-part-title-buttons">
|
||||||
|
<icon-button
|
||||||
|
v-if="usersStore.isPanelUser"
|
||||||
|
icon="plus"
|
||||||
|
class="ico-section ico-section-header-btn"
|
||||||
|
@click="AddNewDocument" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-part-content" v-if="cekilisTutanagiStore.loaded">
|
||||||
|
<template v-if="cekilisTutanagiStore.cekilisTutanagiList.length > 0">
|
||||||
|
<template v-for="(file, i) in cekilisTutanagiStore.cekilisTutanagiList">
|
||||||
|
<file-list-item
|
||||||
|
: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.stop="DeleteDocumentPop(file)">
|
||||||
|
<svg><use href="/src/assets/images/icons.svg#trash"></use></svg>
|
||||||
|
</i>
|
||||||
|
</template>
|
||||||
|
</file-list-item>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div class="form-inner-comment" v-if="usersStore.isPanelUser">
|
||||||
|
Eklenmiş dosya bulunamadı.
|
||||||
|
</div>
|
||||||
|
<div class="form-inner-comment" v-else>
|
||||||
|
Eklenmiş dosya bulunamadı.
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<panel-wrapper
|
||||||
|
v-if="cekilisTutanagiStore.documentPanel"
|
||||||
|
v-model="cekilisTutanagiStore.documentPanel"
|
||||||
|
panel-title="Doküman Ekle">
|
||||||
|
<template #panelContent>
|
||||||
|
<panel-piyango-cekilis-tutanagi />
|
||||||
|
</template>
|
||||||
|
<template #footerButton>
|
||||||
|
<div class="button-c button-save" @click="cekilisTutanagiService.SaveDocument">
|
||||||
|
Ekle
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</panel-wrapper>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onBeforeMount } from 'vue'
|
||||||
|
|
||||||
|
import PanelPiyangoCekilisTutanagi from '../panel/PanelPiyangoCekilisTutanagi.vue'
|
||||||
|
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||||
|
|
||||||
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
|
const usersStore = useUsersStore()
|
||||||
|
import { usePiyangoCekilisTutanagiStore } from '../../stores/piyangoCekilisTutanagiStore'
|
||||||
|
const cekilisTutanagiStore = usePiyangoCekilisTutanagiStore()
|
||||||
|
import { usePiyangoCekilisTutanagiService } from '../../service/piyangoCekilisTutanagiService'
|
||||||
|
const cekilisTutanagiService = usePiyangoCekilisTutanagiService()
|
||||||
|
import { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
const dialogStore = useDialogStore()
|
||||||
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
|
const dataStore = useDataStore()
|
||||||
|
|
||||||
|
const AddNewDocument = () => {
|
||||||
|
cekilisTutanagiStore.ResetForm()
|
||||||
|
cekilisTutanagiStore.isUpdate = false
|
||||||
|
cekilisTutanagiStore.documentPanel = true
|
||||||
|
}
|
||||||
|
|
||||||
|
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('CekilisTutanak/' + id)
|
||||||
|
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
dialogStore.CloseDialog('deletedoc')
|
||||||
|
await cekilisTutanagiService.GetDocumentList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onBeforeMount(async () => {
|
||||||
|
await cekilisTutanagiService.GetDocumentList()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
@ -10,7 +10,15 @@
|
|||||||
:editable="false"
|
:editable="false"
|
||||||
:data="file"
|
:data="file"
|
||||||
title="dokumanAdi"
|
title="dokumanAdi"
|
||||||
:filePath="file.url" />
|
: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>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
@ -33,6 +41,35 @@
|
|||||||
const piyangoDocumentStore = usePiyangoDocumentStore()
|
const piyangoDocumentStore = usePiyangoDocumentStore()
|
||||||
import { usePiyangoDocumentService } from '../../service/piyangoDocumentService'
|
import { usePiyangoDocumentService } from '../../service/piyangoDocumentService'
|
||||||
const piyangoDocumentService = usePiyangoDocumentService()
|
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('Dokuman/' + id)
|
||||||
|
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
dialogStore.CloseDialog('deletedoc')
|
||||||
|
await piyangoDocumentService.GetDocumentList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
await piyangoDocumentService.GetDocumentList()
|
await piyangoDocumentService.GetDocumentList()
|
||||||
|
|||||||
@ -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',
|
||||||
|
|||||||
@ -2,6 +2,9 @@
|
|||||||
<div class="form-part">
|
<div class="form-part">
|
||||||
<div class="form-part-title">
|
<div class="form-part-title">
|
||||||
<h4>Piyango Resimleri</h4>
|
<h4>Piyango Resimleri</h4>
|
||||||
|
<a href="/data/mpi-sablon.zip" class="button-c" target="_blank">
|
||||||
|
Örnek Resim Şablonları
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-part-content">
|
<div class="form-part-content">
|
||||||
<template v-for="(file, i) in fileList">
|
<template v-for="(file, i) in fileList">
|
||||||
@ -9,9 +12,19 @@
|
|||||||
:data="file"
|
:data="file"
|
||||||
onlyPreview
|
onlyPreview
|
||||||
:editable="false"
|
:editable="false"
|
||||||
:filePath="file.resimYolu" />
|
:filePath="file.resimYolu">
|
||||||
|
<template #actionButtons v-if="usersStore.isPanelUser">
|
||||||
|
<i
|
||||||
|
class="ico-c ico-btn ico-section back-grad-alert"
|
||||||
|
@click="DeleteImagePop(file)">
|
||||||
|
<svg><use href="/src/assets/images/icons.svg#trash"></use></svg>
|
||||||
|
</i>
|
||||||
</template>
|
</template>
|
||||||
<div v-if="usersStore.isPanelUser && fileList.length === 0" class="form-inner-comment">
|
</file-list-item>
|
||||||
|
</template>
|
||||||
|
<div
|
||||||
|
v-if="usersStore.isPanelUser && fileList.length === 0"
|
||||||
|
class="form-inner-comment">
|
||||||
Eklenmiş resim bulunamadı.
|
Eklenmiş resim bulunamadı.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -26,13 +39,43 @@
|
|||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
import { usePiyangoStore } from '../../stores/piyangoStore'
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
const piyangoStore = usePiyangoStore()
|
const piyangoStore = usePiyangoStore()
|
||||||
|
import { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
const dialogStore = useDialogStore()
|
||||||
|
|
||||||
const fileList = ref<Record<string,any>[]>([])
|
const fileList = ref<Record<string, any>[]>([])
|
||||||
|
|
||||||
const GetData = async () => {
|
const GetData = async () => {
|
||||||
let dt = await dataStore.dataGet('CekilisResim/Cekilis/' + piyangoStore.selectedLottery)
|
let dt = await dataStore.dataGet(
|
||||||
|
'CekilisResim/Cekilis/' + piyangoStore.selectedLottery
|
||||||
|
)
|
||||||
if (dt !== 'errorfalse') fileList.value.splice(0, fileList.value.length, ...dt.data)
|
if (dt !== 'errorfalse') fileList.value.splice(0, fileList.value.length, ...dt.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const DeleteImagePop = (data: Record<string, any>) => {
|
||||||
|
dialogStore.CreateDialog({
|
||||||
|
title: 'Resim Sil',
|
||||||
|
id: 'deleteimage',
|
||||||
|
content: 'Resimi silmek istediğinize emin misiniz? Bu işlem geri alınamaz.',
|
||||||
|
closeText: 'Vazgeç',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
label: 'Resmi Sil',
|
||||||
|
type: 'alert',
|
||||||
|
function: () => DeleteImage(data.id)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const DeleteImage = async (id: number | string) => {
|
||||||
|
var dt = await dataStore.dataDelete('CekilisResim/' + id)
|
||||||
|
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
dialogStore.CloseDialog('deleteimage')
|
||||||
|
await GetData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
await GetData()
|
await GetData()
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,102 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="form-part form-title" v-if="usersStore.isPanelUser">
|
|
||||||
<div class="form-title-buttons">
|
|
||||||
<button
|
|
||||||
class="button-c button-save"
|
|
||||||
@click="piyangoTeminatService.SaveTeminatDurum"
|
|
||||||
:disabled="!piyangoTeminatValidationStore.formChanged">
|
|
||||||
Kaydet
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
v-if="piyangoTeminatValidationStore.formChanged"
|
|
||||||
class="button-c button-cancel panel-close"
|
|
||||||
@click="piyangoTeminatStore.ResetFormData">
|
|
||||||
Vazgeç
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div :class="['form-part', piyangoTeminatValidationStore.formChanged ? 'changed' : '']"> <div
|
|
||||||
class="form-part-content"
|
|
||||||
v-if="piyangoTeminatStore.loaded">
|
|
||||||
<form-select
|
|
||||||
v-if="usersStore.isPanelUser"
|
|
||||||
label="İşlem"
|
|
||||||
:listData="piyangoDataStore.piyangoTeminatDurumlari"
|
|
||||||
listText="value"
|
|
||||||
listVal="id"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.state"
|
|
||||||
required
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.state"
|
|
||||||
@change="OnKeyup" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.amount"
|
|
||||||
half
|
|
||||||
label="Tutarı" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminatParentTypeText"
|
|
||||||
half
|
|
||||||
label="Para Birimi" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
label="Teminat Türü"
|
|
||||||
half
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantChildTypeText" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
type="date"
|
|
||||||
half
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantDate"
|
|
||||||
label="Tarih" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantNo"
|
|
||||||
half
|
|
||||||
label="No" />
|
|
||||||
<div class="form-item form-item-half"></div>
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.bankName"
|
|
||||||
half
|
|
||||||
label="Banka Adı" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.bankBranch"
|
|
||||||
half
|
|
||||||
label="Banka Şubesi" />
|
|
||||||
|
|
||||||
<!--form-display
|
|
||||||
label="İşlem"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.stateText" /-->
|
|
||||||
|
|
||||||
<file-list-item
|
|
||||||
title="Dosya"
|
|
||||||
:data="piyangoTeminatStore.piyangoTeminatFormData"
|
|
||||||
:editable="false"
|
|
||||||
:filePath="piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl"
|
|
||||||
:usePath="true"
|
|
||||||
:onlyPreview="true" />
|
|
||||||
|
|
||||||
<form-display
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.description"
|
|
||||||
label="Açıklama" />
|
|
||||||
</div></div>
|
|
||||||
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { usePiyangoTeminatStore } from '../../stores/piyangoTeminatStore'
|
|
||||||
const piyangoTeminatStore = usePiyangoTeminatStore()
|
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
|
||||||
const usersStore = useUsersStore()
|
|
||||||
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
|
|
||||||
const piyangoDataStore = usePiyangoDataStore()
|
|
||||||
import { usePiyangoTeminatValidationStore } from '../../validation/piyangoTeminatValidationStore'
|
|
||||||
const piyangoTeminatValidationStore = usePiyangoTeminatValidationStore()
|
|
||||||
import { usePiyangoTeminatService } from '../../service/piyangoTeminatService'
|
|
||||||
const piyangoTeminatService = usePiyangoTeminatService()
|
|
||||||
|
|
||||||
const OnKeyup = () => {
|
|
||||||
piyangoTeminatValidationStore.formChanged = true
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -3,8 +3,8 @@
|
|||||||
style="
|
style="
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 13pt;
|
font-size: 10pt;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
">
|
">
|
||||||
MİLLİ PİYANGO İDARESİ GENEL MÜDÜRLÜĞÜ
|
MİLLİ PİYANGO İDARESİ GENEL MÜDÜRLÜĞÜ
|
||||||
@ -18,11 +18,15 @@
|
|||||||
düzenlemek üzere, aşağıda belirtilen koşullarda piyango düzenlemek üzere gerekli iznin
|
düzenlemek üzere, aşağıda belirtilen koşullarda piyango düzenlemek üzere gerekli iznin
|
||||||
verilmesi hususunda bilgilerinizi ve gereğini arz ederiz.
|
verilmesi hususunda bilgilerinizi ve gereğini arz ederiz.
|
||||||
<br />
|
<br />
|
||||||
<br />
|
|
||||||
</div>
|
</div>
|
||||||
<strong style="font-size: 10pt; margin-bottom: 12px">
|
<strong style="font-size: 10pt; margin-bottom: 10px">
|
||||||
PİYANGO İLE İLGİLİ BİLGİLER
|
PİYANGO İLE İLGİLİ BİLGİLER
|
||||||
</strong>
|
</strong>
|
||||||
|
<br />
|
||||||
|
<strong style="font-size: 10pt; margin-bottom: 10px">
|
||||||
|
PİYANGO ID: {{ piyangoStore.lotteryData.piyangoId }}
|
||||||
|
</strong>
|
||||||
|
<br />
|
||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
class="table-no-line"
|
class="table-no-line"
|
||||||
@ -30,7 +34,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong style="font-size: 10pt; margin-bottom: 12px">
|
<strong style="font-size: 10pt; margin-bottom: 10px">
|
||||||
1- Piyangoyu Düzenleyenin
|
1- Piyangoyu Düzenleyenin
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -41,7 +45,7 @@
|
|||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt">
|
style="margin-bottom: 10px; font-size: 10pt">
|
||||||
<tbody>
|
<tbody>
|
||||||
<template v-if="piyangoStore.duzenleyenData.basvuruTipId === 18">
|
<template v-if="piyangoStore.duzenleyenData.basvuruTipId === 18">
|
||||||
<tr>
|
<tr>
|
||||||
@ -201,7 +205,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong class="title" style="font-size: 10pt; margin-bottom: 12px">
|
<strong class="title" style="font-size: 10pt; margin-bottom: 10px">
|
||||||
Piyangoyu Yürütenin:
|
Piyangoyu Yürütenin:
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -250,7 +254,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong class="title" style="font-size: 10pt; margin-bottom: 12px">
|
<strong class="title" style="font-size: 10pt; margin-bottom: 10px">
|
||||||
2- Kampanyanın:
|
2- Kampanyanın:
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -260,7 +264,7 @@
|
|||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt">
|
style="margin-bottom: 10px; font-size: 10pt">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@ -306,7 +310,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong class="title" style="font-size: 10pt; margin-bottom: 12px">
|
<strong class="title" style="font-size: 10pt; margin-bottom: 10px">
|
||||||
3-Çekilişe katılma şekil ve şartları:
|
3-Çekilişe katılma şekil ve şartları:
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -317,7 +321,7 @@
|
|||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt">
|
style="margin-bottom: 10px; font-size: 10pt">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
@ -341,7 +345,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong class="title" style="font-size: 10pt; margin-bottom: 12px">
|
<strong class="title" style="font-size: 10pt; margin-bottom: 10px">
|
||||||
4-Çekilişin;
|
4-Çekilişin;
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -352,7 +356,7 @@
|
|||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt">
|
style="margin-bottom: 10px; font-size: 10pt">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
@ -402,7 +406,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong class="title" style="font-size: 10pt; margin-bottom: 12px">
|
<strong class="title" style="font-size: 10pt; margin-bottom: 10px">
|
||||||
5-Çekiliş sonuçlarının ilan edileceği gazetenin:
|
5-Çekiliş sonuçlarının ilan edileceği gazetenin:
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -413,7 +417,7 @@
|
|||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt">
|
style="margin-bottom: 10px; font-size: 10pt">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
@ -462,7 +466,7 @@
|
|||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt">
|
style="margin-bottom: 10px; font-size: 10pt">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
@ -508,7 +512,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong class="title" style="font-size: 10pt; margin-bottom: 12px">
|
<strong class="title" style="font-size: 10pt; margin-bottom: 10px">
|
||||||
7-Diğer hususlar:
|
7-Diğer hususlar:
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -519,7 +523,7 @@
|
|||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt">
|
style="margin-bottom: 10px; font-size: 10pt">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
@ -548,7 +552,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong class="title" style="font-size: 10pt; margin-bottom: 12px">
|
<strong class="title" style="font-size: 10pt; margin-bottom: 10px">
|
||||||
8-Piyangoya konu ikramiyeler:
|
8-Piyangoya konu ikramiyeler:
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -559,7 +563,7 @@
|
|||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
data-pdfmake="{'widths': ['10%', '30%', '15%', '15%', '15%', '15%'],'layout': 'pdfTableLayout'}"
|
data-pdfmake="{'widths': ['10%', '30%', '15%', '15%', '15%', '15%'],'layout': 'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt"
|
style="margin-bottom: 10px; font-size: 10pt"
|
||||||
v-if="piyangoIkramiyeStore.piyangoAllIkramiyeData.length > 0">
|
v-if="piyangoIkramiyeStore.piyangoAllIkramiyeData.length > 0">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
@ -619,7 +623,7 @@
|
|||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
class="table-no-line"
|
class="table-no-line"
|
||||||
data-pdfmake="{'widths': [ '50%', '30%','20%'],'layout':'pdfTableLayoutNoLine'}"
|
data-pdfmake="{'widths': [ '50%', '30%','20%'],'layout':'pdfTableLayoutNoLine'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt">
|
style="margin-bottom: 10px; font-size: 10pt">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
@ -628,7 +632,13 @@
|
|||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>
|
<td>
|
||||||
Tarih: / /
|
Tarih:{{
|
||||||
|
dateStore.dateFormat({
|
||||||
|
date: new Date(),
|
||||||
|
pattern: 'dd-mm-yy',
|
||||||
|
splitDate: '/'
|
||||||
|
})
|
||||||
|
}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
style="
|
style="
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-size: 14pt;
|
font-size: 10pt;
|
||||||
margin-bottom: 12px;
|
margin-bottom: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
">
|
">
|
||||||
MİLLİ PİYANGO İDARESİ GENEL MÜDÜRLÜĞÜ
|
MİLLİ PİYANGO İDARESİ GENEL MÜDÜRLÜĞÜ
|
||||||
@ -12,6 +12,10 @@
|
|||||||
Bahisler ve Oyunlar Dairesi Başkanlığına
|
Bahisler ve Oyunlar Dairesi Başkanlığına
|
||||||
</strong>
|
</strong>
|
||||||
<br />
|
<br />
|
||||||
|
<strong style="font-size: 10pt; margin-bottom: 10px">
|
||||||
|
PİYANGO ID: {{ piyangoStore.lotteryData.piyangoId }}
|
||||||
|
</strong>
|
||||||
|
<br />
|
||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
class="table-no-line"
|
class="table-no-line"
|
||||||
@ -19,7 +23,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong style="font-size: 10pt; margin-bottom: 12px">
|
<strong style="font-size: 10pt; margin-bottom: 10px">
|
||||||
1- Piyangoyu Düzenleyenin:
|
1- Piyangoyu Düzenleyenin:
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -30,7 +34,7 @@
|
|||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt">
|
style="margin-bottom: 10px; font-size: 10pt">
|
||||||
<tbody>
|
<tbody>
|
||||||
<template v-if="piyangoStore.duzenleyenData.basvuruTipId === 18">
|
<template v-if="piyangoStore.duzenleyenData.basvuruTipId === 18">
|
||||||
<tr>
|
<tr>
|
||||||
@ -160,7 +164,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong class="title" style="font-size: 10pt; margin-bottom: 12px">
|
<strong class="title" style="font-size: 10pt; margin-bottom: 10px">
|
||||||
2- Piyangonun Geçerli Olduğu Yerler:
|
2- Piyangonun Geçerli Olduğu Yerler:
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -170,7 +174,7 @@
|
|||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt">
|
style="margin-bottom: 10px; font-size: 10pt">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
@ -193,7 +197,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong class="title" style="font-size: 10pt; margin-bottom: 12px">
|
<strong class="title" style="font-size: 10pt; margin-bottom: 10px">
|
||||||
3- Basılacak Biletlerin:
|
3- Basılacak Biletlerin:
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -203,7 +207,7 @@
|
|||||||
|
|
||||||
<table
|
<table
|
||||||
data-pdfmake="{'widths': [ '31%', '23%' , '23%' , '23%' ],'layout':'pdfTableLayout'}"
|
data-pdfmake="{'widths': [ '31%', '23%' , '23%' , '23%' ],'layout':'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt">
|
style="margin-bottom: 10px; font-size: 10pt">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
@ -279,7 +283,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong class="title" style="font-size: 10pt; margin-bottom: 12px">
|
<strong class="title" style="font-size: 10pt; margin-bottom: 10px">
|
||||||
4- Biletlerin Basımı
|
4- Biletlerin Basımı
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -289,7 +293,7 @@
|
|||||||
|
|
||||||
<table
|
<table
|
||||||
data-pdfmake="{'widths': [ '50%', '50%' ],'layout':'pdfTableLayout'}"
|
data-pdfmake="{'widths': [ '50%', '50%' ],'layout':'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt">
|
style="margin-bottom: 10px; font-size: 10pt">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
@ -314,7 +318,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong class="title" style="font-size: 10pt; margin-bottom: 12px">
|
<strong class="title" style="font-size: 10pt; margin-bottom: 10px">
|
||||||
5- Çekiliş Tarih, Saati ve Adresi:
|
5- Çekiliş Tarih, Saati ve Adresi:
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -325,7 +329,7 @@
|
|||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt">
|
style="margin-bottom: 10px; font-size: 10pt">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
@ -375,7 +379,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong class="title" style="font-size: 10pt; margin-bottom: 12px">
|
<strong class="title" style="font-size: 10pt; margin-bottom: 10px">
|
||||||
6- İkramiye Kazananların İlanı:
|
6- İkramiye Kazananların İlanı:
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -386,7 +390,7 @@
|
|||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt">
|
style="margin-bottom: 10px; font-size: 10pt">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
@ -442,7 +446,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong class="title" style="font-size: 10pt; margin-bottom: 12px">
|
<strong class="title" style="font-size: 10pt; margin-bottom: 10px">
|
||||||
7- Talihlilerin Başvuru Tarihi:
|
7- Talihlilerin Başvuru Tarihi:
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -453,7 +457,7 @@
|
|||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt">
|
style="margin-bottom: 10px; font-size: 10pt">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
@ -488,7 +492,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong class="title" style="font-size: 10pt; margin-bottom: 12px">
|
<strong class="title" style="font-size: 10pt; margin-bottom: 10px">
|
||||||
8- Diğer Hususlar:
|
8- Diğer Hususlar:
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -499,7 +503,7 @@
|
|||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
data-pdfmake="{'widths': [ '50%', '50%'],'layout':'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt">
|
style="margin-bottom: 10px; font-size: 10pt">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
@ -528,7 +532,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<strong class="title" style="font-size: 10pt; margin-bottom: 12px">
|
<strong class="title" style="font-size: 10pt; margin-bottom: 10px">
|
||||||
9-Piyangoya Konu İkramiyeler:
|
9-Piyangoya Konu İkramiyeler:
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
@ -539,7 +543,7 @@
|
|||||||
<table
|
<table
|
||||||
cellspacing="0"
|
cellspacing="0"
|
||||||
data-pdfmake="{'widths': ['10%', '45%', '15%', '15%', '15%'],'layout': 'pdfTableLayout'}"
|
data-pdfmake="{'widths': ['10%', '45%', '15%', '15%', '15%'],'layout': 'pdfTableLayout'}"
|
||||||
style="margin-bottom: 12px; font-size: 10pt"
|
style="margin-bottom: 10px; font-size: 10pt"
|
||||||
v-if="piyangoIkramiyeStore.piyangoAllIkramiyeData.length > 0">
|
v-if="piyangoIkramiyeStore.piyangoAllIkramiyeData.length > 0">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -605,8 +609,6 @@
|
|||||||
const dateStore = useDateStore()
|
const dateStore = useDateStore()
|
||||||
import { usePiyangoStore } from '../../stores/piyangoStore'
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
const piyangoStore = usePiyangoStore()
|
const piyangoStore = usePiyangoStore()
|
||||||
import { usePiyangoContactStore } from '../../stores/piyangoContactStore'
|
|
||||||
const piyangoContactStore = usePiyangoContactStore()
|
|
||||||
import { usePiyangoMecraStore } from '../../stores/piyangoMecraStore'
|
import { usePiyangoMecraStore } from '../../stores/piyangoMecraStore'
|
||||||
const piyangoMecraStore = usePiyangoMecraStore()
|
const piyangoMecraStore = usePiyangoMecraStore()
|
||||||
import { usePiyangoMecraService } from '../../service/piyangoMecraService'
|
import { usePiyangoMecraService } from '../../service/piyangoMecraService'
|
||||||
@ -615,8 +617,6 @@
|
|||||||
const piyangoIkramiyeStore = usePiyangoIkramiyeStore()
|
const piyangoIkramiyeStore = usePiyangoIkramiyeStore()
|
||||||
import { usePiyangoIkramiyeService } from '../../service/piyangoIkramiyeService'
|
import { usePiyangoIkramiyeService } from '../../service/piyangoIkramiyeService'
|
||||||
const piyangoIkramiyeService = usePiyangoIkramiyeService()
|
const piyangoIkramiyeService = usePiyangoIkramiyeService()
|
||||||
import { useCustomerIrtibatStore } from '@/module/uyeler/stores/customerIrtibatStore'
|
|
||||||
const customerIrtibatStore = useCustomerIrtibatStore()
|
|
||||||
import { useCustomerIrtibatService } from '@/module/uyeler/service/customerIrtibatService'
|
import { useCustomerIrtibatService } from '@/module/uyeler/service/customerIrtibatService'
|
||||||
const customerIrtibatService = useCustomerIrtibatService()
|
const customerIrtibatService = useCustomerIrtibatService()
|
||||||
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
|
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
|
||||||
|
|||||||
@ -29,9 +29,38 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-inner-comment waiting-d" v-if="!loaded">
|
||||||
|
Yükleniyor, lütfen bekleyiniz...
|
||||||
|
</div>
|
||||||
<div class="form-part-content" v-if="loaded">
|
<div class="form-part-content" v-if="loaded">
|
||||||
<lottery-states :piyangoAmac="piyangoStore.lotteryData.amacpiyangoId" />
|
<lottery-states :piyangoAmac="piyangoStore.lotteryData.amacpiyangoId" />
|
||||||
|
<template v-if="!piyangoStore.isNew">
|
||||||
|
<form-display
|
||||||
|
v-if="
|
||||||
|
piyangoStore.lotteryData.piyangoId !== undefined &&
|
||||||
|
piyangoStore.lotteryData.piyangoId !== null
|
||||||
|
"
|
||||||
|
v-model="piyangoStore.lotteryData.piyangoId"
|
||||||
|
label="Piyango ID"
|
||||||
|
size="1" />
|
||||||
|
<form-display
|
||||||
|
type="date"
|
||||||
|
v-if="
|
||||||
|
piyangoStore.lotteryData.izinTarihi !== undefined &&
|
||||||
|
piyangoStore.lotteryData.izinTarihi !== null
|
||||||
|
"
|
||||||
|
v-model="piyangoStore.lotteryData.izinTarihi"
|
||||||
|
half
|
||||||
|
label="İzin Tarihi" />
|
||||||
|
<form-display
|
||||||
|
v-if="
|
||||||
|
piyangoStore.lotteryData.izinSayisi !== undefined &&
|
||||||
|
piyangoStore.lotteryData.izinSayisi !== null
|
||||||
|
"
|
||||||
|
v-model="piyangoStore.lotteryData.izinSayisi"
|
||||||
|
half
|
||||||
|
label="İzin Sayısı" />
|
||||||
|
</template>
|
||||||
<form-input
|
<form-input
|
||||||
modelKey="cekilisBaslik"
|
modelKey="cekilisBaslik"
|
||||||
v-model="piyangoStore.lotteryData.baslik"
|
v-model="piyangoStore.lotteryData.baslik"
|
||||||
@ -80,7 +109,7 @@
|
|||||||
'/uyeler/detay/' +
|
'/uyeler/detay/' +
|
||||||
piyangoStore.lotteryData.baglisirketId +
|
piyangoStore.lotteryData.baglisirketId +
|
||||||
'/yetkili-uye/detay/' +
|
'/yetkili-uye/detay/' +
|
||||||
piyangoStore.lotteryData.duzenleyenId
|
piyangoStore.lotteryData.duzenleyenId+'/kisi-kurum-bilgileri'
|
||||||
"
|
"
|
||||||
class="button-c">
|
class="button-c">
|
||||||
Üyeyi Kontrol Et
|
Üyeyi Kontrol Et
|
||||||
@ -515,7 +544,7 @@
|
|||||||
piyangoStore.lotteryApprove = 0
|
piyangoStore.lotteryApprove = 0
|
||||||
piyangoStore.isNew = false
|
piyangoStore.isNew = false
|
||||||
piyangoStore.ResetLotteryData()
|
piyangoStore.ResetLotteryData()
|
||||||
router.push('/piyangolar/detay/' + form.id)
|
router.push('/piyangolar/detay/' + form.id + '/piyango-bilgileri')
|
||||||
} else {
|
} else {
|
||||||
GetData()
|
GetData()
|
||||||
}
|
}
|
||||||
@ -602,7 +631,7 @@
|
|||||||
|
|
||||||
let list = await dataStore.dataGet('Auth/userbyuserChildList/' + id)
|
let list = await dataStore.dataGet('Auth/userbyuserChildList/' + id)
|
||||||
|
|
||||||
childUsers.value = list.data.filter((p:Record<string,any>) => {
|
childUsers.value = list.data.filter((p: Record<string, any>) => {
|
||||||
return p.islemTipId === 4 || p.islemTipi === 'Üyelik Onaylandı'
|
return p.islemTipId === 4 || p.islemTipi === 'Üyelik Onaylandı'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,71 @@
|
|||||||
|
<template>
|
||||||
|
<div class="form-part">
|
||||||
|
<div class="form-part-title">
|
||||||
|
<h4>Çekiliş Tutanağı</h4>
|
||||||
|
<div class="form-part-title-buttons">
|
||||||
|
<icon-button
|
||||||
|
v-if="!usersStore.isPanelUser"
|
||||||
|
icon="plus"
|
||||||
|
class="ico-section ico-section-header-btn"
|
||||||
|
@click="AddNewDocument" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-part-content" v-if="cekilisTutanagiStore.loaded">
|
||||||
|
<template v-if="cekilisTutanagiStore.cekilisTutanagiList.length > 0">
|
||||||
|
<template v-for="(file, i) in cekilisTutanagiStore.cekilisTutanagiList">
|
||||||
|
<file-list-item
|
||||||
|
:data="file"
|
||||||
|
title="dokumanAdi"
|
||||||
|
:filePath="file.url"
|
||||||
|
:editable="false" />
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<div class="form-inner-comment">
|
||||||
|
<span>
|
||||||
|
Eklenmiş dosya bulunamadı. Üstteki butonu kullanarak dosya ekleyebilirsiniz.
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<panel-wrapper
|
||||||
|
v-if="cekilisTutanagiStore.documentPanel"
|
||||||
|
v-model="cekilisTutanagiStore.documentPanel"
|
||||||
|
panel-title="Doküman Ekle">
|
||||||
|
<template #panelContent>
|
||||||
|
<panel-piyango-cekilis-tutanagi />
|
||||||
|
</template>
|
||||||
|
<template #footerButton>
|
||||||
|
<div class="button-c button-save" @click="cekilisTutanagiService.SaveDocument">
|
||||||
|
Ekle
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</panel-wrapper>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onBeforeMount } from 'vue'
|
||||||
|
|
||||||
|
import PanelPiyangoCekilisTutanagi from '../panel/PanelPiyangoCekilisTutanagi.vue'
|
||||||
|
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||||
|
|
||||||
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
|
const usersStore = useUsersStore()
|
||||||
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
|
const piyangoStore = usePiyangoStore()
|
||||||
|
import { usePiyangoCekilisTutanagiStore } from '../../stores/piyangoCekilisTutanagiStore'
|
||||||
|
const cekilisTutanagiStore = usePiyangoCekilisTutanagiStore()
|
||||||
|
import { usePiyangoCekilisTutanagiService } from '../../service/piyangoCekilisTutanagiService'
|
||||||
|
const cekilisTutanagiService = usePiyangoCekilisTutanagiService()
|
||||||
|
|
||||||
|
const AddNewDocument = () => {
|
||||||
|
cekilisTutanagiStore.ResetForm()
|
||||||
|
cekilisTutanagiStore.isUpdate = false
|
||||||
|
cekilisTutanagiStore.documentPanel = true
|
||||||
|
}
|
||||||
|
|
||||||
|
onBeforeMount(async () => {
|
||||||
|
await cekilisTutanagiService.GetDocumentList()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
@ -100,8 +100,9 @@
|
|||||||
<form-input
|
<form-input
|
||||||
modelKey="taahhutEdilenIkramiyeAdedi"
|
modelKey="taahhutEdilenIkramiyeAdedi"
|
||||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.taahhutEdilenIkramiyeAdedi"
|
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.taahhutEdilenIkramiyeAdedi"
|
||||||
label="7. Taahhüt Edilen İkramiye"
|
label="7. Taahhüt Edilen İkramiye Adedi"
|
||||||
placeholder="Taahhüt Edilen İkramiye"
|
placeholder="Taahhüt Edilen İkramiye Adedi"
|
||||||
|
@keydown="validationStore.allowNumbersWithKeys"
|
||||||
@keyup="OnKeyup" />
|
@keyup="OnKeyup" />
|
||||||
|
|
||||||
<div class="form-part-title">
|
<div class="form-part-title">
|
||||||
@ -110,20 +111,23 @@
|
|||||||
<form-input
|
<form-input
|
||||||
modelKey="teslimEdilenIkramiyeAdedi"
|
modelKey="teslimEdilenIkramiyeAdedi"
|
||||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.teslimEdilenIkramiyeAdedi"
|
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.teslimEdilenIkramiyeAdedi"
|
||||||
label="Teslim Edilen İkramiye"
|
label="Teslim Edilen İkramiye Adedi"
|
||||||
placeholder="Teslim Edilen İkramiye"
|
placeholder="Teslim Edilen İkramiye Adedi"
|
||||||
|
@keydown="validationStore.allowNumbersWithKeys"
|
||||||
@keyup="OnKeyup" />
|
@keyup="OnKeyup" />
|
||||||
<form-input
|
<form-input
|
||||||
modelKey="asilIkramiyeSayisi"
|
modelKey="asilIkramiyeSayisi"
|
||||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.asilIkramiyeSayisi"
|
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.asilIkramiyeSayisi"
|
||||||
label="Teslim Edilen Asıl İkramiye"
|
label="Teslim Edilen Asıl İkramiye Adedi"
|
||||||
placeholder="Teslim Edilen Asıl İkramiye"
|
placeholder="Teslim Edilen Asıl İkramiye Adedi"
|
||||||
|
@keydown="validationStore.allowNumbersWithKeys"
|
||||||
@keyup="OnKeyup" />
|
@keyup="OnKeyup" />
|
||||||
<form-input
|
<form-input
|
||||||
modelKey="yedekIkramiyeSayisi"
|
modelKey="yedekIkramiyeSayisi"
|
||||||
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.yedekIkramiyeSayisi"
|
v-model="piyangoDosyaKapamaStore.dosyaKapamaData.yedekIkramiyeSayisi"
|
||||||
label="Teslim Edilen Yedek İkramiye"
|
label="Teslim Edilen Yedek İkramiye Adedi"
|
||||||
placeholder="Teslim Edilen Yedek İkramiye"
|
placeholder="Teslim Edilen Yedek İkramiye Adedi"
|
||||||
|
@keydown="validationStore.allowNumbersWithKeys"
|
||||||
@keyup="OnKeyup" />
|
@keyup="OnKeyup" />
|
||||||
<form-checkbox
|
<form-checkbox
|
||||||
label="Nüfus Cüzdanları"
|
label="Nüfus Cüzdanları"
|
||||||
@ -153,8 +157,9 @@
|
|||||||
v-model="
|
v-model="
|
||||||
piyangoDosyaKapamaStore.dosyaKapamaData.sureIcindesAlinmayanIkramiyeAdedi
|
piyangoDosyaKapamaStore.dosyaKapamaData.sureIcindesAlinmayanIkramiyeAdedi
|
||||||
"
|
"
|
||||||
label="Süresi İçinde Alınmayan İkramiye"
|
label="Süresi İçinde Alınmayan İkramiye Adedi"
|
||||||
placeholder="Süresi İçinde Alınmayan İkramiye"
|
placeholder="Süresi İçinde Alınmayan İkramiye Adedi"
|
||||||
|
@keydown="validationStore.allowNumbersWithKeys"
|
||||||
@keyup="OnKeyup" />
|
@keyup="OnKeyup" />
|
||||||
<form-checkbox
|
<form-checkbox
|
||||||
label="Tebligat"
|
label="Tebligat"
|
||||||
@ -223,6 +228,8 @@
|
|||||||
const piyangoDosyaKapamaStore = usePiyangoDosyaKapamaStore()
|
const piyangoDosyaKapamaStore = usePiyangoDosyaKapamaStore()
|
||||||
import { usePiyangoDosyaKapamaService } from '../../service/piyangoDosyaKapamaService'
|
import { usePiyangoDosyaKapamaService } from '../../service/piyangoDosyaKapamaService'
|
||||||
const piyangoDosyaKapamaService = usePiyangoDosyaKapamaService()
|
const piyangoDosyaKapamaService = usePiyangoDosyaKapamaService()
|
||||||
|
import { useValidationStore } from '@/stores/validationStore'
|
||||||
|
const validationStore = useValidationStore()
|
||||||
|
|
||||||
const OnKeyup = () => {
|
const OnKeyup = () => {
|
||||||
piyangoDosyaKapamaStore.formChanged = true
|
piyangoDosyaKapamaStore.formChanged = true
|
||||||
@ -234,6 +241,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
|
piyangoDosyaKapamaStore.formChanged = false
|
||||||
await piyangoDosyaKapamaService.GetDosyaKapama()
|
await piyangoDosyaKapamaService.GetDosyaKapama()
|
||||||
|
|
||||||
if (piyangoDosyaKapamaStore.isNew) {
|
if (piyangoDosyaKapamaStore.isNew) {
|
||||||
|
|||||||
@ -0,0 +1,112 @@
|
|||||||
|
<template>
|
||||||
|
<div class="form-part section-list" v-if="piyangoDosyaKapamaStore.loaded">
|
||||||
|
<list-table-content
|
||||||
|
title="Dosya Kapama İkramiye Listesi"
|
||||||
|
icon="draws"
|
||||||
|
:tableHeader="ikramiyeTableHeader"
|
||||||
|
:rowAction="EditIkramiye"
|
||||||
|
listText="İkramiye"
|
||||||
|
:addAction="NewIkramiye"
|
||||||
|
:apiList="'TeminatIadeEvrak/ByPiyangoId/' + piyangoStore.selectedLottery"
|
||||||
|
apiText="Dosya Kapama İkramiye Listesi"
|
||||||
|
v-model:refresh="piyangoDosyaKapamaStore.dosyaKapamaIkramiyeListesiRefresh"
|
||||||
|
rowNumber />
|
||||||
|
</div>
|
||||||
|
<panel-wrapper
|
||||||
|
wide
|
||||||
|
v-if="piyangoDosyaKapamaStore.dosyaKapamaIkramiyePanel"
|
||||||
|
v-model="piyangoDosyaKapamaStore.dosyaKapamaIkramiyePanel"
|
||||||
|
:panel-title="
|
||||||
|
piyangoDosyaKapamaStore.isDosyaKapamaIkramiyeUpdate
|
||||||
|
? 'İkramiye Düzenle'
|
||||||
|
: 'İkramiye Ekle'
|
||||||
|
">
|
||||||
|
<template #panelContent>
|
||||||
|
<panel-piyango-dosya-kapama-ikramiye />
|
||||||
|
</template>
|
||||||
|
<template #footerButton>
|
||||||
|
<div
|
||||||
|
class="button-c button-save"
|
||||||
|
@click="piyangoDosyaKapamaService.SaveDosyaKapamaIkramiye">
|
||||||
|
{{ piyangoDosyaKapamaStore.isDosyaKapamaIkramiyeUpdate ? 'Kaydet' : 'Ekle' }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</panel-wrapper>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
|
const piyangoStore = usePiyangoStore()
|
||||||
|
|
||||||
|
import { usePiyangoDosyaKapamaStore } from '../../stores/piyangoDosyaKapamaStore'
|
||||||
|
const piyangoDosyaKapamaStore = usePiyangoDosyaKapamaStore()
|
||||||
|
import { usePiyangoDosyaKapamaService } from '../../service/piyangoDosyaKapamaService'
|
||||||
|
const piyangoDosyaKapamaService = usePiyangoDosyaKapamaService()
|
||||||
|
|
||||||
|
import PanelPiyangoDosyaKapamaIkramiye from '../panel/PanelPiyangoDosyaKapamaIkramiye.vue'
|
||||||
|
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||||
|
|
||||||
|
const ikramiyeTableHeader = ref<Record<string, any>[]>([
|
||||||
|
{
|
||||||
|
name: 'tahhutEdilenIkramiye',
|
||||||
|
title: 'Taahhüt Edilen İkramiye',
|
||||||
|
style: { width: '20%' },
|
||||||
|
computeHtml: (v: Record<string, any>) => {
|
||||||
|
return `<span>${v.tahhutEdilenIkramiyeAdet} ${v.tahhutEdilenIkramiye}</span>`
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'teslimEdilenIkramiye',
|
||||||
|
title: 'Teslim Edilen İkramiye',
|
||||||
|
style: { width: '20%' },
|
||||||
|
computeHtml: (v: Record<string, any>) => {
|
||||||
|
let asil: string = ''
|
||||||
|
let yedek: string = ''
|
||||||
|
if (
|
||||||
|
v.teslimEdilenIkramiyeAsil &&
|
||||||
|
v.teslimEdilenIkramiyeAsil !== null &&
|
||||||
|
v.teslimEdilenIkramiyeAsil !== 0 &&
|
||||||
|
v.teslimEdilenIkramiyeAsil !== ''
|
||||||
|
) {
|
||||||
|
asil = `<span >${v.teslimEdilenIkramiyeAsil} ASIL</span>`
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
v.teslimEdilenIkramiyeYedek &&
|
||||||
|
v.teslimEdilenIkramiyeYedek !== null &&
|
||||||
|
v.teslimEdilenIkramiyeYedek !== 0 &&
|
||||||
|
v.teslimEdilenIkramiyeYedek !== ''
|
||||||
|
) {
|
||||||
|
yedek = `<span >${v.teslimEdilenIkramiyeYedek} YEDEK</span>`
|
||||||
|
}
|
||||||
|
return asil !== ''
|
||||||
|
? yedek !== ''
|
||||||
|
? asil + '<br/>' + yedek
|
||||||
|
: asil
|
||||||
|
: yedek !== ''
|
||||||
|
? yedek
|
||||||
|
: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'alinmayanIkramiye',
|
||||||
|
title: 'Alınmayan İkramiye',
|
||||||
|
style: { width: '20%' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'aciklama',
|
||||||
|
title: 'Açıklama'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
const NewIkramiye = () => {
|
||||||
|
piyangoDosyaKapamaStore.ResetIkramiyeFormData()
|
||||||
|
piyangoDosyaKapamaStore.isDosyaKapamaIkramiyeUpdate = false
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyePanel = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const EditIkramiye = (d: Record<string, any>) => {
|
||||||
|
Object.assign(piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData, d)
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyePanel = true
|
||||||
|
piyangoDosyaKapamaStore.isDosyaKapamaIkramiyeUpdate = true
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@ -29,15 +29,9 @@
|
|||||||
</panel-wrapper>
|
</panel-wrapper>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onBeforeMount, watch } from 'vue'
|
import { ref, onBeforeMount, watch } from 'vue'
|
||||||
import { useDateStore } from '@/stores/dateStore'
|
|
||||||
const dateStore = useDateStore()
|
|
||||||
import { useGlobalStore } from '@/stores/globalStore'
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
import { useDataStore } from '@/stores/dataStore'
|
|
||||||
const dataStore = useDataStore()
|
|
||||||
import { useValidationStore } from '@/stores/validationStore'
|
|
||||||
const validationStore = useValidationStore()
|
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
import { usePiyangoStore } from '../../stores/piyangoStore'
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
|
|||||||
@ -18,7 +18,79 @@
|
|||||||
listVal="islemId"
|
listVal="islemId"
|
||||||
v-model="piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId"
|
v-model="piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId"
|
||||||
required
|
required
|
||||||
:invalidText="piyangoOnayValidationStore.invalidTexts.onayDurumuIslemTipiId" />
|
:invalidText="piyangoOnayValidationStore.invalidTexts.onayDurumuIslemTipiId">
|
||||||
|
<template #option="{ optionData }">
|
||||||
|
<span
|
||||||
|
v-if="optionData && optionData.tipAdi"
|
||||||
|
class="islem-status-badge"
|
||||||
|
:class="piyangoStore.GetIslemStatusClass(optionData.tipAdi)">
|
||||||
|
{{ optionData.tipAdi }}
|
||||||
|
</span>
|
||||||
|
<span v-else>{{ optionData?.tipAdi || optionData }}</span>
|
||||||
|
</template>
|
||||||
|
<template #activator="{ activatorData }">
|
||||||
|
<span
|
||||||
|
v-if="activatorData && activatorData.tipAdi"
|
||||||
|
class="islem-status-badge"
|
||||||
|
:class="piyangoStore.GetIslemStatusClass(activatorData.tipAdi)">
|
||||||
|
{{ activatorData.tipAdi }}
|
||||||
|
</span>
|
||||||
|
<span v-else>Lütfen Seçim Yapınız</span>
|
||||||
|
</template>
|
||||||
|
</form-select>
|
||||||
|
<template v-if="showIzinFields">
|
||||||
|
<form-date
|
||||||
|
type="date"
|
||||||
|
required
|
||||||
|
modelKey="izinTarihi"
|
||||||
|
v-model="piyangoOnayStore.piyangoOnayForm.izinTarihi"
|
||||||
|
label="İzin Tarihi"
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTexts.izinTarihi"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
<form-input
|
||||||
|
modelKey="izinSayisi"
|
||||||
|
v-model="piyangoOnayStore.piyangoOnayForm.izinSayisi"
|
||||||
|
required
|
||||||
|
label="İzin Sayısı"
|
||||||
|
placeholder="İzin Sayısı"
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTexts.izinSayisi"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
|
<form-textarea
|
||||||
|
v-model="piyangoOnayStore.piyangoOnayForm.izinAciklamasi"
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTexts.izinAciklamasi"
|
||||||
|
label="İzin Açıklaması"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
|
</template>
|
||||||
|
<form-select
|
||||||
|
v-if="showIzinVerildiFields || showMudurlukFields"
|
||||||
|
label="Müdürlük"
|
||||||
|
:listData="mudurlukListesi"
|
||||||
|
listText="name"
|
||||||
|
listVal="id"
|
||||||
|
v-model="piyangoOnayStore.piyangoOnayForm.mudurlukId"
|
||||||
|
required
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTexts.mudurlukId"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
<form-select
|
||||||
|
v-if="showIzinVerildiFields"
|
||||||
|
label="Çekiliş Görevlisi"
|
||||||
|
:listData="cekilisGorevlisiListesi"
|
||||||
|
listText="name"
|
||||||
|
listVal="id"
|
||||||
|
v-model="piyangoOnayStore.piyangoOnayForm.cekilisGorevlisiId"
|
||||||
|
required
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTexts.cekilisGorevlisiId"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
<form-select
|
||||||
|
v-if="showKapsamDisiSebebi"
|
||||||
|
label="Kapsam Dışı Sebebi"
|
||||||
|
:listData="kapsamDisiSebepListesi"
|
||||||
|
listText="name"
|
||||||
|
listVal="id"
|
||||||
|
v-model="piyangoOnayStore.piyangoOnayForm.kapsamDisiSebebi"
|
||||||
|
required
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTexts.kapsamDisiSebebi"
|
||||||
|
@change="OnKeyup" />
|
||||||
<form-file
|
<form-file
|
||||||
v-model="piyangoOnayStore.piyangoOnayForm.file"
|
v-model="piyangoOnayStore.piyangoOnayForm.file"
|
||||||
elclass="panel-documents-item"
|
elclass="panel-documents-item"
|
||||||
@ -32,16 +104,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onBeforeMount } from 'vue'
|
import { onBeforeMount, computed, ref } 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'
|
||||||
@ -52,6 +115,64 @@
|
|||||||
const piyangoDataStore = usePiyangoDataStore()
|
const piyangoDataStore = usePiyangoDataStore()
|
||||||
import { usePiyangoServices } from '../../service/piyangoServices'
|
import { usePiyangoServices } from '../../service/piyangoServices'
|
||||||
const piyangoServices = usePiyangoServices()
|
const piyangoServices = usePiyangoServices()
|
||||||
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
|
const piyangoStore = usePiyangoStore()
|
||||||
|
|
||||||
|
const kapsamDisiId = computed<number | null>(() => {
|
||||||
|
const kapsamDisi = piyangoDataStore.piyangoOnayDurumlari.find(
|
||||||
|
(item: Record<string, any>) => item.tipAdi === 'Kapsam Dışı'
|
||||||
|
)
|
||||||
|
return kapsamDisi ? kapsamDisi.islemId : null
|
||||||
|
})
|
||||||
|
|
||||||
|
const showIzinFields = computed<boolean>(() => {
|
||||||
|
return (
|
||||||
|
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === 4 ||
|
||||||
|
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
const showIzinVerildiFields = computed<boolean>(() => {
|
||||||
|
return piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === 4
|
||||||
|
})
|
||||||
|
|
||||||
|
const showMudurlukFields = computed<boolean>(() => {
|
||||||
|
return piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value
|
||||||
|
})
|
||||||
|
|
||||||
|
const showKapsamDisiSebebi = computed<boolean>(() => {
|
||||||
|
return piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value
|
||||||
|
})
|
||||||
|
|
||||||
|
const kapsamDisiSebepListesi = ref<Record<string, any>[]>([
|
||||||
|
{ id: '2/a', name: '2/a' },
|
||||||
|
{ id: '2/b', name: '2/b' },
|
||||||
|
{ id: '2/c', name: '2/c' },
|
||||||
|
{ id: '2/ç', name: '2/ç' },
|
||||||
|
{ id: '2/d', name: '2/d' },
|
||||||
|
{ id: '2/e', name: '2/e' },
|
||||||
|
{ id: '2/f', name: '2/f' },
|
||||||
|
{ id: '2/g', name: '2/g' },
|
||||||
|
{ id: 'Diğer', name: 'Diğer' }
|
||||||
|
])
|
||||||
|
|
||||||
|
const cekilisGorevlisiListesi = ref<Record<string, any>[]>([
|
||||||
|
{ id: 1, name: 'Antalya Şube Müdürlüğü' },
|
||||||
|
{ id: 2, name: 'Gaziantep Şube Müdürlüğü' },
|
||||||
|
{ id: 3, name: 'Aksaray Şube Müdürlüğü' },
|
||||||
|
{ id: 4, name: 'Kadıköy Şube Müdürlüğü' },
|
||||||
|
{ id: 5, name: 'Karşıyaka Şube Müdürlüğü' },
|
||||||
|
{ id: 6, name: 'Muğla Şube Müdürlüğü' },
|
||||||
|
{ id: 7, name: 'Trabzon Şube Müdürlüğü' },
|
||||||
|
{ id: 8, name: 'Noter' },
|
||||||
|
{ id: 9, name: 'Başkanlık Personeli' }
|
||||||
|
])
|
||||||
|
|
||||||
|
const mudurlukListesi = ref<Record<string, any>[]>([
|
||||||
|
{ id: 1, name: '1 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' },
|
||||||
|
{ id: 2, name: '2 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' },
|
||||||
|
{ id: 3, name: '3 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' }
|
||||||
|
])
|
||||||
|
|
||||||
const OnKeyup = () => {
|
const OnKeyup = () => {
|
||||||
piyangoOnayValidationStore.formChanged = true
|
piyangoOnayValidationStore.formChanged = true
|
||||||
|
|||||||
230
src/module/cekilisler/components/form/FormPiyangoOnayDurum.vue
Normal file
230
src/module/cekilisler/components/form/FormPiyangoOnayDurum.vue
Normal file
@ -0,0 +1,230 @@
|
|||||||
|
<template>
|
||||||
|
<list-table-content
|
||||||
|
v-if="loaded"
|
||||||
|
:tableHeader="tableHeader"
|
||||||
|
:rowAction="adminRowAction"
|
||||||
|
formTitle="Piyango Onay Durumları"
|
||||||
|
listText="Kayıt"
|
||||||
|
:apiList="'OnayDurumu/GetSonOnayDurumlariList/' + piyangoStore.selectedLottery"
|
||||||
|
apiText="Piyango Onay Log Listesi"
|
||||||
|
page="form"
|
||||||
|
:refresh="piyangoOnayStore.refreshList"
|
||||||
|
:rowActions="adminRowActions" />
|
||||||
|
<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>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onBeforeMount, computed } from 'vue'
|
||||||
|
import PanelPiyangoOnay from '../panel/PanelPiyangoOnay.vue'
|
||||||
|
import PanelWrapper from '@/components/PanelWrapper.vue'
|
||||||
|
|
||||||
|
import { useDateStore } from '@/stores/dateStore'
|
||||||
|
const dateStore = useDateStore()
|
||||||
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
|
const globalStore = useGlobalStore()
|
||||||
|
import { usePiyangoOnayStore } from '../../stores/piyangoOnayStore'
|
||||||
|
const piyangoOnayStore = usePiyangoOnayStore()
|
||||||
|
import { usePiyangoOnayService } from '../../service/piyangoOnayService'
|
||||||
|
const piyangoOnayService = usePiyangoOnayService()
|
||||||
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
|
const piyangoStore = usePiyangoStore()
|
||||||
|
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
|
||||||
|
const piyangoDataStore = usePiyangoDataStore()
|
||||||
|
import { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
const dialogStore = useDialogStore()
|
||||||
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
|
const dataStore = useDataStore()
|
||||||
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
|
const usersStore = useUsersStore()
|
||||||
|
|
||||||
|
const loaded = ref<boolean>(false)
|
||||||
|
|
||||||
|
const piyangoOnayDurumlari = computed<Record<string, any>[]>(() => {
|
||||||
|
return piyangoDataStore.piyangoOnayDurumlari
|
||||||
|
})
|
||||||
|
|
||||||
|
const mudurlukListesi = ref<Record<string, any>[]>([
|
||||||
|
{ id: 1, name: '1 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' },
|
||||||
|
{ id: 2, name: '2 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' },
|
||||||
|
{ id: 3, name: '3 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' }
|
||||||
|
])
|
||||||
|
|
||||||
|
const cekilisGorevlisiListesi = ref<Record<string, any>[]>([
|
||||||
|
{ id: 1, name: 'Antalya Şube Müdürlüğü' },
|
||||||
|
{ id: 2, name: 'Gaziantep Şube Müdürlüğü' },
|
||||||
|
{ id: 3, name: 'Aksaray Şube Müdürlüğü' },
|
||||||
|
{ id: 4, name: 'Kadıköy Şube Müdürlüğü' },
|
||||||
|
{ id: 5, name: 'Karşıyaka Şube Müdürlüğü' },
|
||||||
|
{ id: 6, name: 'Muğla Şube Müdürlüğü' },
|
||||||
|
{ id: 7, name: 'Trabzon Şube Müdürlüğü' },
|
||||||
|
{ id: 8, name: 'Noter' },
|
||||||
|
{ id: 9, name: 'Başkanlık Personeli' }
|
||||||
|
])
|
||||||
|
|
||||||
|
const tableHeader = ref<Record<string, any>[]>([
|
||||||
|
{
|
||||||
|
name: 'tarih',
|
||||||
|
title: 'Tarih',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.tarih === null
|
||||||
|
? ''
|
||||||
|
: dateStore.dateFormat({ pattern: 'dd-mm-yy', date: v.tarih })
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'date',
|
||||||
|
between: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'kisiAdi',
|
||||||
|
title: 'Kişi',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '20%' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'onayDurumuIslemTipiAdi',
|
||||||
|
title: 'İşlem',
|
||||||
|
sort: true,
|
||||||
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
|
const statusName = v.onayDurumuIslemTipiAdi || ''
|
||||||
|
const statusClass = piyangoStore.GetIslemStatusClass(statusName)
|
||||||
|
return `<span class='islem-status-badge ${statusClass}'>${statusName}</span>`
|
||||||
|
},
|
||||||
|
filter: {
|
||||||
|
type: 'select',
|
||||||
|
data: piyangoOnayDurumlari,
|
||||||
|
listVal: 'id',
|
||||||
|
listText: 'tipAdi',
|
||||||
|
filterId: 'onayDurumuIslemTipiId'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'aciklama',
|
||||||
|
title: 'Açıklama'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
dosyaUrl: 'aciklama',
|
||||||
|
title: 'Dosya',
|
||||||
|
computeHtml: (v: Record<string, any>) => {
|
||||||
|
if (v.dosyaUrl !== null && v.dosyaUrl !== undefined) {
|
||||||
|
return globalStore.TableCellDocument(v.dosyaUrl)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
style: { width: '20%' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'izinSayisi',
|
||||||
|
title: 'İzin Sayısı'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'izinTarihi',
|
||||||
|
title: 'İzin Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.izinTarihi === null || v.izinTarihi === undefined || v.izinTarihi === ''
|
||||||
|
? ''
|
||||||
|
: dateStore.dateFormat({ pattern: 'dd-mm-yy', date: v.izinTarihi })
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'izinAciklamasi',
|
||||||
|
title: 'İzin Açıklaması'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'kapsamDisiSebebi',
|
||||||
|
title: 'Kapsam Dışı Sebebi'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'mudurluk',
|
||||||
|
title: 'Müdürlük',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (v.mudurluk === null || v.mudurluk === undefined || v.mudurluk === '') {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
const mudurluk = mudurlukListesi.value.find((item: Record<string, any>) => item.id === v.mudurluk)
|
||||||
|
return mudurluk ? mudurluk.name : ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'cekilisGorevlisi',
|
||||||
|
title: 'Çekiliş Görevlisi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (v.cekilisGorevlisi === null || v.cekilisGorevlisi === undefined || v.cekilisGorevlisi === '') {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
const gorevli = cekilisGorevlisiListesi.value.find((item: Record<string, any>) => item.id === v.cekilisGorevlisi)
|
||||||
|
return gorevli ? gorevli.name : ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
])
|
||||||
|
|
||||||
|
const EditOnay = (d: Record<string, any>) => {
|
||||||
|
Object.assign(piyangoOnayStore.piyangoPanelOnayForm, {
|
||||||
|
...piyangoOnayStore.piyangoOnayBaseForm,
|
||||||
|
...d,
|
||||||
|
izinAciklamasi: d.izinAciklamasi != null ? d.izinAciklamasi : '',
|
||||||
|
kapsamDisiSebebi: d.kapsamDisiSebebi != null ? d.kapsamDisiSebebi : null,
|
||||||
|
mudurlukId: d.mudurluk != null ? d.mudurluk : null,
|
||||||
|
cekilisGorevlisiId: d.cekilisGorevlisi != null ? d.cekilisGorevlisi : null
|
||||||
|
})
|
||||||
|
piyangoOnayStore.onayFormPanel = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const DeleteRowPop = (data: Record<string, any>, i: number) => {
|
||||||
|
dialogStore.CreateDialog({
|
||||||
|
title: 'Onay Durumu Sil',
|
||||||
|
id: 'deleteonaydurumu',
|
||||||
|
content: 'Onay durumunu silmek istediğinize emin misiniz?',
|
||||||
|
closeText: 'Vazgeç',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
label: 'Sil',
|
||||||
|
type: 'alert',
|
||||||
|
function: () => DeleteRow(data.id)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const DeleteRow = async (id: number | string) => {
|
||||||
|
var dt = await dataStore.dataDelete('OnayDurumu/' + id, {
|
||||||
|
toast: { toast: 'Onay durumu başarıyla silindi', type: 'success' }
|
||||||
|
})
|
||||||
|
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
dialogStore.CloseDialog('deleteonaydurumu')
|
||||||
|
window.location.reload()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const rowActions = ref<Record<string, any>[]>([
|
||||||
|
{
|
||||||
|
text: 'Sil',
|
||||||
|
class: 'alert',
|
||||||
|
action: DeleteRowPop
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
const adminRowAction = computed(() => {
|
||||||
|
return usersStore.isPanelUser ? EditOnay : undefined
|
||||||
|
})
|
||||||
|
|
||||||
|
const adminRowActions = computed(() => {
|
||||||
|
return usersStore.isPanelUser ? rowActions.value : []
|
||||||
|
})
|
||||||
|
|
||||||
|
onBeforeMount(async () => {
|
||||||
|
loaded.value = true
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@ -4,33 +4,22 @@
|
|||||||
:tableHeader="tableHeader"
|
:tableHeader="tableHeader"
|
||||||
formTitle="Piyango Onay Logları"
|
formTitle="Piyango Onay Logları"
|
||||||
listText="Kayıt"
|
listText="Kayıt"
|
||||||
:apiList="'OnayDurumu/GetSonOnayDurumlariList/' + piyangoStore.selectedLottery"
|
:apiList="'OnayDurumLog/Cekilis/' + piyangoStore.selectedLottery"
|
||||||
apiText="Piyango Onay Log Listesi"
|
apiText="Piyango Onay Log Listesi"
|
||||||
page="form"
|
page="form"
|
||||||
:refresh="piyangoOnayStore.refreshList" />
|
:refresh="piyangoOnayStore.refreshList" />
|
||||||
</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',
|
||||||
@ -43,42 +32,28 @@
|
|||||||
sort: true,
|
sort: true,
|
||||||
filter: {
|
filter: {
|
||||||
type: 'date',
|
type: 'date',
|
||||||
range: true
|
between: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'kisiAdi',
|
name: 'islemYapanKullanici',
|
||||||
title: 'Kişi',
|
title: 'Kişi',
|
||||||
sort: true,
|
sort: true,
|
||||||
style: { width: '20%' }
|
style: { width: '20%' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'onayDurumuIslemTipiAdi',
|
name: 'eskiDurum',
|
||||||
title: 'İşlem',
|
title: 'Eski Durum'
|
||||||
sort: true,
|
},
|
||||||
filter: {
|
{
|
||||||
type: 'select',
|
name: 'yeniDurum',
|
||||||
data: piyangoOnayDurumlari,
|
title: 'Yeni Durum'
|
||||||
listVal: 'id',
|
|
||||||
listText: 'tipAdi',
|
|
||||||
filterId: 'onayDurumuIslemTipiId'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'aciklama',
|
name: 'aciklama',
|
||||||
title: 'Açıklama',
|
title: 'Açıklama',
|
||||||
sort: true,
|
sort: true,
|
||||||
style: { width: '30%' }
|
style: { width: '30%' }
|
||||||
},
|
|
||||||
{
|
|
||||||
dosyaUrl: 'aciklama',
|
|
||||||
title: 'Dosya',
|
|
||||||
computeHtml: (v: Record<string, any>) => {
|
|
||||||
if (v.dosyaUrl !== null && v.dosyaUrl !== undefined) {
|
|
||||||
return globalStore.TableCellDocument(v.dosyaUrl)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
style: { width: '20%' }
|
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,9 @@
|
|||||||
<div class="form-part">
|
<div class="form-part">
|
||||||
<div class="form-part-title">
|
<div class="form-part-title">
|
||||||
<h4>Piyango Resimleri</h4>
|
<h4>Piyango Resimleri</h4>
|
||||||
|
<a href="/data/mpi-sablon.zip" class="button-c" target="_blank">
|
||||||
|
Örnek Resim Şablonları
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-part-content">
|
<div class="form-part-content">
|
||||||
<template v-for="(file, i) in fileList">
|
<template v-for="(file, i) in fileList">
|
||||||
@ -9,7 +12,17 @@
|
|||||||
:data="file"
|
:data="file"
|
||||||
@click="EditImage"
|
@click="EditImage"
|
||||||
onlyPreview
|
onlyPreview
|
||||||
:filePath="file.resimYolu" />
|
:filePath="file.resimYolu">
|
||||||
|
<template
|
||||||
|
#actionButtons
|
||||||
|
v-if="piyangoStore.lotteryApprove === 0 || piyangoStore.lotteryApprove === 3">
|
||||||
|
<i
|
||||||
|
class="ico-c ico-btn ico-section back-grad-alert"
|
||||||
|
@click="DeleteImagePop(file)">
|
||||||
|
<svg><use href="/src/assets/images/icons.svg#trash"></use></svg>
|
||||||
|
</i>
|
||||||
|
</template>
|
||||||
|
</file-list-item>
|
||||||
</template>
|
</template>
|
||||||
<div
|
<div
|
||||||
class="form-item form-item-picture clickable"
|
class="form-item form-item-picture clickable"
|
||||||
@ -23,7 +36,9 @@
|
|||||||
</i>
|
</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="usersStore.isPanelUser && fileList.length === 0" class="form-inner-comment">
|
<div
|
||||||
|
v-if="usersStore.isPanelUser && fileList.length === 0"
|
||||||
|
class="form-inner-comment">
|
||||||
Eklenmiş resim bulunamadı.
|
Eklenmiş resim bulunamadı.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -57,16 +72,14 @@
|
|||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
import { usePiyangoStore } from '../../stores/piyangoStore'
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
const piyangoStore = usePiyangoStore()
|
const piyangoStore = usePiyangoStore()
|
||||||
|
import { useDialogStore } from '@/components/global/dialogStore'
|
||||||
|
const dialogStore = useDialogStore()
|
||||||
|
|
||||||
const picturePanel = ref<boolean>(false)
|
const picturePanel = ref<boolean>(false)
|
||||||
const isUpdate = ref<boolean>(false)
|
const isUpdate = ref<boolean>(false)
|
||||||
const isFormValid = ref<boolean>(true)
|
const isFormValid = ref<boolean>(true)
|
||||||
|
|
||||||
interface IFileList {
|
const fileList = ref<Record<string, any>[]>([])
|
||||||
[key: string]: any
|
|
||||||
}
|
|
||||||
|
|
||||||
const fileList = ref<IFileList[]>([] as IFileList[])
|
|
||||||
|
|
||||||
const AddNewImage = () => {
|
const AddNewImage = () => {
|
||||||
dataStore.panelData = {
|
dataStore.panelData = {
|
||||||
@ -82,7 +95,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
const GetData = async () => {
|
const GetData = async () => {
|
||||||
let dt = await dataStore.dataGet('CekilisResim/Cekilis/' + piyangoStore.selectedLottery)
|
let dt = await dataStore.dataGet(
|
||||||
|
'CekilisResim/Cekilis/' + piyangoStore.selectedLottery
|
||||||
|
)
|
||||||
if (dt !== 'errorfalse') fileList.value.splice(0, fileList.value.length, ...dt.data)
|
if (dt !== 'errorfalse') fileList.value.splice(0, fileList.value.length, ...dt.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,6 +144,30 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const DeleteImagePop = (data: Record<string, any>) => {
|
||||||
|
dialogStore.CreateDialog({
|
||||||
|
title: 'Resim Sil',
|
||||||
|
id: 'deleteimage',
|
||||||
|
content: 'Resimi silmek istediğinize emin misiniz? Bu işlem geri alınamaz.',
|
||||||
|
closeText: 'Vazgeç',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
label: 'Resmi Sil',
|
||||||
|
type: 'alert',
|
||||||
|
function: () => DeleteImage(data.id)
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const DeleteImage = async (id: number | string) => {
|
||||||
|
var dt = await dataStore.dataDelete('CekilisResim/' + id)
|
||||||
|
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
dialogStore.CloseDialog('deleteimage')
|
||||||
|
await GetData()
|
||||||
|
}
|
||||||
|
}
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
await GetData()
|
await GetData()
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,135 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="form-part form-title">
|
|
||||||
<div class="form-title-buttons">
|
|
||||||
<button
|
|
||||||
class="button-c button-save"
|
|
||||||
@click="piyangoTeminatService.SaveTeminatDurum"
|
|
||||||
:disabled="!piyangoTeminatValidationStore.formChanged">
|
|
||||||
Kaydet
|
|
||||||
</button>
|
|
||||||
<button
|
|
||||||
v-if="piyangoTeminatValidationStore.formChanged"
|
|
||||||
class="button-c button-cancel panel-close"
|
|
||||||
@click="piyangoTeminatStore.ResetFormData">
|
|
||||||
Vazgeç
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div :class="['form-part', piyangoTeminatValidationStore.formChanged ? 'changed' : '']">
|
|
||||||
<div class="form-part-title">
|
|
||||||
<h4>Teminat Durumu</h4>
|
|
||||||
</div>
|
|
||||||
<div class="form-part-content" v-if="piyangoTeminatStore.loaded">
|
|
||||||
<form-input
|
|
||||||
modelKey="amount"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.amount"
|
|
||||||
required
|
|
||||||
half
|
|
||||||
label="Tutarı"
|
|
||||||
minlength="2"
|
|
||||||
@keyup="OnKeyup"
|
|
||||||
@keydown="validationStore.allowPrice"
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.amount" />
|
|
||||||
|
|
||||||
<form-select
|
|
||||||
modelKey="teminatParentType"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminatParentType"
|
|
||||||
required
|
|
||||||
half
|
|
||||||
label="Para Birimi"
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.teminatParentType"
|
|
||||||
:listData="piyangoDataStore.piyangoTeminatParaBirimleri"
|
|
||||||
listVal="id"
|
|
||||||
listText="value"
|
|
||||||
@change="OnKeyup" />
|
|
||||||
|
|
||||||
<form-select
|
|
||||||
label="Teminat Türü"
|
|
||||||
:listData="piyangoDataStore.piyangoTeminatTurleri"
|
|
||||||
listText="value"
|
|
||||||
listVal="id"
|
|
||||||
half
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantChildType"
|
|
||||||
required
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.teminantChildType"
|
|
||||||
@change="OnKeyup" />
|
|
||||||
|
|
||||||
<form-date
|
|
||||||
type="date"
|
|
||||||
half
|
|
||||||
required
|
|
||||||
modelKey="teminantDate"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantDate"
|
|
||||||
label="Tarih"
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.teminantDate"
|
|
||||||
@change="OnKeyup" />
|
|
||||||
|
|
||||||
<form-input
|
|
||||||
modelKey="teminantNo"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.teminantNo"
|
|
||||||
required
|
|
||||||
half
|
|
||||||
label="No"
|
|
||||||
minlength="2"
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.teminantNo"
|
|
||||||
@keyup="OnKeyup" />
|
|
||||||
<div class="form-item form-item-half"></div>
|
|
||||||
|
|
||||||
<form-input
|
|
||||||
modelKey="bankName"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.bankName"
|
|
||||||
required
|
|
||||||
half
|
|
||||||
label="Banka Adı"
|
|
||||||
minlength="2"
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.bankName"
|
|
||||||
@keyup="OnKeyup" />
|
|
||||||
|
|
||||||
<form-input
|
|
||||||
modelKey="bankBranch"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.bankBranch"
|
|
||||||
required
|
|
||||||
half
|
|
||||||
label="Banka Şubesi"
|
|
||||||
minlength="2"
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.bankBranch"
|
|
||||||
@keyup="OnKeyup" />
|
|
||||||
|
|
||||||
<form-display :disabled="!usersStore.isPanelUser"
|
|
||||||
label="İşlem Durumu"
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.stateText" />
|
|
||||||
|
|
||||||
<form-file
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.file"
|
|
||||||
elclass="panel-documents-item"
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.file"
|
|
||||||
@change="OnKeyup" />
|
|
||||||
|
|
||||||
<form-textarea
|
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.description"
|
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.description"
|
|
||||||
label="Açıklama"
|
|
||||||
@keyup="OnKeyup" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { usePiyangoDataStore } from '../../stores/piyangoDataStore'
|
|
||||||
const piyangoDataStore = usePiyangoDataStore()
|
|
||||||
import { usePiyangoServices } from '../../service/piyangoServices'
|
|
||||||
const piyangoServices = usePiyangoServices()
|
|
||||||
import { useValidationStore } from '@/stores/validationStore'
|
|
||||||
const validationStore = useValidationStore()
|
|
||||||
import { usePiyangoTeminatStore } from '../../stores/piyangoTeminatStore'
|
|
||||||
const piyangoTeminatStore = usePiyangoTeminatStore()
|
|
||||||
import { usePiyangoTeminatValidationStore } from '../../validation/piyangoTeminatValidationStore'
|
|
||||||
const piyangoTeminatValidationStore = usePiyangoTeminatValidationStore()
|
|
||||||
import { usePiyangoTeminatService } from '../../service/piyangoTeminatService'
|
|
||||||
const piyangoTeminatService = usePiyangoTeminatService()
|
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
|
||||||
const usersStore = useUsersStore()
|
|
||||||
|
|
||||||
const OnKeyup = () => {
|
|
||||||
piyangoTeminatValidationStore.formChanged = true
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
@ -0,0 +1,339 @@
|
|||||||
|
<template>
|
||||||
|
<div class="panel-excel-upload-detail">
|
||||||
|
<div v-if="loading" class="detail-loading">Yükleniyor...</div>
|
||||||
|
<template v-else-if="job">
|
||||||
|
<div class="detail-summary">
|
||||||
|
<div class="detail-row detail-file-row">
|
||||||
|
<span class="detail-label">Dosya:</span>
|
||||||
|
<span class="detail-file-name">{{ job.fileName }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="detail-row">
|
||||||
|
<span class="detail-label">Durum:</span>
|
||||||
|
<span :class="['detail-status', 'status-' + job.status?.toLowerCase()]">
|
||||||
|
{{ statusText(job.status) }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="detail-row">
|
||||||
|
<span class="detail-label">İlerleme:</span>
|
||||||
|
<span>{{ job.progress }}%</span>
|
||||||
|
</div>
|
||||||
|
<div class="detail-stats">
|
||||||
|
<div class="detail-stat-item">
|
||||||
|
<span class="detail-stat-value">{{ job.totalRows }}</span>
|
||||||
|
<span class="detail-stat-label">Toplam Satır</span>
|
||||||
|
</div>
|
||||||
|
<div class="detail-stat-item detail-stat-inserted">
|
||||||
|
<span class="detail-stat-value">{{ job.insertedCount ?? 0 }}</span>
|
||||||
|
<span class="detail-stat-label">Eklenen</span>
|
||||||
|
</div>
|
||||||
|
<div class="detail-stat-item detail-stat-skipped">
|
||||||
|
<span class="detail-stat-value">{{ job.skippedRows ?? 0 }}</span>
|
||||||
|
<span class="detail-stat-label">Atlanan</span>
|
||||||
|
</div>
|
||||||
|
<div class="detail-stat-item detail-stat-duplicate">
|
||||||
|
<span class="detail-stat-value">{{ job.duplicateCount ?? 0 }}</span>
|
||||||
|
<span class="detail-stat-label">Duplicate</span>
|
||||||
|
</div>
|
||||||
|
<div class="detail-stat-item detail-stat-error">
|
||||||
|
<span class="detail-stat-value">{{ job.errorCount ?? 0 }}</span>
|
||||||
|
<span class="detail-stat-label">Hata</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="job.errorMessage" class="detail-error-box">
|
||||||
|
<span class="detail-error-label">Hata:</span>
|
||||||
|
<span>{{ job.errorMessage }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="detail-logs" v-if="logs && logs.length > 0">
|
||||||
|
<h4 class="detail-logs-title">İşlem Logları</h4>
|
||||||
|
<div class="logs-list">
|
||||||
|
<div
|
||||||
|
v-for="log in logs"
|
||||||
|
:key="log.id"
|
||||||
|
:class="['log-item', 'log-' + log.logLevel?.toLowerCase()]">
|
||||||
|
<span :class="['log-level', 'log-level-' + log.logLevel?.toLowerCase()]">{{ log.logLevel }}</span>
|
||||||
|
<span v-if="log.rowNumber" class="log-row">Satır {{ log.rowNumber }}</span>
|
||||||
|
<span class="log-message">{{ log.message }}</span>
|
||||||
|
<span v-if="log.details" class="log-details">{{ log.details }}</span>
|
||||||
|
<span class="log-time">{{ formatDate(log.createdAt) }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else class="detail-no-logs">Log kaydı bulunamadı.</div>
|
||||||
|
</template>
|
||||||
|
<div v-else class="detail-not-found">Yükleme detayı bulunamadı.</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted, watch } from 'vue'
|
||||||
|
import { usePiyangoKatilimciService } from '../../service/piyangoKatilimciService'
|
||||||
|
import { useDateStore } from '@/stores/dateStore'
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
jobGuid: string
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const piyangoKatilimciService = usePiyangoKatilimciService()
|
||||||
|
const dateStore = useDateStore()
|
||||||
|
|
||||||
|
const loading = ref(true)
|
||||||
|
const job = ref<Record<string, any> | null>(null)
|
||||||
|
const logs = ref<Record<string, any>[]>([])
|
||||||
|
|
||||||
|
const statusText = (status: string) => {
|
||||||
|
const map: Record<string, string> = {
|
||||||
|
Pending: 'Bekliyor',
|
||||||
|
Processing: 'İşleniyor',
|
||||||
|
Completed: 'Tamamlandı',
|
||||||
|
Failed: 'Başarısız'
|
||||||
|
}
|
||||||
|
return map[status] || status
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatDate = (val: string | Date) => {
|
||||||
|
if (!val) return '-'
|
||||||
|
return dateStore.dateFormat({ date: new Date(val), pattern: 'dd.mm.yyyy HH:MM' })
|
||||||
|
}
|
||||||
|
|
||||||
|
const loadDetail = async () => {
|
||||||
|
if (!props.jobGuid) return
|
||||||
|
loading.value = true
|
||||||
|
const data = await piyangoKatilimciService.GetUploadJobDetail(props.jobGuid)
|
||||||
|
if (data) {
|
||||||
|
job.value = data.job
|
||||||
|
logs.value = data.logs || []
|
||||||
|
} else {
|
||||||
|
job.value = null
|
||||||
|
logs.value = []
|
||||||
|
}
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => loadDetail())
|
||||||
|
watch(() => props.jobGuid, () => loadDetail())
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.panel-excel-upload-detail {
|
||||||
|
padding: 24px 24px 24px 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-loading {
|
||||||
|
text-align: center;
|
||||||
|
padding: 32px;
|
||||||
|
color: #5f6368;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-summary {
|
||||||
|
margin-bottom: 24px;
|
||||||
|
padding: 20px;
|
||||||
|
background: #fafbfc;
|
||||||
|
border: 1px solid #e8eaed;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-row {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 120px 1fr;
|
||||||
|
gap: 12px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-file-row {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-file-name {
|
||||||
|
font-weight: 600;
|
||||||
|
color: #1a1a2e;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-label {
|
||||||
|
font-weight: 600;
|
||||||
|
color: #5f6368;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-status {
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
padding: 4px 10px;
|
||||||
|
border-radius: 6px;
|
||||||
|
display: inline-block;
|
||||||
|
width: fit-content;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-status.status-completed {
|
||||||
|
color: #0d6832;
|
||||||
|
background: #d4edda;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-status.status-failed {
|
||||||
|
color: #721c24;
|
||||||
|
background: #f8d7da;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-status.status-processing {
|
||||||
|
color: #004085;
|
||||||
|
background: #cce5ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-status.status-pending {
|
||||||
|
color: #856404;
|
||||||
|
background: #fff3cd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-stats {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(5, 1fr);
|
||||||
|
gap: 12px;
|
||||||
|
margin: 16px 0;
|
||||||
|
padding: 16px 0;
|
||||||
|
border-top: 1px solid #e8eaed;
|
||||||
|
border-bottom: 1px solid #e8eaed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-stat-item {
|
||||||
|
text-align: center;
|
||||||
|
padding: 8px;
|
||||||
|
background: #f1f3f5;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-stat-value {
|
||||||
|
display: block;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #1a1a2e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-stat-label {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #5f6368;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-error-box {
|
||||||
|
margin-top: 16px;
|
||||||
|
padding: 12px 16px;
|
||||||
|
background: #fff5f5;
|
||||||
|
border: 1px solid #f8d7da;
|
||||||
|
border-radius: 6px;
|
||||||
|
color: #721c24;
|
||||||
|
font-size: 13px;
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-error-label {
|
||||||
|
font-weight: 600;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-not-found {
|
||||||
|
padding: 24px;
|
||||||
|
text-align: center;
|
||||||
|
color: #721c24;
|
||||||
|
background: #fff5f5;
|
||||||
|
border: 1px solid #f8d7da;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-logs-title {
|
||||||
|
margin: 0 0 12px;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #1a1a2e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logs-list {
|
||||||
|
max-height: 400px;
|
||||||
|
overflow-y: auto;
|
||||||
|
border: 1px solid #e8eaed;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: #fafbfc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.log-item {
|
||||||
|
padding: 10px 14px;
|
||||||
|
border-bottom: 1px solid #e8eaed;
|
||||||
|
font-size: 13px;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10px;
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.log-item:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.log-item.log-error {
|
||||||
|
background: #fff5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.log-item.log-warning {
|
||||||
|
background: #fffbf0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.log-item.log-info {
|
||||||
|
background: #f0f9ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.log-level {
|
||||||
|
font-weight: 600;
|
||||||
|
min-width: 60px;
|
||||||
|
font-size: 11px;
|
||||||
|
padding: 2px 8px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.log-level.log-level-error {
|
||||||
|
background: #f8d7da;
|
||||||
|
color: #721c24;
|
||||||
|
}
|
||||||
|
|
||||||
|
.log-level.log-level-warning {
|
||||||
|
background: #fff3cd;
|
||||||
|
color: #856404;
|
||||||
|
}
|
||||||
|
|
||||||
|
.log-level.log-level-info {
|
||||||
|
background: #cce5ff;
|
||||||
|
color: #004085;
|
||||||
|
}
|
||||||
|
|
||||||
|
.log-row {
|
||||||
|
color: #5f6368;
|
||||||
|
font-family: ui-monospace, monospace;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.log-message {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.log-details {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #5f6368;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.log-time {
|
||||||
|
font-size: 11px;
|
||||||
|
color: #80868b;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-no-logs {
|
||||||
|
padding: 24px;
|
||||||
|
color: #80868b;
|
||||||
|
text-align: center;
|
||||||
|
font-style: italic;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
<template>
|
||||||
|
<form-input
|
||||||
|
v-model="cekilisTutanagiStore.cekilisTutanagiForm.dokumanAdi"
|
||||||
|
label="Dosya Başlığı"
|
||||||
|
modelKey="dokumanAdi"
|
||||||
|
minlength="2"
|
||||||
|
:invalidText="cekilisTutanagiValidationStore.invalidTexts.dokumanAdi" />
|
||||||
|
<form-file
|
||||||
|
v-model="cekilisTutanagiStore.cekilisTutanagiForm.dosya"
|
||||||
|
elclass="panel-documents-item"
|
||||||
|
:invalidText="cekilisTutanagiValidationStore.invalidTexts.dosya" />
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { useValidationStore } from '@/stores/validationStore'
|
||||||
|
const validationStore = useValidationStore()
|
||||||
|
import { usePiyangoCekilisTutanagiStore } from '../../stores/piyangoCekilisTutanagiStore'
|
||||||
|
const cekilisTutanagiStore = usePiyangoCekilisTutanagiStore()
|
||||||
|
import { usePiyangoCekilisTutanagiValidationStore } from '../../validation/piyangoCekilisTutanagiValidationStore'
|
||||||
|
const cekilisTutanagiValidationStore = usePiyangoCekilisTutanagiValidationStore()
|
||||||
|
</script>
|
||||||
|
|
||||||
@ -0,0 +1,139 @@
|
|||||||
|
<template>
|
||||||
|
<form-select
|
||||||
|
@change="OnIkramiyeChanged"
|
||||||
|
modelKey="ikramiyeId"
|
||||||
|
clearable
|
||||||
|
label="Kazandığı İkramiye"
|
||||||
|
:listData="piyangoIkramiyeStore.piyangoAllIkramiyeData"
|
||||||
|
listText="cinsi"
|
||||||
|
listVal="id"
|
||||||
|
v-model="selectedIkramiye"
|
||||||
|
:invalidText="
|
||||||
|
piyangoDosyaKapamaValidationStore.ikramiyeInvalidTexts.tahhutEdilenIkramiye
|
||||||
|
">
|
||||||
|
<template #activator="data">
|
||||||
|
{{
|
||||||
|
data.activatorData !== undefined &&
|
||||||
|
Object.keys(data.activatorData).length > 0 &&
|
||||||
|
selectedIkramiye !== null
|
||||||
|
? data.activatorData.cinsi +
|
||||||
|
', ' +
|
||||||
|
data.activatorData.marka +
|
||||||
|
', ' +
|
||||||
|
data.activatorData.model +
|
||||||
|
' (' +
|
||||||
|
data.activatorData.asilTalihliAdedi +
|
||||||
|
' adet)'
|
||||||
|
: 'Lütfen Seçim Yapınız'
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
<template #option="data">
|
||||||
|
{{
|
||||||
|
data.optionData.cinsi +
|
||||||
|
', ' +
|
||||||
|
data.optionData.marka +
|
||||||
|
', ' +
|
||||||
|
data.optionData.model +
|
||||||
|
' (' +
|
||||||
|
data.optionData.asilTalihliAdedi +
|
||||||
|
' adet)'
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</form-select>
|
||||||
|
<div class="form-item">Toplam İkramiye: {{ totalIkramiye }}</div>
|
||||||
|
<form-input
|
||||||
|
v-model="piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeAsil"
|
||||||
|
label="Teslim Edilen İkramiye Asil Adet"
|
||||||
|
modelKey="teslimEdilenIkramiyeAsil"
|
||||||
|
:invalidText="
|
||||||
|
piyangoDosyaKapamaValidationStore.ikramiyeInvalidTexts.teslimEdilenIkramiyeAsil
|
||||||
|
"
|
||||||
|
@keydown="validationStore.allowNumbersWithKeys"
|
||||||
|
@keyup="CalculateAlinmayanIkramiye" />
|
||||||
|
<form-input
|
||||||
|
v-model="piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeYedek"
|
||||||
|
label="Teslim Edilen İkramiye Yedek Adet"
|
||||||
|
modelKey="teslimEdilenIkramiyeYedek"
|
||||||
|
:invalidText="
|
||||||
|
piyangoDosyaKapamaValidationStore.ikramiyeInvalidTexts.teslimEdilenIkramiyeYedek
|
||||||
|
"
|
||||||
|
@keydown="validationStore.allowNumbersWithKeys"
|
||||||
|
@keyup="CalculateAlinmayanIkramiye" />
|
||||||
|
<form-input
|
||||||
|
disabled
|
||||||
|
v-model="piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.alinmayanIkramiye"
|
||||||
|
label="Alınmayan İkramiye Adet"
|
||||||
|
modelKey="alinmayanIkramiye"
|
||||||
|
:invalidText="
|
||||||
|
piyangoDosyaKapamaValidationStore.ikramiyeInvalidTexts.alinmayanIkramiye
|
||||||
|
" />
|
||||||
|
<form-input
|
||||||
|
v-model="piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.aciklama"
|
||||||
|
label="Açıklama"
|
||||||
|
modelKey="aciklama" />
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { onBeforeMount, ref } from 'vue'
|
||||||
|
import { useValidationStore } from '@/stores/validationStore'
|
||||||
|
const validationStore = useValidationStore()
|
||||||
|
import { usePiyangoDosyaKapamaStore } from '../../stores/piyangoDosyaKapamaStore'
|
||||||
|
const piyangoDosyaKapamaStore = usePiyangoDosyaKapamaStore()
|
||||||
|
import { usePiyangoDosyaKapamaValidationStore } from '../../validation/piyangoDosyaKapamaValidationStore'
|
||||||
|
const piyangoDosyaKapamaValidationStore = usePiyangoDosyaKapamaValidationStore()
|
||||||
|
import { usePiyangoIkramiyeService } from '../../service/piyangoIkramiyeService'
|
||||||
|
const piyangoIkramiyeService = usePiyangoIkramiyeService()
|
||||||
|
import { usePiyangoIkramiyeStore } from '../../stores/piyangoIkramiyeStore'
|
||||||
|
const piyangoIkramiyeStore = usePiyangoIkramiyeStore()
|
||||||
|
|
||||||
|
const selectedIkramiye = ref<string | number | null>(null)
|
||||||
|
const totalIkramiye = ref<number | null>(null)
|
||||||
|
|
||||||
|
const CalculateAlinmayanIkramiye = () => {
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.alinmayanIkramiye =
|
||||||
|
Number(totalIkramiye.value) -
|
||||||
|
Number(
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeAsil || 0
|
||||||
|
) -
|
||||||
|
Number(
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeYedek || 0
|
||||||
|
)
|
||||||
|
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiye =
|
||||||
|
Number(
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeAsil || 0
|
||||||
|
) +
|
||||||
|
Number(
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeYedek || 0
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const OnIkramiyeChanged = (e: Event, val: any, item: Record<string, any>) => {
|
||||||
|
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.ikramiyeId = item.id
|
||||||
|
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.tahhutEdilenIkramiye = `
|
||||||
|
${item.cinsi}, ${item.marka}, ${item.model}, (${item.asilTalihliAdedi} adet)
|
||||||
|
`
|
||||||
|
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.tahhutEdilenIkramiyeAdet =
|
||||||
|
item.asilTalihliAdedi
|
||||||
|
}
|
||||||
|
|
||||||
|
onBeforeMount(async () => {
|
||||||
|
if (piyangoIkramiyeStore.piyangoAllIkramiyeData.length === 0)
|
||||||
|
await piyangoIkramiyeService.GetAllIkramiyeler()
|
||||||
|
|
||||||
|
piyangoIkramiyeStore.piyangoAllIkramiyeData.forEach((item) => {
|
||||||
|
if (
|
||||||
|
`${item.cinsi}, ${item.marka}, ${item.model}, (${item.asilTalihliAdedi} adet)` ===
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.tahhutEdilenIkramiye
|
||||||
|
) {
|
||||||
|
selectedIkramiye.value = item.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
totalIkramiye.value = piyangoIkramiyeStore.piyangoAllIkramiyeData.reduce(
|
||||||
|
(acc, item) => acc + (item.asilTalihliAdedi || 0),
|
||||||
|
0
|
||||||
|
)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@ -141,10 +141,10 @@
|
|||||||
"
|
"
|
||||||
half />
|
half />
|
||||||
<form-display
|
<form-display
|
||||||
v-model="piyangoKatilimciStore.piyangoKatilimciUserFormData.cekilisKatilimSiraNo"
|
v-model="piyangoKatilimciStore.piyangoKatilimciUserFormData.cekilisHakkiAdedi"
|
||||||
label="Katılım Sora No"
|
label="Çekiliş Hakkı Adedi"
|
||||||
:invalidText="
|
:invalidText="
|
||||||
piyangoKatilimciValidationStore.userFormInvalidTexts.cekilisKatilimSiraNo
|
piyangoKatilimciValidationStore.userFormInvalidTexts.cekilisHakkiAdedi
|
||||||
"
|
"
|
||||||
half />
|
half />
|
||||||
<form-display
|
<form-display
|
||||||
@ -287,6 +287,16 @@
|
|||||||
:invalidText="
|
:invalidText="
|
||||||
piyangoKatilimciValidationStore.userFormInvalidTexts.cekilisKatilimSiraNo
|
piyangoKatilimciValidationStore.userFormInvalidTexts.cekilisKatilimSiraNo
|
||||||
" />
|
" />
|
||||||
|
<form-input
|
||||||
|
@keyup="FormChanged"
|
||||||
|
modelKey="cekilisHakkiAdedi"
|
||||||
|
v-model="piyangoKatilimciStore.piyangoKatilimciUserFormData.cekilisHakkiAdedi"
|
||||||
|
half
|
||||||
|
label="Çekiliş Hakkı Adedi"
|
||||||
|
:invalidText="
|
||||||
|
piyangoKatilimciValidationStore.userFormInvalidTexts.cekilisHakkiAdedi
|
||||||
|
"
|
||||||
|
@keydown="validationStore.allowNumbersWithKeys" />
|
||||||
<form-input
|
<form-input
|
||||||
@keyup="FormChanged"
|
@keyup="FormChanged"
|
||||||
modelKey="magazaKartNumarasi"
|
modelKey="magazaKartNumarasi"
|
||||||
|
|||||||
172
src/module/cekilisler/components/panel/PanelPiyangoOnay.vue
Normal file
172
src/module/cekilisler/components/panel/PanelPiyangoOnay.vue
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
<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 #option="{ optionData }">
|
||||||
|
<span
|
||||||
|
v-if="optionData && optionData.tipAdi"
|
||||||
|
class="islem-status-badge"
|
||||||
|
:class="piyangoStore.GetIslemStatusClass(optionData.tipAdi)">
|
||||||
|
{{ optionData.tipAdi }}
|
||||||
|
</span>
|
||||||
|
<span v-else>{{ optionData?.tipAdi || optionData }}</span>
|
||||||
|
</template>
|
||||||
|
<template #activator="{ activatorData }">
|
||||||
|
<span
|
||||||
|
v-if="activatorData && activatorData.tipAdi"
|
||||||
|
class="islem-status-badge"
|
||||||
|
:class="piyangoStore.GetIslemStatusClass(activatorData.tipAdi)">
|
||||||
|
{{ activatorData.tipAdi }}
|
||||||
|
</span>
|
||||||
|
<span v-else>Lütfen Seçim Yapınız</span>
|
||||||
|
</template>
|
||||||
|
</form-select>
|
||||||
|
<template v-if="showIzinFields">
|
||||||
|
<form-date
|
||||||
|
type="date"
|
||||||
|
required
|
||||||
|
modelKey="izinTarihi"
|
||||||
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.izinTarihi"
|
||||||
|
label="İzin Tarihi"
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinTarihi"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
<form-input
|
||||||
|
modelKey="izinSayisi"
|
||||||
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.izinSayisi"
|
||||||
|
required
|
||||||
|
label="İzin Sayısı"
|
||||||
|
placeholder="İzin Sayısı"
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinSayisi"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
|
<form-textarea
|
||||||
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi"
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.izinAciklamasi"
|
||||||
|
label="İzin Açıklaması"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
|
</template>
|
||||||
|
<form-select
|
||||||
|
v-if="showIzinVerildiFields || showMudurlukFields"
|
||||||
|
label="Müdürlük"
|
||||||
|
:listData="mudurlukListesi"
|
||||||
|
listText="name"
|
||||||
|
listVal="id"
|
||||||
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.mudurlukId"
|
||||||
|
required
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.mudurlukId"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
<form-select
|
||||||
|
v-if="showIzinVerildiFields"
|
||||||
|
label="Çekiliş Görevlisi"
|
||||||
|
:listData="cekilisGorevlisiListesi"
|
||||||
|
listText="name"
|
||||||
|
listVal="id"
|
||||||
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.cekilisGorevlisiId"
|
||||||
|
required
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.cekilisGorevlisiId"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
<form-select
|
||||||
|
v-if="showKapsamDisiSebebi"
|
||||||
|
label="Kapsam Dışı Sebebi"
|
||||||
|
:listData="kapsamDisiSebepListesi"
|
||||||
|
listText="name"
|
||||||
|
listVal="id"
|
||||||
|
v-model="piyangoOnayStore.piyangoPanelOnayForm.kapsamDisiSebebi"
|
||||||
|
required
|
||||||
|
:invalidText="piyangoOnayValidationStore.invalidTextsPanel.kapsamDisiSebebi"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
<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, computed, ref } 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()
|
||||||
|
import { usePiyangoStore } from '../../stores/piyangoStore'
|
||||||
|
const piyangoStore = usePiyangoStore()
|
||||||
|
|
||||||
|
const kapsamDisiId = computed<number | null>(() => {
|
||||||
|
const kapsamDisi = piyangoDataStore.piyangoOnayDurumlari.find(
|
||||||
|
(item: Record<string, any>) => item.tipAdi === 'Kapsam Dışı'
|
||||||
|
)
|
||||||
|
return kapsamDisi ? kapsamDisi.islemId : null
|
||||||
|
})
|
||||||
|
|
||||||
|
const showIzinFields = computed<boolean>(() => {
|
||||||
|
return (
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === 4 ||
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
const showIzinVerildiFields = computed<boolean>(() => {
|
||||||
|
return piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === 4
|
||||||
|
})
|
||||||
|
|
||||||
|
const showMudurlukFields = computed<boolean>(() => {
|
||||||
|
return piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value
|
||||||
|
})
|
||||||
|
|
||||||
|
const showKapsamDisiSebebi = computed<boolean>(() => {
|
||||||
|
return piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value
|
||||||
|
})
|
||||||
|
|
||||||
|
const kapsamDisiSebepListesi = ref<Record<string, any>[]>([
|
||||||
|
{ id: '2/a', name: '2/a' },
|
||||||
|
{ id: '2/b', name: '2/b' },
|
||||||
|
{ id: '2/c', name: '2/c' },
|
||||||
|
{ id: '2/ç', name: '2/ç' },
|
||||||
|
{ id: '2/d', name: '2/d' },
|
||||||
|
{ id: '2/e', name: '2/e' },
|
||||||
|
{ id: '2/f', name: '2/f' },
|
||||||
|
{ id: '2/g', name: '2/g' },
|
||||||
|
{ id: 'Diğer', name: 'Diğer' }
|
||||||
|
])
|
||||||
|
|
||||||
|
const cekilisGorevlisiListesi = ref<Record<string, any>[]>([
|
||||||
|
{ id: 1, name: 'Antalya Şube Müdürlüğü' },
|
||||||
|
{ id: 2, name: 'Gaziantep Şube Müdürlüğü' },
|
||||||
|
{ id: 3, name: 'Aksaray Şube Müdürlüğü' },
|
||||||
|
{ id: 4, name: 'Kadıköy Şube Müdürlüğü' },
|
||||||
|
{ id: 5, name: 'Karşıyaka Şube Müdürlüğü' },
|
||||||
|
{ id: 6, name: 'Muğla Şube Müdürlüğü' },
|
||||||
|
{ id: 7, name: 'Trabzon Şube Müdürlüğü' },
|
||||||
|
{ id: 8, name: 'Noter' },
|
||||||
|
{ id: 9, name: 'Başkanlık Personeli' }
|
||||||
|
])
|
||||||
|
|
||||||
|
const mudurlukListesi = ref<Record<string, any>[]>([
|
||||||
|
{ id: 1, name: '1 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' },
|
||||||
|
{ id: 2, name: '2 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' },
|
||||||
|
{ id: 3, name: '3 No\'lu Özel Çekilişler İzin ve Takip Şubesi Müdürlüğü' }
|
||||||
|
])
|
||||||
|
|
||||||
|
const OnKeyup = () => {
|
||||||
|
piyangoOnayValidationStore.formChanged = true
|
||||||
|
}
|
||||||
|
|
||||||
|
onBeforeMount(async () => {
|
||||||
|
await piyangoServices.GetPiyangoOnayDurumList()
|
||||||
|
piyangoDataStore.RemoveOnayDurumIncelemeBekleniyor()
|
||||||
|
piyangoOnayStore.onayPanelLoaded = true
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@ -10,7 +10,40 @@
|
|||||||
required
|
required
|
||||||
:invalidText="piyangoTeminatValidationStore.invalidTexts.state"
|
:invalidText="piyangoTeminatValidationStore.invalidTexts.state"
|
||||||
@change="OnKeyup"
|
@change="OnKeyup"
|
||||||
:disabled="!usersStore.isPanelUser"/>
|
:disabled="!usersStore.isPanelUser" />
|
||||||
|
|
||||||
|
<template
|
||||||
|
v-if="
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.state === 2 ||
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.state === 3
|
||||||
|
">
|
||||||
|
<form-date
|
||||||
|
type="date"
|
||||||
|
half
|
||||||
|
modelKey="refundDate"
|
||||||
|
v-model="piyangoTeminatStore.piyangoTeminatFormData.refundDate"
|
||||||
|
label="İade Tarihi"
|
||||||
|
:invalidText="piyangoTeminatValidationStore.invalidTexts.refundDate"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
<form-input
|
||||||
|
modelKey="refundCount"
|
||||||
|
v-model="piyangoTeminatStore.piyangoTeminatFormData.refundCount"
|
||||||
|
half
|
||||||
|
label="Sayısı"
|
||||||
|
@keyup="OnKeyup"
|
||||||
|
:invalidText="piyangoTeminatValidationStore.invalidTexts.refundCount" />
|
||||||
|
<form-file
|
||||||
|
v-model="piyangoTeminatStore.piyangoTeminatFormData.refundDocumentUrl"
|
||||||
|
label='İade Yazısı'
|
||||||
|
elclass="panel-documents-item"
|
||||||
|
:invalidText="piyangoTeminatValidationStore.invalidTexts.refundDocumentUrl"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
<form-input
|
||||||
|
modelKey="refundDescription"
|
||||||
|
v-model="piyangoTeminatStore.piyangoTeminatFormData.refundDescription"
|
||||||
|
label="Klasör Arşiv No"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
|
</template>
|
||||||
|
|
||||||
<form-display
|
<form-display
|
||||||
v-model="piyangoTeminatStore.piyangoTeminatFormData.amount"
|
v-model="piyangoTeminatStore.piyangoTeminatFormData.amount"
|
||||||
@ -51,7 +84,10 @@
|
|||||||
label="Banka Şubesi" />
|
label="Banka Şubesi" />
|
||||||
|
|
||||||
<file-list-item
|
<file-list-item
|
||||||
v-if="piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl !== null && piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl !== undefined"
|
v-if="
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl !== null &&
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.teminantDocumentUrl !== undefined
|
||||||
|
"
|
||||||
title="Dosya"
|
title="Dosya"
|
||||||
:data="piyangoTeminatStore.piyangoTeminatFormData"
|
:data="piyangoTeminatStore.piyangoTeminatFormData"
|
||||||
:editable="false"
|
:editable="false"
|
||||||
|
|||||||
@ -2,4 +2,4 @@ import piyangoListe from '@/module/cekilisler/routes/piyango-liste'
|
|||||||
import piyangoYeni from '@/module/cekilisler/routes/piyango-yeni'
|
import piyangoYeni from '@/module/cekilisler/routes/piyango-yeni'
|
||||||
import piyangoDetay from '@/module/cekilisler/routes/piyango-detay'
|
import piyangoDetay from '@/module/cekilisler/routes/piyango-detay'
|
||||||
|
|
||||||
export default [piyangoListe, piyangoYeni, piyangoDetay]
|
export default [piyangoListe, piyangoYeni, ...piyangoDetay]
|
||||||
|
|||||||
@ -1,10 +1,19 @@
|
|||||||
import PiyangoDetay from '@/module/cekilisler/views/PiyangoDetay.vue'
|
import PiyangoDetay from '@/module/cekilisler/views/PiyangoDetay.vue'
|
||||||
|
|
||||||
export default {
|
export default [
|
||||||
path: '/piyangolar/detay/:piyangoId',
|
{
|
||||||
|
path: '/piyangolar/detay/:piyangoId/',
|
||||||
|
redirect: (to:Record<string,any>) => ({
|
||||||
|
name: 'PiyangoDetay',
|
||||||
|
params: { piyangoId: to.params.piyangoId, tabid: 'piyango-bilgileri' }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/piyangolar/detay/:piyangoId/:tabid',
|
||||||
name: 'PiyangoDetay',
|
name: 'PiyangoDetay',
|
||||||
component: PiyangoDetay,
|
component: PiyangoDetay,
|
||||||
meta: {
|
meta: {
|
||||||
authRequired: true
|
authRequired: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
|||||||
@ -0,0 +1,71 @@
|
|||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import { useDataStore } from '@/stores/dataStore'
|
||||||
|
import { usePiyangoStore } from '../stores/piyangoStore'
|
||||||
|
import { usePiyangoCekilisTutanagiStore } from '../stores/piyangoCekilisTutanagiStore'
|
||||||
|
import { usePiyangoCekilisTutanagiValidationStore } from '../validation/piyangoCekilisTutanagiValidationStore'
|
||||||
|
|
||||||
|
export const usePiyangoCekilisTutanagiService = defineStore('piyangoCekilisTutanagiService', () => {
|
||||||
|
const dataStore = useDataStore()
|
||||||
|
const piyangoStore = usePiyangoStore()
|
||||||
|
const cekilisTutanagiStore = usePiyangoCekilisTutanagiStore()
|
||||||
|
const cekilisTutanagiValidationStore = usePiyangoCekilisTutanagiValidationStore()
|
||||||
|
|
||||||
|
const GetDocumentList = async () => {
|
||||||
|
cekilisTutanagiStore.cekilisTutanagiList.splice(
|
||||||
|
0,
|
||||||
|
cekilisTutanagiStore.cekilisTutanagiList.length
|
||||||
|
)
|
||||||
|
|
||||||
|
let dt = await dataStore.dataGet('CekilisTutanak/Cekilis/' + piyangoStore.selectedLottery, {
|
||||||
|
params: {
|
||||||
|
pageSize: 50
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
const dataList = Array.isArray(dt) ? dt : (dt.data || [])
|
||||||
|
cekilisTutanagiStore.cekilisTutanagiList.splice(
|
||||||
|
0,
|
||||||
|
cekilisTutanagiStore.cekilisTutanagiList.length,
|
||||||
|
...dataList
|
||||||
|
)
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
cekilisTutanagiStore.loaded = true
|
||||||
|
}, 30)
|
||||||
|
}
|
||||||
|
|
||||||
|
const SaveDocument = async () => {
|
||||||
|
if (cekilisTutanagiValidationStore.FormCheck()) {
|
||||||
|
const formData = new FormData()
|
||||||
|
formData.append('dosya', cekilisTutanagiStore.cekilisTutanagiForm.dosya)
|
||||||
|
formData.append('dokumanAdi', cekilisTutanagiStore.cekilisTutanagiForm.dokumanAdi)
|
||||||
|
formData.append('cekilisId', String(piyangoStore.selectedLottery))
|
||||||
|
let dt: any
|
||||||
|
|
||||||
|
if (!cekilisTutanagiStore.isUpdate) {
|
||||||
|
dt = await dataStore.dataPost('CekilisTutanak', {
|
||||||
|
data: formData,
|
||||||
|
headers: { 'Content-Type': 'multipart/form-data' }
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
dt = await dataStore.dataPut(
|
||||||
|
'CekilisTutanak/' + cekilisTutanagiStore.cekilisTutanagiForm.id,
|
||||||
|
{
|
||||||
|
data: formData,
|
||||||
|
headers: { 'Content-Type': 'multipart/form-data' }
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
await GetDocumentList()
|
||||||
|
cekilisTutanagiStore.documentPanel = false
|
||||||
|
cekilisTutanagiStore.isUpdate = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cekilisTutanagiValidationStore.isFormValid = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return { GetDocumentList, SaveDocument }
|
||||||
|
})
|
||||||
|
|
||||||
@ -18,8 +18,8 @@ export const usePiyangoDosyaKapamaService = defineStore(
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (data !== 'errorfalse' || data.data.id === undefined) {
|
if (data !== 'errorfalse' || data.data.id === undefined) {
|
||||||
Object.assign(piyangoDosyaKapamaStore.dosyaKapamaData, data.data)
|
Object.assign(piyangoDosyaKapamaStore.dosyaKapamaData, data)
|
||||||
Object.assign(piyangoDosyaKapamaStore.safeDosyaKapamaData, data.data)
|
Object.assign(piyangoDosyaKapamaStore.safeDosyaKapamaData, data)
|
||||||
piyangoDosyaKapamaStore.isNew = false
|
piyangoDosyaKapamaStore.isNew = false
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
piyangoDosyaKapamaStore.loaded = true
|
piyangoDosyaKapamaStore.loaded = true
|
||||||
@ -31,20 +31,18 @@ export const usePiyangoDosyaKapamaService = defineStore(
|
|||||||
|
|
||||||
const SaveDosyaKapama = async () => {
|
const SaveDosyaKapama = async () => {
|
||||||
let dt: any
|
let dt: any
|
||||||
dataStore.panelData.yayinlanacagiTarih = new Date(
|
const localData = Object.assign({}, piyangoDosyaKapamaStore.dosyaKapamaData)
|
||||||
dataStore.panelData.yayinlanacagiTarih
|
if (localData.cekilisId === undefined)
|
||||||
)
|
localData.cekilisId = piyangoStore.selectedLottery
|
||||||
if (!piyangoDosyaKapamaStore.isUpdate) {
|
|
||||||
|
if (piyangoDosyaKapamaStore.isNew) {
|
||||||
dt = await dataStore.dataPost('TeminatIadeEvrakKontrol', {
|
dt = await dataStore.dataPost('TeminatIadeEvrakKontrol', {
|
||||||
data: piyangoDosyaKapamaStore.dosyaKapamaData
|
data: localData
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
dt = await dataStore.dataPut(
|
dt = await dataStore.dataPut('TeminatIadeEvrakKontrol/' + localData.id, {
|
||||||
'TeminatIadeEvrakKontrol/' + piyangoDosyaKapamaStore.dosyaKapamaData.id,
|
data: localData
|
||||||
{
|
})
|
||||||
data: piyangoDosyaKapamaStore.dosyaKapamaData
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
if (dt !== 'errorfalse') {
|
if (dt !== 'errorfalse') {
|
||||||
piyangoDosyaKapamaStore.isUpdate = false
|
piyangoDosyaKapamaStore.isUpdate = false
|
||||||
@ -52,6 +50,35 @@ export const usePiyangoDosyaKapamaService = defineStore(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return { GetDosyaKapama, SaveDosyaKapama }
|
const SaveDosyaKapamaIkramiye = async () => {
|
||||||
|
if (piyangoDosyaKapamaValidationStore.IkramiyeFormCheck()) {
|
||||||
|
let dt: any
|
||||||
|
const localData = Object.assign(
|
||||||
|
{},
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData
|
||||||
|
)
|
||||||
|
if (localData.cekilisId === undefined)
|
||||||
|
localData.cekilisId = piyangoStore.selectedLottery
|
||||||
|
|
||||||
|
if (!piyangoDosyaKapamaStore.isDosyaKapamaIkramiyeUpdate) {
|
||||||
|
dt = await dataStore.dataPost('TeminatIadeEvrak', {
|
||||||
|
data: localData
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
dt = await dataStore.dataPut('TeminatIadeEvrak/' + localData.id, {
|
||||||
|
data: localData
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
piyangoDosyaKapamaStore.isDosyaKapamaIkramiyeUpdate = false
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyePanel = false
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeListesiRefresh = true
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
piyangoDosyaKapamaValidationStore.isIkramiyeFormValid = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return { GetDosyaKapama, SaveDosyaKapama, SaveDosyaKapamaIkramiye }
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@ -15,6 +15,10 @@ export const usePiyangoKatilimciService = defineStore('piyangoKatilimciService',
|
|||||||
const SaveKatilimciUser = async () => {
|
const SaveKatilimciUser = async () => {
|
||||||
if (piyangoKatilimciValidationStore.UserFormCheck()) {
|
if (piyangoKatilimciValidationStore.UserFormCheck()) {
|
||||||
let form: any
|
let form: any
|
||||||
|
piyangoKatilimciStore.piyangoKatilimciUserFormData.cekilisHakkiAdedi = Math.max(
|
||||||
|
Number(piyangoKatilimciStore.piyangoKatilimciUserFormData.cekilisHakkiAdedi) || 1,
|
||||||
|
1
|
||||||
|
)
|
||||||
|
|
||||||
if (!piyangoKatilimciStore.isPiyangoKatilimciUserUpdate) {
|
if (!piyangoKatilimciStore.isPiyangoKatilimciUserUpdate) {
|
||||||
delete piyangoKatilimciStore.piyangoKatilimciUserFormData.id
|
delete piyangoKatilimciStore.piyangoKatilimciUserFormData.id
|
||||||
@ -62,7 +66,6 @@ export const usePiyangoKatilimciService = defineStore('piyangoKatilimciService',
|
|||||||
|
|
||||||
const KatilimciFileUpload = async () => {
|
const KatilimciFileUpload = async () => {
|
||||||
if (piyangoKatilimciValidationStore.FileFormCheck()) {
|
if (piyangoKatilimciValidationStore.FileFormCheck()) {
|
||||||
console.log('Katilimci File Upload')
|
|
||||||
const formData = new FormData()
|
const formData = new FormData()
|
||||||
formData.append('excelFile', piyangoKatilimciStore.piyangoKatilimciFileFormData.excelFile)
|
formData.append('excelFile', piyangoKatilimciStore.piyangoKatilimciFileFormData.excelFile)
|
||||||
let dt: any
|
let dt: any
|
||||||
@ -83,5 +86,46 @@ export const usePiyangoKatilimciService = defineStore('piyangoKatilimciService',
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return { SaveKatilimciUser, CreateOnlineDraw, KatilimciData, KatilimciFileUpload }
|
const GetUploadJobs = async (cekilisId: number): Promise<Record<string, any>[]> => {
|
||||||
|
const dt = await dataStore.dataGet(`ExcelUploadJob/my-jobs?cekilisId=${cekilisId}`)
|
||||||
|
if (dt !== 'errorfalse' && Array.isArray(dt)) {
|
||||||
|
return dt
|
||||||
|
}
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
|
||||||
|
const GetUploadJobDetail = async (guid: string): Promise<Record<string, any> | null> => {
|
||||||
|
const dt = await dataStore.dataGet(`ExcelUploadJob/${guid}`)
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
return dt
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
const GetUploadJobStatus = async (guid: string): Promise<Record<string, any> | null> => {
|
||||||
|
const dt = await dataStore.dataGet(`ExcelUploadJob/status/${guid}`)
|
||||||
|
if (dt !== 'errorfalse') {
|
||||||
|
return dt
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
const SubscribeToJob = async (guid: string, connectionId: string): Promise<boolean> => {
|
||||||
|
const result = await dataStore.dataPost(
|
||||||
|
`ExcelUploadJob/subscribe?guid=${guid}&connectionId=${encodeURIComponent(connectionId)}`,
|
||||||
|
{}
|
||||||
|
)
|
||||||
|
return result !== 'errorfalse'
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
SaveKatilimciUser,
|
||||||
|
CreateOnlineDraw,
|
||||||
|
KatilimciData,
|
||||||
|
KatilimciFileUpload,
|
||||||
|
GetUploadJobs,
|
||||||
|
GetUploadJobDetail,
|
||||||
|
GetUploadJobStatus,
|
||||||
|
SubscribeToJob
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import { usePiyangoStore } from '../stores/piyangoStore'
|
|||||||
import { usePiyangoOnayStore } from '../stores/piyangoOnayStore'
|
import { usePiyangoOnayStore } from '../stores/piyangoOnayStore'
|
||||||
import { usePiyangoOnayValidationStore } from '../validation/piyangoOnayValidationStore'
|
import { usePiyangoOnayValidationStore } from '../validation/piyangoOnayValidationStore'
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
|
import { usePiyangoDataStore } from '../stores/piyangoDataStore'
|
||||||
|
|
||||||
export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
|
export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
|
||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
@ -11,12 +12,42 @@ export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
|
|||||||
const piyangoOnayStore = usePiyangoOnayStore()
|
const piyangoOnayStore = usePiyangoOnayStore()
|
||||||
const piyangoOnayValidationStore = usePiyangoOnayValidationStore()
|
const piyangoOnayValidationStore = usePiyangoOnayValidationStore()
|
||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
|
const piyangoDataStore = usePiyangoDataStore()
|
||||||
|
|
||||||
|
const getKapsamDisiId = (): number | null => {
|
||||||
|
const kapsamDisi = piyangoDataStore.piyangoOnayDurumlari.find(
|
||||||
|
(item: Record<string, any>) => item.tipAdi === 'Kapsam Dışı'
|
||||||
|
)
|
||||||
|
return kapsamDisi ? kapsamDisi.islemId : null
|
||||||
|
}
|
||||||
|
|
||||||
|
const shouldKeepIzinFields = (islemTipiId: number | null): boolean => {
|
||||||
|
return islemTipiId === 4 || islemTipiId === getKapsamDisiId()
|
||||||
|
}
|
||||||
|
|
||||||
const SaveOnayDurum = async () => {
|
const SaveOnayDurum = async () => {
|
||||||
if (piyangoOnayValidationStore.FormCheck()) {
|
if (piyangoOnayValidationStore.FormCheck()) {
|
||||||
piyangoOnayStore.loaded = false
|
piyangoOnayStore.loaded = false
|
||||||
let form: any
|
let form: any
|
||||||
let dataForm = new FormData()
|
let dataForm = new FormData()
|
||||||
|
|
||||||
|
if (!shouldKeepIzinFields(piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId)) {
|
||||||
|
piyangoOnayStore.piyangoOnayForm.izinSayisi = ''
|
||||||
|
piyangoOnayStore.piyangoOnayForm.izinTarihi = ''
|
||||||
|
piyangoOnayStore.piyangoOnayForm.izinAciklamasi = ''
|
||||||
|
}
|
||||||
|
if (piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId !== getKapsamDisiId()) {
|
||||||
|
piyangoOnayStore.piyangoOnayForm.kapsamDisiSebebi = null
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId !== 4 &&
|
||||||
|
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId !== getKapsamDisiId()
|
||||||
|
) {
|
||||||
|
piyangoOnayStore.piyangoOnayForm.mudurlukId = null
|
||||||
|
}
|
||||||
|
if (piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId !== 4) {
|
||||||
|
piyangoOnayStore.piyangoOnayForm.cekilisGorevlisiId = null
|
||||||
|
}
|
||||||
dataForm.append(
|
dataForm.append(
|
||||||
'onayDurumuIslemTipiId',
|
'onayDurumuIslemTipiId',
|
||||||
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId
|
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId
|
||||||
@ -24,7 +55,33 @@ export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
|
|||||||
dataForm.append('onayCekilisId', String(piyangoStore.selectedLottery))
|
dataForm.append('onayCekilisId', String(piyangoStore.selectedLottery))
|
||||||
dataForm.append('kisiId', String(usersStore.userId))
|
dataForm.append('kisiId', String(usersStore.userId))
|
||||||
dataForm.append('file', piyangoOnayStore.piyangoOnayForm.file)
|
dataForm.append('file', piyangoOnayStore.piyangoOnayForm.file)
|
||||||
dataForm.append('aciklama', piyangoOnayStore.piyangoOnayForm.aciklama)
|
dataForm.append('aciklama', piyangoOnayStore.piyangoOnayForm.aciklama || '')
|
||||||
|
dataForm.append('izinSayisi', piyangoOnayStore.piyangoOnayForm.izinSayisi || '')
|
||||||
|
dataForm.append('izinTarihi', piyangoOnayStore.piyangoOnayForm.izinTarihi || '')
|
||||||
|
dataForm.append(
|
||||||
|
'izinAciklamasi',
|
||||||
|
piyangoOnayStore.piyangoOnayForm.izinAciklamasi != null
|
||||||
|
? String(piyangoOnayStore.piyangoOnayForm.izinAciklamasi)
|
||||||
|
: ''
|
||||||
|
)
|
||||||
|
dataForm.append(
|
||||||
|
'kapsamDisiSebebi',
|
||||||
|
piyangoOnayStore.piyangoOnayForm.kapsamDisiSebebi != null
|
||||||
|
? String(piyangoOnayStore.piyangoOnayForm.kapsamDisiSebebi)
|
||||||
|
: ''
|
||||||
|
)
|
||||||
|
dataForm.append(
|
||||||
|
'mudurluk',
|
||||||
|
piyangoOnayStore.piyangoOnayForm.mudurlukId != null
|
||||||
|
? String(piyangoOnayStore.piyangoOnayForm.mudurlukId)
|
||||||
|
: ''
|
||||||
|
)
|
||||||
|
dataForm.append(
|
||||||
|
'cekilisGorevlisi',
|
||||||
|
piyangoOnayStore.piyangoOnayForm.cekilisGorevlisiId != null
|
||||||
|
? String(piyangoOnayStore.piyangoOnayForm.cekilisGorevlisiId)
|
||||||
|
: ''
|
||||||
|
)
|
||||||
|
|
||||||
form = await dataStore.dataPost('OnayDurumu/', {
|
form = await dataStore.dataPost('OnayDurumu/', {
|
||||||
data: dataForm,
|
data: dataForm,
|
||||||
@ -36,15 +93,88 @@ export const usePiyangoOnayService = defineStore('piyangoOnayService', () => {
|
|||||||
piyangoOnayValidationStore.formChanged = false
|
piyangoOnayValidationStore.formChanged = false
|
||||||
piyangoStore.lotteryApprove =
|
piyangoStore.lotteryApprove =
|
||||||
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId
|
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId
|
||||||
piyangoOnayStore.refreshList = true
|
|
||||||
piyangoOnayStore.ResetForm()
|
piyangoOnayStore.ResetForm()
|
||||||
setTimeout(() => {
|
window.location.reload()
|
||||||
piyangoOnayStore.loaded = true
|
|
||||||
}, 10)
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
piyangoOnayValidationStore.isFormValid = true
|
piyangoOnayValidationStore.isFormValid = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return { SaveOnayDurum }
|
|
||||||
|
const SaveOnayDurumPanel = async () => {
|
||||||
|
if (piyangoOnayValidationStore.FormPanelCheck()) {
|
||||||
|
let form: any
|
||||||
|
let dataForm = new FormData()
|
||||||
|
|
||||||
|
if (!shouldKeepIzinFields(piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId)) {
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.izinSayisi = ''
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.izinTarihi = ''
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi = ''
|
||||||
|
}
|
||||||
|
if (piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId !== getKapsamDisiId()) {
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.kapsamDisiSebebi = null
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId !== 4 &&
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId !== getKapsamDisiId()
|
||||||
|
) {
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.mudurlukId = null
|
||||||
|
}
|
||||||
|
if (piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId !== 4) {
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.cekilisGorevlisiId = null
|
||||||
|
}
|
||||||
|
dataForm.append('onayDurumuIslemTipiId', piyangoOnayStore.piyangoPanelOnayForm.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 != null
|
||||||
|
? String(piyangoOnayStore.piyangoPanelOnayForm.izinAciklamasi)
|
||||||
|
: ''
|
||||||
|
)
|
||||||
|
dataForm.append(
|
||||||
|
'kapsamDisiSebebi',
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.kapsamDisiSebebi != null
|
||||||
|
? String(piyangoOnayStore.piyangoPanelOnayForm.kapsamDisiSebebi)
|
||||||
|
: ''
|
||||||
|
)
|
||||||
|
dataForm.append(
|
||||||
|
'mudurluk',
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.mudurlukId != null
|
||||||
|
? String(piyangoOnayStore.piyangoPanelOnayForm.mudurlukId)
|
||||||
|
: ''
|
||||||
|
)
|
||||||
|
dataForm.append(
|
||||||
|
'cekilisGorevlisi',
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.cekilisGorevlisiId != null
|
||||||
|
? String(piyangoOnayStore.piyangoPanelOnayForm.cekilisGorevlisiId)
|
||||||
|
: ''
|
||||||
|
)
|
||||||
|
|
||||||
|
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 = false
|
||||||
|
setTimeout(() => {
|
||||||
|
piyangoOnayStore.refreshList = true
|
||||||
|
}, 10)
|
||||||
|
piyangoOnayStore.onayFormPanel = false
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
piyangoOnayValidationStore.isPanelFormValid = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return { SaveOnayDurum, SaveOnayDurumPanel }
|
||||||
})
|
})
|
||||||
|
|||||||
@ -52,6 +52,11 @@ export const usePiyangoServices = defineStore('piyangoServices', () => {
|
|||||||
}
|
}
|
||||||
const GetPiyangoTeminatDurumList = async () => {
|
const GetPiyangoTeminatDurumList = async () => {
|
||||||
if (piyangoDataStore.piyangoTeminatDurumlari.length === 0) {
|
if (piyangoDataStore.piyangoTeminatDurumlari.length === 0) {
|
||||||
|
/*
|
||||||
|
1: Açık
|
||||||
|
2: İade
|
||||||
|
3: Zaman Aşımı İade
|
||||||
|
*/
|
||||||
let data = await dataStore.dataGet('TeminantStates/Durumlar')
|
let data = await dataStore.dataGet('TeminantStates/Durumlar')
|
||||||
piyangoDataStore.piyangoTeminatDurumlari = data
|
piyangoDataStore.piyangoTeminatDurumlari = data
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,7 +20,10 @@ export const usePiyangoTeminatService = defineStore('piyangoTeminatService', ()
|
|||||||
let dataForm = new FormData()
|
let dataForm = new FormData()
|
||||||
|
|
||||||
dataForm.append('state', piyangoTeminatStore.piyangoTeminatFormData.state)
|
dataForm.append('state', piyangoTeminatStore.piyangoTeminatFormData.state)
|
||||||
dataForm.append('amount', globalStore.floatEnLocale(piyangoTeminatStore.piyangoTeminatFormData.amount))
|
dataForm.append(
|
||||||
|
'amount',
|
||||||
|
globalStore.floatEnLocale(piyangoTeminatStore.piyangoTeminatFormData.amount)
|
||||||
|
)
|
||||||
dataForm.append('bankName', piyangoTeminatStore.piyangoTeminatFormData.bankName)
|
dataForm.append('bankName', piyangoTeminatStore.piyangoTeminatFormData.bankName)
|
||||||
dataForm.append('bankBranch', piyangoTeminatStore.piyangoTeminatFormData.bankBranch)
|
dataForm.append('bankBranch', piyangoTeminatStore.piyangoTeminatFormData.bankBranch)
|
||||||
dataForm.append(
|
dataForm.append(
|
||||||
@ -43,6 +46,32 @@ export const usePiyangoTeminatService = defineStore('piyangoTeminatService', ()
|
|||||||
'description',
|
'description',
|
||||||
piyangoTeminatStore.piyangoTeminatFormData.description
|
piyangoTeminatStore.piyangoTeminatFormData.description
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (usersStore.isPanelUser) {
|
||||||
|
if (piyangoTeminatStore.piyangoTeminatFormData.state === 1) {
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.refundDate = ''
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.refundCount = ''
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.refundDocumentUrl = ''
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.refundDescription = ''
|
||||||
|
}
|
||||||
|
dataForm.append(
|
||||||
|
'refundDate',
|
||||||
|
String(piyangoTeminatStore.piyangoTeminatFormData.refundDate)
|
||||||
|
)
|
||||||
|
dataForm.append(
|
||||||
|
'refundCount',
|
||||||
|
String(piyangoTeminatStore.piyangoTeminatFormData.refundCount)
|
||||||
|
)
|
||||||
|
dataForm.append(
|
||||||
|
'refundDocumentUrl',
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.refundDocumentUrl
|
||||||
|
)
|
||||||
|
dataForm.append(
|
||||||
|
'refundDescription',
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData.refundDescription
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
if (piyangoTeminatStore.isNew) {
|
if (piyangoTeminatStore.isNew) {
|
||||||
form = await dataStore.dataPost('TeminantStates/', {
|
form = await dataStore.dataPost('TeminantStates/', {
|
||||||
data: dataForm,
|
data: dataForm,
|
||||||
|
|||||||
@ -1,34 +1,68 @@
|
|||||||
import * as signalR from "@microsoft/signalr";
|
import * as signalR from '@microsoft/signalr'
|
||||||
import { v4 as uuidv4 } from "uuid";
|
|
||||||
|
|
||||||
let connection: signalR.HubConnection;
|
let connection: signalR.HubConnection | null = null
|
||||||
let connectionId = "";
|
|
||||||
|
export const connectToHub = async (): Promise<string> => {
|
||||||
|
console.log('Connecting to SignalR Hub...')
|
||||||
|
|
||||||
|
// Mevcut bağlantı varsa her durumda kapat (Connected, Reconnecting, Disconnected)
|
||||||
|
if (connection) {
|
||||||
|
try {
|
||||||
|
await connection.stop()
|
||||||
|
} catch {
|
||||||
|
// Bağlantı zaten kapalı olabilir, yoksay
|
||||||
|
}
|
||||||
|
connection = null
|
||||||
|
}
|
||||||
|
|
||||||
export const connectToHub = async () => {
|
|
||||||
connection = new signalR.HubConnectionBuilder()
|
connection = new signalR.HubConnectionBuilder()
|
||||||
.withUrl("https://panelapi.cekilisevi.gov.tr/uploadHub", {
|
.withUrl(import.meta.env.VITE_SOCKET_URL, {
|
||||||
withCredentials: false // Bu zorunlu, yoksa cookie vs gönderilmez
|
withCredentials: false,
|
||||||
}) // backend adresine göre düzenle
|
skipNegotiation: true,
|
||||||
|
transport: signalR.HttpTransportType.WebSockets
|
||||||
|
})
|
||||||
.withAutomaticReconnect()
|
.withAutomaticReconnect()
|
||||||
.build();
|
.build()
|
||||||
|
|
||||||
await connection.start();
|
// Eventleri ekle (connection artık tanımlı)
|
||||||
connectionId = connection.connectionId || uuidv4(); // SignalR id'si ya da frontend'de de guid üretilebilir
|
connection.on('ReceiveProgress', (data: any) => console.log('progress', data))
|
||||||
return connectionId;
|
connection.on('ReceiveInsertProgress', (data: any) => console.log('insert progress', data))
|
||||||
};
|
connection.on('ReceiveCompleted', (data: any) => console.log('completed', data))
|
||||||
|
connection.on('ReceiveError', (data: any) => console.log('error', data))
|
||||||
|
|
||||||
|
try {
|
||||||
|
await connection.start()
|
||||||
|
const connectionId = await connection.invoke<string>('GetConnectionId')
|
||||||
|
console.log('Connected to SignalR Hub with Connection ID:', connectionId)
|
||||||
|
return connectionId
|
||||||
|
} catch (err) {
|
||||||
|
connection = null
|
||||||
|
throw err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export const onProgress = (callback: (data: any) => void) => {
|
export const onProgress = (callback: (data: any) => void) => {
|
||||||
connection.on("ReceiveProgress", callback);
|
if (connection) connection.on('ReceiveProgress', callback)
|
||||||
};
|
}
|
||||||
|
|
||||||
export const onInsertProgress = (callback: (data: any) => void) => {
|
export const onInsertProgress = (callback: (data: any) => void) => {
|
||||||
connection.on("ReceiveInsertProgress", callback);
|
if (connection) connection.on('ReceiveInsertProgress', callback)
|
||||||
};
|
}
|
||||||
|
|
||||||
export const onCompleted = (callback: (data: any) => void) => {
|
export const onCompleted = (callback: (data: any) => void) => {
|
||||||
connection.on("ReceiveCompleted", callback);
|
if (connection) connection.on('ReceiveCompleted', callback)
|
||||||
};
|
}
|
||||||
|
|
||||||
export const onError = (callback: (data: any) => void) => {
|
export const onError = (callback: (data: any) => void) => {
|
||||||
connection.on("ReceiveError", callback);
|
if (connection) connection.on('ReceiveError', callback)
|
||||||
};
|
}
|
||||||
|
|
||||||
|
/** Upload event handler'larını kaldır (memory leak ve çoklu tetikleme önleme) */
|
||||||
|
export const removeUploadHandlers = () => {
|
||||||
|
if (connection) {
|
||||||
|
connection.off('ReceiveProgress')
|
||||||
|
connection.off('ReceiveInsertProgress')
|
||||||
|
connection.off('ReceiveCompleted')
|
||||||
|
connection.off('ReceiveError')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
37
src/module/cekilisler/stores/piyangoCekilisTutanagiStore.ts
Normal file
37
src/module/cekilisler/stores/piyangoCekilisTutanagiStore.ts
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import { ref, reactive } from 'vue'
|
||||||
|
import { usePiyangoStore } from './piyangoStore'
|
||||||
|
|
||||||
|
export const usePiyangoCekilisTutanagiStore = defineStore('piyangoCekilisTutanagiStore', () => {
|
||||||
|
const piyangoStore = usePiyangoStore()
|
||||||
|
|
||||||
|
const cekilisTutanagiList = ref<Record<string, any>[]>([])
|
||||||
|
const cekilisTutanagiBaseForm = reactive<Record<string, any>>({
|
||||||
|
dosya: null,
|
||||||
|
cekilisId: piyangoStore.selectedLottery,
|
||||||
|
dokumanAdi: ''
|
||||||
|
})
|
||||||
|
const cekilisTutanagiForm = reactive<Record<string, any>>({})
|
||||||
|
const cekilisTutanagiSafeForm = reactive<Record<string, any>>({})
|
||||||
|
const isUpdate = ref<boolean>(false)
|
||||||
|
const refreshList = ref<boolean>(false)
|
||||||
|
const documentPanel = ref<boolean>(false)
|
||||||
|
const loaded = ref<boolean>(false)
|
||||||
|
|
||||||
|
const ResetForm = () => {
|
||||||
|
Object.assign(cekilisTutanagiForm, cekilisTutanagiBaseForm)
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
cekilisTutanagiList,
|
||||||
|
cekilisTutanagiBaseForm,
|
||||||
|
cekilisTutanagiForm,
|
||||||
|
cekilisTutanagiSafeForm,
|
||||||
|
isUpdate,
|
||||||
|
refreshList,
|
||||||
|
documentPanel,
|
||||||
|
loaded,
|
||||||
|
ResetForm
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
@ -1,9 +1,14 @@
|
|||||||
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'
|
||||||
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
|
|
||||||
|
|
||||||
export const usePiyangoDosyaKapamaStore = defineStore('piyangoDosyaKapamaStore', () => {
|
export const usePiyangoDosyaKapamaStore = defineStore('piyangoDosyaKapamaStore', () => {
|
||||||
const globalStore = useGlobalStore()
|
const globalStore = useGlobalStore()
|
||||||
|
const piyangoStore = usePiyangoStore()
|
||||||
|
const usersStore = useUsersStore()
|
||||||
|
|
||||||
const baseDosyaKapamaData = reactive<Record<string, any>>({
|
const baseDosyaKapamaData = reactive<Record<string, any>>({
|
||||||
katilimSekli: '',
|
katilimSekli: '',
|
||||||
@ -36,7 +41,20 @@ export const usePiyangoDosyaKapamaStore = defineStore('piyangoDosyaKapamaStore',
|
|||||||
kuponAsli: false,
|
kuponAsli: false,
|
||||||
duyuruMateryali: false,
|
duyuruMateryali: false,
|
||||||
ikramiyelerinSonTeslimTarihi: '',
|
ikramiyelerinSonTeslimTarihi: '',
|
||||||
teminatIadeTarihi: ''
|
teminatIadeTarihi: '',
|
||||||
|
cekilisId: piyangoStore.selectedLottery
|
||||||
|
})
|
||||||
|
const baseDosyaKapamaIkramiyeData = reactive<Record<string, any>>({
|
||||||
|
taahhutEdilenIkramiye: '',
|
||||||
|
tahhutEdilenIkramiyeAdet: '',
|
||||||
|
teslimEdilenIkramiyeAsil: '',
|
||||||
|
teslimEdilenIkramiyeYedek: '',
|
||||||
|
teslimEdilenIkramiye: '',
|
||||||
|
alinmayanIkramiye: '',
|
||||||
|
aciklama: '',
|
||||||
|
duzenleyenId: usersStore.userId,
|
||||||
|
ikramiyeId:'',
|
||||||
|
cekilisId: piyangoStore.selectedLottery
|
||||||
})
|
})
|
||||||
const dosyaKapamaData = reactive<Record<string, any>>({})
|
const dosyaKapamaData = reactive<Record<string, any>>({})
|
||||||
const safeDosyaKapamaData = reactive<Record<string, any>>({})
|
const safeDosyaKapamaData = reactive<Record<string, any>>({})
|
||||||
@ -45,6 +63,13 @@ export const usePiyangoDosyaKapamaStore = defineStore('piyangoDosyaKapamaStore',
|
|||||||
const formChanged = ref<boolean>(false)
|
const formChanged = ref<boolean>(false)
|
||||||
const loaded = ref<boolean>(false)
|
const loaded = ref<boolean>(false)
|
||||||
|
|
||||||
|
const dosyaKapamaIkramiyeData = reactive<Record<string, any>>({})
|
||||||
|
const safeDosyaKapamaIkramiyeData = reactive<Record<string, any>>({})
|
||||||
|
const isDosyaKapamaIkramiyeUpdate = ref<boolean>(false)
|
||||||
|
const isDosyaKapamaIkramiyeFormChanged = ref<boolean>(false)
|
||||||
|
const isDosyaKapamaIkramiyeLoaded = ref<boolean>(false)
|
||||||
|
const dosyaKapamaIkramiyeListesiRefresh = ref<boolean>(false)
|
||||||
|
const dosyaKapamaIkramiyePanel = ref<boolean>(false)
|
||||||
|
|
||||||
const ResetFormData = () => {
|
const ResetFormData = () => {
|
||||||
globalStore.ResetObject(dosyaKapamaData, baseDosyaKapamaData)
|
globalStore.ResetObject(dosyaKapamaData, baseDosyaKapamaData)
|
||||||
@ -56,6 +81,11 @@ export const usePiyangoDosyaKapamaStore = defineStore('piyangoDosyaKapamaStore',
|
|||||||
Object.assign(dosyaKapamaData, safeDosyaKapamaData)
|
Object.assign(dosyaKapamaData, safeDosyaKapamaData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const ResetIkramiyeFormData = () => {
|
||||||
|
globalStore.ResetObject(dosyaKapamaIkramiyeData, baseDosyaKapamaIkramiyeData)
|
||||||
|
Object.assign(dosyaKapamaIkramiyeData, baseDosyaKapamaIkramiyeData)
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
baseDosyaKapamaData,
|
baseDosyaKapamaData,
|
||||||
dosyaKapamaData,
|
dosyaKapamaData,
|
||||||
@ -64,7 +94,16 @@ export const usePiyangoDosyaKapamaStore = defineStore('piyangoDosyaKapamaStore',
|
|||||||
isUpdate,
|
isUpdate,
|
||||||
formChanged,
|
formChanged,
|
||||||
loaded,
|
loaded,
|
||||||
|
baseDosyaKapamaIkramiyeData,
|
||||||
|
dosyaKapamaIkramiyeData,
|
||||||
|
safeDosyaKapamaIkramiyeData,
|
||||||
|
isDosyaKapamaIkramiyeUpdate,
|
||||||
|
isDosyaKapamaIkramiyeFormChanged,
|
||||||
|
isDosyaKapamaIkramiyeLoaded,
|
||||||
|
dosyaKapamaIkramiyeListesiRefresh,
|
||||||
|
dosyaKapamaIkramiyePanel,
|
||||||
ResetFormData,
|
ResetFormData,
|
||||||
RestoreFormData
|
RestoreFormData,
|
||||||
|
ResetIkramiyeFormData
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -31,6 +31,7 @@ export const usePiyangoIkramiyeStore = defineStore('piyangoIkramiyeStore', () =>
|
|||||||
const refreshList = ref<boolean>(false)
|
const refreshList = ref<boolean>(false)
|
||||||
const ikramiyePanel = ref<boolean>(false)
|
const ikramiyePanel = ref<boolean>(false)
|
||||||
const loaded = ref<boolean>(false)
|
const loaded = ref<boolean>(false)
|
||||||
|
const totalIkramiyeValue = ref<number>(0)
|
||||||
|
|
||||||
const totalIkramiyeValues = reactive<Record<string, any>>({
|
const totalIkramiyeValues = reactive<Record<string, any>>({
|
||||||
yedekTalihliAdedi: 'toplamyedektalihli',
|
yedekTalihliAdedi: 'toplamyedektalihli',
|
||||||
@ -69,6 +70,7 @@ export const usePiyangoIkramiyeStore = defineStore('piyangoIkramiyeStore', () =>
|
|||||||
ikramiyePanel,
|
ikramiyePanel,
|
||||||
loaded,
|
loaded,
|
||||||
totalIkramiyeValues,
|
totalIkramiyeValues,
|
||||||
|
totalIkramiyeValue,
|
||||||
ResetForm,
|
ResetForm,
|
||||||
CalculateToplamDeger
|
CalculateToplamDeger
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,6 +10,7 @@ export const usePiyangoKatilimciStore = defineStore('piyangoKatilimciStore', ()
|
|||||||
const piyangoKatilimciUserSafeFormData = reactive<Record<string, any>>({
|
const piyangoKatilimciUserSafeFormData = reactive<Record<string, any>>({
|
||||||
ikramiyeId: null,
|
ikramiyeId: null,
|
||||||
cekilisKatilimSiraNo: null,
|
cekilisKatilimSiraNo: null,
|
||||||
|
cekilisHakkiAdedi: 1,
|
||||||
sifreCode: '',
|
sifreCode: '',
|
||||||
magazaKartNumarasi: '',
|
magazaKartNumarasi: '',
|
||||||
adi: '',
|
adi: '',
|
||||||
|
|||||||
@ -12,13 +12,22 @@ export const usePiyangoOnayStore = defineStore('piyangoOnayStore', () => {
|
|||||||
onayCekilisId: piyangoStore.selectedLottery,
|
onayCekilisId: piyangoStore.selectedLottery,
|
||||||
kisiId: usersStore.userId,
|
kisiId: usersStore.userId,
|
||||||
aciklama: '',
|
aciklama: '',
|
||||||
file: ''
|
file: '',
|
||||||
|
izinSayisi: '',
|
||||||
|
izinTarihi: '',
|
||||||
|
izinAciklamasi: '',
|
||||||
|
kapsamDisiSebebi: null,
|
||||||
|
mudurlukId: null,
|
||||||
|
cekilisGorevlisiId: null
|
||||||
})
|
})
|
||||||
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)
|
||||||
@ -27,10 +36,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
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -48,7 +48,7 @@ export const usePiyangoStore = defineStore('piyangoStore', () => {
|
|||||||
])
|
])
|
||||||
|
|
||||||
const baseLotteryData = reactive<Record<string, any>>({
|
const baseLotteryData = reactive<Record<string, any>>({
|
||||||
amac:'',
|
amac: '',
|
||||||
amacpiyangoId: null,
|
amacpiyangoId: null,
|
||||||
duzenleyenId: null,
|
duzenleyenId: null,
|
||||||
baslik: '',
|
baslik: '',
|
||||||
@ -91,13 +91,14 @@ export const usePiyangoStore = defineStore('piyangoStore', () => {
|
|||||||
|
|
||||||
const duzenleyenLink = computed<string | null>(() => {
|
const duzenleyenLink = computed<string | null>(() => {
|
||||||
if (lotteryData.baglisirketId === null && lotteryData.duzenleyenId !== null)
|
if (lotteryData.baglisirketId === null && lotteryData.duzenleyenId !== null)
|
||||||
return '/uyeler/detay/' + lotteryData.duzenleyenId
|
return '/uyeler/detay/' + lotteryData.duzenleyenId + '/uye-bilgileri'
|
||||||
else if (lotteryData.duzenleyenId !== null && lotteryData.baglisirketId !== null)
|
else if (lotteryData.duzenleyenId !== null && lotteryData.baglisirketId !== null)
|
||||||
return (
|
return (
|
||||||
'/uyeler/detay/' +
|
'/uyeler/detay/' +
|
||||||
araciUyeData.baglisirketId +
|
lotteryData.baglisirketId +
|
||||||
'/yetkili-uye/detay/' +
|
'/yetkili-uye/detay/' +
|
||||||
lotteryData.duzenleyenId
|
lotteryData.duzenleyenId +
|
||||||
|
'/kisi-kurum-bilgileri'
|
||||||
)
|
)
|
||||||
else return null
|
else return null
|
||||||
})
|
})
|
||||||
@ -122,21 +123,49 @@ export const usePiyangoStore = defineStore('piyangoStore', () => {
|
|||||||
Object.assign(lotteryData, baseLotteryData)
|
Object.assign(lotteryData, baseLotteryData)
|
||||||
lotteryApprove.value = null
|
lotteryApprove.value = null
|
||||||
selectedLottery.value = null
|
selectedLottery.value = null
|
||||||
lotteryData.kapsamIl.splice(0,lotteryData.kapsamIl.length)
|
lotteryData.kapsamIl.splice(0, lotteryData.kapsamIl.length)
|
||||||
lotteryData.kapsamIlce.splice(0,lotteryData.kapsamIlce.length)
|
lotteryData.kapsamIlce.splice(0, lotteryData.kapsamIlce.length)
|
||||||
}
|
}
|
||||||
|
|
||||||
const ResetLotteryContent = () => {
|
const ResetLotteryContent = () => {
|
||||||
Object.assign(lotteryData, baseLotteryData)
|
Object.assign(lotteryData, baseLotteryData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const GetIslemStatusClass = (statusName: string | undefined): string => {
|
||||||
|
if (!statusName) {
|
||||||
|
return 'islem-status-default'
|
||||||
|
}
|
||||||
|
// Her duruma benzersiz canlı renkler atanıyor
|
||||||
|
const statusMap: Record<string, string> = {
|
||||||
|
'Bilgi/Belge Eksik/Yanlış': 'islem-status-coral',
|
||||||
|
'Üzerinde Çalışılıyor': 'islem-status-amber',
|
||||||
|
'Başvuru İşleme Alındı': 'islem-status-sky',
|
||||||
|
'Başvuru Uygun Görülmedi': 'islem-status-rose',
|
||||||
|
'İzin Öncesi İptal': 'islem-status-pink',
|
||||||
|
'Kapsam Dışı': 'islem-status-slate',
|
||||||
|
'İzin Verildi': 'islem-status-emerald',
|
||||||
|
'Ceza Verildi': 'islem-status-red',
|
||||||
|
'İzin Sonrası İptal': 'islem-status-salmon',
|
||||||
|
'Kampanya Olumlu Bitti': 'islem-status-mint',
|
||||||
|
'Mükerrer Başvuru': 'islem-status-peach',
|
||||||
|
'Bekliyor': 'islem-status-yellow',
|
||||||
|
'Onaylandı': 'islem-status-teal',
|
||||||
|
'Katılımcı Listesi Yüklendi': 'islem-status-cyan',
|
||||||
|
'Düzenleme Bekliyor': 'islem-status-orange',
|
||||||
|
'Ön Kayıt Kabul Edildi': 'islem-status-blue',
|
||||||
|
'Yardım Amaçlı Piyango Son Onay': 'islem-status-gold',
|
||||||
|
'İnceleme Bekleniyor': 'islem-status-lavender',
|
||||||
|
'Yeni Piyango': 'islem-status-violet',
|
||||||
|
'Başvuru Reddedildi': 'islem-status-crimson',
|
||||||
|
'Değişiklik Talep Ediliyor': 'islem-status-indigo'
|
||||||
|
}
|
||||||
|
return statusMap[statusName] || 'islem-status-default'
|
||||||
|
}
|
||||||
|
|
||||||
const LoterryStatusClass = (d: any): string => {
|
const LoterryStatusClass = (d: any): string => {
|
||||||
let cls = lotteryStatusTypes.value.filter((v) => {
|
// Yeni renk sistemini kullan, ama back-grad sınıfı ekle (geriye dönük uyumluluk için)
|
||||||
return v.name === d
|
const statusClass = GetIslemStatusClass(d)
|
||||||
})
|
return 'islem-status-badge ' + statusClass
|
||||||
if (cls !== undefined && cls !== null && cls.length !== 0)
|
|
||||||
return 'back-grad-' + cls[0].class
|
|
||||||
else return 'back-grad-waiting'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const SetLotteryControlData = (data: Record<string, any>) => {
|
const SetLotteryControlData = (data: Record<string, any>) => {
|
||||||
@ -180,6 +209,7 @@ export const usePiyangoStore = defineStore('piyangoStore', () => {
|
|||||||
ResetLotteryData,
|
ResetLotteryData,
|
||||||
ResetLotteryContent,
|
ResetLotteryContent,
|
||||||
LoterryStatusClass,
|
LoterryStatusClass,
|
||||||
|
GetIslemStatusClass,
|
||||||
SetLotteryControlData
|
SetLotteryControlData
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -23,7 +23,11 @@ export const usePiyangoTeminatStore = defineStore('piyangoTeminatStore', () => {
|
|||||||
cekilisId: piyangoStore.selectedLottery,
|
cekilisId: piyangoStore.selectedLottery,
|
||||||
kisiId: usersStore.userId,
|
kisiId: usersStore.userId,
|
||||||
description: '',
|
description: '',
|
||||||
file: ''
|
file: '',
|
||||||
|
refundDate: '',
|
||||||
|
refundCount: '',
|
||||||
|
refundDocumentUrl: '',
|
||||||
|
refundDescription:''
|
||||||
})
|
})
|
||||||
|
|
||||||
const piyangoTeminatFormData = reactive<Record<string, any>>({})
|
const piyangoTeminatFormData = reactive<Record<string, any>>({})
|
||||||
@ -31,7 +35,7 @@ export const usePiyangoTeminatStore = defineStore('piyangoTeminatStore', () => {
|
|||||||
const loaded = ref<boolean>(false)
|
const loaded = ref<boolean>(false)
|
||||||
const isNew = ref<boolean>(false)
|
const isNew = ref<boolean>(false)
|
||||||
const teminatPanel = ref<boolean>(false)
|
const teminatPanel = ref<boolean>(false)
|
||||||
const selectedTeminatId = ref<number|null>(null)
|
const selectedTeminatId = ref<number | null>(null)
|
||||||
const refreshList = ref<boolean>(false)
|
const refreshList = ref<boolean>(false)
|
||||||
|
|
||||||
const ResetFormData = () => {
|
const ResetFormData = () => {
|
||||||
|
|||||||
@ -0,0 +1,45 @@
|
|||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import { ref, reactive } from 'vue'
|
||||||
|
import { useValidationStore } from '@/stores/validationStore'
|
||||||
|
import { usePiyangoCekilisTutanagiStore } from '../stores/piyangoCekilisTutanagiStore'
|
||||||
|
|
||||||
|
export const usePiyangoCekilisTutanagiValidationStore = defineStore(
|
||||||
|
'piyangoCekilisTutanagiValidationStore',
|
||||||
|
() => {
|
||||||
|
const cekilisTutanagiStore = usePiyangoCekilisTutanagiStore()
|
||||||
|
const validationStore = useValidationStore()
|
||||||
|
|
||||||
|
const formChanged = ref<boolean>(false)
|
||||||
|
const isFormValid = ref<boolean>(true)
|
||||||
|
const invalidTexts = reactive<Record<string, any>>({})
|
||||||
|
|
||||||
|
const FormCheck = (): boolean => {
|
||||||
|
Object.assign(invalidTexts, {})
|
||||||
|
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
cekilisTutanagiStore.cekilisTutanagiForm,
|
||||||
|
invalidTexts,
|
||||||
|
'dokumanAdi',
|
||||||
|
'Döküman için bir başlık belirtmelisiniz.'
|
||||||
|
)
|
||||||
|
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
cekilisTutanagiStore.cekilisTutanagiForm,
|
||||||
|
invalidTexts,
|
||||||
|
'dosya',
|
||||||
|
'Bir döküman eklemelisiniz.'
|
||||||
|
)
|
||||||
|
|
||||||
|
isFormValid.value = Object.keys(invalidTexts).length === 0
|
||||||
|
return isFormValid.value
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
formChanged,
|
||||||
|
isFormValid,
|
||||||
|
invalidTexts,
|
||||||
|
FormCheck
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
@ -11,6 +11,8 @@ export const usePiyangoDosyaKapamaValidationStore = defineStore(
|
|||||||
|
|
||||||
const isFormValid = ref<boolean>(true)
|
const isFormValid = ref<boolean>(true)
|
||||||
const invalidTexts = reactive<Record<string, any>>({})
|
const invalidTexts = reactive<Record<string, any>>({})
|
||||||
|
const isIkramiyeFormValid = ref<boolean>(true)
|
||||||
|
const ikramiyeInvalidTexts = reactive<Record<string, any>>({})
|
||||||
|
|
||||||
const FormCheck = (): boolean => {
|
const FormCheck = (): boolean => {
|
||||||
Object.assign(invalidTexts, {})
|
Object.assign(invalidTexts, {})
|
||||||
@ -26,10 +28,98 @@ export const usePiyangoDosyaKapamaValidationStore = defineStore(
|
|||||||
return isFormValid.value
|
return isFormValid.value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const IkramiyeFormCheck = (): boolean => {
|
||||||
|
Object.assign(ikramiyeInvalidTexts, {})
|
||||||
|
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData,
|
||||||
|
ikramiyeInvalidTexts,
|
||||||
|
'tahhutEdilenIkramiye',
|
||||||
|
'Lütfen taahhüt edilen ikramiyeyi seçiniz.'
|
||||||
|
)
|
||||||
|
|
||||||
|
if (
|
||||||
|
validationStore.checkEmpty(
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.tahhutEdilenIkramiyeAdet
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
isIkramiyeFormValid.value = false
|
||||||
|
ikramiyeInvalidTexts.tahhutEdilenIkramiye =
|
||||||
|
'Lütfen taahhüt edilen ikramiyeyi seçiniz.'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
validationStore.checkEmpty(
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeAsil
|
||||||
|
) &&
|
||||||
|
validationStore.checkEmpty(
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeYedek
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
isIkramiyeFormValid.value = false
|
||||||
|
ikramiyeInvalidTexts.teslimEdilenIkramiyeAsil =
|
||||||
|
'Yedek ve asil talihli alanlarının en az biri dolu olmalıdır'
|
||||||
|
ikramiyeInvalidTexts.teslimEdilenIkramiyeYedek =
|
||||||
|
'Yedek ve asil talihli alanlarının en az biri dolu olmalıdır'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
!validationStore.checkEmpty(
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeAsil
|
||||||
|
) &&
|
||||||
|
!validationStore.checkEmpty(
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeYedek
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
if (
|
||||||
|
Number(
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeAsil
|
||||||
|
) +
|
||||||
|
Number(
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.teslimEdilenIkramiyeYedek
|
||||||
|
) !==
|
||||||
|
Number(piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.tahhutEdilenIkramiyeAdet)
|
||||||
|
) {
|
||||||
|
isIkramiyeFormValid.value = false
|
||||||
|
ikramiyeInvalidTexts.teslimEdilenIkramiyeAsil =
|
||||||
|
'Asil ve yedek talihli toplamları, toplam ikramiye adedi kadar olmalıdır.'
|
||||||
|
ikramiyeInvalidTexts.teslimEdilenIkramiyeYedek =
|
||||||
|
'Asil ve yedek talihli toplamları, toplam ikramiye adedi kadar olmalıdır.'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData,
|
||||||
|
ikramiyeInvalidTexts,
|
||||||
|
'alinmayanIkramiye',
|
||||||
|
'Alınmayan ikramiye adedi boş olamaz. En az 1 asil veya yedek ikramiye adedi giriniz.'
|
||||||
|
)
|
||||||
|
|
||||||
|
if (
|
||||||
|
!validationStore.checkEmpty(
|
||||||
|
piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.alinmayanIkramiye
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
if (
|
||||||
|
Number(piyangoDosyaKapamaStore.dosyaKapamaIkramiyeData.alinmayanIkramiye) < 0
|
||||||
|
) {
|
||||||
|
isIkramiyeFormValid.value = false
|
||||||
|
ikramiyeInvalidTexts.alinmayanIkramiye =
|
||||||
|
'Teslim edilen asil ve yedek ikramiye toplamları, toplam ikramiye kadar olmalıdır.'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
isIkramiyeFormValid.value = Object.keys(ikramiyeInvalidTexts).length === 0
|
||||||
|
return isIkramiyeFormValid.value
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
isFormValid,
|
isFormValid,
|
||||||
invalidTexts,
|
invalidTexts,
|
||||||
FormCheck
|
isIkramiyeFormValid,
|
||||||
|
ikramiyeInvalidTexts,
|
||||||
|
FormCheck,
|
||||||
|
IkramiyeFormCheck
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@ -96,6 +96,31 @@ export const usePiyangoKatilimciValidationStore = defineStore(
|
|||||||
'Lütfen soyadını giriniz.'
|
'Lütfen soyadını giriniz.'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoKatilimciStore.piyangoKatilimciUserFormData,
|
||||||
|
userFormInvalidTexts,
|
||||||
|
'cekilisHakkiAdedi',
|
||||||
|
'Lütfen çekiliş hakkı adedini giriniz.'
|
||||||
|
)
|
||||||
|
|
||||||
|
if (
|
||||||
|
!validationStore.checkEmpty(
|
||||||
|
piyangoKatilimciStore.piyangoKatilimciUserFormData.cekilisHakkiAdedi
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
const hakAdedi = Number(
|
||||||
|
piyangoKatilimciStore.piyangoKatilimciUserFormData.cekilisHakkiAdedi
|
||||||
|
)
|
||||||
|
|
||||||
|
if (!Number.isInteger(hakAdedi) || hakAdedi < 1) {
|
||||||
|
userFormInvalidTexts.cekilisHakkiAdedi =
|
||||||
|
'Çekiliş hakkı adedi en az 1 olmalıdır.'
|
||||||
|
isUserFormValid.value = false
|
||||||
|
} else {
|
||||||
|
delete userFormInvalidTexts.cekilisHakkiAdedi
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var today: Date | string = new Date()
|
var today: Date | string = new Date()
|
||||||
today = dateStore.dateFormat({
|
today = dateStore.dateFormat({
|
||||||
date: today,
|
date: today,
|
||||||
|
|||||||
@ -1,17 +1,32 @@
|
|||||||
import { defineStore } from 'pinia'
|
import { defineStore } from 'pinia'
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive, computed } from 'vue'
|
||||||
import { useValidationStore } from '@/stores/validationStore'
|
import { useValidationStore } from '@/stores/validationStore'
|
||||||
import { usePiyangoOnayStore } from '../stores/piyangoOnayStore'
|
import { usePiyangoOnayStore } from '../stores/piyangoOnayStore'
|
||||||
|
import { usePiyangoDataStore } from '../stores/piyangoDataStore'
|
||||||
|
|
||||||
export const usePiyangoOnayValidationStore = defineStore(
|
export const usePiyangoOnayValidationStore = defineStore(
|
||||||
'piyangoOnayValidationStore',
|
'piyangoOnayValidationStore',
|
||||||
() => {
|
() => {
|
||||||
const validationStore = useValidationStore()
|
const validationStore = useValidationStore()
|
||||||
const piyangoOnayStore = usePiyangoOnayStore()
|
const piyangoOnayStore = usePiyangoOnayStore()
|
||||||
|
const piyangoDataStore = usePiyangoDataStore()
|
||||||
|
|
||||||
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 kapsamDisiId = computed<number | null>(() => {
|
||||||
|
const kapsamDisi = piyangoDataStore.piyangoOnayDurumlari.find(
|
||||||
|
(item: Record<string, any>) => item.tipAdi === 'Kapsam Dışı'
|
||||||
|
)
|
||||||
|
return kapsamDisi ? kapsamDisi.islemId : null
|
||||||
|
})
|
||||||
|
|
||||||
|
const shouldValidateIzinFields = (islemTipiId: number | null): boolean => {
|
||||||
|
return islemTipiId === 4 || islemTipiId === kapsamDisiId.value
|
||||||
|
}
|
||||||
|
|
||||||
const FormCheck = (): boolean => {
|
const FormCheck = (): boolean => {
|
||||||
Object.assign(invalidTexts, {})
|
Object.assign(invalidTexts, {})
|
||||||
@ -22,15 +37,113 @@ export const usePiyangoOnayValidationStore = defineStore(
|
|||||||
'onayDurumuIslemTipiId',
|
'onayDurumuIslemTipiId',
|
||||||
'Bir işlem tipi seçmelisinz.'
|
'Bir işlem tipi seçmelisinz.'
|
||||||
)
|
)
|
||||||
|
if (shouldValidateIzinFields(piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId)) {
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoOnayStore.piyangoOnayForm,
|
||||||
|
invalidTexts,
|
||||||
|
'izinSayisi',
|
||||||
|
'İzin sayısı girmelisiniz.'
|
||||||
|
)
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoOnayStore.piyangoOnayForm,
|
||||||
|
invalidTexts,
|
||||||
|
'izinTarihi',
|
||||||
|
'İzin tarihi seçmelisiniz.'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === 4 ||
|
||||||
|
piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value
|
||||||
|
) {
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoOnayStore.piyangoOnayForm,
|
||||||
|
invalidTexts,
|
||||||
|
'mudurlukId',
|
||||||
|
'Müdürlük seçmelisiniz.'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === 4) {
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoOnayStore.piyangoOnayForm,
|
||||||
|
invalidTexts,
|
||||||
|
'cekilisGorevlisiId',
|
||||||
|
'Çekiliş görevlisi seçmelisiniz.'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (piyangoOnayStore.piyangoOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value) {
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoOnayStore.piyangoOnayForm,
|
||||||
|
invalidTexts,
|
||||||
|
'kapsamDisiSebebi',
|
||||||
|
'Kapsam dışı sebebi seçmelisiniz.'
|
||||||
|
)
|
||||||
|
}
|
||||||
isFormValid.value = Object.keys(invalidTexts).length === 0
|
isFormValid.value = Object.keys(invalidTexts).length === 0
|
||||||
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 (shouldValidateIzinFields(piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId)) {
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm,
|
||||||
|
invalidTextsPanel,
|
||||||
|
'izinSayisi',
|
||||||
|
'İzin sayısı girmelisiniz.'
|
||||||
|
)
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm,
|
||||||
|
invalidTextsPanel,
|
||||||
|
'izinTarihi',
|
||||||
|
'İzin tarihi seçmelisiniz.'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === 4 ||
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value
|
||||||
|
) {
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm,
|
||||||
|
invalidTextsPanel,
|
||||||
|
'mudurlukId',
|
||||||
|
'Müdürlük seçmelisiniz.'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === 4) {
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm,
|
||||||
|
invalidTextsPanel,
|
||||||
|
'cekilisGorevlisiId',
|
||||||
|
'Çekiliş görevlisi seçmelisiniz.'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (piyangoOnayStore.piyangoPanelOnayForm.onayDurumuIslemTipiId === kapsamDisiId.value) {
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoOnayStore.piyangoPanelOnayForm,
|
||||||
|
invalidTextsPanel,
|
||||||
|
'kapsamDisiSebebi',
|
||||||
|
'Kapsam dışı sebebi 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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@ -24,6 +24,18 @@ export const usePiyangoTeminatValidationStore = defineStore(
|
|||||||
'state',
|
'state',
|
||||||
'Lütfen işlem tipini seçiniz.'
|
'Lütfen işlem tipini seçiniz.'
|
||||||
)
|
)
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData,
|
||||||
|
invalidTexts,
|
||||||
|
'refundDate',
|
||||||
|
'Lütfen iade tarihini seçiniz.'
|
||||||
|
)
|
||||||
|
validationStore.IsFieldEmpty(
|
||||||
|
piyangoTeminatStore.piyangoTeminatFormData,
|
||||||
|
invalidTexts,
|
||||||
|
'refundCount',
|
||||||
|
'Lütfen iade sayı no giriniz.'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
validationStore.IsFieldEmpty(
|
validationStore.IsFieldEmpty(
|
||||||
|
|||||||
@ -167,7 +167,19 @@ export const usePiyangoValidationStore = defineStore('piyangoValidationStore', (
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
const ikramiyeTeslimMin = computed((): Date => {
|
const ikramiyeTeslimMin = computed((): Date => {
|
||||||
return piyangoStore.lotteryData.asilSonBasvuruTarihi
|
var date: Date = new Date()
|
||||||
|
|
||||||
|
if (piyangoStore.lotteryData.amacpiyangoId !== 2) {
|
||||||
|
date = new Date(piyangoStore.lotteryData.yedekSonBasvuruTarihi)
|
||||||
|
} else {
|
||||||
|
date = new Date(piyangoStore.lotteryData.asilSonBasvuruTarihi)
|
||||||
|
}
|
||||||
|
var year = date.getFullYear()
|
||||||
|
var month = date.getMonth()
|
||||||
|
var day = date.getDate()
|
||||||
|
|
||||||
|
let newDate = new Date(year, month, day + 1)
|
||||||
|
return newDate
|
||||||
})
|
})
|
||||||
const ikramiyeTeslimMax = computed((): Date => {
|
const ikramiyeTeslimMax = computed((): Date => {
|
||||||
var date: Date = new Date()
|
var date: Date = new Date()
|
||||||
@ -472,7 +484,10 @@ export const usePiyangoValidationStore = defineStore('piyangoValidationStore', (
|
|||||||
date: ilanTarihi2Max.value,
|
date: ilanTarihi2Max.value,
|
||||||
pattern: 'dd-mm-yy'
|
pattern: 'dd-mm-yy'
|
||||||
})
|
})
|
||||||
|
if (ilan2min > ilan2max) {
|
||||||
|
isFormValid.value = false
|
||||||
|
invalidTexts.ilantarihi2 = `Lütfen 1. ilan tarihini daha erken bir tarih ile değiştiriniz. 2. İlan tarihi 1. ilan tarihinden en az 1 gün sonra olabilir`
|
||||||
|
} else {
|
||||||
if (ilanTarihi2 < ilan2min || ilanTarihi2 > ilan2max) {
|
if (ilanTarihi2 < ilan2min || ilanTarihi2 > ilan2max) {
|
||||||
isFormValid.value = false
|
isFormValid.value = false
|
||||||
invalidTexts.ilantarihi2 = `2. İlan Tarihi ${ilan2mind} - ${ilan2maxd} tarihleri arasında olmalıdır.`
|
invalidTexts.ilantarihi2 = `2. İlan Tarihi ${ilan2mind} - ${ilan2maxd} tarihleri arasında olmalıdır.`
|
||||||
@ -481,6 +496,7 @@ export const usePiyangoValidationStore = defineStore('piyangoValidationStore', (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
validationStore.IsFieldEmpty(
|
validationStore.IsFieldEmpty(
|
||||||
piyangoStore.lotteryData,
|
piyangoStore.lotteryData,
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<AdminLayout>
|
<AdminLayout>
|
||||||
<Breadcrumb currentPageText="Piyango Detay" />
|
<Breadcrumb currentPageText="Piyango Detay" go="/piyangolar/piyango-listesi" />
|
||||||
<tabs :tabList="tabList" v-if="loaded">
|
<tabs :tabList="tabList" v-if="loaded" isUseRoute>
|
||||||
<template #piyangobilgileri>
|
<template #piyango-bilgileri>
|
||||||
<tab-piyango-bilgileri-display
|
<tab-piyango-bilgileri-display
|
||||||
v-if="
|
v-if="
|
||||||
usersStore.isPanelUser ||
|
usersStore.isPanelUser ||
|
||||||
@ -12,21 +12,24 @@
|
|||||||
" />
|
" />
|
||||||
<tab-piyango-bilgileri v-else />
|
<tab-piyango-bilgileri v-else />
|
||||||
</template>
|
</template>
|
||||||
<template #katilimcilistesi><tab-piyango-katilimci-listesi /></template>
|
<template #katilim-listesi><tab-piyango-katilimci-listesi /></template>
|
||||||
|
<template #cekilis-tutanagi><tab-piyango-cekilis-tutanagi /></template>
|
||||||
<template #talihliler><tab-piyango-talihli-listesi /></template>
|
<template #talihliler><tab-piyango-talihli-listesi /></template>
|
||||||
<template #itirazsikayet><tab-piyango-itiraz /></template>
|
<template #itiraz-sikayet><tab-piyango-itiraz /></template>
|
||||||
<template #piyangologlari><tab-piyango-loglari /></template>
|
<template #piyango-loglari><tab-piyango-loglari /></template>
|
||||||
<template #yetkilendirme v-if="usersStore.isPanelUser">
|
<template #yetkilendirme v-if="usersStore.isPanelUser">
|
||||||
<tab-piyango-yetkilendirme />
|
<tab-piyango-yetkilendirme />
|
||||||
</template>
|
</template>
|
||||||
<template #onaydurumu>
|
<template #onay-durumu>
|
||||||
<tab-piyango-onay-durumu v-if="usersStore.isPanelUser" />
|
<tab-piyango-onay-durumu v-if="usersStore.isPanelUser" />
|
||||||
<tab-piyango-onay-durumu-user v-else />
|
<tab-piyango-onay-durumu-user v-else />
|
||||||
</template>
|
</template>
|
||||||
<template #teminatlistesi>
|
<template #teminat-listesi>
|
||||||
<tab-piyango-teminat-durumu />
|
<tab-piyango-teminat-durumu />
|
||||||
</template>
|
</template>
|
||||||
<template #dosyakapama v-if="usersStore.isPanelUser && piyangoStore.lotteryDrawState">
|
<template
|
||||||
|
#dosya-kapama
|
||||||
|
v-if="piyangoStore.lotteryApprove === 10">
|
||||||
<tab-piyango-dosya-kapama />
|
<tab-piyango-dosya-kapama />
|
||||||
</template>
|
</template>
|
||||||
</tabs>
|
</tabs>
|
||||||
@ -52,6 +55,7 @@
|
|||||||
import TabPiyangoLoglari from '@/module/cekilisler/components/TabPiyangoLoglari.vue'
|
import TabPiyangoLoglari from '@/module/cekilisler/components/TabPiyangoLoglari.vue'
|
||||||
import TabPiyangoKatilimciListesi from '@/module/cekilisler/components/TabPiyangoKatilimciListesi.vue'
|
import TabPiyangoKatilimciListesi from '@/module/cekilisler/components/TabPiyangoKatilimciListesi.vue'
|
||||||
import TabPiyangoTalihliListesi from '@/module/cekilisler/components/TabPiyangoTalihliListesi.vue'
|
import TabPiyangoTalihliListesi from '@/module/cekilisler/components/TabPiyangoTalihliListesi.vue'
|
||||||
|
import TabPiyangoCekilisTutanagi from '@/module/cekilisler/components/TabPiyangoCekilisTutanagi.vue'
|
||||||
import TabPiyangoBilgileri from '@/module/cekilisler/components/TabPiyangoBilgileri.vue'
|
import TabPiyangoBilgileri from '@/module/cekilisler/components/TabPiyangoBilgileri.vue'
|
||||||
import TabPiyangoBilgileriDisplay from '../components/TabPiyangoBilgileriDisplay.vue'
|
import TabPiyangoBilgileriDisplay from '../components/TabPiyangoBilgileriDisplay.vue'
|
||||||
import TabPiyangoItiraz from '@/module/cekilisler/components/TabPiyangoItiraz.vue'
|
import TabPiyangoItiraz from '@/module/cekilisler/components/TabPiyangoItiraz.vue'
|
||||||
@ -59,39 +63,45 @@
|
|||||||
|
|
||||||
const loaded = ref<boolean>(false)
|
const loaded = ref<boolean>(false)
|
||||||
const tabList = ref<Record<string, any>[]>([
|
const tabList = ref<Record<string, any>[]>([
|
||||||
{ text: 'Piyango Bilgileri', id: 'piyangobilgileri' }
|
{ text: 'Piyango Bilgileri', id: 'piyango-bilgileri' }
|
||||||
])
|
])
|
||||||
|
|
||||||
const CreateTabs = () => {
|
const CreateTabs = () => {
|
||||||
if (
|
if (
|
||||||
piyangoStore.lotteryApprove === 4 ||
|
(piyangoStore.lotteryApprove === 4 ||
|
||||||
piyangoStore.lotteryApprove === 10 ||
|
piyangoStore.lotteryApprove === 10 ||
|
||||||
piyangoStore.lotteryApprove === 11 ||
|
piyangoStore.lotteryApprove === 11 ||
|
||||||
piyangoStore.lotteryApprove === 12 ||
|
piyangoStore.lotteryApprove === 12 ||
|
||||||
piyangoStore.lotteryApprove === 13 ||
|
piyangoStore.lotteryApprove === 13 ||
|
||||||
piyangoStore.lotteryApprove === 14 ||
|
piyangoStore.lotteryApprove === 14 ||
|
||||||
usersStore.isPanelUser
|
usersStore.isPanelUser) &&
|
||||||
|
piyangoStore.lotteryPurposeId !== 3
|
||||||
) {
|
) {
|
||||||
|
|
||||||
tabList.value.push(
|
tabList.value.push(
|
||||||
{ text: 'Katılım Listesi', id: 'katilimcilistesi' },
|
{ text: 'Katılım Listesi', id: 'katilim-listesi' },
|
||||||
|
{ text: 'Çekiliş Tutanağı', id: 'cekilis-tutanagi' },
|
||||||
{ text: 'Talihliler', id: 'talihliler' },
|
{ text: 'Talihliler', id: 'talihliler' },
|
||||||
{ text: 'İtiraz/Şikayet', id: 'itirazsikayet' }
|
{ text: 'İtiraz/Şikayet', id: 'itiraz-sikayet' }
|
||||||
)
|
)
|
||||||
|
} else {
|
||||||
|
tabList.value.push({ text: 'Çekiliş Tutanağı', id: 'cekilis-tutanagi' })
|
||||||
}
|
}
|
||||||
if (usersStore.isPanelUser) {
|
if (usersStore.isPanelUser) {
|
||||||
tabList.value.push(
|
tabList.value.push(
|
||||||
{ text: 'Piyango Logları', id: 'piyangologlari' },
|
{ text: 'Piyango Logları', id: 'piyango-loglari' },
|
||||||
{ text: 'Yetkilendirme', id: 'yetkilendirme' }
|
{ text: 'Yetkilendirme', id: 'yetkilendirme' }
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
tabList.value.push({ text: 'Onay Durumu', id: 'onaydurumu' })
|
tabList.value.push({ text: 'Onay Durumu', id: 'onay-durumu' })
|
||||||
|
|
||||||
if (piyangoStore.lotteryApprove !== 0) {
|
|
||||||
tabList.value.push({ text: 'Teminat Listesi', id: 'teminatlistesi' })
|
if (piyangoStore.lotteryApprove !== 0 && piyangoStore.lotteryPurposeId !== 3) {
|
||||||
|
tabList.value.push({ text: 'Teminat Listesi', id: 'teminat-listesi' })
|
||||||
}
|
}
|
||||||
|
|
||||||
if (usersStore.isPanelUser && piyangoStore.lotteryDrawState) {
|
if (piyangoStore.lotteryApprove === 10) {
|
||||||
tabList.value.push({ text: 'Dossya Kapama', id: 'dosyakapama' })
|
tabList.value.push({ text: 'Dosya Kapama', id: 'dosya-kapama' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AdminLayout>
|
<AdminLayout>
|
||||||
<Breadcrumb currentPageText="Piyango Listesi" />
|
<Breadcrumb currentPageText="Piyango Listesi" go="/" />
|
||||||
<div
|
<div
|
||||||
class="form-inner-comment waiting-d"
|
class="form-inner-comment waiting-d"
|
||||||
v-if="!usersStore.isPanelUser && usersStore.userApproveId !== 4">
|
v-if="!usersStore.isPanelUser && usersStore.userApproveId !== 4">
|
||||||
@ -17,7 +17,8 @@
|
|||||||
listText="Piyango"
|
listText="Piyango"
|
||||||
:addRoute="addApiControl"
|
:addRoute="addApiControl"
|
||||||
:apiList="apiList"
|
:apiList="apiList"
|
||||||
apiText="Piyango Listesi" />
|
apiText="Piyango Listesi"
|
||||||
|
isUseRoute />
|
||||||
</section>
|
</section>
|
||||||
</AdminLayout>
|
</AdminLayout>
|
||||||
</template>
|
</template>
|
||||||
@ -30,6 +31,8 @@
|
|||||||
const dateStore = useDateStore()
|
const dateStore = useDateStore()
|
||||||
import { useUsersStore } from '@/stores/usersStore'
|
import { useUsersStore } from '@/stores/usersStore'
|
||||||
const usersStore = useUsersStore()
|
const usersStore = useUsersStore()
|
||||||
|
import { useGlobalStore } from '@/stores/globalStore'
|
||||||
|
const globalStore = useGlobalStore()
|
||||||
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'
|
||||||
@ -67,119 +70,30 @@
|
|||||||
const tableHeader = computed<Record<string, any>[]>(() => {
|
const tableHeader = computed<Record<string, any>[]>(() => {
|
||||||
let header: Record<string, any>[] = []
|
let header: Record<string, any>[] = []
|
||||||
|
|
||||||
if (usersStore.isAraciFirma || usersStore.isPanelUser) {
|
// 1. PİYANGO ID
|
||||||
header.push({ name: 'duzenleyen', title: 'Düzenleyen' })
|
|
||||||
}
|
|
||||||
|
|
||||||
header.push(
|
|
||||||
{
|
|
||||||
name: 'baslik',
|
|
||||||
title: 'Başlık',
|
|
||||||
sort: true,
|
|
||||||
style: { width: '15%' }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'piyangoamac',
|
|
||||||
title: 'Piyango Amacı',
|
|
||||||
sort: true,
|
|
||||||
filter: {
|
|
||||||
type: 'select',
|
|
||||||
data: piyangoAmaclari.value,
|
|
||||||
listVal: 'id',
|
|
||||||
listText: 'amacAdi',
|
|
||||||
filterId: 'piyangoAmacId'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'olusturmaTarihi',
|
|
||||||
title: 'Oluşturulma Tarihi',
|
|
||||||
compute: (v: Record<string, any>): string => {
|
|
||||||
return dateStore.dateFormat({ date: v.olusturmaTarihi })
|
|
||||||
},
|
|
||||||
sort: true,
|
|
||||||
filter: {
|
|
||||||
type: 'date',
|
|
||||||
range: true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
if (usersStore.isVakifDernek || usersStore.isPanelUser) {
|
|
||||||
header.push({
|
header.push({
|
||||||
name: 'cekilisTarihi',
|
name: 'piyangoId',
|
||||||
title: 'Çekiliş Tarihi',
|
title: 'Piyango ID',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '10%' }
|
||||||
|
})
|
||||||
|
|
||||||
|
// 2. OLUŞTURMA TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'olusturmaTarihi',
|
||||||
|
title: 'Oluşturma Tarihi',
|
||||||
compute: (v: Record<string, any>): string => {
|
compute: (v: Record<string, any>): string => {
|
||||||
return dateStore.dateFormat({ date: v.cekilisTarihi })
|
if (!v.olusturmaTarihi || v.olusturmaTarihi === null || v.olusturmaTarihi.includes('0001-')) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.olusturmaTarihi, pattern: 'dd-mm-yy', splitDate: '/' })
|
||||||
},
|
},
|
||||||
sort: true,
|
sort: true,
|
||||||
filter: {
|
filter: {
|
||||||
type: 'date',
|
type: 'date',
|
||||||
range: true
|
between: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
if (!usersStore.isVakifDernek || usersStore.isPanelUser) {
|
|
||||||
header.push(
|
|
||||||
{
|
|
||||||
name: 'baslangicTarihi',
|
|
||||||
title: 'Başlangıç Tarihi',
|
|
||||||
compute: (v: Record<string, any>): string => {
|
|
||||||
if (v.baslangicTarihi.includes('0001-')) return ''
|
|
||||||
else return dateStore.dateFormat({ date: v.baslangicTarihi })
|
|
||||||
},
|
|
||||||
sort: true,
|
|
||||||
filter: {
|
|
||||||
type: 'date',
|
|
||||||
range: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'bitisTarihi',
|
|
||||||
title: 'Bitis Tarihi',
|
|
||||||
compute: (v: Record<string, any>): string => {
|
|
||||||
if (v.bitisTarihi.includes('0001-')) return ''
|
|
||||||
else return dateStore.dateFormat({ date: v.bitisTarihi })
|
|
||||||
},
|
|
||||||
sort: true,
|
|
||||||
filter: {
|
|
||||||
type: 'date',
|
|
||||||
range: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
header.push(
|
// 3. SEVK DURUMU (Panel User için)
|
||||||
{
|
|
||||||
name: 'cekilisYontemi',
|
|
||||||
title: 'Çekiliş Yöntemi',
|
|
||||||
sort: true,
|
|
||||||
filter: {
|
|
||||||
type: 'select',
|
|
||||||
data: cekilisYontemleri.value,
|
|
||||||
listVal: 'id',
|
|
||||||
listText: 'deger',
|
|
||||||
filterId: 'cekilisYontemiId'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ name: 'ikramiyeler', title: 'İkramiyeler', style: { width: '15%' } },
|
|
||||||
{
|
|
||||||
name: 'durum',
|
|
||||||
title: 'Durum',
|
|
||||||
style: { width: '10%' },
|
|
||||||
computeHtml: (v: Record<string, any>): string => {
|
|
||||||
return `<span class="back-grad ${piyangoStore.LoterryStatusClass(v.durum)}">
|
|
||||||
${v.durum}
|
|
||||||
</span>`
|
|
||||||
},
|
|
||||||
filter: {
|
|
||||||
type: 'select',
|
|
||||||
data: piyangoOnayDurumlari.value,
|
|
||||||
listVal: 'id',
|
|
||||||
listText: 'tipAdi',
|
|
||||||
filterId: 'durumId'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
if (usersStore.isPanelUser) {
|
if (usersStore.isPanelUser) {
|
||||||
header.push({
|
header.push({
|
||||||
name: 'atanmis',
|
name: 'atanmis',
|
||||||
@ -195,9 +109,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
|
||||||
|
|
||||||
if (usersStore.isPanelUser) {
|
// 4. MUHASEBELEŞTİRME DURUMU (Panel User için)
|
||||||
header.push({
|
header.push({
|
||||||
name: 'basvuruBedelNo',
|
name: 'basvuruBedelNo',
|
||||||
title: 'Muhasebeleştirme Durumu',
|
title: 'Muhasebeleştirme Durumu',
|
||||||
@ -215,12 +128,295 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 5. MÜDÜRLÜK
|
||||||
|
header.push({
|
||||||
|
name: 'mudurluk',
|
||||||
|
title: 'Müdürlük',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.mudurluk || ''
|
||||||
|
},
|
||||||
|
filter: {
|
||||||
|
type: 'text'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 6. PİYANGO AMACI
|
||||||
|
header.push({
|
||||||
|
name: 'piyangoamac',
|
||||||
|
title: 'Piyango Amacı',
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'select',
|
||||||
|
data: piyangoAmaclari.value,
|
||||||
|
listVal: 'id',
|
||||||
|
listText: 'amacAdi',
|
||||||
|
filterId: 'piyangoAmacId'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 7. DÜZENLEYEN (koşullu)
|
||||||
|
if (usersStore.isAraciFirma || usersStore.isPanelUser) {
|
||||||
|
header.push({
|
||||||
|
name: 'duzenleyen',
|
||||||
|
title: 'Düzenleyen',
|
||||||
|
filter: {
|
||||||
|
type: 'text'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 8. ARACI FİRMA
|
||||||
|
header.push({
|
||||||
|
name: 'araciFirma',
|
||||||
|
title: 'Aracı Firma',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.araciFirma || ''
|
||||||
|
},
|
||||||
|
filter: {
|
||||||
|
type: 'text'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 6. DURUM
|
||||||
|
header.push({
|
||||||
|
name: 'durum',
|
||||||
|
title: 'Durum',
|
||||||
|
style: { width: '10%' },
|
||||||
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
|
return `<span class="${piyangoStore.LoterryStatusClass(v.durum)}">
|
||||||
|
${v.durum}
|
||||||
|
</span>`
|
||||||
|
},
|
||||||
|
filter: {
|
||||||
|
type: 'select',
|
||||||
|
data: piyangoOnayDurumlari.value,
|
||||||
|
listVal: 'id',
|
||||||
|
listText: 'tipAdi',
|
||||||
|
filterId: 'durumId'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 7. İZİN TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'izinTarihi',
|
||||||
|
title: 'İzin Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.izinTarihi || v.izinTarihi === null) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.izinTarihi, pattern: 'dd-mm-yy', splitDate: '/' })
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'date',
|
||||||
|
between: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 8. İZİN SAYISI
|
||||||
|
header.push({
|
||||||
|
name: 'izinSayisi',
|
||||||
|
title: 'İzin Sayısı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.izinSayisi || ''
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'text',
|
||||||
|
range: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 9. BAŞLANGIÇ TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'baslangicTarihi',
|
||||||
|
title: 'Başlangıç Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.baslangicTarihi || v.baslangicTarihi.includes('0001-')) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.baslangicTarihi, pattern: 'dd-mm-yy', splitDate: '/' })
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'date',
|
||||||
|
between: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 10. BİTİŞ TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'bitisTarihi',
|
||||||
|
title: 'Bitiş Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.bitisTarihi || v.bitisTarihi.includes('0001-')) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.bitisTarihi, pattern: 'dd-mm-yy', splitDate: '/' })
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'date',
|
||||||
|
between: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 11. ÇEKİLİŞ TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'cekilisTarihi',
|
||||||
|
title: 'Çekiliş Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.cekilisTarihi || v.cekilisTarihi.includes('0001-')) return ''
|
||||||
|
if (v.piyangoAmacId === 3) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.cekilisTarihi, pattern: 'dd-mm-yy', splitDate: '/' })
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'date',
|
||||||
|
between: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 12. ÇEKİLİŞ GÖREVLİSİ
|
||||||
|
header.push({
|
||||||
|
name: 'cekilisGorevlisi',
|
||||||
|
title: 'Çekiliş Görevlisi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.cekilisGorevlisi || ''
|
||||||
|
},
|
||||||
|
filter: {
|
||||||
|
type: 'text'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 13. GAZETE İLAN TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'gazeteIlanTarihi',
|
||||||
|
title: 'Gazete İlan Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.gazeteIlanTarihi || v.gazeteIlanTarihi === null) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.gazeteIlanTarihi, pattern: 'dd-mm-yy', splitDate: '/' })
|
||||||
|
},
|
||||||
|
sort: true,
|
||||||
|
filter: {
|
||||||
|
type: 'date',
|
||||||
|
between: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 14. GAZETE ADI
|
||||||
|
header.push({
|
||||||
|
name: 'gazeteAdi',
|
||||||
|
title: 'Gazete Adı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.gazeteAdi || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 15. İZİN BEDELİ
|
||||||
|
header.push({
|
||||||
|
name: 'izinBedeliTutari',
|
||||||
|
title: 'İzin Bedeli',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (v.izinBedeliTutari === null || v.izinBedeliTutari === undefined) return ''
|
||||||
|
return globalStore.toTrLocale(v.izinBedeliTutari)
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 16. İKRAMİYE TUTARI
|
||||||
|
header.push({
|
||||||
|
name: 'ikramiyeTutari',
|
||||||
|
title: 'İkramiye Tutarı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (v.ikramiyeTutari === null || v.ikramiyeTutari === undefined) return ''
|
||||||
|
return globalStore.toTrLocale(v.ikramiyeTutari)
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 17. TEMİNAT TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'teminatTarihi',
|
||||||
|
title: 'Teminat Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.teminatTarihi || v.teminatTarihi === null) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.teminatTarihi, pattern: 'dd-mm-yy', splitDate: '/' })
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 18. TEMİNAT SAYISI
|
||||||
|
header.push({
|
||||||
|
name: 'teminatSayisi',
|
||||||
|
title: 'Teminat Sayısı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.teminatSayisi || ''
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 19. TEMİNAT BANKASI
|
||||||
|
header.push({
|
||||||
|
name: 'teminatBankasi',
|
||||||
|
title: 'Teminat Bankası',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.teminatBankasi || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 20. TEMİNAT TUTARI
|
||||||
|
header.push({
|
||||||
|
name: 'teminatTutari',
|
||||||
|
title: 'Teminat Tutarı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (v.teminatTutari === null || v.teminatTutari === undefined) return ''
|
||||||
|
return globalStore.toTrLocale(v.teminatTutari)
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 21. T. PARA CİNSİ
|
||||||
|
header.push({
|
||||||
|
name: 'paraBirimiSembol',
|
||||||
|
title: 'T. Para Cinsi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.paraBirimiSembol || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 22. T. İADE TARİHİ
|
||||||
|
header.push({
|
||||||
|
name: 'teminatIadeTarihi',
|
||||||
|
title: 'T. İade Tarihi',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
if (!v.teminatIadeTarihi || v.teminatIadeTarihi === null) return ''
|
||||||
|
return dateStore.dateFormat({ date: v.teminatIadeTarihi, pattern: 'dd-mm-yy', splitDate: '/' })
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 23. T. İADE SAYISI
|
||||||
|
header.push({
|
||||||
|
name: 'teminatIadeSayisi',
|
||||||
|
title: 'T. İade Sayısı',
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.teminatIadeSayisi || ''
|
||||||
|
},
|
||||||
|
sort: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 24. İKRAMİYELER
|
||||||
|
header.push({
|
||||||
|
name: 'ikramiyeler',
|
||||||
|
title: 'İkramiyeler',
|
||||||
|
style: { width: '15%' },
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return v.ikramiyeler || ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
return header
|
return header
|
||||||
})
|
})
|
||||||
|
|
||||||
// tablodan herhangi bir satır tıklayınca çalısır
|
// tablodan herhangi bir satır tıklayınca çalısır
|
||||||
const OpenPiyango = (row: any) => {
|
const OpenPiyango = (row: any) => {
|
||||||
router.push('detay/' + row.id)
|
router.push('detay/' + row.id + '/piyango-bilgileri')
|
||||||
}
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
|
|||||||
@ -8,7 +8,8 @@
|
|||||||
title="Piyangolar"
|
title="Piyangolar"
|
||||||
listText="Piyango"
|
listText="Piyango"
|
||||||
:apiList="apiList"
|
:apiList="apiList"
|
||||||
apiText="Piyango Listesi" />
|
apiText="Piyango Listesi"
|
||||||
|
isUseRoute />
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -77,7 +78,7 @@
|
|||||||
sort: true,
|
sort: true,
|
||||||
filter: {
|
filter: {
|
||||||
type: 'date',
|
type: 'date',
|
||||||
range: true
|
between: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -89,7 +90,7 @@
|
|||||||
sort: true,
|
sort: true,
|
||||||
filter: {
|
filter: {
|
||||||
type: 'date',
|
type: 'date',
|
||||||
range: true
|
between: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -101,7 +102,7 @@
|
|||||||
sort: true,
|
sort: true,
|
||||||
filter: {
|
filter: {
|
||||||
type: 'date',
|
type: 'date',
|
||||||
range: true
|
between: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -113,7 +114,7 @@
|
|||||||
sort: true,
|
sort: true,
|
||||||
filter: {
|
filter: {
|
||||||
type: 'date',
|
type: 'date',
|
||||||
range: true
|
between: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -133,7 +134,7 @@
|
|||||||
name: 'durum',
|
name: 'durum',
|
||||||
title: 'Durum',
|
title: 'Durum',
|
||||||
computeHtml: (v: Record<string, any>): string => {
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
return `<span class='back-grad ${piyangoStore.LoterryStatusClass(v.durum)}'>
|
return `<span class='${piyangoStore.LoterryStatusClass(v.durum)}'>
|
||||||
${v.durum}
|
${v.durum}
|
||||||
</span>`
|
</span>`
|
||||||
},
|
},
|
||||||
@ -151,10 +152,11 @@
|
|||||||
name: 'atanmis',
|
name: 'atanmis',
|
||||||
title: 'Sevk Durumu',
|
title: 'Sevk Durumu',
|
||||||
computeHtml: (v: Record<string, any>): string => {
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
if(v.atanmis){
|
if (v.atanmis) {
|
||||||
return `<strong class="back-grad back-grad-sevk-ok">
|
return `<strong class="back-grad back-grad-sevk-ok">
|
||||||
${v.atananlar}
|
${v.atananlar}
|
||||||
</strong>`}else{
|
</strong>`
|
||||||
|
} else {
|
||||||
return `<span class="back-grad back-grad-sevk">
|
return `<span class="back-grad back-grad-sevk">
|
||||||
Sevk Edilmemiş</span>`
|
Sevk Edilmemiş</span>`
|
||||||
}
|
}
|
||||||
@ -164,7 +166,7 @@
|
|||||||
|
|
||||||
// tablodan herhangi bir satır tıklayınca çalısır
|
// tablodan herhangi bir satır tıklayınca çalısır
|
||||||
const rwAction = (row: any) => {
|
const rwAction = (row: any) => {
|
||||||
router.push('/piyangolar/detay/' + row.id)
|
router.push('/piyangolar/detay/' + row.id + '/piyango-bilgileri')
|
||||||
}
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import kullaniciAyarlari from './kullanici-ayarlari'
|
|||||||
|
|
||||||
export default [
|
export default [
|
||||||
kullanciYeni,
|
kullanciYeni,
|
||||||
kullaniciDetay,
|
...kullaniciDetay,
|
||||||
kullaniciListesi,
|
kullaniciListesi,
|
||||||
kullaniciRolleri,
|
kullaniciRolleri,
|
||||||
kullaniciAyarlari
|
kullaniciAyarlari
|
||||||
|
|||||||
@ -1,10 +1,19 @@
|
|||||||
import KullaniciDetay from '@/module/kullanicilar/views/KullaniciDetay.vue'
|
import KullaniciDetay from '@/module/kullanicilar/views/KullaniciDetay.vue'
|
||||||
|
|
||||||
export default {
|
export default [
|
||||||
|
{
|
||||||
path: '/kullanicilar/detay/:kullaniciId',
|
path: '/kullanicilar/detay/:kullaniciId',
|
||||||
|
redirect: (to: Record<string, any>) => ({
|
||||||
|
name: 'PiyangoDetay',
|
||||||
|
params: { kullaniciId: to.params.kullaniciId, tabid: 'kullanici-bilgileri' }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/kullanicilar/detay/:kullaniciId/:tabid',
|
||||||
name: 'KullaniciDetay',
|
name: 'KullaniciDetay',
|
||||||
component: KullaniciDetay,
|
component: KullaniciDetay,
|
||||||
meta: {
|
meta: {
|
||||||
authRequired: true
|
authRequired: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
]
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AdminLayout>
|
<AdminLayout>
|
||||||
<Breadcrumb currentPageText="Kullanıcı Detay" />
|
<Breadcrumb currentPageText="Kullanıcı Detay"/>
|
||||||
<tabs :tabList="tabList">
|
<tabs :tabList="tabList">
|
||||||
<template #birimlistesi>
|
<template #birimlistesi>
|
||||||
<tab-kullanici-birimleri />
|
<tab-kullanici-birimleri />
|
||||||
|
|||||||
@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<AdminLayout>
|
<AdminLayout>
|
||||||
<Breadcrumb currentPageText="Kullanıcı Detay" />
|
<Breadcrumb currentPageText="Kullanıcı Detay" go="/kullanicilar/kullanici-liste"/>
|
||||||
<tabs :tabList="tabList">
|
<tabs :tabList="tabList" isUseRoute>
|
||||||
<template #kullanicibilgileri>
|
<template #kullanici-bilgileri>
|
||||||
<tab-kullanici-bilgileri />
|
<tab-kullanici-bilgileri />
|
||||||
</template>
|
</template>
|
||||||
<template #yetkilioldugupiyangolar>
|
<template #yetkili-oldugu-piyangolar>
|
||||||
<tab-kullanici-yetkili-piyangolar />
|
<tab-kullanici-yetkili-piyangolar />
|
||||||
</template>
|
</template>
|
||||||
<template #kullaniciloglari>
|
<template #kullanici-loglari>
|
||||||
<tab-kullanici-loglari />
|
<tab-kullanici-loglari />
|
||||||
</template>
|
</template>
|
||||||
</tabs>
|
</tabs>
|
||||||
@ -28,8 +28,8 @@
|
|||||||
if (globalStore.selUser === 0) globalStore.selUser = Number(route.params.kullaniciId)
|
if (globalStore.selUser === 0) globalStore.selUser = Number(route.params.kullaniciId)
|
||||||
|
|
||||||
const tabList = ref<Record<string, any>[]>([
|
const tabList = ref<Record<string, any>[]>([
|
||||||
{ text: 'Kullanıcı Bilgileri', id: 'kullanicibilgileri' },
|
{ text: 'Kullanıcı Bilgileri', id: 'kullanici-bilgileri' },
|
||||||
{ text: 'Yetkili Olduğu Piyangolar', id: 'yetkilioldugupiyangolar' },
|
{ text: 'Yetkili Olduğu Piyangolar', id: 'yetkili-oldugu-piyangolar' },
|
||||||
{ text: 'Kullanıcı Logları', id: 'kullaniciloglari' }
|
{ text: 'Kullanıcı Logları', id: 'kullanici-loglari' }
|
||||||
])
|
])
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<AdminLayout>
|
<AdminLayout>
|
||||||
<Breadcrumb current-page-text="Kullanıcılar Listesi" />
|
<Breadcrumb current-page-text="Kullanıcılar Listesi" go="/"/>
|
||||||
<section class="section-list">
|
<section class="section-list">
|
||||||
<list-table-content
|
<list-table-content
|
||||||
v-if="loaded"
|
v-if="loaded"
|
||||||
@ -11,7 +11,8 @@
|
|||||||
listText="Kullanıcı"
|
listText="Kullanıcı"
|
||||||
addRoute="yeni-kullanici"
|
addRoute="yeni-kullanici"
|
||||||
apiList="Auth/kullaniciList"
|
apiList="Auth/kullaniciList"
|
||||||
apiText="Kullanıcı Listesi" />
|
apiText="Kullanıcı Listesi"
|
||||||
|
isUseRoute/>
|
||||||
</section>
|
</section>
|
||||||
</AdminLayout>
|
</AdminLayout>
|
||||||
</template>
|
</template>
|
||||||
@ -88,7 +89,7 @@
|
|||||||
])
|
])
|
||||||
const rwAction = (row: any) => {
|
const rwAction = (row: any) => {
|
||||||
globalStore.selUser = row.id
|
globalStore.selUser = row.id
|
||||||
router.push('detay/' + row.id)
|
router.push('detay/' + row.id+'/kullanici-bilgileri')
|
||||||
}
|
}
|
||||||
|
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
|
|||||||
8
src/module/muhasebe/components/TabIzinBedelOraniForm.vue
Normal file
8
src/module/muhasebe/components/TabIzinBedelOraniForm.vue
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<template>
|
||||||
|
<section class="section-list form-inner-content-left">
|
||||||
|
<form-izin-bedel-orani />
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import FormIzinBedelOrani from './form/FormIzinBedelOrani.vue'
|
||||||
|
</script>
|
||||||
105
src/module/muhasebe/components/TabIzinBedelOraniListe.vue
Normal file
105
src/module/muhasebe/components/TabIzinBedelOraniListe.vue
Normal file
@ -0,0 +1,105 @@
|
|||||||
|
<template>
|
||||||
|
<section class="section-list">
|
||||||
|
<div class="section-list-header">
|
||||||
|
<h2>İzin Bedel Oranı Listesi</h2>
|
||||||
|
<div class="section-list-header-buttons">
|
||||||
|
<button class="button-c button-add" @click="izinBedelOraniStore.NewForm()">
|
||||||
|
<i class="ico-c">
|
||||||
|
<svg width="16" height="16">
|
||||||
|
<use href="@/assets/images/icons.svg#plus"></use>
|
||||||
|
</svg>
|
||||||
|
</i>
|
||||||
|
Yeni İzin Bedel Oranı Ekle
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<list-table-content
|
||||||
|
v-if="izinBedelOraniService.loaded"
|
||||||
|
:tableHeader="tableHeader"
|
||||||
|
:rowAction="EditIzinBedelOrani"
|
||||||
|
icon="draws"
|
||||||
|
title="İzin Bedel Oranları"
|
||||||
|
listText="İzin Bedel Oranı"
|
||||||
|
:apiList="'IzinBedelOrani'"
|
||||||
|
apiText="İzin Bedel Oranı Listesi" />
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, computed, onBeforeMount } from 'vue'
|
||||||
|
import { useIzinBedelOraniStore } from '../store/izinBedelOraniStore'
|
||||||
|
import { useIzinBedelOraniService } from '../service/izinBedelOraniService'
|
||||||
|
|
||||||
|
const izinBedelOraniStore = useIzinBedelOraniStore()
|
||||||
|
const izinBedelOraniService = useIzinBedelOraniService()
|
||||||
|
|
||||||
|
const tableHeader = ref<Record<string, any>[]>(
|
||||||
|
[
|
||||||
|
{
|
||||||
|
name: 'id',
|
||||||
|
title: 'ID',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '8%' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'ad',
|
||||||
|
title: 'Ad',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '20%' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'oran',
|
||||||
|
title: 'Oran (%)',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '15%' },
|
||||||
|
compute: (v: Record<string, any>): string => {
|
||||||
|
return `%${v.oran}`
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'aciklama',
|
||||||
|
title: 'Açıklama',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '30%' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'aktif',
|
||||||
|
title: 'Durum',
|
||||||
|
sort: true,
|
||||||
|
style: { width: '12%' },
|
||||||
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
|
if (v.aktif) {
|
||||||
|
return `<span class="back-grad back-grad-ok">Aktif</span>`
|
||||||
|
} else {
|
||||||
|
return `<span class="back-grad back-grad-alert">Pasif</span>`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'actions',
|
||||||
|
title: 'İşlemler',
|
||||||
|
style: { width: '15%' },
|
||||||
|
computeHtml: (v: Record<string, any>): string => {
|
||||||
|
let actions = `<button class="button-c button-edit" onclick="window.editIzinBedelOrani(${v.id})">
|
||||||
|
<i class="ico-c">
|
||||||
|
<svg width="14" height="14">
|
||||||
|
<use href="@/assets/images/icons.svg#edit"></use>
|
||||||
|
</svg>
|
||||||
|
</i>
|
||||||
|
Düzenle
|
||||||
|
</button> `
|
||||||
|
return actions
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
const EditIzinBedelOrani = (row: any) => {
|
||||||
|
izinBedelOraniStore.EditForm(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
onBeforeMount(async () => {
|
||||||
|
await izinBedelOraniService.GetIzinBedelOraniList()
|
||||||
|
izinBedelOraniService.loaded = true
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@ -2,9 +2,9 @@
|
|||||||
<div :class="['form-part']" id="display-bilgi">
|
<div :class="['form-part']" id="display-bilgi">
|
||||||
<div class="form-part-title">
|
<div class="form-part-title">
|
||||||
<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 && loaded">
|
||||||
<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 ||
|
||||||
@ -14,7 +14,7 @@
|
|||||||
Başvuru Bedelini Muhasebeleştir
|
Başvuru Bedelini Muhasebeleştir
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
@click="IzinBedeliMuhasebelestir"
|
@click="OpenIzinBedeliModal"
|
||||||
v-if="
|
v-if="
|
||||||
piyangoStore.lotteryApprove === 4 &&
|
piyangoStore.lotteryApprove === 4 &&
|
||||||
piyangoStore.lotteryData.amacpiyangoId !== 3 &&
|
piyangoStore.lotteryData.amacpiyangoId !== 3 &&
|
||||||
@ -24,19 +24,118 @@
|
|||||||
class="button-save">
|
class="button-save">
|
||||||
İzin Bedelini Muhasebeleştir
|
İzin Bedelini Muhasebeleştir
|
||||||
</button>
|
</button>
|
||||||
<router-link :to="'/piyangolar/detay/' + route.params.piyangoId" class="button-c">
|
<router-link
|
||||||
|
:to="'/piyangolar/detay/' + route.params.piyangoId + '/piyango-bilgileri'"
|
||||||
|
class="button-c">
|
||||||
Piyango Detayına Git
|
Piyango Detayına Git
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-inner-comment waiting-d" v-if="!loaded">Yükleniyor, lütfen bekleyiniz...</div>
|
||||||
<piyango-bilgileri-display-content v-if="loaded" :isPreview="isPreview" />
|
<piyango-bilgileri-display-content v-if="loaded" :isPreview="isPreview" />
|
||||||
|
|
||||||
|
<!-- İzin Bedeli Modal -->
|
||||||
|
<teleport to="body">
|
||||||
|
<div v-if="showIzinBedeliModal" class="modal-overlay" @click="CloseIzinBedeliModal">
|
||||||
|
<div class="modal-content" @click.stop>
|
||||||
|
<div class="modal-header">
|
||||||
|
<h3>İzin Bedeli Muhasebeleştir</h3>
|
||||||
|
<button class="modal-close" @click="CloseIzinBedeliModal">×</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-group">
|
||||||
|
<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">
|
||||||
|
{{ oran.oran }}% - {{ oran.adi }}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="">
|
||||||
|
<table class="table-bordered">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Toplam İkramiye Bedeli:</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
globalStore.toTrLocale(
|
||||||
|
Number(piyangoIkramiyeStore.totalIkramiyeValue)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>İzin Bedeli Oran Tutarı:</td>
|
||||||
|
<td>
|
||||||
|
{{ globalStore.toTrLocale(calculatedOran) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>KDV:</td>
|
||||||
|
<td>
|
||||||
|
{{ globalStore.toTrLocale(calculatedKdv) }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Toplam Bedel:</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
globalStore.toTrLocale(
|
||||||
|
Number(calculatedOran) + Number(calculatedKdv)
|
||||||
|
)
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr v-if="piyangoStore.lotteryData.izinTarihi !== undefined">
|
||||||
|
<td>İzin Tarihi:</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
dateStore.dateFormat({
|
||||||
|
date: piyangoStore.lotteryData.izinTarihi,
|
||||||
|
pattern: 'dd-mm-yy',
|
||||||
|
splitDate: '/'
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr v-if="piyangoStore.lotteryData.izinSayisi !== undefined">
|
||||||
|
<td>İzin Sayısı:</td>
|
||||||
|
<td>
|
||||||
|
{{ piyangoStore.lotteryData.izinSayisi }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="button-c button-cancel" @click="CloseIzinBedeliModal">
|
||||||
|
İptal
|
||||||
|
</button>
|
||||||
|
<button class="button-c button-save" @click="IzinBedeliMuhasebelestir">
|
||||||
|
Muhasebeleştir
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</teleport>
|
||||||
</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()
|
||||||
|
import { useDateStore } from '@/stores/dateStore'
|
||||||
|
const dateStore = useDateStore()
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
isPreview?: boolean
|
isPreview?: boolean
|
||||||
@ -51,12 +150,27 @@
|
|||||||
|
|
||||||
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 selectedOran = ref<number | null>(null)
|
||||||
|
const izinBedelOranlari = ref<Record<string, any>[]>([])
|
||||||
|
const selectedOranId = ref<number | null>(null)
|
||||||
|
const calculatedKdv = ref<number>(0)
|
||||||
|
const calculatedOran = ref<number>(0)
|
||||||
|
|
||||||
|
const calculatedBasvuruKdv = computed<number>(() =>
|
||||||
|
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli !== undefined &&
|
||||||
|
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeliKdvOrani !== undefined
|
||||||
|
? (Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli) *
|
||||||
|
Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeliKdvOrani)) /
|
||||||
|
100
|
||||||
|
: 0
|
||||||
|
)
|
||||||
|
|
||||||
const GetData = async () => {
|
const GetData = async () => {
|
||||||
let data = await dataStore.dataGet(
|
let data = await dataStore.dataGet(
|
||||||
@ -95,12 +209,87 @@
|
|||||||
Object.assign(piyangoStore.araciUyeData, data)
|
Object.assign(piyangoStore.araciUyeData, data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const GetIzinBedelOranlari = async () => {
|
||||||
|
let data = await dataStore.dataGet('IzinBedelOrani/aktif')
|
||||||
|
if (data !== 'errorfalse') {
|
||||||
|
izinBedelOranlari.value = data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const GetIkramiyeTotalValues = async () => {
|
||||||
|
let data = await dataStore.dataGet('Ikramiye/Cekilis/' + piyangoStore.selectedLottery +'?pageNumber=0')
|
||||||
|
//todo:page 0
|
||||||
|
if (data !== 'errorfalse') {
|
||||||
|
piyangoIkramiyeStore.totalIkramiyeValue = data.toplamdeger
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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>${
|
||||||
|
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli !==
|
||||||
|
undefined
|
||||||
|
? globalStore.toTrLocale(
|
||||||
|
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli
|
||||||
|
)
|
||||||
|
: 0
|
||||||
|
} ₺</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>KDV (%${
|
||||||
|
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeliKdvOrani
|
||||||
|
}):</td>
|
||||||
|
<td>
|
||||||
|
${
|
||||||
|
calculatedBasvuruKdv.value !== undefined
|
||||||
|
? globalStore.toTrLocale(calculatedBasvuruKdv.value)
|
||||||
|
: 0
|
||||||
|
}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Toplam Bedel:</td>
|
||||||
|
<td>
|
||||||
|
${
|
||||||
|
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli !==
|
||||||
|
undefined
|
||||||
|
? globalStore.toTrLocale(
|
||||||
|
Number(
|
||||||
|
muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeli
|
||||||
|
) + calculatedBasvuruKdv.value
|
||||||
|
)
|
||||||
|
: 0
|
||||||
|
}
|
||||||
|
</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
|
||||||
|
)
|
||||||
|
dialogStore.CloseDialog('basvurubedelimuhasebelestir')
|
||||||
loaded.value = false
|
loaded.value = false
|
||||||
await GetData()
|
await GetData()
|
||||||
piyangoStore.lotteryBasvuruBedeliStatus = true
|
piyangoStore.lotteryBasvuruBedeliStatus = true
|
||||||
@ -111,15 +300,68 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const OpenIzinBedeliModal = async () => {
|
||||||
|
await GetIzinBedelOranlari()
|
||||||
|
await GetIkramiyeTotalValues()
|
||||||
|
showIzinBedeliModal.value = true
|
||||||
|
selectedOran.value = null
|
||||||
|
selectedOranId.value = null
|
||||||
|
}
|
||||||
|
|
||||||
|
const CloseIzinBedeliModal = () => {
|
||||||
|
showIzinBedeliModal.value = false
|
||||||
|
selectedOran.value = null
|
||||||
|
selectedOranId.value = null
|
||||||
|
}
|
||||||
|
|
||||||
|
const OnOranChange = (event: Event) => {
|
||||||
|
const target = event.target as HTMLSelectElement
|
||||||
|
const selectedId = parseInt(target.value)
|
||||||
|
const selectedOranData = izinBedelOranlari.value.find(
|
||||||
|
(item) => item.id === selectedId
|
||||||
|
)
|
||||||
|
|
||||||
|
if (selectedOranData) {
|
||||||
|
selectedOranId.value = selectedOranData.id
|
||||||
|
selectedOran.value = selectedOranData.oran
|
||||||
|
} else {
|
||||||
|
selectedOranId.value = null
|
||||||
|
selectedOran.value = null
|
||||||
|
}
|
||||||
|
|
||||||
|
calculatedOran.value =
|
||||||
|
(Number(piyangoIkramiyeStore.totalIkramiyeValue) * Number(selectedOran.value)) / 100
|
||||||
|
|
||||||
|
calculatedKdv.value =
|
||||||
|
(calculatedOran.value *
|
||||||
|
Number(muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeliKdvOrani)) /
|
||||||
|
100
|
||||||
|
}
|
||||||
|
|
||||||
const IzinBedeliMuhasebelestir = async () => {
|
const IzinBedeliMuhasebelestir = async () => {
|
||||||
|
if (selectedOranId.value === null) {
|
||||||
|
toastStore.AddToast('Lütfen bir oran seçiniz', 'error', 5000)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
let data = await dataStore.dataGet(
|
let data = await dataStore.dataGet(
|
||||||
'MuhasebeSettings/IzinBasvuruBedeli/' + piyangoStore.selectedLottery
|
'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
|
||||||
|
showIzinBedeliModal.value = false
|
||||||
|
selectedOran.value = null
|
||||||
|
selectedOranId.value = null
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
loaded.value = true
|
loaded.value = true
|
||||||
}, 30)
|
}, 30)
|
||||||
@ -131,3 +373,140 @@
|
|||||||
await GetData()
|
await GetData()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.modal-overlay {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
z-index: 9999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-content {
|
||||||
|
background: white;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 0;
|
||||||
|
max-width: 500px;
|
||||||
|
width: 90%;
|
||||||
|
max-height: 90vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
padding: 20px 24px;
|
||||||
|
border-bottom: 1px solid #e5e7eb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-header h3 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #1f2937;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-close {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
font-size: 24px;
|
||||||
|
cursor: pointer;
|
||||||
|
color: #6b7280;
|
||||||
|
padding: 0;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 4px;
|
||||||
|
transition: background-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-close:hover {
|
||||||
|
background-color: #f3f4f6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-body {
|
||||||
|
padding: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group label {
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #374151;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-select {
|
||||||
|
width: 100%;
|
||||||
|
padding: 12px;
|
||||||
|
border: 1px solid #d1d5db;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: 14px;
|
||||||
|
background-color: white;
|
||||||
|
transition: border-color 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-select:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: #3b82f6;
|
||||||
|
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
gap: 12px;
|
||||||
|
padding: 20px 24px;
|
||||||
|
border-top: 1px solid #e5e7eb;
|
||||||
|
background-color: #f9fafb;
|
||||||
|
border-radius: 0 0 8px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-c {
|
||||||
|
padding: 10px 20px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-cancel {
|
||||||
|
background-color: #6b7280;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-cancel:hover {
|
||||||
|
background-color: #4b5563;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-save {
|
||||||
|
background-color: #3b82f6;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-save:hover {
|
||||||
|
background-color: #2563eb;
|
||||||
|
}
|
||||||
|
.table-bordered {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.table-bordered tr td {
|
||||||
|
border-bottom: 1px solid #d8d8d8;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
90
src/module/muhasebe/components/form/FormIzinBedelOrani.vue
Normal file
90
src/module/muhasebe/components/form/FormIzinBedelOrani.vue
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
<template>
|
||||||
|
<div
|
||||||
|
:class="['form-part', izinBedelOraniValidationStore.formChanged ? 'changed' : '']">
|
||||||
|
<div class="form-part-title">
|
||||||
|
<h4>{{ izinBedelOraniStore.isNew ? 'Yeni İzin Bedel Oranı' : 'İzin Bedel Oranı Düzenle' }}</h4>
|
||||||
|
<div class="form-part-title-buttons"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-part-content">
|
||||||
|
<form-input
|
||||||
|
required
|
||||||
|
half
|
||||||
|
modelKey="ad"
|
||||||
|
v-model="izinBedelOraniStore.izinBedelOraniForm.ad"
|
||||||
|
:invalidText="izinBedelOraniValidationStore.invalidTexts.ad"
|
||||||
|
label="Ad"
|
||||||
|
maxlength="100"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
|
<form-input
|
||||||
|
required
|
||||||
|
half
|
||||||
|
modelKey="oran"
|
||||||
|
v-model="izinBedelOraniStore.izinBedelOraniForm.oran"
|
||||||
|
:invalidText="izinBedelOraniValidationStore.invalidTexts.oran"
|
||||||
|
label="Oran (%)"
|
||||||
|
maxlength="3"
|
||||||
|
@keydown="validationStore.allowNumbersWithKeys"
|
||||||
|
description="1-100 arasında bir rakam giriniz"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
|
<form-textarea
|
||||||
|
required
|
||||||
|
modelKey="aciklama"
|
||||||
|
v-model="izinBedelOraniStore.izinBedelOraniForm.aciklama"
|
||||||
|
:invalidText="izinBedelOraniValidationStore.invalidTexts.aciklama"
|
||||||
|
label="Açıklama"
|
||||||
|
maxlength="500"
|
||||||
|
rows="4"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
|
<form-checkbox
|
||||||
|
modelKey="aktif"
|
||||||
|
v-model="izinBedelOraniStore.izinBedelOraniForm.aktif"
|
||||||
|
label="Aktif"
|
||||||
|
@change="OnKeyup" />
|
||||||
|
<div
|
||||||
|
class="form-item"
|
||||||
|
v-if="izinBedelOraniStore.isNew || izinBedelOraniValidationStore.formChanged">
|
||||||
|
<button
|
||||||
|
class="button-c button-save"
|
||||||
|
@click="izinBedelOraniService.SaveIzinBedelOrani">
|
||||||
|
{{ izinBedelOraniStore.isNew ? 'Kaydet' : 'Güncelle' }}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="button-c button-cancel"
|
||||||
|
@click="CancelForm"
|
||||||
|
v-if="izinBedelOraniValidationStore.formChanged">
|
||||||
|
Vazgeç
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { onBeforeMount } from 'vue'
|
||||||
|
import { useValidationStore } from '@/stores/validationStore'
|
||||||
|
const validationStore = useValidationStore()
|
||||||
|
import { useIzinBedelOraniStore } from '../../store/izinBedelOraniStore'
|
||||||
|
const izinBedelOraniStore = useIzinBedelOraniStore()
|
||||||
|
import { useIzinBedelOraniValidationStore } from '../../validation/izinBedelOraniValidationStore'
|
||||||
|
const izinBedelOraniValidationStore = useIzinBedelOraniValidationStore()
|
||||||
|
import { useIzinBedelOraniService } from '../../service/izinBedelOraniService'
|
||||||
|
const izinBedelOraniService = useIzinBedelOraniService()
|
||||||
|
|
||||||
|
const OnKeyup = () => {
|
||||||
|
izinBedelOraniValidationStore.formChanged = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const CancelForm = () => {
|
||||||
|
if (izinBedelOraniStore.isNew) {
|
||||||
|
izinBedelOraniStore.isNew = false
|
||||||
|
} else {
|
||||||
|
izinBedelOraniStore.RestoreData()
|
||||||
|
izinBedelOraniValidationStore.formChanged = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onBeforeMount(() => {
|
||||||
|
if (izinBedelOraniStore.isNew) {
|
||||||
|
izinBedelOraniStore.ResetForm()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@ -6,17 +6,6 @@
|
|||||||
<div class="form-part-title-buttons"></div>
|
<div class="form-part-title-buttons"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-part-content" v-if="muhasebeSettingsService.loaded">
|
<div class="form-part-content" v-if="muhasebeSettingsService.loaded">
|
||||||
<form-input
|
|
||||||
required
|
|
||||||
half
|
|
||||||
modelKey="izinBedeliOrani"
|
|
||||||
v-model="muhasebeSettingsStore.muhasebeSettingsForm.izinBedeliOrani"
|
|
||||||
:invalidText="muhasebeSettingsValidationStore.invalidTexts.izinBedeliOrani"
|
|
||||||
label="İzin Bedeli Oranı"
|
|
||||||
maxlength="3"
|
|
||||||
@keydown="validationStore.allowNumbersWithKeys"
|
|
||||||
description="1-100 arasında bir rakam giriniz"
|
|
||||||
@keyup="OnKeyup" />
|
|
||||||
<form-input
|
<form-input
|
||||||
required
|
required
|
||||||
half
|
half
|
||||||
@ -26,6 +15,15 @@
|
|||||||
label="Başvuru Bedeli"
|
label="Başvuru Bedeli"
|
||||||
@keydown="validationStore.allowPrice"
|
@keydown="validationStore.allowPrice"
|
||||||
@keyup="OnKeyup" />
|
@keyup="OnKeyup" />
|
||||||
|
<form-input
|
||||||
|
required
|
||||||
|
half
|
||||||
|
modelKey="basvuruBedeliKdvOrani"
|
||||||
|
v-model="muhasebeSettingsStore.muhasebeSettingsForm.basvuruBedeliKdvOrani"
|
||||||
|
:invalidText="muhasebeSettingsValidationStore.invalidTexts.BasvuruBedeliKdvOrani"
|
||||||
|
label="Başvuru Bedeli KDV Oranı"
|
||||||
|
@keydown="validationStore.allowPrice"
|
||||||
|
@keyup="OnKeyup" />
|
||||||
<form-input
|
<form-input
|
||||||
required
|
required
|
||||||
half
|
half
|
||||||
@ -58,7 +56,10 @@
|
|||||||
@click="muhasebeSettingsService.SaveMuhasebeSettings">
|
@click="muhasebeSettingsService.SaveMuhasebeSettings">
|
||||||
Kaydet
|
Kaydet
|
||||||
</button>
|
</button>
|
||||||
<button class="button-c button-cancel" @click="muhasebeSettingsStore.RestoreData" v-if="muhasebeSettingsValidationStore.formChanged">
|
<button
|
||||||
|
class="button-c button-cancel"
|
||||||
|
@click="muhasebeSettingsStore.RestoreData"
|
||||||
|
v-if="muhasebeSettingsValidationStore.formChanged">
|
||||||
Vazgeç
|
Vazgeç
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user