Files
Backend-Api/ServiceHost/Areas/Admin/Pages/Company/Insurance/Create.cshtml
2024-07-19 17:09:45 +03:30

670 lines
21 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@using _0_Framework.Application
@model CompanyManagment.App.Contracts.Insurance.CreateInsurance
@{
<style>
.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;
}
.error {
font-size: 14px !important;
}
th {
text-align: center;
vertical-align: middle;
}
#datatable2 {
overflow-x: scroll;
}
th, td {
min-width: 200px;
}
</style>
<style>
/* panel */
.panel {
margin-top: 25px;
}
.panel .panel-heading {
padding: 5px 5px 0 5px;
}
.panel .nav-tabs {
border-bottom: none;
}
/* inactive tabs */
.nav > li > a {
background-color: #f5f5f5;
color: #676767;
border-color: #dddddd;
border-width: 1px;
padding: 5px 15px;
line-height: 2;
-webkit-transition: all 0.75s;
-moz-transition: all 0.75s;
transition: all 0.75s;
}
}
.nav > li > a:active {
background-color: #f5f5f5;
color: #676767;
}
.nav > li > a:focus {
background-color: #f5f5f5;
color: #676767;
}
.nav > li > a:hover {
background-color: #eeeeee;
color: #676767;
border-color: #dddddd;
}
/* active tabs */
.nav > li.active > a:hover {
color: #222222;
}
/* table */
/*.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th {
background-color: #000000;
color: #ffffff;
border-bottom: 1px solid #F3F3F3;
border-top: 1px solid #F3F3F3 !important;
line-height: 1.42857;
padding: 8px;
vertical-align: top;
}
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
border-top: 0px solid blue;
line-height: 1.42857;
padding: 8px;
vertical-align: top;
background-color: #F3F3F3;
}*/
/*
.table-striped > tbody > tr:nth-child(2n+1) > td {
background-color: #ffffff;
}
*/
/* buttons */
/* .btn-default.btn-outline:active,
.btn-default.btn-outline:focus,
.btn-default.btn-outline {
color: #676767;
border-color: #676767;
background-color: transparent;
border-width: 2px;
-webkit-transition: all 0.25s;
-moz-transition: all 0.25s;
transition: all 0.25s;
}
.btn-default.btn-outline:hover {
color: #000000;
border-color: #000000;
background-color: transparent;
border-width: 2px;
-webkit-transition: all 0.75s;
-moz-transition: all 0.75s;
transition: all 0.75s;
}
*/
/* panel buttons */
/* .btn-group button.btn.btn-outline.btn-default {
background-color: #f5f5f5;
color: #676767;
border-color: #dddddd;
border-width: 1px;
padding: 5px 15px;
line-height: 2;
-webkit-transition: all 0.75s;
-moz-transition: all 0.75s;
transition: all 0.75s;
}
}
.btn-group button.btn.btn-outline.btn-default:focus {
background-color: #f5f5f5;
}
.btn-group button.btn.btn-outline.btn-default:active {
background-color: #f5f5f5;
}
.btn-group button.btn.btn-outline.btn-default:hover {
background-color: #eeeeee;
border-width: 1px;
-webkit-transition: all 0.75s;
-moz-transition: all 0.75s;
transition: all 0.75s;
}
.btn-outline.btn-highlight {
color: #676767;
border-color: #676767;
background-color: transparent;
border-width: 2px;
}
.display-title {
font family: verdana, arial, helvetica;
color: #008400;
}*/
ul.nav.nav-tabs li.btn-group.active > a.btn.btn-default {
border: 1px solid #dddddd;
background-color: #ffffff;
border-right: 0px;
margin-right: 0px;
border-bottom: 0px;
}
ul.nav.nav-tabs li.btn-group > a.btn.btn-default {
border: 1px solid #F5F5F5;
border-right: 0px;
margin-right: 0px;
border-bottom: 0px;
}
ul.nav.nav-tabs > li.btn-group.active > a.btn.dropdown-toggle {
border: 1px solid #dddddd;
background-color: #ffffff;
margin-left: 0px;
border-left: 0px;
border-bottom: 0px;
}
ul.nav.nav-tabs > li.btn-group > a.btn.dropdown-toggle {
border: 1px solid #F5F5F5;
margin-left: 0px;
border-left: 0px;
border-bottom: 0px;
}
ul.nav.nav-tabs li.btn-group a.btn.dropdown-toggle span.caret {
color: #F5F5F5;
}
ul.nav.nav-tabs li.btn-group.active > a.btn.dropdown-toggle > span.caret {
color: #999999;
}
</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">
<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: 280px; text-align: center;">
ثبت لیست بیمه جدید
</legend>
<div class="form-group col-sm-12">
<div class="row">
<div class="col-lg-3 pull-right">
<select asp-items="@Model.EmployerList" class="sel2" id="selectWorkShopFunc">
<option value="0">کارفرما را انتخاب کنید</option>
</select>
</div>
<div class="col-lg-3 pull-right">
<select id="WorkShopId" class="employer">
<option value="0" disabled></option>
</select>
</div>
<div class="col-lg-3 pull-right">
<select id="Year" Name="Year" asp-for="Year" class="employer">
@for (var i = 1400; i < 1440; i++)
{
<option value=@i>@i</option>
}
</select>
</div>
<div class="col-lg-3 pull-right">
<select id="Month" class="employer" asp-for="Month">
@{
for (var i = 1; i < Tools.MonthNames.Length + 1; i++)
{
<option value=@i>@Tools.MonthNames[i - 1]</option>
}
}
</select>
</div>
</div>
</div>
<div class="col-lg-12 pull-right form-group">
<select id="selectWorkShops"asp-for="wsItems" multiple="multiple" class="employer">
</select>
</div>
<fieldset style="border: 1px solid #999797; border-radius: 10px; padding: revert;background-color:white">
<br/>
<button type="submit" id="createButtom" class="btn btn-warning btn-rounded waves-effect waves-light">کپی از آخرین لیست ارسالی</button>
<div class="form-group col-sm-12">
<br/>
<div class="row">
<div class="col-lg-3 pull-right">
<label class="sr-only">نام کارگاه</label>
<input class="form-control inpt" asp-for="WorkShopStr" data-val="true" placeholder="نام کارگاه " style="width: 100%">
</div>
<div class="col-lg-6 pull-right">
<label class="sr-only">کدکارگاه</label>
<input class="form-control inpt" readonly asp-for="WorkShopCode"placeholder="کدکارگاه" style="width: 100%">
</div>
<div class="col-lg-3 pull-right">
<label class="sr-only">ردیف پیمان</label>
<input class="form-control inpt" readonly asp-for="RadifPeyman" placeholder="ردیف پیمان " style="width: 100%">
</div>
</div>
<br/>
<div class="row">
<div class="col-lg-3 pull-right">
<label class="sr-only">نام کارفرما</label>
<input class="form-control inpt" data-val="false" asp-for="EmployerStr" placeholder="نام کارفرما " style="width: 100%">
</div>
<div class="col-lg-6 pull-right">
<label class="sr-only">آدرس</label>
<input class="form-control inpt" asp-for="Address" placeholder="آدرس" style="width: 100%">
</div>
<div class="col-lg-3 pull-right">
<label class="sr-only">شماره لیست</label>
<input class="form-control inpt" asp-for="ListNumber"placeholder="شماره لیست " style="width: 100%">
</div>
</div>
</div>
</fieldset>
<br/>
<div class=" form-group" style="padding: 0px 0px;background-color:transparent">
<ul class="nav nav-tabs tabs" id="myTab">
<li class="tab active pull-right " style="background-color:gray">
<a href="#dsskar" data-toggle="tab" aria-expanded="false" class=" ac">
<h3 style="font-family: 'Web_Yekan' !important; font-size: 18px !important; color: darkred">
DSSKAR
</h3>
</a>
</li>
<li class="tab pull-right" style="background-color:gray">
<a href="#dskwor" data-toggle="tab" aria-expanded="false" class="active ac">
<h3 style="font-family: 'Web_Yekan' !important;font-size: 18px !important;color:darkred">
DSKWOR
</h3>
</a>
</li>
</ul>
<div class="tab-content">
<div class="tab-pane active p-t-10" id="dsskar" style="display: flex">
@*<div class="row p-t-10 " style="background-color:white">*@
<div class="col-md-6 ">
<div class="row form-group">
<div class="row" style="padding: 4px;">
<div class="col-xs-7 data">
<input class="form-control" type="text" value="" id="example-text-input">
</div>
<p class="col-xs-5 float-left">تعداد نفرات </p>
</div>
<div class="row" style="padding: 4px;">
<div class="col-xs-7 data">
<input class="form-control" type="text" value="" id="example-text-input">
</div>
<p class="col-xs-5 float-right ">جمع روزهای کارکرد</p>
</div>
<div class="row" style="padding: 4px;">
<div class="col-xs-7 data">
<input class="form-control" type="text" value="" id="example-text-input">
</div>
<p class="col-xs-5" style="float:left">جمع دستمزد روزانه</p>
</div>
<div class="row" style="padding: 4px;">
<div class="col-xs-7 data">
<input class="form-control" type="text" value="" id="example-text-input">
</div>
<p class="col-xs-5" style="float:right">جمع دستمزد ماهانه</p>
</div>
<div class="row" style="padding: 4px;">
<div class="col-xs-7 data">
<input class="form-control" type="text" value="" id="example-text-input">
</div>
<p class="col-xs-5">جمع مزایای ماهانه مشمول</p>
</div>
</div>
</div>
<div class="col-md-6 ">
<div class="row form-group">
<div class="row" style="padding: 4px;">
<div class="col-xs-7 data">
<input class="form-control" type="text" value="" id="example-text-input">
</div>
<p class="col-xs-5 title">مشمول </p>
</div>
<div class="row" style="padding: 4px;">
<div class="col-xs-7 data">
<input class="form-control" type="text" value="" id="example-text-input">
</div>
<p class="col-xs-5">مشمول و غیر مشمول</p>
</div>
<div class="row" style="padding: 4px;">
<div class="col-xs-7 data">
<input class="form-control" type="text" value="" id="example-text-input">
</div>
<p class="col-xs-5">سهم حق بیمه شده</p>
</div>
<div class="row" style="padding: 4px;">
<div class="col-xs-7 data">
<input class="form-control" type="text" value="" id="example-text-input">
</div>
<p class="col-xs-5">سهم حق کارفرما</p>
</div>
<div class="row" style="padding: 4px;">
<div class="col-xs-7 data">
<input class="form-control" type="text" value="" id="example-text-input">
</div>
<p class="col-xs-5">بیمه بیکاری</p>
</div>
<div class="row" style="padding: 4px;">
<div class="col-xs-7 data">
<input class="form-control" type="text" value="" id="example-text-input">
</div>
<p class="col-xs-5">4% حق بیمه مشاغل سخت و زیان آور</p>
</div>
</div>
</div>
@*</div>*@
</div>
<div class="tab-pane m-5 p-5" id="dskwor">
<div class="row" id="ProductCategoriesDiv">
<div class="col-md-12">
<div class="panel-body">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<table id="datatable2" class="table table-striped table-bordered" style="overflow-x: scroll; overflow-y: scroll; display: block; max-width: -moz-fit-content; max-width: fit-content; ">
<thead>
<tr style="background-color:cornflowerblue !important;color:white">
<th style="font-size: 14px !important; color: white;width:contain !important">ردیف</th>
<th style="font-size: 14px !important; color: white; width: stretch !important ">شماره بیمه</th>
<th style="font-size: 14px !important; color: white" class="sizeSet">نام</th>
<th style="font-size: 14px !important; color: white" class="sizeSet">نام خانوادگی</th>
<th style="font-size: 14px !important ;color:white" class="sizeSet">جنسیت</th>
<th style="font-size: 14px !important ;color:white" class="sizeSet">نام پدر</th>
<th style="font-size: 14px !important ;color:white" class="sizeSet">ش شناسنامه</th>
<th style="font-size: 14px !important ;color:white" class="sizeSet">محل صدور</th>
<th style="font-size: 14px !important ;color:white" class="sizeSet">تاریخ تولد</th>
<th style="font-size: 14px !important ;color:white" class="sizeSet">کدملی</th>
<th style="font-size: 14px !important ;color:white" class="sizeSet">روزهای کارکرد</th>
<th style="font-size: 14px !important ;color:white" class="sizeSet">دستمزد روزانه</th>
<th style="font-size: 14px !important; color: white; width: stretch !important " class="sizeSet">دستمزد ماهانه مشمول</th>
<th style="font-size: 14px !important ;color:white" class="sizeSet">مزایای ماهانه مشمول(مستمر)</th>
<th style="font-size: 14px !important ;color:white" class="sizeSet">مزایای ماهانه مشمول(غیرمستمر)</th>
<th style="font-size: 14px !important ;color:white" class="sizeSet">حق بیمه سهم بیمه شده</th>
<th style="font-size: 14px !important ;color:white" class="sizeSet">شغل</th>
<th style="font-size: 14px !important ;color:white" class="sizeSet">تاریخ آغاز بکار</th>
<th style="font-size: 14px !important ;color:white" class="sizeSet">تاریخ ترک کار</th>
</tr>
</thead>
<tbody>
@{
for (var i = 1; i < 6; i++)
{
var color = "#a9fcff";
if (i % 2 != 0)
{
color = "#a9fcff";
}
else
{
color = "white";
}
<tr style="background-color:@color">
<td>@i</td>
<td>123456789</td>
<td>سیدحسن </td>
<td>مصباح</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
}
}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</fieldset>
</div>
</div>
<div class="modal-footer">
<div class="pull-left">
<button type="submit" id="createButtom" class="btn btn-success btn-rounded waves-effect waves-light">ذخیره</button>
<button type="button" class="btn btn-default btn-rounded waves-effect waves-light m-b-5" data-dismiss="modal">بستن</button>
</div>
</div>
</form>
</div>
<script type="text/javascript">
$(function() {
$("#selectWorkShopFunc").select2({
placeholder: "کارفرما",
dir: "rtl",
});
$("#WorkShopId").select2({
placeholder: "کارگاه",
dir: "rtl",
});
$("#Year").select2({
placeholder: "سال",
dir: "rtl",
});
$("#Month").select2({
placeholder: "ماه",
dir: "rtl",
});
$("#selectWorkShops").select2({
placeholder: "کارگاه ها",
dir: "rtl",
});
});
</script>
<script>
$(document).ready(function() {
$('.modal-dialog').addClass('modal-lg');
})
</script>
<script>
$("#myTab a").click(function(e) {
e.preventDefault();
$(this).tab('show');
});
// store the currently selected tab in the hash value
//$("ul.nav-tabs > li > a").on("shown.bs.tab", function (e) {
// var id = $(e.target).attr("href").substr(1);
// window.location.hash = id;
//});
// on load of the page: switch to the currently selected tab
var hash = window.location.hash;
$(`#myTab a[href="${hash}"]`).tab('show', 'active');
</script>
<script>
$(document).ready(function() {
$("#selectWorkShopFunc").change(function() {
$("#WorkShopId").empty();
$("#selectWorkShops").empty();
$.ajax({
type: 'GET',
url: '/Admin/Company/Insurance?handler=SubtitleList',
dataType: 'json',
data: { employerId: $("#selectWorkShopFunc").val() },
success: function(result) {
console.log(result);
$("#WorkShopId").append(` <option value="${-1}">کارگاه را انتخاب کنید</option>`);
//$("#selectWorkShops").append(' <option value="' + -1 + '">' +
// "کارگاه را انتخاب کنید" + '</option>');
$.each(result,
function(i, result) {
$("#WorkShopId").append(` <option value="${result.id}">${result.workshopName}</option>`);
});
$.each(result,
function(i, result) {
$("#selectWorkShops").append(` <option value="${result.id}">${result.workshopName}</option>`);
});
},
error: function(ex) {
alert('Error');
}
});
return false;
});
$("#WorkShopId").change(function() {
const wsId = $("#WorkShopId").val();
const select_num = $("#WorkShopId").index() + 1;
console.log(select_num);
console.log(wsId);
// Set selected
$('#selectWorkShops').val(wsId);
$('#selectWorkShops').select2().trigger('change');
$("#selectWorkShops").select2({
placeholder: "کارگاه ها",
dir: "rtl",
});
$.ajax({
dataType: 'json',
type: 'GET',
url: '/Admin/Company/Insurance?handler=LastInsurance',
headers: { "RequestVerificationToken": $('@Html.AntiForgeryToken()').val() },
data: { "workShopId": wsId },
success: function(response) {
console.log(response);
if (response == undefined || response == null) {
$('#EmployerStr').val("");
$('#WorkShopStr').val("");
$('#WorkShopCode').val("");
$('#RadifPeyman').val("");
$('#ListNumber').val("");
$('#Address').val("");
return false;
}
$('#EmployerStr').val(response.employerStr);
$('#WorkShopStr').val(response.workShopStr);
$('#WorkShopCode').val(response.workShopCode);
$('#RadifPeyman').val(response.radifPeyman);
$('#ListNumber').val(response.listNumber);
$('#Address').val(response.address);
},
failure: function(response) {
console.log(5, response);
$.Notification.autoHideNotify('error', 'top center', 'مشکل در دریافت اطلاعات ', response.message);
}
});
return false;
});
});
</script>