448 lines
12 KiB
Plaintext
448 lines
12 KiB
Plaintext
@model CompanyManagment.App.Contracts.Checkout.CheckoutGroupPrintViewModel
|
|
|
|
@{
|
|
<style>
|
|
.modal .modal-dialog .modal-content {
|
|
background-color: white !important;
|
|
}
|
|
|
|
.btn-text-disable {
|
|
color: #627a62 !important;
|
|
background-color: #cdcdcd !important;
|
|
border-color: #585757 !important;
|
|
}
|
|
|
|
.btncounter-text-disable {
|
|
color: #bdc7bd !important;
|
|
background-color: #727272 !important;
|
|
border-color: #585757 !important;
|
|
}
|
|
|
|
.container2 {
|
|
height: 297mm;
|
|
padding-top: 15px;
|
|
}
|
|
|
|
.container2:last-of-type {
|
|
height: 280mm;
|
|
}
|
|
|
|
.modal-dialog {
|
|
max-width: 100%;
|
|
width: 22.4cm;
|
|
}
|
|
/* @@page {
|
|
size: 7in 9.25in;
|
|
margin: 27mm 16mm 27mm 16mm;
|
|
}*/
|
|
@@page {
|
|
size: A4;
|
|
/* margin: 0mm; */
|
|
page-break-after: auto;
|
|
}
|
|
|
|
@@media screen {
|
|
#printSection {
|
|
display: none;
|
|
}
|
|
}
|
|
.print * {
|
|
font-family: IranSans !important;
|
|
}
|
|
|
|
.print:last-child {
|
|
page-break-after: auto !important;
|
|
}
|
|
|
|
@@media print {
|
|
|
|
body * {
|
|
visibility: hidden !important;
|
|
page-break-after: auto !important;
|
|
}
|
|
|
|
body {
|
|
background-color: #ffffff !important;
|
|
}
|
|
|
|
.container2, #printSection {
|
|
background-color: #ffffff !important;
|
|
}
|
|
|
|
html, body {
|
|
/* height: 100%; */
|
|
width: 210mm;
|
|
height: 297mm;
|
|
margin: 0 !important;
|
|
padding: 0 !important;
|
|
overflow: hidden;
|
|
background-color: #ffffff !important;
|
|
-webkit-print-color-adjust: exact;
|
|
}
|
|
|
|
#printThis {
|
|
position: relative;
|
|
margin: 0 auto;
|
|
width: 21cm;
|
|
}
|
|
|
|
.container2 {
|
|
height: 100%;
|
|
page-break-inside: avoid;
|
|
}
|
|
|
|
.container2:last-of-type {
|
|
height: auto;
|
|
}
|
|
|
|
.modal-dialog {
|
|
width: 100%;
|
|
max-width: 210mm;
|
|
}
|
|
|
|
#printSection, #printSection * {
|
|
visibility: visible !important;
|
|
page-break-after: auto !important;
|
|
}
|
|
|
|
footer {
|
|
page-break-after: auto !important;
|
|
display: none !important;
|
|
}
|
|
|
|
header {
|
|
display: none !important;
|
|
}
|
|
|
|
#printSection {
|
|
position: absolute !important;
|
|
right: 0 !important;
|
|
top: 0 !important;
|
|
page-break-after: auto !important;
|
|
}
|
|
|
|
.head {
|
|
background-color: #cccccc !important;
|
|
-webkit-print-color-adjust: exact !important;
|
|
print-color-adjust: exact !important;
|
|
}
|
|
|
|
.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 !important;
|
|
print-color-adjust: exact !important;
|
|
}
|
|
|
|
.mt-15 {
|
|
margin: 15px 0 0 0 !important;
|
|
}
|
|
|
|
.restActive, .rest {
|
|
pointer-events: none;
|
|
font-size: 8px !important;
|
|
width: 46px !important;
|
|
-webkit-appearance: none;
|
|
-moz-appearance: none;
|
|
appearance: none;
|
|
text-align: center;
|
|
}
|
|
}
|
|
|
|
.col-4, .col-3, .col-9,
|
|
.col-2, .col-10, .col-6,
|
|
.col-8, .col-5, .col-7,
|
|
.col-offset-1 {
|
|
float: right !important;
|
|
}
|
|
|
|
h5, h6 {
|
|
margin: 5px 0px !important;
|
|
}
|
|
|
|
body .modal {
|
|
font-size: 11px;
|
|
}
|
|
|
|
label .modal {
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.radio {
|
|
display: inline-block;
|
|
margin-top: -10px !important;
|
|
}
|
|
|
|
.radio input[type=radio] {
|
|
position: unset !important;
|
|
}
|
|
|
|
textarea.form-control {
|
|
height: 100px !important;
|
|
}
|
|
|
|
.fontBold {
|
|
font-family: IranYekanEXBold !important;
|
|
}
|
|
|
|
.fontNumber {
|
|
font-family: IranText !important;
|
|
}
|
|
|
|
.modal-body {
|
|
height: 99%;
|
|
}
|
|
|
|
.row {
|
|
margin-right: -10px !important;
|
|
margin-left: -10px !important;
|
|
}
|
|
|
|
div span.week {
|
|
/* border-radius: 5px;
|
|
padding: 2px 8px;
|
|
margin-right: 15px;
|
|
pointer-events: none;*/
|
|
}
|
|
|
|
#shanbeh, #yekshanbeh, #doshanbeh, #seshanbeh, #cheharshanbeh, #panjshanbeh, #jomeh {
|
|
width: 80px;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
#shanbeh2, #yekshanbeh2, #doshanbeh2, #seshanbeh2, #cheharshanbeh2, #panjshanbeh2, #jomeh2 {
|
|
width: 80px;
|
|
background-color: #3ac53c !important;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
#Sh1, #Sh2, #Sh3, #Sh4, #Sh5, #Sh6, #Sh7, #Sh8 {
|
|
width: 80px;
|
|
margin-right: 30%;
|
|
}
|
|
|
|
.week {
|
|
width: 48px !important;
|
|
border-radius: 5px;
|
|
padding: 0px !important;
|
|
font-size: 8px !important;
|
|
pointer-events: none;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.time {
|
|
width: 8%;
|
|
text-align: center;
|
|
padding: 0px !important;
|
|
direction: ltr;
|
|
border-radius: 5px;
|
|
border: 1px solid #47c848 !important;
|
|
pointer-events: none;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
font-size: 8px !important;
|
|
}
|
|
|
|
.time2 {
|
|
width: 8%;
|
|
text-align: center;
|
|
direction: ltr;
|
|
border-radius: 5px;
|
|
border: 1px solid #47c848 !important;
|
|
pointer-events: none;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
font-size: 8px !important;
|
|
}
|
|
|
|
.fild {
|
|
border: 1px solid #878686 !important;
|
|
background-color: #f7f7f7 !important;
|
|
border-radius: 10px;
|
|
// margin: 5px 10px !important;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
|
|
.timeoff {
|
|
width: 10%;
|
|
text-align: center;
|
|
direction: ltr;
|
|
border-radius: 5px;
|
|
border: 1px solid #47c848 !important;
|
|
background-color: #e7e7e7 !important;
|
|
pointer-events: none;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.fild2 {
|
|
border: 1px solid #878686 !important;
|
|
background-color: #d9d9d9 !important;
|
|
border-radius: 10px;
|
|
padding: 10px 0 10px 0;
|
|
display: inline;
|
|
float: left;
|
|
width: 80%;
|
|
margin-left: 15px;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.fild3 {
|
|
border: 1px solid #878686 !important;
|
|
background-color: #e7e7e7 !important;
|
|
border-radius: 10px;
|
|
display: inline;
|
|
float: left;
|
|
width: 100%;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.call {
|
|
background-color: #d2dbd2 !important;
|
|
border-radius: 5px;
|
|
margin-bottom: 3px;
|
|
margin-left: 10px;
|
|
margin-right: 10px;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.rest {
|
|
pointer-events: none;
|
|
font-size: 8px !important;
|
|
width: 46px !important;
|
|
-webkit-appearance: none;
|
|
-moz-appearance: none;
|
|
appearance: none;
|
|
text-align: center;
|
|
}
|
|
|
|
.fildeWeek {
|
|
height: 136px !important;
|
|
width: 48% !important;
|
|
display: inline-block;
|
|
border: 1px solid #cfcfcf !important;
|
|
background-color: #e7e5e5 !important;
|
|
border-radius: 12px 0px 12px 12px;
|
|
padding: 2px 15px !important;
|
|
margin: 0 0 10px 0;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.fildeWeek .row {
|
|
height: 16px;
|
|
}
|
|
|
|
.weekName {
|
|
margin-bottom: -18px !important;
|
|
top: -18px;
|
|
position: relative;
|
|
margin-right: -16px;
|
|
padding-right: 5px !important;
|
|
font-size: 10px !important;
|
|
border-bottom: 0px;
|
|
color: #505458 !important;
|
|
background-color: #bdd1be !important;
|
|
border-radius: 15px 5px 0px 0px;
|
|
width: 57px;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.btn-deactive {
|
|
background-color: #bbbbbb !important;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.btn-active {
|
|
background-color: #3ac53c !important;
|
|
-webkit-print-color-adjust: exact;
|
|
print-color-adjust: exact;
|
|
}
|
|
|
|
.input-deactive {
|
|
background-color: #dbd8d8 !important;
|
|
-webkit-print-color-adjust: exact !important;
|
|
print-color-adjust: exact !important;
|
|
}
|
|
</style>
|
|
|
|
var btnActive = "btn-active";
|
|
var btnDeactive = "btn-deactive";
|
|
var inputDeactive = "input-deactive";
|
|
}
|
|
|
|
|
|
|
|
<div class="modal-body print" style="width: 210mm; float: left;" id="printThis">
|
|
|
|
@foreach (var items in @Model.CheckoutViewModels)
|
|
{
|
|
@if (items.HasRollCall)
|
|
{
|
|
<partial name="_Partials/PrintDetailsRollCallRaw" model="items"/>
|
|
}
|
|
else
|
|
{
|
|
<partial name="_Partials/PrintDetailStaticRaw" model="items"/>
|
|
}
|
|
}
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script src="~/assetsclient/libs/html2pdf/html2pdf.bundle.min.js"></script>
|
|
<script>
|
|
|
|
$(document).ready(function () {
|
|
printElement(document.getElementById("printThis"));
|
|
});
|
|
|
|
|
|
function printElement(elem) {
|
|
if (window.matchMedia('(max-width: 767px)').matches) {
|
|
var checkoutId = $('#Id').val();
|
|
|
|
var opt = {
|
|
margin: 2,
|
|
filename: `checkout_${checkoutId}.pdf`,
|
|
image: { type: 'jpeg', quality: 0.98 },
|
|
html2canvas: { scale: 2 },
|
|
jsPDF: { unit: 'mm', format: 'a4', orientation: 'portrait' }
|
|
};
|
|
|
|
html2pdf().set(opt).from(elem).save();
|
|
$("#MainModal").modal("hide");
|
|
} else {
|
|
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> |