ClassficationScheme > EditSalariesAndCoefficient front completed
This commit is contained in:
@@ -16,7 +16,7 @@ public class ClassificationGroupSalary : EntityBase
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <param name="year"></param>
|
||||
public ClassificationGroupSalary(long classificationGroupId, string groupNo, double groupSalary, DateTime startDate, DateTime endDate, int year)
|
||||
public ClassificationGroupSalary(long classificationGroupId, string groupNo, double groupSalary, DateTime startDate, DateTime endDate, int year, long schemeId)
|
||||
{
|
||||
ClassificationGroupId = classificationGroupId;
|
||||
GroupNo = groupNo;
|
||||
@@ -24,6 +24,7 @@ public class ClassificationGroupSalary : EntityBase
|
||||
StartDate = startDate;
|
||||
EndDate = endDate;
|
||||
Year = year;
|
||||
SchemeId = schemeId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -57,22 +58,22 @@ public class ClassificationGroupSalary : EntityBase
|
||||
/// </summary>
|
||||
public int Year { get; private set; }
|
||||
|
||||
public long SchemeId { get; private set; }
|
||||
|
||||
|
||||
public ClassificationGroup ClassificationGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ویرایش دستمزد گروه
|
||||
/// </summary>
|
||||
/// <param name="classificationGroupId"></param>
|
||||
/// <param name="groupNo"></param>
|
||||
|
||||
/// <param name="groupSalary"></param>
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <param name="year"></param>
|
||||
public void Edit(long classificationGroupId, string groupNo, double groupSalary, DateTime startDate, DateTime endDate, int year)
|
||||
public void Edit(double groupSalary, DateTime startDate, DateTime endDate, int year)
|
||||
{
|
||||
ClassificationGroupId = classificationGroupId;
|
||||
GroupNo = groupNo;
|
||||
|
||||
GroupSalary = groupSalary;
|
||||
StartDate = startDate;
|
||||
EndDate = endDate;
|
||||
|
||||
@@ -56,9 +56,9 @@ public class ClassificationRialCoefficient : EntityBaseWithoutCreationDate
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <param name="year"></param>
|
||||
public void Edit(long classificationSchemeId, double rialCoefficient, DateTime startDate, DateTime endDate, int year)
|
||||
public void Edit(double rialCoefficient, DateTime startDate, DateTime endDate, int year)
|
||||
{
|
||||
ClassificationSchemeId = classificationSchemeId;
|
||||
|
||||
RialCoefficient = rialCoefficient;
|
||||
StartDate = startDate;
|
||||
EndDate = endDate;
|
||||
|
||||
@@ -15,6 +15,15 @@ public interface IClassificationGroupSalariesRepository : IRepository<long, Clas
|
||||
Task CreateSalaries(List<ClassificationGroupSalary> createClassificationGroupSalary);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت دستمزدها و ضریب ریالی برای مودال ویرایش
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <returns></returns>
|
||||
Task<SalaryAndRialCoefficientModel> GetEditSalariesData(long schemeId, string startDate, string endDate);
|
||||
|
||||
/// <summary>
|
||||
/// لیست دستمزدها بر اساس تاریخ و سال برای تب دستمزدها
|
||||
/// </summary>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using _0_Framework.Application.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -62,12 +63,14 @@ public class EditClassificationGroupSalaryAndRialCoefficient : CreateClassificat
|
||||
/// تاریخ شروع
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
[DataType(DataType.Text)]
|
||||
public string StartDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
[DataType(DataType.Text)]
|
||||
public string EndDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -91,6 +94,7 @@ public class SalaryAndRialCoefficientModel
|
||||
/// تاریخ شروع
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
[DataType(DataType.Text)]
|
||||
public string StartDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -103,6 +107,7 @@ public class SalaryAndRialCoefficientModel
|
||||
/// تاریخ پایان
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
[DataType(DataType.Text)]
|
||||
public string EndDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -133,6 +138,11 @@ public class SalaryAndRialCoefficientModel
|
||||
/// </summary>
|
||||
public TypeOfCoefficient TypeOfCoefficient { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آی دی ضریب ریالی
|
||||
/// </summary>
|
||||
public long CoefficientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست دستمزدها و ضرایب بر اساس سال
|
||||
/// </summary>
|
||||
@@ -170,16 +180,25 @@ public class SalaryAndRialCoefficientTabDataList
|
||||
/// تاریخ شروع
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
[DataType(DataType.Text)]
|
||||
public string StartDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ پایان
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
[DataType(DataType.Text)]
|
||||
public string EndDateFa { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// سال
|
||||
/// </summary>
|
||||
public int Year { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ضریب ریالی
|
||||
/// string
|
||||
/// </summary>
|
||||
public string RialCoefficientStr { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using _0_Framework.Application.Enums;
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
|
||||
@@ -46,6 +47,7 @@ public class CreateClassificationScheme
|
||||
/// <summary>
|
||||
/// شماره همراه طراح
|
||||
/// </summary>
|
||||
[RegularExpression("^[0-9]*$", ErrorMessage = "لطفا فقط عدد وارد کنید")]
|
||||
public string DesignerPhone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -94,7 +94,20 @@ public interface IClassificationSchemeApplication
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت دستمزدها و ضریب ریالی برای مودال ویرایش
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <returns></returns>
|
||||
Task<SalaryAndRialCoefficientModel> GetEditSalariesData(long schemeId, string startDate, string endDate);
|
||||
|
||||
/// <summary>
|
||||
/// ثبت ویرایش دستمزدها و ضریب
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
Task<OperationResult> EditGroupSalaryAndCoefficient(SalaryAndRialCoefficientModel command);
|
||||
|
||||
|
||||
}
|
||||
@@ -34,22 +34,23 @@ public class ClassificationSchemeApplication : IClassificationSchemeApplication
|
||||
{
|
||||
var op = new OperationResult();
|
||||
|
||||
try
|
||||
{
|
||||
command.ExecutionDateGr = command.ExecutionDateFa.ToGeorgianDateTime();
|
||||
command.IncludingDateGr = command.IncludingDateFa.ToGeorgianDateTime();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return op.Failed("تاریخ به درستی وارد نشده است");
|
||||
}
|
||||
|
||||
#region Validation
|
||||
|
||||
|
||||
if (!command.ExecutionDateFa.TryToGeorgianDateTime(out var executionDateGr))
|
||||
{
|
||||
return op.Failed("تاریخ اجرا صحیح نمی باشد");
|
||||
}
|
||||
if (!command.IncludingDateFa.TryToGeorgianDateTime(out var includingDateGr))
|
||||
{
|
||||
return op.Failed("تاریخ شمول صحیح نمی باشد");
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
//ایجاد طرح
|
||||
var create = new ClassificationScheme(command.IncludingDateGr, command.ExecutionDateGr,
|
||||
var create = new ClassificationScheme(includingDateGr, executionDateGr,
|
||||
command.DesignerFullName, command.DesignerPhone, command.WorkshopId, command.TypeOfCoefficient);
|
||||
_classificationSchemeRepository.Create(create);
|
||||
await _classificationSchemeRepository.SaveChangesAsync();
|
||||
@@ -94,25 +95,24 @@ public class ClassificationSchemeApplication : IClassificationSchemeApplication
|
||||
{
|
||||
var op = new OperationResult();
|
||||
|
||||
try
|
||||
{
|
||||
command.ExecutionDateGr = command.ExecutionDateFa.ToGeorgianDateTime();
|
||||
command.IncludingDateGr = command.IncludingDateFa.ToGeorgianDateTime();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return op.Failed("تاریخ به درستی وارد نشده است");
|
||||
}
|
||||
|
||||
#region Validation
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
if (!command.ExecutionDateFa.TryToGeorgianDateTime(out var executionDateGr))
|
||||
{
|
||||
return op.Failed("تاریخ اجرا صحیح نمی باشد");
|
||||
}
|
||||
if (!command.IncludingDateFa.TryToGeorgianDateTime(out var includingDateGr))
|
||||
{
|
||||
return op.Failed("تاریخ شمول صحیح نمی باشد");
|
||||
}
|
||||
var scheme = _classificationSchemeRepository.Get(command.Id);
|
||||
if (scheme == null)
|
||||
return op.Failed("رکورد مورد نظر وجود ندارد");
|
||||
#endregion
|
||||
|
||||
scheme.Edit(command.IncludingDateGr,command.ExecutionDateGr,command.DesignerFullName,command.DesignerPhone,command.TypeOfCoefficient);
|
||||
|
||||
scheme.Edit(includingDateGr, executionDateGr, command.DesignerFullName,command.DesignerPhone,command.TypeOfCoefficient);
|
||||
await _classificationSchemeRepository.SaveChangesAsync();
|
||||
return op.Succcedded();
|
||||
}
|
||||
@@ -170,34 +170,46 @@ public class ClassificationSchemeApplication : IClassificationSchemeApplication
|
||||
|
||||
if (string.IsNullOrWhiteSpace(command.StartDateFa) || string.IsNullOrWhiteSpace(command.StartDateFa))
|
||||
return op.Failed("تاریخ شروع و پایان نمی توانند خالی باشند");
|
||||
if (command.TypeOfCoefficient == TypeOfCoefficient.RialCoefficient && string.IsNullOrWhiteSpace(command.RialCoefficientStr))
|
||||
|
||||
|
||||
if (command.TypeOfCoefficient == TypeOfCoefficient.RialCoefficient && command.RialCoefficient == 0)
|
||||
return op.Failed("ضریب ریالی وارد نشده است");
|
||||
|
||||
|
||||
if (command.SalariesAndCoefficientList.Any(x=> string.IsNullOrWhiteSpace(x.GroupSalaryStr)))
|
||||
if (command.SalariesAndCoefficientList.Any(x=> string.IsNullOrWhiteSpace(x.GroupSalaryStr) || x.GroupSalaryStr =="0"))
|
||||
return op.Failed("دستمزد تمامی گروه ها می بایست تعیین شود");
|
||||
|
||||
#endregion
|
||||
|
||||
try
|
||||
|
||||
if (!command.StartDateFa.TryToGeorgianDateTime(out var startDate))
|
||||
{
|
||||
command.StartDate = command.StartDateFa.ToGeorgianDateTime();
|
||||
command.EndDate = command.EndDateFa.ToGeorgianDateTime();
|
||||
return op.Failed("تاریخ شروع وارد شده صحیح نمی باشد");
|
||||
}
|
||||
catch (Exception e)
|
||||
if (!command.EndDateFa.TryToGeorgianDateTime(out var endDate))
|
||||
{
|
||||
return op.Failed("فرمت تاریخ اشتباه است");
|
||||
return op.Failed("تاریخ پایان وارد شده صحیح نمی باشد");
|
||||
}
|
||||
|
||||
if (_classificationGroupSalariesRepository.Exists(x => x.StartDate <= endDate && x.EndDate >= startDate && x.SchemeId == command.SchemeId))
|
||||
{
|
||||
return op.Failed("بازه تاریخ وارد شده با داده های ذخیره شده قبل تداخل دارد");
|
||||
|
||||
}
|
||||
|
||||
var year = Convert.ToInt32(command.StartDateFa.Substring(0, 4));
|
||||
|
||||
var endDateYear = Convert.ToInt32(command.EndDateFa.Substring(0, 4));
|
||||
if(year != endDateYear)
|
||||
return op.Failed("سال تاریخ شروع از سال تاریخ پایان متفاوت است");
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
var createSalaries = new List<ClassificationGroupSalary>();
|
||||
|
||||
foreach (var item in command.SalariesAndCoefficientList)
|
||||
{
|
||||
item.GroupSalary = item.GroupSalaryStr.MoneyToDouble();
|
||||
var create = new ClassificationGroupSalary(item.ClassificationGroupId,item.GroupNo,item.GroupSalary,command.StartDate,command.EndDate, year);
|
||||
var create = new ClassificationGroupSalary(item.ClassificationGroupId,item.GroupNo,item.GroupSalary,startDate, endDate, year, command.SchemeId);
|
||||
createSalaries.Add(create);
|
||||
}
|
||||
|
||||
@@ -207,10 +219,10 @@ public class ClassificationSchemeApplication : IClassificationSchemeApplication
|
||||
{
|
||||
try
|
||||
{
|
||||
command.RialCoefficient = command.RialCoefficientStr.MoneyToDouble();
|
||||
command.RialCoefficient = command.RialCoefficient;
|
||||
|
||||
await _classificationRialCoefficientRepository.CreateAsync(new ClassificationRialCoefficient(command.SchemeId,
|
||||
command.RialCoefficient, command.StartDate, command.EndDate, year));
|
||||
command.RialCoefficient, startDate, endDate, year));
|
||||
await _classificationRialCoefficientRepository.SaveChangesAsync();
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -222,4 +234,73 @@ public class ClassificationSchemeApplication : IClassificationSchemeApplication
|
||||
op.SendId = command.SchemeId;
|
||||
return op.Succcedded();
|
||||
}
|
||||
|
||||
public async Task<SalaryAndRialCoefficientModel> GetEditSalariesData(long schemeId, string startDate, string endDate)
|
||||
{
|
||||
return await _classificationGroupSalariesRepository.GetEditSalariesData(schemeId, startDate, endDate);
|
||||
}
|
||||
|
||||
public async Task<OperationResult> EditGroupSalaryAndCoefficient(SalaryAndRialCoefficientModel command)
|
||||
{
|
||||
var op = new OperationResult();
|
||||
#region Validation
|
||||
|
||||
if (string.IsNullOrWhiteSpace(command.StartDateFa) || string.IsNullOrWhiteSpace(command.StartDateFa))
|
||||
return op.Failed("تاریخ شروع و پایان نمی توانند خالی باشند");
|
||||
|
||||
|
||||
if (command.TypeOfCoefficient == TypeOfCoefficient.RialCoefficient && command.RialCoefficient == 0)
|
||||
return op.Failed("ضریب ریالی وارد نشده است");
|
||||
|
||||
|
||||
if (command.SalariesAndCoefficientList.Any(x => string.IsNullOrWhiteSpace(x.GroupSalaryStr) || x.GroupSalaryStr == "0"))
|
||||
return op.Failed("دستمزد تمامی گروه ها می بایست تعیین شود");
|
||||
|
||||
|
||||
if (!command.StartDateFa.TryToGeorgianDateTime(out var startDate))
|
||||
{
|
||||
return op.Failed("تاریخ شروع وارد شده صحیح نمی باشد");
|
||||
}
|
||||
if (!command.EndDateFa.TryToGeorgianDateTime(out var endDate))
|
||||
{
|
||||
return op.Failed("تاریخ پایان وارد شده صحیح نمی باشد");
|
||||
}
|
||||
|
||||
var salariesId = command.SalariesAndCoefficientList.Select(x => x.Id).ToList();
|
||||
if (_classificationGroupSalariesRepository.Exists(x => x.StartDate <= endDate && x.EndDate >= startDate && x.SchemeId == command.SchemeId && !salariesId.Contains(x.id)))
|
||||
{
|
||||
return op.Failed("بازه تاریخ وارد شده با داده های ذخیره شده قبل تداخل دارد");
|
||||
|
||||
}
|
||||
|
||||
var year = Convert.ToInt32(command.StartDateFa.Substring(0, 4));
|
||||
|
||||
var endDateYear = Convert.ToInt32(command.EndDateFa.Substring(0, 4));
|
||||
if (year != endDateYear)
|
||||
return op.Failed("سال تاریخ شروع از سال تاریخ پایان متفاوت است");
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
foreach (var item in command.SalariesAndCoefficientList)
|
||||
{
|
||||
var editSalary = _classificationGroupSalariesRepository.Get(item.Id);
|
||||
|
||||
item.GroupSalary = item.GroupSalaryStr.MoneyToDouble();
|
||||
|
||||
editSalary.Edit(item.GroupSalary, startDate, endDate, year);
|
||||
await _classificationGroupSalariesRepository.SaveChangesAsync();
|
||||
|
||||
}
|
||||
|
||||
if (command.TypeOfCoefficient == TypeOfCoefficient.RialCoefficient)
|
||||
{
|
||||
var editRialCoefficient = _classificationRialCoefficientRepository.Get(command.CoefficientId);
|
||||
editRialCoefficient.Edit(command.RialCoefficient, startDate, endDate, year);
|
||||
await _classificationRialCoefficientRepository.SaveChangesAsync();
|
||||
|
||||
}
|
||||
|
||||
return op.Succcedded();
|
||||
}
|
||||
}
|
||||
@@ -1868,6 +1868,10 @@ public class InsuranceListApplication : IInsuranceListApplication
|
||||
|
||||
bool isManager = jobId is 10 or 16 or 17 or 18 or 3498;
|
||||
if (isManager && !includeStatus)
|
||||
return 0;
|
||||
|
||||
//پرسنل استثناء سیدعسکر موسوی زاده - فروشگاه ولی عصر
|
||||
if (employeeId == 1496)
|
||||
return 0;
|
||||
//پرسنل استثناء
|
||||
if (employeeId == 42783)
|
||||
|
||||
10524
CompanyManagment.EFCore/Migrations/20251023161727_SchemeIdAdded.Designer.cs
generated
Normal file
10524
CompanyManagment.EFCore/Migrations/20251023161727_SchemeIdAdded.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class SchemeIdAdded : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<long>(
|
||||
name: "SchemeId",
|
||||
table: "ClassificationGroupSalaries",
|
||||
type: "bigint",
|
||||
nullable: false,
|
||||
defaultValue: 0L);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "SchemeId",
|
||||
table: "ClassificationGroupSalaries");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -567,6 +567,9 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Property<double>("GroupSalary")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<long>("SchemeId")
|
||||
.HasColumnType("bigint");
|
||||
|
||||
b.Property<DateTime>("StartDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
|
||||
@@ -133,6 +133,7 @@ public class ClassificationGroupRepository : RepositoryBase<long, Classification
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// ایجاد گروه های بیست گانه
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Application.Enums;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.ClassificationSchemeAgg;
|
||||
using CompanyManagment.App.Contracts.ClassificationScheme;
|
||||
@@ -27,10 +28,53 @@ public class ClassificationGroupSalariesRepository : RepositoryBase<long, Classi
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// دریافت دستمزدها و ضریب ریالی برای مودال ویرایش
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<SalaryAndRialCoefficientModel> GetEditSalariesData(long schemeId, string startDate, string endDate)
|
||||
{
|
||||
var salaryAndRialCoefficientModel = new SalaryAndRialCoefficientModel();
|
||||
|
||||
try
|
||||
{
|
||||
var scheme = _context.ClassificationSchemes.FirstOrDefaultAsync(x => x.id == schemeId).GetAwaiter().GetResult();
|
||||
var startDatGr = startDate.ToGeorgian();
|
||||
|
||||
|
||||
var rialCoEfficient = await _context.ClassificationRialCoefficients
|
||||
.FirstOrDefaultAsync(x => x.ClassificationSchemeId == schemeId && x.StartDate == startDatGr);
|
||||
salaryAndRialCoefficientModel.SchemeId = schemeId;
|
||||
salaryAndRialCoefficientModel.StartDateFa = startDate;
|
||||
salaryAndRialCoefficientModel.EndDateFa = endDate;
|
||||
salaryAndRialCoefficientModel.TypeOfCoefficient = scheme.TypeOfCoefficient;
|
||||
salaryAndRialCoefficientModel.RialCoefficient = scheme.TypeOfCoefficient == TypeOfCoefficient.RialCoefficient ? rialCoEfficient.RialCoefficient : 0;
|
||||
salaryAndRialCoefficientModel.CoefficientId = scheme.TypeOfCoefficient == TypeOfCoefficient.RialCoefficient ? rialCoEfficient.id : 0;
|
||||
salaryAndRialCoefficientModel.SalariesAndCoefficientList = _context.ClassificationGroupSalaries.Where(x => x.SchemeId == schemeId && x.StartDate == startDatGr).Select(x => new EditClassificationGroupSalaryAndRialCoefficient
|
||||
{
|
||||
Id = x.id,
|
||||
ClassificationGroupId = x.ClassificationGroupId,
|
||||
GroupNo = x.GroupNo,
|
||||
GroupSalaryStr = x.GroupSalary.ToMoney()
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
catch (System.Exception)
|
||||
{
|
||||
return new SalaryAndRialCoefficientModel();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return salaryAndRialCoefficientModel;
|
||||
}
|
||||
public async Task<SalaryAndRialCoefficientTab> GetSalariesTabData(long schemeId)
|
||||
{
|
||||
var scheme = await _context.ClassificationSchemes
|
||||
var scheme = await _context.ClassificationSchemes.Include(xc=>xc.ClassificationRialCoefficients)
|
||||
.Include(xg => xg.ClassificationGroups)
|
||||
.ThenInclude(xs => xs.ClassificationGroupSalaries)
|
||||
.FirstOrDefaultAsync(x => x.id == schemeId);
|
||||
@@ -54,17 +98,18 @@ public class ClassificationGroupSalariesRepository : RepositoryBase<long, Classi
|
||||
};
|
||||
}
|
||||
|
||||
// ✅ گروهبندی بر اساس StartDate و EndDate برای حذف موارد تکراری
|
||||
// گروهبندی بر اساس StartDate و EndDate برای حذف موارد تکراری
|
||||
var distinctPeriods = allSalaries
|
||||
.GroupBy(s => new { s.StartDate, s.EndDate })
|
||||
.Select(g => g.First()) // فقط یکی از هر بازه تاریخ
|
||||
.OrderByDescending(x => x.StartDate)
|
||||
.ToList();
|
||||
|
||||
// ✅ تبدیل به مدل خروجی
|
||||
//تبدیل به مدل خروجی
|
||||
var dataList = distinctPeriods
|
||||
.Select(s => new SalaryAndRialCoefficientTabDataList
|
||||
{
|
||||
RialCoefficientStr = $"{scheme.ClassificationRialCoefficients.FirstOrDefault(x=>x.StartDate.Date == s.StartDate.Date && x.EndDate.Date == s.EndDate.Date)?.RialCoefficient}",
|
||||
StartDateFa = s.StartDate.ToFarsi(),
|
||||
EndDateFa = s.EndDate.ToFarsi(),
|
||||
Year = s.Year// یا هر روش سال شمسی که داری
|
||||
@@ -82,4 +127,6 @@ public class ClassificationGroupSalariesRepository : RepositoryBase<long, Classi
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -12,7 +12,16 @@
|
||||
.hiddenTab{
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
.errored {
|
||||
animation: shake 300ms;
|
||||
box-shadow: inset 0 0 2px #eb3434, 0 0 5px #eb3434 !important;
|
||||
border: 1px solid #eb3434 !important;
|
||||
}
|
||||
|
||||
.date-input {
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
|
||||
@@ -91,9 +100,12 @@
|
||||
@section Script
|
||||
{
|
||||
<script src="~/AdminTheme/assets/js/site.js"></script>
|
||||
<script src="~/AdminTheme/js/numeral.min.js"></script>
|
||||
<script src="~/admintheme/js/jquery.mask_1.14.16.min.js"></script>
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
var workshopId = '@Model.WorkshopId';
|
||||
var schemeId = '@Model.SchemeId';
|
||||
var hasScheme = '@Model.HasScheme.ToString().ToLower()';
|
||||
|
||||
@@ -260,6 +260,33 @@ public class ClassificationSchemeModel : PageModel
|
||||
var result = _classificationSchemeApplication.CreateGroupSalaryAndCoefficient(command).GetAwaiter().GetResult();
|
||||
return new JsonResult(result);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دریافت دستمزدها و ضریب ریالی برای مودال ویرایش
|
||||
/// </summary>
|
||||
/// <param name="schemeId"></param>
|
||||
/// <param name="startDate"></param>
|
||||
/// <param name="endDate"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnGetEditSalariesData(long schemeId, string startDate, string endDate)
|
||||
{
|
||||
var editData = _classificationSchemeApplication.GetEditSalariesData(schemeId, startDate, endDate).GetAwaiter()
|
||||
.GetResult();
|
||||
|
||||
return Partial("_ClassificationPartials/EditSalariesAndCoefficient", editData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ثبت تغییرات ویرایش دستمزدها
|
||||
/// </summary>
|
||||
/// <param name="command"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnPostEditSalariesData(SalaryAndRialCoefficientModel command)
|
||||
{
|
||||
var result = _classificationSchemeApplication.EditGroupSalaryAndCoefficient(command).GetAwaiter().GetResult();
|
||||
return new JsonResult(result);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
@@ -84,9 +84,10 @@
|
||||
<!-- هدر -->
|
||||
<div class="row fw-bold mb-2 head-table">
|
||||
<div class="col-2 col-md-1">ردیف</div>
|
||||
<div class="col-10 col-md-3">سال</div>
|
||||
<div class="col-10 col-md-2">سال</div>
|
||||
<div class="col-6 col-md-2">تاریخ شروع</div>
|
||||
<div class="col-6 col-md-3">تاریخ پایان</div>
|
||||
<div class="col-6 col-md-2">تاریخ پایان</div>
|
||||
<div class="col-6 col-md-2"> ضریب ریالی </div>
|
||||
<div class="col-12 col-md-3" style="float:left; direction:ltr">عملیات</div>
|
||||
</div>
|
||||
|
||||
@@ -104,9 +105,10 @@
|
||||
<div class="row align-items-center p-2 tr-table">
|
||||
|
||||
<div class="col-2 col-md-1"><div class="row-number">@rowIndex</div></div>
|
||||
<div class="col-10 col-md-3">@item.Year</div>
|
||||
<div class="col-10 col-md-2">@item.Year</div>
|
||||
<div class="col-6 col-md-2">@item.StartDateFa</div>
|
||||
<div class="col-6 col-md-3">@item.EndDateFa</div>
|
||||
<div class="col-6 col-md-2">@item.EndDateFa</div>
|
||||
<div class="col-6 col-md-2">@item.RialCoefficientStr</div>
|
||||
@{
|
||||
rowIndex++;
|
||||
}
|
||||
@@ -114,7 +116,7 @@
|
||||
|
||||
|
||||
|
||||
<a href="#showmodal=@Url.Page("./ClassificationScheme", "EditScheme" ,new {startDate = item.StartDateFa})">
|
||||
<a href="#showmodal=@Url.Page("./ClassificationScheme", "EditSalariesData" ,new {schemeId = Model.SchemeId, startDate = item.StartDateFa, endDate = item.EndDateFa})">
|
||||
<span class="icon-span" style="background-color:#ade7f2">
|
||||
<svg width="19" height="18" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="18.5047" height="18.5047" transform="translate(0.074707 0.679688)" fill="#ADE7F2"></rect>
|
||||
|
||||
@@ -54,12 +54,16 @@
|
||||
<a class="btn btn-success"
|
||||
style="border-radius:5px;" href="#showmodal=@Url.Page("./ClassificationScheme", "CreateScheme" ,new {workshopId = @Model.WorkshopId})">
|
||||
@* <i class="fa fa-user-plus" aria-hidden="true" style="margin: 0px 5px;"></i> *@
|
||||
<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="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
<span> ایجاد طرح </span>
|
||||
|
||||
<span class="icon-span">
|
||||
|
||||
<svg width="19" height="19" 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="M11 13.75L11 8.25" stroke="white" stroke-linecap="round" />
|
||||
<path d="M13.75 11L8.25 11" stroke="white" stroke-linecap="round" />
|
||||
</svg>
|
||||
<span style="margin-right:4px">ایجاد طرح</span>
|
||||
</span>
|
||||
</a>
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@using _0_Framework.Application.Enums
|
||||
@using CompanyManagment.App.Contracts.ClassificationScheme
|
||||
@model CompanyManagment.App.Contracts.ClassificationScheme.SalaryAndRialCoefficientModel
|
||||
@{
|
||||
<style>
|
||||
@@ -8,7 +7,8 @@
|
||||
.modal .modal-dialog .modal-content {
|
||||
padding-bottom: 10px !important;
|
||||
}
|
||||
.row-number {
|
||||
|
||||
.row-number-salaries {
|
||||
background-color: rgb(187, 240, 240);
|
||||
color: #0B5959;
|
||||
width: 82px;
|
||||
@@ -19,7 +19,7 @@
|
||||
}
|
||||
|
||||
|
||||
.tr-table {
|
||||
.tr-table-salaries {
|
||||
background-color: #ddf4f4;
|
||||
border-radius: 5px;
|
||||
padding: 7px 1px;
|
||||
@@ -38,8 +38,8 @@
|
||||
</div>
|
||||
|
||||
|
||||
<form asp-page="./ClassificationScheme" asp-page-handler="CreateSalaries" method="post" autocomplete="off"
|
||||
data-ajax="true" data-action="newSave" enctype="multipart/form-data">
|
||||
<form asp-page="./ClassificationScheme" asp-page-handler="CreateSalaries" method="post" autocomplete="off" novalidate="novalidate"
|
||||
data-ajax="true" data-action="salariesTab" enctype="multipart/form-data">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="card shadow-sm border-0">
|
||||
@@ -48,13 +48,13 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6 mb-3">
|
||||
<label asp-for="StartDateFa" class="form-label">تاریخ شروع</label>
|
||||
<input asp-for="StartDateFa" class="form-control" />
|
||||
<label class="form-label">تاریخ شروع</label>
|
||||
<input type="text" asp-for="StartDateFa" class="form-control date-input" data-val="false" />
|
||||
<span asp-validation-for="StartDateFa" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 mb-3">
|
||||
<label asp-for="EndDateFa" class="form-label">تاریخ پایان</label>
|
||||
<input asp-for="EndDateFa" class="form-control" />
|
||||
<label class="form-label">تاریخ پایان</label>
|
||||
<input type="text" asp-for="EndDateFa" class="form-control date-input" data-val="false" />
|
||||
<span asp-validation-for="EndDateFa" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -64,20 +64,20 @@
|
||||
<div class="row m-t-10">
|
||||
<div class="col-xs-12 col-md-6 mb-3">
|
||||
<div class="form-control" style="border-color:#fff !important;">
|
||||
<label asp-for="RialCoefficientStr" class="form-label" style="float: left;"> ضریب ریالی</label>
|
||||
<label asp-for="RialCoefficient" class="form-label" style="float: left;"> ضریب ریالی</label>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
|
||||
<input asp-for="RialCoefficientStr" class="form-control" />
|
||||
<span asp-validation-for="RialCoefficientStr" class="text-danger"></span>
|
||||
|
||||
<input asp-for="RialCoefficient" class="form-control" />
|
||||
<span asp-validation-for="RialCoefficient" class="text-danger"></span>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
<div class="lineDiv"></div>
|
||||
|
||||
|
||||
@@ -88,18 +88,18 @@
|
||||
<div class="col-12 col-md-6">
|
||||
@foreach (var itemRight in Model.SalariesAndCoefficientList.Take(10))
|
||||
{
|
||||
<div class="row align-items-center mb-2 p-2 tr-table" data-groupid="@itemRight.ClassificationGroupId">
|
||||
<div class="row align-items-center mb-2 p-2 tr-table-salaries" data-groupid="@itemRight.ClassificationGroupId">
|
||||
|
||||
|
||||
|
||||
<div class="col-xs-6 align-items-center" style="float:left; direction:ltr">
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].GroupNo" value="@itemRight.GroupNo" />
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].ClassificationGroupId" value="@itemRight.ClassificationGroupId" />
|
||||
<input type="text" class="form-control" name="SalariesAndCoefficientList[@groupIndex].GroupSalaryStr" value="@itemRight.GroupSalaryStr" />
|
||||
<input type="text" class="form-control amount" name="SalariesAndCoefficientList[@groupIndex].GroupSalaryStr" value="@itemRight.GroupSalaryStr" />
|
||||
</div>
|
||||
<div class="col-xs-3"></div>
|
||||
<div class="col-xs-3">
|
||||
|
||||
<div class="row-number">
|
||||
<div class="row-number-salaries">
|
||||
<span>گروه</span>
|
||||
<span> </span>
|
||||
<span>@itemRight.GroupNo</span>
|
||||
@@ -115,26 +115,26 @@
|
||||
<div class="col-12 col-md-6">
|
||||
@foreach (var itemLeft in Model.SalariesAndCoefficientList.Skip(10))
|
||||
{
|
||||
<div class="row align-items-center mb-2 p-2 tr-table" data-groupid="@itemLeft.ClassificationGroupId">
|
||||
<div class="row align-items-center mb-2 p-2 tr-table-salaries" data-groupid="@itemLeft.ClassificationGroupId">
|
||||
|
||||
|
||||
|
||||
<div class="col-xs-6 align-items-center" style="float:left; direction:ltr">
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].GroupNo" value="@itemLeft.GroupNo"/>
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].GroupNo" value="@itemLeft.GroupNo" />
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].ClassificationGroupId" value="@itemLeft.ClassificationGroupId" />
|
||||
<input type="text" class="form-control" name="SalariesAndCoefficientList[@groupIndex].GroupSalaryStr" value="@itemLeft.GroupSalaryStr" />
|
||||
<input type="text" class="form-control amount" name="SalariesAndCoefficientList[@groupIndex].GroupSalaryStr" value="@itemLeft.GroupSalaryStr" />
|
||||
</div>
|
||||
<div class="col-xs-3"></div>
|
||||
|
||||
|
||||
<div class="col-xs-3">
|
||||
|
||||
<div class="row-number">
|
||||
<div class="row-number-salaries">
|
||||
<span>گروه</span>
|
||||
<span> </span>
|
||||
<span>@itemLeft.GroupNo</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
groupIndex++;
|
||||
@@ -151,4 +151,24 @@
|
||||
<button type="submit" class="btn btn-success px-4 rounded-pill">ذخیره</button>
|
||||
<button type="button" class="btn btn-outline-secondary px-4 rounded-pill" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$(".date-input").mask("0000/00/00");
|
||||
|
||||
$('.amount').on('input',
|
||||
function() {
|
||||
this.value = this.value.replace(/[^\d]/, '');
|
||||
var contractAmount = $(this);
|
||||
//setting format
|
||||
numeral.defaultFormat("0,0 تومان");
|
||||
contractAmount.on("keyup",
|
||||
function(e) {
|
||||
contractAmount.val(numeral(contractAmount.val()).format());
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -44,13 +44,13 @@
|
||||
<div class="row m-t-10" >
|
||||
<div class="col-md-6 mb-3">
|
||||
<label asp-for="IncludingDateFa" class="form-label">تاریخ شمول طرح</label>
|
||||
<input type="text" asp-for="IncludingDateFa" class="form-control" style="text-align: center" />
|
||||
<span asp-validation-for="IncludingDateFa" class="text-danger"></span>
|
||||
<input type="text" asp-for="IncludingDateFa" class="form-control date-input"/>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label asp-for="ExecutionDateFa" class="form-label">تاریخ اجرای طرح</label>
|
||||
<input type="text" asp-for="ExecutionDateFa" class="form-control" style="text-align: center" />
|
||||
<span asp-validation-for="ExecutionDateFa" class="text-danger"></span>
|
||||
<input type="text" asp-for="ExecutionDateFa" class="form-control date-input"/>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="lineDiv"></div>
|
||||
@@ -83,3 +83,10 @@
|
||||
<button type="button" class="btn btn-outline-secondary px-4 rounded-pill" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$(".date-input").mask("0000/00/00");
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,177 @@
|
||||
@using _0_Framework.Application.Enums
|
||||
@model CompanyManagment.App.Contracts.ClassificationScheme.SalaryAndRialCoefficientModel
|
||||
@{
|
||||
<style>
|
||||
|
||||
|
||||
.modal .modal-dialog .modal-content {
|
||||
padding-bottom: 10px !important;
|
||||
}
|
||||
|
||||
.row-number-salaries {
|
||||
background-color: rgb(187, 240, 240);
|
||||
color: #0B5959;
|
||||
width: 82px;
|
||||
height: 31px;
|
||||
line-height: 33px;
|
||||
text-align: center;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
|
||||
.tr-table-salaries {
|
||||
background-color: #ddf4f4;
|
||||
border-radius: 5px;
|
||||
padding: 7px 1px;
|
||||
margin: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
var groupIndex = 0;
|
||||
}
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">ایجاد دستمزدها</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="بستن">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<form asp-page="./ClassificationScheme" asp-page-handler="EditSalariesData" method="post" autocomplete="off" novalidate="novalidate"
|
||||
data-ajax="true" data-action="salariesTab" enctype="multipart/form-data">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="card shadow-sm border-0">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6 mb-3">
|
||||
<label class="form-label">تاریخ شروع</label>
|
||||
<input type="text" asp-for="StartDateFa" class="form-control date-input" data-val="false" />
|
||||
<span asp-validation-for="StartDateFa" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 mb-3">
|
||||
<label class="form-label">تاریخ پایان</label>
|
||||
<input type="text" asp-for="EndDateFa" class="form-control date-input" data-val="false" />
|
||||
<span asp-validation-for="EndDateFa" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
@if (Model.TypeOfCoefficient == TypeOfCoefficient.RialCoefficient)
|
||||
{
|
||||
<div class="lineDiv"></div>
|
||||
<div class="row m-t-10">
|
||||
<div class="col-xs-12 col-md-6 mb-3">
|
||||
<div class="form-control" style="border-color:#fff !important;">
|
||||
<label asp-for="RialCoefficient" class="form-label" style="float: left;"> ضریب ریالی</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
|
||||
<input asp-for="RialCoefficient" class="form-control" />
|
||||
<span asp-validation-for="RialCoefficient" class="text-danger"></span>
|
||||
<input type="hidden" asp-for="CoefficientId" value="@Model.CoefficientId"/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="lineDiv"></div>
|
||||
|
||||
|
||||
|
||||
<div class="row m-t-10">
|
||||
|
||||
<!-- گروه 1 تا 10 -->
|
||||
<div class="col-12 col-md-6">
|
||||
@foreach (var itemRight in Model.SalariesAndCoefficientList.Take(10))
|
||||
{
|
||||
<div class="row align-items-center mb-2 p-2 tr-table-salaries" data-groupid="@itemRight.ClassificationGroupId">
|
||||
|
||||
|
||||
<div class="col-xs-6 align-items-center" style="float:left; direction:ltr">
|
||||
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].Id" value="@itemRight.Id"/>
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].GroupNo" value="@itemRight.GroupNo"/>
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].ClassificationGroupId" value="@itemRight.ClassificationGroupId"/>
|
||||
<input type="text" class="form-control amount" name="SalariesAndCoefficientList[@groupIndex].GroupSalaryStr" value="@itemRight.GroupSalaryStr"/>
|
||||
</div>
|
||||
<div class="col-xs-3"></div>
|
||||
<div class="col-xs-3">
|
||||
|
||||
<div class="row-number-salaries">
|
||||
<span>گروه</span>
|
||||
<span> </span>
|
||||
<span>@itemRight.GroupNo</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
groupIndex++;
|
||||
}
|
||||
</div>
|
||||
<!-- گروه 11 تا 20 -->
|
||||
<div class="col-12 col-md-6">
|
||||
@foreach (var itemLeft in Model.SalariesAndCoefficientList.Skip(10))
|
||||
{
|
||||
<div class="row align-items-center mb-2 p-2 tr-table-salaries" data-groupid="@itemLeft.ClassificationGroupId">
|
||||
|
||||
|
||||
<div class="col-xs-6 align-items-center" style="float:left; direction:ltr">
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].Id" value="@itemLeft.Id" />
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].GroupNo" value="@itemLeft.GroupNo"/>
|
||||
<input type="hidden" name="SalariesAndCoefficientList[@groupIndex].ClassificationGroupId" value="@itemLeft.ClassificationGroupId"/>
|
||||
<input type="text" class="form-control amount" name="SalariesAndCoefficientList[@groupIndex].GroupSalaryStr" value="@itemLeft.GroupSalaryStr"/>
|
||||
</div>
|
||||
<div class="col-xs-3"></div>
|
||||
|
||||
<div class="col-xs-3">
|
||||
|
||||
<div class="row-number-salaries">
|
||||
<span>گروه</span>
|
||||
<span> </span>
|
||||
<span>@itemLeft.GroupNo</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
groupIndex++;
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<input type="hidden" id="schemeId" asp-for="@Model.SchemeId" value="@Model.SchemeId" />
|
||||
<input type="hidden" asp-for="TypeOfCoefficient" value="TypeOfCoefficient" />
|
||||
<div class="modal-footer border-0">
|
||||
<button type="submit" class="btn btn-success px-4 rounded-pill">ذخیره</button>
|
||||
<button type="button" class="btn btn-outline-secondary px-4 rounded-pill" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$(".date-input").mask("0000/00/00");
|
||||
|
||||
$('.amount').on('input',
|
||||
function() {
|
||||
this.value = this.value.replace(/[^\d]/, '');
|
||||
var contractAmount = $(this);
|
||||
//setting format
|
||||
numeral.defaultFormat("0,0 تومان");
|
||||
contractAmount.on("keyup",
|
||||
function(e) {
|
||||
contractAmount.val(numeral(contractAmount.val()).format());
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -45,12 +45,12 @@
|
||||
<div class="row m-t-10">
|
||||
<div class="col-md-6 mb-3">
|
||||
<label asp-for="IncludingDateFa" class="form-label">تاریخ شمول طرح</label>
|
||||
<input type="text" asp-for="IncludingDateFa" class="form-control" style="text-align: center" />
|
||||
<input type="text" asp-for="IncludingDateFa" class="form-control date-input"/>
|
||||
<span asp-validation-for="IncludingDateFa" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label asp-for="ExecutionDateFa" class="form-label">تاریخ اجرای طرح</label>
|
||||
<input type="text" asp-for="ExecutionDateFa" class="form-control" style="text-align: center" />
|
||||
<input type="text" asp-for="ExecutionDateFa" class="form-control date-input"/>
|
||||
<span asp-validation-for="ExecutionDateFa" class="text-danger"></span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -85,3 +85,10 @@
|
||||
<button type="button" class="btn btn-outline-secondary px-4 rounded-pill" data-dismiss="modal">بستن</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
||||
$(".date-input").mask("0000/00/00");
|
||||
|
||||
});
|
||||
</script>
|
||||
@@ -307,7 +307,7 @@ function CallBackHandler(data, action, form) {
|
||||
}
|
||||
break;
|
||||
|
||||
case "newSave":
|
||||
case "salariesTab":
|
||||
if (data.isSuccedded) {
|
||||
|
||||
$.Notification.autoHideNotify('success', 'top center', 'پیام سیستم ', data.message);
|
||||
|
||||
Reference in New Issue
Block a user