477 lines
33 KiB
Plaintext
477 lines
33 KiB
Plaintext
@using Version = _0_Framework.Application.Version
|
||
@model CompanyManagment.App.Contracts.LeftWorkInsurance.LeftworkInsuranceDividedList
|
||
@*adding bime*@
|
||
|
||
<link href="@Href("~/DadmehrSelect/dad-mehr-select.css?ver=")@Version.AdminVersion" rel="stylesheet" />
|
||
<link href="@Href("~/admintheme/css/left-work-insurance.css")" rel="stylesheet" />
|
||
|
||
@Html.AntiForgeryToken()
|
||
<div class="container" id="LeftWorkInsuranceForm">
|
||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||
<div class="main-title"> شروع بکار و ترک کار پرسنل در بخش بیمه </div>
|
||
<fieldset class="box">
|
||
<legend>@Model.EmployeeName</legend>
|
||
<div class="fdiv">
|
||
<label class="first-label">افزودن کارگاه</label>
|
||
<div class="d-flex">
|
||
<select class="form-control select-city input" id="input1" asp-items="@Model.Workshops">
|
||
<option value="0">انتخاب کارگاه</option>
|
||
</select>
|
||
<button class="btn save" id="save1">ثبت</button>
|
||
</div>
|
||
</div>
|
||
<div class="tabbed-navigation">
|
||
<div class="nav-tabs hide-scrollbar">
|
||
@if (Model.LeftWorkInsuranceGroups != null && Model.LeftWorkInsuranceGroups.Count > 0)
|
||
{
|
||
var index = 1;
|
||
@foreach (var item in Model.LeftWorkInsuranceGroups)
|
||
{
|
||
<a href="#tab-@index" class="@(index == 1 ? "active" : "") nav-link">
|
||
<span class="del-com">
|
||
<i onclick="deleteLeftwork(this, @item.WorkshopId)" class="fa fa-trash trash-icon delworkshop" aria-hidden="true" style="color: white;" permission="10419"></i>
|
||
</span><span data-workshopid="@item.WorkshopId" class="nav-title" id="nav-title1"> @item.WorkshopName</span>
|
||
</a>
|
||
index = index + 1;
|
||
}
|
||
}
|
||
else
|
||
{
|
||
<a href="#tab-1" class="active nav-link">
|
||
<span class="del-com">
|
||
<i onclick="deleteLeftwork(this, 0)" newItem="true" class="fa fa-trash trash-icon delworkshop" aria-hidden="true" style="color: white;" permission="10419"></i>
|
||
</span><span data-workshopid="0" class="nav-title" id="nav-title1"> نام شرکت</span>
|
||
</a>
|
||
}
|
||
|
||
</div>
|
||
<div class="tab-content">
|
||
@if (Model.LeftWorkInsuranceGroups != null && Model.LeftWorkInsuranceGroups.Count > 0)
|
||
{
|
||
var index = 1;
|
||
@foreach (var item in Model.LeftWorkInsuranceGroups)
|
||
{
|
||
<div class="tab-pane @(index == 1 ? "active" : "")" data-workshopId="@item.WorkshopId" data-workshopName="@item.WorkshopName" id="tab-@index" data-pane="index">
|
||
<div class="pane-content">
|
||
<div class="top-content first-row">
|
||
<div class="first-col-content">
|
||
<div class="select-container">
|
||
<label> سمت </label>
|
||
<div class="dadmehr-select-search" onclick="inputFocus(this), employerDiagnose()">
|
||
<div class="custom-select text-right">
|
||
|
||
|
||
<ul class="ul-search single text-right" data-url="@Url.Page("/Company/Employees/Index", "JobByTextSearch")">
|
||
@if (item.JobId != 0)
|
||
{
|
||
<li onclick="openSearchResultByCodeLeftWorkInsurance(this, @item.WorkshopId)" class="singleItem"><span class="value" data-value="@item.LeftworkInsuranceViewModels[0].JobId">@item.LeftworkInsuranceViewModels[0].JobName</span>|<span class="code">@item.LeftworkInsuranceViewModels[0].JobCode</span></li>
|
||
}
|
||
else
|
||
{
|
||
<li>
|
||
<input onkeyup="searchTextLeftWorkInsurance(event, this, '@Url.Page("/Company/Employees/Index", "JobListByText")', @Model.WorkshopId)" class="text-right input-text" />
|
||
</li>
|
||
}
|
||
</ul>
|
||
<ul class="result options text-right">
|
||
</ul>
|
||
|
||
</div>
|
||
<span class="span-input"></span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="second-col-content">
|
||
<label> شماره پرسنلی </label>
|
||
<input type="text" class="position-code" value="@item.PersonnelCode" checked="checked" data-haspersonelcode="@(item.HasPersonelCode ? true : false)" disabled="disabled">
|
||
</div>
|
||
<div class="third-col-content">
|
||
<div class="d-flex position-check">
|
||
<span class="position-type">مشمول مزایا </span>
|
||
<div class="checkbox-wrapper">
|
||
@if (item.LeftworkInsuranceViewModels != null && item.LeftworkInsuranceViewModels.Count > 0)
|
||
{
|
||
<input @(item.LeftworkInsuranceViewModels[0].IncludeStatus ? "checked" : "") type="checkbox" class="setContract">
|
||
}
|
||
else
|
||
{
|
||
<input type="checkbox" checked class="setContract">
|
||
}
|
||
</div>
|
||
<span class="position-type"> عدم شمول مزایا </span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="top-content">
|
||
@if (index == 1)
|
||
{
|
||
<div class="first-col-content">
|
||
<input type="text" class="persianDateInput date-input date input2" maxlength="10" id="startDate1" placeholder="تاریخ شروع بکار" tabindex="1">
|
||
</div>
|
||
<div class="second-col-content">
|
||
<input type="text" class="persianDateInput date-input date input3" maxlength="10" id="lastDay1" placeholder="تاریخ آخرین روز کاری" tabindex="2">
|
||
</div>
|
||
<div class="third-col-content">
|
||
<input type="text" class="persianDateInput date-input date input4" maxlength="10" id="endDate1" placeholder="تاریخ ترک کار" tabindex="3">
|
||
<button class=" btn save2" id="save">ثبت</button>
|
||
</div>
|
||
}
|
||
else
|
||
{
|
||
<div class="first-col-content">
|
||
<input type="text" class="persianDateInput date-input date input2" maxlength="10" id="start-date-@(index - 1)" placeholder="تاریخ شروع بکار" tabindex="1">
|
||
</div>
|
||
<div class="second-col-content">
|
||
<input type="text" class="persianDateInput date-input date input3" maxlength="10" id="last-day-@(index - 1)" placeholder="تاریخ آخرین روز کاری" tabindex="2">
|
||
</div>
|
||
<div class="third-col-content">
|
||
<input type="text" class="persianDateInput date-input date input4" maxlength="10" id="end-date-@(index - 1)" placeholder="تاریخ ترک کار" tabindex="3">
|
||
<button class="btn save" onclick="saveData()">ثبت</button>
|
||
</div>
|
||
}
|
||
</div>
|
||
<div class="table-content">
|
||
<table class="table table-bordered table-striped workDate-table" @(index == 1 ? "id='modal-table'" : "")>
|
||
<colgroup>
|
||
<col style="width: 20px;">
|
||
<col style="width: 140px;">
|
||
<col class="col-edit" style="width: 5px;">
|
||
<col style="width: 140px;">
|
||
<col style="width: 140px;">
|
||
<col class="col-remove" style="width: 5px;">
|
||
<col style="width: 30px;">
|
||
</colgroup>
|
||
<thead>
|
||
<tr>
|
||
<th>#</th>
|
||
<th style="text-align: end;">تاریخ شروع بکار</th>
|
||
<th style="border-right-width: 0;" class="permision"></th>
|
||
<th>تاریخ آخرین روز کاری</th>
|
||
<th style="text-align: end;">تاریخ ترک کار</th>
|
||
<th style="border-right-width: 0;" class="permision"></th>
|
||
<th class="text-small">روزهای کارکرد</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
@if (item.LeftworkInsuranceViewModels != null)
|
||
{
|
||
var leftworkInsuranceViewModelList = item.LeftworkInsuranceViewModels;
|
||
for (var i = 0; i < leftworkInsuranceViewModelList.Count; i++)
|
||
{
|
||
<tr data-hasInsuranceList="@leftworkInsuranceViewModelList[i].HasInsuranceList" data-id="@leftworkInsuranceViewModelList[i].Id">
|
||
<td>@(i + 1)</td>
|
||
<td>@leftworkInsuranceViewModelList[i].StartWorkDate</td>
|
||
<td style="border-right-width: 0;" class="permision">
|
||
<a onclick="deleteDate(this, '@leftworkInsuranceViewModelList[i].StartWorkDate', @leftworkInsuranceViewModelList[i].WorkshopId, 'first')" href="#" class="edit-date first-edit permission-removeDate">
|
||
<i style="color: red;" class="ion-close-circled"></i>
|
||
</a>
|
||
<a href="#" class="edit-icon permission-editDate">
|
||
<i style="color: #f9792bf7;" class="fa fa-edit"></i>
|
||
</a>
|
||
</td>
|
||
<td>@leftworkInsuranceViewModelList[i].EndWorkDate</td>
|
||
<td>@leftworkInsuranceViewModelList[i].LeftWorkDate</td>
|
||
<td style="border-right-width: 0;" class="permision">
|
||
<a onclick="deleteDate(this, '@leftworkInsuranceViewModelList[i].LeftWorkDate', @leftworkInsuranceViewModelList[i].WorkshopId, 'last')" href="#" class=" edit-date second-edit permission-removeDate">
|
||
<i style="color: red;" class="ion-close-circled"></i>
|
||
</a>
|
||
<a href="#" class="edit-icon permission-editDate">
|
||
<i style="color: #f9792bf7;" class="fa fa-edit"></i>
|
||
</a>
|
||
</td>
|
||
<td>_</td>
|
||
</tr>
|
||
}
|
||
}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
index = index + 1;
|
||
}
|
||
}
|
||
else
|
||
{
|
||
<div class="tab-pane active" data-workshopid="" data-workshopName="" id="tab-1" data-pane="1">
|
||
<div class="pane-content">
|
||
<div class="top-content first-row">
|
||
<div class="first-col-content">
|
||
<div class="select-container">
|
||
<label> سمت </label>
|
||
<div class="dadmehr-select-search" onclick="inputFocus(this), employerDiagnose()">
|
||
<div class="custom-select text-right">
|
||
<ul class="ul-search single text-right" data-url="@Url.Page("/Company/Employees/Index", "JobListByText")">
|
||
<li>
|
||
<input onkeyup="searchTextLeftWorkInsurance(event, this, '@Url.Page("/Company/Employees/Index", "JobListByText")', @Model.WorkshopId)" class="text-right input-text" />
|
||
</li>
|
||
</ul>
|
||
<ul class="result options text-right">
|
||
</ul>
|
||
</div>
|
||
<span class="span-input"></span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="second-col-content">
|
||
<label> شماره پرسنلی </label>
|
||
<input type="text" data-haspersonelcode="" class="position-code" disabled="disabled">
|
||
</div>
|
||
<div class="third-col-content">
|
||
<div class="d-flex position-check">
|
||
<span class="position-type"> مشمول مزایا </span>
|
||
<div class="checkbox-wrapper">
|
||
<input type="checkbox" checked class="setContract">
|
||
</div>
|
||
<span class="position-type">عدم شمول مزایا</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="top-content">
|
||
<div class="first-col-content">
|
||
<input type="text" class="persianDateInput date-input date input2" maxlength="10" id="startDate1" placeholder="تاریخ شروع بکار" tabindex="1">
|
||
</div>
|
||
<div class="second-col-content">
|
||
<input type="text" class="persianDateInput date-input date input3" maxlength="10" id="lastDay1" placeholder="تاریخ آخرین روز کاری" tabindex="2">
|
||
</div>
|
||
<div class="third-col-content">
|
||
<input type="text" class="persianDateInput date-input date input4" maxlength="10" id="endDate1" placeholder="تاریخ ترک کار" tabindex="3">
|
||
<button class=" btn save2" id="save">ثبت</button>
|
||
</div>
|
||
</div>
|
||
<div class="table-content">
|
||
<table class="table table-bordered table-striped workDate-table" id="modal-table">
|
||
<colgroup>
|
||
<col style="width: 20px;">
|
||
<col style="width: 140px;">
|
||
<col class="col-edit" style="width: 5px;">
|
||
<col style="width: 140px;">
|
||
<col style="width: 140px;">
|
||
<col class="col-remove" style="width: 5px;">
|
||
<col style="width: 30px;">
|
||
</colgroup>
|
||
<thead>
|
||
<tr>
|
||
<th>#</th>
|
||
<th style="text-align: end;">تاریخ شروع بکار</th>
|
||
<th style="border-right-width: 0;" class="permision"></th>
|
||
<th>تاریخ آخرین روز کاری</th>
|
||
<th style="text-align: end;">تاریخ ترک کار</th>
|
||
<th style="border-right-width: 0;" class="permision"></th>
|
||
<th class="text-small">روزهای کارکرد</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr data-id="0">
|
||
<td>1</td>
|
||
<td></td>
|
||
<td style="border-right-width: 0;" class="permision">
|
||
<a onclick="deleteDate(this, '', 0, 'first')" href="#" class="edit-date first-edit permission-removeDate">
|
||
<i style="color: red;" class="ion-close-circled"></i>
|
||
</a>
|
||
<a href="#" class="edit-icon permission-editDate">
|
||
<i style="color: #f9792bf7;" class="fa fa-edit"></i>
|
||
</a>
|
||
</td>
|
||
<td></td>
|
||
<td></td>
|
||
<td style="border-right-width: 0;" class="permision">
|
||
<a onclick="deleteDate(this, '', 0, 'last')" href="#" class=" edit-date second-edit permission-removeDate">
|
||
<i style="color: red;" class="ion-close-circled"></i>
|
||
</a>
|
||
<a href="#" class="edit-icon permission-editDate">
|
||
<i style="color: #f9792bf7;" class="fa fa-edit"></i>
|
||
</a>
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
<tr data-id="0">
|
||
<td>2</td>
|
||
<td></td>
|
||
<td style="border-right-width: 0;" class="permision">
|
||
<a onclick="deleteDate(this, '', 0, 'first')" href="#" class="edit-date first-edit permission-removeDate">
|
||
<i style="color: red;" class="ion-close-circled"></i>
|
||
</a>
|
||
<a href="#" class="edit-icon permission-editDate">
|
||
<i style="color: #f9792bf7;" class="fa fa-edit"></i>
|
||
</a>
|
||
</td>
|
||
<td></td>
|
||
<td></td>
|
||
<td style="border-right-width: 0;" class="permision">
|
||
<a onclick="deleteDate(this, '', 0, 'last')" href="#" class=" edit-date second-edit permission-removeDate">
|
||
<i style="color: red;" class="ion-close-circled"></i>
|
||
</a>
|
||
<a href="#" class="edit-icon permission-editDate">
|
||
<i style="color: #f9792bf7;" class="fa fa-edit"></i>
|
||
</a>
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
<tr data-id="0">
|
||
<td>3</td>
|
||
<td></td>
|
||
<td style="border-right-width: 0;" class="permision">
|
||
<a onclick="deleteDate(this, '', 0, 'first')" href="#" class="edit-date first-edit permission-removeDate">
|
||
<i style="color: red;" class="ion-close-circled"></i>
|
||
</a>
|
||
<a href="#" class="edit-icon permission-editDate">
|
||
<i style="color: #f9792bf7;" class="fa fa-edit"></i>
|
||
</a>
|
||
</td>
|
||
<td></td>
|
||
<td></td>
|
||
@*<td><i class="fa fa-edit edit-icon permission-editDate " aria-hidden="true"></i></td>*@
|
||
<td style="border-right-width: 0;" class="permision">
|
||
<a onclick="deleteDate(this, '', 0, 'last')" href="#" class=" edit-date second-edit permission-removeDate">
|
||
<i style="color: red;" class="ion-close-circled"></i>
|
||
</a>
|
||
<a href="#" class="edit-icon permission-editDate">
|
||
<i style="color: #f9792bf7;" class="fa fa-edit"></i>
|
||
</a>
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
<tr data-id="0">
|
||
<td>4</td>
|
||
<td></td>
|
||
<td style="border-right-width: 0;" class="permision">
|
||
<a onclick="deleteDate(this, '', 0, 'first')" href="#" class="edit-date first-edit permission-removeDate">
|
||
<i style="color: red;" class="ion-close-circled"></i>
|
||
</a>
|
||
<a href="#" class="edit-icon permission-editDate">
|
||
<i style="color: #f9792bf7;" class="fa fa-edit"></i>
|
||
</a>
|
||
</td>
|
||
<td></td>
|
||
<td></td>
|
||
@*<td><i class="fa fa-edit edit-icon permission-editDate " aria-hidden="true"></i></td>*@
|
||
<td style="border-right-width: 0;" class="permision">
|
||
<a onclick="deleteDate(this, '', 0, 'last')" href="#" class=" edit-date second-edit permission-removeDate">
|
||
<i style="color: red;" class="ion-close-circled"></i>
|
||
</a>
|
||
<a href="#" class="edit-icon permission-editDate">
|
||
<i style="color: #f9792bf7;" class="fa fa-edit"></i>
|
||
</a>
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
<tr data-id="0">
|
||
<td>5</td>
|
||
<td></td>
|
||
<td style="border-right-width: 0;" class="permision">
|
||
<a onclick="deleteDate(this, '', 0, 'first')" href="#" class="edit-date first-edit permission-removeDate">
|
||
<i style="color: red;" class="ion-close-circled"></i>
|
||
</a>
|
||
<a href="#" class="edit-icon permission-editDate">
|
||
<i style="color: #f9792bf7;" class="fa fa-edit"></i>
|
||
</a>
|
||
</td>
|
||
<td></td>
|
||
<td></td>
|
||
@*<td><i class="fa fa-edit edit-icon permission-editDate " aria-hidden="true"></i></td>*@
|
||
<td style="border-right-width: 0;" class="permision">
|
||
<a onclick="deleteDate(this, '', 0, 'last')" href="#" class=" edit-date second-edit permission-removeDate">
|
||
<i style="color: red;" class="ion-close-circled"></i>
|
||
</a>
|
||
<a href="#" class="edit-icon permission-editDate">
|
||
<i style="color: #f9792bf7;" class="fa fa-edit"></i>
|
||
</a>
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
}
|
||
|
||
|
||
</div>
|
||
</div>
|
||
<div class="last-div">
|
||
@* <div class="d-flex work-history">
|
||
<div class="col-md-4 col-4 col-sm-4 last-titles">سابقه کار در کارگاه</div>
|
||
<div class="col-md-8 col-8 col-sm-8 d-flex" style="direction: ltr">
|
||
<div class="date-sums">312</div>
|
||
<div class="dates">1323</div>
|
||
<div class="dates">1323</div>
|
||
<div class="dates">2131</div>
|
||
</div>
|
||
</div>*@
|
||
<div class="d-flex in-history">
|
||
<div class="col-md-4 col-4 col-sm-4 last-titles">سابقه بیمه در کارگاه</div>
|
||
<div class="col-md-8 col-8 col-sm-8 d-flex" style="direction: ltr">
|
||
<div class="date-sums">312</div>
|
||
<div class="dates blue">1323</div>
|
||
<div class="dates blue">1323</div>
|
||
<div class="dates blue">2131</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="btns">
|
||
<a href="#" id="btnSaveData" class="btn btn-modal" style="background-color: #0f9500;color: white;">ذخیره</a>
|
||
<button class="btn btn-modal" data-dismiss="modal" style="background-color: white;color: #323030;">بستن</button>
|
||
</div>
|
||
</fieldset>
|
||
</div>
|
||
|
||
|
||
<form asp-page="./Index" asp-page-handler="CreateLeftWorkInsurance" id="employee" autocomplete="off"
|
||
method="post"
|
||
data-ajax="true"
|
||
data-callback=""
|
||
data-action="leftworkinsurance">
|
||
<div id="divAppendData">
|
||
<input type="hidden" asp-for="EmployeeId" value="@Model.EmployeeId" />
|
||
<input type="hidden" asp-for="IsDelete" />
|
||
</div>
|
||
@* <button type="submit" id="sendData" style="display: none"></button>*@
|
||
</form>
|
||
<input type="hidden" id="editStartDate" />
|
||
<input type="hidden" id="editEndDate" />
|
||
<input type="hidden" id="editLeftDate" />
|
||
<input type="hidden" id="deleteStartDate" />
|
||
<input type="hidden" id="editIndex" />
|
||
<input type="hidden" id="deleteIndex" />
|
||
<div class="modal fade" id="result-modal" tabindex="-1" role="dialog" aria-labelledby="regModalLabel" aria-hidden="true">
|
||
<div class="modal-dialog" role="document">
|
||
<div class="modal-content" id="ModalContent">
|
||
<div class="modal-header" dir="ltr">
|
||
<button type="button" class="close" data-dismiss="modal" aria-label="Close" data-parent-modal="#result-modal">
|
||
<span aria-hidden="true">×</span>
|
||
</button>
|
||
<div class="main-title">نتیجه ثبت اطلاعات ترک کار</div>
|
||
</div>
|
||
<div class="modal-body">
|
||
<div id="resultdiv" class="row" style="font-size: 16px;">
|
||
</div>
|
||
</div>
|
||
<div class="modal-footer">
|
||
<button type="button" style="border-radius: 25px;" id="closing" class="btn btn-secondary" data-dismiss="modal" data-parent-modal="#result-modal">بستن</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script src="~/DadmehrSelect/dadmehr-select-leftWork.js?v=1.2"></script>
|
||
<script src="~/ClientTheme/js/insurance-list.js?v=1"></script>
|
||
@{
|
||
<script>
|
||
var leftWorkInsuranceGroups = @(Html.Raw(Json.Serialize(Model.LeftWorkInsuranceGroups)));
|
||
var permisiionIds = @(Html.Raw(Json.Serialize(Model.PermissionIds)));
|
||
var modelEmployeeId = @Model.EmployeeId;
|
||
var CheckBeforeSaveLeftWorkInsuranceurl= '@Url.Page("/Company/Employees/Index", "CheckBeforeSaveLeftWorkInsurance")';
|
||
var CheckEditLeftWorkInsuranceurl='@Url.Page("/Company/Employees/Index", "CheckEditLeftWorkInsurance")';
|
||
var AfterDateurl='@Url.Page("/Company/Employees/Index", "AfterDate")';
|
||
var BeforeDatesurl ='@Url.Page("/Company/Employees/Index", "BeforeDate")';
|
||
var GetPersonelCodeurl ='@Url.Page("/Company/Employees/Index", "GetPersonelCode")';
|
||
var JobListByTexturl ='@Url.Page("/Company/Employees/Index", "JobListByText")';
|
||
var JobListByWorkshopIdurl ='@Url.Page("/Company/Employees/Index", "JobListByWorkshopId")';
|
||
var DeleteLeftWorkInsuranceWorkshopurl ='@Url.Page("/Company/Employees/Index", "DeleteLeftWorkInsuranceWorkshop")';
|
||
</script>
|
||
<script src="~/assetsadmin/page/employee/leftworkinsurance.js"></script>
|
||
}
|