fix register financial problems
This commit is contained in:
@@ -41,6 +41,23 @@ public static class Tools
|
||||
return Regex.IsMatch(mobileNo, "^((09))(\\d{9})$");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع و تعداد ماه را میگیرد و تاریخ پایان قراردا را بر میگرداند
|
||||
/// </summary>
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="monthPlus"></param>
|
||||
/// <returns></returns>
|
||||
public static (DateTime endDateGr, string endDateFa) FindEndOfContract(string startDate, string monthPlus)
|
||||
{
|
||||
|
||||
int startYear = Convert.ToInt32(startDate.Substring(0, 4));
|
||||
int startMonth = Convert.ToInt32(startDate.Substring(5, 2));
|
||||
int startDay = Convert.ToInt32(startDate.Substring(8, 2));
|
||||
var start = new PersianDateTime(startYear, startMonth, startDay);
|
||||
var end = (start.AddMonths(Convert.ToInt32(monthPlus))).AddDays(-1);
|
||||
return ($"{end}".ToGeorgianDateTime(), $"{end}");
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// دریافت روزهای کارکرد پرسنل در لیست بیمه ماه مشخص شده
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.InstitutionPlan;
|
||||
@@ -55,14 +56,14 @@ public interface ITemporaryClientRegistrationApplication
|
||||
/// <param name="paymentModel"></param>
|
||||
/// <returns></returns>
|
||||
Task<ReviewAndPaymentViewModel> GetTotalPaymentAndWorkshopList(long contractingPartyTempId,
|
||||
string periodModel = "12", string paymentModel = "OneTime");
|
||||
string periodModel = "12", string paymentModel = "OneTime", string contractStartType = "currentMonth");
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد یا ویرایش قرارداد موقت
|
||||
/// </summary>
|
||||
/// <param name="contractingPartyTempId"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> CreateOrUpdateInstitutionContractTemp(long contractingPartyTempId, string periodModel, string paymentModel, double totalPayment, double valueAddedTax);
|
||||
Task<OperationResult> CreateOrUpdateInstitutionContractTemp(long contractingPartyTempId, string periodModel, string paymentModel, double totalPayment, double valueAddedTax, DateTime contractStart);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت کد برای کلاینت
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.TemporaryClientRegistration;
|
||||
|
||||
@@ -114,4 +115,47 @@ public class ReviewAndPaymentViewModel
|
||||
/// لیست اقساط ماهیانه
|
||||
/// </summary>
|
||||
public List<MonthlyInstallment> MonthlyInstallments { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع قرارداد در اول ماه جاری
|
||||
/// -
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string ContractStartCurrentMonthFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع قرارداد در اول ماه جاری
|
||||
/// -
|
||||
/// میلادی
|
||||
/// </summary>
|
||||
public DateTime ContractStartCurrentMonthGr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع قرارداد در اول ماه بعد
|
||||
/// -
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string ContractStartNextMonthFa{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ شروع قرارداد در اول ماه بعد
|
||||
/// -
|
||||
/// میلادی
|
||||
/// </summary>
|
||||
public DateTime ContractStartNextMonthGr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان قرارداد
|
||||
/// -
|
||||
/// میلادی
|
||||
/// </summary>
|
||||
public DateTime ContractEndGr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان قرارداد
|
||||
/// -
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string ContractEndFa { get; set; }
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -66,9 +66,9 @@ namespace ServiceHost.Pages.register
|
||||
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnGetTotalPaymentAndWorkshopList(long contractingPartyTempId, string periodModel = "12", string paymentModel = "OneTime")
|
||||
public async Task<IActionResult> OnGetTotalPaymentAndWorkshopList(long contractingPartyTempId, string periodModel = "12", string paymentModel = "OneTime", string contractStartType = "currentMonth")
|
||||
{
|
||||
var result = await _temporaryClientRegistrationApplication.GetTotalPaymentAndWorkshopList(contractingPartyTempId, periodModel, paymentModel);
|
||||
var result = await _temporaryClientRegistrationApplication.GetTotalPaymentAndWorkshopList(contractingPartyTempId, periodModel, paymentModel, contractStartType);
|
||||
return new JsonResult(new
|
||||
{
|
||||
data = result,
|
||||
@@ -87,9 +87,9 @@ namespace ServiceHost.Pages.register
|
||||
}
|
||||
|
||||
|
||||
public async Task<IActionResult> OnPostCreateOrUpdateInstitutionContractTemp(long contractingPartyTempId, string periodModel, string paymentModel, double totalPayment, double valueAddedTax)
|
||||
public async Task<IActionResult> OnPostCreateOrUpdateInstitutionContractTemp(long contractingPartyTempId, string periodModel, string paymentModel, double totalPayment, double valueAddedTax, DateTime contractStart)
|
||||
{
|
||||
var result = await _temporaryClientRegistrationApplication.CreateOrUpdateInstitutionContractTemp(contractingPartyTempId, periodModel, paymentModel, totalPayment, valueAddedTax);
|
||||
var result = await _temporaryClientRegistrationApplication.CreateOrUpdateInstitutionContractTemp(contractingPartyTempId, periodModel, paymentModel, totalPayment, valueAddedTax, contractStart);
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = result.IsSuccedded,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<div class="row p-0 step4Container">
|
||||
<div class="cardHeight p-0">
|
||||
<div class="cardContainer p-0" id="cardSelected">
|
||||
<div class="cardContainer p-2" id="cardSelected">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,75 +16,93 @@
|
||||
پرداخت یکجا
|
||||
</button>
|
||||
<button type="button" class="btnStep4Tab" id="priceStep">
|
||||
پرداخت مرحله ای
|
||||
پرداخت ماهانه
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="footerStep4Container">
|
||||
<div class="titleFooter">مدت قرارداد</div>
|
||||
<div class="radioBtnFooterContainer">
|
||||
<input type="radio" id="oneMonth" value="oneMonth" name="radMonth" class="radioOption" />
|
||||
<label for="oneMonth" class="radioLabelListOption">1 ماهه</label>
|
||||
<div>
|
||||
<div class="titleFooter">مدت قرارداد</div>
|
||||
<div class="radioBtnFooterContainer">
|
||||
<input type="radio" id="oneMonth" value="oneMonth" name="radMonth" class="radioOption" disabled="disabled"/>
|
||||
<label for="oneMonth" class="radioLabelListOption disable">1 ماهه</label>
|
||||
|
||||
<input type="radio" id="threeMonth" value="threeMonth" name="radMonth" class="radioOption" />
|
||||
<label for="threeMonth" class="radioLabelListOption">3 ماهه</label>
|
||||
<input type="radio" id="threeMonth" value="threeMonth" name="radMonth" class="radioOption" disabled="disabled" />
|
||||
<label for="threeMonth" class="radioLabelListOption disable">3 ماهه</label>
|
||||
|
||||
<input type="radio" id="sixMonth" value="sixMonth" name="radMonth" class="radioOption" />
|
||||
<label for="sixMonth" class="radioLabelListOption">6 ماهه</label>
|
||||
<input type="radio" id="sixMonth" value="sixMonth" name="radMonth" class="radioOption" disabled="disabled" />
|
||||
<label for="sixMonth" class="radioLabelListOption disable">6 ماهه</label>
|
||||
|
||||
<input type="radio" id="twelveMonth" value="twelveMonth" name="radMonth" class="radioOption" checked="checked" />
|
||||
<label for="twelveMonth" class="radioLabelListOption">12 ماهه</label>
|
||||
<input type="radio" id="twelveMonth" value="twelveMonth" name="radMonth" class="radioOption" checked="checked"/>
|
||||
<label for="twelveMonth" class="radioLabelListOption">12 ماهه</label>
|
||||
</div>
|
||||
<div class="infoPricesContainerDiv mt-3" id="priceStepContainer" style="display: none">
|
||||
<div class="infoPricesContainer" id="priceStepContainerHtml">
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : اول</div>
|
||||
<div class="col-4 text-start">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : دوم</div>
|
||||
<div class="col-4 text-start">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : سوم</div>
|
||||
<div class="col-4 text-start">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : چهارم</div>
|
||||
<div class="col-4 text-start">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : پنجم</div>
|
||||
<div class="col-4 text-start">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : ششم</div>
|
||||
<div class="col-4 text-start">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="infoPricesContainer" id="priceStepContainer" style="display: none">
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : اول</div>
|
||||
<div class="col-4 text-start">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : دوم</div>
|
||||
<div class="col-4 text-start">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : سوم</div>
|
||||
<div class="col-4 text-start">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : چهارم</div>
|
||||
<div class="col-4 text-start">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : پنجم</div>
|
||||
<div class="col-4 text-start">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="col-4 text-start">سررسید : ششم</div>
|
||||
<div class="col-4 text-start">-</div>
|
||||
<div class="col-4 text-end">- ریال</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<div class="lineRegisterStep4 px-2 my-2"></div>
|
||||
<div class="d-block text-center d-md-flex justify-content-between align-items-center gap-5">
|
||||
<div>
|
||||
<div class="radioBtnFooterContainer">
|
||||
<input type="radio" id="contractStartCurrentMonthFa" value="contractStartCurrentMonthFa" name="radFinanceContract" class="radioOption" checked="checked" />
|
||||
<label for="contractStartCurrentMonthFa" class="radioLabelListOption">اول ماه جاری</label>
|
||||
|
||||
<div class="lineRegisterStep4 px-2"></div>
|
||||
<div class="my-3">
|
||||
<div class="d-flex align-items-center justify-content-between px-1 px-lg-4">
|
||||
<div class="titlePriceStep4">مجموع مبالغ:</div>
|
||||
<div class="totalPriceStep4" id="sumOfWorkshopsPaymentPayment">-</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between px-1 px-lg-4">
|
||||
<div class="titlePriceStep4">ارزش افزوده:</div>
|
||||
<div class="totalPriceStep4" id="valueAddedTaxSt">-</div>
|
||||
<input type="hidden" id="valueAddedTaxDoubleInput" />
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between mt-1 px-1 px-lg-4">
|
||||
<div class="titlePriceStep4">مبلغ قابل پرداخت:</div>
|
||||
<div class="totalPriceStep4" id="totalPaymentStr">-</div>
|
||||
<input type="hidden" id="totalPaymentDoubleInput" />
|
||||
<input type="radio" id="contractStartNextMonthFa" value="contractStartNextMonthFa" name="radFinanceContract" class="radioOption" />
|
||||
<label for="contractStartNextMonthFa" class="radioLabelListOption">آخر ماه بعد</label>
|
||||
</div>
|
||||
<div id="ContractStartMonthView" class=""style="text-align: center; margin: 3px auto; font-size: 12px; color: #0B5959;"></div>
|
||||
<input type="hidden" id="ContractStartMonthGr" value="" />
|
||||
</div>
|
||||
<div>
|
||||
<div class="d-flex align-items-center justify-content-between px-1 px-lg-4 gap-5">
|
||||
<div class="titlePriceStep4">مجموع مبالغ:</div>
|
||||
<div class="totalPriceStep4" style="color: #6b6b6b" id="sumOfWorkshopsPaymentPayment">-</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between px-1 px-lg-4 gap-5">
|
||||
<div class="titlePriceStep4">ارزش افزوده:</div>
|
||||
<div class="totalPriceStep4" style="color: #6b6b6b" id="valueAddedTaxSt">-</div>
|
||||
<input type="hidden" id="valueAddedTaxDoubleInput"/>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-between mt-1 px-1 px-lg-4 gap-5">
|
||||
<div class="titlePriceStep4">مبلغ قابل پرداخت:</div>
|
||||
<div class="totalPriceStep4" id="totalPaymentStr">-</div>
|
||||
<input type="hidden" id="totalPaymentDoubleInput"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
.openBtnWP {
|
||||
background-color: #B6F2E1;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
@@ -71,6 +71,36 @@
|
||||
color: #0B5959;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
width: 150px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.totalPayCon {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.numberSpanInput {
|
||||
width: 60px;
|
||||
text-align: center;
|
||||
direction: ltr;
|
||||
}
|
||||
|
||||
.errorString {
|
||||
animation: shake 300ms;
|
||||
color: #eb3434 !important;
|
||||
display: none;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.orderCustom1 {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.orderCustom2 {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.divider {
|
||||
@@ -85,9 +115,10 @@
|
||||
|
||||
.totalPaymentWP {
|
||||
color: #1ABA3D;
|
||||
font-size: 19px;
|
||||
font-weight: 800;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
text-align: end;
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
.titleInfoWP {
|
||||
@@ -176,7 +207,7 @@
|
||||
text-align: center;
|
||||
padding: 6px 9px;
|
||||
border-radius: 9px;
|
||||
width: 160px;
|
||||
width: 180px;
|
||||
transition: all 0.3s ease-in-out;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
@@ -227,19 +258,13 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@media only screen and (max-width: 1366px) {
|
||||
/*.btnRadioContainer {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}*/
|
||||
.radioLabelListOption {
|
||||
width: 134px;
|
||||
width: 144px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.totalPayWP {
|
||||
@@ -255,7 +280,16 @@
|
||||
@media only screen and (max-width: 1200px) {
|
||||
|
||||
.btnRadioContainer {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
/*grid-template-columns: repeat(3, minmax(0, 1fr));*/
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.orderCustom1 {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.orderCustom2 {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.totalPayWP {
|
||||
@@ -264,7 +298,7 @@
|
||||
}
|
||||
|
||||
.radioLabelListOption {
|
||||
width: 129px;
|
||||
width: 145px;
|
||||
padding: 4px 6px;
|
||||
}
|
||||
}
|
||||
@@ -293,6 +327,7 @@
|
||||
|
||||
.totalPayWP {
|
||||
font-size: 13px;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.totalPaymentWP {
|
||||
@@ -302,6 +337,38 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 625px) {
|
||||
.workshopListItem .titleWP {
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.totalPayWP {
|
||||
font-size: 11px;
|
||||
width: 110px;
|
||||
font-weight: 700;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.totalPaymentWP {
|
||||
margin-top: 18px;
|
||||
}
|
||||
|
||||
.totalPayCon {
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.openBtnWP,
|
||||
.btnRemove {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -327,8 +394,6 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
|
||||
.cardHeight {
|
||||
height: 50%;
|
||||
height: 30vh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
@@ -121,6 +121,9 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 9px;
|
||||
height: 260px;
|
||||
justify-content: space-between;
|
||||
padding: 12px 9px;
|
||||
}
|
||||
|
||||
.footerStep4Container .titleFooter {
|
||||
@@ -172,16 +175,20 @@
|
||||
}
|
||||
|
||||
|
||||
.infoPricesContainer {
|
||||
.infoPricesContainerDiv {
|
||||
height: 70px;
|
||||
overflow: auto;
|
||||
padding: 6px;
|
||||
border: 1px solid #E7E7E7;
|
||||
border-radius: 16px;
|
||||
background-color: #F5F5F5;
|
||||
border-radius: 9px;
|
||||
}
|
||||
|
||||
.infoPricesContainer {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
height: 120px;
|
||||
overflow: auto;
|
||||
grid-auto-flow: column;
|
||||
grid-template-rows: repeat(6, minmax(0, 1fr));
|
||||
align-content: start;
|
||||
}
|
||||
|
||||
@@ -243,7 +250,7 @@
|
||||
}
|
||||
|
||||
.infoPricesContainer {
|
||||
grid-template-columns: repeat(1, minmax(0, 1fr));
|
||||
grid-template-rows: repeat(1, minmax(0, 1fr));
|
||||
height: 130px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
@@ -8,10 +8,10 @@ var workshopDataId = 0;
|
||||
$(document).ready(function () {
|
||||
var $inputs = $('.operations-btns input');
|
||||
|
||||
$(".select2Option").select2({
|
||||
language: "fa",
|
||||
dir: "rtl"
|
||||
});
|
||||
// $(".select2Option").select2({
|
||||
// language: "fa",
|
||||
// dir: "rtl"
|
||||
//});
|
||||
|
||||
autoScroll();
|
||||
});
|
||||
@@ -22,21 +22,78 @@ function autoScroll() {
|
||||
}, 2500);
|
||||
}
|
||||
|
||||
$(document).on('input', '.operations-btns input[type="text"]', function() {
|
||||
let $input = $(this);
|
||||
let nameSpan = $input.closest(".accordion-item").find('.workshopListItem .workshopNameSpan');
|
||||
nameSpan.text($input.val());
|
||||
$(document).on('input', '.operations-btns .workshopName', function () {
|
||||
let $input = $(this);
|
||||
let nameSpan = $input.closest(".accordion-item").find('.workshopListItem .workshopNameSpan');
|
||||
nameSpan.text($input.val());
|
||||
updateAddButtonText();
|
||||
});
|
||||
|
||||
$(document).on('change', ".operations-btns select", function () {
|
||||
$(document).on('input', '.operations-btns .numberSpanInput', function () {
|
||||
let $input = $(this);
|
||||
let numberSpan = $input.closest(".accordion-item").find('.workshopListItem .numberSpan');
|
||||
numberSpan.text($input.val());
|
||||
let value = $input.val().replace(/\D/g, '');
|
||||
$input.val(value);
|
||||
|
||||
let number = parseInt(value, 10);
|
||||
|
||||
if (isNaN(number) || number === 0) {
|
||||
$input.addClass("errored");
|
||||
$('.errorString').show().text('عدد وارد شده نامعتبر است.');
|
||||
} else if (number > 2000) {
|
||||
$input.addClass("errored");
|
||||
$('.errorString').show().text('تعداد وارد شده نباید بیشتر از ۲۰۰۰ باشد.');
|
||||
//$input.val('2000');
|
||||
} else if (number < 3) {
|
||||
$input.addClass("errored");
|
||||
$('.errorString').show().text('تعداد وارد شده باید حداقل ۳ نفر باشد.');
|
||||
//$input.val('3');
|
||||
} else {
|
||||
$('.errorString').hide().text('');
|
||||
$input.removeClass("errored");
|
||||
}
|
||||
|
||||
let numberSpan = $input.closest(".accordion-item").find('.workshopListItem .numberSpan');
|
||||
numberSpan.text($input.val());
|
||||
updateAddButtonText();
|
||||
});
|
||||
|
||||
$(document).on('change', '.btnRadioContainer .radioOption', updateAddButtonText);
|
||||
$(document).on('change input', '.btnRadioContainer .radioOption', function () {
|
||||
const accordionItem = $(this).closest('.accordion-item');
|
||||
const dataId = accordionItem.data('id');
|
||||
const dataIsNew = accordionItem.data('new');
|
||||
|
||||
// Services radio btn
|
||||
const $contract = $(`#ContractAndCheckout${dataIsNew ? `_` : ''}${dataId}`);
|
||||
const $contractAndCheckoutInPerson = $(`#ContractAndCheckoutInPerson${dataIsNew ? `_` : ''}${dataId}`);
|
||||
const $insurance = $(`#Insurance${dataIsNew ? `_` : ''}${dataId}`);
|
||||
const $insuranceInPerson = $(`#InsuranceInPerson${dataIsNew ? `_` : ''}${dataId}`);
|
||||
const $rollCall = $(`#RollCall${dataIsNew ? `_` : ''}${dataId}`);
|
||||
const $customize = $(`#CustomizeCheckout${dataIsNew ? `_` : ''}${dataId}`);
|
||||
|
||||
if (!$contract.prop('checked')) {
|
||||
$rollCall.prop('checked', false).prop('disabled', true).closest('div').find('label').addClass('disable');
|
||||
$customize.prop('checked', false).prop('disabled', true).closest('div').find('label').addClass('disable');
|
||||
$contractAndCheckoutInPerson.prop('checked', false).prop('disabled', false).closest('div').find('label').addClass('disable');
|
||||
} else {
|
||||
$contractAndCheckoutInPerson.prop('checked', true).prop('disabled', false).closest('div').find('label').removeClass('disable');
|
||||
$rollCall.prop('disabled', false).closest('div').find('label').removeClass('disable');
|
||||
|
||||
if ($rollCall.prop('checked')) {
|
||||
$customize.prop('disabled', false).closest('div').find('label').removeClass('disable');
|
||||
} else {
|
||||
$customize.prop('checked', false).prop('disabled', true).closest('div').find('label').addClass('disable');
|
||||
}
|
||||
}
|
||||
|
||||
if (!$insurance.prop('checked')) {
|
||||
$insuranceInPerson.prop('checked', false).prop('disabled', false).closest('div').find('label').addClass('disable');
|
||||
} else {
|
||||
$insuranceInPerson.prop('checked', true).prop('disabled', false).closest('div').find('label').removeClass('disable');
|
||||
}
|
||||
// Services radio btn
|
||||
updateAddButtonText();
|
||||
});
|
||||
// $(document).on('change', '.btnRadioContainer .radioOption', updateAddButtonText);
|
||||
|
||||
$(document).on("click", ".btnAdd", function () {
|
||||
let $currentWorkshop = $(".accordion-item").last();
|
||||
@@ -44,7 +101,7 @@ $(document).on("click", ".btnAdd", function () {
|
||||
let allInputsFilled = true;
|
||||
let atLeastOneChecked = false;
|
||||
|
||||
$currentWorkshop.find('.operations-btns input[type="text"]').each(function () {
|
||||
$currentWorkshop.find('.operations-btns input').each(function () {
|
||||
if ($(this).val().trim() === "") {
|
||||
allInputsFilled = false;
|
||||
validateField($(this), "ابتدا اطلاعات کارگاه را وارد نمائید", 3500);
|
||||
@@ -52,8 +109,8 @@ $(document).on("click", ".btnAdd", function () {
|
||||
} else {
|
||||
workshopName = $(this).val().trim();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$currentWorkshop.find('.btnRadioContainer .radioOption').each(function () {
|
||||
if ($(this).prop('checked')) {
|
||||
atLeastOneChecked = true;
|
||||
@@ -72,55 +129,57 @@ function addNewWorkshop() {
|
||||
workshopDataId = workshopDataId + 1;
|
||||
var workshopHtml = `<div class="accordion-item" data-id="new_${workshopDataId}" data-new="true">
|
||||
<div class="workshopListItem">
|
||||
<div class="titleWP">
|
||||
<span class="workshopNameSpan"></span>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-end gap-3">
|
||||
<div class="badgeWP">
|
||||
<span class="numberSpan">25</span>
|
||||
<span>نفر</span>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="totalPayWP">
|
||||
<span id="totalPay_new_${workshopDataId}">-</span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-end">
|
||||
<button type="button" class="btnRemove">
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M6.875 11H15.125" stroke="white"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" class="openBtnWP">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 6L8 10L4 6" stroke="#0B5959" stroke-width="1.5" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
<div class="col-6 col-md-9 col-lg-8 col-xl-9">
|
||||
<div class="titleWP">
|
||||
<span class="workshopNameSpan"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6 col-md-3 col-lg-4 col-xl-3">
|
||||
<div class="d-flex align-items-center justify-content-end gap-1 gap-md-2">
|
||||
<div class="badgeWP">
|
||||
<span class="numberSpan">-</span>
|
||||
<span>نفر</span>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="totalPayWP">
|
||||
<div id="totalPay_new_${workshopDataId}" class="totalPayCon justify-content-center">-</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-end">
|
||||
<button type="button" class="btnRemove">
|
||||
<svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.19922 11.2734L7.19922 9.0327" stroke="#BF3737" stroke-linecap="round"/>
|
||||
<path d="M10.8008 11.2734L10.8008 9.0327" stroke="#BF3737" stroke-linecap="round"/>
|
||||
<path d="M2.51855 5.29883H15.4828V5.29883C14.9988 5.29883 14.7568 5.29883 14.5558 5.34052C13.7754 5.5024 13.1656 6.1122 13.0037 6.89261C12.962 7.09358 12.962 7.33561 12.962 7.81966V11.0474C12.962 12.8954 12.962 13.8194 12.3975 14.4013C12.3834 14.4158 12.3691 14.4301 12.3546 14.4442C11.7727 15.0087 10.8487 15.0087 9.0007 15.0087V15.0087C7.1527 15.0087 6.22871 15.0087 5.64682 14.4442C5.63228 14.4301 5.61796 14.4158 5.60385 14.4013C5.03939 13.8194 5.03939 12.8954 5.03939 11.0474V7.81966C5.03939 7.33561 5.03939 7.09358 4.9977 6.89261C4.83582 6.1122 4.22602 5.5024 3.4456 5.34052C3.24464 5.29883 3.00261 5.29883 2.51855 5.29883V5.29883Z" stroke="#BF3737" stroke-linecap="round"/>
|
||||
<path d="M7.19959 3.05764C7.19959 3.05764 7.55971 2.31055 9.00019 2.31055C10.4407 2.31055 10.8008 3.05746 10.8008 3.05746" stroke="#BF3737" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" class="openBtnWP">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 6L8 10L4 6" stroke="#0B5959" stroke-width="1.5" stroke-linecap="round" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="operations-btns">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12 col-md-9 col-lg-8 col-xl-10">
|
||||
<div class="col-12 col-md-9 col-lg-8 col-xl-9">
|
||||
<div class="d-flex align-items-end gap-2">
|
||||
<div class="form-group">
|
||||
<div class="titleInfoWP">
|
||||
نام مجموعه (کارگاه)
|
||||
</div>
|
||||
<input type="text" class="form-control workshop-form-control mt-1" id="workshopName" placeholder="نام کارگاه را وارد کنید">
|
||||
<input type="text" class="form-control workshop-form-control mt-1 workshopName" id="workshopName" placeholder="نام کارگاه را وارد کنید">
|
||||
</div>
|
||||
<div class="form-group d-block d-md-flex align-items-center gap-2">
|
||||
<span class="titleInfoWP">
|
||||
تعداد پرسنل:
|
||||
</span>
|
||||
<select class="form-control text-center select2Option_new_${workshopDataId}" id="numberPersonnel_new_${workshopDataId}">
|
||||
<option value="25">25</option>
|
||||
<option value="50">50</option>
|
||||
<option value="100">100</option>
|
||||
<option value="150">150</option>
|
||||
<option value="200">200</option>
|
||||
</select>
|
||||
<input type="text" id="numberPersonnel_new_${workshopDataId}" class="form-control numberSpanInput select2_new_${workshopDataId}" maxlength="4" value="">
|
||||
<span class="errorString"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
@@ -138,23 +197,35 @@ function addNewWorkshop() {
|
||||
<input type="checkbox" id="Insurance_new_${workshopDataId}" value="true" name="insurance_new_${workshopDataId}" class="radioOption">
|
||||
<label for="Insurance_new_${workshopDataId}" class="radioLabelListOption outlineDate">ارسال لیست بیمه</label>
|
||||
</div>
|
||||
<div>
|
||||
<div class="orderCustom1">
|
||||
<input type="checkbox" id="RollCall_new_${workshopDataId}" value="true" name="rollCall_new_${workshopDataId}" class="radioOption">
|
||||
<label for="RollCall_new_${workshopDataId}" class="radioLabelListOption outlineDate">ساعت حضور و غیاب</label>
|
||||
<label for="RollCall_new_${workshopDataId}" class="radioLabelListOption outlineDate disable">ساعت حضور و غیاب</label>
|
||||
</div>
|
||||
<div>
|
||||
<div class="orderCustom1">
|
||||
<input type="checkbox" id="CustomizeCheckout_new_${workshopDataId}" value="true" name="customizeCheckout_new_${workshopDataId}" class="radioOption">
|
||||
<label for="CustomizeCheckout_new_${workshopDataId}" class="radioLabelListOption outlineDate">فیش حقوقی غیررسمی</label>
|
||||
<label for="CustomizeCheckout_new_${workshopDataId}" class="radioLabelListOption outlineDate disable">فیش حقوقی غیررسمی</label>
|
||||
</div>
|
||||
<div class="orderCustom2">
|
||||
<input type="checkbox" id="ContractAndCheckoutInPerson_new_${workshopDataId}" value="true" name="ContractAndCheckoutInPerson_new_${workshopDataId}" class="radioOption">
|
||||
<label for="ContractAndCheckoutInPerson_new_${workshopDataId}" class="radioLabelListOption outlineDate disable">خدمات حضوری قرداد و تصفیه</label>
|
||||
</div>
|
||||
<div class="orderCustom2">
|
||||
<input type="checkbox" id="InsuranceInPerson_new_${workshopDataId}" value="true" name="InsuranceInPerson_new_${workshopDataId}" class="radioOption">
|
||||
<label for="InsuranceInPerson_new_${workshopDataId}" class="radioLabelListOption outlineDate disable">خدمات حضوری بیمه</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-3 col-lg-4 col-xl-2">
|
||||
<div class="totalPaymentWP">
|
||||
<span id="totalPayment_new_${workshopDataId}">-</span>
|
||||
</div>
|
||||
<div class="col-12 col-md-3 col-lg-4 col-xl-3">
|
||||
<div class="d-flex align-items-center justify-content-center gap-3">
|
||||
<div class="totalPaymentWP" id="totalPayment_${workshopDataId}">
|
||||
<div class="totalPayCon justify-content-center" id="totalPayment_new_${workshopDataId}">
|
||||
-
|
||||
</div>
|
||||
</div>
|
||||
</div
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -163,10 +234,10 @@ function addNewWorkshop() {
|
||||
|
||||
$('.accordion').append(workshopHtml);
|
||||
|
||||
$(`.select2Option_new_${workshopDataId}`).select2({
|
||||
language: "fa",
|
||||
dir: "rtl"
|
||||
});
|
||||
//$(`.select2Option_new_${workshopDataId}`).select2({
|
||||
// language: "fa",
|
||||
// dir: "rtl"
|
||||
// });
|
||||
|
||||
$(".operations-btns").slideUp(300);
|
||||
$(".openBtnWP").removeClass('expanded');
|
||||
@@ -220,13 +291,13 @@ function createOrUpdateCommand() {
|
||||
let selectedRollCall = false;
|
||||
let selectedCustomizeCheckout = false;
|
||||
let allInputsFilled = true;
|
||||
let atLeastOneChecked = false;
|
||||
let atLeastOneChecked = false;
|
||||
|
||||
let workshopID = command.workshops.length;
|
||||
|
||||
if (!allInputsFilled) return;
|
||||
|
||||
$currentWorkshop.find('.operations-btns input[type="text"]').each(function() {
|
||||
$currentWorkshop.find('.operations-btns .workshopName').each(function() {
|
||||
if ($(this).val() === "") {
|
||||
allInputsFilled = false;
|
||||
validateField($(this), "ابتدا اطلاعات کارگاه را وارد نمائید", 3500);
|
||||
@@ -234,9 +305,17 @@ function createOrUpdateCommand() {
|
||||
} else {
|
||||
workshopName = $(this).val();
|
||||
}
|
||||
});
|
||||
|
||||
$currentWorkshop.find('.numberSpanInput').each(function () {
|
||||
let val = parseInt($(this).val(), 10);
|
||||
if (isNaN(val) || val === 0 || val < 3 || val > 2000) {
|
||||
validateField($(this), "لطفا تعداد پرسنل را مشخص نمایید.", 3500);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
personnelCount = parseInt($currentWorkshop.find(".operations-btns select").val()) || 0;
|
||||
personnelCount = parseInt($currentWorkshop.find(".operations-btns .numberSpanInput").val());
|
||||
|
||||
function checkCheckbox(serviceName) {
|
||||
const selector = `.btnRadioContainer #${serviceName}${dataIsNew ? `_` : ''}${dataId}`;
|
||||
@@ -299,7 +378,8 @@ function createOrUpdateCommand() {
|
||||
|
||||
function updateAddButtonText() {
|
||||
let allInputsFilled = true;
|
||||
let atLeastOneChecked = false;
|
||||
let atLeastOneChecked = false;
|
||||
let allNumbersValid = true;
|
||||
|
||||
$(".accordion-item").each(function () {
|
||||
let $workshop = $(this);
|
||||
@@ -307,7 +387,7 @@ function updateAddButtonText() {
|
||||
let isChecked = false;
|
||||
atLeastOneChecked = false;
|
||||
|
||||
$workshop.find('.operations-btns input[type="text"]').each(function () {
|
||||
$workshop.find('.operations-btns .workshopName').each(function () {
|
||||
if ($(this).val().trim() === "") {
|
||||
isFilled = false;
|
||||
return false;
|
||||
@@ -321,12 +401,20 @@ function updateAddButtonText() {
|
||||
}
|
||||
});
|
||||
|
||||
$workshop.find('.numberSpanInput').each(function () {
|
||||
let val = parseInt($(this).val(), 10);
|
||||
if (isNaN(val) || val === 0 || val < 3 || val > 2000) {
|
||||
allNumbersValid = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
if (!isFilled) allInputsFilled = false;
|
||||
if (isChecked) atLeastOneChecked = true;
|
||||
});
|
||||
|
||||
|
||||
if (allInputsFilled && atLeastOneChecked) {
|
||||
if (allInputsFilled && atLeastOneChecked && allNumbersValid) {
|
||||
$('.btnAdd').prop('disabled', false).removeClass('disable');
|
||||
$('#nextStep3').prop('disabled', false).removeClass('disable');
|
||||
} else {
|
||||
@@ -387,27 +475,38 @@ function updateRemoveButtons() {
|
||||
$(".btnRemove").last().prop('disabled', false).removeClass("disable");
|
||||
}
|
||||
|
||||
$(document).on('change', '.operations-btns select, .btnRadioContainer .radioOption', function () {
|
||||
// Get Amounts for a Workshop service
|
||||
$(document).on('change input', '.operations-btns .numberSpanInput, .btnRadioContainer .radioOption', function () {
|
||||
const accordionItem = $(this).closest('.accordion-item');
|
||||
const dataId = accordionItem.data('id');
|
||||
const dataIsNew = accordionItem.data('new');
|
||||
|
||||
const $totalPayment = $(`#totalPayment_${dataId}`);
|
||||
const $totalPay = $(`#totalPay_${dataId}`);
|
||||
|
||||
|
||||
const personnelCount = parseInt($(`#numberPersonnel${dataIsNew ? `_` : ''}${dataId}`).val()) || 0;
|
||||
if (personnelCount === 0) {
|
||||
let existingSumAmount = sumAmountArray.find(w => w.workshopDataId === dataId);
|
||||
if (existingSumAmount) {
|
||||
sumAmountArray = sumAmountArray.filter(w => w.workshopDataId !== dataId);
|
||||
}
|
||||
}
|
||||
sumNumberOfAmount();
|
||||
$totalPayment.text('-');
|
||||
$totalPay.text('-');
|
||||
$totalPayment.addClass('justify-content-center').text('-');
|
||||
$totalPay.addClass('justify-content-center').text('-');
|
||||
return;
|
||||
}
|
||||
} else if (personnelCount > 2000) {
|
||||
sumNumberOfAmount();
|
||||
$totalPayment.addClass('justify-content-center').text('-');
|
||||
$totalPay.addClass('justify-content-center').text('-');
|
||||
return;
|
||||
} else if (personnelCount < 3) {
|
||||
sumNumberOfAmount();
|
||||
$totalPayment.addClass('justify-content-center').text('-');
|
||||
$totalPay.addClass('justify-content-center').text('-');
|
||||
return;
|
||||
}
|
||||
|
||||
const serviceKeys = ['ContractAndCheckout', 'Insurance', 'RollCall', 'CustomizeCheckout'];
|
||||
const serviceKeys = ['ContractAndCheckout', 'Insurance', 'RollCall', 'CustomizeCheckout', 'ContractAndCheckoutInPerson', 'InsuranceInPerson'];
|
||||
const selectedOptions = {};
|
||||
let atLeastOneChecked = false;
|
||||
serviceKeys.forEach(key => {
|
||||
@@ -416,25 +515,26 @@ $(document).on('change', '.operations-btns select, .btnRadioContainer .radioOpti
|
||||
if (isChecked) atLeastOneChecked = true;
|
||||
});
|
||||
|
||||
|
||||
if (!atLeastOneChecked) {
|
||||
let existingSumAmount = sumAmountArray.find(w => w.workshopDataId === dataId);
|
||||
if (existingSumAmount) {
|
||||
sumAmountArray = sumAmountArray.filter(w => w.workshopDataId !== dataId);
|
||||
}
|
||||
sumNumberOfAmount();
|
||||
$totalPayment.text('-');
|
||||
$totalPay.text('-');
|
||||
$totalPayment.addClass('justify-content-center').text('-');
|
||||
$totalPay.addClass('justify-content-center').text('-');
|
||||
return;
|
||||
}
|
||||
|
||||
var newWorkshopGetAmountCommand = {
|
||||
CountPerson: personnelCount,
|
||||
...selectedOptions
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
ajax.get(institutionPlanForWorkshopUrl, newWorkshopGetAmountCommand, false)
|
||||
.then(response => {
|
||||
const amountStr = response.data.onlineAndInPersonSumAmountStr + ' ریال';
|
||||
const amountStr = response.data.onlineAndInPersonSumAmountStr;
|
||||
const amountDouble = response.data.onlineAndInPersonSumAmountDouble || 0;
|
||||
let existingSumAmount = sumAmountArray.find(w => w.workshopDataId === dataId);
|
||||
if (existingSumAmount) {
|
||||
@@ -449,10 +549,10 @@ $(document).on('change', '.operations-btns select, .btnRadioContainer .radioOpti
|
||||
sumAmountArray.push(newSumAmount);
|
||||
}
|
||||
|
||||
sumNumberOfAmount();
|
||||
$(`#totalPayment_${dataId}`).text(amountStr);
|
||||
$(`#totalPay_${dataId}`).text(amountStr);
|
||||
|
||||
sumNumberOfAmount();
|
||||
|
||||
$(`#totalPayment_${dataId}`).removeClass('justify-content-center').html(`<span>${amountStr}</span><span> ریال</span>`);
|
||||
$(`#totalPay_${dataId}`).removeClass('justify-content-center').html(`<span>${amountStr}</span><span> ریال</span>`);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -466,6 +566,7 @@ function sumNumberOfAmount() {
|
||||
var formatted = formatNumber(sumAllAmount);
|
||||
$('#totalSumDisplay').text(formatted + ' ریال');
|
||||
}
|
||||
|
||||
function formatNumber(number) {
|
||||
return Math.round(number)
|
||||
.toString()
|
||||
@@ -478,62 +579,69 @@ function loadWorkshopData(id) {
|
||||
workshops: []
|
||||
};
|
||||
sumAmountArray = [];
|
||||
//$('#accordionHtml').html('');
|
||||
|
||||
ajax.get(getWorkshopTempUrl, { contractingPartyId: id }, true)
|
||||
.then(response => {
|
||||
.then(response => {
|
||||
if (response.data.length > 0) {
|
||||
response.data.forEach(function(item, index) {
|
||||
response.data.forEach(function (item, index) {
|
||||
|
||||
html += `<div class="accordion-item" id="workshop_${item.id}" data-id="${item.id}" data-new="false">
|
||||
<div class="workshopListItem">
|
||||
<div class="titleWP">
|
||||
<span class="workshopNameSpan">${item.workshopName}</span>
|
||||
</div>
|
||||
|
||||
<div class="col-6 col-md-9 col-lg-8 col-xl-9">
|
||||
<div class="titleWP">
|
||||
<span class="workshopNameSpan">${item.workshopName}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-end gap-3">
|
||||
<div class="badgeWP">
|
||||
<span class="numberSpan">${item.countPerson}</span>
|
||||
<span>نفر</span>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="totalPayWP">
|
||||
<span id="totalPay_${item.id}">${item.workshopServicesAmountStr} ریال</span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-end ${index === 0 ? `disable`: ``}">
|
||||
<button type="button" class="btnRemove ${index === 0 ? `disable`: ``}" ${index === 0 ? `disabled`: ``}>
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M6.875 11H15.125" stroke="white"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" class="openBtnWP">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 6L8 10L4 6" stroke="#0B5959" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div class="col-6 col-md-3 col-lg-4 col-xl-3">
|
||||
<div class="d-flex align-items-center justify-content-end gap-1 gap-md-2">
|
||||
<div class="badgeWP">
|
||||
<span class="numberSpan">${item.countPerson}</span>
|
||||
<span>نفر</span>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="totalPayWP">
|
||||
<div id="totalPay_${item.id}" class="totalPayCon">
|
||||
<span>${item.workshopServicesAmountStr}</span>
|
||||
<span> ریال</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-end ${index === 0 ? `disable`: ``}">
|
||||
<button type="button" class="btnRemove ${index === 0 ? `disable`: ``}" ${index === 0 ? `disabled`: ``}>
|
||||
<svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.19922 11.2734L7.19922 9.0327" stroke="#BF3737" stroke-linecap="round"/>
|
||||
<path d="M10.8008 11.2734L10.8008 9.0327" stroke="#BF3737" stroke-linecap="round"/>
|
||||
<path d="M2.51855 5.29883H15.4828V5.29883C14.9988 5.29883 14.7568 5.29883 14.5558 5.34052C13.7754 5.5024 13.1656 6.1122 13.0037 6.89261C12.962 7.09358 12.962 7.33561 12.962 7.81966V11.0474C12.962 12.8954 12.962 13.8194 12.3975 14.4013C12.3834 14.4158 12.3691 14.4301 12.3546 14.4442C11.7727 15.0087 10.8487 15.0087 9.0007 15.0087V15.0087C7.1527 15.0087 6.22871 15.0087 5.64682 14.4442C5.63228 14.4301 5.61796 14.4158 5.60385 14.4013C5.03939 13.8194 5.03939 12.8954 5.03939 11.0474V7.81966C5.03939 7.33561 5.03939 7.09358 4.9977 6.89261C4.83582 6.1122 4.22602 5.5024 3.4456 5.34052C3.24464 5.29883 3.00261 5.29883 2.51855 5.29883V5.29883Z" stroke="#BF3737" stroke-linecap="round"/>
|
||||
<path d="M7.19959 3.05764C7.19959 3.05764 7.55971 2.31055 9.00019 2.31055C10.4407 2.31055 10.8008 3.05746 10.8008 3.05746" stroke="#BF3737" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" class="openBtnWP">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 6L8 10L4 6" stroke="#0B5959" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="operations-btns" style="display: ${response.data.length === index+1 ? `block` : `none`}"">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-12 col-md-9 col-lg-8 col-xl-10">
|
||||
<div class="col-12 col-md-9 col-lg-8 col-xl-9">
|
||||
<div class="d-flex align-items-end gap-2">
|
||||
<div class="form-group">
|
||||
<div class="titleInfoWP">
|
||||
نام مجموعه (کارگاه)
|
||||
</div>
|
||||
<input type="text" class="form-control workshop-form-control mt-1" id="workshopName" value="${item.workshopName}" placeholder="نام کارگاه را وارد کنید">
|
||||
<input type="text" class="form-control workshop-form-control mt-1 workshopName" value="${item.workshopName}" placeholder="نام کارگاه را وارد کنید">
|
||||
</div>
|
||||
<div class="form-group d-block d-md-flex align-items-center gap-2">
|
||||
<span class="titleInfoWP">
|
||||
تعداد پرسنل:
|
||||
</span>
|
||||
<select class="form-control text-center select2Option" id="numberPersonnel${item.id}">
|
||||
<option value="25">25</option>
|
||||
<option value="50">50</option>
|
||||
<option value="100">100</option>
|
||||
<option value="150">150</option>
|
||||
<option value="200">200</option>
|
||||
</select>
|
||||
<input type="text" id="numberPersonnel${item.id}" class="form-control numberSpanInput" maxlength="4" value="" />
|
||||
<span class="errorString"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
@@ -551,29 +659,45 @@ function loadWorkshopData(id) {
|
||||
<input type="checkbox" id="Insurance${item.id}" value="true" name="insurance" class="radioOption" ${item.insurance ? 'checked' : ''}>
|
||||
<label for="Insurance${item.id}" class="radioLabelListOption outlineDate">ارسال لیست بیمه</label>
|
||||
</div>
|
||||
<div>
|
||||
<div class="orderCustom1">
|
||||
<input type="checkbox" id="RollCall${item.id}" value="true" name="rollCall" class="radioOption" ${item.rollCall ? 'checked' : ''}>
|
||||
<label for="RollCall${item.id}" class="radioLabelListOption outlineDate">ساعت حضور و غیاب</label>
|
||||
</div>
|
||||
<div>
|
||||
<div class="orderCustom1">
|
||||
<input type="checkbox" id="CustomizeCheckout${item.id}" value="true" name="customizeCheckout" class="radioOption" ${item.customizeCheckout ? 'checked' : ''}>
|
||||
<label for="CustomizeCheckout${item.id}" class="radioLabelListOption outlineDate">فیش حقوقی غیررسمی</label>
|
||||
</div>
|
||||
<div class="orderCustom2">
|
||||
<input type="checkbox" id="ContractAndCheckoutInPerson${item.id}" value="true" name="ContractAndCheckoutInPerson" class="radioOption" ${item.ContractAndCheckoutInPerson ? 'checked' : ''}>
|
||||
<label for="ContractAndCheckoutInPerson${item.id}" class="radioLabelListOption outlineDate">خدمات حضوری قرداد و تصفیه</label>
|
||||
</div>
|
||||
<div class="orderCustom2">
|
||||
<input type="checkbox" id="InsuranceInPerson${item.id}" value="true" name="InsuranceInPerson" class="radioOption" ${item.InsuranceInPerson ? 'checked' : ''}>
|
||||
<label for="InsuranceInPerson${item.id}" class="radioLabelListOption outlineDate">خدمات حضوری بیمه</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-3 col-lg-4 col-xl-2">
|
||||
<div class="totalPaymentWP">
|
||||
<span id="totalPayment_${item.id}">${item.workshopServicesAmountStr}</span>
|
||||
</div>
|
||||
<div class="col-12 col-md-3 col-lg-4 col-xl-3">
|
||||
<div class="d-flex align-items-center justify-content-center gap-3">
|
||||
<div class="totalPaymentWP">
|
||||
<div class="totalPayCon" id="totalPayment_${item.id}">
|
||||
<span>${item.workshopServicesAmountStr}</span>
|
||||
<span> ریال</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>`;
|
||||
|
||||
var itemOfWorkshops = {
|
||||
|
||||
//$('#accordionHtml').html(html);
|
||||
//loadRadioChecked(item.id);
|
||||
|
||||
var itemOfWorkshops = {
|
||||
Id: item.id,
|
||||
workshopId: item.id,
|
||||
WorkshopName: item.workshopName,
|
||||
@@ -596,36 +720,44 @@ function loadWorkshopData(id) {
|
||||
amount: item.workshopServicesAmount
|
||||
};
|
||||
sumAmountArray.push(itemOfAmount);
|
||||
});
|
||||
|
||||
});
|
||||
} else {
|
||||
html += `<div class="accordion-item" id="workshop_0" data-id="new_0" data-new="true">
|
||||
<div class="workshopListItem">
|
||||
<div class="titleWP">
|
||||
<span class="workshopNameSpan"></span>
|
||||
|
||||
<div class="col-6 col-md-9 col-lg-8 col-xl-9">
|
||||
<div class="titleWP">
|
||||
<span class="workshopNameSpan"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-end gap-3">
|
||||
<div class="badgeWP">
|
||||
<span class="numberSpan">25</span>
|
||||
<span>نفر</span>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="totalPayWP">
|
||||
<span id="totalPay_new_0">-</span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-end disable">
|
||||
<button type="button" class="btnRemove disable" disabled>
|
||||
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="11" cy="11" r="8.25" stroke="white"/>
|
||||
<path d="M6.875 11H15.125" stroke="white"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" class="openBtnWP">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 6L8 10L4 6" stroke="#0B5959" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
<div class="col-6 col-md-3 col-lg-4 col-xl-3">
|
||||
<div class="d-flex align-items-center justify-content-end gap-1 gap-md-2">
|
||||
<div class="badgeWP">
|
||||
<span class="numberSpan">-</span>
|
||||
<span>نفر</span>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="totalPayWP">
|
||||
<div id="totalPay_new_0" class="totalPayCon">-</div>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-end disable">
|
||||
<button type="button" class="btnRemove disable" disabled>
|
||||
<svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.19922 11.2734L7.19922 9.0327" stroke="#BF3737" stroke-linecap="round"/>
|
||||
<path d="M10.8008 11.2734L10.8008 9.0327" stroke="#BF3737" stroke-linecap="round"/>
|
||||
<path d="M2.51855 5.29883H15.4828V5.29883C14.9988 5.29883 14.7568 5.29883 14.5558 5.34052C13.7754 5.5024 13.1656 6.1122 13.0037 6.89261C12.962 7.09358 12.962 7.33561 12.962 7.81966V11.0474C12.962 12.8954 12.962 13.8194 12.3975 14.4013C12.3834 14.4158 12.3691 14.4301 12.3546 14.4442C11.7727 15.0087 10.8487 15.0087 9.0007 15.0087V15.0087C7.1527 15.0087 6.22871 15.0087 5.64682 14.4442C5.63228 14.4301 5.61796 14.4158 5.60385 14.4013C5.03939 13.8194 5.03939 12.8954 5.03939 11.0474V7.81966C5.03939 7.33561 5.03939 7.09358 4.9977 6.89261C4.83582 6.1122 4.22602 5.5024 3.4456 5.34052C3.24464 5.29883 3.00261 5.29883 2.51855 5.29883V5.29883Z" stroke="#BF3737" stroke-linecap="round"/>
|
||||
<path d="M7.19959 3.05764C7.19959 3.05764 7.55971 2.31055 9.00019 2.31055C10.4407 2.31055 10.8008 3.05746 10.8008 3.05746" stroke="#BF3737" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" class="openBtnWP">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 6L8 10L4 6" stroke="#0B5959" stroke-width="1.5" stroke-linecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="operations-btns" style="display: block">
|
||||
@@ -636,19 +768,14 @@ function loadWorkshopData(id) {
|
||||
<div class="titleInfoWP">
|
||||
نام مجموعه (کارگاه)
|
||||
</div>
|
||||
<input type="text" class="form-control workshop-form-control mt-1" id="workshopName" placeholder="نام کارگاه را وارد کنید">
|
||||
<input type="text" class="form-control workshop-form-control mt-1 workshopName" id="workshopName" placeholder="نام کارگاه را وارد کنید">
|
||||
</div>
|
||||
<div class="form-group d-block d-md-flex align-items-center gap-2">
|
||||
<span class="titleInfoWP">
|
||||
تعداد پرسنل:
|
||||
</span>
|
||||
<select class="form-control text-center select2Option" id="numberPersonnel_new_0">
|
||||
<option value="25">25</option>
|
||||
<option value="50">50</option>
|
||||
<option value="100">100</option>
|
||||
<option value="150">150</option>
|
||||
<option value="200">200</option>
|
||||
</select>
|
||||
<input type="text" id="numberPersonnel_new_0" class="form-control numberSpanInput" maxlength="4" value="">
|
||||
<span class="errorString"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group mt-2">
|
||||
@@ -666,23 +793,35 @@ function loadWorkshopData(id) {
|
||||
<input type="checkbox" id="Insurance_new_0" value="true" name="insurance" class="radioOption">
|
||||
<label for="Insurance_new_0" class="radioLabelListOption outlineDate">ارسال لیست بیمه</label>
|
||||
</div>
|
||||
<div>
|
||||
<div class="orderCustom1">
|
||||
<input type="checkbox" id="RollCall_new_0" value="true" name="rollCall" class="radioOption">
|
||||
<label for="RollCall_new_0" class="radioLabelListOption outlineDate">ساعت حضور و غیاب</label>
|
||||
</div>
|
||||
<div>
|
||||
<div class="orderCustom1">
|
||||
<input type="checkbox" id="CustomizeCheckout_new_0" value="true" name="customizeCheckout" class="radioOption">
|
||||
<label for="CustomizeCheckout_new_0" class="radioLabelListOption outlineDate">فیش حقوقی غیررسمی</label>
|
||||
</div>
|
||||
<div class="orderCustom2">
|
||||
<input type="checkbox" id="ContractAndCheckoutInPerson_new_0" value="true" name="ContractAndCheckoutInPerson" class="radioOption">
|
||||
<label for="ContractAndCheckoutInPerson_new_0" class="radioLabelListOption outlineDate">خدمات حضوری قرداد و تصفیه</label>
|
||||
</div>
|
||||
<div class="orderCustom2">
|
||||
<input type="checkbox" id="InsuranceInPerson_new_0" value="true" name="InsuranceInPerson" class="radioOption">
|
||||
<label for="InsuranceInPerson_new_0" class="radioLabelListOption outlineDate">خدمات حضوری بیمه</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-3 col-lg-4 col-xl-2">
|
||||
<div class="totalPaymentWP">
|
||||
<span id="totalPayment_new_0">-</span>
|
||||
</div>
|
||||
<div class="d-flex align-items-center justify-content-center gap-3">
|
||||
<div class="totalPaymentWP text-center">
|
||||
<div class="totalPayCon justify-content-center" id="totalPayment_new_0">
|
||||
-
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -693,19 +832,55 @@ function loadWorkshopData(id) {
|
||||
|
||||
if (command.workshops.length > 0) {
|
||||
command.workshops.forEach(function(item) {
|
||||
$(`#numberPersonnel${item.Id}`).select2();
|
||||
$(`#numberPersonnel${item.Id}`).val(item.CountPerson).trigger('change');
|
||||
//$(`#numberPersonnel${item.Id}`).select2();
|
||||
//$(`#numberPersonnel${item.Id}`).val(item.CountPerson).trigger('change');
|
||||
$(`#numberPersonnel${item.Id}`).val(item.CountPerson);
|
||||
});
|
||||
} else {
|
||||
$(`#numberPersonnel_new_0`).select2();
|
||||
$(`#numberPersonnel_new_0`).val("25").trigger('change');
|
||||
//$(`#numberPersonnel_new_0`).select2();
|
||||
//$(`#numberPersonnel_new_0`).val("25").trigger('change');
|
||||
$(`#numberPersonnel_new_0`).val("");
|
||||
}
|
||||
|
||||
// console.log(command.workshops);
|
||||
// console.log(sumAmountArray);
|
||||
sumNumberOfAmount();
|
||||
autoScroll();
|
||||
loadRadioChecked();
|
||||
updateAddButtonText();
|
||||
function loadRadioChecked() {
|
||||
if (command.workshops.length > 0) {
|
||||
command.workshops.forEach(function (item) {
|
||||
let $contract = $(`#ContractAndCheckout${item.Id}`);
|
||||
let $contractAndCheckoutInPerson = $(`#ContractAndCheckoutInPerson${item.Id}`);
|
||||
let $insurance = $(`#Insurance${item.Id}`);
|
||||
let $insuranceInPerson = $(`#InsuranceInPerson${item.Id}`);
|
||||
let $rollCall = $(`#RollCall${item.Id}`);
|
||||
let $customize = $(`#CustomizeCheckout${item.Id}`);
|
||||
|
||||
autoScroll();
|
||||
if (!$contract.prop('checked')) {
|
||||
$rollCall.prop('checked', false).prop('disabled', true).closest('div').find('label').addClass('disable');
|
||||
$customize.prop('checked', false).prop('disabled', true).closest('div').find('label').addClass('disable');
|
||||
$contractAndCheckoutInPerson.prop('checked', false).prop('disabled', false).closest('div').find('label').addClass('disable');
|
||||
} else {
|
||||
$contractAndCheckoutInPerson.prop('checked', true).prop('disabled', false).closest('div').find('label').removeClass('disable');
|
||||
$rollCall.prop('disabled', false).closest('div').find('label').removeClass('disable');
|
||||
|
||||
if ($rollCall.prop('checked')) {
|
||||
$customize.prop('disabled', false).closest('div').find('label').removeClass('disable');
|
||||
} else {
|
||||
$customize.prop('checked', false).prop('disabled', true).closest('div').find('label').addClass('disable');
|
||||
}
|
||||
}
|
||||
|
||||
if (!$insurance.prop('checked')) {
|
||||
$insuranceInPerson.prop('checked', false).prop('disabled', false).closest('div').find('label').addClass('disable');
|
||||
} else {
|
||||
$insuranceInPerson.prop('checked', true).prop('disabled', false).closest('div').find('label').removeClass('disable');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
@@ -1,10 +1,16 @@
|
||||
$(document).ready(function () {
|
||||
|
||||
$('input[name="radMonth"]').on('change', function () {
|
||||
totalPaymentAndWorkshopList();
|
||||
});
|
||||
|
||||
$('input[name="radMonth"]:checked').trigger('change');
|
||||
$('input[name="radMonth"]:checked').trigger('change');
|
||||
|
||||
|
||||
$('input[name="radFinanceContract"]').on('change', function () {
|
||||
totalPaymentAndWorkshopList();
|
||||
});
|
||||
|
||||
$('input[name="radFinanceContract"]:checked').trigger('change');
|
||||
});
|
||||
|
||||
function autoScrollStep4() {
|
||||
@@ -15,13 +21,14 @@ function autoScrollStep4() {
|
||||
|
||||
async function loadSpecifiedWorkshop(data) {
|
||||
var html = '';
|
||||
|
||||
|
||||
|
||||
if (data.workshops.length > 0) {
|
||||
data.workshops.forEach(function(item) {
|
||||
html += `<div class="cardGrid">
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
<div class="titleWpName">نام کارگاه : <span>${item.WorkshopName}</span></div>
|
||||
<div class="titleWpPrice">ریال ${item.WorkshopServicesAmountStr}</div>
|
||||
<div class="titleWpPrice">${item.WorkshopServicesAmountStr} ریال</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex align-items-center justify-content-between">
|
||||
@@ -101,10 +108,28 @@ async function totalPaymentAndWorkshopList() {
|
||||
}
|
||||
|
||||
var hasPriceStatic = $('#priceStatic').hasClass('active');
|
||||
|
||||
|
||||
ajax.get(totalPaymentAndWorkshopListUrl, { contractingPartyTempId: parseInt($('#contractPartyId').val()) || 0, periodModel: months })
|
||||
var selectedRadFinanceContract = $('input[name="radFinanceContract"]:checked').val();
|
||||
var financeContract = "";
|
||||
|
||||
switch (selectedRadFinanceContract) {
|
||||
case 'currentMonth':
|
||||
financeContract = 'currentMonth';
|
||||
break;
|
||||
case 'nextMonth':
|
||||
financeContract = 'nextMonth';
|
||||
break;
|
||||
}
|
||||
|
||||
ajax.get(totalPaymentAndWorkshopListUrl,
|
||||
{
|
||||
contractingPartyTempId: parseInt($('#contractPartyId').val()) || 0,
|
||||
periodModel: months,
|
||||
contractStartType: financeContract
|
||||
})
|
||||
.then(response => {
|
||||
// console.log(response.data);
|
||||
|
||||
if (hasPriceStatic) {
|
||||
$(`#sumOfWorkshopsPaymentPayment`).text(response.data.oneTimeWithoutTaxPaymentStr + " ریال");
|
||||
$(`#totalPaymentStr`).text(response.data.oneTimeTotalPaymentStr + " ریال");
|
||||
@@ -128,7 +153,7 @@ async function totalPaymentAndWorkshopList() {
|
||||
$(`#totalPaymentDoubleInput`).val(hasPriceStatic ? response.data.oneTimeTotalPaymentDouble : response.data.monthlyTotalPaymentDouble);
|
||||
$(`#valueAddedTaxDoubleInput`).val(response.data.valueAddedTaxDouble);
|
||||
|
||||
$('#priceStepContainer').html('');
|
||||
$('#priceStepContainerHtml').html('');
|
||||
if (response.data.monthlyInstallments) {
|
||||
response.data.monthlyInstallments?.forEach(function (item) {
|
||||
var html = `
|
||||
@@ -138,10 +163,23 @@ async function totalPaymentAndWorkshopList() {
|
||||
<div class="col-4 text-end">${item.installmentAmountStr} ریال</div>
|
||||
</div>
|
||||
`;
|
||||
$('#priceStepContainer').append(html);
|
||||
$('#priceStepContainerHtml').append(html);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$('#ContractStartMonthView').text(
|
||||
$('#contractStartCurrentMonthFa').prop('checked')
|
||||
? response.data.contractStartCurrentMonthFa
|
||||
: response.data.contractStartNextMonthFa
|
||||
);
|
||||
|
||||
$('#ContractStartMonthGr').val(
|
||||
$('#contractStartCurrentMonthFa').prop('checked')
|
||||
? response.data.contractStartCurrentMonthGr
|
||||
: response.data.contractStartNextMonthGr
|
||||
);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//$(document).on('change', '.btnCheckContainer .checkOption', createOrUpdateCommand);
|
||||
@@ -166,6 +204,19 @@ async function checkInputsStep4() {
|
||||
case 'twelveMonth':
|
||||
months = 12;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
var selectedRadFinanceContract = $('input[name="radFinanceContract"]:checked').val();
|
||||
var financeContract = "";
|
||||
|
||||
switch (selectedRadFinanceContract) {
|
||||
case 'currentMonth':
|
||||
financeContract = 'currentMonth';
|
||||
break;
|
||||
case 'nextMonth':
|
||||
financeContract = 'nextMonth';
|
||||
break;
|
||||
}
|
||||
|
||||
var priceMethod = $('#priceStatic').hasClass('active') ? "OneTime" : "Monthly";
|
||||
@@ -176,6 +227,7 @@ async function checkInputsStep4() {
|
||||
contractingPartyTempId: parseInt($('#contractPartyId').val()) || 0,
|
||||
periodModel: months,
|
||||
paymentModel: priceMethod,
|
||||
contractStart: $('#ContractStartMonthGr').val(),
|
||||
totalPayment: Number($('#totalPaymentDoubleInput').val()),
|
||||
valueAddedTax: Number($('#valueAddedTaxDoubleInput').val())
|
||||
}, true);
|
||||
@@ -216,13 +268,7 @@ $('#priceStatic').on('click', function () {
|
||||
$('#priceStepContainer').hide();
|
||||
$('#priceStep').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
|
||||
if ($(this).hasClass("active")) {
|
||||
$(".cardHeight").css("height", "50%");
|
||||
} else {
|
||||
$(".cardHeight").css("height", "39%");
|
||||
}
|
||||
|
||||
|
||||
totalPaymentAndWorkshopList();
|
||||
});
|
||||
|
||||
@@ -231,12 +277,6 @@ $('#priceStep').on('click', function () {
|
||||
$('#priceStatic').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
|
||||
if ($(this).hasClass("active")) {
|
||||
$(".cardHeight").css("height", "39%");
|
||||
} else {
|
||||
$(".cardHeight").css("height", "50%");
|
||||
}
|
||||
|
||||
totalPaymentAndWorkshopList();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user