From be3d5939ccd5a033c1cc432b4fb896e1a5886a2d Mon Sep 17 00:00:00 2001 From: SamSys Date: Wed, 5 Mar 2025 22:04:13 +0330 Subject: [PATCH] print customizeCheckout --- .../PrintOneCheckoutTemporary.cshtml | 52 +++++----- .../PrintOneCheckoutUnofficial.cshtml | 48 +++++----- .../PrintDetailsCheckoutTemporaryRaw.cshtml | 48 +++++----- .../PrintDetailsCheckoutUnofficialRaw.cshtml | 48 +++++----- .../CustomizeCheckout/js/CheckoutTemporary.js | 42 +++----- .../js/CheckoutUnofficial.js | 96 +++++-------------- 6 files changed, 133 insertions(+), 201 deletions(-) diff --git a/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/PrintOneCheckoutTemporary.cshtml b/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/PrintOneCheckoutTemporary.cshtml index 48e54088..02afaa75 100644 --- a/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/PrintOneCheckoutTemporary.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/PrintOneCheckoutTemporary.cshtml @@ -272,7 +272,7 @@ @Model.MonthlyRollCall.DailyRollCalls[i].DateTimeGr.ToFarsiWithoutYear() - @Model.MonthlyRollCall.DailyRollCalls[i].DateTimeGr.DayOfWeek.DayOfWeeKToPersian() @if (@Model.MonthlyRollCall.DailyRollCalls[i].IsAbsent) { - - + -
@@ -283,10 +283,10 @@
- - - - - + - + + -
@@ -299,30 +299,30 @@
- - + - } else { @if (string.IsNullOrWhiteSpace(Model.MonthlyRollCall.DailyRollCalls[i].LeaveType)) { - @Model.MonthlyRollCall.DailyRollCalls[i].EnterDifferencesMinutes1 + @Model.MonthlyRollCall.DailyRollCalls[i].EnterDifferencesMinutes1 @Model.MonthlyRollCall.DailyRollCalls[i].StartDate1 @Model.MonthlyRollCall.DailyRollCalls[i].EndDate1 - @Model.MonthlyRollCall.DailyRollCalls[i].ExitDifferencesMinutes1 + @Model.MonthlyRollCall.DailyRollCalls[i].ExitDifferencesMinutes1 - @Model.MonthlyRollCall.DailyRollCalls[i].EnterDifferencesMinutes2 + @Model.MonthlyRollCall.DailyRollCalls[i].EnterDifferencesMinutes2 @Model.MonthlyRollCall.DailyRollCalls[i].StartDate2 @Model.MonthlyRollCall.DailyRollCalls[i].EndDate2 - @Model.MonthlyRollCall.DailyRollCalls[i].ExitDifferencesMinutes2 + @Model.MonthlyRollCall.DailyRollCalls[i].ExitDifferencesMinutes2 } else { - - + -
@@ -332,9 +332,9 @@
- - + - - - + -
@@ -345,7 +345,7 @@
- - + - } } @@ -405,7 +405,7 @@ @day.DateTimeGr.ToFarsiWithoutYear() - @day.DateTimeGr.DayOfWeek.DayOfWeeKToPersian() @if (day.IsAbsent) { - - + -
@@ -417,9 +417,9 @@
- - - - - + - + + -
@@ -432,29 +432,29 @@
- - + - } else { @if (string.IsNullOrWhiteSpace(day.LeaveType)) { - @day.EnterDifferencesMinutes1 + @day.EnterDifferencesMinutes1 @day.StartDate1 @day.EndDate1 - @day.ExitDifferencesMinutes1 + @day.ExitDifferencesMinutes1 - @day.EnterDifferencesMinutes1 + @day.EnterDifferencesMinutes1 @day.StartDate2 @day.EndDate2 - @day.ExitDifferencesMinutes2 + @day.ExitDifferencesMinutes2 } else { - - + -
@@ -464,8 +464,8 @@
- - - - + - + -
@@ -476,7 +476,7 @@
- - + - } } diff --git a/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/PrintOneCheckoutUnofficial.cshtml b/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/PrintOneCheckoutUnofficial.cshtml index 165aa8a9..ff58fa8a 100644 --- a/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/PrintOneCheckoutUnofficial.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/PrintOneCheckoutUnofficial.cshtml @@ -274,7 +274,7 @@ @Model.MonthlyRollCall.DailyRollCalls[i].DateTimeGr.ToFarsiWithoutYear() - @Model.MonthlyRollCall.DailyRollCalls[i].DateTimeGr.DayOfWeek.DayOfWeeKToPersian() @if (@Model.MonthlyRollCall.DailyRollCalls[i].IsAbsent) { - - + -
@@ -286,9 +286,9 @@
- - + - - - + -
@@ -301,30 +301,30 @@
- - + - } else { @if (string.IsNullOrWhiteSpace(Model.MonthlyRollCall.DailyRollCalls[i].LeaveType)) { - @Model.MonthlyRollCall.DailyRollCalls[i].EnterDifferencesMinutes1 + @Model.MonthlyRollCall.DailyRollCalls[i].EnterDifferencesMinutes1 @Model.MonthlyRollCall.DailyRollCalls[i].StartDate1 @Model.MonthlyRollCall.DailyRollCalls[i].EndDate1 - @Model.MonthlyRollCall.DailyRollCalls[i].ExitDifferencesMinutes1 + @Model.MonthlyRollCall.DailyRollCalls[i].ExitDifferencesMinutes1 - @Model.MonthlyRollCall.DailyRollCalls[i].EnterDifferencesMinutes2 + @Model.MonthlyRollCall.DailyRollCalls[i].EnterDifferencesMinutes2 @Model.MonthlyRollCall.DailyRollCalls[i].StartDate2 @Model.MonthlyRollCall.DailyRollCalls[i].EndDate2 - @Model.MonthlyRollCall.DailyRollCalls[i].ExitDifferencesMinutes2 + @Model.MonthlyRollCall.DailyRollCalls[i].ExitDifferencesMinutes2 } else { - - + -
@@ -334,9 +334,9 @@
- - + - - - + -
@@ -347,7 +347,7 @@
- - + - } } @@ -407,7 +407,7 @@ @day.DateTimeGr.ToFarsiWithoutYear() - @day.DateTimeGr.DayOfWeek.DayOfWeeKToPersian() @if (day.IsAbsent) { - - + -
@@ -419,9 +419,9 @@
- - + - - - + -
@@ -434,29 +434,29 @@
- - + - } else { @if (string.IsNullOrWhiteSpace(day.LeaveType)) { - @day.EnterDifferencesMinutes1 + @day.EnterDifferencesMinutes1 @day.StartDate1 @day.EndDate1 - @day.ExitDifferencesMinutes1 + @day.ExitDifferencesMinutes1 - @day.EnterDifferencesMinutes2 + @day.EnterDifferencesMinutes1 @day.StartDate2 @day.EndDate2 - @day.ExitDifferencesMinutes2 + @day.ExitDifferencesMinutes2 } else { - - + -
@@ -466,8 +466,8 @@
- - - - + - + -
@@ -478,7 +478,7 @@
- - + - } } diff --git a/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/_Partials/PrintDetailsCheckoutTemporaryRaw.cshtml b/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/_Partials/PrintDetailsCheckoutTemporaryRaw.cshtml index cd0d6a6e..a86921c2 100644 --- a/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/_Partials/PrintDetailsCheckoutTemporaryRaw.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/_Partials/PrintDetailsCheckoutTemporaryRaw.cshtml @@ -247,7 +247,7 @@ @Model.MonthlyRollCall.DailyRollCalls[i].DateTimeGr.ToFarsiWithoutYear() - @Model.MonthlyRollCall.DailyRollCalls[i].DateTimeGr.DayOfWeek.DayOfWeeKToPersian() @if (@Model.MonthlyRollCall.DailyRollCalls[i].IsAbsent) { - - + -
@@ -259,9 +259,9 @@
- - + - - - + -
@@ -274,30 +274,30 @@
- - + - } else { @if (string.IsNullOrWhiteSpace(Model.MonthlyRollCall.DailyRollCalls[i].LeaveType)) { - @Model.MonthlyRollCall.DailyRollCalls[i].EnterDifferencesMinutes1 + @Model.MonthlyRollCall.DailyRollCalls[i].EnterDifferencesMinutes1 @Model.MonthlyRollCall.DailyRollCalls[i].StartDate1 @Model.MonthlyRollCall.DailyRollCalls[i].EndDate1 - @Model.MonthlyRollCall.DailyRollCalls[i].ExitDifferencesMinutes1 + @Model.MonthlyRollCall.DailyRollCalls[i].ExitDifferencesMinutes1 - @Model.MonthlyRollCall.DailyRollCalls[i].EnterDifferencesMinutes2 + @Model.MonthlyRollCall.DailyRollCalls[i].EnterDifferencesMinutes2 @Model.MonthlyRollCall.DailyRollCalls[i].StartDate2 @Model.MonthlyRollCall.DailyRollCalls[i].EndDate2 - @Model.MonthlyRollCall.DailyRollCalls[i].ExitDifferencesMinutes2 + @Model.MonthlyRollCall.DailyRollCalls[i].ExitDifferencesMinutes2 } else { - - + -
@@ -307,9 +307,9 @@
- - + - - - + -
@@ -320,7 +320,7 @@
- - + - } } @@ -380,7 +380,7 @@ @day.DateTimeGr.ToFarsiWithoutYear() - @day.DateTimeGr.DayOfWeek.DayOfWeeKToPersian() @if (day.IsAbsent) { - - + -
@@ -392,9 +392,9 @@
- - + - - - + -
@@ -407,29 +407,29 @@
- - + - } else { @if (string.IsNullOrWhiteSpace(day.LeaveType)) { - @day.EnterDifferencesMinutes1 + @day.EnterDifferencesMinutes1 @day.StartDate1 @day.EndDate1 - @day.ExitDifferencesMinutes1 + @day.ExitDifferencesMinutes1 - @day.EnterDifferencesMinutes1 + @day.EnterDifferencesMinutes1 @day.StartDate2 @day.EndDate2 - @day.ExitDifferencesMinutes2 + @day.ExitDifferencesMinutes2 } else { - - + -
@@ -439,8 +439,8 @@
- - - - + - + -
@@ -451,7 +451,7 @@
- - + - } } diff --git a/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/_Partials/PrintDetailsCheckoutUnofficialRaw.cshtml b/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/_Partials/PrintDetailsCheckoutUnofficialRaw.cshtml index 9296fc11..6847d151 100644 --- a/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/_Partials/PrintDetailsCheckoutUnofficialRaw.cshtml +++ b/ServiceHost/Areas/Client/Pages/Company/CustomizeCheckout/_Partials/PrintDetailsCheckoutUnofficialRaw.cshtml @@ -246,7 +246,7 @@ @Model.MonthlyRollCall.DailyRollCalls[i].DateTimeGr.ToFarsiWithoutYear() - @Model.MonthlyRollCall.DailyRollCalls[i].DateTimeGr.DayOfWeek.DayOfWeeKToPersian() @if (@Model.MonthlyRollCall.DailyRollCalls[i].IsAbsent) { - - + -
@@ -258,9 +258,9 @@
- - + - - - + -
@@ -273,30 +273,30 @@
- - + - } else { @if (string.IsNullOrWhiteSpace(Model.MonthlyRollCall.DailyRollCalls[i].LeaveType)) { - @Model.MonthlyRollCall.DailyRollCalls[i].EnterDifferencesMinutes1 + @Model.MonthlyRollCall.DailyRollCalls[i].EnterDifferencesMinutes1 @Model.MonthlyRollCall.DailyRollCalls[i].StartDate1 @Model.MonthlyRollCall.DailyRollCalls[i].EndDate1 - @Model.MonthlyRollCall.DailyRollCalls[i].ExitDifferencesMinutes1 + @Model.MonthlyRollCall.DailyRollCalls[i].ExitDifferencesMinutes1 - @Model.MonthlyRollCall.DailyRollCalls[i].EnterDifferencesMinutes2 + @Model.MonthlyRollCall.DailyRollCalls[i].EnterDifferencesMinutes2 @Model.MonthlyRollCall.DailyRollCalls[i].StartDate2 @Model.MonthlyRollCall.DailyRollCalls[i].EndDate2 - @Model.MonthlyRollCall.DailyRollCalls[i].ExitDifferencesMinutes2 + @Model.MonthlyRollCall.DailyRollCalls[i].ExitDifferencesMinutes2 } else { - - + -
@@ -306,9 +306,9 @@
- - + - - - + -
@@ -319,7 +319,7 @@
- - + - } } @@ -379,7 +379,7 @@ @day.DateTimeGr.ToFarsiWithoutYear() - @day.DateTimeGr.DayOfWeek.DayOfWeeKToPersian() @if (day.IsAbsent) { - - + -
@@ -391,9 +391,9 @@
- - + - - - + -
@@ -406,29 +406,29 @@
- - + - } else { @if (string.IsNullOrWhiteSpace(day.LeaveType)) { - @day.EnterDifferencesMinutes1 + @day.EnterDifferencesMinutes1 @day.StartDate1 @day.EndDate1 - @day.ExitDifferencesMinutes1 + @day.ExitDifferencesMinutes1 - @day.EnterDifferencesMinutes2 + @day.EnterDifferencesMinutes1 @day.StartDate2 @day.EndDate2 - @day.ExitDifferencesMinutes2 + @day.ExitDifferencesMinutes2 } else { - - + -
@@ -438,8 +438,8 @@
- - - - + - + -
@@ -450,7 +450,7 @@
- - + - } } diff --git a/ServiceHost/wwwroot/AssetsClient/pages/CustomizeCheckout/js/CheckoutTemporary.js b/ServiceHost/wwwroot/AssetsClient/pages/CustomizeCheckout/js/CheckoutTemporary.js index 400f5869..105f1a5a 100644 --- a/ServiceHost/wwwroot/AssetsClient/pages/CustomizeCheckout/js/CheckoutTemporary.js +++ b/ServiceHost/wwwroot/AssetsClient/pages/CustomizeCheckout/js/CheckoutTemporary.js @@ -1361,7 +1361,7 @@ function loadMore() {
ماه
${item.month}
-
+
شماره قرارداد
${item.contractNo}
@@ -1378,9 +1378,17 @@ function loadMore() {
${item.contractEndFa}
-
ساعات کارکرد
+
روزهای کارکرد
${item.sumOfWorkingDays}
+
+
تاخیر در ورود
+
${item.totalLateToWorkDeduction}
+
+
+
غیبت
+
${item.absenceDeduction}
+
مبلغ قابل پرداخت
@@ -1597,6 +1605,7 @@ function showExcelAllModal() { window.location.href = showCheckoutExcelModalUrl; } + function downloadExcelAll() { var idlist = ""; $('.foo').each(function () { @@ -1626,35 +1635,6 @@ function downloadExcelAll() { } } -//function downloadExcelAll() { -// var idlist = ""; -// $('.foo').each(function () { -// if ($(this).is(":checked")) { - -// var a = $(this).val(); -// var b = a + "+"; -// idlist += b; - -// } -// }); - -// var filterArray = []; -// $("input[name='filter[]']:checked").each(function () { -// filterArray.push($(this).val()); -// }); - - -// if (idlist !== "") { -// //var url = CheckoutExcelAllUrl + "&idList=" + idlist; -// var url = CheckoutExcelAllUrl + "&idList=" + encodeURIComponent(idlist); - -// filterArray.forEach(function (filter) { -// url += "&filter=" + encodeURIComponent(filter); -// }); -// window.open(url, "_blank"); -// } -//} - function printAllMobile() { var idlist = ""; var year = $('#Year').val(); diff --git a/ServiceHost/wwwroot/AssetsClient/pages/CustomizeCheckout/js/CheckoutUnofficial.js b/ServiceHost/wwwroot/AssetsClient/pages/CustomizeCheckout/js/CheckoutUnofficial.js index e7ef8c14..fa79415f 100644 --- a/ServiceHost/wwwroot/AssetsClient/pages/CustomizeCheckout/js/CheckoutUnofficial.js +++ b/ServiceHost/wwwroot/AssetsClient/pages/CustomizeCheckout/js/CheckoutUnofficial.js @@ -1362,7 +1362,7 @@ function loadMore() {
ماه
${item.month}
-
+
شماره قرارداد
${item.contractNo}
@@ -1379,9 +1379,17 @@ function loadMore() {
${item.contractEndFa}
-
ساعات کارکرد
+
روزهای کارکرد
${item.sumOfWorkingDays}
+
+
تاخیر در ورود
+
${item.totalLateToWorkDeduction}
+
+
+
غیبت
+
${item.absenceDeduction}
+
مبلغ قابل پرداخت
@@ -1595,42 +1603,12 @@ function showExcelAllModal() { }, 3500); return } - downloadExcelAll() -/* window.location.href = showCheckoutExcelModalUrl;*/ + + window.location.href = showCheckoutExcelModalUrl; } - - -function excelDownloadAll() { +function downloadExcelAll() { var idlist = ""; - var year = $('#Year').val(); - var month = $('#Month').val(); - - - if (year === '0' || month === '0') { - $('#dropdown-year').addClass("errored"); - $('#dropdown-month').addClass("errored"); - $('.alert-msg').show(); - $('.alert-msg p').text('لطفا سال و ماه را انتخاب نموده و جستجو نمایید'); - setTimeout(function () { - $('.alert-msg').hide(); - $('.alert-msg p').text(''); - $('#dropdown-year').removeClass("errored"); - $('#dropdown-month').removeClass("errored"); - }, 3500); - return - } - - if (!($('input:checkbox').is(":checked"))) { - $('.alert-msg').show(); - $('.alert-msg p').text('هیچ موردی انتخاب نشده است.'); - setTimeout(function () { - $('.alert-msg').hide(); - $('.alert-msg p').text(''); - }, 3500); - return - } - $('.foo').each(function () { if ($(this).is(":checked")) { @@ -1641,49 +1619,23 @@ function excelDownloadAll() { } }); + var filterArray = []; + $("input[name='filter[]']:checked").each(function () { + filterArray.push($(this).val()); + }); + + if (idlist !== "") { + //var url = CheckoutExcelAllUrl + "&idList=" + idlist; + var url = CheckoutExcelAllUrl + "&idList=" + encodeURIComponent(idlist); - - var yearFa = '&yearFa=' + year; - var monthFa = '&monthFa=' + month; - var url = CheckoutExcelAllUrl + '&idlist=' + idlist; - - - //console.log(url + '?checkoutId=' + idlist + yearFa + monthFa); + filterArray.forEach(function (filter) { + url += "&filter=" + encodeURIComponent(filter); + }); window.open(url, "_blank"); - } } -//function downloadExcelAll() { -// var idlist = ""; -// $('.foo').each(function () { -// if ($(this).is(":checked")) { - -// var a = $(this).val(); -// var b = a + "+"; -// idlist += b; - -// } -// }); - -// var filterArray = []; -// $("input[name='filter[]']:checked").each(function () { -// filterArray.push($(this).val()); -// }); - - -// if (idlist !== "") { -// //var url = CheckoutExcelAllUrl + "&idList=" + idlist; -// var url = CheckoutExcelAllUrl + "&idList=" + encodeURIComponent(idlist); - -// filterArray.forEach(function (filter) { -// url += "&filter=" + encodeURIComponent(filter); -// }); -// window.open(url, "_blank"); -// } -//} - function printAllMobile() { var idlist = ""; var year = $('#Year').val();