533 lines
28 KiB
Plaintext
533 lines
28 KiB
Plaintext
@using _0_Framework.Application
|
|
@model CompanyManagment.App.Contracts.InsuranceList.MainEmployeeDetailsViewModel
|
|
@{
|
|
<style>
|
|
.firstCheckAlert {
|
|
background-color: #f06b31;
|
|
animation: color-change 800ms linear infinite;
|
|
}
|
|
|
|
.hideDataTable {
|
|
display: none !important;
|
|
}
|
|
|
|
@@keyframes color-change {
|
|
0% {
|
|
background-color: #eb3434;
|
|
}
|
|
|
|
50% {
|
|
background-color: #e5e5e5;
|
|
}
|
|
|
|
100% {
|
|
background-color: #eb3434;
|
|
}
|
|
}
|
|
</style>
|
|
}
|
|
<input type="hidden" id="maritalStatusErr" name="maritalStatusErr"/>
|
|
<input type="hidden" id="maritalStatusVal" value="@Model.MaritalStatus" asp-for="@Model.MaritalStatus"/>
|
|
@if (Model.EmployeeDetailsForInsuranceList != null)
|
|
{
|
|
var index = 1;
|
|
|
|
if (Model.EmployeeDetailsForInsuranceList.Any(x => !x.IsMaritalStatusSet || !x.EmployeeHasCheckout))
|
|
{
|
|
<script>
|
|
|
|
$('#maritalStatusErr').val(true);
|
|
</script>
|
|
<table id="DSKWOR" class="table table-bordered table-striped dataTable" style="min-width: 473px;">
|
|
<colgroup>
|
|
|
|
<col class="colgp-4">
|
|
<col class="colgp-3">
|
|
<col class="colgp-2">
|
|
<col class="colgp-1">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th colspan="4">
|
|
|
|
<p style="color: red">
|
|
ابتدا خطاهای پرسنل در لیست زیر را برطرف نمایید
|
|
</p>
|
|
</th>
|
|
</tr>
|
|
<tr>
|
|
<th class="header-style sorting_asc_disabled sorting_desc_disabled"> نوع خطا </th>
|
|
<th class="header-style sorting_asc_disabled sorting_desc_disabled"> کدملی </th>
|
|
<th class="header-styledit-btn sorting_asc_disabled sorting_desc_disabled"> نام خانوادگی </th>
|
|
<th class="header-style sorting_asc_disabled sorting_desc_disabled"> نام </th>
|
|
<th class="header-style sorting_asc_disabled sorting_desc_disabled">#</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
@foreach (var item in Model.EmployeeDetailsForInsuranceList)
|
|
{
|
|
if (!item.IsMaritalStatusSet || !item.EmployeeHasCheckout)
|
|
{
|
|
<tr>
|
|
<td class="td-ellipsis emptyTR" >
|
|
|
|
@{
|
|
if (!item.IsMaritalStatusSet)
|
|
{
|
|
<span style="color: #ff00ce"> وضعیت تاهل ندارد </span>
|
|
<br />
|
|
}
|
|
|
|
if (!item.EmployeeHasCheckout)
|
|
{
|
|
<span style="color: red">فیش حقوقی ندارد</span>
|
|
}
|
|
}
|
|
</td>
|
|
<td class="td-ellipsis @(item.Nationality == "ایرانی" ? "emptyTR" : "")">@item.NationalCode</td>
|
|
<td class="td-ellipsis emptyTR">@item.LName</td>
|
|
<td class="td-ellipsis emptyTR">@item.FName</td>
|
|
<td class="td-ellipsis ">@index</td>
|
|
</tr>
|
|
index++;
|
|
}
|
|
}
|
|
|
|
</tbody>
|
|
</table>
|
|
}
|
|
else
|
|
{
|
|
<script>
|
|
|
|
$('#maritalStatusErr').val(false);
|
|
</script>
|
|
}
|
|
|
|
<div class="col-md-6 @(Model.EmployeeDetailsForInsuranceList.Any(x => !x.IsMaritalStatusSet) ? "hideDataTable" : "")" style="float: left; ">
|
|
<button id="btnPrint" type="button" class="btn btn-success btn-rounded waves-effect waves-light" style="float: left">پرینت </button>
|
|
</div>
|
|
<table id="DSKWOR-datatable" class="table table-bordered table-striped dataTable @(Model.EmployeeDetailsForInsuranceList.Any(x => !x.IsMaritalStatusSet) ? "hideDataTable" : "")">
|
|
<colgroup>
|
|
<col class="colgp-23">
|
|
<col class="colgp-22">
|
|
<col class="colgp-21">
|
|
<col class="colgp-20">
|
|
<col class="colgp-19">
|
|
<col class="colgp-18">
|
|
<col class="colgp-17">
|
|
<col class="colgp-16">
|
|
<col class="colgp-15">
|
|
<col class="colgp-14">
|
|
<col class="colgp-13">
|
|
<col class="colgp-12">
|
|
<col class="colgp-11">
|
|
<col class="colgp-10">
|
|
<col class="colgp-9">
|
|
<col class="colgp-8">
|
|
<col class="colgp-7">
|
|
<col class="colgp-6">
|
|
<col class="colgp-5">
|
|
<col class="colgp-4">
|
|
<col class="colgp-3">
|
|
<col class="colgp-2">
|
|
<col class="colgp-1">
|
|
</colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th class="sorting_asc_disabled sorting_desc_disabled"></th>
|
|
<th class="header-style small-font sorting_asc_disabled sorting_desc_disabled"> تاریخ ترک کار </th>
|
|
<th class="header-style small-font sorting_asc_disabled sorting_desc_disabled">تاریخ آغاز بکار </th>
|
|
<th class="header-style small-font sorting_asc_disabled sorting_desc_disabled"> شغل</th>
|
|
<th class="header-style small-font sorting_asc_disabled sorting_desc_disabled"> حق بیمه سهم بیمه شده </th>
|
|
<th class="header-style small-font sorting_asc_disabled sorting_desc_disabled"> حقوق و مزایای ماهیانه مشمول و غیر مشمول </th>
|
|
<th class="header-style small-font sorting_asc_disabled sorting_desc_disabled"> حقوق و مزایای ماهیانه مشمول </th>
|
|
<th class="header-style small-font sorting_asc_disabled sorting_desc_disabled"> مزایای ماهیانه مشمول </th>
|
|
<th class="header-style small-font sorting_asc_disabled sorting_desc_disabled"> حقوق ماهیانه مشمول </th>
|
|
<th class="header-style small-font sorting_asc_disabled sorting_desc_disabled"> حق تاهل </th>
|
|
<th class="header-style small-font sorting_asc_disabled sorting_desc_disabled"> پایه سنوات روزانه</th>
|
|
<th class="header-style small-font sorting_asc_disabled sorting_desc_disabled"> دستمزد روزانه </th>
|
|
<th class="header-style small-font sorting_asc_disabled sorting_desc_disabled"> روزهای کارکرد </th>
|
|
<th class="header-style sorting_asc_disabled sorting_desc_disabled"> ش شناسنامه </th>
|
|
<th class="header-style sorting_asc_disabled sorting_desc_disabled"> تاریخ تولد </th>
|
|
<th class="header-style sorting_asc_disabled sorting_desc_disabled"> محل صدور </th>
|
|
<th class="header-style sorting_asc_disabled sorting_desc_disabled"> کدملی </th>
|
|
<th class="header-style sorting_asc_disabled sorting_desc_disabled"> نام پدر </th>
|
|
<th class="header-style small-font sorting_asc_disabled sorting_desc_disabled"> جنسیت </th>
|
|
<th class="header-styledit-btn sorting_asc_disabled sorting_desc_disabled"> نام خانوادگی </th>
|
|
<th class="header-style sorting_asc_disabled sorting_desc_disabled"> نام </th>
|
|
<th class="header-style sorting_asc_disabled sorting_desc_disabled"> شماره بیمه </th>
|
|
<th class="header-style sorting_asc_disabled sorting_desc_disabled">#</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
@foreach (var item in Model.EmployeeDetailsForInsuranceList)
|
|
{
|
|
if (item.LeftWorkDate == item.StartMonthCurrent)
|
|
{
|
|
<tr data-hasconfilictjobs="@item.HasConfilictJobs" data-nationality="@item.Nationality" data-yearlySalaryItem="@item.YearlySalaryItem" data-IncludeStatus="@Convert.ToInt32(item.IncludeStatus)" class="leftwork" data-employeeId="@item.EmployeeId" data-insuranceEmployeeInformationId="@item.InsuranceEmployeeInformationId" data-DateOfIssue="@item.DateOfIssue">
|
|
<td>
|
|
<i onclick="editList(this)" class="fa fa-edit edit-btn"></i>
|
|
@* <a permission="10418" onclick="OpenLeftWorkInsurance(@item.EmployeeId,'@(item.FName +" "+item.LName)')" >
|
|
<i class="fa faSize fa-sign-out"></i>
|
|
</a>*@
|
|
</td>
|
|
<td data-LeftWorkDate="@item.LeftWorkDateGr" class="small-font td-ellipsis ">@item.LeftWorkDate</td>
|
|
<td data-StartWorkDate="@item.StartWorkDateGr" class="small-font td-ellipsis emptyTR">@item.StartWorkDate</td>
|
|
<td data-Id="@item.JobId" data-jobcode="@item.JobCode" class="@(item.HasConfilictJobs && item.JobId != 10 ? "blink" : "") small-font td-ellipsis emptyTR" id="JobName">@item.JobName</td>
|
|
<td data-InsuranceShare="0" data-EmployerShare="0" data-UnemploymentInsurance="0" class="small-font td-ellipsis emptyTR">0</td>
|
|
<td data-IncludedAndNotIncluded="0" data-BenefitsIncludedNonContinuous="0" class="small-font td-ellipsis emptyTR">0 </td>
|
|
<td data-BenefitsIncludedContinuous="0" class="small-font td-ellipsis emptyTR">0 </td>
|
|
<td data-MonthlyBenefits="0" class="small-font td-ellipsis emptyTR">0 </td>
|
|
<td data-MonthlySalary="0" data-MonthlySalaryPlusBaseyear="0" class="small-font td-ellipsis emptyTR">0</td>
|
|
<td data-MarriedAllowance="0" class="small-font td-ellipsis emptyTR">0</td>
|
|
<td data-BaseYears="0" class="small-font td-ellipsis emptyTR">0</td>
|
|
<td data-DailyWage="0" data-DailyWagePlusBaseYears="0" class="small-font td-ellipsis emptyTR">0</td>
|
|
<td data-EndMonthCurrentDay="@item.EndMonthCurrentDay" data-OldWorkingDays="0" data-HousingAllowance="@item.HousingAllowance" data-ConsumableItems="@item.ConsumableItems" class="small-font td-ellipsis emptyTR">0</td>
|
|
<td class="td-ellipsis emptyTR">@item.IdNumber</td>
|
|
<td class="td-ellipsis emptyTR">@item.DateOfBirth</td>
|
|
<td class="td-ellipsis emptyTR">@item.PlaceOfIssue</td>
|
|
<td class="td-ellipsis @(item.Nationality == "ایرانی" ? "emptyTR" : "")">@item.NationalCode</td>
|
|
<td class="td-ellipsis emptyTR">@item.FatherName</td>
|
|
<td class="small-font td-ellipsis emptyTR">@item.Gender</td>
|
|
<td class="td-ellipsis emptyTR">@item.LName</td>
|
|
<td class="td-ellipsis emptyTR">@item.FName</td>
|
|
<td class="td-ellipsis emptyTR">@item.InsuranceCode</td>
|
|
<td class="td-ellipsis ">@index</td>
|
|
</tr>
|
|
}
|
|
else
|
|
{
|
|
<tr data-hasconfilictjobs="@item.HasConfilictJobs" data-nationality="@item.Nationality" data-yearlySalaryItem="@item.YearlySalaryItem" data-IncludeStatus="@Convert.ToInt32(item.IncludeStatus)" class="@(item.HasLeftWorkInMonth ? "leftwork" : item.HasStartWorkInMonth ? "startwork" : "")" ondblclick="rowdbClick(this)" data-employeeId="@item.EmployeeId" data-insuranceEmployeeInformationId="@item.InsuranceEmployeeInformationId" data-DateOfIssue="@item.DateOfIssue">
|
|
<td>
|
|
<i onclick="editList(this)" class="fa fa-edit edit-btn"></i>
|
|
@* <a permission="10418" onclick="OpenLeftWorkInsurance(@item.EmployeeId,'@(item.FName +" "+item.LName)')" >
|
|
<i class="fa faSize fa-sign-out"></i>
|
|
</a>*@
|
|
</td>
|
|
<td data-LeftWorkDate="@item.LeftWorkDateGr" class="small-font td-ellipsis ">@item.LeftWorkDate</td>
|
|
<td data-StartWorkDate="@item.StartWorkDateGr" class="small-font td-ellipsis emptyTR">@item.StartWorkDate</td>
|
|
<td data-Id="@item.JobId" data-jobcode="@item.JobCode" class="@(item.HasConfilictJobs && item.JobId != 10 ? "blink" : "") small-font td-ellipsis emptyTR jobName">@item.JobName</td>
|
|
<td data-InsuranceShare="@item.InsuranceShare" data-EmployerShare="@item.EmployerShare" data-UnemploymentInsurance="@item.UnEmploymentInsurance" class="small-font td-ellipsis emptyTR">@item.InsuranceShare.ToMoney()</td>
|
|
<td data-IncludedAndNotIncluded="@item.IncludedAndNotIncluded" data-BenefitsIncludedNonContinuous="@item.BenefitsIncludedNonContinuous" class="small-font td-ellipsis emptyTR">@item.IncludedAndNotIncluded.ToMoney() </td>
|
|
<td data-BenefitsIncludedContinuous="@item.BenefitsIncludedContinuous" class="small-font td-ellipsis emptyTR">@item.BenefitsIncludedContinuous.ToMoney() </td>
|
|
<td data-MonthlyBenefits="@item.MonthlyBenefits" class="small-font td-ellipsis emptyTR">@item.MonthlyBenefits.ToMoney() </td>
|
|
<td data-MonthlySalary="@(item.HasConfilictJobs ? 0 : item.MonthlySalary)" data-MonthlySalaryPlusBaseyear="@(item.DailyWagePlusBaseYears * item.WorkingDays)" class="small-font td-ellipsis emptyTR">@(item.HasConfilictJobs ? "" : item.MonthlySalary.ToMoney())</td>
|
|
<td data-MarriedAllowance="@item.MarriedAllowance" class="small-font td-ellipsis emptyTR">@item.MarriedAllowance.ToMoney()</td>
|
|
<td data-BaseYears="@item.BaseYears" class="small-font td-ellipsis emptyTR">@item.BaseYears.ToMoney()</td>
|
|
<td data-DailyWage="@(item.HasConfilictJobs ? 0 : item.DailyWage)" data-DailyWagePlusBaseYears="@item.DailyWagePlusBaseYears" class="small-font td-ellipsis emptyTR">@(item.HasConfilictJobs ? "" : item.DailyWageStr)</td>
|
|
<td data-EndMonthCurrentDay="@item.EndMonthCurrentDay" data-OldWorkingDays="@item.WorkingDays" data-HousingAllowance="@item.HousingAllowance" data-ConsumableItems="@item.ConsumableItems" class="small-font td-ellipsis emptyTR">@item.WorkingDays</td>
|
|
<td class="td-ellipsis emptyTR">@item.IdNumber</td>
|
|
<td class="td-ellipsis emptyTR">@item.DateOfBirth</td>
|
|
<td class="td-ellipsis emptyTR">@item.PlaceOfIssue</td>
|
|
<td class="td-ellipsis @(item.Nationality == "ایرانی" ? "emptyTR" : "")">@item.NationalCode</td>
|
|
<td class="td-ellipsis emptyTR">@item.FatherName</td>
|
|
<td class="small-font td-ellipsis emptyTR">@item.Gender</td>
|
|
<td class="td-ellipsis emptyTR">@item.LName</td>
|
|
<td class="td-ellipsis emptyTR">@item.FName</td>
|
|
<td class="td-ellipsis emptyTR">@item.InsuranceCode</td>
|
|
<td class="td-ellipsis ">@index</td>
|
|
</tr>
|
|
}
|
|
|
|
index = index + 1;
|
|
}
|
|
|
|
</tbody>
|
|
</table>
|
|
}
|
|
|
|
|
|
@*@Html.AntiForgeryToken() *@
|
|
<script type="text/ecmascript">
|
|
|
|
|
|
|
|
$(document).ready(function(){
|
|
|
|
$(".ring").remove();
|
|
|
|
$('#DSKWOR-datatable').dataTable({
|
|
"lengthMenu": [[25, 10, 50, 100, -1], [25, 10, 50, 100, "All"]],
|
|
"pageLength": -1, // set the default page length to "All"
|
|
"ordering": false
|
|
});
|
|
|
|
if($('#maritalStatusErr').val() == "true")
|
|
{
|
|
$('.DSKWOR').addClass("firstCheckAlert");
|
|
$('#DSKWOR-datatable_wrapper').hide();
|
|
$('#fakeSave').show();
|
|
$('#save').hide();
|
|
}else{
|
|
$('.DSKWOR').removeClass("firstCheckAlert");
|
|
$('#DSKWOR-datatable_wrapper').show();
|
|
$('#fakeSave').hide();
|
|
$('#save').show();
|
|
}
|
|
$(".jobName").each(function(){
|
|
if ($(this).text() == "کارفرما"){
|
|
$(this).parent("tr").css("background-color" , "#77a4c37d");
|
|
}
|
|
})
|
|
|
|
|
|
$(function () {
|
|
$('#DSKWOR-datatable .td-ellipsis').tooltip({
|
|
container: 'body',
|
|
fontFamily: 'IranSans',
|
|
background: 'grey',
|
|
placement: 'top',
|
|
trigger: 'hover',
|
|
html: true,
|
|
title: function () {
|
|
return '<span style="font-family: IranSans, sans-serif;">' + $(this).text() + '</span>';
|
|
}
|
|
});
|
|
});
|
|
|
|
@if (Model != null && Model.IsBlock)
|
|
{
|
|
<text>
|
|
$("#resultExistPersonel").show();
|
|
$("#resultExistPersonel").html(' این کارگاه بلاک شده است ');
|
|
</text>
|
|
}
|
|
else if (Model != null && Model.IsExist && Model.IsBlock != true)
|
|
{
|
|
<text>
|
|
$("#resultExistPersonel").show();
|
|
$("#Year").addClass("errored");
|
|
$("#ddlMonth").addClass("errored");
|
|
$("#resultExistPersonel").html('برای این کارگاه در ماه و سال انتخاب شده لیست بیمه تنظیم گردیده است، در صورت نیاز به ثبت این لیست،لیست قبلی را حذف نمایید.');
|
|
</text>
|
|
}
|
|
else
|
|
{
|
|
<text>
|
|
$("#resultExistPersonel").hide();
|
|
$("#Year").removeClass("errored");
|
|
$("#ddlMonth").removeClass("errored");
|
|
$("#resultExistPersonel").html('');
|
|
document.getElementById("btnPrint").onclick = function () {
|
|
printElement(document.getElementById("DSKWOR-datatable"));
|
|
};
|
|
|
|
function printElement(elem) {
|
|
var domClone = elem.cloneNode(true);
|
|
|
|
// create a new stylesheet to hide everything except the modal
|
|
var style = document.createElement("style");
|
|
style.innerHTML = `
|
|
@@media print {
|
|
body * {
|
|
visibility: hidden;
|
|
}
|
|
#printSection, #printSection * {
|
|
visibility: visible;
|
|
}
|
|
#printSection {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
}
|
|
}
|
|
`;
|
|
document.head.appendChild(style);
|
|
|
|
// create a new section to hold the modal for printing
|
|
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();
|
|
|
|
// remove the new stylesheet after printing
|
|
document.head.removeChild(style);
|
|
}
|
|
|
|
|
|
</text>
|
|
}
|
|
|
|
var jobName = $('#JobId option:selected').text();
|
|
|
|
//شروع محاسبه کارگاه
|
|
setDataTable($("#EmployeeId").val(),jobName);
|
|
|
|
//$(function () {
|
|
// $('#DSKWOR-datatable .td-ellipsis').tooltip({
|
|
// container: 'body',
|
|
// fontFamily: 'IranSans',
|
|
// background: 'grey',
|
|
// placement: 'top',
|
|
// trigger: 'hover',
|
|
// html: true,
|
|
// title: function () {
|
|
// var text = $(this).text();
|
|
// if (text.trim() === '') {
|
|
// return false;
|
|
// $(".tooltip-arrow").hide();
|
|
// $(".tooltip-inner").hide();
|
|
// }
|
|
// return '<span style="font-family: IranSans, sans-serif;">' + text + '</span>';
|
|
// }
|
|
// });
|
|
//});
|
|
|
|
|
|
});
|
|
|
|
|
|
function editList(element) {
|
|
var row =$(element).closest('tr');
|
|
var rowId = row.attr('data-employeeId');
|
|
var insuranceEmployeeInformationId = row.attr('data-insuranceEmployeeInformationId');
|
|
var dateOfIssue = row.attr('data-DateOfIssue');
|
|
showEditModal(row,rowId,insuranceEmployeeInformationId,dateOfIssue);
|
|
}
|
|
|
|
function rowdbClick(element){
|
|
var row =$(element);
|
|
var rowId = row.attr('data-employeeId');
|
|
var insuranceEmployeeInformationId = row.attr('data-insuranceEmployeeInformationId');
|
|
var dateOfIssue = row.attr('data-DateOfIssue');
|
|
showEditModal(row,rowId,insuranceEmployeeInformationId,dateOfIssue);
|
|
}
|
|
|
|
|
|
function showEditModal(row,rowId,insuranceEmployeeInformationId,dateOfIssue){
|
|
|
|
var jobId=row.find('td:eq(3)').attr("data-id");
|
|
var oldWorkingDays= row.find('td:eq(12)').attr("data-oldWorkingDays");
|
|
//showJobList(jobId);
|
|
$('#edit-modal').modal('show');
|
|
$('#LeftWorkDate').val(row.find('td:eq(1)').text());
|
|
$('#StartWorkDate').val(row.find('td:eq(2)').text());
|
|
$('#LeftWorkDateGr').val(row.find('td:eq(1)').attr("data-LeftWorkDate"));
|
|
$('#StartWorkDateGr').val(row.find('td:eq(2)').attr("data-StartWorkDate"));
|
|
$('#divJobId').html(row.find('td:eq(3)').text());
|
|
$('#JobId').val(jobId);
|
|
$('#InsuranceShare').val(row.find('td:eq(4)').text());
|
|
$('#BenefitsIncludedNonContinuous').val(commafy(row.find('td:eq(5)').attr("data-benefitsincludednoncontinuous")));
|
|
$('#BenefitsIncludedContinuous').val(row.find('td:eq(7)').text());
|
|
$('#MonthlySalary').val(row.find('td:eq(8)').text());
|
|
$('#DailyWage').val(row.find('td:eq(11)').text());
|
|
$('#WorkingDays').val(row.find('td:eq(12)').text());
|
|
$('#WorkingDays').attr('max',oldWorkingDays);
|
|
$('#OldWorkingDays').val(oldWorkingDays);
|
|
$('#IdNumber').val(row.find('td:eq(13)').text());
|
|
$('#DateOfBirth').val(row.find('td:eq(14)').text());
|
|
$('#PlaceOfIssue').val(row.find('td:eq(15)').text());
|
|
$('#NationalCode').val(row.find('td:eq(16)').text());
|
|
$('#FatherName').val(row.find('td:eq(17)').text());
|
|
$('#Gender').val(row.find('td:eq(18)').text());
|
|
$('#LName').val(row.find('td:eq(19)').text());
|
|
$('#FName').val(row.find('td:eq(20)').text());
|
|
$('#InsuranceCode').val(row.find('td:eq(21)').text());
|
|
// $('#column18').val(row.find('td:eq(0)').text());
|
|
$('#EmployeeId').val(rowId);
|
|
$('#InsuranceEmployeeInformationId').val(insuranceEmployeeInformationId);
|
|
$('#DateOfIssue').val(dateOfIssue);
|
|
$('#HousingAllowance').val(row.find('td:eq(12)').attr("data-housingallowance"));
|
|
$('#ConsumableItems').val(row.find('td:eq(12)').attr("data-consumableitems"));
|
|
$('#EndMonthCurrentDay').val(row.find('td:eq(12)').attr("data-endmonthcurrentday"));
|
|
$('#IncludeStatus').val(row.attr("data-includeStatus"));
|
|
$('#yearlySalaryItem').val(row.attr("data-yearlySalaryItem"));
|
|
$('#hasconfilictjobs').val(row.attr("data-hasconfilictjobs"));
|
|
$('#hiddenBaseYearToEditModal').val(row.find('td:eq(10)').attr("data-BaseYears"));
|
|
$('#hiddendaailyWagePlusBaseYear').val(row.find('td:eq(11)').attr("data-DailyWagePlusBaseYears"));
|
|
$('#hiddenMonthlySalaryPlusBaseYear').val(row.find('td:eq(8)').attr("data-MonthlySalaryPlusBaseyear"));
|
|
$('#hiddenMarriedAllowance').val(row.find('td:eq(9)').attr("data-MarriedAllowance"));
|
|
|
|
}
|
|
|
|
function showJobList(selectId){
|
|
|
|
$.ajax({
|
|
/* contentType: 'charset=utf-8',*/
|
|
dataType: 'json',
|
|
type: 'POST',
|
|
url: '@Url.Page("./Index", "JobList")',
|
|
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
|
//data: { "textSearch": text },
|
|
success: function (response) {
|
|
$.each(response.jobList, function (i, item) {
|
|
$('#JobId').append('<option class="input" value="'+item.id+'">'+item.jobName+'</option>');
|
|
|
|
}); $('#JobId').val(selectId).trigger('change');
|
|
},
|
|
failure: function (response) {
|
|
console.log(5, response);
|
|
}
|
|
});
|
|
}
|
|
|
|
// $(function () {
|
|
// $('#DSKWOR-datatable .td-ellipsis').tooltip({
|
|
// container: 'body',
|
|
// fontFamily: 'IranSans',
|
|
// background: 'grey',
|
|
// placement: 'top',
|
|
// trigger: 'hover',
|
|
// html: true,
|
|
// title: function () {
|
|
// return '<span style="font-family: IranSans, sans-serif;">' + $(this).text() + '</span>';
|
|
// }
|
|
// });
|
|
//});
|
|
|
|
|
|
//to only close the second modal when closing it...
|
|
|
|
$(function () {
|
|
$('#edit-modal [data-parent-modal]').on('click', function (e) {
|
|
e.preventDefault();
|
|
e.stopPropagation();
|
|
var parentModalId = $(this).data('parent-modal');
|
|
$(parentModalId).modal('hide');
|
|
});
|
|
});
|
|
|
|
|
|
//function OpenLeftWorkInsurance(id,Name){
|
|
// $.ajax({
|
|
// /* contentType: 'charset=utf-8',*/
|
|
// dataType: 'json',
|
|
// type: 'Get',
|
|
// url: '@Url.Page("/Company/Employees/Index", "GetLeftWorkInsurance")',
|
|
// headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
|
// data: {"employeeId": id,"employeeName": Name} ,
|
|
// success: function (response) {
|
|
// console.log(response);
|
|
// $("#leftWorkInsurance-modal").modal("show");
|
|
// $("#mainInsuranceList").html(response);
|
|
// },
|
|
// failure: function (response) {
|
|
// console.log(5, response);
|
|
// }
|
|
// });
|
|
// }
|
|
|
|
|
|
function commafy( num ) {
|
|
var str = num.toString().split('.');
|
|
if (str[0].length >= 5) {
|
|
str[0] = str[0].replace(/(\d)(?=(\d{3})+$)/g, '$1,');
|
|
}
|
|
if (str[1] && str[1].length >= 5) {
|
|
str[1] = str[1].replace(/(\d{3})/g, '$1 ');
|
|
}
|
|
return str.join('.');
|
|
}
|
|
</script> |