588 lines
23 KiB
Plaintext
588 lines
23 KiB
Plaintext
@model CompanyManagment.App.Contracts.Leave.LeavePrintViewModel
|
|
|
|
<style>
|
|
.modal .modal-dialog .modal-content {
|
|
background-color: white !important;
|
|
}
|
|
|
|
.modal-dialog {
|
|
max-width: 100%;
|
|
width: 22.4cm;
|
|
}
|
|
|
|
@@page {
|
|
size: A4;
|
|
margin: 0mm;
|
|
page-break-after: auto;
|
|
}
|
|
|
|
@@media screen {
|
|
#printSection {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.print:last-child {
|
|
page-break-after: auto !important;
|
|
}
|
|
|
|
@@media print {
|
|
body * {
|
|
visibility: hidden;
|
|
page-break-after: auto;
|
|
background-color: #fff;
|
|
}
|
|
|
|
html, body {
|
|
height: 100%;
|
|
margin: 0 !important;
|
|
padding: 0 !important;
|
|
overflow: clip;
|
|
}
|
|
|
|
#printSection, #printSection * {
|
|
visibility: visible;
|
|
page-break-after: auto;
|
|
}
|
|
|
|
#printThis {
|
|
width: 100%;
|
|
padding: 2rem 1rem;
|
|
}
|
|
|
|
#printThis .section-leave {
|
|
/* margin: 9mm 0 0 0; */
|
|
page-break-inside: avoid !important;
|
|
}
|
|
|
|
footer {
|
|
page-break-after: auto;
|
|
display: none;
|
|
}
|
|
|
|
header {
|
|
display: none;
|
|
}
|
|
|
|
#printSection {
|
|
position: absolute;
|
|
left: 0;
|
|
page-break-after: auto;
|
|
top: 0;
|
|
}
|
|
|
|
.head {
|
|
background-color: #cdcdcd !important;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.week {
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.radio-info input[type="radio"]:checked + label::after {
|
|
background-color: black !important;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
}
|
|
|
|
.col-4, .col-3, .col-9,
|
|
.col-2, .col-10, .col-6,
|
|
.col-8, .col-5, .col-7,
|
|
.col-offset-1 {
|
|
float: right !important;
|
|
}
|
|
|
|
label .modal {
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.fontBold {
|
|
font-family: IranYekanEXBold !important;
|
|
}
|
|
|
|
.fontNumber {
|
|
font-family: IranText !important;
|
|
}
|
|
|
|
.modal-body {
|
|
height: 99%;
|
|
}
|
|
|
|
.row {
|
|
margin-right: -10px !important;
|
|
margin-left: -10px !important;
|
|
}
|
|
|
|
.section-leave {
|
|
position: relative;
|
|
height: 100%;
|
|
width: 100%;
|
|
border: 1px solid #c6c6c6;
|
|
border-radius: 10px;
|
|
}
|
|
|
|
.title {
|
|
margin: 4px 0 0 0;
|
|
font-size: 15px;
|
|
font-weight: bold;
|
|
text-align: center;
|
|
}
|
|
|
|
.paragraph {
|
|
margin: 8px 0 0 0;
|
|
font-size: 14px;
|
|
text-align: justify;
|
|
line-height: 22px;
|
|
}
|
|
|
|
.active-paragraph {
|
|
font-weight: bold;
|
|
background-color: #ebe6e6 !important;
|
|
padding: 0px 6px;
|
|
border-radius: 5px;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.signature-section {
|
|
width: 100%;
|
|
position: absolute;
|
|
right: 0;
|
|
bottom: 10px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-around;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.signature-card {
|
|
position: relative;
|
|
width: 180px;
|
|
height: 95px;
|
|
margin: auto;
|
|
}
|
|
|
|
.signature-card .signature-title {
|
|
position: absolute;
|
|
top: -7px;
|
|
right: 10px;
|
|
margin: 0;
|
|
font-size: 10px;
|
|
background-color: #fff;
|
|
z-index: 2;
|
|
}
|
|
|
|
.signature-card .signature-border {
|
|
width: 100%;
|
|
border: 2px dashed #cacaca;
|
|
height: 100%;
|
|
border-radius: 15px;
|
|
}
|
|
|
|
.status {
|
|
display: flex;
|
|
align-items: center;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.section-leave .status svg {
|
|
margin: 0 0 0 4px;
|
|
}
|
|
|
|
.leave-hour {
|
|
border: 1px solid #1e293b;
|
|
padding: 4px 7px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.leave-day {
|
|
background-color: #d3d3d3 !important;
|
|
padding: 4px 7px;
|
|
border-radius: 4px;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}tus {
|
|
display: flex;
|
|
align-items: center;
|
|
font-size: 14px;
|
|
}
|
|
|
|
.section-leave .status svg {
|
|
margin: 0 0 0 4px;
|
|
}
|
|
|
|
.leave-hour {
|
|
border: 1px solid #1e293b;
|
|
padding: 4px 7px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.leave-day {
|
|
background-color: #d3d3d3 !important;
|
|
padding: 4px 7px;
|
|
border-radius: 4px;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.print-card {
|
|
position: fixed;
|
|
top: 130px;
|
|
width: auto;
|
|
z-index: 20;
|
|
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
}
|
|
|
|
@@media screen and (max-width: 992px) {
|
|
.wrapper {
|
|
visibility: hidden;
|
|
}
|
|
|
|
.print-card {
|
|
position: relative;
|
|
top: 0;
|
|
width: 100%;
|
|
z-index: 20;
|
|
}
|
|
}
|
|
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
border-radius: 10px;
|
|
border: none;
|
|
overflow: hidden;
|
|
}
|
|
td {
|
|
padding: 8px;
|
|
border-radius: 10px;
|
|
border: none;
|
|
}
|
|
.half {
|
|
width: 50%;
|
|
}
|
|
</style>
|
|
|
|
<div class="modal-header d-block text-center position-relative">
|
|
<button type="button" class="btn-close position-absolute text-start" data-bs-dismiss="modal" aria-label="Close"></button>
|
|
</div>
|
|
|
|
<form asp-page="./Leave" asp-page-handler="Details"
|
|
method="post"
|
|
data-ajax="true"
|
|
data-callback=""
|
|
data-action="Refresh"
|
|
enctype="multipart/form-data">
|
|
|
|
<div class="modal-body print" id="printThis">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<fieldset style="border-radius: 10px; height: 9cm; margin: 5px 5mm 0 5mm;">
|
|
<div class="section-leave">
|
|
<table class="w-100">
|
|
<tr>
|
|
<td colspan="2" class="half">
|
|
<div class="">
|
|
<div class="col-3 d-inline-block">
|
|
@if (!string.IsNullOrWhiteSpace(Model.ContractNo))
|
|
{
|
|
<fieldset style="border: 1px solid black; border-radius: 15px; padding: 1px 15px 1px 15px; width: 60%; font-size: 12px; text-align: center;"> @Model.ContractNo</fieldset>
|
|
}
|
|
else
|
|
{
|
|
<fieldset style="border: 1px solid black; border-radius: 15px; padding: 1px 15px 1px 15px; width: 60%; font-size: 12px; text-align: center; visibility: hidden;"> </fieldset>
|
|
}
|
|
</div>
|
|
<div class="col-6 d-inline-block text-center">
|
|
<p class="m-0" style="font-size: 15px; font-weight: bold">برگ مرخصی @(Model.IsInvalid?"(فاقداعتبار)":"")</p>
|
|
</div>
|
|
<div class="col-3 d-inline-block" style="text-align: left;">
|
|
@if (Model.PaidLeaveType == "روزانه")
|
|
{
|
|
<span class="leave-day" style="font-size: 12px !important;">مرخصی روزانه</span>
|
|
}
|
|
else
|
|
{
|
|
<span class="leave-hour" style="font-size: 12px !important;">مرخصی ساعتی</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" class="half">
|
|
<p class="title"><span>@Model.WorkshopName</span></p>
|
|
|
|
<div class="paragraph">
|
|
اینجانب <span class="active-paragraph">@Model.EmployeeFullName</span> به کد ملی <span class="active-paragraph">@Model.NationalCode</span> پرسنل مجموعه <span class="active-paragraph">@Model.WorkshopName</span>
|
|
|
|
@{
|
|
if (@Model.EmployerList.FirstOrDefault().IsLegal == "حقیقی")
|
|
{
|
|
<span>به کارفرمایی</span>
|
|
if (@Model.EmployerList.Count > 1)
|
|
{
|
|
<span class="active-paragraph"> @Model.EmployerList[0].EmployerFullName </span>
|
|
<span>، </span>
|
|
<span class="active-paragraph"> @Model.EmployerList[1].EmployerFullName </span>
|
|
if (@Model.EmployerList.Count > 2)
|
|
{
|
|
<span>و غیره</span>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<span class="active-paragraph">@Model.EmployerList.FirstOrDefault().EmployerFullName</span>
|
|
}
|
|
}
|
|
}
|
|
|
|
متقاضی استفاده از مرخصی <span>@Model.LeaveType</span> وفق تاریخ ذیل می باشم.
|
|
|
|
<br />
|
|
|
|
@if (Model.PaidLeaveType == "روزانه")
|
|
{
|
|
<span class="active-paragraph">@Model.StartLeave</span>
|
|
<span>لغایت</span>
|
|
<span class="active-paragraph">@Model.EndLeave</span>
|
|
<span>به مدت</span>
|
|
<span class="active-paragraph">@Model.LeaveHourses</span>
|
|
<span> کاری.</span>
|
|
}
|
|
else
|
|
{
|
|
<span>مورخ <span class="active-paragraph">@Model.StartLeave</span> از ساعت <span class="active-paragraph">@Model.StartLeaveGr.ToString("HH:mm")</span> الی <span class="active-paragraph">@Model.EndLeaveGr.ToString("HH:mm")</span> (مجموعا @Model.LeaveHourses)</span>
|
|
}
|
|
|
|
<br />
|
|
|
|
در صورت تایید کارفرما یا نماینده ایشان با بازه زمانی فوق از مرخصی <span>@Model.LeaveType</span> استفاده می نمایم.
|
|
|
|
<br />
|
|
<br />
|
|
|
|
@if (Model.IsAccepted)
|
|
{
|
|
<div class="status">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<rect x="3.5" y="3.5" width="17" height="17" rx="2.5" stroke-width="1.5" stroke="#222222" />
|
|
<path d="M8 12L11 15L16 9" stroke-width="1.5" stroke="#222222" stroke-linecap="round" />
|
|
</svg>
|
|
<span>
|
|
موافقت
|
|
</span>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="status">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<rect x="3.5" y="3.5" width="17" height="17" rx="2.5" stroke-width="1.5" stroke="#222222" />
|
|
<path d="M9 9L15 15" stroke-width="1.5" stroke="#222222" stroke-width="1.2" stroke-linecap="round" />
|
|
<path d="M15 9L9 15" stroke-width="1.5" stroke="#222222" stroke-width="1.2" stroke-linecap="round" />
|
|
</svg>
|
|
<span>
|
|
عدم موافقت
|
|
@if (!string.IsNullOrEmpty(Model.Decription))
|
|
{
|
|
<span>: </span>
|
|
<span class=" active-paragraph"> @Model.Decription</span>
|
|
}
|
|
</span>
|
|
</div>
|
|
}
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="half text-end">
|
|
<div class="signature-card">
|
|
<p class="signature-title">امضاء کارفرما / نماینده کارفرما</p>
|
|
<div class="signature-border"></div>
|
|
</div>
|
|
</td>
|
|
<td class="half">
|
|
<div class="signature-card">
|
|
<p class="signature-title">امضاء پرسنل</p>
|
|
<div class="signature-border"></div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
|
|
@* <div class="section-leave">
|
|
<div class="row">
|
|
<div class="col-3 d-inline-block">
|
|
@if (!string.IsNullOrWhiteSpace(Model.ContractNo))
|
|
{
|
|
<fieldset style="border: 1px solid black; border-radius: 15px; padding: 1px 15px 1px 15px; width: 60%; font-size: 12px; text-align: center;"> @Model.ContractNo</fieldset>
|
|
}
|
|
</div>
|
|
<div class="col-6 d-inline-block text-center">
|
|
<p style="font-size: 15px; font-weight: bold">برگ مرخصی</p>
|
|
</div>
|
|
<div class="col-3 d-inline-block" style="text-align: left;">
|
|
@if (Model.PaidLeaveType == "روزانه")
|
|
{
|
|
<span class="leave-day" style="font-size: 12px !important;">مرخصی روزانه</span>
|
|
}
|
|
else
|
|
{
|
|
<span class="leave-hour" style="font-size: 12px !important;">مرخصی ساعتی</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
|
|
<p class="title"><span>@Model.WorkshopName</span></p>
|
|
|
|
<p class="paragraph">
|
|
اینجانب <span class="active-paragraph">@Model.EmployeeFullName</span> به کد ملی <span class="active-paragraph">@Model.NationalCode</span> پرسنل مجموعه <span class="active-paragraph">@Model.WorkshopName</span>
|
|
|
|
@{
|
|
if (@Model.EmployerList.FirstOrDefault().IsLegal == "حقیقی")
|
|
{
|
|
<span>به کارفرمایی</span>
|
|
if (@Model.EmployerList.Count > 1)
|
|
{
|
|
<span class="active-paragraph"> @Model.EmployerList[0].EmployerFullName </span>
|
|
<span>، </span>
|
|
<span class="active-paragraph"> @Model.EmployerList[1].EmployerFullName </span>
|
|
if (@Model.EmployerList.Count > 2)
|
|
{
|
|
<span>و غیره</span>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<span class="active-paragraph">@Model.EmployerList.FirstOrDefault().EmployerFullName</span>
|
|
}
|
|
}
|
|
}
|
|
|
|
متقاضی استفاده از مرخصی <span>@Model.LeaveType</span> وفق تاریخ ذیل می باشم.
|
|
|
|
<br/>
|
|
|
|
@if (Model.PaidLeaveType == "روزانه")
|
|
{
|
|
<span class="active-paragraph">@Model.StartLeave</span>
|
|
<span>لغایت</span>
|
|
<span class="active-paragraph">@Model.EndLeave</span>
|
|
<span>به مدت</span>
|
|
<span class="active-paragraph">@Model.LeaveHourses</span>
|
|
<span> کاری.</span>
|
|
}
|
|
else
|
|
{
|
|
<span>مورخ <span class="active-paragraph">@Model.StartLeave</span> از ساعت <span class="active-paragraph">@Model.StartLeaveGr.ToString("HH:mm")</span> الی <span class="active-paragraph">@Model.EndLeaveGr.ToString("HH:mm")</span> (مجموعا @Model.LeaveHourses)</span>
|
|
}
|
|
|
|
<br/>
|
|
|
|
در صورت تایید کارفرما یا نماینده ایشان با بازه زمانی فوق از مرخصی <span>@Model.LeaveType</span> استفاده می نمایم.
|
|
|
|
<br/>
|
|
<br/>
|
|
|
|
@if (Model.IsAccepted)
|
|
{
|
|
<div class="status">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<rect x="3.5" y="3.5" width="17" height="17" rx="2.5" stroke-width="1.5" stroke="#222222"/>
|
|
<path d="M8 12L11 15L16 9" stroke-width="1.5" stroke="#222222" stroke-linecap="round"/>
|
|
</svg>
|
|
<span>
|
|
موافقت
|
|
</span>
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div class="status">
|
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
<rect x="3.5" y="3.5" width="17" height="17" rx="2.5" stroke-width="1.5" stroke="#222222"/>
|
|
<path d="M9 9L15 15" stroke-width="1.5" stroke="#222222" stroke-width="1.2" stroke-linecap="round"/>
|
|
<path d="M15 9L9 15" stroke-width="1.5" stroke="#222222" stroke-width="1.2" stroke-linecap="round"/>
|
|
</svg>
|
|
<span>
|
|
عدم موافقت
|
|
@if (!string.IsNullOrEmpty(Model.Decription))
|
|
{
|
|
<span>: </span>
|
|
<span class=" active-paragraph"> @Model.Decription</span>
|
|
}
|
|
</span>
|
|
</div>
|
|
}
|
|
</p>
|
|
|
|
<div class="signature-section">
|
|
<div class="signature-card">
|
|
<p class="signature-title">امضاء کارفرما / نماینده کارفرما</p>
|
|
<div class="signature-border"></div>
|
|
</div>
|
|
|
|
<div class="signature-card">
|
|
<p class="signature-title">امضاء پرسنل</p>
|
|
<div class="signature-border"></div>
|
|
</div>
|
|
</div>
|
|
</div> *@
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<input type="hidden" asp-for="Id" value="@Model.Id" />
|
|
|
|
<div class="modal-footer">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-12 text-center">
|
|
<div class="d-flex justify-content-start">
|
|
<button type="button" class="btn btn-rounded waves-effect waves-light text-white me-2" data-bs-dismiss="modal" aria-label="Close" style="background-color: #454D5C;">بستن فرم</button>
|
|
<button id="btnPrint" type="button" class="btn btn-success btn-rounded waves-effect waves-light px-4">پرینت</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<!--<script src="~/AdminTheme/assets/js/workingHoursPrintable.js"></script>-->
|
|
@* <script src="~/AdminTheme/assets/printjs/print.min.js"></script> *@
|
|
|
|
<script>
|
|
$(document).ready(function () {
|
|
|
|
document.getElementById("btnPrint").onclick = function () {
|
|
printElement(document.getElementById("printThis"));
|
|
}
|
|
|
|
function printElement(elem) {
|
|
var domClone = elem.cloneNode(true);
|
|
|
|
var $printSection = document.getElementById("printSection");
|
|
|
|
if (!$printSection) {
|
|
$printSection = document.createElement("div");
|
|
$printSection.id = "printSection";
|
|
document.body.appendChild($printSection);
|
|
}
|
|
|
|
$printSection.innerHTML = "";
|
|
$printSection.appendChild(domClone);
|
|
window.print();
|
|
}
|
|
});
|
|
|
|
</script> |