delete craete 5
This commit is contained in:
@@ -1,507 +0,0 @@
|
||||
@model CompanyManagment.App.Contracts.Workshop.CreateWorkshop
|
||||
@{
|
||||
<link href="~/AdminTheme/amirb/jspc-peach.css" rel="stylesheet"/>
|
||||
|
||||
@*<link href="~/lib/select2/css/select2.css" rel="stylesheet" />*@
|
||||
|
||||
<style>
|
||||
.modal-dialog {
|
||||
width: 94% !important;
|
||||
}
|
||||
|
||||
.select2-container {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
border-top: unset !important;
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content .modal-footer {
|
||||
padding-top: unset !important;
|
||||
}
|
||||
|
||||
p {
|
||||
direction: ltr !important;
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
input[type=radio]:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
||||
border: solid #9d9a9a 1px;
|
||||
border-radius: 10px !important;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple {
|
||||
background-color: white;
|
||||
border: 1px solid #aaa;
|
||||
border-radius: 10px;
|
||||
cursor: text;
|
||||
}
|
||||
</style>
|
||||
|
||||
}
|
||||
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<form asp-page="./Index" asp-page-handler="Create" id="workshops" autocomplete="off"
|
||||
method="post"
|
||||
data-ajax="true"
|
||||
data-callback=""
|
||||
data-action="Refresh"
|
||||
enctype="multipart/form-data">
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<fieldset style="border: 1px solid #999797; height: 615px; border-radius: 10px; padding: revert">
|
||||
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 140px; text-align: center;"> مشخصات کارگاه</legend>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group col-md-12" dir="rtl" style="padding-left: 2.5%">
|
||||
<label asp-for="@Model.EmployerIdList">
|
||||
انتخاب کارفرما <span style="color: red">*</span>
|
||||
</label>
|
||||
<select id="copy" class="form-control select-city" multiple asp-for="@Model.EmployerIdList" asp-items='new SelectList(Model.Employers, "Id", "FullName")'>
|
||||
@*<option value="@Model.EmployerIdList"> انتخاب کارفرما </option*@>
|
||||
|
||||
|
||||
</select>
|
||||
<span asp-validation-for="Employers" class="error"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label asp-for="WorkshopName" class="control-label">
|
||||
نام کارگاه <span style="color: red">*</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" asp-for="WorkshopName">
|
||||
<span asp-validation-for="WorkshopName" class="error"></span>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label asp-for="WorkshopSureName" class="control-label"> نام مستعار کارگاه </label>
|
||||
<input type="text" class="form-control" asp-for="WorkshopSureName">
|
||||
<span asp-validation-for="WorkshopSureName" class="error"></span>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label asp-for="ArchiveCode" class="control-label">
|
||||
شماره بایگانی <span style="color: red">*</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" asp-for="ArchiveCode">
|
||||
<span asp-validation-for="ArchiveCode" class="error"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="InsuranceCode" class="control-label">کد کارگاهی بیمه </label>
|
||||
<input type="text" class="form-control" asp-for="InsuranceCode">
|
||||
<span asp-validation-for="InsuranceCode" class="error"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="TypeOfOwnership" class="control-label"> نوع مالکیت </label>
|
||||
<input type="text" class="form-control" asp-for="TypeOfOwnership">
|
||||
<span asp-validation-for="TypeOfOwnership" class="error"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="AgentName" class="control-label">
|
||||
نام و نام خانوادگی نماینده <span style="color: red">*</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" asp-for="AgentName">
|
||||
<span asp-validation-for="AgentName" class="error"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="AgentPhone" class="control-label">شماره تلفن نماینده</label>
|
||||
<input type="text" class="form-control" asp-for="AgentPhone">
|
||||
<span asp-validation-for="AgentPhone" class="error"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group" dir="rtl">
|
||||
|
||||
<label asp-for="State" class="control-label"> نام استان</label>
|
||||
@*<input type="text" value="" id="pcal1" class="pdate form-control" />
|
||||
<input type="hidden" value="" id="hide" asp-for="DateOfBirth">
|
||||
<span asp-validation-for="DateOfBirth" class="error"></span>*@
|
||||
|
||||
|
||||
<select class="form-control select-city" asp-for="State" name="state" onChange="iranwebsv(this.value);">
|
||||
<option value="">انتخاب استان</option>
|
||||
<option value="تهران"> تهران </option>
|
||||
<option value="گیلان"> گیلان </option>
|
||||
<option value="آذربایجان شرقی"> آذربایجان شرقی</option>
|
||||
<option value="خوزستان"> خوزستان </option>
|
||||
<option value="فارس"> فارس</option>
|
||||
<option value="اصفهان"> اصفهان</option>
|
||||
<option value="خراسان رضوی">خراسان رضوی </option>
|
||||
<option value="قزوین"> قزوین</option>
|
||||
<option value="سمنان"> سمنان </option>
|
||||
<option value="قم"> قم</option>
|
||||
<option value="مرکزی"> مرکزی</option>
|
||||
<option value="زنجان"> زنجان</option>
|
||||
<option value="مازندران"> مازندران</option>
|
||||
<option value="گلستان"> گلستان</option>
|
||||
<option value="اردبیل"> اردبیل </option>
|
||||
<option value="آذربایجان غربی"> آذربایجان غربی</option>
|
||||
<option value="همدان"> همدان </option>
|
||||
<option value="کردستان"> کردستان </option>
|
||||
<option value="کرمانشاه"> کرمانشاه </option>
|
||||
<option value="لرستان"> لرستان</option>
|
||||
<option value="بوشهر"> بوشهر</option>
|
||||
<option value="کرمان"> کرمان</option>
|
||||
<option value="هرمزگان"> هرمزگان</option>
|
||||
<option value="چهارمحال و بختیاری"> چهارمحال و بختیاری</option>
|
||||
<option value="یزد"> یزد</option>
|
||||
<option value="سیستان و بلوچستان"> سیستان و بلوچستان</option>
|
||||
<option value="ایلام"> ایلام</option>
|
||||
<option value="کهگلویه و بویراحمد"> کهگلویه و بویراحمد</option>
|
||||
<option value="خراسان شمالی"> خراسان شمالی</option>
|
||||
<option value="خراسان جنوبی"> خراسان جنوبی</option>
|
||||
<option value="البرز"> البرز</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group" dir="rtl">
|
||||
|
||||
|
||||
<label class="control-label"> نام شهر</label>
|
||||
<select class="form-control select-city" name="cityy" id="city">
|
||||
<option value="" placeholder="انتخاب شهر"> </option>
|
||||
</select>
|
||||
<input type="hidden" value="" id="hide2" asp-for="City">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label asp-for="AgreementNumber" class="control-label"> ردیف پیمان </label>
|
||||
<input type="text" class="form-control text-center" value="000" asp-for="AgreementNumber">
|
||||
<span asp-validation-for="AgreementNumber" class="error"></span>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12" style="padding-left: 3%;">
|
||||
@*<label asp-for="Address">آدرس</label>*@
|
||||
<textarea class="form-control" asp-for="Address" placeholder="آدرس"></textarea>
|
||||
<span asp-validation-for="Address" class="text-danger"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div style="padding-right: 5px">
|
||||
<p class="pull-right">
|
||||
<a href="#showmodal=@Url.Page("/Company/Employers/Index", "Create")" class="btn btn-success btn-rounded waves-effect waves-light m-b-5" style=" background-color: #f5f5f5; border-color: #0f9500; font-family: 'Web_Yekan' !important; color: #0f9500 !important; border-top-left-radius: 0px; border-bottom-left-radius: 0px ">
|
||||
<i class="fa fa-user-plus" style="padding-left: 3px; font-size: 14px; color: #0f9500 !important "></i>
|
||||
</a>
|
||||
|
||||
</p>
|
||||
<p class="pull-right">
|
||||
<a href="#showmodal=@Url.Page("/Company/Employers/Index", "InsertLegal")" class="btn btn-success btn-rounded waves-effect waves-light m-b-5" style=" background-color: #f5f5f5; border-color: #1d92e5; font-family: 'Web_Yekan' !important; color: #1d92e5 !important; border-top-right-radius: 0px; border-bottom-right-radius: 0px ">
|
||||
<i class="fa fa-group" style="padding-left: 3px; font-size: 14px; color: #1d92e5 !important "></i>
|
||||
</a>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert;">
|
||||
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 185px; text-align: center;"> نحوه انجام امور قرارداد </legend>
|
||||
<div class="row m-b-10">
|
||||
|
||||
<div class="col-md-12">
|
||||
<label asp-for="@Model.AccountsList">
|
||||
تعیین دسترسی
|
||||
</label>
|
||||
<select class="form-control select-city2" multiple asp-for="@Model.AccountIdsList" asp-items='new SelectList(Model.AccountsList, "Id", "Fullname")'>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<span asp-validation-for="TypeOfContract" class="error"></span>
|
||||
<fieldset style="border: 1px solid #c9c9c9; border-radius: 5px; margin-bottom: 10px; padding: revert;">
|
||||
<p>
|
||||
<label> مدت قرارداد </label>
|
||||
<div class="row" dir="ltr">
|
||||
|
||||
<div class="col-md-2">
|
||||
<span>
|
||||
<span dir="rtl">1 ماهه</span> <input type="radio" value="1" asp-for="ContractTerm" checked>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<span>
|
||||
<span dir="rtl">2 ماهه</span> <input type="radio" value="2" asp-for="ContractTerm">
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<span>
|
||||
<span dir="rtl">3 ماهه</span> <input type="radio" value="3" asp-for="ContractTerm">
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<span>
|
||||
<span dir="rtl">6 ماهه</span> <input type="radio" value="6" asp-for="ContractTerm">
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<span>
|
||||
<span dir="rtl">1 ساله</span> <input type="radio" value="12" asp-for="ContractTerm">
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-2"></div>
|
||||
</div>
|
||||
</p>
|
||||
</fieldset>
|
||||
<p>
|
||||
قرارداد و تصفیه حساب بصورت استاندارد <input type="radio" value="a" asp-for="TypeOfContract" checked>
|
||||
</p>
|
||||
<p>
|
||||
قرارداد و تصفیه حساب بدون محاسبه سنوات <input type="radio" value="b" asp-for="TypeOfContract">
|
||||
</p>
|
||||
<p>
|
||||
قرارداد و تصفیه حساب بدون محاسبه عیدی <input type="radio" value="c" asp-for="TypeOfContract">
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
قرارداد و تصفیه حساب بدون محاسبه عیدی و سنوات <input type="radio" value="d" asp-for="TypeOfContract">
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert;">
|
||||
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 195px; text-align: center;"> نحوه انجام امور بیمه ای</legend>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<input class="checkboxtitle" type="checkbox" asp-for="FixedSalary" id="checkSelect" onclick="selectori(this)"/>
|
||||
<span> این کارگاه شامل دستمزد مقطوع می باشد</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-1" dir="rtl">
|
||||
|
||||
</div>
|
||||
@* <div class="form-group col-md-6" dir="rtl">
|
||||
<label id="jobsLable" asp-for="JobCode">انتخاب شغل با کد مربوطه</label>
|
||||
<select id="jobs" class="form-control select-city" asp-for="JobCode" asp-items='new SelectList(Model.JobCodeViewModels, "Code", "JobName")'>
|
||||
<option value=""></option>
|
||||
|
||||
</select>
|
||||
<span asp-validation-for="JobCode" class="error"></span>
|
||||
</div>*@
|
||||
|
||||
<div class="form-group col-md-4" dir="rtl">
|
||||
<label id="populationLable" asp-for="Population"> جمعیت شهر</label>
|
||||
<select id="population" class="form-control select-city" asp-for="Population">
|
||||
<option value=""></option>
|
||||
<option value="MoreThan500">بالای 500 هزار نفر</option>
|
||||
<option value="LessThan500"> پایین 500 هزار نفر</option>
|
||||
|
||||
</select>
|
||||
<span asp-validation-for="Population" class="error"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<span asp-validation-for="TypeOfInsuranceSend" class="error"></span>
|
||||
<p>
|
||||
ارسال لیست بیمه عادی <input type="radio" value="ارسال لیست بیمه عادی" asp-for="TypeOfInsuranceSend">
|
||||
</p>
|
||||
<p>
|
||||
ارسال لیست بیمه بصورت کمک دولت <input type="radio" value="ارسال لیست بیمه بصورت کمک دولت" asp-for="TypeOfInsuranceSend">
|
||||
</p>
|
||||
<p>
|
||||
ارسال لیست بیمه کارگاه خانوادگی <input type="radio" value="ارسال لیست بیمه کارگاه خانوادگی" asp-for="TypeOfInsuranceSend">
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@*<input type="hidden" asp-for="id" value="id"/>*@
|
||||
<div class="modal-footer">
|
||||
|
||||
<button type="submit" class="btn btn-success btn-rounded waves-effect waves-light" onclick="sum()">ذخیره</button>
|
||||
|
||||
<button type="button" class="btn btn-default btn-rounded waves-effect waves-light m-b-5" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script language="javascript" src="~/AdminTheme/js/city.js"></script>
|
||||
<script>
|
||||
function sum() {
|
||||
|
||||
|
||||
const y = document.getElementById('city');
|
||||
const City = y.options[y.selectedIndex].text;
|
||||
|
||||
document.getElementById('hide2').value = City;
|
||||
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
if (document.getElementById("checkSelect").checked) {
|
||||
document.getElementById("population").removeAttribute("disabled");
|
||||
document.getElementById("population").style.backgroundColor = "#fff";
|
||||
document.getElementById("jobs").removeAttribute("disabled");
|
||||
document.getElementById("jobs").style.backgroundColor = "#fff";
|
||||
document.getElementById("jobsLable").removeAttribute("style");
|
||||
document.getElementById("populationLable").removeAttribute("style");
|
||||
} else {
|
||||
document.getElementById("population").setAttribute("disabled", "disabled");
|
||||
document.getElementById("population").style.backgroundColor = "#e7e7e7";
|
||||
document.getElementById("population").options.selectedIndex = 0;
|
||||
|
||||
document.getElementById("jobs").setAttribute("disabled", "disabled");
|
||||
document.getElementById("jobs").style.backgroundColor = "#e7e7e7";
|
||||
document.getElementById("jobs").options.selectedIndex = 0;
|
||||
|
||||
document.getElementById("jobsLable").style.color = "#9b9b9b";
|
||||
document.getElementById("populationLable").style.color = "#9b9b9b";
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function selectori() {
|
||||
if (document.getElementById("checkSelect").checked) {
|
||||
document.getElementById("population").removeAttribute("disabled");
|
||||
document.getElementById("population").style.backgroundColor = "#fff";
|
||||
document.getElementById("jobs").removeAttribute("disabled");
|
||||
document.getElementById("jobs").style.backgroundColor = "#fff";
|
||||
document.getElementById("jobsLable").removeAttribute("style");
|
||||
document.getElementById("populationLable").removeAttribute("style");
|
||||
} else {
|
||||
document.getElementById("population").setAttribute("disabled", "disabled");
|
||||
document.getElementById("population").style.backgroundColor = "#e7e7e7";
|
||||
document.getElementById("population").options.selectedIndex = 0;
|
||||
document.getElementById("select2-population-container").innerHTML = "";
|
||||
document.getElementById("jobs").setAttribute("disabled", "disabled");
|
||||
document.getElementById("jobs").style.backgroundColor = "#e7e7e7";
|
||||
document.getElementById("jobs").options.selectedIndex = 0;
|
||||
document.getElementById("select2-jobs-container").innerHTML = "";
|
||||
document.getElementById("jobsLable").style.color = "#9b9b9b";
|
||||
document.getElementById("populationLable").style.color = "#9b9b9b";
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@*<script type="text/javascript">
|
||||
var listArray = [];
|
||||
async function show() {
|
||||
var myArray = document.getElementById('copy');
|
||||
let intext = myArray.options[myArray.selectedIndex].value;
|
||||
|
||||
|
||||
|
||||
@foreach (var items in Model.Employers)
|
||||
{
|
||||
|
||||
@:listArray.push({ LName: "@items.LName", Id: @items.Id });
|
||||
|
||||
|
||||
|
||||
}
|
||||
for (var i = 0; i < listArray.length; i++) {
|
||||
if (listArray[i].Id == intext) {
|
||||
document.getElementById("past").innerHTML = listArray[i].LName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>*@
|
||||
@*<script src="~/lib/select2/js/select2.js"></script>
|
||||
<script src="~/lib/select2/js/i18n/fa.js"></script>*@
|
||||
@@ -1,828 +0,0 @@
|
||||
@model CompanyManagment.App.Contracts.Workshop.CreateWorkshop
|
||||
|
||||
<link href="@Href("~/admintheme/css/createWorkshop.css")" rel="stylesheet"/>
|
||||
<div id="createWorkshop">
|
||||
<form asp-page="./Index" asp-page-handler="Create" id="workshops" autocomplete="off"
|
||||
method="post"
|
||||
data-ajax="true"
|
||||
data-callback=""
|
||||
data-action="Refresh"
|
||||
enctype="multipart/form-data">
|
||||
<div class="container">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<div class="main-title">فرم ایجاد کارگاه</div>
|
||||
<div class="box">
|
||||
<div class="steps col-md-12">
|
||||
<div id="progress"></div>
|
||||
<div class="step">مشخصات کارگاه</div>
|
||||
<div class="step">امور قرارداد </div>
|
||||
<div class="step">امور بیمه ای </div>
|
||||
</div>
|
||||
<div class="row form" id="form1">
|
||||
<div class="col-md-12 col-xs-12 inputs EmployerIdList ">
|
||||
<label class="input-label">انتخاب کارفرما <span style="color: red;">*</span></label>
|
||||
<select class="select-city" multiple asp-for="@Model.EmployerIdList" onchange="getEmployer(this.value)" asp-items='new SelectList(Model.Employers, "Id", "FullName")'>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<label class="input-label">نام کارگاه <span style="color: red;">*</span></label>
|
||||
<input asp-for="WorkshopName" type="text" placeholder="" class="form-control notEmptyWorkshop">
|
||||
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<label class="input-label"> نام مستعار کارگاه</label>
|
||||
<input asp-for="WorkshopSureName" type="text" placeholder="" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2 col-xs-12 inputs">
|
||||
<label class="input-label"> نوع تملک </label>
|
||||
<select asp-for="TypeOfOwnership" class="form-control">
|
||||
<option value="" selected class="form-control"> </option>
|
||||
<option value="">مالکیت</option>
|
||||
<option value="">استیجاری</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2 col-xs-12 inputs">
|
||||
<label class="input-label">شماره بایگانی <span style="color: red;">*</span></label>
|
||||
<input asp-for="ArchiveCode" type="text" placeholder="" class="form-control notEmptyArchive">
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<label class="input-label">نام و نام خانوادگی نماینده کارگاه </label>
|
||||
<input asp-for="AgentName" type="text" placeholder="" class="form-control">
|
||||
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<label class="input-label"> سمت </label>
|
||||
<select name="job" class="form-control select-city">
|
||||
<option value=""> </option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<label class="input-label">شماره تماس نماینده کارگاه </label>
|
||||
<input asp-for="AgentPhone" type="text" placeholder="" class="form-control">
|
||||
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<label class="input-label">نام استان </label>
|
||||
<select class="form-control select-city" asp-for="State" name="state" onChange="iranwebsv(this.value);">
|
||||
<option value=""> استان</option>
|
||||
<option value="تهران"> تهران </option>
|
||||
<option value="گیلان"> گیلان </option>
|
||||
<option value="آذربایجان شرقی"> آذربایجان شرقی</option>
|
||||
<option value="خوزستان"> خوزستان </option>
|
||||
<option value="فارس"> فارس</option>
|
||||
<option value="اصفهان"> اصفهان</option>
|
||||
<option value="خراسان رضوی">خراسان رضوی </option>
|
||||
<option value="قزوین"> قزوین</option>
|
||||
<option value="سمنان"> سمنان </option>
|
||||
<option value="قم"> قم</option>
|
||||
<option value="مرکزی"> مرکزی</option>
|
||||
<option value="زنجان"> زنجان</option>
|
||||
<option value="مازندران"> مازندران</option>
|
||||
<option value="گلستان"> گلستان</option>
|
||||
<option value="اردبیل"> اردبیل </option>
|
||||
<option value="آذربایجان غربی"> آذربایجان غربی</option>
|
||||
<option value="همدان"> همدان </option>
|
||||
<option value="کردستان"> کردستان </option>
|
||||
<option value="کرمانشاه"> کرمانشاه </option>
|
||||
<option value="لرستان"> لرستان</option>
|
||||
<option value="بوشهر"> بوشهر</option>
|
||||
<option value="کرمان"> کرمان</option>
|
||||
<option value="هرمزگان"> هرمزگان</option>
|
||||
<option value="چهارمحال و بختیاری"> چهارمحال و بختیاری</option>
|
||||
<option value="یزد"> یزد</option>
|
||||
<option value="سیستان و بلوچستان"> سیستان و بلوچستان</option>
|
||||
<option value="ایلام"> ایلام</option>
|
||||
<option value="کهگلویه و بویراحمد"> کهگلویه و بویراحمد</option>
|
||||
<option value="خراسان شمالی"> خراسان شمالی</option>
|
||||
<option value="خراسان جنوبی"> خراسان جنوبی</option>
|
||||
<option value="البرز"> البرز</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<label class="input-label">نام شهر </label>
|
||||
<select class="form-control select-city" name="cityy" id="city">
|
||||
<option value="" placeholder=" شهرستان"> </option>
|
||||
</select>
|
||||
<input type="hidden" value="" id="hide2" asp-for="City">
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<label class="input-label">نام محله </label>
|
||||
@* <div class="select-wrapper">
|
||||
<input type="text" asp-for="ZoneName" class="col-md-10 input"/>
|
||||
<a class="addNeighbor col-md-2">
|
||||
<i class="fa fa-plus addNeighbor-address"></i>
|
||||
</a>
|
||||
</div>*@
|
||||
<div class="neighborField">
|
||||
<input type="text" class="neighborInput form-control">
|
||||
<a class="addNeighbor">
|
||||
<i class="fa fa-plus"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-xs-12 inputs">
|
||||
<label class="input-label">جزئیات نشانی </label>
|
||||
<input asp-for="Address" type="text" placeholder="" class="form-control">
|
||||
</div>
|
||||
<div class="modal fade" id="edit-modal" tabindex="-1" role="dialog" aria-labelledby="edit-modal-label" aria-hidden="true" style="backdrop-filter: blur(6px);background-color: #0000005c;">
|
||||
<div class="modal-dialoge" role="document">
|
||||
<div class="modal-content2">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" data-parent-modal="#edit-modal" aria-hidden="true" style="left: auto;right: auto;margin-top: 20px;margin-right: 20px;">
|
||||
×
|
||||
</button>
|
||||
<div class="modal-title">افزودن نشانی جدید</div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<select class="form-control">
|
||||
<option value="استان 1" selected>نام استان </option>
|
||||
<option value="استان 2" class="form-control">استان 2</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<select class="form-control">
|
||||
<option value="شهر 1" selected>نام شهر </option>
|
||||
<option value="شهر 2" class="form-control">شهر 2</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs wrapper">
|
||||
<input type="text" required/>
|
||||
<label>نام محله </label>
|
||||
</div>
|
||||
<div class="w-100">
|
||||
<div class="panel panel-default" id="city-table">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-list" style="padding-left: 3px; font-size: 14px"></i> لیست عناوین </h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div>
|
||||
<div>
|
||||
<table id="datatable" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="font-size: 12px !important;text-align: center">#</th>
|
||||
<th style="font-size: 12px !important; text-align: center">نام استان</th>
|
||||
<th style="font-size: 12px !important; text-align: center">نام شهر </th>
|
||||
<th style="font-size: 12px !important; text-align: center">نام محله </th>
|
||||
<th style="font-size: 12px !important; width: 20%; text-align: center">عملیات</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" onclick="sendData()" class="btn modal2-btn" id="edit">ذخیره </button>
|
||||
<button type="button" class="btn modal2-btn" data-dismiss="modal" id="closing" data-parent-modal="#edit-modal">انصراف</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form" id="form2">
|
||||
@if (Model.PermissionIds != null && Model.PermissionIds.Contains(10323))
|
||||
{
|
||||
<div class="col-xs-12 inputs">
|
||||
<label class="input-label">تعیین سطح دسترسی برای قرارداد </label>
|
||||
<select class="form-control select-city" multiple asp-for="@Model.AccountIdsList" asp-items='new SelectList(Model.AccountsList, "Id", "Fullname")'>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex-box">
|
||||
<div class="input-boxes col-md-6 col-sm-12 col-xs-12">
|
||||
<fieldset class="right content-fieldset contract-box">
|
||||
<div class="form2-title">لطفا مدت قرارداد خود را انتخاب کنید :</div>
|
||||
<div class="col-md-1 blank-div"></div>
|
||||
<div class="flexible-div flexible-radio col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">1 ماهه</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">2 ماهه</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">3 ماهه</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">6 ماهه</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">1 ساله</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">دائمی</span>
|
||||
</div>
|
||||
<input type="hidden" id="asp-contract-hidden" asp-for="ContractTerm"/>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="input-boxes col-md-6 col-sm-12 col-xs-12">
|
||||
<fieldset class="right content-fieldset contract-box">
|
||||
<div class="form2-title">در صورت تمایل به محاسبه ی عناوین ذیل در فیش حقوقی، گزینه های موردنظر را فعال نمایید</div>
|
||||
<div class="payTitles">
|
||||
<div class="flexible-div paymentDiv">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12 spanBox">
|
||||
<span onclick="addBonus(this, 'AddLeavePayInput')" data-value="AddLeavePay" class="btn bonusActive btn-rounded waves-effect waves-light bonusSpan"> مزد و مرخصی </span>
|
||||
</div>
|
||||
<div class="col-md-12 col-sm-12 col-xs-12 spanBox">
|
||||
<span onclick="addBonus(this, 'AddYearsPayInput')" class="btn bonusActive btn-rounded waves-effect waves-light bonusSpan"> سنوات </span>
|
||||
</div>
|
||||
<div class="col-md-12 col-sm-12 col-xs-12 spanBox">
|
||||
<span onclick="addBonus(this, 'AddBonusesPayInput')" class="btn bonusActive btn-rounded waves-effect waves-light bonusSpan"> عیدی و پاداش </span>
|
||||
</div>
|
||||
<input type="checkbox" class="hiddenCheckbox" checked="checked" asp-for="AddLeavePay" id="AddLeavePayInput"/>
|
||||
<input type="checkbox" class="hiddenCheckbox" checked="checked" asp-for="AddYearsPay" id="AddYearsPayInput"/>
|
||||
<input type="checkbox" class="hiddenCheckbox" checked="checked" asp-for="AddBonusesPay" id="AddBonusesPayInput"/>
|
||||
</div>
|
||||
<div class="paymentDiv">
|
||||
<span onclick="addBonus(this, 'totalPayment')" data-value="totalPayment" class="totalPayment btn bonusActive waves-effect waves-light bonusSpan"> نمایش جمع تصفیه حساب </span>
|
||||
<input type="checkbox" asp-for="TotalPaymentHide" checked="checked" class="hiddenCheckbox" id="totalPayment"/>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
@* <div class="row inputs">
|
||||
<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
|
||||
<div class="optional-wages d-flex">
|
||||
<div class="d-flex single-checkbox">
|
||||
<span class="options-type" style="width: 100%;">مجموع مبالغ تصفیه حساب در ذیل فرم نمایش داده شود</span>
|
||||
<a onclick="addPayment(this)" class="totalActive" style="font-size: 30px;">
|
||||
<i class="ion-checkmark-circled" style="color: #20b723;"></i>
|
||||
</a>
|
||||
<input type="checkbox" asp-for="TotalPaymentHide" class="hiddenCheckbox" id="totalPayment" checked="checked" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="flex-box w-100">
|
||||
<h4 style="margin: auto;margin-top: 10%;" class="text-danger">
|
||||
شما مجوز دسترسی به این بخش را ندارید.
|
||||
</h4>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="row form" id="form3">
|
||||
|
||||
@if (Model.PermissionIds != null && Model.PermissionIds.Contains(10324))
|
||||
{
|
||||
<div class="col-md-12 form3-boxes">
|
||||
<div class="col-md-6">
|
||||
<label class="input-label"><input type="checkbox" value="NormalList" asp-for="TypeOfInsuranceSend" class="myCheckbox checkboxes sendList"> ارسال لیست بیمه کارگاه عادی</label>
|
||||
<label class="input-label"><input type="checkbox" value="Govermentlist" asp-for="TypeOfInsuranceSend" class="myCheckbox checkboxes sendList">ارسال لیست بیمه کارگاه کمک دولت </label>
|
||||
<label class="input-label"><input type="checkbox" value="Familylist" asp-for="TypeOfInsuranceSend" class="myCheckbox checkboxes sendList"> ارسال لیست بیمه کارگاه خانوادگی</label>
|
||||
</div>
|
||||
<div class="col-md-3 disabled" id="myDiv4">
|
||||
<label class="input-label">کد کارگاهی بیمه</label>
|
||||
<input asp-for="InsuranceCode" type="text" placeholder="" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-3 disabled" id="myDiv2">
|
||||
<label class="input-label"> ردیف پیمان</label>
|
||||
<input type="text" value="000" asp-for="AgreementNumber" class="form-control" id="zeros">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 form3-boxes disabled" id="myDiv">
|
||||
<div class="col-md-12" style="margin-bottom: 10px;">
|
||||
<label class="input-label"><input type="checkbox" asp-for="FixedSalary" class="myCheckbox2 checkboxes"> این کارگاه مشمول دستمزد مقطوع می باشد</label>
|
||||
</div>
|
||||
<div class="disabled" id="myDiv3">
|
||||
<div class="col-md-8">
|
||||
<label class="input-label"> عنوان صنف و درجه / کد اقتصادی </label>
|
||||
<select class="select-city" id="jobName" asp-for="InsuranceJobId" asp-items='@Model.InsuranceJobViewModels'>
|
||||
<option value="" disabled selected> </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="input-label"> جمعیت شهر </label>
|
||||
<select class="form-control" id="population" asp-for="Population">
|
||||
<option value="" disabled selected> </option>
|
||||
<option value="LessThan500">کمتر از 500000 نفر </option>
|
||||
<option value="MoreThan500">بیشتر از 500000 نفر</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="flex-box w-100">
|
||||
<h4 style="margin: auto;margin-top: 10%;" class="text-danger">
|
||||
شما مجوز دسترسی به این بخش را ندارید.
|
||||
</h4>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="form-footer-btns">
|
||||
<a class="btn btn-rounded" id="pre">مرحله قبل</a>
|
||||
<a class="btn btn-rounded" id="next">مرحله بعد</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-footer">
|
||||
<button class="btn btn-rounded" id="close" data-dismiss="modal">بستن</button>
|
||||
<a href="#" class="btn btn-rounded" id="save">ذخیره</a>
|
||||
<a href="#" class="btn btn-rounded" id="fakeSave">ذخیره</a>
|
||||
<button style="display: none;" type="submit" id="sendFinaly"></button>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="isLegal"/>
|
||||
</form>
|
||||
</div>
|
||||
<script language="javascript" src="~/AdminTheme/js/city.js"></script>
|
||||
|
||||
<script>
|
||||
$('#fakeSave').hide();
|
||||
$("#save").click(function() {
|
||||
|
||||
$('#save').hide();
|
||||
$('#fakeSave').show();
|
||||
var allInputsFilled = true;
|
||||
var selectElement = $('.EmployerIdList .select-city');
|
||||
var selectedOption = selectElement.find('option:selected');
|
||||
var selectedText = selectedOption.text();
|
||||
console.log(selectedText);
|
||||
|
||||
var selectCity = $('#city.select-city');
|
||||
var selectedCityOption = selectCity.find('option:selected');
|
||||
$('#hide2').val(selectedCityOption.text());
|
||||
|
||||
if (selectedText === "" || $(".notEmptyWorkshop").val() === '') {
|
||||
allInputsFilled = false;
|
||||
$('.EmployerIdList .select2-container').addClass('errored');
|
||||
$(".notEmptyWorkshop").addClass('errored');
|
||||
$('#fakeSave').hide();
|
||||
$('#save').show();
|
||||
} else {
|
||||
$(".notEmptyWorkshop").removeClass('errored');
|
||||
$('.EmployerIdList .select2-container').removeClass('errored');
|
||||
allInputsFilled = true;
|
||||
}
|
||||
|
||||
|
||||
if ($(".notEmptyArchive").val() === '') {
|
||||
allInputsFilled = false;
|
||||
$(".notEmptyArchive").addClass('errored');
|
||||
$('#save').show();
|
||||
$('#fakeSave').hide();
|
||||
// return;
|
||||
} else {
|
||||
$(".notEmptyArchive").removeClass('errored');
|
||||
allInputsFilled = true;
|
||||
|
||||
}
|
||||
if ($('.myCheckbox2').is(':checked') && $('#isLegal').val() == "false") {
|
||||
if ($('#population').val() == '' || $('#population').val() == null) {
|
||||
$('#population').addClass('errored');
|
||||
allInputsFilled = false;
|
||||
// return;
|
||||
} else {
|
||||
$('#population').removeClass('errored');
|
||||
allInputsFilled = true;
|
||||
}
|
||||
if ($('#jobName').val() == null || $('#jobName').val() == '') {
|
||||
$('#jobName').next('span').addClass('errored');
|
||||
allInputsFilled = false;
|
||||
// return;
|
||||
} else {
|
||||
$('#jobName').next('span').removeClass('errored');
|
||||
allInputsFilled = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// var criteria = [true, false];
|
||||
// var hasError=false;
|
||||
// let found = containsAll(criteria,isLegalList);
|
||||
// if(found){
|
||||
// $('#EmployerIdList').next('span').addClass('errored');
|
||||
// $.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', "امکان انتخاب کارفرمای حقیقی و حقوقی به دلیل موانع قانونی در نرم افزار بصورت همزمان امکان پذیر نمی باشد");
|
||||
// }
|
||||
//else
|
||||
if ($('.errored').length > 0) {
|
||||
// console.log(allInputsFilled);
|
||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', "لطفا موارد اجباری را تکمیل کنید.");
|
||||
$('#save').show();
|
||||
$('#fakeSave').hide();
|
||||
} else {
|
||||
|
||||
$('#sendFinaly').click();
|
||||
setTimeout(function() {
|
||||
|
||||
$('#save').show();
|
||||
$('#fakeSave').hide();
|
||||
},
|
||||
3000);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function getZone() {
|
||||
const y = document.getElementById('city');
|
||||
const cityValue = y.options[y.selectedIndex].text;
|
||||
|
||||
document.getElementById('hide2').value = cityValue;
|
||||
|
||||
const cityId = document.getElementById("city").value;
|
||||
$('#select-button').empty().append('<option selected="selected" value="0" >انتخاب محله</option>');
|
||||
if (cityId != null) {
|
||||
|
||||
$.ajax({
|
||||
//contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: '@Url.Page("./Index", "ZonelistLoad")',
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
data: { "cityId": cityId },
|
||||
|
||||
success: function(response) {
|
||||
|
||||
$.each(response.zoneList,
|
||||
function(i, item) {
|
||||
$('#select-button').append($('<option>',
|
||||
{
|
||||
value: item.zoneName,
|
||||
text: item.zoneName
|
||||
}));
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
failure: function(response) {
|
||||
console.log(5, response);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#asp-contract-hidden").val(1);
|
||||
$('span.contractDuration:contains("1 ماهه")').removeClass('btn-deactive').addClass("contActive");
|
||||
contractDuration();
|
||||
checkContractDuration();
|
||||
|
||||
$(".EmployerIdList .select2-container").addClass('notEmpty ');
|
||||
$('.activated').prop('checked', true);
|
||||
|
||||
$(function() {
|
||||
$('#edit-modal [data-parent-modal]').on('click',
|
||||
function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
const parentModalId = $(this).data('parent-modal');
|
||||
$(parentModalId).modal('hide');
|
||||
});
|
||||
});
|
||||
$(function() {
|
||||
$('.addNeighbor').on('click',
|
||||
function(e) {
|
||||
e.preventDefault();
|
||||
$('#edit-modal').modal('show');
|
||||
});
|
||||
});
|
||||
|
||||
$("#edit-modal").on('hidden.bs.modal',
|
||||
function() {
|
||||
$('body').addClass('modal-open');
|
||||
});
|
||||
|
||||
$('.sendList').click(function() {
|
||||
if ($(this).is(':checked')) {
|
||||
$('.sendList').not(this).prop('checked', false);
|
||||
}
|
||||
});
|
||||
|
||||
const myCheckbox = $('.myCheckbox');
|
||||
const myCheckbox2 = $('.myCheckbox2');
|
||||
const myDiv = $('#myDiv');
|
||||
const myDiv2 = $('#myDiv2');
|
||||
const myDiv3 = $('#myDiv3');
|
||||
const myDiv4 = $('#myDiv4');
|
||||
|
||||
myCheckbox.on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked') && $('#isLegal').val() == "false") {
|
||||
myDiv.removeClass('disabled');
|
||||
} else {
|
||||
myDiv.addClass('disabled');
|
||||
}
|
||||
});
|
||||
|
||||
myCheckbox.on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked')) {
|
||||
myDiv2.removeClass('disabled');
|
||||
} else {
|
||||
myDiv2.addClass('disabled');
|
||||
}
|
||||
});
|
||||
myCheckbox2.on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked')) {
|
||||
myDiv3.removeClass('disabled');
|
||||
} else {
|
||||
myDiv3.addClass('disabled');
|
||||
}
|
||||
});
|
||||
myCheckbox.on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked')) {
|
||||
myDiv4.removeClass('disabled');
|
||||
} else {
|
||||
myDiv4.addClass('disabled');
|
||||
}
|
||||
});
|
||||
$(".myCheckbox").on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked')) {
|
||||
$("#asp-hidden").val($(this).val());
|
||||
console.log($("#asp-hidden").val());
|
||||
} else {
|
||||
$("#asp-hidden").val('');
|
||||
$("#InsuranceCode").val('');
|
||||
}
|
||||
});
|
||||
|
||||
$("#pre").css({ 'box-shadow': 'none' });
|
||||
$("#next").click(function() {
|
||||
|
||||
var allInputsFilled = true;
|
||||
const selectElement = $('.EmployerIdList .select-city');
|
||||
const selectedOption = selectElement.find('option:selected');
|
||||
const selectedText = selectedOption.text();
|
||||
console.log(selectedText);
|
||||
|
||||
if (selectedText === "" || $(".notEmptyWorkshop").val() === '') {
|
||||
allInputsFilled = false;
|
||||
$('.EmployerIdList .select2-container').addClass('errored');
|
||||
$(".notEmptyWorkshop").addClass('errored');
|
||||
$('#fakeSave').hide();
|
||||
$('#save').show();
|
||||
return;
|
||||
} else {
|
||||
$(".notEmptyWorkshop").removeClass('errored');
|
||||
$('.EmployerIdList .select2-container').removeClass('errored');
|
||||
allInputsFilled = true;
|
||||
}
|
||||
|
||||
|
||||
if ($(".notEmptyArchive").val() === '') {
|
||||
allInputsFilled = false;
|
||||
$(".notEmptyArchive").addClass('errored');
|
||||
return;
|
||||
} else {
|
||||
$(".notEmptyArchive").removeClass('errored');
|
||||
allInputsFilled = true;
|
||||
}
|
||||
|
||||
|
||||
//var criteria = [true, false];
|
||||
//var hasError=false;
|
||||
//let found = containsAll(criteria,isLegalList);
|
||||
//if(found){
|
||||
// $('#EmployerIdList').next('span').addClass('errored');
|
||||
// $.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', "امکان انتخاب کارفرمای حقیقی و حقوقی به دلیل موانع قانونی در نرم افزار بصورت همزمان امکان پذیر نمی باشد");
|
||||
//}
|
||||
//else
|
||||
if (!allInputsFilled) {
|
||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', "لطفا موارد اجباری را تکمیل کنید.");
|
||||
} else {
|
||||
if ($('#form3').css('right') == '0px') {
|
||||
$("#next").css({
|
||||
'background-color': "#c7c0c0ba",
|
||||
'color': '#000000b8',
|
||||
'box-shadow': 'none'
|
||||
});
|
||||
} else if ($('#form2').css('left') == '1200px') {
|
||||
$("#pre").css({
|
||||
'background-color': "white",
|
||||
'color': '#0f9500',
|
||||
'box-shadow': '0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)'
|
||||
});
|
||||
$("#progress").css({
|
||||
'width': '66.66%'
|
||||
|
||||
});
|
||||
$("#form1").css({
|
||||
right: '1200px'
|
||||
});
|
||||
$("#form2").css({
|
||||
left: '0'
|
||||
});
|
||||
|
||||
} else if ($('#form2').css('left') == '0px') {
|
||||
$("#next").css({
|
||||
'background-color': "#c7c0c0ba",
|
||||
'color': '#000000b8',
|
||||
'box-shadow': 'none'
|
||||
});
|
||||
$("#pre").css({
|
||||
'background-color': "white",
|
||||
'color': '#0f9500',
|
||||
'box-shadow': '0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)'
|
||||
});
|
||||
$("#progress").css({
|
||||
'width': '100%',
|
||||
'border-top-right-radius': '7px'
|
||||
});
|
||||
$("#form2").css({
|
||||
left: '1200px'
|
||||
});
|
||||
$("#form3").css({
|
||||
right: '0'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#pre").click(function() {
|
||||
$("#next").css({
|
||||
'background-color': "white",
|
||||
'color': '#1763b1'
|
||||
});
|
||||
if ($('#form2').css('left') == '1200px' && $('#form3').css('right') == '1200px') {
|
||||
$("#pre").css({
|
||||
'background-color': "#c7c0c0ba",
|
||||
'color': '#000000b8',
|
||||
'box-shadow': 'none'
|
||||
});
|
||||
|
||||
} else if ($('#form2').css('left') == '0px') {
|
||||
$("#progress").css({
|
||||
'width': '33.33%',
|
||||
'border-top-right-radius': '0px'
|
||||
});
|
||||
$("#pre").css({
|
||||
'background-color': "#c7c0c0ba",
|
||||
'color': '#000000b8',
|
||||
'box-shadow': 'none'
|
||||
});
|
||||
console.log(1);
|
||||
$("#form2").css({
|
||||
left: '1200px'
|
||||
});
|
||||
$("#form1").css({
|
||||
right: 'initial'
|
||||
});
|
||||
|
||||
} else if ($('#form3').css('right') == '0px') {
|
||||
$("#progress").css({
|
||||
'width': '66.66%',
|
||||
'border-top-right-radius': '0px'
|
||||
});
|
||||
$("#pre").css({
|
||||
'background-color': "white",
|
||||
'color': '#0f9500',
|
||||
'box-shadow': '0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)'
|
||||
});
|
||||
$("#form2").css({
|
||||
left: '0'
|
||||
});
|
||||
$("#form3").css({
|
||||
right: '1200px'
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
//مدت قرارداد
|
||||
$(".contractDuration").on('click',
|
||||
function() {
|
||||
if (!$(this).hasClass('contActive')) {
|
||||
$(".contractDuration").removeClass('contActive');
|
||||
$(this).removeClass('btn-deactive').addClass('contActive');
|
||||
}
|
||||
contractDuration();
|
||||
});
|
||||
|
||||
function contractDuration() {
|
||||
if ($(".contActive").text() == '1 ماهه') {
|
||||
$("#asp-contract-hidden").val(1);
|
||||
} else if ($(".contActive").text() == '2 ماهه') {
|
||||
$("#asp-contract-hidden").val(2);
|
||||
} else if ($(".contActive").text() == '3 ماهه') {
|
||||
$("#asp-contract-hidden").val(3);
|
||||
} else if ($(".contActive").text() == '6 ماهه') {
|
||||
$("#asp-contract-hidden").val(6);
|
||||
} else if ($(".contActive").text() == '1 ساله') {
|
||||
$("#asp-contract-hidden").val(12);
|
||||
} else if ($(".contActive").text() == 'دائمی') {
|
||||
$("#asp-contract-hidden").val("ForEver");
|
||||
}
|
||||
}
|
||||
|
||||
function checkContractDuration() {
|
||||
const aspValueContract = $("#asp-contract-hidden").val();
|
||||
console.log(aspValueContract);
|
||||
if (aspValueContract != '' || aspValueContract != undefined) {
|
||||
if (aspValueContract == '1') {
|
||||
$('span.contractDuration:contains("1 ماهه")').removeClass('btn-deactive').addClass("contActive");
|
||||
} else if (aspValueContract == '2') {
|
||||
$('span.contractDuration:contains("2 ماهه")').removeClass('btn-deactive').addClass("contActive");
|
||||
} else if (aspValueContract == '3') {
|
||||
$('span.contractDuration:contains("3 ماهه")').removeClass('btn-deactive').addClass("contActive");
|
||||
} else if (aspValueContract == '6') {
|
||||
$('span.contractDuration:contains("6 ماهه")').removeClass('btn-deactive').addClass("contActive");
|
||||
} else if (aspValueContract == '12') {
|
||||
$('span.contractDuration:contains("12 ماهه")').removeClass('btn-deactive').addClass("contActive");
|
||||
} else if (aspValueContract == 'ForEver') {
|
||||
$('span.contractDuration:contains("دائمی")').removeClass('btn-deactive').addClass("contActive");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//عناوین فیش حقوقی
|
||||
function addBonus(element, id) {
|
||||
if ($(element).hasClass('bonusActive')) {
|
||||
$(element).addClass('bonusDeactive').removeClass('bonusActive');
|
||||
$(`#${id}`).removeAttr("checked");
|
||||
} else {
|
||||
$(element).removeClass('bonusDeactive').addClass('bonusActive');
|
||||
$(`#${id}`).attr("checked", "checked");
|
||||
}
|
||||
$(`#${id}`).change();
|
||||
}
|
||||
//مجموع مبالغ
|
||||
//function addPayment(element) {
|
||||
// if ($(element).hasClass('totalActive')) {
|
||||
// $(element).addClass('totalDeactive').removeClass('totalActive');
|
||||
// $("#totalPayment").prop("checked", false);
|
||||
// $(element).children().replaceWith('<i class="ion-close-circled" style="color: #dd3632"></i>');
|
||||
// } else {
|
||||
// $(element).removeClass('totalDeactive').addClass('totalActive');
|
||||
// $("#totalPayment").prop("checked", true);
|
||||
// $(element).children().replaceWith('<i class="ion-checkmark-circled" style="color: #20b723"></i>');
|
||||
|
||||
// }
|
||||
// $("#totalPayment").change();
|
||||
//}
|
||||
|
||||
|
||||
var isLegalList = [];
|
||||
|
||||
function getEmployer(employerId) {
|
||||
|
||||
if (employerId !== null && employerId != '') {
|
||||
$.ajax({
|
||||
/* contentType: 'charset=utf-8',*/
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: '@Url.Page("/Company/Workshops/Index", "GetEmployerName")',
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
data: { "employerId": employerId },
|
||||
success: function(response) {
|
||||
//console.log(response.isLegal);
|
||||
if ((response.isLegal && response.nationalId == '') || (!response.isLegal && response.nationalcode == '')) {
|
||||
swal({
|
||||
title: (response.isLegal ? "کارفرمای انتخاب شده شناسه ملی ندارد." : " کارفرمای انتخاب شده کد ملی ندارد."),
|
||||
text: (response.isLegal ? "در صورت تمایل به درج شناسه ملی به منوی کارفرما مراجعه نمایید." : "در صورت تمایل به درج کد ملی به منوی کارفرما مراجعه نمایید."),
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
//confirmButtonText: "بستن",
|
||||
cancelButtonText: "بستن",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: true,
|
||||
customClass: "errorSwall"
|
||||
});
|
||||
$('#EmployerIdList option').filter(`[value="${employerId}"]`).remove();
|
||||
const option = new Option(response.lName, employerId);
|
||||
$("#EmployerIdList").append(option);
|
||||
$("#EmployerIdList").trigger("change");
|
||||
} else {
|
||||
$('#isLegal').val(response.isLegal);
|
||||
isLegalList.push(response.isLegal);
|
||||
}
|
||||
|
||||
},
|
||||
failure: function(response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
function containsAll(needles, haystack) {
|
||||
for (let i = 0; i < needles.length; i++) {
|
||||
if ($.inArray(needles[i], haystack) == -1) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,464 +0,0 @@
|
||||
@model CompanyManagment.App.Contracts.Workshop.EditWorkshop
|
||||
@{
|
||||
<link href="~/AdminTheme/amirb/jspc-peach.css" rel="stylesheet"/>
|
||||
|
||||
@*<link href="~/lib/select2/css/select2.css" rel="stylesheet" />*@
|
||||
|
||||
<style>
|
||||
.modal-dialog {
|
||||
width: 94% !important;
|
||||
}
|
||||
.select2-container {
|
||||
width: 100% !important;
|
||||
}
|
||||
.modal-footer {
|
||||
border-top: unset !important;
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content .modal-footer {
|
||||
padding-top: unset !important;
|
||||
}
|
||||
p{
|
||||
direction: ltr !important;
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
input[type=radio]:hover {
|
||||
cursor:pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<form asp-page="./Index" asp-page-handler="Edit" autocomplete="off"
|
||||
method="post"
|
||||
data-ajax="true"
|
||||
data-callback=""
|
||||
data-action="Refresh"
|
||||
enctype="multipart/form-data">
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<fieldset style="border: 1px solid #999797; height: 615px; border-radius: 10px; padding: revert;">
|
||||
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 140px; text-align: center;"> مشخصات کارگاه</legend>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group col-md-12" dir="rtl" style="padding-left: 2.5%">
|
||||
<label asp-for="@Model.EmployerIdList">
|
||||
انتخاب کارفرما <span style="color: red">*</span>
|
||||
</label>
|
||||
<select id="copy" class="form-control select-city" multiple asp-for="@Model.EmployerIdList" asp-items='new SelectList(Model.Employers, "Id", "FullName")'>
|
||||
<option value="@Model.EmployerIdList"> انتخاب کارفرما </option>
|
||||
|
||||
|
||||
</select>
|
||||
<span asp-validation-for="Employers" class="error"></span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label asp-for="WorkshopName" class="control-label">
|
||||
نام کارگاه <span style="color: red">*</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" asp-for="WorkshopName">
|
||||
<span asp-validation-for="WorkshopName" class="error"></span>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label asp-for="WorkshopSureName" class="control-label"> نام مستعار کارگاه </label>
|
||||
<input type="text" class="form-control" asp-for="WorkshopSureName">
|
||||
<span asp-validation-for="WorkshopSureName" class="error"></span>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label asp-for="ArchiveCode" class="control-label">
|
||||
شماره بایگانی <span style="color: red">*</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" asp-for="ArchiveCode">
|
||||
<span asp-validation-for="ArchiveCode" class="error"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="InsuranceCode" class="control-label">کد کارگاهی بیمه </label>
|
||||
<input type="text" class="form-control" asp-for="InsuranceCode">
|
||||
<span asp-validation-for="InsuranceCode" class="error"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="TypeOfOwnership" class="control-label"> نوع مالکیت </label>
|
||||
<input type="text" class="form-control" asp-for="TypeOfOwnership">
|
||||
<span asp-validation-for="TypeOfOwnership" class="error"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="AgentName" class="control-label">
|
||||
نام و نام خانوادگی نماینده <span style="color: red">*</span>
|
||||
</label>
|
||||
<input type="text" class="form-control" asp-for="AgentName">
|
||||
<span asp-validation-for="AgentName" class="error"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label asp-for="AgentPhone" class="control-label">شماره تلفن نماینده</label>
|
||||
<input type="text" class="form-control" asp-for="AgentPhone">
|
||||
<span asp-validation-for="AgentPhone" class="error"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" dir="rtl">
|
||||
|
||||
<label asp-for="State" class="control-label"> نام استان</label>
|
||||
|
||||
<select id="state" class="form-control select-city" asp-for="State" name="state" onChange="iranwebsv(this.value);">
|
||||
<option value="">انتخاب استان</option>
|
||||
<option value="تهران"> تهران </option>
|
||||
<option value="گیلان"> گیلان </option>
|
||||
<option value="آذربایجان شرقی"> آذربایجان شرقی</option>
|
||||
<option value="خوزستان"> خوزستان </option>
|
||||
<option value="فارس"> فارس</option>
|
||||
<option value="اصفهان"> اصفهان</option>
|
||||
<option value="خراسان رضوی">خراسان رضوی </option>
|
||||
<option value="قزوین"> قزوین</option>
|
||||
<option value="سمنان"> سمنان </option>
|
||||
<option value="قم"> قم</option>
|
||||
<option value="مرکزی"> مرکزی</option>
|
||||
<option value="زنجان"> زنجان</option>
|
||||
<option value="مازندران"> مازندران</option>
|
||||
<option value="گلستان"> گلستان</option>
|
||||
<option value="اردبیل"> اردبیل </option>
|
||||
<option value="آذربایجان غربی"> آذربایجان غربی</option>
|
||||
<option value="همدان"> همدان </option>
|
||||
<option value="کردستان"> کردستان </option>
|
||||
<option value="کرمانشاه"> کرمانشاه </option>
|
||||
<option value="لرستان"> لرستان</option>
|
||||
<option value="بوشهر"> بوشهر</option>
|
||||
<option value="کرمان"> کرمان</option>
|
||||
<option value="هرمزگان"> هرمزگان</option>
|
||||
<option value="چهارمحال و بختیاری"> چهارمحال و بختیاری</option>
|
||||
<option value="یزد"> یزد</option>
|
||||
<option value="سیستان و بلوچستان"> سیستان و بلوچستان</option>
|
||||
<option value="ایلام"> ایلام</option>
|
||||
<option value="کهگلویه و بویراحمد"> کهگلویه و بویراحمد</option>
|
||||
<option value="خراسان شمالی"> خراسان شمالی</option>
|
||||
<option value="خراسان جنوبی"> خراسان جنوبی</option>
|
||||
<option value="البرز"> البرز</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" dir="rtl">
|
||||
|
||||
|
||||
<label class="control-label"> نام شهر</label>
|
||||
<select class="form-control select-city" asp-for="City" name="cityy" id="city">
|
||||
<option value=""> @Model.City</option>
|
||||
</select>
|
||||
|
||||
<input type="hidden" value="@Model.City" id="hide2" asp-for="City">
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12" style="padding-left: 3%;">
|
||||
@*<label asp-for="Address">آدرس</label>*@
|
||||
<textarea class="form-control" asp-for="Address" placeholder="آدرس"></textarea>
|
||||
<span asp-validation-for="Address" class="text-danger"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 m-r-10">
|
||||
<div class="m-r-20" style="padding-right: 20px">
|
||||
<p class="pull-right">
|
||||
<a href="#showmodal=@Url.Page("/Company/Employers/Index", "Create")" class="btn btn-success btn-rounded waves-effect waves-light m-b-5" style=" background-color: #f5f5f5; border-color: #0f9500; font-family: 'Web_Yekan' !important; color: #0f9500 !important; border-top-left-radius: 0px; border-bottom-left-radius: 0px ">
|
||||
<i class="fa fa-user-plus" style="padding-left: 3px; font-size: 14px; color: #0f9500 !important "></i>
|
||||
</a>
|
||||
|
||||
</p>
|
||||
<p class="pull-right">
|
||||
<a href="#showmodal=@Url.Page("/Company/Employers/Index", "InsertLegal")" class="btn btn-success btn-rounded waves-effect waves-light m-b-5" style=" background-color: #f5f5f5; border-color: #1d92e5; font-family: 'Web_Yekan' !important; color: #1d92e5 !important; border-top-right-radius: 0px; border-bottom-right-radius: 0px ">
|
||||
<i class="fa fa-group" style="padding-left: 3px; font-size: 14px; color: #1d92e5 !important "></i>
|
||||
</a>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert;">
|
||||
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 185px; text-align: center;"> نحوه انجام امور قرارداد </legend>
|
||||
<div class="row m-b-10">
|
||||
<div class="col-md-12">
|
||||
<label asp-for="@Model.AccountsList">
|
||||
تعیین دسترسی
|
||||
</label>
|
||||
<select class="form-control select-city2" multiple asp-for="@Model.AccountIdsList" asp-items='new SelectList(Model.AccountsList, "Id", "Fullname")'>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<span asp-validation-for="TypeOfContract" class="error"></span>
|
||||
<fieldset style="border: 1px solid #c9c9c9; border-radius: 5px; margin-bottom: 10px; padding: revert;">
|
||||
<p>
|
||||
<label> مدت قرارداد </label>
|
||||
<div class="row" dir="ltr">
|
||||
|
||||
<div class="col-md-2">
|
||||
<span>
|
||||
<span dir="rtl">1 ماهه</span> <input type="radio" value="1" asp-for="ContractTerm" checked>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<span>
|
||||
<span dir="rtl">2 ماهه</span> <input type="radio" value="2" asp-for="ContractTerm">
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<span>
|
||||
<span dir="rtl">3 ماهه</span> <input type="radio" value="3" asp-for="ContractTerm">
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<span>
|
||||
<span dir="rtl">6 ماهه</span> <input type="radio" value="6" asp-for="ContractTerm">
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<span>
|
||||
<span dir="rtl">1 ساله</span> <input type="radio" value="12" asp-for="ContractTerm">
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-2"></div>
|
||||
</div>
|
||||
</p>
|
||||
</fieldset>
|
||||
<p>
|
||||
قرارداد و تصفیه حساب بصورت استاندارد <input type="radio" value="a" asp-for="TypeOfContract" checked>
|
||||
</p>
|
||||
<p>
|
||||
قرارداد و تصفیه حساب بدون محاسبه سنوات <input type="radio" value="b" asp-for="TypeOfContract">
|
||||
</p>
|
||||
<p>
|
||||
قرارداد و تصفیه حساب بدون محاسبه عیدی <input type="radio" value="c" asp-for="TypeOfContract">
|
||||
</p>
|
||||
|
||||
|
||||
<p>
|
||||
قرارداد و تصفیه حساب بدون محاسبه عیدی و پاداش <input type="radio" value="d" asp-for="TypeOfContract">
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
|
||||
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert;">
|
||||
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 195px; text-align: center;"> نحوه انجام امور بیمه ای</legend>
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<input class="checkboxtitle" type="checkbox" asp-for="FixedSalary" id="checkSelect" onclick="selectori(this)"/>
|
||||
<span> این کارگاه شامل دستمزد مقطوع می باشد</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-1" dir="rtl">
|
||||
|
||||
</div>
|
||||
@* <div class="form-group col-md-6" dir="rtl">
|
||||
<label id="jobsLable" asp-for="JobCode">انتخاب شغل با کد مربوطه</label>
|
||||
<select id="jobs" class="form-control select-city" asp-for="JobCode" asp-items='new SelectList(Model.JobCodeViewModels, "Code", "JobName")'>
|
||||
<option value=""></option>
|
||||
|
||||
</select>
|
||||
<span asp-validation-for="JobCode" class="error"></span>
|
||||
</div>*@
|
||||
|
||||
<div class="form-group col-md-4" dir="rtl">
|
||||
<label id="populationLable" asp-for="Population"> جمعیت شهر</label>
|
||||
<select id="population" class="form-control select-city" asp-for="Population">
|
||||
<option value=""></option>
|
||||
<option value="MoreThan500">بالای 500 هزار نفر</option>
|
||||
<option value="LessThan500"> پایین 500 هزار نفر</option>
|
||||
|
||||
</select>
|
||||
<span asp-validation-for="Population" class="error"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group">
|
||||
<span asp-validation-for="TypeOfInsuranceSend" class="error"></span>
|
||||
<p>
|
||||
ارسال لیست بیمه عادی <input type="radio" value="ارسال لیست بیمه عادی" asp-for="TypeOfInsuranceSend">
|
||||
</p>
|
||||
<p>
|
||||
ارسال لیست بیمه بصورت کمک دولت <input type="radio" value="ارسال لیست بیمه بصورت کمک دولت" asp-for="TypeOfInsuranceSend">
|
||||
</p>
|
||||
<p>
|
||||
ارسال لیست بیمه کارگاه خانوادگی <input type="radio" value="ارسال لیست بیمه کارگاه خانوادگی" asp-for="TypeOfInsuranceSend">
|
||||
</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<input type="hidden" asp-for="Id" value="@Model.Id"/>
|
||||
<div class="modal-footer">
|
||||
|
||||
<button type="submit" class="btn btn-success btn-rounded waves-effect waves-light" onclick="sum()">ذخیره</button>
|
||||
|
||||
<button type="button" class="btn btn-default btn-rounded waves-effect waves-light m-b-5" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<script language="javascript" src="~/AdminTheme/js/city.js"></script>
|
||||
<script type="text/javascript">
|
||||
function sum() {
|
||||
|
||||
|
||||
const y = document.getElementById('city');
|
||||
const City = y.options[y.selectedIndex].text;
|
||||
|
||||
document.getElementById('hide2').value = City;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
if (document.getElementById("checkSelect").checked) {
|
||||
document.getElementById("population").removeAttribute("disabled");
|
||||
document.getElementById("population").style.backgroundColor = "#fff";
|
||||
document.getElementById("jobs").removeAttribute("disabled");
|
||||
document.getElementById("jobs").style.backgroundColor = "#fff";
|
||||
document.getElementById("jobsLable").removeAttribute("style");
|
||||
document.getElementById("populationLable").removeAttribute("style");
|
||||
} else {
|
||||
document.getElementById("population").setAttribute("disabled", "disabled");
|
||||
document.getElementById("population").style.backgroundColor = "#e7e7e7";
|
||||
document.getElementById("population").options.selectedIndex = 0;
|
||||
|
||||
document.getElementById("jobs").setAttribute("disabled", "disabled");
|
||||
document.getElementById("jobs").style.backgroundColor = "#e7e7e7";
|
||||
document.getElementById("jobs").options.selectedIndex = 0;
|
||||
|
||||
document.getElementById("jobsLable").style.color = "#9b9b9b";
|
||||
document.getElementById("populationLable").style.color = "#9b9b9b";
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
function selectori() {
|
||||
if (document.getElementById("checkSelect").checked) {
|
||||
document.getElementById("population").removeAttribute("disabled");
|
||||
document.getElementById("population").style.backgroundColor = "#fff";
|
||||
document.getElementById("jobs").removeAttribute("disabled");
|
||||
document.getElementById("jobs").style.backgroundColor = "#fff";
|
||||
document.getElementById("jobsLable").removeAttribute("style");
|
||||
document.getElementById("populationLable").removeAttribute("style");
|
||||
} else {
|
||||
document.getElementById("population").setAttribute("disabled", "disabled");
|
||||
document.getElementById("population").style.backgroundColor = "#e7e7e7";
|
||||
document.getElementById("population").options.selectedIndex = 0;
|
||||
document.getElementById("select2-population-container").innerHTML = "";
|
||||
document.getElementById("jobs").setAttribute("disabled", "disabled");
|
||||
document.getElementById("jobs").style.backgroundColor = "#e7e7e7";
|
||||
document.getElementById("jobs").options.selectedIndex = 0;
|
||||
document.getElementById("select2-jobs-container").innerHTML = "";
|
||||
document.getElementById("jobsLable").style.color = "#9b9b9b";
|
||||
document.getElementById("populationLable").style.color = "#9b9b9b";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
<script>
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
const state = document.getElementById('state').value;
|
||||
const city = document.getElementById('hide2').value;
|
||||
|
||||
iranwebsv(state);
|
||||
|
||||
$('#city option:contains("شهرستان")').text(city);
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -1,905 +0,0 @@
|
||||
@model CompanyManagment.App.Contracts.Workshop.EditWorkshop
|
||||
|
||||
<link href="@Href("~/admintheme/css/createWorkshop.css")" rel="stylesheet"/>
|
||||
|
||||
<div id="editWorkshop">
|
||||
<form asp-page="./Index" asp-page-handler="Edit" id="workshops" autocomplete="off"
|
||||
method="post"
|
||||
data-ajax="true"
|
||||
data-callback=""
|
||||
data-action="Refresh"
|
||||
enctype="multipart/form-data">
|
||||
<input type="hidden" asp-for="Id" value="@Model.Id"/>
|
||||
<div class="container">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<div class="main-title">فرم ویرایش کارگاه</div>
|
||||
<div class="box">
|
||||
<div class="steps col-md-12">
|
||||
<div id="progress"></div>
|
||||
<div class="step">مشخصات کارگاه</div>
|
||||
<div class="step">امور قرارداد </div>
|
||||
<div class="step">امور بیمه ای </div>
|
||||
</div>
|
||||
|
||||
<div class="row form" id="form1">
|
||||
<div class="col-md-12 col-xs-12 inputs EmployerIdList ">
|
||||
<label class="form-control-label">انتخاب کارفرما <span style="color: red;">*</span></label>
|
||||
<select class="select-city" multiple asp-for="@Model.EmployerIdList" onchange="getEmployer(this.value)" asp-items='new SelectList(Model.Employers, "Id", "FullName")'>
|
||||
<option value="@Model.EmployerIdList"> انتخاب کارفرما </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<label class="form-control-label">نام کارگاه <span style="color: red;">*</span></label>
|
||||
<input asp-for="WorkshopName" type="text" placeholder="" class="form-control notEmptyWorkshop">
|
||||
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<label class="form-control-label"> نام مستعار کارگاه</label>
|
||||
<input asp-for="WorkshopSureName" type="text" placeholder="" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2 col-xs-12 inputs">
|
||||
<label class="form-control-label"> نوع تملک </label>
|
||||
<select asp-for="TypeOfOwnership" class="form-control">
|
||||
<option value="" selected class="form-control"> </option>
|
||||
<option value="">مالکیت</option>
|
||||
<option value="">استیجاری</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-2 col-xs-12 inputs">
|
||||
<label class="form-control-label">شماره بایگانی <span style="color: red;">*</span></label>
|
||||
<input asp-for="ArchiveCode" type="text" placeholder="" class="form-control notEmptyArchive">
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<label class="form-control-label">نام و نام خانوادگی نماینده کارگاه </label>
|
||||
<input asp-for="AgentName" type="text" placeholder="" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<label class="form-control-label"> سمت </label>
|
||||
<select name="job" class="form-control select-city">
|
||||
<option value=""> </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<label class="form-control-label">شماره تماس نماینده کارگاه </label>
|
||||
<input asp-for="AgentPhone" type="text" placeholder="" class="form-control">
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<label class="form-control-label">نام استان </label>
|
||||
<select class="form-control select-city" asp-for="State" id="state" name="state" onChange="iranwebsv(this.value);">
|
||||
<option value=""> استان</option>
|
||||
<option value="تهران"> تهران </option>
|
||||
<option value="گیلان"> گیلان </option>
|
||||
<option value="آذربایجان شرقی"> آذربایجان شرقی</option>
|
||||
<option value="خوزستان"> خوزستان </option>
|
||||
<option value="فارس"> فارس</option>
|
||||
<option value="اصفهان"> اصفهان</option>
|
||||
<option value="خراسان رضوی">خراسان رضوی </option>
|
||||
<option value="قزوین"> قزوین</option>
|
||||
<option value="سمنان"> سمنان </option>
|
||||
<option value="قم"> قم</option>
|
||||
<option value="مرکزی"> مرکزی</option>
|
||||
<option value="زنجان"> زنجان</option>
|
||||
<option value="مازندران"> مازندران</option>
|
||||
<option value="گلستان"> گلستان</option>
|
||||
<option value="اردبیل"> اردبیل </option>
|
||||
<option value="آذربایجان غربی"> آذربایجان غربی</option>
|
||||
<option value="همدان"> همدان </option>
|
||||
<option value="کردستان"> کردستان </option>
|
||||
<option value="کرمانشاه"> کرمانشاه </option>
|
||||
<option value="لرستان"> لرستان</option>
|
||||
<option value="بوشهر"> بوشهر</option>
|
||||
<option value="کرمان"> کرمان</option>
|
||||
<option value="هرمزگان"> هرمزگان</option>
|
||||
<option value="چهارمحال و بختیاری"> چهارمحال و بختیاری</option>
|
||||
<option value="یزد"> یزد</option>
|
||||
<option value="سیستان و بلوچستان"> سیستان و بلوچستان</option>
|
||||
<option value="ایلام"> ایلام</option>
|
||||
<option value="کهگلویه و بویراحمد"> کهگلویه و بویراحمد</option>
|
||||
<option value="خراسان شمالی"> خراسان شمالی</option>
|
||||
<option value="خراسان جنوبی"> خراسان جنوبی</option>
|
||||
<option value="البرز"> البرز</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<label class="form-control-label">نام شهر </label>
|
||||
<select class="form-control select-city" name="cityy" id="city">
|
||||
</select>
|
||||
<input type="hidden" id="hide2" asp-for="City">
|
||||
<input type="hidden" value="@Model.City" id="hide3">
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<label class="input-label">نام محله </label>
|
||||
<div class="neighborField">
|
||||
<input type="text" asp-for="ZoneName" class="neighborInput form-control">
|
||||
<a class="addNeighbor">
|
||||
<i class="fa fa-plus"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12 col-xs-12 inputs">
|
||||
<label class="form-control-label">جزئیات نشانی </label>
|
||||
<input asp-for="Address" type="text" placeholder="" class="form-control">
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal fade" id="edit-modal" tabindex="-1" role="dialog" aria-labelledby="edit-modal-label" aria-hidden="true" style="backdrop-filter: blur(6px); background-color: #0000005c;">
|
||||
<div class="modal-dialoge" role="document">
|
||||
<div class="modal-content2">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" data-parent-modal="#edit-modal" aria-hidden="true" style="left: auto; right: auto; margin-top: 20px; margin-right: 20px;">
|
||||
×
|
||||
</button>
|
||||
<div class="modal-title">افزودن نشانی جدید</div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<select class="form-control">
|
||||
<option value="استان 1" selected>نام استان </option>
|
||||
<option value="استان 2" class="form-control">استان 2</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs">
|
||||
<select class="form-control">
|
||||
<option value="شهر 1" selected>نام شهر </option>
|
||||
<option value="شهر 2" class="form-control">شهر 2</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-4 col-xs-12 inputs wrapper">
|
||||
<input type="text" required/>
|
||||
<label>نام محله </label>
|
||||
</div>
|
||||
<div class="w-100">
|
||||
<div class="panel panel-default" id="city-table">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-list" style="padding-left: 3px; font-size: 14px"></i> لیست عناوین </h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div>
|
||||
<div>
|
||||
<table id="datatable" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="font-size: 12px !important; text-align: center">#</th>
|
||||
<th style="font-size: 12px !important; text-align: center">نام استان</th>
|
||||
<th style="font-size: 12px !important; text-align: center">نام شهر </th>
|
||||
<th style="font-size: 12px !important; text-align: center">نام محله </th>
|
||||
<th style="font-size: 12px !important; width: 20%; text-align: center">عملیات</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" onclick="sendData()" class="btn modal2-btn" id="edit">ذخیره </button>
|
||||
<button type="button" class="btn modal2-btn" data-dismiss="modal" id="closing" data-parent-modal="#edit-modal">انصراف</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form" id="form2">
|
||||
@if (Model.PermissionIds != null && Model.PermissionIds.Contains(10323))
|
||||
{
|
||||
<div class="col-xs-12 inputs">
|
||||
<label class="form-control-label">تعیین سطح دسترسی برای قرارداد </label>
|
||||
<select class="form-control select-city" multiple asp-for="@Model.AccountIdsList" asp-items='new SelectList(Model.AccountsList, "Id", "Fullname")'>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex-box">
|
||||
<div class="input-boxes col-md-6 col-sm-12 col-xs-12">
|
||||
<fieldset class="right content-fieldset contract-box">
|
||||
<div class="form2-title">لطفا مدت قرارداد خود را انتخاب کنید :</div>
|
||||
<div class="col-md-1 blank-div"></div>
|
||||
<div class="flexible-div flexible-radio col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">1 ماهه</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">2 ماهه</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">3 ماهه</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">6 ماهه</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">1 ساله</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">دائمی</span>
|
||||
</div>
|
||||
<input type="hidden" id="asp-contract-hidden" asp-for="ContractTerm"/>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="input-boxes col-md-6 col-sm-12 col-xs-12">
|
||||
<fieldset class="right content-fieldset contract-box">
|
||||
<div class="form2-title" style="font-size: 12px;margin-bottom: 15px;">در صورت تمایل به محاسبه ی عناوین ذیل در فیش حقوقی، گزینه های موردنظر را فعال نمایید</div>
|
||||
<div class="payTitles">
|
||||
<div class="flexible-div paymentDiv">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12 spanBox">
|
||||
<span onclick="addBonus(this, 'AddLeavePayInput')" data-value="AddLeavePay" class="AddLeavePay btn bonusActive waves-effect waves-light bonusSpan"> مزد و مرخصی </span>
|
||||
</div>
|
||||
<div class="col-md-12 col-sm-12 col-xs-12 spanBox">
|
||||
<span onclick="addBonus(this, 'AddYearsPayInput')" class="AddYearsPay btn bonusActive waves-effect waves-light bonusSpan"> سنوات </span>
|
||||
</div>
|
||||
<div class="col-md-12 col-sm-12 col-xs-12 spanBox">
|
||||
<span onclick="addBonus(this, 'AddBonusesPayInput')" class="AddBonusesPay btn bonusActive waves-effect waves-light bonusSpan"> عیدی و پاداش </span>
|
||||
</div>
|
||||
<input type="checkbox" class="hiddenCheckbox" asp-for="AddLeavePay" id="AddLeavePayInput"/>
|
||||
<input type="checkbox" class="hiddenCheckbox" asp-for="AddYearsPay" id="AddYearsPayInput"/>
|
||||
<input type="checkbox" class="hiddenCheckbox" asp-for="AddBonusesPay" id="AddBonusesPayInput"/>
|
||||
</div>
|
||||
<div class="paymentDiv">
|
||||
<span onclick="addBonus(this, 'totalPayment')" data-value="totalPayment" class="totalPayment btn bonusActive waves-effect waves-light bonusSpan"> نمایش جمع تصفیه حساب </span>
|
||||
<input type="checkbox" asp-for="TotalPaymentHide" class="hiddenCheckbox" id="totalPayment"/>
|
||||
@* <div class="optional-wages d-flex">
|
||||
<div class="d-flex single-checkbox">
|
||||
<span class="options-type" style="width: 100%;">مجموع مبالغ تصفیه حساب در ذیل فرم نمایش داده شود</span>
|
||||
<a onclick="addPayment(this)" class="paymentTag totalActive" style="font-size: 30px;">
|
||||
<i class="ion-checkmark-circled" style="color: #20b723;"></i>
|
||||
</a>
|
||||
@if (Model.TotalPaymentHide)
|
||||
{
|
||||
<input type="checkbox" checked="checked" asp-for="TotalPaymentHide" class="hiddenCheckbox" id="totalPayment" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="checkbox" asp-for="TotalPaymentHide" class="hiddenCheckbox" id="totalPayment" />
|
||||
}
|
||||
</div>
|
||||
</div>*@
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
@* <div class="row inputs">
|
||||
<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
|
||||
<div class="optional-wages d-flex">
|
||||
<div class="d-flex single-checkbox">
|
||||
<span class="options-type" style="width: 100%;">مجموع مبالغ تصفیه حساب در ذیل فرم نمایش داده شود</span>
|
||||
<a onclick="addPayment(this)" class="paymentTag totalActive" style="font-size: 30px;">
|
||||
<i class="ion-checkmark-circled" style="color: #20b723;"></i>
|
||||
</a>
|
||||
@if(Model.TotalPaymentHide){
|
||||
<input type="checkbox" checked="checked" asp-for="TotalPaymentHide" class="hiddenCheckbox" id="totalPayment" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="checkbox" asp-for="TotalPaymentHide" class="hiddenCheckbox" id="totalPayment" />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="flex-box w-100">
|
||||
<h4 style="margin: auto;margin-top: 10%;" class="text-danger">
|
||||
شما مجوز دسترسی به این بخش را ندارید.
|
||||
</h4>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="row form" id="form3">
|
||||
@if (Model.PermissionIds != null && Model.PermissionIds.Contains(10324))
|
||||
{
|
||||
<div class="col-md-12 form3-boxes">
|
||||
<div class="col-md-6">
|
||||
<label class="form-control-label"><input type="checkbox" value="NormalList" class="myCheckbox checkboxes sendList"> ارسال لیست بیمه کارگاه عادی</label>
|
||||
<label class="form-control-label"><input type="checkbox" value="Govermentlist" class="myCheckbox checkboxes sendList">ارسال لیست بیمه کارگاه کمک دولت </label>
|
||||
<label class="form-control-label"><input type="checkbox" value="Familylist" class="myCheckbox checkboxes sendList"> ارسال لیست بیمه کارگاه خانوادگی</label>
|
||||
<input type="hidden" asp-for="TypeOfInsuranceSend" id="asp-hidden"/>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 disabled" id="myDiv4">
|
||||
<label class="form-control-label">کد کارگاهی بیمه</label>
|
||||
<input asp-for="InsuranceCode" type="text" placeholder="" class="form-control">
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 disabled" id="myDiv2">
|
||||
<label class="form-control-label"> ردیف پیمان</label>
|
||||
<input type="text" value="000" asp-for="AgreementNumber" class="form-control" id="zeros">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 form3-boxes disabled" id="myDiv">
|
||||
<div class="col-md-12" style="margin-bottom: 10px;">
|
||||
<label class="form-control-label"><input type="checkbox" asp-for="FixedSalary" class="myCheckbox2 checkboxes"> این کارگاه مشمول دستمزد مقطوع می باشد</label>
|
||||
</div>
|
||||
|
||||
<div class="disabled" id="myDiv3">
|
||||
<div class="col-md-8">
|
||||
<label class="form-control-label"> عنوان صنف و درجه / کد اقتصادی </label>
|
||||
<select class="select-city" id="jobName" asp-for="InsuranceJobId" asp-items='@Model.InsuranceJobViewModels'>
|
||||
<option value="" disabled selected> </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<label class="form-control-label"> جمعیت شهر </label>
|
||||
<select class="form-control" id="population" asp-for="Population">
|
||||
<option value="" disabled selected> </option>
|
||||
<option value="LessThan500">کمتر از 500000 نفر </option>
|
||||
<option value="MoreThan500">بیشتر از 500000 نفر</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="flex-box w-100">
|
||||
<h4 style="margin: auto;margin-top: 10%;" class="text-danger">
|
||||
شما مجوز دسترسی به این بخش را ندارید.
|
||||
</h4>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="form-footer-btns">
|
||||
<a class="btn btn-rounded" id="pre">مرحله قبل</a>
|
||||
<a class="btn btn-rounded" id="next">مرحله بعد</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-footer">
|
||||
<button class="btn btn-rounded" id="close" data-dismiss="modal">بستن</button>
|
||||
<button class=" btn btn-rounded" id="save">ذخیره</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<input type="hidden" id="isLegal"/>
|
||||
</form>
|
||||
</div>
|
||||
<script language="javascript" src="~/AdminTheme/js/city.js"></script>
|
||||
<script>
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
|
||||
contractDuration();
|
||||
checkContractDuration();
|
||||
checkBonus();
|
||||
|
||||
var aspValue = $("#asp-hidden").val();
|
||||
if (aspValue != "" || aspValue != undefined) {
|
||||
var checkbox = $(`input.myCheckbox[value="${aspValue}"]`);
|
||||
checkbox.prop("checked", true);
|
||||
}
|
||||
const myCheckbox = $('.myCheckbox');
|
||||
const myCheckbox2 = $('.myCheckbox2');
|
||||
const myDiv = $('#myDiv');
|
||||
const myDiv2 = $('#myDiv2');
|
||||
const myDiv3 = $('#myDiv3');
|
||||
const myDiv4 = $('#myDiv4');
|
||||
|
||||
if (myCheckbox.is(':checked')) {
|
||||
myDiv.removeClass('disabled');
|
||||
myDiv2.removeClass('disabled');
|
||||
myDiv4.removeClass('disabled');
|
||||
} else {
|
||||
myDiv.addClass('disabled');
|
||||
myDiv2.addClass('disabled');
|
||||
myDiv4.addClass('disabled');
|
||||
}
|
||||
if (myCheckbox2.is(':checked')) {
|
||||
myDiv3.removeClass('disabled');
|
||||
} else {
|
||||
myDiv3.addClass('disabled');
|
||||
}
|
||||
|
||||
|
||||
var aspValue = $("#asp-hidden").val();
|
||||
if (aspValue != "" || aspValue != undefined) {
|
||||
var checkbox = $(`input.myCheckbox[value="${aspValue}"]`);
|
||||
checkbox.prop("checked", true);
|
||||
}
|
||||
const aspValueContract = $("#asp-contract-hidden").val();
|
||||
if (aspValue != "" || aspValue != undefined) {
|
||||
const checkspan = $(`span.contractDuration[text="${aspValueContract}"]`);
|
||||
checkspan.addClass("contActive");
|
||||
}
|
||||
|
||||
const state = document.getElementById('state').value;
|
||||
const city = document.getElementById('hide3').value;
|
||||
iranwebsv(state);
|
||||
$(`#city option:contains("${city}")`).attr("selected", true);
|
||||
//$('#city option:contains(" ")').text(city);
|
||||
|
||||
|
||||
});
|
||||
|
||||
//مدت قرارداد
|
||||
$(".contractDuration").on('click',
|
||||
function() {
|
||||
if (!$(this).hasClass('contActive')) {
|
||||
$(".contractDuration").removeClass('contActive');
|
||||
$(this).removeClass('btn-deactive').addClass('contActive');
|
||||
}
|
||||
contractDuration();
|
||||
});
|
||||
|
||||
function contractDuration() {
|
||||
if ($(".contActive").text() == '1 ماهه') {
|
||||
$("#asp-contract-hidden").val(1);
|
||||
} else if ($(".contActive").text() == '2 ماهه') {
|
||||
$("#asp-contract-hidden").val(2);
|
||||
} else if ($(".contActive").text() == '3 ماهه') {
|
||||
$("#asp-contract-hidden").val(3);
|
||||
} else if ($(".contActive").text() == '6 ماهه') {
|
||||
$("#asp-contract-hidden").val(6);
|
||||
} else if ($(".contActive").text() == '1 ساله') {
|
||||
$("#asp-contract-hidden").val(12);
|
||||
} else if ($(".contActive").text() == 'دائمی') {
|
||||
$("#asp-contract-hidden").val("ForEver");
|
||||
}
|
||||
}
|
||||
|
||||
function checkContractDuration() {
|
||||
const aspValueContract = $("#asp-contract-hidden").val();
|
||||
if (aspValueContract != '' || aspValueContract != undefined) {
|
||||
if (aspValueContract == '1') {
|
||||
$('span.contractDuration:contains("1 ماهه")').removeClass('btn-deactive').addClass("contActive");
|
||||
} else if (aspValueContract == '2') {
|
||||
$('span.contractDuration:contains("2 ماهه")').removeClass('btn-deactive').addClass("contActive");
|
||||
} else if (aspValueContract == '3') {
|
||||
$('span.contractDuration:contains("3 ماهه")').removeClass('btn-deactive').addClass("contActive");
|
||||
} else if (aspValueContract == '6') {
|
||||
$('span.contractDuration:contains("6 ماهه")').removeClass('btn-deactive').addClass("contActive");
|
||||
} else if (aspValueContract == '12') {
|
||||
$('span.contractDuration:contains("12 ماهه")').removeClass('btn-deactive').addClass("contActive");
|
||||
} else if (aspValueContract == 'ForEver') {
|
||||
$('span.contractDuration:contains("دائمی")').removeClass('btn-deactive').addClass("contActive");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//عناوین فیش حقوقی
|
||||
function addBonus(element, id) {
|
||||
if ($(element).hasClass('bonusActive')) {
|
||||
$(element).addClass('bonusDeactive').removeClass('bonusActive');
|
||||
$(`#${id}`).removeAttr("checked");
|
||||
|
||||
} else {
|
||||
$(element).removeClass('bonusDeactive').addClass('bonusActive');
|
||||
$(`#${id}`).attr("checked", "checked");
|
||||
}
|
||||
$(`#${id}`).change();
|
||||
}
|
||||
|
||||
function checkBonus() {
|
||||
const AddLeavePay = $("#AddLeavePayInput").prop("checked");
|
||||
const AddYearsPay = $("#AddYearsPayInput").prop("checked");
|
||||
const AddBonusesPay = $("#AddBonusesPayInput").prop("checked");
|
||||
const totalPayment = $("#totalPayment").prop("checked");
|
||||
|
||||
if (AddLeavePay) {
|
||||
$(".AddLeavePay").removeClass('bonusDeactive').addClass('bonusActive');
|
||||
} else {
|
||||
$(".AddLeavePay").addClass('bonusDeactive').removeClass('bonusActive');
|
||||
}
|
||||
if (AddYearsPay) {
|
||||
$(".AddYearsPay").removeClass('bonusDeactive').addClass('bonusActive');
|
||||
} else {
|
||||
$(".AddYearsPay").addClass('bonusDeactive').removeClass('bonusActive');
|
||||
}
|
||||
if (AddBonusesPay) {
|
||||
$(".AddBonusesPay").removeClass('bonusDeactive').addClass('bonusActive');
|
||||
} else {
|
||||
$(".AddBonusesPay").addClass('bonusDeactive').removeClass('bonusActive');
|
||||
}
|
||||
if (totalPayment) {
|
||||
$(".totalPayment").removeClass('bonusDeactive').addClass('bonusActive');
|
||||
|
||||
} else {
|
||||
$(".totalPayment").addClass('bonusDeactive').removeClass('bonusActive');
|
||||
}
|
||||
//if (totalPayment) {
|
||||
// $(".paymentTag").removeClass('totalDeactive').addClass('totalActive');
|
||||
// $(".paymentTag").children().replaceWith('<i class="ion-checkmark-circled" style="color: #20b723"></i>');
|
||||
// // addPayment($(".paymentTag"));
|
||||
//} else {
|
||||
// $(".paymentTag").children().replaceWith('<i class="ion-close-circled" style="color: #dd3632"></i>');
|
||||
// $(".paymentTag").addClass('totalDeactive').removeClass('totalActive');
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
//مجموع مبالغ
|
||||
//function addPayment(element) {
|
||||
// if ($(element).hasClass('totalActive')) {
|
||||
// $(element).addClass('totalDeactive').removeClass('totalActive');
|
||||
// $("#totalPayment").prop("checked", false);
|
||||
// $(element).children().replaceWith('<i class="ion-close-circled" style="color: #dd3632"></i>');
|
||||
// } else {
|
||||
// $(element).removeClass('totalDeactive').addClass('totalActive');
|
||||
// $("#totalPayment").prop("checked", true);
|
||||
// $(element).children().replaceWith('<i class="ion-checkmark-circled" style="color: #20b723"></i>');
|
||||
// }
|
||||
// $("#totalPayment").change();
|
||||
//}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$("#save").click(function() {
|
||||
|
||||
var allInputsFilled = true;
|
||||
const selectElement = $('.EmployerIdList .select-city');
|
||||
const selectedOption = selectElement.find('option:selected');
|
||||
const selectedText = selectedOption.text();
|
||||
|
||||
const selectCity = $('#city.select-city');
|
||||
const selectedCityOption = selectCity.find('option:selected');
|
||||
$('#hide2').val(selectedCityOption.text());
|
||||
if (selectedText === "" || $(".notEmptyWorkshop").val() === '') {
|
||||
allInputsFilled = false;
|
||||
$('.EmployerIdList .select2-container').addClass('errored');
|
||||
$(".notEmptyWorkshop").addClass('errored');
|
||||
$('#fakeSave').hide();
|
||||
$('#save').show();
|
||||
} else {
|
||||
$(".notEmptyWorkshop").removeClass('errored');
|
||||
$('.EmployerIdList .select2-container').removeClass('errored');
|
||||
allInputsFilled = true;
|
||||
}
|
||||
|
||||
|
||||
if ($(".notEmptyArchive").val() === '') {
|
||||
allInputsFilled = false;
|
||||
$(".notEmptyArchive").addClass('errored');
|
||||
return;
|
||||
} else {
|
||||
$(".notEmptyArchive").removeClass('errored');
|
||||
allInputsFilled = true;
|
||||
}
|
||||
|
||||
if ($('.myCheckbox2').is(':checked') && $('#isLegal').val() == "false") {
|
||||
if ($('#population').val() == '' || $('#population').val() == null) {
|
||||
$('#population').addClass('errored');
|
||||
allInputsFilled = false;
|
||||
} else {
|
||||
$('#population').removeClass('errored');
|
||||
allInputsFilled = true;
|
||||
}
|
||||
if ($('#jobName').val() == null || $('#jobName').val() == '') {
|
||||
$('#jobName').next('span').addClass('errored');
|
||||
allInputsFilled = false;
|
||||
} else {
|
||||
$('#jobName').next('span').removeClass('errored');
|
||||
allInputsFilled = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//var criteria = [true, false];
|
||||
//var hasError=false;
|
||||
//let found = containsAll(criteria,isLegalList);
|
||||
//if(found){
|
||||
// $('#EmployerIdList').next('span').addClass('errored');
|
||||
// $.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', "امکان انتخاب کارفرمای حقیقی و حقوقی به دلیل موانع قانونی در نرم افزار بصورت همزمان امکان پذیر نمی باشد");
|
||||
//}
|
||||
//else
|
||||
if ($('.errored').length > 0) {
|
||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', "لطفا موارد اجباری را تکمیل کنید.");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function getZone() {
|
||||
const y = document.getElementById('city');
|
||||
const cityValue = y.options[y.selectedIndex].text;
|
||||
|
||||
document.getElementById('hide2').value = cityValue;
|
||||
|
||||
const cityId = document.getElementById("city").value;
|
||||
$('#select-button').empty().append('<option selected="selected" value="0" >انتخاب محله</option>');
|
||||
if (cityId != null) {
|
||||
|
||||
$.ajax({
|
||||
//contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: '@Url.Page("./Index", "ZonelistLoad")',
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
data: { "cityId": cityId },
|
||||
|
||||
success: function(response) {
|
||||
|
||||
$.each(response.zoneList,
|
||||
function(i, item) {
|
||||
$('#select-button').append($('<option>',
|
||||
{
|
||||
value: item.zoneName,
|
||||
text: item.zoneName
|
||||
}));
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
failure: function(response) {
|
||||
console.log(5, response);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(".EmployerIdList .select2-container").addClass('notEmpty ');
|
||||
$('.activated').prop('checked', true);
|
||||
|
||||
$(function() {
|
||||
$('#edit-modal [data-parent-modal]').on('click',
|
||||
function(e) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
const parentModalId = $(this).data('parent-modal');
|
||||
$(parentModalId).modal('hide');
|
||||
});
|
||||
});
|
||||
$(function() {
|
||||
$('.addNeighbor').on('click',
|
||||
function(e) {
|
||||
e.preventDefault();
|
||||
$('#edit-modal').modal('show');
|
||||
});
|
||||
});
|
||||
$("#edit-modal").on('hidden.bs.modal',
|
||||
function() {
|
||||
$('body').addClass('modal-open');
|
||||
});
|
||||
|
||||
$('.sendList').click(function() {
|
||||
if ($(this).is(':checked')) {
|
||||
$('.sendList').not(this).prop('checked', false);
|
||||
}
|
||||
});
|
||||
|
||||
const myCheckbox = $('.myCheckbox');
|
||||
const myCheckbox2 = $('.myCheckbox2');
|
||||
const myDiv = $('#myDiv');
|
||||
const myDiv2 = $('#myDiv2');
|
||||
const myDiv3 = $('#myDiv3');
|
||||
const myDiv4 = $('#myDiv4');
|
||||
|
||||
myCheckbox.on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked') && $('#isLegal').val() == "false") {
|
||||
myDiv.removeClass('disabled');
|
||||
} else {
|
||||
myDiv.addClass('disabled');
|
||||
}
|
||||
});
|
||||
|
||||
myCheckbox.on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked')) {
|
||||
myDiv2.removeClass('disabled');
|
||||
} else {
|
||||
myDiv2.addClass('disabled');
|
||||
}
|
||||
});
|
||||
myCheckbox2.on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked')) {
|
||||
myDiv3.removeClass('disabled');
|
||||
} else {
|
||||
myDiv3.addClass('disabled');
|
||||
}
|
||||
});
|
||||
myCheckbox.on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked')) {
|
||||
myDiv4.removeClass('disabled');
|
||||
} else {
|
||||
myDiv4.addClass('disabled');
|
||||
}
|
||||
});
|
||||
$(".myCheckbox").on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked')) {
|
||||
$("#asp-hidden").val($(this).val());
|
||||
} else {
|
||||
$("#asp-hidden").val('');
|
||||
$("#InsuranceCode").val('');
|
||||
}
|
||||
});
|
||||
|
||||
$("#pre").css({ 'box-shadow': 'none' });
|
||||
$("#next").click(function() {
|
||||
|
||||
var allInputsFilled = true;
|
||||
const selectElement = $('.EmployerIdList .select-city');
|
||||
const selectedOption = selectElement.find('option:selected');
|
||||
const selectedText = selectedOption.text();
|
||||
|
||||
if (selectedText === "" || $(".notEmptyWorkshop").val() === '') {
|
||||
allInputsFilled = false;
|
||||
$('.EmployerIdList .select2-container').addClass('errored');
|
||||
$(".notEmptyWorkshop").addClass('errored');
|
||||
$('#fakeSave').hide();
|
||||
$('#save').show();
|
||||
return;
|
||||
} else {
|
||||
$(".notEmptyWorkshop").removeClass('errored');
|
||||
$('.EmployerIdList .select2-container').removeClass('errored');
|
||||
allInputsFilled = true;
|
||||
}
|
||||
|
||||
|
||||
if ($(".notEmptyArchive").val() === '') {
|
||||
allInputsFilled = false;
|
||||
$(".notEmptyArchive").addClass('errored');
|
||||
return;
|
||||
} else {
|
||||
$(".notEmptyArchive").removeClass('errored');
|
||||
allInputsFilled = true;
|
||||
}
|
||||
|
||||
if (!allInputsFilled) {
|
||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', "لطفا موارد اجباری را تکمیل کنید.");
|
||||
} else {
|
||||
if ($('#form3').css('right') == '0px') {
|
||||
$("#next").css({
|
||||
'background-color': "#c7c0c0ba",
|
||||
'color': '#000000b8',
|
||||
'box-shadow': 'none'
|
||||
});
|
||||
} else if ($('#form2').css('left') == '1200px') {
|
||||
$("#pre").css({
|
||||
'background-color': "white",
|
||||
'color': '#0f9500',
|
||||
'box-shadow': '0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)'
|
||||
});
|
||||
$("#progress").css({
|
||||
'width': '66.66%'
|
||||
|
||||
});
|
||||
$("#form1").css({
|
||||
right: '1200px'
|
||||
});
|
||||
$("#form2").css({
|
||||
left: '0'
|
||||
});
|
||||
|
||||
} else if ($('#form2').css('left') == '0px') {
|
||||
$("#next").css({
|
||||
'background-color': "#c7c0c0ba",
|
||||
'color': '#000000b8',
|
||||
'box-shadow': 'none'
|
||||
});
|
||||
$("#pre").css({
|
||||
'background-color': "white",
|
||||
'color': '#0f9500',
|
||||
'box-shadow': '0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)'
|
||||
});
|
||||
$("#progress").css({
|
||||
'width': '100%',
|
||||
'border-top-right-radius': '7px'
|
||||
});
|
||||
$("#form2").css({
|
||||
left: '1200px'
|
||||
});
|
||||
$("#form3").css({
|
||||
right: '0'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#pre").click(function() {
|
||||
$("#next").css({
|
||||
'background-color': "white",
|
||||
'color': '#1763b1'
|
||||
});
|
||||
if ($('#form2').css('left') == '1200px' && $('#form3').css('right') == '1200px') {
|
||||
$("#pre").css({
|
||||
'background-color': "#c7c0c0ba",
|
||||
'color': '#000000b8',
|
||||
'box-shadow': 'none'
|
||||
});
|
||||
|
||||
} else if ($('#form2').css('left') == '0px') {
|
||||
$("#progress").css({
|
||||
'width': '33.33%',
|
||||
'border-top-right-radius': '0px'
|
||||
});
|
||||
$("#pre").css({
|
||||
'background-color': "#c7c0c0ba",
|
||||
'color': '#000000b8',
|
||||
'box-shadow': 'none'
|
||||
});
|
||||
$("#form2").css({
|
||||
left: '1200px'
|
||||
});
|
||||
$("#form1").css({
|
||||
right: 'initial'
|
||||
});
|
||||
|
||||
} else if ($('#form3').css('right') == '0px') {
|
||||
$("#progress").css({
|
||||
'width': '66.66%',
|
||||
'border-top-right-radius': '0px'
|
||||
});
|
||||
$("#pre").css({
|
||||
'background-color': "white",
|
||||
'color': '#0f9500',
|
||||
'box-shadow': '0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)'
|
||||
});
|
||||
$("#form2").css({
|
||||
left: '0'
|
||||
});
|
||||
$("#form3").css({
|
||||
right: '1200px'
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
getEmployer(@Model.EmployerIdList[0]);
|
||||
});
|
||||
|
||||
|
||||
var isLegalList = [];
|
||||
|
||||
function getEmployer(employerId) {
|
||||
//console.log(employerId);
|
||||
if (employerId !== null && employerId != '') {
|
||||
$.ajax({
|
||||
/* contentType: 'charset=utf-8',*/
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: '@Url.Page("/Company/Workshops/Index", "GetEmployerName")',
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
data: { "employerId": employerId },
|
||||
success: function(response) {
|
||||
|
||||
if ((response.isLegal && response.nationalId == '') || (!response.isLegal && response.nationalcode == '')) {
|
||||
swal({
|
||||
title: (response.isLegal ? "کارفرمای انتخاب شده شناسه ملی ندارد." : " کارفرمای انتخاب شده کد ملی ندارد."),
|
||||
text: (response.isLegal ? "در صورت تمایل به درج شناسه ملی به منوی کارفرما مراجعه نمایید." : "در صورت تمایل به درج کد ملی به منوی کارفرما مراجعه نمایید."),
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
//confirmButtonText: "بستن",
|
||||
cancelButtonText: "بستن",
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: true,
|
||||
customClass: "errorSwall"
|
||||
});
|
||||
$('#EmployerIdList option').filter(`[value="${employerId}"]`).remove();
|
||||
const option = new Option(response.lName, employerId);
|
||||
$("#EmployerIdList").append(option);
|
||||
$("#EmployerIdList").trigger("change");
|
||||
} else {
|
||||
$('#isLegal').val(response.isLegal);
|
||||
isLegalList.push(response.isLegal);
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
failure: function(response) {
|
||||
console.log(5, response);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function containsAll(needles, haystack) {
|
||||
for (let i = 0; i < needles.length; i++) {
|
||||
if ($.inArray(needles[i], haystack) == -1) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
</script>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,601 +0,0 @@
|
||||
@using _0_Framework.Application
|
||||
@model CompanyManagment.App.Contracts.Checkout.CreateCheckout
|
||||
@{
|
||||
|
||||
<style>
|
||||
.sendSelectDate {
|
||||
border-color: #ff4e4e !important;
|
||||
background-color: #ffe4e4 !important;
|
||||
}
|
||||
.modal-dialog {
|
||||
width: 40% !important;
|
||||
}
|
||||
.modal-header{
|
||||
border-bottom: 0;
|
||||
}
|
||||
.panel-default > .panel-heading {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.modal .modal-dialog .modal-content {
|
||||
height: auto !important;
|
||||
min-height: auto !important;
|
||||
}
|
||||
@@media (min-width: 1500px) {
|
||||
.modal-dialog {
|
||||
width: 35% !important;
|
||||
}
|
||||
}
|
||||
@@media (max-width: 1200px) {
|
||||
.modal-dialog {
|
||||
width: 60% !important;
|
||||
}
|
||||
}
|
||||
@@media (max-width: 768px) {
|
||||
.modal-dialog {
|
||||
width: 90% !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@media (max-width: 500px) {
|
||||
#thh th, td {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
#datatable.changeCode th{
|
||||
font-size: 13px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.select2-container {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
border-top: unset !important;
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content .modal-footer {
|
||||
padding-top: unset !important;
|
||||
}
|
||||
|
||||
/* p {
|
||||
direction: ltr !important;
|
||||
text-align: right !important;
|
||||
}*/
|
||||
|
||||
input[type=radio]:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: #dfdfdf;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: brown;
|
||||
border-radius: 5px;
|
||||
}
|
||||
/* .se .select2-container {
|
||||
width: 75% !important;
|
||||
}*/
|
||||
|
||||
/* .se .select2-container--default .select2-selection--single {
|
||||
border-radius: 0px 22px 22px 0px !important;
|
||||
border: 1px solid #a5a3a3 !important;
|
||||
}*/
|
||||
|
||||
hr {
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
border-top: 1px solid #d3d3d3;
|
||||
}
|
||||
|
||||
.checkbox + .checkbox, .radio + .radio {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
|
||||
.radio {
|
||||
margin-top: 0px !important;
|
||||
}
|
||||
/* .radio {
|
||||
margin: 5px 20px 5px 20px !important;
|
||||
}*/
|
||||
/* .form-control {
|
||||
width: 75% !important;
|
||||
display: inline-block;
|
||||
}
|
||||
*/
|
||||
/*----------------------------*/
|
||||
#EmployerFullName table {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
#EmployerFullName th, td {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
#EmployerFullName td:nth-child(odd) {
|
||||
border-bottom: 1px solid #fff;
|
||||
background-color: #bed3ca;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#EmployerFullName tr:hover {
|
||||
background-color: rgb(108, 186, 250);
|
||||
}
|
||||
#datatable.changeCode {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
border-collapse: separate;
|
||||
table-layout: fixed;
|
||||
overflow-y: scroll;
|
||||
max-width: 100%;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#datatable.changeCode thead tr th:nth-child(1) {
|
||||
border-top-right-radius: 10px;
|
||||
}
|
||||
|
||||
#datatable.changeCode thead tr th:last-child {
|
||||
border-top-left-radius: 10px;
|
||||
}
|
||||
|
||||
#datatable.changeCode tbody td.last-row-last-child {
|
||||
border-bottom-left-radius: 10px;
|
||||
}
|
||||
#datatable.changeCode tbody td.last-row-first-child {
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
|
||||
#datatable.changeCode th, td {
|
||||
padding: 10px 20px;
|
||||
}
|
||||
|
||||
#datatable.changeCode td {
|
||||
font-weight: normal;
|
||||
color: black;
|
||||
border: 1px solid #c7c7c7;
|
||||
}
|
||||
|
||||
#datatable.changeCode th {
|
||||
background-color: #5a5959;
|
||||
color: white;
|
||||
text-align: center;
|
||||
font-size: 15px !important;
|
||||
}
|
||||
|
||||
#datatable.changeCode td:nth-child(odd) {
|
||||
border-left: 1px solid #fff;
|
||||
width: 40%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#datatable.changeCode td:nth-child(even) {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#datatable.changeCode th {
|
||||
border-left: 1px solid #fff;
|
||||
}
|
||||
|
||||
#datatable.changeCode tr:nth-child(even) {
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.pCode {
|
||||
text-align: center;
|
||||
border-radius: 7px;
|
||||
background-color: #e9e9e9;
|
||||
border: 2px solid #bfbfbf;
|
||||
color: #444444;
|
||||
height: 24px;
|
||||
width: 50% !important;
|
||||
margin: auto;
|
||||
}
|
||||
#datatable.changeCode tr {
|
||||
background-color: rgb(224, 227, 228);
|
||||
}
|
||||
|
||||
#datatable.changeCode tr:hover {
|
||||
background-color: rgb(152 154 155);
|
||||
}
|
||||
.buttonInside {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#btnOk {
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
top: 32px;
|
||||
padding: 6px;
|
||||
color: #464646 !important;
|
||||
border-radius: 8px 0px 0px 8px;
|
||||
border-top: 0px;
|
||||
border-bottom: 0px;
|
||||
border-left: 0px;
|
||||
background-color: #ededed;
|
||||
border-color: #c9c4c4;
|
||||
font-size: 11px;
|
||||
font-family: 'IranSans' !important;
|
||||
}
|
||||
|
||||
.final {
|
||||
background: #0f9500;
|
||||
border: #0f9500;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
@{
|
||||
|
||||
<script src="~/lib/jquery-ajax-unobtrusive/jquery.unobtrusive-ajax.min.js"></script>
|
||||
<script src="~/adminTheme/assets/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="~/adminTheme/assets/datatables/dataTables.bootstrap.js"></script>
|
||||
<script src="~/lib/select2/js/select2.js"></script>
|
||||
<script src="~/lib/select2/js/i18n/fa.js"></script>
|
||||
<link href="~/AdminTheme/assets/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="~/lib/select2/css/select2.css" rel="stylesheet" />
|
||||
}
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close pull-right" data-dismiss="modal" aria-hidden="true"><span style="font-size: 24px">×</span></button>
|
||||
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert;">
|
||||
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 150px; text-align: center;"> ویرایش کد پرسنلی </legend>
|
||||
|
||||
<form id="my_form" asp-page="./Index" asp-page-handler="ChangeCode" autocomplete="off"
|
||||
method="get"
|
||||
data-ajax="true"
|
||||
data-ajax-method="get"
|
||||
data-ajax-update="#panel"
|
||||
data-ajax-mode="replace"
|
||||
data-ajax-url="@Url.Page("./Index","LoadContracts")">
|
||||
|
||||
<div id="progress-bar" class="progress" style="display: none;">
|
||||
<div style="background-color: #28a711" class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-lg-12 col-xs-12 right">
|
||||
<div class="col-md-6 col-sm-6 col-lg-6 col-xs-12">
|
||||
<label> نام کارگاه </label>
|
||||
<div class="form-group se" dir="rtl">
|
||||
<div class="form-control"> @Model.WorkshopName</div>
|
||||
<input type="hidden" asp-for="WorkshopId" value="@Model.WorkshopId"/>
|
||||
@*<a class="btn btn-info btn-rounded waves-effect waves-light" style="border-bottom-right-radius: 0px; border-top-right-radius: 0px; background-color: #257212; border-color: #545353; font-size: 14px; margin-right: -3px; font-family: 'IranSans' !important;" onclick="show()">تایید</a>*@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-lg-6 col-xs-12">
|
||||
<label>نام پرسنل</label>
|
||||
<div id="person">
|
||||
<div class="form-group se person" dir="rtl">
|
||||
<select id="getPersonnel" class="form-control select-city" asp-for="EmployeeId" >
|
||||
<option value="0"> انتخاب پرسنل </option>
|
||||
@foreach (var item in Model.EmployeeList)
|
||||
{
|
||||
<option value="@item.Id"> @item.EmployeeFullName </option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<span asp-validation-for="EmployeeId" class="error"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" dir="rtl">
|
||||
<div class="col-md-1 pull-left">
|
||||
@* <a class="btn btn-success btn-rounded waves-effect waves-light" onclick="sendData()" style="float: left;">انتخاب</a>*@
|
||||
<input type="submit" form="my_form" value="Search" name="Search" id="select" style="display: none" />
|
||||
</div>
|
||||
<div class="col-md-11">
|
||||
<span id="montAndYearError"></span>
|
||||
</div>
|
||||
</div>
|
||||
<hr style=" margin-top: 12px;margin-bottom: 12px;" />
|
||||
</form>
|
||||
<form asp-page="./Index" asp-page-handler="ChangeCode" autocomplete="off" id="changeCodeForm"
|
||||
method="post"
|
||||
data-ajax="true"
|
||||
data-ajax-method="post"
|
||||
data-ajax-url="@Url.Page("./Index","Check")"
|
||||
data-callback=""
|
||||
data-action="Refresh">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="panel panel-default" style="border-radius: 10px;">
|
||||
<div class="panel-heading" style="border-radius: 10px;">
|
||||
<h3 class="panel-title"><i class="fa fa-list" style="padding-left: 3px; font-size: 14px"></i> لیست شماره پرسنلی </h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-sm-12 col-xs-12">
|
||||
<table id="datatable" class="table table-striped changeCode" style="direction: rtl">
|
||||
<thead style="background-color: #ecefee">
|
||||
<tr>
|
||||
<th style="width: 20px;" class="sizeSet">#</th>
|
||||
<th class="sizeSet decorCheckbox">
|
||||
<input class="checkboxtitle" type="checkbox" id="checkSelect1" disabled="disabled" />
|
||||
</th>
|
||||
<th class="sizeSet">شماره پرسنلی</th>
|
||||
<th class="sizeSet"> پرسنل </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="panel">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" id="sendWId" name="workshopId" />
|
||||
<div id="listOfContract" style="display: none">
|
||||
</div>
|
||||
@*<input type="hidden" asp-for="id" value="id"/>*@
|
||||
<div class="modal-footer m-b-10">
|
||||
<a href="#" onclick="final()" class="btn btn-success btn-rounded waves-effect waves-light pull-left final">ثبت نهایی</a>
|
||||
<button type="button" class="btn btn-default btn-rounded waves-effect waves-light pull-left m-b-5" data-dismiss="modal">بستن</button>
|
||||
<input type="submit" id="sendFinaly" form="sub" value="fine" name="fine" style="display: none" />
|
||||
</div>
|
||||
</form>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
|
||||
@Html.AntiForgeryToken()
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$(".select-city2").select2({
|
||||
language: "fa",
|
||||
dir: "rtl"
|
||||
});
|
||||
$('.final').attr('disabled', 'disabled');
|
||||
$('.final').css("background-color", "gray");
|
||||
$('.byStep').attr('disabled', 'disabled');
|
||||
$('.byStep').css("background-color", "unset");
|
||||
$('.byStepButton').attr('disabled', 'disabled');
|
||||
$('.byStepButton').css("background-color", "gray");
|
||||
sendData();
|
||||
});
|
||||
function sendData() {
|
||||
$('.formStep').remove();
|
||||
$('.ConvertErr').remove();
|
||||
$('#convertError').append(
|
||||
|
||||
'<input type="hidden" class="formStep" value="select" name="FormStep"/>'
|
||||
);
|
||||
$('#select').click();
|
||||
$('.byStep').removeAttr('disabled');
|
||||
$('.byStepButton').removeAttr('disabled');
|
||||
$('.byStep').css({ 'background-color': '' });
|
||||
$('.byStepButton').css({ 'background-color': '' });
|
||||
$('.final').removeAttr('disabled');
|
||||
$('.final').css({ "background-color": '' });
|
||||
|
||||
//} else {
|
||||
// $.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " انتخاب کارگاه اجباری است ");
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function final() {
|
||||
|
||||
//$('.final').attr('disabled', 'disabled');
|
||||
//$('.final').css("background-color", "gray");
|
||||
//$('.byStep').attr('disabled', 'disabled');
|
||||
//$('.byStep').css("background-color", "unset");
|
||||
//$('.byStepButton').attr('disabled', 'disabled');
|
||||
//$('.byStepButton').css("background-color", "gray");
|
||||
//$('#sub').on('submit', function(e) {
|
||||
// e.preventDefault();
|
||||
//});
|
||||
$('.item1').remove();
|
||||
const wId =@Model.WorkshopId; //document.getElementById("getWorkshopWithName").value;
|
||||
var checkboxId = document.getElementsByName("cheking");
|
||||
var personnelCodeChange = document.getElementsByClassName("pCode");
|
||||
//var listArray = [];
|
||||
//for (var j = 0, p = personnelCodeChange[j].length; j < p; j++) {
|
||||
// console.log(personnelCodeChange[j].name);
|
||||
//}
|
||||
$('#panel tr td').append(
|
||||
'<input class="item1" type="hidden" value="' + wId + '" name="WorkshopId"/>'
|
||||
);
|
||||
for (var i = 0, n = checkboxId.length; i < n; i++) {
|
||||
if (checkboxId[i].checked) {
|
||||
|
||||
let pname = checkboxId[i].value;
|
||||
let inputElement = document.querySelector('input[name="' + pname + '"]');
|
||||
|
||||
$('#panel tr td').append(
|
||||
|
||||
'<input class="item1" type="hidden" value="' + pname + '" name="Contracts[' + i + '].EmployeeId"/>'
|
||||
+ '<input class="item1" type="hidden" value="' + inputElement.value + '" name="Contracts[' + i + '].PersonnelCode"/>'
|
||||
);
|
||||
|
||||
} else {
|
||||
$('#panel tr td').append(
|
||||
|
||||
'<input class="item1" type="hidden" value="' + 0 + '" name="Contracts[' + i + '].EmployeeId"/>'
|
||||
+ '<input class="item1" type="hidden" value="' + 0 + '" name="Contracts[' + i + '].PersonnelCode"/>'
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
if (checkboxId.length > 0) {
|
||||
|
||||
$('#changeCodeForm').submit();
|
||||
|
||||
} else {
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "هیچ پرسنلی برای ویرایش انتخاب نشده است");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$('#changeCodeForm').submit(function (e) {
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: $(this).attr('action'),
|
||||
data: $(this).serialize(),
|
||||
success: function (response) {
|
||||
if (response.isSuccedded == true) {
|
||||
$.Notification.autoHideNotify('success', 'top right', response.message);
|
||||
$('#select').click();
|
||||
getEmployeeList();
|
||||
$("#MainModal").modal('hide');
|
||||
}
|
||||
else {
|
||||
$.Notification.autoHideNotify('error', 'top right', response.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
function loadWorkshopWithName() {
|
||||
/* loadPersonnel();*/
|
||||
const nameId = document.getElementById("getWorkshopWithName").value;
|
||||
const nameIndex = document.getElementById("getWorkshopWithName");
|
||||
|
||||
|
||||
var myArray = document.getElementById('getWorkshopWithName').options.selectedIndex;
|
||||
//document.getElementById("getWorkshopWithCode").options.selectedIndex = myArray;
|
||||
//var codeId = document.getElementById("getWorkshopWithCode");
|
||||
//var archiveCodee = codeId.options[codeId.selectedIndex];
|
||||
|
||||
//document.getElementById("select2-getWorkshopWithCode-container").innerHTML = archiveCodee.text;
|
||||
|
||||
|
||||
$('#getPersonnel').empty().append('<option selected="selected" value="0" >انتخاب پرسنل</option>');
|
||||
|
||||
// $('#archiveCode').val(archiveCodee.text);
|
||||
|
||||
|
||||
if (nameId != "WorkshopIds") {
|
||||
$.ajax({
|
||||
//contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: '@Url.Page("/Company/Contracts/Index", "LoadWorkshops")',
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
data: { "id": nameId },
|
||||
|
||||
success: function(response) {
|
||||
var items2 = [];
|
||||
|
||||
$.each(response,
|
||||
function(key, val) {
|
||||
items2.push({ id: key, vall: val });
|
||||
|
||||
});
|
||||
|
||||
|
||||
//document.getElementById("InsurancCode").innerHTML = items2[1].vall;
|
||||
|
||||
|
||||
$.each(response.employeeList, function(i, item)
|
||||
{
|
||||
$('#getPersonnel').append($('<option>',
|
||||
{
|
||||
value: item.id,
|
||||
text: item.employeeFullName
|
||||
}));
|
||||
});
|
||||
|
||||
|
||||
},
|
||||
failure: function(response) {
|
||||
console.log(5, response);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function loadWorkshopWithCode() {
|
||||
|
||||
var myArray = document.getElementById('getWorkshopWithCode').options.selectedIndex;
|
||||
document.getElementById("getWorkshopWithName").options.selectedIndex = myArray;
|
||||
var getNameId = document.getElementById("getWorkshopWithName");
|
||||
var getWithName = getNameId.options[getNameId.selectedIndex];
|
||||
|
||||
document.getElementById("select2-getWorkshopWithName-container").innerHTML = getWithName.text;
|
||||
|
||||
loadWorkshopWithName();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function loadPersonnel() {
|
||||
const id = document.getElementById("getPersonnel").value;
|
||||
const workshopId = document.getElementById("getWorkshopWithName").value;
|
||||
|
||||
if (workshopId == "WorkshopIds") {
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ',"ابتدا کارگاه را انتخاب نمایید");
|
||||
}
|
||||
|
||||
if (id > 0 && workshopId != "WorkshopIds") {
|
||||
$.ajax({
|
||||
//contentType: 'application/json; charset=utf-8',
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: '@Url.Page("/Company/Contracts/Index", "LoadPersonel")',
|
||||
headers: { "RequestVerificationToken": $('input[name="__RequestVerificationToken"]').val() },
|
||||
data: { "id": id, "workshopId": workshopId },
|
||||
|
||||
success: function (response) {
|
||||
var items2 = [];
|
||||
$.each(response, function (key, val) {
|
||||
items2.push({ id: key, vall: val });
|
||||
|
||||
});
|
||||
//if (items2[8].vall == "")
|
||||
// $.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ',"ابتدا تاریخ شروع به کار را در بخش پرسنل <br/>برای این شخص و کارگاه مورد نظر ایجاد نموده و سپس اقدام به ایجاد قرارداد نمایید");
|
||||
//document.getElementById("FatherName").innerHTML = items2[1].vall;
|
||||
//document.getElementById("PersonnelNationalCode").innerHTML = items2[2].vall;
|
||||
|
||||
|
||||
|
||||
},
|
||||
failure: function (response) {
|
||||
console.log(5, response);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,247 +0,0 @@
|
||||
@model CompanyManagment.App.Contracts.Leave.EditLeave
|
||||
@{
|
||||
|
||||
//int i = 1;
|
||||
|
||||
|
||||
}
|
||||
@{
|
||||
<style>
|
||||
.panel-title {
|
||||
font-size: 14px;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 0;
|
||||
margin-top: 0;
|
||||
padding: 5px 7px 5px 7px;
|
||||
}
|
||||
|
||||
.rad {
|
||||
border-radius: 8px !important;
|
||||
/* padding: 10px; */
|
||||
padding: 2px 5px 0px 5px;
|
||||
}
|
||||
|
||||
.faSize {
|
||||
font-size: 22px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<link href="~/AdminTheme/assets/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<form asp-page="./Index" asp-page-handler="EditPaidLeave" autocomplete="off"
|
||||
method="post"
|
||||
data-ajax="true"
|
||||
data-callback=""
|
||||
data-action="ReloadPaidLeave">
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert">
|
||||
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 150px; text-align: center;"> مرخصی استحقاقی </legend>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<fieldset style="border: 1px solid #c3c3c3; background-color: #ddd; border-radius: 10px; padding: 5px 0 5px 0; margin-bottom: 10px; ">
|
||||
<div class="form-group">
|
||||
<div class="col-md-4" style="margin-top: 3px">
|
||||
نوع مرخصی <span style="color: red">*</span>
|
||||
</div>
|
||||
<div class="col-md-4" id="roozaneh">
|
||||
روزانه <input class="roozane" type="radio" value="روزانه" asp-for="PaidLeaveType">
|
||||
|
||||
</div>
|
||||
<div class="col-md-4" id="saati">
|
||||
ساعتی <input class="saati" type="radio" value="ساعتی" asp-for="PaidLeaveType">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
<span asp-validation-for="PaidLeaveType" class="error"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row m-t-10">
|
||||
<div class="col-md-5">
|
||||
<div class="form-group m-b-0" dir="rtl">
|
||||
<label asp-for="StartLeave" class="control-label m-r-5">تاریخ شروع مرخصی</label>
|
||||
<input id="startLeave" dir="ltr" maxlength="10" style="text-align: center" class="form-control persianDateInputb" onchange="validDate(this);" asp-for="StartLeave" />
|
||||
|
||||
<span asp-validation-for="StartLeave" class="error"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="form-group m-b-0" dir="rtl">
|
||||
<label asp-for="EndLeave" class="control-label m-r-5">تاریخ پایان مرخصی</label>
|
||||
<input id="endLeave" dir="ltr" maxlength="10" style="text-align: center" class="form-control persianDateInputb" onchange="validDate(this);" asp-for="EndLeave" />
|
||||
|
||||
<span asp-validation-for="EndLeave" class="error"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group m-b-0" dir="rtl">
|
||||
<label asp-for="LeaveHourses" class="control-label m-r-5">ساعت</label>
|
||||
<input id="hours" dir="ltr" maxlength="2" style="text-align: center" class="form-control persianDateInputb" asp-for="LeaveHourses" />
|
||||
|
||||
<span asp-validation-for="LeaveHourses" class="error"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<input type="hidden" asp-for="Id" value="@Model.Id" />
|
||||
<input type="hidden" asp-for="EmployeeId" />
|
||||
@* <input type="hidden" asp-for="WorkshopId" />*@
|
||||
<div class="modal-footer">
|
||||
|
||||
<button type="submit" class="btn btn-success btn-rounded waves-effect waves-light">ذخیره</button>
|
||||
|
||||
<a href="#showmodal=@Url.Page("/Company/Contracts/Index", "CreatePaidLeave", new { employeeId = @Model.EmployeeId, hd = 1 })" class="btn btn-default btn-rounded waves-effect waves-light m-b-5"> بازگشت</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<script src="~/adminTheme/assets/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="~/adminTheme/assets/datatables/dataTables.bootstrap.js"></script>
|
||||
<script>
|
||||
|
||||
|
||||
$(document).ready(
|
||||
function () {
|
||||
var saati = $('input:radio[class="saati"]');
|
||||
var roozane = $('input:radio[class="roozane"]');
|
||||
if ($(roozane).is(':checked') && $(roozane).val() == 'روزانه') {
|
||||
|
||||
$("#hours").val('');
|
||||
$("#hours").attr("disabled", "disabled");
|
||||
$("#endLeave").removeAttr("disabled");
|
||||
$("#saati").css("visibility", "hidden");
|
||||
} else if ($(saati).is(':checked') && $(saati).val() == 'ساعتی') {
|
||||
|
||||
$("#endLeave").val('');
|
||||
$("#endLeave").attr("disabled", "disabled");
|
||||
$("#hours").removeAttr("disabled");
|
||||
$("#roozaneh").css("visibility", "hidden");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
function validDate(inputField) {
|
||||
|
||||
var persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
|
||||
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
|
||||
fixNumbers = function (str) {
|
||||
if (typeof str === 'string') {
|
||||
for (var i = 0; i < 10; i++) {
|
||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
};
|
||||
let getdate = inputField.value;
|
||||
|
||||
var m1, m2;
|
||||
var y1, y2, y3, y4;
|
||||
var d1, d2;
|
||||
var s1, s2;
|
||||
for (var i = 0; i < getdate.length; i++) {
|
||||
if (i === 0) {
|
||||
y1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 1) {
|
||||
y2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 2) {
|
||||
y3 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 3) {
|
||||
y4 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 4) {
|
||||
s1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 5) {
|
||||
m1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 6) {
|
||||
m2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 7) {
|
||||
s2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 8) {
|
||||
d1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 9) {
|
||||
d2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
|
||||
}
|
||||
var yRes = y1 + y2 + y3 + y4;
|
||||
var year = parseInt(yRes);
|
||||
var mRes = m1 + m2;
|
||||
var month = parseInt(mRes);
|
||||
var dRes = d1 + d2;
|
||||
var day = parseInt(dRes);
|
||||
var FixResult = yRes + s1 + mRes + s2 + dRes;
|
||||
|
||||
|
||||
var isValid = /^([1][3-4][0-9][0-9][/])([0][1-9]|[1][0-2])([/])([0][1-9]|[1-2][0-9]|[3][0-1])$/.test(FixResult);
|
||||
|
||||
|
||||
if (isValid) {
|
||||
inputField.style.backgroundColor = '#a6e9a6';
|
||||
$("button[type=submit]").attr('disabled', false);
|
||||
validCheck = true;
|
||||
|
||||
} else {
|
||||
inputField.style.backgroundColor = '#f94c4c';
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "لطفا تاریخ را بصورت صحیح وارد کنید");
|
||||
$("button[type=submit]").attr('disabled', true);
|
||||
validCheck = false;
|
||||
|
||||
}
|
||||
return validCheck;
|
||||
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
setTimeout(function () {
|
||||
|
||||
window.location.hash = "##";
|
||||
}, 1000);
|
||||
});
|
||||
</script>
|
||||
@@ -1,366 +0,0 @@
|
||||
@model CompanyManagment.App.Contracts.Leave.EditLeave
|
||||
|
||||
@{
|
||||
}
|
||||
<link href="@Href("~/Clienttheme/css/sickLeave.css")" rel="stylesheet" />
|
||||
<div class="container" id="sickLeaveEdit">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<form id="EditForm" asp-page="./Index" asp-page-handler="EditSickLeave" autocomplete="off" class="sickLeave"
|
||||
method="post"
|
||||
data-ajax="true">
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<fieldset style="border: 1px solid #999797; border-radius: 17px; padding: revert">
|
||||
<legend style="margin-bottom: 5px; font-size: 16px; color: #505458; width: 150px; text-align: center;"> مرخصی استعلاجی </legend>
|
||||
<div class="row m-t-10 m-b-10 d-flex">
|
||||
<div class="col-md-6 col-sm-6 col-xs-12">
|
||||
<div class="m-b-0" dir="rtl">
|
||||
<label asp-for="StartLeave" class="control-label m-r-5">تاریخ شروع مرخصی</label>
|
||||
<input id="startLeave" dir="ltr" maxlength="10" style="text-align: center" class="form-control persianDateInput" asp-for="StartLeave" />
|
||||
<span asp-validation-for="StartLeave" class="error"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-12">
|
||||
<div class="m-b-0" dir="rtl">
|
||||
<label asp-for="EndLeave" class="control-label m-r-5">تاریخ پایان مرخصی</label>
|
||||
<input id="endLeave" dir="ltr" maxlength="10" style="text-align: center" class="form-control persianDateInput" asp-for="EndLeave" />
|
||||
<span asp-validation-for="EndLeave" class="error"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div id="data-SickLeave" class="row">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<input type="hidden" asp-for="Id" value="@Model.Id" />
|
||||
<input type="hidden" asp-for="EmployeeId" />
|
||||
@*<input type="hidden" asp-for="WorkshopId" />*@
|
||||
<div class="modal-footer">
|
||||
|
||||
@*<a data-dismiss="modal" class="btn btn-default btn-rounded waves-effect waves-light m-b-5"> بازگشت</a>*@
|
||||
<a href="#showmodal=@Url.Page("/Company/Employees/Index", "CreateSickLeave", new { employeeId = @Model.EmployeeId, workshopId = @Model.WorkshopId, hd = 1 })" class="btn btn-default btn-rounded waves-effect waves-light" id="close"> بازگشت</a>
|
||||
<a href="#" onclick="editSickLeave()" class="btn btn-success btn-rounded waves-effect waves-light" style="background: #0f9500;border: #0f9500;">ذخیره</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
function editSickLeave(){
|
||||
$("#EditForm").submit();
|
||||
}
|
||||
|
||||
$(document).on("click", function (event) {
|
||||
var target = $(event.target);
|
||||
if (!target.is("#sickLeaveEdit")
|
||||
&& !target.is("#sickLeaveEdit *")
|
||||
) {
|
||||
$(".datepicker-container").hide();
|
||||
}
|
||||
});
|
||||
$("#close , .close").on('click', function () {
|
||||
$(".datepicker-container").hide();
|
||||
});
|
||||
$('#EditForm').submit(function(e){
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: $(this).attr( 'action' ),
|
||||
data: $(this).serialize(),
|
||||
success: function (response) {
|
||||
if (response.isSuccedded == true) {
|
||||
$.Notification.autoHideNotify('success', 'top right', response.message);
|
||||
reloadSickLeaveList();
|
||||
}
|
||||
else{
|
||||
$.Notification.autoHideNotify('error', 'top right', response.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
function reloadSickLeaveList(){
|
||||
$("#data-SickLeave").html('');
|
||||
$("#data-SickLeave").html('<div class="ring"> منتظر بمانید<span></span></div>');
|
||||
$.ajax({
|
||||
url: '@Url.Page("/Company/Employees/Index", "SickList")',
|
||||
data:{"employeeId":@Model.EmployeeId,"workshopId_":@Model.WorkshopId },
|
||||
type: "Get",
|
||||
dataType: 'html',
|
||||
success: function(data) {
|
||||
$('#data-SickLeave').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
setTimeout(function () {
|
||||
|
||||
window.location.hash = "##";
|
||||
}, 1000);
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$(".persianDateInput").on('keyup', function () {
|
||||
if (event.which !== 8 && event.which !== 46) {
|
||||
let value = $(this).val();
|
||||
let lengthValue = value.length;
|
||||
if (lengthValue === 4) {
|
||||
value += '/'
|
||||
}
|
||||
if (lengthValue === 7) {
|
||||
value += '/'
|
||||
}
|
||||
$(this).val(value);
|
||||
}
|
||||
});
|
||||
$(".persianDateInput").on('blur', function () {
|
||||
let value = $(this).val();
|
||||
let lengthValue = value.length;
|
||||
if (!dateValidCheck(this)) {
|
||||
$(this).addClass("errored");
|
||||
}
|
||||
else {
|
||||
$(this).removeClass("errored");
|
||||
}
|
||||
});
|
||||
function checkEnValid(fixDate1) {
|
||||
|
||||
let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
|
||||
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
|
||||
fixNumbers = function (str) {
|
||||
if (typeof str === 'string') {
|
||||
for (var i = 0; i < 10; i++) {
|
||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
};
|
||||
let getdate = fixDate1;
|
||||
|
||||
let m1, m2;
|
||||
let y1, y2, y3, y4;
|
||||
let d1, d2;
|
||||
for (let i = 0; i < getdate.length; i++) {
|
||||
if (i === 0) {
|
||||
y1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 1) {
|
||||
y2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 2) {
|
||||
y3 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 3) {
|
||||
y4 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 5) {
|
||||
m1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 6) {
|
||||
m2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 8) {
|
||||
d1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 9) {
|
||||
d2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
|
||||
}
|
||||
let yRes = y1 + y2 + y3 + y4;
|
||||
let year = parseInt(yRes);
|
||||
let mRes = m1 + m2;
|
||||
let month = parseInt(mRes);
|
||||
let dRes = d1 + d2;
|
||||
let day = parseInt(dRes);
|
||||
let kabiseh = false;
|
||||
if (month <= 6 && day > 31) {
|
||||
return false;
|
||||
}
|
||||
else if (month > 6 && month < 12 && day > 30) {
|
||||
return false;
|
||||
} else if (month === 12) {
|
||||
|
||||
switch (year) {
|
||||
case 1346:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1350:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1354:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1358:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1362:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1366:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1370:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1375:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1379:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1383:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1387:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1391:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1395:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1399:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1403:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1408:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1412:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1416:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1420:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1424:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1428:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1432:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1436:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1441:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1445:
|
||||
kabiseh = true;
|
||||
break;
|
||||
default:
|
||||
kabiseh = false;
|
||||
|
||||
}
|
||||
if (kabiseh == true && day > 30) {
|
||||
return false;
|
||||
} else if (kabiseh == false && day > 29) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
function dateValidcheck(inputField1) {
|
||||
let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
|
||||
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
|
||||
fixNumbers = function (str) {
|
||||
if (typeof str === 'string') {
|
||||
for (var i = 0; i < 10; i++) {
|
||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
};
|
||||
let getdate = inputField1.value;
|
||||
|
||||
let m1, m2;
|
||||
let y1, y2, y3, y4;
|
||||
let d1, d2;
|
||||
let s1, s2;
|
||||
for (var i = 0; i < getdate.length; i++) {
|
||||
if (i === 0) {
|
||||
y1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 1) {
|
||||
y2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 2) {
|
||||
y3 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 3) {
|
||||
y4 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 4) {
|
||||
s1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 5) {
|
||||
m1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 6) {
|
||||
m2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 7) {
|
||||
s2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 8) {
|
||||
d1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 9) {
|
||||
d2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
|
||||
}
|
||||
let yRes = y1 + y2 + y3 + y4;
|
||||
let year = parseInt(yRes);
|
||||
let mRes = m1 + m2;
|
||||
let month = parseInt(mRes);
|
||||
let dRes = d1 + d2;
|
||||
let day = parseInt(dRes);
|
||||
let fixResult = yRes + s1 + mRes + s2 + dRes;
|
||||
let test1 = checkEnValid(inputField1.value);
|
||||
|
||||
let isValid = /^([1][3-4][0-9][0-9][/])([0][1-9]|[1][0-2])([/])([0][1-9]|[1-2][0-9]|[3][0-1])$/.test(fixResult);
|
||||
|
||||
|
||||
if (isValid && test1) {
|
||||
//inputField1.addClass("errored");
|
||||
inputField1.style.boxShadow = 'none';
|
||||
inputField1.style.border = '1px solid #c7c7c7';
|
||||
start1valid = true;
|
||||
} else {
|
||||
if (inputField1.value != "") {
|
||||
//inputField1.addClass("errored");
|
||||
inputField1.style.boxShadow = 'inset 0 0 2px #eb3434, 0 0 5px #eb3434';
|
||||
inputField1.style.border = '1px solid #eb3434';
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "لطفا تاریخ را بصورت صحیح وارد کنید");
|
||||
start1valid = false;
|
||||
}
|
||||
}
|
||||
return start1valid;
|
||||
}
|
||||
</script>
|
||||
@@ -1,730 +0,0 @@
|
||||
@page
|
||||
@using Version = _0_Framework.Application.Version
|
||||
@model EmployeePaymentModel
|
||||
|
||||
@{
|
||||
Layout = "Shared/_ClientLayout";
|
||||
ViewData["title"] = " - حساب پرداخت به حقوق";
|
||||
var index = 1;
|
||||
}
|
||||
|
||||
@section Styles {
|
||||
<link href="~/AssetsClient/css/table-style.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/AssetsClient/css/table-responsive.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
|
||||
@* This link called grid must be included, unless the table of payment wont work corectly *@
|
||||
<link href="~/AssetsClient/css/table-grid.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
@* This link called grid must be included, unless the table of payment wont work corectly *@
|
||||
<link href="~/AssetsClient/css/datetimepicker.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
<link href="~/AssetsClient/css/dropdown.css?ver=@Version.StyleVersion" rel="stylesheet"/>
|
||||
|
||||
|
||||
<style>
|
||||
#my-scrollbar {
|
||||
height: auto;
|
||||
max-height: 200px;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
|
||||
<!-- MAIN CONTENT -->
|
||||
<div class="content-container">
|
||||
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row p-2">
|
||||
<div class="col p-0 m-0 d-flex align-items-center justify-content-between">
|
||||
<div class="col d-flex align-items-center justify-content-start">
|
||||
<img src="~/AssetsClient/images/personalList.png" alt="" class="img-fluid me-2" style="width: 45px;"/>
|
||||
<div>
|
||||
<h4 class="title d-flex align-items-center">صورت حساب پرداخت به حقوق</h4>
|
||||
<div>@Model.WorkshopFullName</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-page="/Company/Employees/Index" asp-route-id="@Model.WorkshopId" class="back-btn" type="button">
|
||||
<span>بازگشت</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Search Box -->
|
||||
|
||||
<form role="form" method="get" name="search-theme-form1" id="search-theme-form1" autocomplete="off">
|
||||
|
||||
<input type="hidden" asp-for="WorkshopId"/>
|
||||
<input type="hidden" asp-for="EmployeeId"/>
|
||||
|
||||
<div class="container-fluid d-none d-lg-block">
|
||||
<div class="row px-2">
|
||||
<div class="search-box card border-0">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="title mb-1">مرتب سازی</div>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<div class="d-grid grid-cols-5 gap-2" data-title="جستجو لیست قرارداد" data-intro="شما در این لیست قرارداد میتوانید جستجو کنید.">
|
||||
|
||||
<div class="wrapper-dropdown-year btn-dropdown" id="dropdown-year">
|
||||
<span class="selected-display" id="destination-year">سال</span>
|
||||
<svg class="arrow" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="transition-all ml-auto rotate-180">
|
||||
<path d="M7 14.5l5-5 5 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
<ul class="dropdown-year boxes" id="my-scrollbar">
|
||||
<li class="item" value-data-year="0">سال</li>
|
||||
@foreach (var year in Model.YearlyList)
|
||||
{
|
||||
<li class="item" value-data-year="@year">@year</li>
|
||||
}
|
||||
</ul>
|
||||
<input type="hidden" id="sendDropdownYear" asp-for="SearchModel.Year"/>
|
||||
</div>
|
||||
|
||||
<div class="wrapper-dropdown-month btn-dropdown" id="dropdown-month">
|
||||
<span class="selected-display" id="destination-month">ماه</span>
|
||||
<svg class="arrow" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="transition-all ml-auto rotate-180">
|
||||
<path d="M7 14.5l5-5 5 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
|
||||
</svg>
|
||||
<ul class="dropdown-month boxes">
|
||||
<li class="item" value-data-month="0">ماه</li>
|
||||
<li class="item" value-data-month="01">فروردین</li>
|
||||
<li class="item" value-data-month="02">اردیبهشت</li>
|
||||
<li class="item" value-data-month="03">خرداد</li>
|
||||
<li class="item" value-data-month="04">تیر</li>
|
||||
<li class="item" value-data-month="05">مرداد</li>
|
||||
<li class="item" value-data-month="06">شهریور</li>
|
||||
<li class="item" value-data-month="07">مهر</li>
|
||||
<li class="item" value-data-month="08">آبان</li>
|
||||
<li class="item" value-data-month="09">آذر</li>
|
||||
<li class="item" value-data-month="10">دی</li>
|
||||
<li class="item" value-data-month="11">بهمن</li>
|
||||
<li class="item" value-data-month="12">اسفند</li>
|
||||
</ul>
|
||||
<input type="hidden" id="sendDropdownMonth" asp-for="SearchModel.Month"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<div class="d-flex gap-2 justify-content-end">
|
||||
<a asp-page="/Company/Employees/EmployeePayment" asp-route-workshopId="@Model.WorkshopId" asp-route-employeeId="@Model.EmployeeId" class="btn-view-all text-nowrap align-items-center">
|
||||
<span>حذف فیلتر</span>
|
||||
</a>
|
||||
<button class="btn-search btn-search-click text-nowrap d-flex align-items-center" id="searchBtn" type="submit">
|
||||
<span>جستجو</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<circle cx="11" cy="11" r="6" stroke="white"/>
|
||||
<path d="M20 20L17 17" stroke="white" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- End Search Box -->
|
||||
|
||||
<form role="form" method="post" name="create-leave-form" id="create-payment-to-employee-form" autocomplete="off">
|
||||
<!-- Start Payment Box -->
|
||||
<div class="container-fluid d-none d-md-block">
|
||||
<div class="row px-2">
|
||||
<div class="search-box card border-0">
|
||||
<div class="row">
|
||||
<div class="col-9">
|
||||
<div class="d-grid grid-cols-4 gap-2">
|
||||
|
||||
<input type="hidden" asp-for="Command.EmployeeId">
|
||||
<input type="hidden" asp-for="Command.WorkshopId">
|
||||
|
||||
<input type="text" class="date" id="date" asp-for="Command.CreatePaymentToEmployeeItem.PayDateFa" placeholder="تاریخ">
|
||||
<input type="text" placeholder="شماره سند حسابداری">
|
||||
<input type="text" asp-for="Command.CreatePaymentToEmployeeItem.SourceBankName" placeholder="بانک مبدا">
|
||||
<input type="text" asp-for="Command.CreatePaymentToEmployeeItem.DestinationBankName" placeholder="بانک مقصد">
|
||||
<div class="gap-2 mt-2" id="payment_input_change" style="display: none;"></div>
|
||||
|
||||
@* <input type="text" name="" id="" placeholder="تاریخ">
|
||||
<input type="text" name="" id="" placeholder="ساعت"> *@
|
||||
|
||||
<select class="form-select" name="" id="payment_method">
|
||||
<option value="0">نحوه پرداخت</option>
|
||||
<option value="1">نقدی</option>
|
||||
<option value="2">آنلاین</option>
|
||||
</select>
|
||||
|
||||
<input type="text" name="" id="" placeholder="عنوان پرداخت">
|
||||
</div>
|
||||
<div class="gap-2 mt-2" id="payment_input_change1" style="display: none;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<div class="d-flex gap-2 justify-content-end">
|
||||
<input type="text" asp-for="Command.CreatePaymentToEmployeeItem.PaymentFa" placeholder="مبلغ (ريال)">
|
||||
<a href="#" id="save" class="btn-search">
|
||||
<span>ثبت</span>
|
||||
</a>
|
||||
<button style="display: none;" type="submit" id="saveFinaly"></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Payment Box -->
|
||||
</form>
|
||||
|
||||
<!-- List Items -->
|
||||
<div class="container-fluid">
|
||||
<div class="row p-lg-2 p-auto">
|
||||
|
||||
<!-- Advance Search Box -->
|
||||
<div class="container-fluid d-block d-md-none">
|
||||
<div class="row d-flex align-items-center justify-content-between">
|
||||
<div class="search-box bg-white">
|
||||
<div class="col text-center">
|
||||
<button class="btn-search w-100" type="button" data-bs-toggle="modal" data-bs-target="#searchModal">
|
||||
<span>جستجو پیشرفته</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<circle cx="11" cy="11" r="6" stroke="white"/>
|
||||
<path d="M20 20L17 17" stroke="white" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Advance Search Box -->
|
||||
|
||||
<div class="wrapper list-box bg-white personal-payment-grid-wrapper">
|
||||
<div class="personal-payment-grid">
|
||||
|
||||
<div class="Rtable Rtable--5cols Rtable--collapse personal-payment-grid-list">
|
||||
|
||||
<div class="Rtable-row Rtable-row--head align-items-center d-grid gap-2 grid-cols-12">
|
||||
<div class="d-flex col-span-2">
|
||||
<div class="Rtable-cell column-heading width1">سال</div>
|
||||
<div class="Rtable-cell column-heading width2">ماه</div>
|
||||
</div>
|
||||
<div class="d-flex col-span-7">
|
||||
<div class="Rtable-cell column-heading width3">تاریخ پرداخت</div>
|
||||
<div class="Rtable-cell column-heading width4">بانک مبداء</div>
|
||||
<div class="Rtable-cell column-heading width5">بانک مقصد</div>
|
||||
<div class="Rtable-cell column-heading width6">مبلغ (ریال)</div>
|
||||
</div>
|
||||
<div class="d-flex col-span-3">
|
||||
<div class="Rtable-cell column-heading width7"></div>
|
||||
<div class="Rtable-cell column-heading width8"></div>
|
||||
<div class="Rtable-cell column-heading width9"></div>
|
||||
<div class="Rtable-cell column-heading width10"></div>
|
||||
<div class="Rtable-cell column-heading width11"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="w-100 personal-payment-scroll">
|
||||
<!-- this empty div must be initial for color -->
|
||||
<div></div>
|
||||
<!-- this empty div must be initial for color -->
|
||||
|
||||
|
||||
@foreach (var paymentList in Model.PaymentToEmployeeSearch)
|
||||
{
|
||||
<div class="personal-grid-row d-grid gap-2 grid-cols-12 w-100">
|
||||
|
||||
<div class="Rtable-row align-items-center col-span-2">
|
||||
<div class="Rtable-cell width1">
|
||||
<div class="Rtable-cell--content">
|
||||
@paymentList.Year
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width2">
|
||||
<div class="Rtable-cell--content">
|
||||
@paymentList.Month
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-span-7">
|
||||
@if (paymentList.PaymentToEmployeeItemList.Count > 0)
|
||||
{
|
||||
@foreach (var paymentItem in paymentList.PaymentToEmployeeItemList)
|
||||
{
|
||||
var StylePadding = "";
|
||||
@if (paymentList.PaymentToEmployeeItemList.Count == 1)
|
||||
{
|
||||
StylePadding = "padding: 28px 10px 28px 10px;";
|
||||
}
|
||||
|
||||
<div class="Rtable-row align-items-center w-100" style="@StylePadding">
|
||||
<div class="Rtable-cell width3">
|
||||
<div class="Rtable-cell--content">
|
||||
<div class="Rtable-cell--content">
|
||||
@paymentItem.PayDateFa
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width4">
|
||||
<div class="Rtable-cell--content">
|
||||
<p class="m-0">@paymentItem.SourceBankName</p>
|
||||
<p class="m-0">@paymentItem.SourceBankAccountNumber</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width5">
|
||||
<div class="Rtable-cell--content">
|
||||
<p class="m-0">@paymentItem.DestinationBankName</p>
|
||||
<p class="m-0">@paymentItem.DestinationBankAccountNumber</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width6">
|
||||
<div class="Rtable-cell--content">
|
||||
@(paymentItem.PaymentFa) ريال
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="Rtable-row align-items-center w-100" style="padding: 28px 10px 28px 10px;">
|
||||
<div class="Rtable-cell width3">
|
||||
<div class="Rtable-cell--content">
|
||||
<div class="Rtable-cell--content">
|
||||
-
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width4">
|
||||
<div class="Rtable-cell--content">
|
||||
<p class="m-0">-</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width5">
|
||||
<div class="Rtable-cell--content">
|
||||
<p class="m-0">-</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="Rtable-cell width6">
|
||||
<div class="Rtable-cell--content">
|
||||
-
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="Rtable-row align-items-center col-span-3 position-relative" style="padding: 0 0 40px 0;">
|
||||
<div class="Rtable-cell width7">
|
||||
<div class="Rtable-cell--content">
|
||||
@* <div class="text-price">@paymentList.BonusesPay</div> *@
|
||||
<p class="my-1 ">جمع پرداختی</p>
|
||||
<p class="my-0 text-price">
|
||||
@{
|
||||
if (!string.IsNullOrWhiteSpace(paymentList.PaymentToEmployeeTotalPayment))
|
||||
{
|
||||
<span>@paymentList.PaymentToEmployeeTotalPayment ریال</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>
|
||||
-
|
||||
</span>
|
||||
}
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
<p class="my-0">
|
||||
@{
|
||||
if (!string.IsNullOrWhiteSpace(paymentList.ComputePaymentToEmployeeTotalPayment))
|
||||
{
|
||||
<span>@paymentList.ComputePaymentToEmployeeTotalPayment ریال</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>
|
||||
-
|
||||
</span>
|
||||
}
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
<div class="Rtable-cell width8">
|
||||
<div class="Rtable-cell--content">
|
||||
<p class="my-1 ">نمایش فیش حقوقی</p>
|
||||
<p class="my-0 text-price">
|
||||
@{
|
||||
if (!string.IsNullOrWhiteSpace(paymentList.CheckoutTotalPayment))
|
||||
{
|
||||
<span>@paymentList.CheckoutTotalPayment ریال</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>
|
||||
-
|
||||
</span>
|
||||
}
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
<p class="my-0">
|
||||
@{
|
||||
if (!string.IsNullOrWhiteSpace(paymentList.ComputeCheckoutTotalPayment))
|
||||
{
|
||||
<span>@paymentList.ComputeCheckoutTotalPayment ریال</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>
|
||||
-
|
||||
</span>
|
||||
}
|
||||
}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@* <div class="d-flex all-sum-price">
|
||||
<p class="my-0 mx-2">مجموع: </p>
|
||||
<p class="my-0 mx-2">@paymentList.TotalPayment</p>
|
||||
</div> *@
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Start Result box or Summarry box -->
|
||||
<div class="d-grid gap-2 grid-cols-12 justify-content-end personal-payment-result1">
|
||||
<div class="col-span-1">
|
||||
|
||||
</div>
|
||||
<div class="col-span-6">
|
||||
|
||||
</div>
|
||||
<div class="col-span-5">
|
||||
<div class="d-flex align-items-center justify-content-end">
|
||||
<div class="d-flex mx-1 result-pay">
|
||||
<p class="my-0">74,000,000</p>
|
||||
</div>
|
||||
<div class="d-flex mx-1 result-pay">
|
||||
<p class="my-0">74,000,000</p>
|
||||
</div>
|
||||
<div class="d-flex mx-1 result-pay">
|
||||
<p class="my-0">74,000,000</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-grid gap-2 grid-cols-12 personal-payment-result2">
|
||||
<div class="col-span-1">
|
||||
|
||||
</div>
|
||||
<div class="col-span-6">
|
||||
<div class="d-flex align-items-center justify-content-end">
|
||||
<p class="my-0">مجموع پرداختی های کارفرما</p>
|
||||
<div class="d-flex mx-1 result-pay">
|
||||
<p class="my-0">74,000,000</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-span-5">
|
||||
<div class="d-flex align-items-center justify-content-start">
|
||||
<div class="d-flex mx-1 result-pay">
|
||||
<p class="my-0">74,000,000</p>
|
||||
</div>
|
||||
<p class="my-0">مجموع مطالبات پرسنل</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Result box or Summarry box -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- End List Items -->
|
||||
</div>
|
||||
<!-- END MAIN CONTENT -->
|
||||
<!-- Modal From Bottom For Advance Search -->
|
||||
<div class="modal fade" id="searchModal" tabindex="-1" data-bs-backdrop="static" aria-labelledby="searchModalModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-fullscreen">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-block text-center pb-0">
|
||||
<div class="iphone-line mx-auto mb-3"></div>
|
||||
<h5 class="modal-title mb-4 text-start" id="searchModalLabel">جستجوی پیشرفته</h5>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-body pt-0 mb-3">
|
||||
<div class="container-fluid search-box">
|
||||
<div class="row">
|
||||
<div class="col-12 text-start mb-4">
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" placeholder="نام و نام خانوادگی پرسنل ...">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="" id="" placeholder="کد ملی ...">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="text" class="form-control" name="" id="" placeholder="شماره بیمه ...">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 text-start">
|
||||
<p class="mb-3">جستجو براساس</p>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<input type="radio" class="btn-check" name="btnradio" id="active" autocomplete="off" checked>
|
||||
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="active">پرسنلهای غیر فعال</label>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<input type="radio" class="btn-check" name="btnradio" id="deactive" autocomplete="off">
|
||||
<label class="btn btn-outline-primary d-flex justify-content-center radio-btn" for="deactive">پرسنلهای فعال</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer justify-content-center align-items-center">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-6 text-end">
|
||||
<button type="button" class="btn-cancel w-100" data-bs-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
<div class="col-6 text-start">
|
||||
<button type="button" class="btn-search w-100">جستجو</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- End Modal From Bottom For Advance Search -->
|
||||
|
||||
|
||||
@section Script {
|
||||
<script src="~/AssetsClient/js/dropdown.js?ver=@Version.StyleVersion"></script>
|
||||
<script src="~/assetsclient/js/smooth-scrollbar.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
//******************** اسکرول سال ********************
|
||||
const Scrollbar = window.Scrollbar;
|
||||
Scrollbar.init(document.querySelector('#my-scrollbar'));
|
||||
//******************** اسکرول سال ********************
|
||||
|
||||
|
||||
//******************** مربوط به روش پرداخت ********************
|
||||
$('#payment_method').on('change',
|
||||
function() {
|
||||
const payment_input_change = $('#payment_input_change').html('');
|
||||
console.log($(this).val());
|
||||
if ($(this).val() == 1) {
|
||||
payment_input_change.append(`
|
||||
<input type="text" name="" id="" placeholder="شماره چک">`);
|
||||
payment_input_change.show();
|
||||
} else if ($(this).val() == 2) {
|
||||
payment_input_change.append(`
|
||||
<input type="text" name="" id="" placeholder="بانک مبداء">
|
||||
<input type="text" name="" id="" placeholder="شماره حساب / شبا / کارت">
|
||||
<input type="text" name="" id="" placeholder="بانک مقصد">
|
||||
<input type="text" name="" id="" placeholder="شماره حساب / شبا / کارت">`);
|
||||
payment_input_change.show();
|
||||
} else if ($(this).val() == 0) {
|
||||
payment_input_change.html('');
|
||||
payment_input_change.hide();
|
||||
}
|
||||
});
|
||||
//******************** مربوط به روش پرداخت ********************
|
||||
|
||||
|
||||
//************************ مربوط به جستجوی سال و ماه در قسمت دسکتاپ ************************//
|
||||
const selectedAll = document.querySelectorAll(".wrapper-dropdown");
|
||||
|
||||
var wrapperDropdown = $(".wrapper-dropdown");
|
||||
|
||||
wrapperDropdown.on("click",
|
||||
function() {
|
||||
var dropdown = $(this);
|
||||
const optionsContainer = dropdown.children(".dropdown");
|
||||
var optionsList = optionsContainer.find(".item");
|
||||
|
||||
dropdown.toggleClass("active");
|
||||
|
||||
if (dropdown.hasClass("active")) {
|
||||
wrapperDropdown.not(this).removeClass("active");
|
||||
}
|
||||
|
||||
optionsList.on("click",
|
||||
function() {
|
||||
const selectedOption = $(this);
|
||||
const valueData = selectedOption.data("value");
|
||||
|
||||
dropdown.removeClass("active");
|
||||
dropdown.find(".selected-display").text(selectedOption.text());
|
||||
$("#sendSorting").val(valueData);
|
||||
|
||||
optionsList.removeClass("active");
|
||||
selectedOption.addClass("active");
|
||||
});
|
||||
});
|
||||
|
||||
$('.dropdown-year .item').on("click",
|
||||
function() {
|
||||
console.log(1111);
|
||||
const dataVal = $(this).attr("value-data-year");
|
||||
$('#sendDropdownYear').val(dataVal);
|
||||
});
|
||||
|
||||
$('.dropdown-month .item').on("click",
|
||||
function() {
|
||||
const dataVal = $(this).attr("value-data-month");
|
||||
$('#sendDropdownMonth').val(dataVal);
|
||||
});
|
||||
|
||||
const sendDropdownYear = $("#sendDropdownYear").val();
|
||||
if (sendDropdownYear) {
|
||||
const itemDropdownYear = $(".dropdown-year").find(`.item[value-data-year='${sendDropdownYear}']`);
|
||||
itemDropdownYear.addClass("active");
|
||||
const selectedYearDisplay = $(".wrapper-dropdown-year").find(".selected-display");
|
||||
selectedYearDisplay.text(itemDropdownYear.text());
|
||||
}
|
||||
|
||||
const sendDropdownMonth = $("#sendDropdownMonth").val();
|
||||
if (sendDropdownMonth) {
|
||||
const itemDropdownMonth = $(".dropdown-month").find(`.item[value-data-month='${sendDropdownMonth}']`);
|
||||
itemDropdownMonth.addClass("active");
|
||||
const selectedMonthDisplay = $(".wrapper-dropdown-month").find(".selected-display");
|
||||
selectedMonthDisplay.text(itemDropdownMonth.text());
|
||||
}
|
||||
|
||||
// check if anything else ofther than the dropdown is clicked
|
||||
window.addEventListener("click",
|
||||
function(e) {
|
||||
if (e.target.closest(".wrapper-dropdown") === null) {
|
||||
closeAllDropdowns();
|
||||
}
|
||||
});
|
||||
|
||||
// close all the dropdowns
|
||||
function closeAllDropdowns() {
|
||||
const selectedAll = document.querySelectorAll(".wrapper-dropdown");
|
||||
selectedAll.forEach((selected) => {
|
||||
const optionsContainer = selected.children[2];
|
||||
const arrow = selected.children[1];
|
||||
|
||||
handleDropdown(selected, arrow, false);
|
||||
});
|
||||
}
|
||||
|
||||
// open all the dropdowns
|
||||
function handleDropdown(dropdown, arrow, open) {
|
||||
if (open) {
|
||||
arrow.classList.add("rotated");
|
||||
dropdown.classList.add("active");
|
||||
} else {
|
||||
arrow.classList.remove("rotated");
|
||||
dropdown.classList.remove("active");
|
||||
}
|
||||
}
|
||||
//************************ مربوط به جستجوی سال و ماه در قسمت دسکتاپ ************************//
|
||||
|
||||
|
||||
//************************ عملیات ذخیره سازی پرداخت حقوق به پرسنل ************************//
|
||||
$(".date").mask("0000/00/00");
|
||||
$('.date').on('input',
|
||||
function() {
|
||||
const Date = this.value;
|
||||
if (Date.length == 10) {
|
||||
const submitcheck = dateValidcheck(this);
|
||||
if (submitcheck) {
|
||||
$(this).removeClass('errored');
|
||||
} else {
|
||||
$(this).addClass('errored');
|
||||
}
|
||||
} else {
|
||||
$(this).addClass('errored');
|
||||
}
|
||||
});
|
||||
|
||||
$('#date').on("keyup",
|
||||
function() {
|
||||
const isValid = /^([2][0-3]|[1][0-9]|[0-9]|[0][0-9])([:][0-5][0-9])$/.test($(this).val());
|
||||
if (isValid) {
|
||||
$(this).addClass("validTime");
|
||||
$(this).removeClass("invalidTime");
|
||||
} else {
|
||||
$(this).removeClass("validTime");
|
||||
$(this).addClass("invalidTime");
|
||||
}
|
||||
});
|
||||
|
||||
$('#save').on('click',
|
||||
function() {
|
||||
if ($('.errored').length < 1) {
|
||||
$.ajax({
|
||||
async: false,
|
||||
dataType: 'json',
|
||||
type: 'POST',
|
||||
url: '@Url.Page("./EmployeePayment", "PaymentToPersonnelSave")',
|
||||
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
|
||||
data: $('#create-payment-to-employee-form').serialize(),
|
||||
success: function(response) {
|
||||
if (response.isSuccedded) {
|
||||
$('.alert-success-msg').show();
|
||||
$('.alert-success-msg p').text(response.message);
|
||||
setTimeout(function() {
|
||||
$('.alert-success-msg').hide();
|
||||
$('.alert-success-msg p').text('');
|
||||
},
|
||||
3500);
|
||||
window.location.reload();
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text(response.message);
|
||||
setTimeout(function() {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
},
|
||||
3500);
|
||||
}
|
||||
},
|
||||
error: function(err) {
|
||||
console.log(err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$('.alert-msg').show();
|
||||
$('.alert-msg p').text('لطفا خطاها را برطرف کنید.');
|
||||
setTimeout(function() {
|
||||
$('.alert-msg').hide();
|
||||
$('.alert-msg p').text('');
|
||||
},
|
||||
3500);
|
||||
}
|
||||
});
|
||||
//************************ عملیات ذخیره سازی پرداخت حقوق به پرسنل ************************//
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.Employee;
|
||||
using CompanyManagment.App.Contracts.PaymentToEmployee;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using CompanyManagment.App.Contracts.YearlySalary;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
|
||||
namespace ServiceHost.Areas.Client.Pages.Company.Employees;
|
||||
|
||||
public class EmployeePaymentModel : PageModel
|
||||
{
|
||||
private readonly IAuthHelper _authHelper;
|
||||
private readonly IEmployeeApplication _employeeApplication;
|
||||
private readonly IPaymentToEmployeeApplication _paymentToEmployeeApplication;
|
||||
|
||||
private readonly IWorkshopApplication _workshopApplication;
|
||||
private readonly IYearlySalaryApplication _yearlySalaryApplication;
|
||||
public CreatePaymentToEmployee Command;
|
||||
public string EmployeeFullName;
|
||||
public long EmployeeId;
|
||||
public string Month;
|
||||
public List<PaymentToEmployeeViewModel> PaymentToEmployeeSearch;
|
||||
public PaymentToEmployeeSearchModel SearchModel;
|
||||
|
||||
public string WorkshopFullName;
|
||||
public long WorkshopId;
|
||||
public string Year;
|
||||
public List<string> YearlyList;
|
||||
|
||||
public EmployeePaymentModel(IWorkshopApplication workshopApplication, IEmployeeApplication employeeApplication,
|
||||
IYearlySalaryApplication yearlySalaryApplication, IAuthHelper authHelper,
|
||||
IPaymentToEmployeeApplication paymentToEmployeeApplication)
|
||||
{
|
||||
_workshopApplication = workshopApplication;
|
||||
_employeeApplication = employeeApplication;
|
||||
_yearlySalaryApplication = yearlySalaryApplication;
|
||||
_authHelper = authHelper;
|
||||
_paymentToEmployeeApplication = paymentToEmployeeApplication; // dependency injection
|
||||
}
|
||||
|
||||
public void OnGet(long workshopId, long employeeId, PaymentToEmployeeSearchModel searchModel)
|
||||
{
|
||||
var workshop = _workshopApplication.GetDetails(workshopId);
|
||||
var employee = _employeeApplication.GetDetails(employeeId);
|
||||
|
||||
var search = new PaymentToEmployeeSearchModel
|
||||
{
|
||||
EmployeeId = employeeId,
|
||||
WorkshopId = workshopId,
|
||||
Year = searchModel.Year,
|
||||
Month = searchModel.Month
|
||||
};
|
||||
|
||||
PaymentToEmployeeSearch = _paymentToEmployeeApplication.searchClient(search);
|
||||
|
||||
WorkshopFullName = workshop.WorkshopFullName;
|
||||
EmployeeFullName = employee.EmployeeFullName;
|
||||
WorkshopId = workshopId;
|
||||
EmployeeId = employeeId;
|
||||
YearlyList = _yearlySalaryApplication.GetYears();
|
||||
|
||||
var command = new CreatePaymentToEmployee
|
||||
{
|
||||
EmployeeId = employeeId,
|
||||
WorkshopId = workshopId
|
||||
};
|
||||
Command = command;
|
||||
}
|
||||
|
||||
public IActionResult OnPostPaymentToPersonnelSave(CreatePaymentToEmployee command)
|
||||
{
|
||||
var payDateFa = command.CreatePaymentToEmployeeItem.PayDateFa;
|
||||
command.Year = payDateFa.Substring(0, 4);
|
||||
command.Month = payDateFa.Substring(5, 2);
|
||||
|
||||
var result = _paymentToEmployeeApplication.Create(command);
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
result.IsSuccedded,
|
||||
message = result.Message
|
||||
});
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,501 +0,0 @@
|
||||
@model CompanyManagment.App.Contracts.Leave.CreateLeave
|
||||
@{
|
||||
|
||||
int i = 1;
|
||||
|
||||
|
||||
}
|
||||
@{
|
||||
<style>
|
||||
#paidLeave .panel-title {
|
||||
font-size: 14px;
|
||||
margin-bottom: 0;
|
||||
margin-top: 0;
|
||||
padding: 5px 7px 5px 7px;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
top: 2.5rem;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
width: 30%;
|
||||
margin: 30px auto;
|
||||
}
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
min-height: auto;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.modal-footer .btn + .btn {
|
||||
margin-bottom: 0;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
|
||||
@@media (max-width: 1580px) {
|
||||
.modal-dialog {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
@@media (max-width: 768px) {
|
||||
.modal-dialog {
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
#paidLeave .panel-heading {
|
||||
border-radius: 17px;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
border: none !important;
|
||||
padding: 0px 20px;
|
||||
background-color: #505050 !important;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#paidLeave .form-control {
|
||||
border: 1px solid #ababab;
|
||||
}
|
||||
|
||||
#paidLeave .panel .panel-body {
|
||||
padding: 0;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
.modal-content .panel {
|
||||
border-radius: 17px;
|
||||
}
|
||||
</style>
|
||||
<link href="~/AdminTheme/assets/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
<div class="container" id="paidLeave">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
|
||||
<form asp-page="./Index" asp-page-handler="CreatePaidLeave" autocomplete="off"
|
||||
method="post"
|
||||
data-ajax="true"
|
||||
data-callback=""
|
||||
data-action="ReloadPaidLeave">
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert">
|
||||
<legend style="margin-bottom: 5px; font-size: large; border-bottom: 0px; color: #505458; width: 150px; text-align: center;"> مرخصی استحقاقی </legend>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<fieldset style="border: 1px solid #c3c3c3; background-color: #ddd; border-radius: 10px; padding: 5px 0 5px 0; margin-bottom: 10px; ">
|
||||
<div class="flexible-div">
|
||||
<div class="col-md-4" style="margin-top: 3px">
|
||||
نوع مرخصی <span style="color: red">*</span>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
روزانه <input type="radio" checked="checked" value="روزانه" asp-for="PaidLeaveType">
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
ساعتی <input type="radio" value="ساعتی" asp-for="PaidLeaveType">
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<span asp-validation-for="PaidLeaveType" class="error"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row m-t-10 flexible-div">
|
||||
<div class="col-md-5">
|
||||
<div class="m-b-0" dir="rtl">
|
||||
<label asp-for="StartLeave" class="control-label m-r-5">تاریخ شروع مرخصی</label>
|
||||
<input id="startLeave" dir="ltr" maxlength="10" style="text-align: center" class="form-control persianDateInput" onchange="validDate(this);" asp-for="StartLeave" />
|
||||
|
||||
<span asp-validation-for="StartLeave" class="error"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="m-b-0" dir="rtl">
|
||||
<label asp-for="EndLeave" class="control-label m-r-5">تاریخ پایان مرخصی</label>
|
||||
<input id="endLeave" dir="ltr" maxlength="10" style="text-align: center" class="form-control persianDateInput" onchange="validDate(this);" asp-for="EndLeave" />
|
||||
|
||||
<span asp-validation-for="EndLeave" class="error"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="m-b-0" dir="rtl">
|
||||
<label asp-for="LeaveHourses" class="control-label m-r-5">ساعت</label>
|
||||
<input id="hours" dir="ltr" maxlength="2" style="text-align: center" class="form-control" asp-for="LeaveHourses" />
|
||||
|
||||
<span asp-validation-for="LeaveHourses" class="error"></span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="m-t-10">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-list" style="padding-left: 3px; font-size: 14px"></i> سوابق مرخصی استحقاقی </h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div id="data-PaidLeave" class="col-sm-12 col-sm-12 col-xs-12">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" asp-for="EmployeeId" />
|
||||
@*<input type="hidden" asp-for="WorkshopId" />*@
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default btn-rounded waves-effect waves-light" data-dismiss="modal">بستن</button>
|
||||
<button type="submit" class="btn btn-success btn-rounded waves-effect waves-light" style="background: #0f9500;border: #0f9500;">ذخیره</button>
|
||||
</div>
|
||||
</form>
|
||||
<form asp-page="./Index" asp-page-handler="RemovePaidLeave" autocomplete="off" id="sub"
|
||||
method="post"
|
||||
data-ajax="true"
|
||||
data-callback=""
|
||||
data-action="ReloadPaidLeave">
|
||||
<div style="display: none">
|
||||
<input type="hidden" id="LeftId" name="id" />
|
||||
<input type="hidden" asp-for="EmployeeId" />
|
||||
@*<input type="hidden" asp-for="WorkshopId" />*@
|
||||
@*<input type="hidden" asp-for="id" value="id"/>*@
|
||||
<div class="modal-footer" style="margin-bottom: 10px">
|
||||
<input type="submit" id="sendFinaly" form="sub" value="fine" name="fine" style="display: none" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script src="~/adminTheme/assets/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="~/adminTheme/assets/datatables/dataTables.bootstrap.js"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
reloadPaidLeaveList();
|
||||
});
|
||||
|
||||
|
||||
function reloadPaidLeaveList(){
|
||||
|
||||
$("#data-PaidLeave").html('');
|
||||
$("#data-PaidLeave").html('<div class="ring"> منتظر بمانید<span></span></div>');
|
||||
$.ajax({
|
||||
url: '@Url.Page("/Company/Employees/Index", "PaidLeave")',
|
||||
data:{"employeeId":@Model.EmployeeId,"workshopId_":@Model.WorkshopId },
|
||||
type: "Get",
|
||||
dataType: 'html',
|
||||
success: function(data) {
|
||||
$('#data-PaidLeave').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#hours").attr("disabled", "disabled");
|
||||
$('input:radio[name="PaidLeaveType"]').change(
|
||||
function () {
|
||||
if ($(this).is(':checked') && $(this).val() == 'روزانه') {
|
||||
|
||||
$("#hours").val('');
|
||||
$("#hours").attr("disabled", "disabled");
|
||||
$("#endLeave").removeAttr("disabled");
|
||||
} else if ($(this).is(':checked') && $(this).val() == 'ساعتی') {
|
||||
|
||||
$("#endLeave").val('');
|
||||
$("#endLeave").attr("disabled", "disabled");
|
||||
$("#hours").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$('.RemoveLeftWork').on("click",
|
||||
function () {
|
||||
var id = $(this).closest("div").find("input[name='LeftworkId']").val();
|
||||
$('#LeftId').val(id);
|
||||
swal({
|
||||
title: "آیا حذف این سابقه مرخصی اطمینان دارید؟",
|
||||
text: "",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
closeOnConfirm: true,
|
||||
closeOnCancel: true
|
||||
}, function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
|
||||
$('#sendFinaly').click();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(".persianDateInput").on('keyup', function () {
|
||||
if (event.which !== 8 && event.which !== 46) {
|
||||
let value = $(this).val();
|
||||
let lengthValue = value.length;
|
||||
if (lengthValue === 4) {
|
||||
value += '/'
|
||||
}
|
||||
if (lengthValue === 7) {
|
||||
value += '/'
|
||||
}
|
||||
$(this).val(value);
|
||||
}
|
||||
});
|
||||
$(".persianDateInput").on('blur', function () {
|
||||
let value = $(this).val();
|
||||
let lengthValue = value.length;
|
||||
if (!dateValidCheck(this)) {
|
||||
$(this).addClass("errored");
|
||||
}
|
||||
else {
|
||||
$(this).removeClass("errored");
|
||||
}
|
||||
});
|
||||
function checkEnValid(fixDate1) {
|
||||
|
||||
let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
|
||||
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
|
||||
fixNumbers = function (str) {
|
||||
if (typeof str === 'string') {
|
||||
for (var i = 0; i < 10; i++) {
|
||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
};
|
||||
let getdate = fixDate1;
|
||||
|
||||
let m1, m2;
|
||||
let y1, y2, y3, y4;
|
||||
let d1, d2;
|
||||
for (let i = 0; i < getdate.length; i++) {
|
||||
if (i === 0) {
|
||||
y1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 1) {
|
||||
y2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 2) {
|
||||
y3 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 3) {
|
||||
y4 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 5) {
|
||||
m1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 6) {
|
||||
m2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 8) {
|
||||
d1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 9) {
|
||||
d2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
|
||||
}
|
||||
let yRes = y1 + y2 + y3 + y4;
|
||||
let year = parseInt(yRes);
|
||||
let mRes = m1 + m2;
|
||||
let month = parseInt(mRes);
|
||||
let dRes = d1 + d2;
|
||||
let day = parseInt(dRes);
|
||||
let kabiseh = false;
|
||||
if (month <= 6 && day > 31) {
|
||||
return false;
|
||||
}
|
||||
else if (month > 6 && month < 12 && day > 30) {
|
||||
return false;
|
||||
} else if (month === 12) {
|
||||
|
||||
switch (year) {
|
||||
case 1346:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1350:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1354:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1358:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1362:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1366:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1370:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1375:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1379:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1383:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1387:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1391:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1395:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1399:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1403:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1408:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1412:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1416:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1420:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1424:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1428:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1432:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1436:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1441:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1445:
|
||||
kabiseh = true;
|
||||
break;
|
||||
default:
|
||||
kabiseh = false;
|
||||
|
||||
}
|
||||
if (kabiseh == true && day > 30) {
|
||||
return false;
|
||||
} else if (kabiseh == false && day > 29) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
function dateValidcheck(inputField1) {
|
||||
let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
|
||||
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
|
||||
fixNumbers = function (str) {
|
||||
if (typeof str === 'string') {
|
||||
for (var i = 0; i < 10; i++) {
|
||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
};
|
||||
let getdate = inputField1.value;
|
||||
|
||||
let m1, m2;
|
||||
let y1, y2, y3, y4;
|
||||
let d1, d2;
|
||||
let s1, s2;
|
||||
for (var i = 0; i < getdate.length; i++) {
|
||||
if (i === 0) {
|
||||
y1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 1) {
|
||||
y2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 2) {
|
||||
y3 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 3) {
|
||||
y4 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 4) {
|
||||
s1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 5) {
|
||||
m1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 6) {
|
||||
m2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 7) {
|
||||
s2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 8) {
|
||||
d1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 9) {
|
||||
d2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
|
||||
}
|
||||
let yRes = y1 + y2 + y3 + y4;
|
||||
let year = parseInt(yRes);
|
||||
let mRes = m1 + m2;
|
||||
let month = parseInt(mRes);
|
||||
let dRes = d1 + d2;
|
||||
let day = parseInt(dRes);
|
||||
let fixResult = yRes + s1 + mRes + s2 + dRes;
|
||||
let test1 = checkEnValid(inputField1.value);
|
||||
|
||||
let isValid = /^([1][3-4][0-9][0-9][/])([0][1-9]|[1][0-2])([/])([0][1-9]|[1-2][0-9]|[3][0-1])$/.test(fixResult);
|
||||
|
||||
|
||||
if (isValid && test1) {
|
||||
//inputField1.addClass("errored");
|
||||
inputField1.style.boxShadow = 'none';
|
||||
inputField1.style.border = '1px solid #c7c7c7';
|
||||
start1valid = true;
|
||||
} else {
|
||||
if (inputField1.value != "") {
|
||||
//inputField1.addClass("errored");
|
||||
inputField1.style.boxShadow = 'inset 0 0 2px #eb3434, 0 0 5px #eb3434';
|
||||
inputField1.style.border = '1px solid #eb3434';
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "لطفا تاریخ را بصورت صحیح وارد کنید");
|
||||
start1valid = false;
|
||||
}
|
||||
}
|
||||
return start1valid;
|
||||
}
|
||||
</script>
|
||||
@@ -1,92 +0,0 @@
|
||||
@model List<CompanyManagment.App.Contracts.Leave.LeaveViewModel>
|
||||
@{
|
||||
int i = 1;
|
||||
}
|
||||
<table id="datatable" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="font-size: 12px !important;text-align: center">#</th>
|
||||
<th style="font-size: 12px !important; text-align: center"> تاریخ شروع</th>
|
||||
<th style="font-size: 12px !important; text-align: center"> تاریخ پایان </th>
|
||||
<th style="font-size: 12px !important; text-align: center"> نوع مدت مرخصی </th>
|
||||
<th style="font-size: 12px !important; text-align: center"> مدت زمان<span>(ساعت)</span> </th>
|
||||
<th style="font-size: 12px !important; width: 20%; text-align: center">عملیات</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td style="font-size: 12px !important; text-align: center">@i </td>
|
||||
<td style="font-family: 'IranText' !important; font-size: 12px !important; text-align: center">@item.StartLeave </td>
|
||||
<td style="font-family: 'IranText' !important; font-size: 12px !important; text-align: center">
|
||||
@item.EndLeave
|
||||
</td>
|
||||
<td style="font-size: 12px !important; text-align: center">
|
||||
@item.PaidLeaveType
|
||||
</td>
|
||||
<td style="font-family: 'IranText' !important; font-size: 12px !important; text-align: center">
|
||||
@item.LeaveHourses
|
||||
</td>
|
||||
@{
|
||||
i++;
|
||||
}
|
||||
<td>
|
||||
<a class="btn btn-warning pull-right m-rl-5 rad"
|
||||
href="#showmodal=@Url.Page("/Company/Employees/Index", "EditPaidLeave", new { Id = item.Id })">
|
||||
<i class="fa faSize fa-edit"></i>
|
||||
</a>
|
||||
<a href="#" class="btn btn-danger pull-right m-rl-5 fff rad RemoveLeftWork"><i class="fa faSize fa-trash"></i></a>
|
||||
<div style="display: none">
|
||||
<input type="hidden" name="LeftworkId" value="@item.Id" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<script>
|
||||
$('.RemoveLeftWork').on("click",
|
||||
function () {
|
||||
var id = $(this).closest("div").find("input[name='LeftworkId']").val();
|
||||
$('#LeftId').val(id);
|
||||
swal({
|
||||
title: "آیا حذف این سابقه مرخصی اطمینان دارید؟",
|
||||
text: "",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
closeOnConfirm: true,
|
||||
closeOnCancel: true
|
||||
}, function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
|
||||
$('#RemoveForm').submit();
|
||||
}
|
||||
});
|
||||
});
|
||||
$('#RemoveForm').submit(function(e){
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: $(this).attr( 'action' ),
|
||||
data: $(this).serialize(),
|
||||
success: function (response) {
|
||||
if (response.isSuccedded == true) {
|
||||
$.Notification.autoHideNotify('success', 'top right', response.message);
|
||||
reloadSickLeaveList();
|
||||
}
|
||||
else{
|
||||
$.Notification.autoHideNotify('error', 'top right', response.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -1,473 +0,0 @@
|
||||
@model CompanyManagment.App.Contracts.Leave.CreateLeave
|
||||
@{
|
||||
int i = 1;
|
||||
}
|
||||
@{
|
||||
<link href="~/AdminTheme/assets/datatables/jquery.dataTables.min.css" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
|
||||
<link href="@Href("~/Clienttheme/css/sickLeave.css")" rel="stylesheet" />
|
||||
|
||||
<div class="container" id="sickLeave">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<form id="CreateForm" asp-page="./Index" asp-page-handler="CreateSickLeave" autocomplete="off" class="sickLeave"
|
||||
method="post"
|
||||
data-ajax="true"
|
||||
data-callback=""
|
||||
data-action="ReloadSickLeaveForClient">
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<fieldset style="border: 1px solid #999797; border-radius: 17px; padding: revert">
|
||||
<legend style="margin-bottom: 5px; font-size: 16px; color: #505458; width: 150px; text-align: center;"> مرخصی استعلاجی </legend>
|
||||
<div class="row m-t-10 m-b-10 d-flex">
|
||||
<div class="col-md-6 col-sm-6 col-xs-12">
|
||||
<div class="m-b-0" dir="rtl">
|
||||
<label asp-for="StartLeave" class="control-label m-r-5">تاریخ شروع مرخصی</label>
|
||||
<input id="startLeave" dir="ltr" maxlength="10" style="text-align: center" class="form-control persianDateInput" asp-for="StartLeave" />
|
||||
<span asp-validation-for="StartLeave" class="error"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-12">
|
||||
<div class="m-b-0" dir="rtl">
|
||||
<label asp-for="EndLeave" class="control-label m-r-5">تاریخ پایان مرخصی</label>
|
||||
<input id="endLeave" dir="ltr" maxlength="10" style="text-align: center" class="form-control persianDateInput" asp-for="EndLeave" />
|
||||
<span asp-validation-for="EndLeave" class="error"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div id="data-SickLeave" class="row" style="margin-top: 20px;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" asp-for="EmployeeId" />
|
||||
@*<input type="hidden" asp-for="WorkshopId" />*@
|
||||
<div class="modal-footer">
|
||||
<a class="btn btn-default btn-rounded waves-effect waves-light" data-dismiss="modal" id="close">بستن</a>
|
||||
<a onclick="createSickLeave()" class="btn btn-success btn-rounded waves-effect waves-light" style="background: #0f9500;border: #0f9500;">ذخیره</a>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<form id="RemoveForm" asp-page="./Index" asp-page-handler="RemoveSickLeave" autocomplete="off"
|
||||
method="post"
|
||||
data-ajax="true"
|
||||
data-callback="">
|
||||
<div style="display: none">
|
||||
<input type="hidden" id="LeftId" name="id" />
|
||||
|
||||
<input type="hidden" asp-for="EmployeeId" />
|
||||
|
||||
<div class="modal-footer" style="margin-bottom: 10px">
|
||||
@*<input type="submit" id="sendFinaly" form="sub" value="fine" name="fine" style="display: none" />*@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@* <form id="SickListForm" asp-page="./Index" autocomplete="off"
|
||||
method="get"
|
||||
data-ajax="true"
|
||||
data-ajax-method="get"
|
||||
data-ajax-url="@Url.Page("./Index","SickList")" >
|
||||
<div style="display: none">
|
||||
<input type="hidden" asp-for="EmployeeId" />
|
||||
<input type="hidden" asp-for="WorkshopId" />
|
||||
</div>
|
||||
</form>*@
|
||||
</div>
|
||||
<script src="~/adminTheme/assets/datatables/jquery.dataTables.min.js"></script>
|
||||
<script src="~/adminTheme/assets/datatables/dataTables.bootstrap.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
reloadSickLeaveList();
|
||||
});
|
||||
|
||||
$(document).on("click", function (event) {
|
||||
var target = $(event.target);
|
||||
if (!target.is("#sickLeave")
|
||||
&& !target.is("#sickLeave *")
|
||||
) {
|
||||
$(".datepicker-container").hide();
|
||||
}
|
||||
});
|
||||
$("#close , .close").on('click', function () {
|
||||
$(".datepicker-container").hide();
|
||||
});
|
||||
function reloadSickLeaveList(){
|
||||
|
||||
$("#data-SickLeave").html('');
|
||||
$("#data-SickLeave").html('<div class="ring"> منتظر بمانید<span></span></div>');
|
||||
$.ajax({
|
||||
url: '@Url.Page("/Company/Employees/Index", "SickList")',
|
||||
data:{"employeeId":@Model.EmployeeId,"workshopId_":@Model.WorkshopId },
|
||||
type: "Get",
|
||||
dataType: 'html',
|
||||
success: function(data) {
|
||||
$('#data-SickLeave').html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function convertDate(dateVal) {
|
||||
let dateParts = dateVal.split("/");
|
||||
var formattedDateString = dateParts[0] + "-" + dateParts[1] + "-" + dateParts[2];
|
||||
var value = new Date(formattedDateString);
|
||||
return value;
|
||||
}
|
||||
|
||||
function createSickLeave(){
|
||||
$("#CreateForm").find('.persianDateInput').each(function () {
|
||||
if ($(this).val() === '') {
|
||||
$(this).addClass('errored');
|
||||
} else {
|
||||
$(this).removeClass('errored');
|
||||
}
|
||||
})
|
||||
let table = $("#CreateForm").find('#datatable');
|
||||
table.find("tbody tr").each(function () {
|
||||
let row = $(this);
|
||||
let rowStartDate = row.find('td:eq(1)').text();
|
||||
let rowEndDate = row.find('td:eq(2)').text();
|
||||
let date1 = $('#startLeave').val();
|
||||
let date2 = $('#endLeave').val();
|
||||
|
||||
let rowStartDateVal = convertDate(rowStartDate);
|
||||
let rowEndDateVal = convertDate(rowEndDate);
|
||||
let date1Val = convertDate(date1);
|
||||
let date2Val = convertDate(date2);
|
||||
|
||||
const $existingDate1 = row.find('td:eq(1):contains("' + date1 + '")');
|
||||
if (date1Val != '' && $existingDate1.length > 0) {
|
||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', 'تاریخ شروع در ردیف ' + row.find('td:eq(0)').text() + ' وارد شده است.');
|
||||
$('#startLeave').addClass("errored");
|
||||
return;
|
||||
}
|
||||
const $existingDate2 = row.find('td:eq(2):contains("' + date2 + '")');
|
||||
if ($existingDate2.length > 0) {
|
||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', 'تاریخ پایان در ردیف ' + row.find('td:eq(0)').text() + ' وارد شده است.');
|
||||
$('#endLeave').addClass("errored");
|
||||
return;
|
||||
}
|
||||
const $existingDate3 = row.find('td:eq(2):contains("' + date1 + '")');
|
||||
if ($existingDate3.length > 0) {
|
||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', 'تاریخ شروع با تاریخ پایان در ردیف ' + row.find('td:eq(0)').text() + ' برابر است.');
|
||||
$('#endDate1').addClass("errored");
|
||||
return;
|
||||
}
|
||||
const $existingDate4 = row.find('td:eq(1):contains("' + date2 + '")');
|
||||
if ($existingDate4.length > 0) {
|
||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', 'تاریخ پایان با تاریخ شروع در ردیف ' + row.find('td:eq(0)').text() + ' برابر است.');
|
||||
$('#endLeave').addClass("errored");
|
||||
return;
|
||||
}
|
||||
if (date1Val < rowStartDateVal && rowStartDateVal < date2Val && date1Val < rowEndDateVal && rowEndDateVal < date2Val) {
|
||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', 'تاریخ با توجه به بازه وارد شده در ردیف ' + row.find('td:eq(0)').text() + ' نادرست می باشد.');
|
||||
$('#endLeave').addClass("errored");
|
||||
$('#startLeave').addClass("errored");
|
||||
return false;
|
||||
}
|
||||
if (date1Val > rowStartDateVal && date1Val < rowEndDateVal && date2Val > rowStartDateVal && date2Val < rowEndDateVal) {
|
||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', 'تاریخ با توجه به بازه وارد شده در ردیف ' + row.find('td:eq(0)').text() + ' نادرست می باشد.');
|
||||
$('#endLeave').addClass("errored");
|
||||
$('#startLeave').addClass("errored");
|
||||
return false;
|
||||
}
|
||||
if (date1Val < rowStartDateVal && date2Val > rowStartDateVal && date2Val < rowEndDateVal) {
|
||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', 'تاریخ با توجه به بازه وارد شده در ردیف ' + row.find('td:eq(0)').text() + ' نادرست می باشد.');
|
||||
$('#endLeave').addClass("errored");
|
||||
$('#startLeave').addClass("errored");
|
||||
return false;
|
||||
}
|
||||
if (date1Val > rowStartDateVal && date1Val < rowEndDateVal && date2Val > rowEndDateVal) {
|
||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', 'تاریخ با توجه به بازه وارد شده در ردیف ' + row.find('td:eq(0)').text() + ' نادرست می باشد.');
|
||||
$('#endLeave').addClass("errored");
|
||||
$('#startLeave').addClass("errored");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if ($('#CreateForm .errored').length == 0)
|
||||
{
|
||||
$("#CreateForm").submit();
|
||||
}
|
||||
}
|
||||
$('#CreateForm').submit(function(e){
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: $(this).attr( 'action' ),
|
||||
data: $(this).serialize(),
|
||||
success: function (response) {
|
||||
if (response.isSuccedded == true) {
|
||||
$.Notification.autoHideNotify('success', 'top right', response.message);
|
||||
reloadSickLeaveList();
|
||||
}
|
||||
else{
|
||||
$.Notification.autoHideNotify('error', 'top right', response.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(".persianDateInput").on('keyup', function () {
|
||||
if (event.which !== 8 && event.which !== 46) {
|
||||
let value = $(this).val();
|
||||
let lengthValue = value.length;
|
||||
if (lengthValue === 4) {
|
||||
value += '/'
|
||||
}
|
||||
if (lengthValue === 7) {
|
||||
value += '/'
|
||||
}
|
||||
$(this).val(value);
|
||||
}
|
||||
});
|
||||
$(".persianDateInput").on('blur', function () {
|
||||
let value = $(this).val();
|
||||
let lengthValue = value.length;
|
||||
if (!dateValidCheck(this)) {
|
||||
$(this).addClass("errored");
|
||||
}
|
||||
else {
|
||||
$(this).removeClass("errored");
|
||||
}
|
||||
});
|
||||
function checkEnValid(fixDate1) {
|
||||
|
||||
let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
|
||||
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
|
||||
fixNumbers = function (str) {
|
||||
if (typeof str === 'string') {
|
||||
for (var i = 0; i < 10; i++) {
|
||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
};
|
||||
let getdate = fixDate1;
|
||||
|
||||
let m1, m2;
|
||||
let y1, y2, y3, y4;
|
||||
let d1, d2;
|
||||
for (let i = 0; i < getdate.length; i++) {
|
||||
if (i === 0) {
|
||||
y1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 1) {
|
||||
y2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 2) {
|
||||
y3 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 3) {
|
||||
y4 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 5) {
|
||||
m1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 6) {
|
||||
m2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 8) {
|
||||
d1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 9) {
|
||||
d2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
|
||||
}
|
||||
let yRes = y1 + y2 + y3 + y4;
|
||||
let year = parseInt(yRes);
|
||||
let mRes = m1 + m2;
|
||||
let month = parseInt(mRes);
|
||||
let dRes = d1 + d2;
|
||||
let day = parseInt(dRes);
|
||||
let kabiseh = false;
|
||||
if (month <= 6 && day > 31) {
|
||||
return false;
|
||||
}
|
||||
else if (month > 6 && month < 12 && day > 30) {
|
||||
return false;
|
||||
} else if (month === 12) {
|
||||
|
||||
switch (year) {
|
||||
case 1346:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1350:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1354:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1358:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1362:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1366:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1370:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1375:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1379:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1383:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1387:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1391:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1395:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1399:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1403:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1408:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1412:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1416:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1420:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1424:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1428:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1432:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1436:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1441:
|
||||
kabiseh = true;
|
||||
break;
|
||||
case 1445:
|
||||
kabiseh = true;
|
||||
break;
|
||||
default:
|
||||
kabiseh = false;
|
||||
|
||||
}
|
||||
if (kabiseh == true && day > 30) {
|
||||
return false;
|
||||
} else if (kabiseh == false && day > 29) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
function dateValidcheck(inputField1) {
|
||||
let persianNumbers = [/۰/g, /۱/g, /۲/g, /۳/g, /۴/g, /۵/g, /۶/g, /۷/g, /۸/g, /۹/g],
|
||||
arabicNumbers = [/٠/g, /١/g, /٢/g, /٣/g, /٤/g, /٥/g, /٦/g, /٧/g, /٨/g, /٩/g],
|
||||
fixNumbers = function (str) {
|
||||
if (typeof str === 'string') {
|
||||
for (var i = 0; i < 10; i++) {
|
||||
str = str.replace(persianNumbers[i], i).replace(arabicNumbers[i], i);
|
||||
}
|
||||
}
|
||||
return str;
|
||||
};
|
||||
let getdate = inputField1.value;
|
||||
|
||||
let m1, m2;
|
||||
let y1, y2, y3, y4;
|
||||
let d1, d2;
|
||||
let s1, s2;
|
||||
for (var i = 0; i < getdate.length; i++) {
|
||||
if (i === 0) {
|
||||
y1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 1) {
|
||||
y2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 2) {
|
||||
y3 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 3) {
|
||||
y4 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 4) {
|
||||
s1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 5) {
|
||||
m1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 6) {
|
||||
m2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 7) {
|
||||
s2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 8) {
|
||||
d1 = fixNumbers(getdate[i]);
|
||||
}
|
||||
if (i === 9) {
|
||||
d2 = fixNumbers(getdate[i]);
|
||||
}
|
||||
|
||||
}
|
||||
let yRes = y1 + y2 + y3 + y4;
|
||||
let year = parseInt(yRes);
|
||||
let mRes = m1 + m2;
|
||||
let month = parseInt(mRes);
|
||||
let dRes = d1 + d2;
|
||||
let day = parseInt(dRes);
|
||||
let fixResult = yRes + s1 + mRes + s2 + dRes;
|
||||
let test1 = checkEnValid(inputField1.value);
|
||||
|
||||
let isValid = /^([1][3-4][0-9][0-9][/])([0][1-9]|[1][0-2])([/])([0][1-9]|[1-2][0-9]|[3][0-1])$/.test(fixResult);
|
||||
|
||||
|
||||
if (isValid && test1) {
|
||||
//inputField1.addClass("errored");
|
||||
inputField1.style.boxShadow = 'none';
|
||||
inputField1.style.border = '1px solid #c7c7c7';
|
||||
start1valid = true;
|
||||
} else {
|
||||
if (inputField1.value != "") {
|
||||
//inputField1.addClass("errored");
|
||||
inputField1.style.boxShadow = 'inset 0 0 2px #eb3434, 0 0 5px #eb3434';
|
||||
inputField1.style.border = '1px solid #eb3434';
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', "لطفا تاریخ را بصورت صحیح وارد کنید");
|
||||
start1valid = false;
|
||||
}
|
||||
}
|
||||
return start1valid;
|
||||
}
|
||||
</script>
|
||||
@@ -1,97 +0,0 @@
|
||||
@model List<CompanyManagment.App.Contracts.Leave.LeaveViewModel>
|
||||
@{
|
||||
int i = 1;
|
||||
}
|
||||
<div class="m-t-10">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title"><i class="fa fa-list" style="padding-left: 3px; font-size: 14px"></i> سوابق مرخصی استعلاجی </h3>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-sm-12 col-xs-12 table-container ">
|
||||
<table id="datatable" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="font-size: 12px !important;text-align: center">#</th>
|
||||
<th style="font-size: 12px !important; text-align: center"> تاریخ شروع</th>
|
||||
<th style="font-size: 12px !important; text-align: center"> تاریخ پایان </th>
|
||||
<th style="font-size: 12px !important; width: 25%; text-align: center">عملیات</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td style="font-size: 12px !important; text-align: center">@i </td>
|
||||
<td style="font-size: 12px !important; text-align: center">@item.StartLeave </td>
|
||||
<td style="font-size: 12px !important; text-align: center">
|
||||
@item.EndLeave
|
||||
</td>
|
||||
@{
|
||||
i++;
|
||||
}
|
||||
<td class="operationBtns">
|
||||
<a class="btn btn-warning pull-right m-rl-5 rad"
|
||||
href="#showmodal=@Url.Page("/Company/Employees/Index", "EditSickLeave", new { Id = item.Id })">
|
||||
<i class="fa faSize fa-edit"></i>
|
||||
</a>
|
||||
<a href="#" class="btn btn-danger pull-right m-rl-5 fff rad RemoveLeftWork"><i class="fa faSize fa-trash"></i></a>
|
||||
<div style="display: none">
|
||||
<input type="hidden" name="LeftworkId" value="@item.Id" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$('.RemoveLeftWork').on("click",
|
||||
function () {
|
||||
var id = $(this).closest("div").find("input[name='LeftworkId']").val();
|
||||
$('#LeftId').val(id);
|
||||
swal({
|
||||
title: "آیا حذف این سابقه مرخصی اطمینان دارید؟",
|
||||
text: "",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "بله",
|
||||
cancelButtonText: "خیر",
|
||||
closeOnConfirm: true,
|
||||
closeOnCancel: true
|
||||
}, function (isConfirm) {
|
||||
if (isConfirm) {
|
||||
|
||||
$('#RemoveForm').submit();
|
||||
}
|
||||
});
|
||||
});
|
||||
$('#RemoveForm').submit(function(e){
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: $(this).attr( 'action' ),
|
||||
data: $(this).serialize(),
|
||||
success: function (response) {
|
||||
if (response.isSuccedded == true) {
|
||||
$.Notification.autoHideNotify('success', 'top right', response.message);
|
||||
reloadSickLeaveList();
|
||||
}
|
||||
else{
|
||||
$.Notification.autoHideNotify('error', 'top right', response.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -1,138 +0,0 @@
|
||||
@model CompanyManagment.App.Contracts.Checkout.CreateCheckout
|
||||
@{
|
||||
|
||||
int i = 1;
|
||||
int b = 0;
|
||||
}
|
||||
@if (Model.Contracts != null)
|
||||
{
|
||||
@foreach (var item in Model.Contracts)
|
||||
{
|
||||
<tr class="contractList">
|
||||
@if (item.RedColor)
|
||||
{
|
||||
<input type="hidden" name="redColor" />
|
||||
}
|
||||
@if (item.MoreThanOneMonth && item.Waiting == false)
|
||||
{
|
||||
<input type="hidden" value="@item.EmployeeName" name="MoreThanOneMonth" />
|
||||
}
|
||||
else if (item.Waiting && item.MoreThanOneMonth == false)
|
||||
{
|
||||
<input type="hidden" value="@item.EmployeeName" name="Waiting" />
|
||||
}
|
||||
else if (item.Waiting && item.MoreThanOneMonth)
|
||||
{
|
||||
<input type="hidden" value="@item.EmployeeName" name="MixWatingAndMore" />
|
||||
}
|
||||
|
||||
<td class="@(i==Model.Contracts.Count?"last-row-first-child":"")" style="font-size: 12px !important; text-align: center;">
|
||||
@i
|
||||
</td>
|
||||
<td style="font-size: 12px !important; text-align: center;">
|
||||
|
||||
@if (item.Extension)
|
||||
{
|
||||
|
||||
<input type="checkbox" class="chekedId" name="cheking" value="@item.EmployeeId" />
|
||||
b++;
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (item.RedColor)
|
||||
{
|
||||
<input type="checkbox" value="@item.EmployeeId" disabled="disabled" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="checkbox" name="cheking" value="@item.EmployeeId" />
|
||||
}
|
||||
|
||||
}
|
||||
</td>
|
||||
<td style="font-size: 12px !important; text-align: center;">
|
||||
<input type="text" class="pCode form-control" disabled="disabled" name="@item.EmployeeId" value="@item.PersonnelCode" />
|
||||
</td>
|
||||
<td class="@(i==Model.Contracts.Count?"last-row-last-child":"")" style="font-size: 12px !important; text-align: center;">
|
||||
@item.EmployeeName
|
||||
</td>
|
||||
@{
|
||||
i++;
|
||||
}
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
//var redCheck = $('.redColor').val();
|
||||
//if (redCheck == true) {
|
||||
// console.log("ok");
|
||||
// $('.redColor').closest('tr').css("background", "red");
|
||||
//}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('.chekedId').on('change', function () {
|
||||
let pname = this.value;
|
||||
let inputElement = document.querySelector('input[name="' + pname + '"]');
|
||||
if (this.checked) {
|
||||
|
||||
inputElement.disabled = false;
|
||||
inputElement.style.backgroundColor = '#fff';
|
||||
|
||||
} else {
|
||||
inputElement.disabled = true;
|
||||
inputElement.style.backgroundColor = '#e9e9e9';
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
var checkboxes = document.getElementsByName('redColor');
|
||||
for (var i = 0, n = checkboxes.length; i < n; i++) {
|
||||
checkboxes[i].parentNode.style.background = "rgb(248 251 196)";
|
||||
}
|
||||
var checkboxes = document.getElementsByName('Waiting');
|
||||
for (var i = 0, n = checkboxes.length; i < n; i++) {
|
||||
checkboxes[i].parentNode.style.background = "#ffcd40";
|
||||
}
|
||||
var checkboxes = document.getElementsByName('MoreThanOneMonth');
|
||||
for (var i = 0, n = checkboxes.length; i < n; i++) {
|
||||
checkboxes[i].parentNode.style.background = "#daf9ca";
|
||||
}
|
||||
var checkboxes = document.getElementsByName('MixWatingAndMore');
|
||||
for (var i = 0, n = checkboxes.length; i < n; i++) {
|
||||
checkboxes[i].parentNode.style.background = "#ffcd40";
|
||||
}
|
||||
var checkboxes2 = document.getElementsByName('MixWatingAndMore');
|
||||
//for (var s = 0, m = checkboxes2.length; s < m; s++) {
|
||||
// $('#alarm').append(
|
||||
|
||||
// '<h5 style="color:red; direction: rtl;" class="ConvertErr"><span> مدت قرارد </span> <span> </span><span>' + checkboxes2[s].value + '</span> <span> </span><span> بیش از یک ماه است</span></h5>'
|
||||
// + '<h5 style="color: #ffa12c; direction: rtl;" class="ConvertErr"><span> از آخرین قرارداد </span> <span> </span><span>' + checkboxes2[s].value + '</span> <span> </span><span> تا تاریخ تبدیل انتخاب شده هیچ قراردادی وجود ندارد</span></h5>'
|
||||
// );
|
||||
//}
|
||||
//var checkboxes2 = document.getElementsByName('MoreThanOneMonth');
|
||||
//for (var b = 0, m = checkboxes2.length; b < m; b++) {
|
||||
// $('#alarm').append(
|
||||
|
||||
// '<h5 style="color:red; direction: rtl;" class="ConvertErr"><span> مدت قرارد </span> <span> </span><span>' + checkboxes2[b].value + '</span> <span> </span><span> بیش از یک ماه است</span></h5>'
|
||||
|
||||
// );
|
||||
//}
|
||||
|
||||
//var checkboxes3 = document.getElementsByName('Waiting');
|
||||
//for (var a = 0, f = checkboxes3.length; a < f; a++) {
|
||||
// $('#alarm').append(
|
||||
|
||||
// '<h5 style="color: #ffa12c; direction: rtl;" class="ConvertErr"><span> از آخرین قرارداد </span> <span> </span><span>' + checkboxes3[a].value + '</span> <span> </span><span> تا تاریخ تبدیل انتخاب شده هیچ قراردادی وجود ندارد</span></h5>'
|
||||
|
||||
// );
|
||||
//}
|
||||
/*ff8f8d*/
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,751 +0,0 @@
|
||||
@model CompanyManagment.App.Contracts.Workshop.CreateWorkshop
|
||||
@{
|
||||
var hasEmployer = true;
|
||||
var isLegal = false;
|
||||
if (Model.Employers != null && Model.Employers.Count > 0)
|
||||
{
|
||||
isLegal = Model.Employers.Any(x => x.IsLegal == "حقوقی");
|
||||
}
|
||||
else
|
||||
{
|
||||
hasEmployer = false;
|
||||
}
|
||||
<style>
|
||||
|
||||
</style>
|
||||
}
|
||||
<link href="~/lib/select2/css/select2.css" rel="stylesheet"/>
|
||||
|
||||
|
||||
<form asp-page="./Index" asp-page-handler="Create" id="saveForm" class="@(!hasEmployer ? "hidden" : "") createWorkshopForm col-sm-11 col-md-12 col-xs-12 col-lg-11" autocomplete="off"
|
||||
method="post"
|
||||
data-ajax="true"
|
||||
data-callback=""
|
||||
data-action="Refresh"
|
||||
enctype="multipart/form-data">
|
||||
|
||||
@if (Model.Employers != null)
|
||||
{
|
||||
for (var i = 0; i < Model.Employers.Count(); i++)
|
||||
{
|
||||
<input type="hidden" asp-for="EmployerIdList[i]"/>
|
||||
}
|
||||
}
|
||||
<fieldset id="saveWorkshop" class="content-fieldset mt-5">
|
||||
<legend class="main-title">مشخصات کارگاه</legend>
|
||||
<div class="form-box">
|
||||
<div class="steps">
|
||||
<div class="progressBar"></div>
|
||||
<div class="step"> مشخصات اصلی </div>
|
||||
<div class="step"> امور قرارداد </div>
|
||||
<div class="step"> امور بیمه ای </div>
|
||||
</div>
|
||||
<div class="form form1">
|
||||
<div class="row inputs">
|
||||
<div class="right col-md-4 col-sm-6 col-xs-12">
|
||||
<label class="input-label">نام کارگاه <span style="color: red;">*</span></label>
|
||||
<input asp-for="WorkshopName" type="text" class="form-control not-empty"/>
|
||||
|
||||
</div>
|
||||
<div class="right col-md-4 col-sm-6 col-xs-12">
|
||||
<label class="input-label"> نام مستعار کارگاه</label>
|
||||
<input asp-for="WorkshopSureName" type="text" placeholder="" class="form-control" pattern="[\u0600-\u06FF\s]*"/>
|
||||
<i class="fa fa-exclamation-circle error-icon"></i>
|
||||
<p class="error-message">فقط حروف فارسی وارد شود.</p>
|
||||
</div>
|
||||
<div class="right col-md-2 col-sm-6 col-xs-12">
|
||||
<label class="input-label"> نوع تملک </label>
|
||||
<select asp-for="TypeOfOwnership" class="form-control">
|
||||
<option value="" selected class="input"> </option>
|
||||
<option value="">مالکیت</option>
|
||||
<option value="">استیجاری</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="right col-md-2 col-sm-6 col-xs-12">
|
||||
<label class="input-label">شماره بایگانی</label>
|
||||
<input asp-for="ArchiveCode" type="text" class="form-control text-center" pattern="\d*"/>
|
||||
<i class="fa fa-exclamation-circle error-icon"></i>
|
||||
<p class="error-message">فقط عدد وارد شود.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row inputs">
|
||||
<div id="divState" class="right col-md-4 col-sm-4 col-xs-12">
|
||||
<label class="input-label">نام استان <span style="color: red;">*</span></label>
|
||||
<select class="form-control select-city" asp-for="State" name="state" onChange="iranwebsv(this.value);">
|
||||
<option value="">انتخاب استان</option>
|
||||
<option value="تهران"> تهران </option>
|
||||
<option value="گیلان"> گیلان </option>
|
||||
<option value="آذربایجان شرقی"> آذربایجان شرقی</option>
|
||||
<option value="خوزستان"> خوزستان </option>
|
||||
<option value="فارس"> فارس</option>
|
||||
<option value="اصفهان"> اصفهان</option>
|
||||
<option value="خراسان رضوی">خراسان رضوی </option>
|
||||
<option value="قزوین"> قزوین</option>
|
||||
<option value="سمنان"> سمنان </option>
|
||||
<option value="قم"> قم</option>
|
||||
<option value="مرکزی"> مرکزی</option>
|
||||
<option value="زنجان"> زنجان</option>
|
||||
<option value="مازندران"> مازندران</option>
|
||||
<option value="گلستان"> گلستان</option>
|
||||
<option value="اردبیل"> اردبیل </option>
|
||||
<option value="آذربایجان غربی"> آذربایجان غربی</option>
|
||||
<option value="همدان"> همدان </option>
|
||||
<option value="کردستان"> کردستان </option>
|
||||
<option value="کرمانشاه"> کرمانشاه </option>
|
||||
<option value="لرستان"> لرستان</option>
|
||||
<option value="بوشهر"> بوشهر</option>
|
||||
<option value="کرمان"> کرمان</option>
|
||||
<option value="هرمزگان"> هرمزگان</option>
|
||||
<option value="چهارمحال و بختیاری"> چهارمحال و بختیاری</option>
|
||||
<option value="یزد"> یزد</option>
|
||||
<option value="سیستان و بلوچستان"> سیستان و بلوچستان</option>
|
||||
<option value="ایلام"> ایلام</option>
|
||||
<option value="کهگلویه و بویراحمد"> کهگلویه و بویراحمد</option>
|
||||
<option value="خراسان شمالی"> خراسان شمالی</option>
|
||||
<option value="خراسان جنوبی"> خراسان جنوبی</option>
|
||||
<option value="البرز"> البرز</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="divCity" class="right col-md-4 col-sm-4 col-xs-12">
|
||||
<label class="input-label">نام شهر <span style="color: red;">*</span></label>
|
||||
<select class="form-control select-city" name="cityy" id="city" onchange="changecity(this)">
|
||||
<option value="0" placeholder="انتخاب شهر"> </option>
|
||||
</select>
|
||||
<input type="hidden" value="" id="hide2" asp-for="City">
|
||||
</div>
|
||||
<div class="right col-md-4 col-sm-4 col-xs-12 zone-wrapper">
|
||||
<div class="right w-100">
|
||||
<label class="input-label">نام محله </label>
|
||||
<input type="text" asp-for="ZoneName" class="right col-md-10 form-control" pattern="[\u0600-\u06FF\s]*"/>
|
||||
<i class="fa fa-exclamation-circle error-icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row inputs">
|
||||
<div class="right col-md-12 col-sm-12 col-xs-12">
|
||||
<label class="input-label">جزئیات نشانی<span style="color: red;">*</span> </label>
|
||||
<input asp-for="Address" type="text" class="form-control not-empty"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form form2">
|
||||
<div class="flex-box">
|
||||
<div class="row input-boxes">
|
||||
<fieldset class="right col-md-12 col-sm-12 col-xs-12 content-fieldset contract-box">
|
||||
<div class="form2-title">لطفا مدت قرارداد خود را انتخاب کنید :</div>
|
||||
<div class="col-md-1"></div>
|
||||
<div class="flexible-div flexible-radio col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">1 ماهه</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">2 ماهه</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">3 ماهه</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">6 ماهه</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">1 ساله</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">دائمی</span>
|
||||
</div>
|
||||
<input type="hidden" id="asp-contract-hidden" asp-for="ContractTerm"/>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="row input-boxes">
|
||||
<div class="options-box right col-md-12">
|
||||
<div class="options-info"> در صورت تمایل به محاسبه ی عناوین ذیل در فیش حقوقی، گزینه های موردنظر را فعال نمایید </div>
|
||||
<div class="optional-wages flexible-div">
|
||||
<div class="d-flex options-check col-lg-6 col-md-6 col-sm-6 col-xs-7">
|
||||
<div class="checkbox-wrapper-2">
|
||||
<label class="toggleButton">
|
||||
<input type="checkbox" asp-for="AddLeavePay" class="activated">
|
||||
<div>
|
||||
<svg viewBox="0 0 44 44">
|
||||
<path d="M14,24 L21,31 L39.7428882,11.5937758 C35.2809627,6.53125861 30.0333333,4 24,4 C12.95,4 4,12.95 4,24 C4,35.05 12.95,44 24,44 C35.05,44 44,35.05 44,24 C44,19.3 42.5809627,15.1645919 39.7428882,11.5937758" transform="translate(-2.000000, -2.000000)"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<span class="options-type">مزد و مرخصی </span>
|
||||
</div>
|
||||
<div class="d-flex options-check col-lg-6 col-md-6 col-sm-6 col-xs-7">
|
||||
<div class="checkbox-wrapper-2">
|
||||
<label class="toggleButton">
|
||||
<input type="checkbox" asp-for="AddYearsPay" class="activated">
|
||||
<div>
|
||||
<svg viewBox="0 0 44 44">
|
||||
<path d="M14,24 L21,31 L39.7428882,11.5937758 C35.2809627,6.53125861 30.0333333,4 24,4 C12.95,4 4,12.95 4,24 C4,35.05 12.95,44 24,44 C35.05,44 44,35.05 44,24 C44,19.3 42.5809627,15.1645919 39.7428882,11.5937758" transform="translate(-2.000000, -2.000000)"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<span class="options-type">سنوات </span>
|
||||
</div>
|
||||
<div class="d-flex options-check col-lg-6 col-md-6 col-sm-6 col-xs-7">
|
||||
<div class="checkbox-wrapper-2">
|
||||
<label class="toggleButton">
|
||||
<input type="checkbox" asp-for="AddBonusesPay" class="activated">
|
||||
<div>
|
||||
<svg viewBox="0 0 44 44">
|
||||
<path d="M14,24 L21,31 L39.7428882,11.5937758 C35.2809627,6.53125861 30.0333333,4 24,4 C12.95,4 4,12.95 4,24 C4,35.05 12.95,44 24,44 C35.05,44 44,35.05 44,24 C44,19.3 42.5809627,15.1645919 39.7428882,11.5937758" transform="translate(-2.000000, -2.000000)"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<span class="options-type"> عیدی و پاداش </span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row inputs">
|
||||
<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
|
||||
<div class="optional-wages d-flex">
|
||||
<div class="d-flex single-checkbox">
|
||||
<span class="options-type" style="width: 100%;">مجموع مبالغ تصفیه حساب در ذیل فرم نمایش داده شود</span>
|
||||
<div class="checkbox-wrapper-2">
|
||||
<label class="toggleButton">
|
||||
<input type="checkbox" class="activated" @*data-val="true"*@ @*data-val-required="The AddLeavePay field is required."*@ @*id="AddLeavePay"*@ @*name="AddLeavePay"*@ value="true">
|
||||
<div>
|
||||
<svg viewBox="0 0 44 44">
|
||||
<path d="M14,24 L21,31 L39.7428882,11.5937758 C35.2809627,6.53125861 30.0333333,4 24,4 C12.95,4 4,12.95 4,24 C4,35.05 12.95,44 24,44 C35.05,44 44,35.05 44,24 C44,19.3 42.5809627,15.1645919 39.7428882,11.5937758" transform="translate(-2.000000, -2.000000)"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form form3">
|
||||
<div class="row inputs">
|
||||
<div class="right col-md-12 form3-boxes">
|
||||
<div class="right col-md-6">
|
||||
<label class="input-label d-block"><input type="checkbox" value="NormalList" asp-for="TypeOfInsuranceSend" class="checkboxes sendList"> ارسال لیست بیمه کارگاه عادی</label>
|
||||
<label class="input-label d-block"><input type="checkbox" value="Govermentlist" asp-for="TypeOfInsuranceSend" class="checkboxes sendList">ارسال لیست بیمه کارگاه کمک دولت </label>
|
||||
<label class="input-label d-block"><input type="checkbox" value="Familylist" asp-for="TypeOfInsuranceSend" class="checkboxes sendList"> ارسال لیست بیمه کارگاه خانوادگی</label>
|
||||
</div>
|
||||
<div class="right col-md-3 col-sm-12 col-xs-12 disabled insuranceCode">
|
||||
<label class="input-label">کد کارگاهی بیمه</label>
|
||||
<input asp-for="InsuranceCode" type="text" class="form-control text-center" pattern="\d*"/>
|
||||
<i class="fa fa-exclamation-circle error-icon"></i>
|
||||
<p class="error-message">فقط عدد وارد شود.</p>
|
||||
</div>
|
||||
<div class="right col-md-3 col-sm-12 col-xs-12 disabled AgreementNumber">
|
||||
<label class="input-label"> ردیف پیمان</label>
|
||||
<input type="text" value="000" asp-for="AgreementNumber" class="form-control" id="zeros" pattern="\d*"/>
|
||||
<i class="fa fa-exclamation-circle error-icon"></i>
|
||||
<p class="error-message">فقط عدد وارد شود.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row inputs">
|
||||
<div class="right col-md-12 form3-boxes disabled fixedSalarySection">
|
||||
<div class="right col-md-12" style="margin-bottom: 10px;">
|
||||
<label class="input-label"><input type="checkbox" asp-for="FixedSalary" class="fixedSalary checkboxes"> این کارگاه مشمول دستمزد مقطوع می باشد</label>
|
||||
</div>
|
||||
<div class="disabled insuranceJob">
|
||||
<div>
|
||||
<div id="divInsuranceJobId" class="right col-md-8 col-sm-6 col-xs-12">
|
||||
<label class="input-label"> عنوان صنف و درجه / کد اقتصادی </label>
|
||||
<select class="select-city form-control" id="createjobName" asp-for="InsuranceJobId" asp-items="@Model.InsuranceJobViewModels">
|
||||
<option value="" disabled selected> </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="right col-md-4 col-sm-6 col-xs-12">
|
||||
<label class="input-label"> جمعیت شهر </label>
|
||||
<select class="input" id="population" asp-for="Population">
|
||||
<option value="" disabled selected> </option>
|
||||
<option value="LessThan500">کمتر از 500000 نفر </option>
|
||||
<option value="MoreThan500">بیشتر از 500000 نفر</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="isLegal" value="@isLegal"/>
|
||||
@*<div class="btns d-flex">
|
||||
<div class="col-md-9"></div>
|
||||
<div class="col-md-3">
|
||||
<a class=" btn btn-modal pre" onclick="prevButton($(this))">مرحله قبل</a>
|
||||
<a class=" btn btn-modal next" onclick="nextButton($(this))">مرحله بعد</a>
|
||||
</div>
|
||||
|
||||
</div>*@
|
||||
<div class="form-footer-btns">
|
||||
<a class="btn btn-modal pre" onclick="prevButton($(this))">مرحله قبل</a>
|
||||
<a class="btn btn-modal next" onclick="nextButton($(this))">مرحله بعد</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-footer">
|
||||
<a class="btn btn-rounded waves-effect waves-light bg-white closeForm">بستن</a>
|
||||
<a href="#" class=" btn btn-success btn-rounded waves-effect waves-light aEmployers save">ذخیره</a>
|
||||
</div>
|
||||
</fieldset>
|
||||
@if (Model.AccountIdsList != null)
|
||||
{
|
||||
for (var i = 0; i < Model.AccountIdsList.Count(); i++)
|
||||
{
|
||||
<input type="hidden" asp-for="AccountIdsList[i]"/>
|
||||
}
|
||||
}
|
||||
</form>
|
||||
|
||||
@if (!hasEmployer)
|
||||
{
|
||||
<div class="alert alert-danger">
|
||||
شما هنوز کارفرمایی ثبت نکرده اید، برای ثبت کارگاه ابتدا فرم ثبت کارفرما را تکمیل نمایید.
|
||||
</div>
|
||||
}
|
||||
<script language="javascript" src="~/AdminTheme/js/city.js"></script>
|
||||
<script src="~/lib/select2/js/select2.js"></script>
|
||||
<script src="~/lib/select2/js/i18n/fa.js"></script>
|
||||
<script>
|
||||
$(".closeForm").click(function() {
|
||||
$(".createWorkshopForm").slideUp(500);
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$("#asp-contract-hidden").val(1);
|
||||
$('span.contractDuration:contains("1 ماهه")').addClass("contActive");
|
||||
adjustFormBoxHeight();
|
||||
contractDuration();
|
||||
checkContractDuration();
|
||||
$('.error-message').hide();
|
||||
$('.error-icon').hide();
|
||||
$(".select-city").select2({
|
||||
language: "fa",
|
||||
dir: "rtl"
|
||||
});
|
||||
|
||||
|
||||
$('.activated').prop('checked', true);
|
||||
});
|
||||
|
||||
$('.form-control').on('keyup',
|
||||
function() {
|
||||
const errorMessage = $(this).parent().find('.error-message');
|
||||
const errorIcon = $(this).parent().find('.error-icon');
|
||||
if (this.validity.patternMismatch) {
|
||||
errorMessage.show();
|
||||
errorIcon.show();
|
||||
$(this).addClass('errored');
|
||||
$(this).addClass('patternMisMatch');
|
||||
|
||||
} else {
|
||||
errorMessage.hide();
|
||||
errorIcon.hide();
|
||||
$(this).removeClass('errored');
|
||||
$(this).removeClass('patternMisMatch');
|
||||
}
|
||||
});
|
||||
|
||||
const myCheckbox = $('.sendList');
|
||||
const myCheckbox2 = $('.fixedSalary');
|
||||
const myDiv = $('.fixedSalarySection');
|
||||
const myDiv2 = $('.AgreementNumber');
|
||||
const myDiv3 = $('.insuranceJob');
|
||||
const myDiv4 = $('.insuranceCode');
|
||||
|
||||
myCheckbox.on('change',
|
||||
function() {
|
||||
const isLegal = "@isLegal";
|
||||
//console.log(isLegal);
|
||||
if ($(this).is(':checked') && isLegal == "False") {
|
||||
myDiv.removeClass('disabled');
|
||||
} else {
|
||||
myDiv.addClass('disabled');
|
||||
}
|
||||
});
|
||||
myCheckbox.on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked')) {
|
||||
myDiv2.removeClass('disabled');
|
||||
} else {
|
||||
myDiv2.addClass('disabled');
|
||||
}
|
||||
});
|
||||
myCheckbox2.on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked')) {
|
||||
myDiv3.removeClass('disabled');
|
||||
} else {
|
||||
myDiv3.addClass('disabled');
|
||||
}
|
||||
});
|
||||
myCheckbox.on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked')) {
|
||||
myDiv4.removeClass('disabled');
|
||||
} else {
|
||||
myDiv4.addClass('disabled');
|
||||
}
|
||||
});
|
||||
|
||||
$(window).on('resize',
|
||||
function() {
|
||||
adjustFormBoxHeight();
|
||||
});
|
||||
|
||||
function adjustFormBoxHeight() {
|
||||
const formBoxHeight = Math.max($('.form1').height(), $('.form2').height(), $('.form3').height());
|
||||
$('.form-box').height(formBoxHeight + 50);
|
||||
}
|
||||
|
||||
$(".save").click(function() {
|
||||
//checkAddress();
|
||||
$("#saveWorkshop").find('input.not-empty').each(function() {
|
||||
if ($(this).val() === '') {
|
||||
$(this).addClass('errored');
|
||||
} else {
|
||||
$(this).removeClass('errored');
|
||||
}
|
||||
});
|
||||
const option1 = document.getElementById("city").options.selectedIndex;
|
||||
if (option1 == 0) {
|
||||
$("#divCity .select2-selection").addClass('errored');
|
||||
} else {
|
||||
$("#divCity .select2-selection").removeClass('errored');
|
||||
}
|
||||
const option2 = document.getElementById("State").options.selectedIndex;
|
||||
if (option2 == 0) {
|
||||
$("#divState .select2-selection").addClass('errored');
|
||||
} else {
|
||||
$("#divState .select2-selection").removeClass('errored');
|
||||
}
|
||||
|
||||
const selectCity = $('#city.select-city');
|
||||
const selectedCityOption = selectCity.find('option:selected');
|
||||
$('#hide2').val(selectedCityOption.text());
|
||||
if ($("#ArchiveCode").val() != "" && $("#ArchiveCode").val() == "0") {
|
||||
$("#ArchiveCode").addClass('errored');
|
||||
} else {
|
||||
$("#ArchiveCode").removeClass('errored');
|
||||
}
|
||||
//if($('.sendList').is(':checked') && ($("#InsuranceCode").val()==""||$("#InsuranceCode").val()==""))
|
||||
//{
|
||||
// $("input[name='InsuranceCode']").addClass('errored');
|
||||
//}
|
||||
// else
|
||||
// {
|
||||
// $("input[name='InsuranceCode']").removeClass('errored');
|
||||
//}
|
||||
//if($('.fixedSalary').is(':checked') && ($("#InsuranceJobId").val()==null||$("#InsuranceJobId").val()==""))
|
||||
//{
|
||||
// $("#divInsuranceJobId").find(".select2-container").addClass('errored');
|
||||
//}
|
||||
// else
|
||||
// {
|
||||
// $("#divInsuranceJobId").find(".select2-container").removeClass('errored');
|
||||
//}
|
||||
|
||||
//if($('.fixedSalary').is(':checked') && ($("#Population").val()==null||$("#Population").val()==""))
|
||||
//{
|
||||
// $("select[name='Population']").addClass('errored');
|
||||
//}
|
||||
// else
|
||||
// {
|
||||
// $("select[name='Population']").removeClass('errored');
|
||||
//}
|
||||
if ($("#saveWorkshop").find('input.errored').length > 0 || $("#saveWorkshop").find('.select2-selection.errored').length > 0 || $("#saveWorkshop").find('input.patternMisMatch').length > 0 || $("#divCity").find(".select2-container.errored").length > 0 || $("#divState").find(".select2-container.errored").length > 0) {
|
||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', "لطفا موارد اجباری را تکمیل کنید.");
|
||||
} else {
|
||||
|
||||
$("#saveForm").submit();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$('#saveForm').submit(function(e) {
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: $(this).attr('action'),
|
||||
data: $(this).serialize(),
|
||||
success: function(response) {
|
||||
if (response.isSuccedded == true) {
|
||||
$.Notification.autoHideNotify('success', 'top center', response.message);
|
||||
|
||||
getCreate();
|
||||
getWorkshopList();
|
||||
$("#divDisplay").slideToggle(400);
|
||||
} else {
|
||||
$.Notification.autoHideNotify('error', 'top center', response.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
function nextButton(element) {
|
||||
let nextBtn = element;
|
||||
let prevBtn = element.parent().parent().parent().find(".pre");
|
||||
let form1 = element.parent().parent().parent().find(".form1");
|
||||
let form2 = element.parent().parent().parent().find(".form2");
|
||||
let form3 = element.parent().parent().parent().find(".form3");
|
||||
let progressBar = element.parent().parent().parent().find(".progressBar");
|
||||
|
||||
//checkAddress();
|
||||
|
||||
$("#saveWorkshop").find('input.not-empty').each(function() {
|
||||
if ($(this).val() === '') {
|
||||
$(this).addClass('errored');
|
||||
} else {
|
||||
$(this).removeClass('errored');
|
||||
}
|
||||
});
|
||||
var option1 = document.getElementById("city").options.selectedIndex;
|
||||
if (option1 == 0) {
|
||||
$("#divCity .select2-selection").addClass('errored');
|
||||
} else {
|
||||
$("#divCity .select2-selection").removeClass('errored');
|
||||
}
|
||||
var option2 = document.getElementById("State").options.selectedIndex;
|
||||
if (option2 == 0) {
|
||||
$("#divState .select2-selection").addClass('errored');
|
||||
} else {
|
||||
$("#divState .select2-selection").removeClass('errored');
|
||||
}
|
||||
|
||||
if ($("#ArchiveCode").val() != "" && $("#ArchiveCode").val() == "0") {
|
||||
$("#ArchiveCode").addClass('errored');
|
||||
} else {
|
||||
$("#ArchiveCode").removeClass('errored');
|
||||
}
|
||||
|
||||
|
||||
if ($('input.errored').length === 0 && $('input.patternMisMatch').length === 0 && $("#divCity").find(".select2-container.errored").length == 0 && $("#divState").find(".select2-container.errored").length == 0) {
|
||||
if (form3.css('right') == '0px') {
|
||||
nextBtn.css({
|
||||
'background-color': "#c7c0c0ba",
|
||||
'color': '#000000b8',
|
||||
'box-shadow': 'none'
|
||||
});
|
||||
} else if (form2.css('left') == '3000px') {
|
||||
prevBtn.css({
|
||||
'background-color': "white",
|
||||
'color': '#0f9500',
|
||||
'box-shadow': '0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)'
|
||||
});
|
||||
progressBar.css({
|
||||
'width': '66.66%'
|
||||
});
|
||||
form1.css({
|
||||
right: '3000px'
|
||||
});
|
||||
form2.css({
|
||||
left: '0'
|
||||
});
|
||||
} else if (form2.css('left') == '0px') {
|
||||
nextBtn.css({
|
||||
'background-color': "#c7c0c0ba",
|
||||
'color': '#000000b8',
|
||||
'box-shadow': 'none'
|
||||
});
|
||||
prevBtn.css({
|
||||
'background-color': "white",
|
||||
'color': '#0f9500',
|
||||
'box-shadow': '0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)'
|
||||
});
|
||||
progressBar.css({
|
||||
'width': '100%',
|
||||
'border-top-right-radius': '7px'
|
||||
});
|
||||
form2.css({
|
||||
left: '3000px'
|
||||
});
|
||||
form3.css({
|
||||
right: '0'
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function prevButton(element) {
|
||||
const prevBtn = element;
|
||||
const nextBtn = element.parent().parent().parent().find(".next");
|
||||
const form1 = element.parent().parent().parent().find(".form1");
|
||||
const form2 = element.parent().parent().parent().find(".form2");
|
||||
const form3 = element.parent().parent().parent().find(".form3");
|
||||
const progressBar = element.parent().parent().parent().find(".progressBar");
|
||||
// console.log(2);
|
||||
nextBtn.css({
|
||||
'background-color': "white",
|
||||
'color': '#1763b1'
|
||||
});
|
||||
if (form2.css('left') == '3000px' && form3.css('right') == '3000px') {
|
||||
prevBtn.css({
|
||||
'background-color': "#c7c0c0ba",
|
||||
'color': '#000000b8',
|
||||
'box-shadow': 'none'
|
||||
});
|
||||
|
||||
} else if (form2.css('left') == '0px') {
|
||||
progressBar.css({
|
||||
'width': '33.33%',
|
||||
'border-top-right-radius': '0px'
|
||||
});
|
||||
prevBtn.css({
|
||||
'background-color': "#c7c0c0ba",
|
||||
'color': '#000000b8',
|
||||
'box-shadow': 'none'
|
||||
});
|
||||
form2.css({
|
||||
left: '3000px'
|
||||
});
|
||||
form1.css({
|
||||
right: 'initial'
|
||||
});
|
||||
|
||||
} else if (form3.css('right') == '0px') {
|
||||
progressBar.css({
|
||||
'width': '66.66%',
|
||||
'border-top-right-radius': '0px'
|
||||
});
|
||||
prevBtn.css({
|
||||
'background-color': "white",
|
||||
'color': '#0f9500',
|
||||
'box-shadow': '0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)'
|
||||
});
|
||||
form2.css({
|
||||
left: '0'
|
||||
});
|
||||
form3.css({
|
||||
right: '3000px'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//مدت قرارداد
|
||||
$(".contractDuration").on('click',
|
||||
function() {
|
||||
if ($(this).hasClass('contActive')) {
|
||||
$(this).removeClass('contActive');
|
||||
} else {
|
||||
$(".contractDuration").removeClass('contActive');
|
||||
$(this).addClass('contActive');
|
||||
}
|
||||
contractDuration();
|
||||
});
|
||||
|
||||
function contractDuration() {
|
||||
if ($(".contActive").text() == '1 ماهه') {
|
||||
$("#asp-contract-hidden").val(1);
|
||||
} else if ($(".contActive").text() == '2 ماهه') {
|
||||
$("#asp-contract-hidden").val(2);
|
||||
} else if ($(".contActive").text() == '3 ماهه') {
|
||||
$("#asp-contract-hidden").val(3);
|
||||
} else if ($(".contActive").text() == '6 ماهه') {
|
||||
$("#asp-contract-hidden").val(6);
|
||||
} else if ($(".contActive").text() == '1 ساله') {
|
||||
$("#asp-contract-hidden").val(12);
|
||||
} else if ($(".contActive").text() == 'دائمی') {
|
||||
$("#asp-contract-hidden").val("ForEver");
|
||||
}
|
||||
}
|
||||
|
||||
function checkContractDuration() {
|
||||
const aspValueContract = $("#asp-contract-hidden").val();
|
||||
console.log(aspValueContract);
|
||||
if (aspValueContract != '' || aspValueContract != undefined) {
|
||||
if (aspValueContract == '1') {
|
||||
$('span.contractDuration:contains("1 ماهه")').addClass("contActive");
|
||||
} else if (aspValueContract == '2') {
|
||||
$('span.contractDuration:contains("2 ماهه")').addClass("contActive");
|
||||
} else if (aspValueContract == '3') {
|
||||
$('span.contractDuration:contains("3 ماهه")').addClass("contActive");
|
||||
} else if (aspValueContract == '6') {
|
||||
$('span.contractDuration:contains("6 ماهه")').addClass("contActive");
|
||||
} else if (aspValueContract == '12') {
|
||||
$('span.contractDuration:contains("12 ماهه")').addClass("contActive");
|
||||
} else if (aspValueContract == 'ForEver') {
|
||||
$('span.contractDuration:contains("دائمی")').addClass("contActive");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// function checkAddress(){
|
||||
// var state=$("#State").val();
|
||||
// var city=$("#city").val();
|
||||
// var zoneName=$("#ZoneName").val();
|
||||
// var address=$("#Address").val();
|
||||
|
||||
// //console.log(state);
|
||||
// //console.log(city);
|
||||
// //console.log(zoneName);
|
||||
// //console.log(address);
|
||||
|
||||
// if((state!=''|| zoneName!=''||address!='' )&& city==0)
|
||||
// {
|
||||
// $("#divCity").find(".select2-container").addClass('errored');
|
||||
// }
|
||||
// else{
|
||||
// $("#divCity").find(".select2-container").removeClass('errored');
|
||||
// }
|
||||
|
||||
// if((state!=''|| city!=0 ||address!='' ) && zoneName=='')
|
||||
// {
|
||||
// $("#ZoneName").addClass('errored');
|
||||
// }
|
||||
// else{
|
||||
// $("#ZoneName").removeClass('errored');
|
||||
// }
|
||||
// if((state!=''|| city!=0 ||zoneName!='' ) && address=='')
|
||||
// {
|
||||
// $("#Address").addClass('errored');
|
||||
// }
|
||||
// else{
|
||||
// $("#Address").removeClass('errored');
|
||||
// }
|
||||
|
||||
// if((address!=''|| city!=0 ||zoneName!='' ) && state=='' )
|
||||
// {
|
||||
// $("#divState").find(".select2-container").addClass('errored');
|
||||
// }
|
||||
// else{
|
||||
// $("#divState").find(".select2-container").removeClass('errored');
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
//function changeInsuranceJob(value){
|
||||
// console.log(value);
|
||||
// if(value!=null)
|
||||
// {
|
||||
// $("#divInsuranceJobId").find(".select2-container").removeClass('errored');
|
||||
// }
|
||||
//}
|
||||
//function changeInsuranceJob(value){
|
||||
// console.log(value);
|
||||
// if(value!=null)
|
||||
// {
|
||||
// $("#divInsuranceJobId").find(".select2-container").removeClass('errored');
|
||||
// }
|
||||
//}
|
||||
function changecity(element) {
|
||||
const text = $(element).children("option").filter(":selected").text();
|
||||
$("#hide2").val(text);
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
@@ -1,803 +0,0 @@
|
||||
@model CompanyManagment.App.Contracts.Workshop.EditWorkshop
|
||||
<link href="~/lib/select2/css/select2.css" rel="stylesheet"/>
|
||||
@{
|
||||
var isLegal = false;
|
||||
if (Model.Employers != null && Model.Employers.Count > 0)
|
||||
{
|
||||
isLegal = Model.Employers.Any(x => x.IsLegal == "حقوقی");
|
||||
}
|
||||
|
||||
}
|
||||
<form class="editWorkshopForm " id="editWorkshopForm" asp-page="./Index" asp-page-handler="Edit" autocomplete="off"
|
||||
method="post"
|
||||
data-ajax="true"
|
||||
data-callback=""
|
||||
data-action="Refresh"
|
||||
enctype="multipart/form-data">
|
||||
<input type="hidden" asp-for="Id" value="@Model.Id"/>
|
||||
@if (Model.Employers != null)
|
||||
{
|
||||
for (var i = 0; i < Model.Employers.Count(); i++)
|
||||
{
|
||||
<input type="hidden" asp-for="EmployerIdList[i]"/>
|
||||
}
|
||||
}
|
||||
<fieldset id="editWorkshop" class="content-fieldset mt-5">
|
||||
<legend class="main-title">مشخصات کارگاه</legend>
|
||||
<div class="form-box">
|
||||
<div class="steps">
|
||||
<div class="listProgress"></div>
|
||||
<div class="step"> مشخصات اصلی </div>
|
||||
<div class="step"> امور قرارداد </div>
|
||||
<div class="step"> امور بیمه ای </div>
|
||||
</div>
|
||||
<div class="form listForm1">
|
||||
<div class="row inputs">
|
||||
<div class="right col-md-4 col-sm-6 col-xs-12">
|
||||
<label class="input-label">نام کارگاه <span style="color: red;">*</span></label>
|
||||
<input asp-for="WorkshopName" type="text" placeholder="" class="form-control notEmptyWorkshop not-empty"/>
|
||||
|
||||
</div>
|
||||
<div class="right col-md-4 col-sm-6 col-xs-12">
|
||||
<label class="input-label"> نام مستعار کارگاه</label>
|
||||
<input asp-for="WorkshopSureName" type="text" placeholder="" class="form-control" pattern="[\u0600-\u06FF\s]*"/>
|
||||
<i class="fa fa-exclamation-circle error-icon"></i>
|
||||
<p class="error-message">فقط حروف فارسی وارد شود.</p>
|
||||
</div>
|
||||
<div class="right col-md-2 col-sm-6 col-xs-12">
|
||||
<label class="input-label"> نوع تملک </label>
|
||||
<select asp-for="TypeOfOwnership" class="form-control">
|
||||
<option value="" selected class="form-control"> </option>
|
||||
<option value="">مالکیت</option>
|
||||
<option value="">استیجاری</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="right col-md-2 col-sm-6 col-xs-12">
|
||||
<label class="input-label">شماره بایگانی </label>
|
||||
<input asp-for="ArchiveCode" type="text" placeholder="01" class="form-control notEmptyArchive text-center" pattern="\d*"/>
|
||||
<i class="fa fa-exclamation-circle error-icon"></i>
|
||||
<p class="error-message">فقط عدد وارد شود.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row inputs">
|
||||
<div id="divState" class="right col-md-4 col-sm-4 col-xs-12">
|
||||
<label class="input-label">نام استان </label>
|
||||
<select class="form-control select-city" asp-for="State" id="state" name="state" onChange="iranwebsv(this.value);">
|
||||
<option value="">انتخاب استان</option>
|
||||
<option value="تهران"> تهران </option>
|
||||
<option value="گیلان"> گیلان </option>
|
||||
<option value="آذربایجان شرقی"> آذربایجان شرقی</option>
|
||||
<option value="خوزستان"> خوزستان </option>
|
||||
<option value="فارس"> فارس</option>
|
||||
<option value="اصفهان"> اصفهان</option>
|
||||
<option value="خراسان رضوی">خراسان رضوی </option>
|
||||
<option value="قزوین"> قزوین</option>
|
||||
<option value="سمنان"> سمنان </option>
|
||||
<option value="قم"> قم</option>
|
||||
<option value="مرکزی"> مرکزی</option>
|
||||
<option value="زنجان"> زنجان</option>
|
||||
<option value="مازندران"> مازندران</option>
|
||||
<option value="گلستان"> گلستان</option>
|
||||
<option value="اردبیل"> اردبیل </option>
|
||||
<option value="آذربایجان غربی"> آذربایجان غربی</option>
|
||||
<option value="همدان"> همدان </option>
|
||||
<option value="کردستان"> کردستان </option>
|
||||
<option value="کرمانشاه"> کرمانشاه </option>
|
||||
<option value="لرستان"> لرستان</option>
|
||||
<option value="بوشهر"> بوشهر</option>
|
||||
<option value="کرمان"> کرمان</option>
|
||||
<option value="هرمزگان"> هرمزگان</option>
|
||||
<option value="چهارمحال و بختیاری"> چهارمحال و بختیاری</option>
|
||||
<option value="یزد"> یزد</option>
|
||||
<option value="سیستان و بلوچستان"> سیستان و بلوچستان</option>
|
||||
<option value="ایلام"> ایلام</option>
|
||||
<option value="کهگلویه و بویراحمد"> کهگلویه و بویراحمد</option>
|
||||
<option value="خراسان شمالی"> خراسان شمالی</option>
|
||||
<option value="خراسان جنوبی"> خراسان جنوبی</option>
|
||||
<option value="البرز"> البرز</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="divCity" class="right col-md-4 col-sm-4 col-xs-12">
|
||||
<label class="input-label">نام شهر </label>
|
||||
<select class="form-control select-city" name="cityy" id="city" onchange="changecity(this)">
|
||||
<option value="0" placeholder="انتخاب شهر"> </option>
|
||||
</select>
|
||||
<input type="hidden" id="hide2" asp-for="City">
|
||||
<input type="hidden" value="@Model.City" id="hide3">
|
||||
</div>
|
||||
<div class="right col-md-4 col-sm-4 col-xs-12 zone-wrapper">
|
||||
<div class="right w-100">
|
||||
<label class="input-label">نام محله </label>
|
||||
<input type="text" asp-for="ZoneName" class="right col-md-10 form-control" pattern="[\u0600-\u06FF\s]*"/>
|
||||
<i class="fa fa-exclamation-circle error-icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row inputs">
|
||||
<div class="right col-md-12 col-sm-12 col-xs-12">
|
||||
<label class="input-label">جزئیات نشانی </label>
|
||||
<input asp-for="Address" type="text" class="form-control not-empty"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form listForm2">
|
||||
<div class="flex-box">
|
||||
<div class="row input-boxes">
|
||||
<fieldset class="right col-md-12 col-sm-12 col-xs-12 content-fieldset contract-box">
|
||||
<div class="form2-title">لطفا مدت قرارداد خود را انتخاب کنید :</div>
|
||||
<div class="col-md-1"></div>
|
||||
<div class="flexible-div flexible-radio col-md-12 col-sm-12 col-xs-12">
|
||||
@* <div class="time-radio text-right col-xs-6 col-md-6 col-sm-6">
|
||||
<input type="radio" value="1" asp-for="ContractTerm" checked="checked" class="contractTime">
|
||||
<span class="options-sml"> 1 ماهه </span>
|
||||
</div>
|
||||
<div class="time-radio text-right col-xs-6 col-md-6 col-sm-6">
|
||||
<input type="radio" value="2" asp-for="ContractTerm" class="contractTime">
|
||||
<span class="options-sml"> 2 ماهه </span>
|
||||
</div>
|
||||
<div class="time-radio text-right col-xs-6 col-md-6 col-sm-6">
|
||||
<input type="radio" value="3" asp-for="ContractTerm" class="contractTime">
|
||||
<span class="options-sml"> 3 ماهه </span>
|
||||
</div>
|
||||
<div class="time-radio text-right col-xs-6 col-md-6 col-sm-6">
|
||||
<input type="radio" value="6" asp-for="ContractTerm" class="contractTime">
|
||||
<span class="options-sml"> 6 ماهه </span>
|
||||
</div>
|
||||
<div class="time-radio text-right col-xs-6 col-md-6 col-sm-6">
|
||||
<input type="radio" value="12" asp-for="ContractTerm" class="contractTime">
|
||||
<span> یک ساله </span>
|
||||
</div>
|
||||
<div class="time-radio text-right col-xs-6 col-md-6 col-sm-6">
|
||||
|
||||
<span class="options-sml"> دائمی </span>
|
||||
</div>*@
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">1 ماهه</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">2 ماهه</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">3 ماهه</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">6 ماهه</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">1 ساله</span>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-6 spanBox">
|
||||
<span class="btn btn-deactive btn-rounded waves-effect waves-light contractDuration">دائمی</span>
|
||||
</div>
|
||||
<input type="hidden" id="asp-contract-hidden" asp-for="ContractTerm"/>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="row input-boxes">
|
||||
<div class="options-box right col-md-12">
|
||||
<div class="options-info"> در صورت تمایل به محاسبه ی عناوین ذیل در فیش حقوقی، گزینه های موردنظر را فعال نمایید </div>
|
||||
<div class="optional-wages flexible-div">
|
||||
<div class="d-flex options-check col-lg-6 col-md-6 col-sm-6 col-xs-7">
|
||||
<div class="checkbox-wrapper-2">
|
||||
<label class="toggleButton">
|
||||
<input type="checkbox" asp-for="AddLeavePay" class="activated">
|
||||
<div>
|
||||
<svg viewBox="0 0 44 44">
|
||||
<path d="M14,24 L21,31 L39.7428882,11.5937758 C35.2809627,6.53125861 30.0333333,4 24,4 C12.95,4 4,12.95 4,24 C4,35.05 12.95,44 24,44 C35.05,44 44,35.05 44,24 C44,19.3 42.5809627,15.1645919 39.7428882,11.5937758" transform="translate(-2.000000, -2.000000)"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<span class="options-type">مزد و مرخصی </span>
|
||||
</div>
|
||||
<div class="d-flex options-check col-lg-6 col-md-6 col-sm-6 col-xs-7">
|
||||
<div class="checkbox-wrapper-2">
|
||||
<label class="toggleButton">
|
||||
<input type="checkbox" asp-for="AddYearsPay" class="activated">
|
||||
<div>
|
||||
<svg viewBox="0 0 44 44">
|
||||
<path d="M14,24 L21,31 L39.7428882,11.5937758 C35.2809627,6.53125861 30.0333333,4 24,4 C12.95,4 4,12.95 4,24 C4,35.05 12.95,44 24,44 C35.05,44 44,35.05 44,24 C44,19.3 42.5809627,15.1645919 39.7428882,11.5937758" transform="translate(-2.000000, -2.000000)"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<span class="options-type">سنوات </span>
|
||||
</div>
|
||||
<div class="d-flex options-check col-lg-6 col-md-6 col-sm-6 col-xs-7">
|
||||
|
||||
<div class="checkbox-wrapper-2">
|
||||
<label class="toggleButton">
|
||||
<input type="checkbox" asp-for="AddBonusesPay" class="activated">
|
||||
<div>
|
||||
<svg viewBox="0 0 44 44">
|
||||
<path d="M14,24 L21,31 L39.7428882,11.5937758 C35.2809627,6.53125861 30.0333333,4 24,4 C12.95,4 4,12.95 4,24 C4,35.05 12.95,44 24,44 C35.05,44 44,35.05 44,24 C44,19.3 42.5809627,15.1645919 39.7428882,11.5937758" transform="translate(-2.000000, -2.000000)"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
<span class="options-type"> عیدی و پاداش </span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row inputs">
|
||||
<div class="col-md-12 col-lg-12 col-sm-12 col-xs-12">
|
||||
<div class="optional-wages d-flex">
|
||||
<div class="d-flex single-checkbox">
|
||||
<span class="options-type" style="width: 100%;">مجموع مبالغ تصفیه حساب در ذیل فرم نمایش داده شود</span>
|
||||
<div class="checkbox-wrapper-2">
|
||||
<label class="toggleButton">
|
||||
<input type="checkbox" class="activated" @*data-val="true"*@ @*data-val-required="The AddLeavePay field is required."*@ @*id="AddLeavePay"*@ @*name="AddLeavePay"*@ value="true">
|
||||
<div>
|
||||
<svg viewBox="0 0 44 44">
|
||||
<path d="M14,24 L21,31 L39.7428882,11.5937758 C35.2809627,6.53125861 30.0333333,4 24,4 C12.95,4 4,12.95 4,24 C4,35.05 12.95,44 24,44 C35.05,44 44,35.05 44,24 C44,19.3 42.5809627,15.1645919 39.7428882,11.5937758" transform="translate(-2.000000, -2.000000)"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form listForm3">
|
||||
<div class="row inputs">
|
||||
<div class="right col-md-12 listForm3-boxes">
|
||||
<div class="right col-md-6">
|
||||
<label class="input-label d-block"><input type="checkbox" value="NormalList" class="checkboxes sendList"> ارسال لیست بیمه کارگاه عادی</label>
|
||||
<label class="input-label d-block"><input type="checkbox" value="Govermentlist" class="checkboxes sendList">ارسال لیست بیمه کارگاه کمک دولت </label>
|
||||
<label class="input-label d-block"><input type="checkbox" value="Familylist" class="checkboxes sendList"> ارسال لیست بیمه کارگاه خانوادگی</label>
|
||||
<input type="hidden" id="asp-hidden" asp-for="TypeOfInsuranceSend"/>
|
||||
</div>
|
||||
<div class="right col-md-3 col-sm-12 col-xs-12 disabled InsuranceCode">
|
||||
<label class="input-label">کد کارگاهی بیمه</label>
|
||||
<input asp-for="InsuranceCode" type="text" placeholder="" class="form-control text-center" pattern="\d*"/>
|
||||
<i class="fa fa-exclamation-circle error-icon"></i>
|
||||
<p class="error-message">فقط عدد وارد شود.</p>
|
||||
</div>
|
||||
<div class="right col-md-3 col-sm-12 col-xs-12 disabled AgreementNumber">
|
||||
<label class="input-label"> ردیف پیمان</label>
|
||||
<input type="text" value="000" asp-for="AgreementNumber" class="form-control text-center" id="zeros" pattern="\d*"/>
|
||||
<i class="fa fa-exclamation-circle error-icon"></i>
|
||||
<p class="error-message">فقط عدد وارد شود.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row inputs">
|
||||
<div class="right col-md-12 form3-boxes disabled fixedSalarySection">
|
||||
<div class="right col-md-12" style="margin-bottom: 10px;">
|
||||
<label class="input-label"><input type="checkbox" asp-for="FixedSalary" class="fixedSalary checkboxes"> این کارگاه مشمول دستمزد مقطوع می باشد</label>
|
||||
</div>
|
||||
<div class="disabled insuranceJob">
|
||||
<div>
|
||||
<div class="right col-md-8 col-sm-6 col-xs-12">
|
||||
<label class="input-label"> عنوان صنف و درجه / کد اقتصادی </label>
|
||||
<select class="select-city form-control" id="jobName" asp-for="InsuranceJobId" asp-items="@Model.InsuranceJobViewModels">
|
||||
<option value="" disabled selected> </option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="right col-md-4 col-sm-6 col-xs-12">
|
||||
<label class="input-label"> جمعیت شهر </label>
|
||||
<select class="form-control" asp-for="Population">
|
||||
<option value="" disabled selected> </option>
|
||||
<option value="LessThan500">کمتر از 500000 نفر </option>
|
||||
<option value="MoreThan500">بیشتر از 500000 نفر</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="isLegal"/>
|
||||
<div class="form-footer-btns">
|
||||
<a class="btn btn-modal listPrev">مرحله قبل</a>
|
||||
<a class="btn btn-modal listNext">مرحله بعد</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-footer">
|
||||
<a class="btn btn-rounded waves-effect waves-light bg-white closeForm">بستن</a>
|
||||
<a href="#" class=" btn btn-success btn-rounded waves-effect waves-light aEmployers" id="saveEdit">ذخیره</a>
|
||||
</div>
|
||||
</fieldset>
|
||||
@if (Model.AccountIdsList != null)
|
||||
{
|
||||
for (var i = 0; i < Model.AccountIdsList.Count(); i++)
|
||||
{
|
||||
<input type="hidden" asp-for="AccountIdsList[i]"/>
|
||||
}
|
||||
}
|
||||
</form>
|
||||
<script language="javascript" src="~/AdminTheme/js/city.js"></script>
|
||||
<script src="~/lib/select2/js/select2.js"></script>
|
||||
<script src="~/lib/select2/js/i18n/fa.js"></script>
|
||||
<script>
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
adjustFormBoxHeight();
|
||||
contractDuration();
|
||||
checkContractDuration();
|
||||
$('.error-message').hide();
|
||||
$('.error-icon').hide();
|
||||
$(".select-city").select2({
|
||||
language: "fa",
|
||||
dir: "rtl"
|
||||
});
|
||||
$("#city").select2({
|
||||
language: "fa",
|
||||
dir: "rtl"
|
||||
});
|
||||
$("#jobName").select2({
|
||||
language: "fa",
|
||||
dir: "rtl"
|
||||
});
|
||||
$('.form-control').on('keyup',
|
||||
function() {
|
||||
const errorMessage = $(this).parent().find('.error-message');
|
||||
const errorIcon = $(this).parent().find('.error-icon');
|
||||
if (this.validity.patternMismatch) {
|
||||
errorMessage.show();
|
||||
errorIcon.show();
|
||||
$(this).addClass('errored');
|
||||
$(this).addClass('patternMisMatch');
|
||||
|
||||
} else {
|
||||
errorMessage.hide();
|
||||
errorIcon.hide();
|
||||
$(this).removeClass('errored');
|
||||
$(this).removeClass('patternMisMatch');
|
||||
}
|
||||
});
|
||||
|
||||
const aspValue = $("#asp-hidden").val();
|
||||
if (aspValue != "" || aspValue != undefined) {
|
||||
const checkbox = $(`input.myCheckbox[value="${aspValue}"]`);
|
||||
checkbox.prop("checked", true);
|
||||
}
|
||||
const aspValueContract = $("#asp-contract-hidden").val();
|
||||
if (aspValue != "" || aspValue != undefined) {
|
||||
const checkspan = $(`span.contractDuration[text="${aspValueContract}"]`);
|
||||
checkspan.addClass("contActive");
|
||||
}
|
||||
|
||||
const myCheckbox = $('.sendList');
|
||||
const myCheckbox2 = $('.fixedSalary');
|
||||
const myDiv = $('.fixedSalarySection');
|
||||
const myDiv2 = $('.AgreementNumber');
|
||||
const myDiv3 = $('.insuranceJob');
|
||||
const myDiv4 = $('.InsuranceCode');
|
||||
|
||||
myCheckbox.on('change',
|
||||
function() {
|
||||
const isLegal = "@isLegal";
|
||||
|
||||
if ($(this).is(':checked') && isLegal == "False") {
|
||||
myDiv.removeClass('disabled');
|
||||
} else {
|
||||
myDiv.addClass('disabled');
|
||||
}
|
||||
});
|
||||
|
||||
myCheckbox.on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked')) {
|
||||
myDiv2.removeClass('disabled');
|
||||
} else {
|
||||
myDiv2.addClass('disabled');
|
||||
}
|
||||
});
|
||||
|
||||
myCheckbox2.on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked')) {
|
||||
myDiv3.removeClass('disabled');
|
||||
} else {
|
||||
myDiv3.addClass('disabled');
|
||||
}
|
||||
});
|
||||
myCheckbox.on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked')) {
|
||||
myDiv4.removeClass('disabled');
|
||||
} else {
|
||||
myDiv4.addClass('disabled');
|
||||
}
|
||||
});
|
||||
$(".sendList").on('change',
|
||||
function() {
|
||||
if ($(this).is(':checked')) {
|
||||
$("#asp-hidden").val($(this).val());
|
||||
} else {
|
||||
$("#asp-hidden").val('');
|
||||
$("#InsuranceCode").val('');
|
||||
}
|
||||
});
|
||||
|
||||
$(".listNext").click(function() {
|
||||
nextButtonList($(this));
|
||||
});
|
||||
$(".listPrev").click(function() {
|
||||
prevButtonList($(this));
|
||||
});
|
||||
|
||||
$(".closeForm").click(function() {
|
||||
$(".divEdit").slideUp(500);
|
||||
setTimeout(function() {
|
||||
$(".divEdit").html('');
|
||||
}.bind(this),
|
||||
500);
|
||||
});
|
||||
|
||||
const state = document.getElementById('state').value;
|
||||
const city = document.getElementById('hide3').value;
|
||||
|
||||
iranwebsv(state);
|
||||
$(`#city option:contains("${city}")`).attr("selected", true);
|
||||
|
||||
});
|
||||
|
||||
|
||||
$(window).on('resize',
|
||||
function() {
|
||||
adjustFormBoxHeight();
|
||||
});
|
||||
|
||||
function adjustFormBoxHeight() {
|
||||
const formBoxHeight = Math.max($('.listForm1').height(), $('.listForm2').height(), $('.listForm3').height());
|
||||
$('.form-box').height(formBoxHeight + 50);
|
||||
}
|
||||
|
||||
|
||||
var aspValue = $("#asp-hidden").val();
|
||||
if (aspValue != "" || aspValue != undefined) {
|
||||
var checkbox = $(`input.sendList[value="${aspValue}"]`);
|
||||
checkbox.prop("checked", true);
|
||||
}
|
||||
const myCheckbox = $('.sendList');
|
||||
const myCheckbox2 = $('.fixedSalary');
|
||||
const myDiv = $('.fixedSalarySection');
|
||||
const myDiv2 = $('.AgreementNumber');
|
||||
const myDiv3 = $('.insuranceJob');
|
||||
const myDiv4 = $('.InsuranceCode');
|
||||
|
||||
if (myCheckbox.is(':checked')) {
|
||||
myDiv.removeClass('disabled');
|
||||
myDiv2.removeClass('disabled');
|
||||
myDiv4.removeClass('disabled');
|
||||
} else {
|
||||
myDiv.addClass('disabled');
|
||||
myDiv2.addClass('disabled');
|
||||
myDiv4.addClass('disabled');
|
||||
}
|
||||
if (myCheckbox2.is(':checked')) {
|
||||
myDiv3.removeClass('disabled');
|
||||
} else {
|
||||
myDiv3.addClass('disabled');
|
||||
}
|
||||
|
||||
function nextButtonList(element) {
|
||||
let nextBtn = element;
|
||||
let prevBtn = element.parent().parent().parent().find(".listPrev");
|
||||
let form1 = element.parent().parent().parent().find(".listForm1");
|
||||
let form2 = element.parent().parent().parent().find(".listForm2");
|
||||
let form3 = element.parent().parent().parent().find(".listForm3");
|
||||
let progressBar = element.parent().parent().parent().find(".listProgress");
|
||||
|
||||
//checkAddress();
|
||||
$("#editWorkshop").find('input.not-empty').each(function() {
|
||||
if ($(this).val() === '') {
|
||||
$(this).addClass('errored');
|
||||
} else {
|
||||
$(this).removeClass('errored');
|
||||
}
|
||||
});
|
||||
var option1 = document.getElementById("city").options.selectedIndex;
|
||||
if (option1 == 0 || option1 == -1) {
|
||||
$("#divCity .select2-selection").addClass('errored');
|
||||
} else {
|
||||
$("#divCity .select2-selection").removeClass('errored');
|
||||
}
|
||||
var option2 = document.getElementById("state").options.selectedIndex;
|
||||
if (option2 == 0) {
|
||||
$("#divState .select2-selection").addClass('errored');
|
||||
} else {
|
||||
$("#divState .select2-selection").removeClass('errored');
|
||||
}
|
||||
|
||||
if ($("#ArchiveCode").val() != "" && $("#ArchiveCode").val() == "0") {
|
||||
$("#ArchiveCode").addClass('errored');
|
||||
} else {
|
||||
$("#ArchiveCode").removeClass('errored');
|
||||
}
|
||||
if ($('input.errored').length === 0 && $('input.patternMisMatch').length === 0 && $("#divCity").find(".select2-container.errored").length == 0 && $("#divState").find(".select2-container.errored").length == 0) {
|
||||
if (form3.css('right') == '0px') {
|
||||
nextBtn.css({
|
||||
'background-color': "#c7c0c0ba",
|
||||
'color': '#000000b8',
|
||||
'box-shadow': 'none'
|
||||
});
|
||||
} else if (form2.css('left') == '3000px') {
|
||||
prevBtn.css({
|
||||
'background-color': "white",
|
||||
'color': '#0f9500',
|
||||
'box-shadow': '0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)'
|
||||
});
|
||||
progressBar.css({
|
||||
'width': '66.66%'
|
||||
|
||||
});
|
||||
form1.css({
|
||||
right: '3000px'
|
||||
});
|
||||
form2.css({
|
||||
left: '0'
|
||||
});
|
||||
|
||||
} else if (form2.css('left') == '0px') {
|
||||
nextBtn.css({
|
||||
'background-color': "#c7c0c0ba",
|
||||
'color': '#000000b8',
|
||||
'box-shadow': 'none'
|
||||
});
|
||||
prevBtn.css({
|
||||
'background-color': "white",
|
||||
'color': '#0f9500',
|
||||
'box-shadow': '0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)'
|
||||
});
|
||||
progressBar.css({
|
||||
'width': '100%',
|
||||
'border-top-right-radius': '7px'
|
||||
});
|
||||
form2.css({
|
||||
left: '3000px'
|
||||
});
|
||||
form3.css({
|
||||
right: '0'
|
||||
});
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
function prevButtonList(element) {
|
||||
const prevBtn = element;
|
||||
const nextBtn = element.parent().parent().parent().find(".listNext");
|
||||
const form1 = element.parent().parent().parent().find(".listForm1");
|
||||
const form2 = element.parent().parent().parent().find(".listForm2");
|
||||
const form3 = element.parent().parent().parent().find(".listForm3");
|
||||
const progressBar = element.parent().parent().parent().find(".listProgress");
|
||||
nextBtn.css({
|
||||
'background-color': "white",
|
||||
'color': '#1763b1'
|
||||
});
|
||||
if (form2.css('left') == '3000px' && form3.css('right') == '3000px') {
|
||||
prevBtn.css({
|
||||
'background-color': "#c7c0c0ba",
|
||||
'color': '#000000b8',
|
||||
'box-shadow': 'none'
|
||||
});
|
||||
|
||||
} else if (form2.css('left') == '0px') {
|
||||
progressBar.css({
|
||||
'width': '33.33%',
|
||||
'border-top-right-radius': '0px'
|
||||
});
|
||||
prevBtn.css({
|
||||
'background-color': "#c7c0c0ba",
|
||||
'color': '#000000b8',
|
||||
'box-shadow': 'none'
|
||||
});
|
||||
form2.css({
|
||||
left: '3000px'
|
||||
});
|
||||
form1.css({
|
||||
right: 'initial'
|
||||
});
|
||||
|
||||
} else if (form3.css('right') == '0px') {
|
||||
progressBar.css({
|
||||
'width': '66.66%',
|
||||
'border-top-right-radius': '0px'
|
||||
});
|
||||
prevBtn.css({
|
||||
'background-color': "white",
|
||||
'color': '#0f9500',
|
||||
'box-shadow': '0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12)'
|
||||
});
|
||||
form2.css({
|
||||
left: '0'
|
||||
});
|
||||
form3.css({
|
||||
right: '3000px'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$("#saveEdit").click(function() {
|
||||
const selectCity = $('#city.select-city');
|
||||
const selectedCityOption = selectCity.find('option:selected');
|
||||
$('#hide2').val(selectedCityOption.text());
|
||||
|
||||
if ($("#WorkshopName").val() != "") {
|
||||
$("#WorkshopName").addClass('not-empty');
|
||||
} else {
|
||||
$("#WorkshopName").removeClass('not-empty');
|
||||
}
|
||||
const option1 = document.getElementById("city").options.selectedIndex;
|
||||
if (option1 == 0 || option1 == -1) {
|
||||
$("#divCity .select2-selection").addClass('errored');
|
||||
} else {
|
||||
$("#divCity .select2-selection").removeClass('errored');
|
||||
}
|
||||
const option2 = document.getElementById("state").options.selectedIndex;
|
||||
if (option2 == 0) {
|
||||
$("#divState .select2-selection").addClass('errored');
|
||||
} else {
|
||||
$("#divState .select2-selection").removeClass('errored');
|
||||
}
|
||||
//checkAddress();
|
||||
|
||||
$("#editWorkshop").find('input.not-empty').each(function() {
|
||||
if ($(this).val() === '') {
|
||||
$(this).addClass('errored');
|
||||
} else {
|
||||
$(this).removeClass('errored');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// console.log($("#ArchiveCode").val());
|
||||
if ($("#ArchiveCode").val() != "" && $("#ArchiveCode").val() == "0") {
|
||||
$("#ArchiveCode").addClass('errored');
|
||||
} else {
|
||||
$("#ArchiveCode").removeClass('errored');
|
||||
}
|
||||
|
||||
|
||||
if ($("#editWorkshop").find('input.errored').length > 0 || $("#editWorkshop").find('input.patternMisMatch').length > 0 || $("#divCity").find(".select2-container.errored").length > 0 || $("#divState").find(".select2-container.errored").length > 0) {
|
||||
$.Notification.autoHideNotify('error', 'top right', 'پیام سیستم ', "لطفا موارد اجباری را تکمیل کنید.");
|
||||
//function scrollDown() {
|
||||
// // console.log($(this));
|
||||
// const customSelect = $(this).parent().parent().parent();
|
||||
// const divOffset = customSelect.offset().top;
|
||||
// // console.log(divOffset);
|
||||
|
||||
// window.scrollTo({
|
||||
// top: divOffset,
|
||||
// behavior: 'smooth',
|
||||
// });
|
||||
//}
|
||||
//setTimeout(function () {
|
||||
// scrollDown.call(this);
|
||||
//}.bind(this), 0);
|
||||
} else {
|
||||
|
||||
$("#editWorkshopForm").submit();
|
||||
}
|
||||
});
|
||||
|
||||
$('#editWorkshopForm').submit(function(e) {
|
||||
e.preventDefault();
|
||||
e.stopImmediatePropagation();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: $(this).attr('action'),
|
||||
data: $(this).serialize(),
|
||||
success: function(response) {
|
||||
if (response.isSuccedded == true) {
|
||||
$.Notification.autoHideNotify('success', 'top center', response.message);
|
||||
|
||||
// getCreate();
|
||||
getWorkshopList();
|
||||
$(".divEdit").slideUp(500);
|
||||
} else {
|
||||
$.Notification.autoHideNotify('error', 'top center', response.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
|
||||
//مدت قرارداد
|
||||
$(".contractDuration").on('click',
|
||||
function() {
|
||||
if ($(this).hasClass('contActive')) {
|
||||
$(this).removeClass('contActive');
|
||||
} else {
|
||||
$(".contractDuration").removeClass('contActive');
|
||||
$(this).addClass('contActive');
|
||||
}
|
||||
contractDuration();
|
||||
});
|
||||
|
||||
function contractDuration() {
|
||||
if ($(".contActive").text() == '1 ماهه') {
|
||||
$("#asp-contract-hidden").val(1);
|
||||
} else if ($(".contActive").text() == '2 ماهه') {
|
||||
$("#asp-contract-hidden").val(2);
|
||||
} else if ($(".contActive").text() == '3 ماهه') {
|
||||
$("#asp-contract-hidden").val(3);
|
||||
} else if ($(".contActive").text() == '6 ماهه') {
|
||||
$("#asp-contract-hidden").val(6);
|
||||
} else if ($(".contActive").text() == '1 ساله') {
|
||||
$("#asp-contract-hidden").val(12);
|
||||
} else if ($(".contActive").text() == 'دائمی') {
|
||||
$("#asp-contract-hidden").val("ForEver");
|
||||
}
|
||||
}
|
||||
|
||||
function checkContractDuration() {
|
||||
const aspValueContract = $("#asp-contract-hidden").val();
|
||||
console.log(aspValueContract);
|
||||
if (aspValueContract != '' || aspValueContract != undefined) {
|
||||
if (aspValueContract == '1') {
|
||||
$('span.contractDuration:contains("1 ماهه")').addClass("contActive");
|
||||
} else if (aspValueContract == '2') {
|
||||
$('span.contractDuration:contains("2 ماهه")').addClass("contActive");
|
||||
} else if (aspValueContract == '3') {
|
||||
$('span.contractDuration:contains("3 ماهه")').addClass("contActive");
|
||||
} else if (aspValueContract == '6') {
|
||||
$('span.contractDuration:contains("6 ماهه")').addClass("contActive");
|
||||
} else if (aspValueContract == '12') {
|
||||
$('span.contractDuration:contains("12 ماهه")').addClass("contActive");
|
||||
} else if (aspValueContract == 'ForEver') {
|
||||
$('span.contractDuration:contains("دائمی")').addClass("contActive");
|
||||
}
|
||||
}
|
||||
}
|
||||
// function checkAddress(){
|
||||
// var state=$("#state").val();
|
||||
// var city=$("#city").val();
|
||||
// var zoneName=$("#ZoneName").val();
|
||||
// var address=$("#Address").val();
|
||||
|
||||
// console.log(state);
|
||||
// console.log(city);
|
||||
// console.log(zoneName);
|
||||
// console.log(address);
|
||||
|
||||
// if((state!=''|| zoneName!=''||address!='' )&& (city==0||city==null))
|
||||
// {
|
||||
// $("#divCity").find(".select2-container").addClass('errored');
|
||||
// }
|
||||
// else{
|
||||
// $("#divCity").find(".select2-container").removeClass('errored');
|
||||
// }
|
||||
|
||||
// if((state!=''|| (city!=0 && city!=null) ||address!='' ) && zoneName=='')
|
||||
// {
|
||||
// $("#ZoneName").addClass('errored');
|
||||
// }
|
||||
// else{
|
||||
// $("#ZoneName").removeClass('errored');
|
||||
// }
|
||||
// if((state!=''|| (city!=0 && city!=null) ||zoneName!='' ) && address=='')
|
||||
// {
|
||||
// $("#Address").addClass('errored');
|
||||
// }
|
||||
// else{
|
||||
// $("#Address").removeClass('errored');
|
||||
// }
|
||||
|
||||
// if((address!=''|| (city!=0 && city!=null) ||zoneName!='' ) && state=='' )
|
||||
// {
|
||||
// $("#divState").find(".select2-container").addClass('errored');
|
||||
// }
|
||||
// else{
|
||||
// $("#divState").find(".select2-container").removeClass('errored');
|
||||
// }
|
||||
//}
|
||||
function changecity(element) {
|
||||
const text = $(element).children("option").filter(":selected").text();
|
||||
$("#hide2").val(text);
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -237,26 +237,15 @@
|
||||
<None Include="Areas\Client\Pages\Company\EmployeesBankInfo\_Partials\EditBankInfoModal.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\EmployeesDocuments\Index.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\EmployeesDocuments\ModalUploadDocument.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\alert.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\ChangeCode.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\ContractCheckoutStatus.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\ContractCheckoutStatusPrint.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\Create.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\CreateLeave.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\Details.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\Edit.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\EditLeave.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\EditPaidLeave.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\EditSick.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\EmployeePayment.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\Index.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\Leave.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\LeaveCreateModal.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\LeavePrintAll.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\LeftWork.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\LeftWorkInsurance.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\PaidLeave.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\PaidLeaveList.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\PrintAll.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\PrintAllDetailsPersonnelInfo.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\PrintAllDetailsPersonnelInfoMobile.cshtml" />
|
||||
@@ -266,8 +255,6 @@
|
||||
<None Include="Areas\Client\Pages\Company\Employees\PrintOne.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\PrintOneMobile.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\PrintOnePersonnelInfo.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\SickLeave.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\SickLeaveList.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Employees\WorkshopList.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Error\_ErrorModal.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Fine\CRUDFineSubjectModal.cshtml" />
|
||||
@@ -376,8 +363,6 @@
|
||||
<None Include="Areas\Client\Pages\Company\WorkFlow\RollCall.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Workshop\ConnectedPersonnels.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Workshop\ContractCheckoutYearlyStatus.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Workshop\Create.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Workshop\Edit.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Workshop\Index.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Workshop\LeaveListAll.cshtml" />
|
||||
<None Include="Areas\Client\Pages\Company\Workshop\PrintOnePersonnelInfo.cshtml" />
|
||||
|
||||
Reference in New Issue
Block a user