add dailywage select on create contract front

This commit is contained in:
SamSys
2025-08-18 05:33:31 +03:30
parent b82456f172
commit 49b84b50a5
5 changed files with 581 additions and 427 deletions

View File

@@ -65,7 +65,38 @@ public class Contract : EntityBase
public DateTime SetContractDate { get; private set; }
public string JobType { get; private set; }
public string ContractType { get; private set; }
/// <summary>
/// مزد تجمیعی یعد از تاثیر ساعت کار
/// </summary>
public string DayliWage { get; private set; }
///// <summary>
///// دستمزد روزانه خام بعد از تاثیر ساعت کار
///// </summary>
//public double DailySalaryAffected { get; set; }
///// <summary>
///// پایه سنوات بعد از تاثیر ساعت کار
///// </summary>
//public double BaseYearAffected { get; set; }
///// <summary>
///// دستمزد روزانه قبل از تاثیر ساعت کار
///// </summary>
//public double DailySalaryUnAffected { get; set; }
///// <summary>
///// پایه سنوات قبل از تاثیر ساعت کار
///// </summary>
//public double BaseYearUnAffected { get; set; }
///// <summary>
///// آیا دستمزد روزانه دستی وارد شده است؟
///// </summary>
//public bool HasManualDailyWage { get; set; }
public string IsActiveString { get; private set; }
public string ArchiveCode { get; private set; }
public string WorkshopAddress1 { get; private set; }

View File

@@ -644,6 +644,33 @@ public class AutoExtensionModel : PageModel
#endregion
public IActionResult OnPostSelectDailyWage(string wageType)
{
var res = "0";
switch (wageType)
{
case "0":
res = "0";
break;
case "1":
res = "1000";
break;
case "2":
res = "2000";
break;
case "3":
res = "3000";
break;
}
return new JsonResult(new
{
isSuccess = true,
result = res
});
}
#region CreateContract
public IActionResult OnPostCreateContract(List<createContractModel> createContarctList)

View File

@@ -11,7 +11,7 @@
},
"ServiceHost": {
"commandName": "Project",
"launchBrowser": false,
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation"

View File

@@ -96,6 +96,8 @@ connection.on('showStatus',
});
$('#firstCheckBtn').on('click',
function () {
$("a.groupDailyWage")
.removeClass("groupDailyWageEnable");
$('#datatable tbody tr').each(function (i) {
const tagTrue = $(this).find(".ion-checkmark-circled");
const tagFalse = $(this).find(".ion-close-circled");
@@ -177,8 +179,10 @@ $('#firstCheckBtn').on('click',
if (continueCheck && dateInputPannel) {
if (checkboxCount > 0) {
$('#datatable tbody tr').each(function (i) {
let chekbox = $(this).find("input[name=selectItem]");
$(this).find(".selectDailyWageModel").prop("disabled", true);
if (chekbox.is(":checked") == true) {
employeeId = $(this).attr("data-employeeId");
start = $(this).find("input[name=contarctStart]").val();
@@ -358,6 +362,7 @@ $('#firstCheckBtn').on('click',
} else {
$(this).removeClass("redColor");
$(this).addClass("greenColor");
$(this).find(".selectDailyWageModel").prop("disabled", false);
//$(this).find("input[type=checkbox]").removeAttr("disabled");
//$(this).find("input[type=checkbox]").prop("checked", true);
var iTagTrue = $(this).find(".ion-checkmark-circled");
@@ -419,6 +424,14 @@ $('#firstCheckBtn').on('click',
}); //end of each
var greenCount = $("table tr.greenColor").length;
if (greenCount >= 1) {
$("a.groupDailyWage")
.addClass("groupDailyWageEnable");
}
} else { //checkboxCount If statment
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " هیچ موردی انتخاب نشده است - میتوانید بصورت گروهی یا تکی، پرسنل را تیک بزنید");