ปรับปรุง https://app.clickup.com/t/1me7cdm
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1096
Migrations/20211005133544_AddRewardSalary.Designer.cs
generated
Normal file
1096
Migrations/20211005133544_AddRewardSalary.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
31
Migrations/20211005133544_AddRewardSalary.cs
Normal file
31
Migrations/20211005133544_AddRewardSalary.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class AddRewardSalary : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "reward_new",
|
||||
table: "eva_adjust_postponement_detail",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "reward_old",
|
||||
table: "eva_adjust_postponement_detail",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "reward_new",
|
||||
table: "eva_adjust_postponement_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "reward_old",
|
||||
table: "eva_adjust_postponement_detail");
|
||||
}
|
||||
}
|
||||
}
|
||||
1098
Migrations/20211005143227_AddRewardSalary2.Designer.cs
generated
Normal file
1098
Migrations/20211005143227_AddRewardSalary2.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
22
Migrations/20211005143227_AddRewardSalary2.cs
Normal file
22
Migrations/20211005143227_AddRewardSalary2.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class AddRewardSalary2 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<decimal>(
|
||||
name: "reward_new2",
|
||||
table: "eva_adjust_postponement_detail",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "reward_new2",
|
||||
table: "eva_adjust_postponement_detail");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -171,6 +171,12 @@ namespace tb320eva.Migrations
|
||||
b.Property<string>("remark")
|
||||
.HasMaxLength(1000);
|
||||
|
||||
b.Property<decimal?>("reward_new");
|
||||
|
||||
b.Property<decimal?>("reward_new2");
|
||||
|
||||
b.Property<decimal?>("reward_old");
|
||||
|
||||
b.Property<decimal?>("sarary");
|
||||
|
||||
b.Property<decimal?>("score_final");
|
||||
|
||||
@@ -81,6 +81,12 @@ namespace TodoAPI2.Models
|
||||
public string employee_no_at_this_time { get; set; }
|
||||
|
||||
public bool? is_for_postponement { get; set; }
|
||||
|
||||
public decimal? reward_old { get; set; }
|
||||
|
||||
public decimal? reward_new { get; set; }
|
||||
|
||||
public decimal? reward_new2 { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,10 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string eva_result { get; set; }
|
||||
|
||||
public decimal? reward_old { get; set; }
|
||||
|
||||
public decimal? reward_new { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,9 +141,15 @@ namespace TodoAPI2.Models
|
||||
adjust_postponement_id_eva_adjust_postponement_fiscal_year = fk_eva_adjust_postponementResult1.fiscal_year,
|
||||
employee_id_external_linkage_external_name = fk_external_linkageResult2.fullname,
|
||||
|
||||
reward_old = m_eva_adjust_postponement_detail_normal.reward_old,
|
||||
reward_new = m_eva_adjust_postponement_detail_normal.reward_new,
|
||||
|
||||
isActive = m_eva_adjust_postponement_detail_normal.isActive,
|
||||
Created = m_eva_adjust_postponement_detail_normal.created,
|
||||
Updated = m_eva_adjust_postponement_detail_normal.updated
|
||||
Updated = m_eva_adjust_postponement_detail_normal.updated,
|
||||
|
||||
salary_max = fk_external_linkageResult2.salary_max,
|
||||
themax = fk_external_linkageResult2.themax
|
||||
}
|
||||
).ToList();
|
||||
|
||||
@@ -203,6 +209,8 @@ namespace TodoAPI2.Models
|
||||
//existingEntity.emp_level = model.emp_level;
|
||||
//existingEntity.total_score = model.total_score;
|
||||
//existingEntity.eva_result = model.eva_result;
|
||||
existingEntity.reward_old = model.reward_old;
|
||||
existingEntity.reward_new = model.reward_new;
|
||||
|
||||
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
@@ -467,6 +475,8 @@ namespace TodoAPI2.Models
|
||||
//existingEntity.emp_level = i.emp_level;
|
||||
//existingEntity.total_score = i.total_score;
|
||||
//existingEntity.eva_result = i.eva_result;
|
||||
existingEntity.reward_old = i.reward_old;
|
||||
existingEntity.reward_new = i.reward_new;
|
||||
|
||||
|
||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||
|
||||
@@ -50,8 +50,14 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string eva_result { get; set; }
|
||||
|
||||
public decimal? reward_old { get; set; }
|
||||
|
||||
public decimal? reward_new { get; set; }
|
||||
|
||||
public int? adjust_postponement_id_eva_adjust_postponement_fiscal_year { get; set; }
|
||||
public string employee_id_external_linkage_external_name { get; set; }
|
||||
public decimal? salary_max { get; set; }
|
||||
|
||||
public decimal? themax { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -48,6 +48,10 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string eva_result { get; set; }
|
||||
|
||||
public decimal? reward_old { get; set; }
|
||||
|
||||
public decimal? reward_new { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
|
||||
|
||||
|
||||
@@ -265,7 +265,8 @@ namespace TodoAPI2.Models
|
||||
//existingEntity.emp_level = model.emp_level;
|
||||
//existingEntity.total_score = model.total_score;
|
||||
//existingEntity.eva_result = model.eva_result;
|
||||
|
||||
existingEntity.reward_old = model.reward_old;
|
||||
existingEntity.reward_new = model.reward_new;
|
||||
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
return Get(updated.id);
|
||||
@@ -299,7 +300,8 @@ namespace TodoAPI2.Models
|
||||
//existingEntity.emp_level = i.emp_level;
|
||||
//existingEntity.total_score = i.total_score;
|
||||
//existingEntity.eva_result = i.eva_result;
|
||||
|
||||
existingEntity.reward_old = i.reward_old;
|
||||
existingEntity.reward_new = i.reward_new;
|
||||
|
||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||
}
|
||||
|
||||
@@ -63,5 +63,9 @@ namespace TodoAPI2.Models
|
||||
|
||||
public decimal? salary_max { get; set; }
|
||||
public decimal? themax { get; set; }
|
||||
|
||||
public decimal? reward_old { get; set; }
|
||||
|
||||
public decimal? reward_new { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -52,6 +52,10 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string eva_result { get; set; }
|
||||
|
||||
public decimal? reward_old { get; set; }
|
||||
|
||||
public decimal? reward_new2 { get; set; }
|
||||
|
||||
public string active_mode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,16 +20,16 @@ namespace TodoAPI2.Models
|
||||
public class eva_adjust_postponement_detail_quota_02Service : Ieva_adjust_postponement_detail_quota_02Service
|
||||
{
|
||||
private IBaseRepository2<eva_adjust_postponement_detailEntity, int> _repository;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
private IMyDatabase db;
|
||||
private Iexternal_linkageService ext;
|
||||
private Iexternal_employeeService emp;
|
||||
|
||||
public eva_adjust_postponement_detail_quota_02Service(IBaseRepository2<eva_adjust_postponement_detailEntity, int> repository,
|
||||
public eva_adjust_postponement_detail_quota_02Service(IBaseRepository2<eva_adjust_postponement_detailEntity, int> repository,
|
||||
IMyDatabase mydb, Iexternal_linkageService inext, Iexternal_employeeService inemp)
|
||||
{
|
||||
_repository = repository;
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
db = mydb;
|
||||
ext = inext;
|
||||
emp = inemp;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace TodoAPI2.Models
|
||||
{
|
||||
return Mapper.Map<List<eva_adjust_postponement_detail_quota_02ViewModel>>(entities);
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Functions
|
||||
@@ -80,13 +80,13 @@ namespace TodoAPI2.Models
|
||||
|
||||
public List<eva_adjust_postponement_detail_quota_02ViewModel> GetListByadjust_postponement_quota_id(int? adjust_postponement_quota_id)
|
||||
{
|
||||
var model = new eva_adjust_postponement_detail_quota_02SearchModel();
|
||||
var model = new eva_adjust_postponement_detail_quota_02SearchModel();
|
||||
model.adjust_postponement_quota_id = adjust_postponement_quota_id;
|
||||
return GetListBySearch(model);
|
||||
}
|
||||
|
||||
public string GetWorkTimeText(DateTime? startDate, DateTime? endDate)
|
||||
{
|
||||
{
|
||||
if (!endDate.HasValue || !startDate.HasValue)
|
||||
return "";
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace TodoAPI2.Models
|
||||
return "";
|
||||
}
|
||||
|
||||
public List<eva_adjust_postponement_detail_quota_02ViewModel> GetListBySearch(eva_adjust_postponement_detail_quota_02SearchModel model)
|
||||
public List<eva_adjust_postponement_detail_quota_02ViewModel> GetListBySearch(eva_adjust_postponement_detail_quota_02SearchModel model)
|
||||
{
|
||||
var all_emp = emp.GetListByemployee_type(null, null);
|
||||
|
||||
@@ -112,10 +112,10 @@ namespace TodoAPI2.Models
|
||||
into eva_adjust_postponementResult1A
|
||||
from fk_eva_adjust_postponementResult1A in eva_adjust_postponementResult1A.DefaultIfEmpty()
|
||||
|
||||
//join create_detail in _repository.Context.eva_create_evaluation_detail
|
||||
// on fk_eva_adjust_postponementResult1A.create_evaluation_id equals create_detail.create_evaluation_id
|
||||
// into create_detailResult
|
||||
//from fk_create_detailResult in create_detailResult.DefaultIfEmpty()
|
||||
//join create_detail in _repository.Context.eva_create_evaluation_detail
|
||||
// on fk_eva_adjust_postponementResult1A.create_evaluation_id equals create_detail.create_evaluation_id
|
||||
// into create_detailResult
|
||||
//from fk_create_detailResult in create_detailResult.DefaultIfEmpty()
|
||||
|
||||
join create_data in _repository.Context.eva_create_evaluation
|
||||
on fk_eva_adjust_postponementResult1A.create_evaluation_id equals create_data.id
|
||||
@@ -142,12 +142,12 @@ namespace TodoAPI2.Models
|
||||
|
||||
join fk_external_linkage2 in all_emp on m_eva_adjust_postponement_detail_quota_02.employee_id equals fk_external_linkage2.id
|
||||
into external_linkageResult2
|
||||
from fk_external_linkageResult2 in external_linkageResult2.DefaultIfEmpty()
|
||||
from fk_external_linkageResult2 in external_linkageResult2.DefaultIfEmpty()
|
||||
|
||||
//join create_detail in _repository.Context.eva_create_evaluation_detail
|
||||
//on fk_eva_adjust_postponementResult1A.create_evaluation_id equals create_detail.create_evaluation_id
|
||||
//into create_detailResult
|
||||
//from fk_create_detailResult in create_detailResult.DefaultIfEmpty()
|
||||
//join create_detail in _repository.Context.eva_create_evaluation_detail
|
||||
//on fk_eva_adjust_postponementResult1A.create_evaluation_id equals create_detail.create_evaluation_id
|
||||
//into create_detailResult
|
||||
//from fk_create_detailResult in create_detailResult.DefaultIfEmpty()
|
||||
|
||||
join sort_dep in ext.GetSortingDep() on m_eva_adjust_postponement_detail_quota_02.org_at_this_time.HasValue ? m_eva_adjust_postponement_detail_quota_02.org_at_this_time : fk_external_linkageResult2.department_id equals sort_dep.id
|
||||
into sort_depResult2
|
||||
@@ -162,7 +162,7 @@ namespace TodoAPI2.Models
|
||||
into external_linkageResult11
|
||||
from fk_external_linkageResult11 in sort_depResult2.DefaultIfEmpty()
|
||||
|
||||
where 1==1
|
||||
where 1 == 1
|
||||
//&& (m_eva_adjust_postponement_detail_quota_02.id == model.id || !model.id.HasValue)
|
||||
&& (m_eva_adjust_postponement_detail_quota_02.adjust_postponement_quota_id == model.adjust_postponement_quota_id || !model.adjust_postponement_quota_id.HasValue)
|
||||
//&& (fk_create_detailResult.employee_id == m_eva_adjust_postponement_detail_quota_02.employee_id || fk_create_detailResult == null)
|
||||
@@ -203,7 +203,7 @@ namespace TodoAPI2.Models
|
||||
|
||||
emp_department_name = !string.IsNullOrEmpty(fk_external_linkageResult11.external_name) ? fk_external_linkageResult11.external_name : fk_sort_depResult2.external_name,
|
||||
|
||||
total_score = m_eva_adjust_postponement_detail_quota_02.migration_total_score.HasValue? m_eva_adjust_postponement_detail_quota_02.migration_total_score : m_eva_adjust_postponement_detail_quota_02.score_final,
|
||||
total_score = m_eva_adjust_postponement_detail_quota_02.migration_total_score.HasValue ? m_eva_adjust_postponement_detail_quota_02.migration_total_score : m_eva_adjust_postponement_detail_quota_02.score_final,
|
||||
eva_result = !string.IsNullOrEmpty(m_eva_adjust_postponement_detail_quota_02.migration_eva_result) ? m_eva_adjust_postponement_detail_quota_02.migration_eva_result : m_eva_adjust_postponement_detail_quota_02.level_score_final,
|
||||
|
||||
adjust_postponement_quota_id_eva_adjust_postponement_fiscal_year = fk_eva_adjust_postponementResult1.fiscal_year,
|
||||
@@ -213,9 +213,16 @@ namespace TodoAPI2.Models
|
||||
startDate = fk_external_linkageResult2.packing_date,
|
||||
endDate = endDate,
|
||||
|
||||
reward_old = m_eva_adjust_postponement_detail_quota_02.reward_old,
|
||||
reward_new2 = m_eva_adjust_postponement_detail_quota_02.reward_new2,
|
||||
|
||||
salary_max = fk_external_linkageResult2.salary_max,
|
||||
themax = fk_external_linkageResult2.themax,
|
||||
|
||||
isActive = m_eva_adjust_postponement_detail_quota_02.isActive,
|
||||
Created = m_eva_adjust_postponement_detail_quota_02.created,
|
||||
Updated = m_eva_adjust_postponement_detail_quota_02.updated
|
||||
|
||||
}
|
||||
).ToList();
|
||||
|
||||
@@ -231,10 +238,10 @@ namespace TodoAPI2.Models
|
||||
int? newkey = 0;
|
||||
|
||||
var x = (from i in _repository.Context.eva_adjust_postponement_detail
|
||||
orderby i.id descending
|
||||
select i).Take(1).ToList();
|
||||
orderby i.id descending
|
||||
select i).Take(1).ToList();
|
||||
|
||||
if(x.Count > 0)
|
||||
if (x.Count > 0)
|
||||
{
|
||||
newkey = x[0].id + 1;
|
||||
}
|
||||
@@ -250,7 +257,7 @@ namespace TodoAPI2.Models
|
||||
|
||||
|
||||
var inserted = _repository.Insert(entity);
|
||||
|
||||
|
||||
return Get(inserted.id);
|
||||
}
|
||||
|
||||
@@ -277,44 +284,46 @@ namespace TodoAPI2.Models
|
||||
//existingEntity.emp_level = model.emp_level;
|
||||
//existingEntity.total_score = model.total_score;
|
||||
//existingEntity.eva_result = model.eva_result;
|
||||
|
||||
existingEntity.reward_old = model.reward_old;
|
||||
existingEntity.reward_new2 = model.reward_new2;
|
||||
|
||||
var updated = _repository.Update(id, existingEntity);
|
||||
return Get(updated.id);
|
||||
}
|
||||
else
|
||||
throw new NotificationException("No data to update");
|
||||
throw new NotificationException("No data to update");
|
||||
}
|
||||
|
||||
|
||||
public string UpdateMultiple(List<eva_adjust_postponement_detail_quota_02InputModel> model)
|
||||
public string UpdateMultiple(List<eva_adjust_postponement_detail_quota_02InputModel> model)
|
||||
{
|
||||
foreach(var i in model)
|
||||
foreach (var i in model)
|
||||
{
|
||||
if (i.active_mode == "1" && i.id.HasValue) // update
|
||||
{
|
||||
{
|
||||
var existingEntity = _repository.Get(i.id.Value);
|
||||
if (existingEntity != null)
|
||||
{
|
||||
//existingEntity.adjust_postponement_quota_id = i.adjust_postponement_quota_id;
|
||||
//existingEntity.employee_id = i.employee_id;
|
||||
//existingEntity.sarary = i.sarary;
|
||||
//existingEntity.cost_living = i.cost_living;
|
||||
//existingEntity.middle = i.middle;
|
||||
//existingEntity.promoted_percentage = i.promoted_percentage;
|
||||
//existingEntity.total_promote = i.total_promote;
|
||||
//existingEntity.new_sarary = i.new_sarary;
|
||||
//existingEntity.new_cost_living = i.new_cost_living;
|
||||
existingEntity.remark = i.remark;
|
||||
existingEntity.receive_quota = i.receive_quota;
|
||||
existingEntity.new_sarary_with_quota = i.new_sarary_with_quota;
|
||||
//existingEntity.emp_code = i.emp_code;
|
||||
//existingEntity.emp_fullname = i.emp_fullname;
|
||||
//existingEntity.emp_position = i.emp_position;
|
||||
//existingEntity.emp_level = i.emp_level;
|
||||
//existingEntity.total_score = i.total_score;
|
||||
//existingEntity.eva_result = i.eva_result;
|
||||
|
||||
//existingEntity.adjust_postponement_quota_id = i.adjust_postponement_quota_id;
|
||||
//existingEntity.employee_id = i.employee_id;
|
||||
//existingEntity.sarary = i.sarary;
|
||||
//existingEntity.cost_living = i.cost_living;
|
||||
//existingEntity.middle = i.middle;
|
||||
//existingEntity.promoted_percentage = i.promoted_percentage;
|
||||
//existingEntity.total_promote = i.total_promote;
|
||||
//existingEntity.new_sarary = i.new_sarary;
|
||||
//existingEntity.new_cost_living = i.new_cost_living;
|
||||
existingEntity.remark = i.remark;
|
||||
existingEntity.receive_quota = i.receive_quota;
|
||||
existingEntity.new_sarary_with_quota = i.new_sarary_with_quota;
|
||||
//existingEntity.emp_code = i.emp_code;
|
||||
//existingEntity.emp_fullname = i.emp_fullname;
|
||||
//existingEntity.emp_position = i.emp_position;
|
||||
//existingEntity.emp_level = i.emp_level;
|
||||
//existingEntity.total_score = i.total_score;
|
||||
//existingEntity.eva_result = i.eva_result;
|
||||
existingEntity.reward_old = i.reward_old;
|
||||
existingEntity.reward_new2 = i.reward_new2;
|
||||
|
||||
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
|
||||
}
|
||||
@@ -326,15 +335,15 @@ namespace TodoAPI2.Models
|
||||
_repository.InsertWithoutCommit(entity);
|
||||
}
|
||||
else if (i.active_mode == "0" && i.id.HasValue) // remove
|
||||
{
|
||||
{
|
||||
_repository.DeleteWithoutCommit(i.id.Value);
|
||||
}
|
||||
else if (i.active_mode == "0" && !i.id.HasValue)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
}
|
||||
}
|
||||
//_repository.Context.SaveChanges();
|
||||
//_repository.Context.SaveChanges();
|
||||
|
||||
return model.Count().ToString();
|
||||
}
|
||||
|
||||
@@ -60,5 +60,13 @@ namespace TodoAPI2.Models
|
||||
|
||||
public DateTime? startDate { get; set; }
|
||||
public DateTime? endDate { get; set; }
|
||||
|
||||
public decimal? reward_old { get; set; }
|
||||
|
||||
public decimal? reward_new2 { get; set; }
|
||||
|
||||
public decimal? salary_max { get; set; }
|
||||
|
||||
public decimal? themax { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -123,11 +123,15 @@
|
||||
|
||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_eva_result'>ผลการประเมิน</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_sarary'>เงินเดือน ก่อนปรับเลื่อน</label></th>
|
||||
|
||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_sarary'>ค่าตอบแทนพิเศษ ก่อนปรับเลื่อน</label></th>
|
||||
|
||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_cost_living'>ค่าครองชีพ ก่อนปรับเลื่อน</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_middle'>ค่ากลางฐานในการคำนวณ</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_promoted_percentage'>ร้อยละที่ได้เลื่อน</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_total_promote'>จำนวนเงินที่ได้เลื่อน</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_new_sarary'>เงินเดือนใหม่</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_sarary'>ค่าตอบแทนพิเศษ หลังปรับเลื่อน</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_new_cost_living'>ค่าครองชีพใหม่</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_normal_02_remark'>หมายเหตุ</label></th>
|
||||
</tr>
|
||||
@@ -149,9 +153,11 @@
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th><p id="sum_after"></p></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
@@ -147,6 +147,7 @@
|
||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_emp_level'>ระดับ</label></th>
|
||||
|
||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_sarary'>เงินเดือน ก่อนปรับเลื่อน</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_reward_old'>ค่าตอบแทนพิเศษ ก่อนปรับเลื่อน</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_cost_living'>ค่าครองชีพ ก่อนปรับเลื่อน</label></th>
|
||||
|
||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_total_score'>คะแนนรวม</label></th>
|
||||
@@ -158,10 +159,12 @@
|
||||
|
||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_receive_quota'>ได้รับเงินโควต้าพิเศษ</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_new_sarary_with_quota'>เงินเดือนใหม่ (รวมโควต้า)</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_reward_new2'>ค่าตอบแทนพิเศษ หลังปรับเลื่อน</label></th>
|
||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_new_cost_living'>ค่าครองชีพใหม่</label></th>
|
||||
|
||||
<th><label id='h_eva_adjust_postponement_detail_quota_02_remark'>หมายเหตุ</label></th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="thin-border-bottom" id="eva_adjust_postponement_detail_quota_02Body"></tbody>
|
||||
|
||||
@@ -99,6 +99,7 @@
|
||||
<None Include="wwwroot\js\eva_limit_frame_plan\eva_limit_frame_plan_inline.js" />
|
||||
<None Include="wwwroot\js\eva_limit_frame_plan\eva_limit_frame_plan_report.js" />
|
||||
<None Include="wwwroot\js\eva_self_review\eva_self_review.js" />
|
||||
<None Include="wwwroot\js\rep_eva01\rep_eva01_report.js" />
|
||||
<None Include="wwwroot\js\rep_eva_limit_frame_plan\rep_eva_limit_frame_plan_report.js" />
|
||||
<None Include="wwwroot\js\rep_eva_self_review\rep_eva_self_review_report.js" />
|
||||
<None Include="wwwroot\js\rep_eva_self_review_all\rep_eva_self_review_all_report.js" />
|
||||
|
||||
@@ -23,10 +23,15 @@
|
||||
//=====================================================
|
||||
|
||||
function formatNumber(num) {
|
||||
if(num === "" || num === null) return "";
|
||||
if (num === "" || num === null || isNaN(num)) return "";
|
||||
return num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');
|
||||
}
|
||||
|
||||
function formatNumber2(num, d) {
|
||||
if (num === "" || num === null || isNaN(num)) return "";
|
||||
return num.toFixed(d).replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,')
|
||||
}
|
||||
|
||||
function formatNumberTemp(num) {
|
||||
if(num === "" || num === null) return "";
|
||||
return num.toString();
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
$("#eva_adjust_postponement_detail_normal_02_eva_result_" + i).text("");
|
||||
$("#eva_adjust_postponement_detail_normal_02_salary_max_" + i).text("");
|
||||
$("#eva_adjust_postponement_detail_normal_02_themax_" + i).text("");
|
||||
|
||||
$("#eva_adjust_postponement_detail_normal_02_reward_old_" + i).text("");
|
||||
$("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).text("");
|
||||
}
|
||||
|
||||
function eva_adjust_postponement_detail_normal_02_FeedDataToForm(data, i, blankItem) {
|
||||
@@ -42,6 +45,7 @@ function eva_adjust_postponement_detail_normal_02_FeedDataToForm(data, i, blankI
|
||||
$("#eva_adjust_postponement_detail_normal_02_promoted_percentage_" + i).val(data.promoted_percentage);
|
||||
$("#eva_adjust_postponement_detail_normal_02_total_promote_" + i).val(data.total_promote);
|
||||
$("#eva_adjust_postponement_detail_normal_02_new_sarary_" + i).text(formatNumber(data.new_sarary));
|
||||
|
||||
$("#eva_adjust_postponement_detail_normal_02_new_cost_living_" + i).val(data.new_cost_living);
|
||||
$("#eva_adjust_postponement_detail_normal_02_remark_" + i).text(data.remark);
|
||||
$("#eva_adjust_postponement_detail_normal_02_emp_code_" + i).text(data.emp_code);
|
||||
@@ -56,6 +60,18 @@ function eva_adjust_postponement_detail_normal_02_FeedDataToForm(data, i, blankI
|
||||
$("#eva_adjust_postponement_detail_normal_02_eva_result_" + i).text(data.eva_result);
|
||||
$("#eva_adjust_postponement_detail_normal_02_salary_max_" + i).text(data.salary_max);
|
||||
$("#eva_adjust_postponement_detail_normal_02_themax_" + i).text(data.themax);
|
||||
|
||||
$("#eva_adjust_postponement_detail_normal_02_reward_old_" + i).val(data.reward_old);
|
||||
$("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).val(data.reward_new);
|
||||
|
||||
if (data.new_sarary > data.themax) {
|
||||
$("#eva_adjust_postponement_detail_normal_02_reward_old_" + i).text(formatNumber2(data.new_sarary - data.themax, 3));
|
||||
} else {
|
||||
$("#eva_adjust_postponement_detail_normal_02_reward_old_" + i).text(formatNumber2(0, 3));
|
||||
}
|
||||
|
||||
$("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).text(formatNumber2(data.reward_new, 3));
|
||||
$("#themax_" + i).val(data.themax);
|
||||
}
|
||||
|
||||
function eva_adjust_postponement_detail_normal_02_GetFromForm(obj, i) {
|
||||
@@ -79,6 +95,10 @@ function eva_adjust_postponement_detail_normal_02_GetFromForm(obj, i) {
|
||||
eva_adjust_postponement_detail_normal_02Object.eva_result = obj.find("#eva_adjust_postponement_detail_normal_02_eva_result_" + i).text();
|
||||
|
||||
eva_adjust_postponement_detail_normal_02Object.active_mode = obj.find("#isActive_" + i + "_eva_adjust_postponement_detail_normal_02").val();
|
||||
|
||||
eva_adjust_postponement_detail_normal_02Object.reward_old = obj.find("#eva_adjust_postponement_detail_normal_02_reward_old_" + i).text();
|
||||
eva_adjust_postponement_detail_normal_02Object.reward_new = obj.find("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).text();
|
||||
|
||||
return eva_adjust_postponement_detail_normal_02Object;
|
||||
}
|
||||
|
||||
@@ -115,11 +135,11 @@ function eva_adjust_postponement_detail_normal_02_Get(a, blankItem) {
|
||||
|
||||
if (cur_dep !== data.emp_department_name) {
|
||||
cur_dep = data.emp_department_name;
|
||||
tag = "<tr><td colspan='17'><span>" + cur_dep + "</span></td></tr>";
|
||||
tag = "<tr><td colspan='19'><span>" + cur_dep + "</span></td></tr>";
|
||||
}
|
||||
|
||||
tag += '<tr>';
|
||||
tag += '<td><label id="rowCount">' + (i + 1) + '</label><input type="hidden" id="isActive_' + (i + 1) + '_eva_adjust_postponement_detail_normal_02" value="1" /><input class="form-control" type="hidden" id="eva_adjust_postponement_detail_normal_02_id_' + (i + 1) + '" /><input class="form-control" type="hidden" id="eva_adjust_postponement_detail_normal_02_adjust_postponement_id_' + (i + 1) + '" /><input class="form-control" type="hidden" id="eva_adjust_postponement_detail_normal_02_employee_id_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><label id="rowCount">' + (i + 1) + '</label><input type="hidden" id="isActive_' + (i + 1) + '_eva_adjust_postponement_detail_normal_02" value="1" /><input class="form-control" type="hidden" id="eva_adjust_postponement_detail_normal_02_id_' + (i + 1) + '" /><input class="form-control" type="hidden" id="eva_adjust_postponement_detail_normal_02_adjust_postponement_id_' + (i + 1) + '" /><input class="form-control" type="hidden" id="eva_adjust_postponement_detail_normal_02_employee_id_' + (i + 1) + '" /><input class="form-control" type="hidden" id="themax_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_emp_code_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_emp_fullname_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_emp_position_' + (i + 1) + '" /></td>';
|
||||
@@ -131,11 +151,15 @@ function eva_adjust_postponement_detail_normal_02_Get(a, blankItem) {
|
||||
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_eva_result_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_sarary_' + (i + 1) + '" /></td>';
|
||||
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_reward_old_' + (i + 1) + '" /></td>';
|
||||
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_cost_living_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_middle_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><input class="form-control" onchange="Oneva_adjust_postponement_detail_normal_02_promoted_percentageChanged(true)" type="number" id="eva_adjust_postponement_detail_normal_02_promoted_percentage_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><input disabled class="form-control" id="eva_adjust_postponement_detail_normal_02_total_promote_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_new_sarary_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_reward_new_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><input disabled class="form-control" id="eva_adjust_postponement_detail_normal_02_new_cost_living_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_normal_02_remark_' + (i + 1) + '" /><p style="display:none;" id="eva_adjust_postponement_detail_normal_02_salary_max_' + (i + 1) + '" /><p style="display:none;" id="eva_adjust_postponement_detail_normal_02_themax_' + (i + 1) + '" /></td>';
|
||||
tag += '</tr>';
|
||||
@@ -156,9 +180,11 @@ function eva_adjust_postponement_detail_normal_02_Get(a, blankItem) {
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td>' + formatNumber(data.position_allowance) + '</td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '</tr>';
|
||||
}
|
||||
|
||||
@@ -178,9 +204,11 @@ function eva_adjust_postponement_detail_normal_02_Get(a, blankItem) {
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td>' + formatNumber(data.other_money) + '</td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '</tr>';
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
function eva_adjust_postponement_detail_quota_02_ClearForm(i, blankItem) {
|
||||
var data = blankItem;
|
||||
|
||||
$("#eva_adjust_postponement_detail_quota_02_id_" + i).val("");
|
||||
$("#eva_adjust_postponement_detail_quota_02_adjust_postponement_quota_id_" + i).val("");
|
||||
$("#eva_adjust_postponement_detail_quota_02_employee_id_" + i).val("");
|
||||
@@ -19,10 +19,13 @@
|
||||
$("#eva_adjust_postponement_detail_quota_02_emp_level_" + i).text("");
|
||||
$("#eva_adjust_postponement_detail_quota_02_total_score_" + i).text("");
|
||||
$("#eva_adjust_postponement_detail_quota_02_eva_result_" + i).text("");
|
||||
|
||||
$("#eva_adjust_postponement_detail_quota_02_reward_old_" + i).text("");
|
||||
$("#eva_adjust_postponement_detail_quota_02_reward_new2_" + i).text("");
|
||||
$("#themax_" + i).val("");
|
||||
}
|
||||
|
||||
function eva_adjust_postponement_detail_quota_02_FeedDataToForm(data, i, blankItem) {
|
||||
|
||||
$("#eva_adjust_postponement_detail_quota_02_id_" + i).val(data.id);
|
||||
$("#eva_adjust_postponement_detail_quota_02_adjust_postponement_quota_id_" + i).val(data.adjust_postponement_quota_id);
|
||||
$("#eva_adjust_postponement_detail_quota_02_employee_id_" + i).val(data.employee_id);
|
||||
@@ -43,6 +46,14 @@ function eva_adjust_postponement_detail_quota_02_FeedDataToForm(data, i, blankIt
|
||||
$("#eva_adjust_postponement_detail_quota_02_total_score_" + i).text(data.total_score);
|
||||
$("#eva_adjust_postponement_detail_quota_02_eva_result_" + i).text(data.eva_result);
|
||||
|
||||
if (data.new_sarary > data.themax) {
|
||||
$("#eva_adjust_postponement_detail_quota_02_reward_old_" + i).text(formatNumber2(data.new_sarary - data.themax, 3));
|
||||
} else {
|
||||
$("#eva_adjust_postponement_detail_quota_02_reward_old_" + i).text(formatNumber2(0, 3));
|
||||
}
|
||||
|
||||
$("#eva_adjust_postponement_detail_quota_02_reward_new2_" + i).text(formatNumber2(data.reward_new2, 3));
|
||||
$("#themax_" + i).val(data.themax);
|
||||
}
|
||||
|
||||
function eva_adjust_postponement_detail_quota_02_GetFromForm(obj, i) {
|
||||
@@ -66,6 +77,8 @@ function eva_adjust_postponement_detail_quota_02_GetFromForm(obj, i) {
|
||||
eva_adjust_postponement_detail_quota_02Object.emp_level = obj.find("#eva_adjust_postponement_detail_quota_02_emp_level_" + i).text();
|
||||
eva_adjust_postponement_detail_quota_02Object.total_score = obj.find("#eva_adjust_postponement_detail_quota_02_total_score_" + i).text();
|
||||
eva_adjust_postponement_detail_quota_02Object.eva_result = obj.find("#eva_adjust_postponement_detail_quota_02_eva_result_" + i).text();
|
||||
eva_adjust_postponement_detail_quota_02Object.reward_old = obj.find("#eva_adjust_postponement_detail_quota_02_reward_old_" + i).text();
|
||||
eva_adjust_postponement_detail_quota_02Object.reward_new2 = obj.find("#eva_adjust_postponement_detail_quota_02_reward_new2_" + i).text();
|
||||
|
||||
eva_adjust_postponement_detail_quota_02Object.active_mode = obj.find("#isActive_" + i + "_eva_adjust_postponement_detail_quota_02").val();
|
||||
return eva_adjust_postponement_detail_quota_02Object;
|
||||
@@ -107,12 +120,12 @@ function eva_adjust_postponement_detail_quota_02_Get(a, blankItem) {
|
||||
|
||||
var tag = "";
|
||||
if (cur_dep !== data.emp_department_name) {
|
||||
tag += '<tr><td colspan="16">' + data.emp_department_name + '</td></tr>';
|
||||
tag += '<tr><td colspan="18">' + data.emp_department_name + '</td></tr>';
|
||||
cur_dep = data.emp_department_name;
|
||||
}
|
||||
|
||||
tag += '<tr>';
|
||||
tag += '<td><label id="rowCount">' + (i + 1) + '</label><input type="hidden" id="isActive_' + (i + 1) + '_eva_adjust_postponement_detail_quota_02" value="1" /><input class="form-control" type="hidden" id="eva_adjust_postponement_detail_quota_02_id_' + (i + 1) + '" /><input class="form-control" type="hidden" id="eva_adjust_postponement_detail_quota_02_adjust_postponement_quota_id_' + (i + 1) + '" /><input class="form-control" type="hidden" id="eva_adjust_postponement_detail_quota_02_employee_id_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><label id="rowCount">' + (i + 1) + '</label><input type="hidden" id="isActive_' + (i + 1) + '_eva_adjust_postponement_detail_quota_02" value="1" /><input class="form-control" type="hidden" id="eva_adjust_postponement_detail_quota_02_id_' + (i + 1) + '" /><input class="form-control" type="hidden" id="eva_adjust_postponement_detail_quota_02_adjust_postponement_quota_id_' + (i + 1) + '" /><input class="form-control" type="hidden" id="eva_adjust_postponement_detail_quota_02_employee_id_' + (i + 1) + '" /><input class="form-control" type="hidden" id="themax_' + (i + 1) + '" /></td>';
|
||||
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_emp_code_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_emp_fullname_' + (i + 1) + '" /></td>';
|
||||
@@ -120,6 +133,7 @@ function eva_adjust_postponement_detail_quota_02_Get(a, blankItem) {
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_emp_level_' + (i + 1) + '" /></td>';
|
||||
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_sarary_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_reward_old_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_cost_living_' + (i + 1) + '" /></td>';
|
||||
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_total_score_' + (i + 1) + '" /></td>';
|
||||
@@ -131,6 +145,7 @@ function eva_adjust_postponement_detail_quota_02_Get(a, blankItem) {
|
||||
|
||||
tag += '<td><input onchange="CalculateRemainQuota(false);" class="form-control" type="number" id="eva_adjust_postponement_detail_quota_02_receive_quota_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_new_sarary_with_quota_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_reward_new2_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><input class="form-control" type="number" id="eva_adjust_postponement_detail_quota_02_new_cost_living_' + (i + 1) + '" /></td>';
|
||||
tag += '<td><p id="eva_adjust_postponement_detail_quota_02_remark_' + (i + 1) + '" /></td>';
|
||||
|
||||
@@ -152,9 +167,11 @@ function eva_adjust_postponement_detail_quota_02_Get(a, blankItem) {
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td>' + formatNumber(data.position_allowance) + '</td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '</tr>';
|
||||
}
|
||||
|
||||
@@ -173,9 +190,11 @@ function eva_adjust_postponement_detail_quota_02_Get(a, blankItem) {
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td>' + formatNumber(data.other_money) + '</td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '<td></td>';
|
||||
tag += '</tr>';
|
||||
}
|
||||
|
||||
|
||||
@@ -192,7 +192,13 @@ function Oneva_adjust_postponement_detail_normal_02_promoted_percentageChanged(m
|
||||
} else {
|
||||
$("#eva_adjust_postponement_detail_normal_02_new_cost_living_" + i).val(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (new_salary > $("#themax_" + i).val()) {
|
||||
$("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).text(formatNumber2(new_salary - $("#themax_" + i).val(), 3));
|
||||
} else {
|
||||
$("#eva_adjust_postponement_detail_normal_02_reward_new_" + i).text(formatNumber2(0, 3));
|
||||
}
|
||||
|
||||
sum_postpone += new_added;
|
||||
sum_before += old_salary;
|
||||
|
||||
@@ -178,6 +178,12 @@ function CalculateRemainQuota(m) {
|
||||
}
|
||||
}
|
||||
|
||||
if (new_sarary_with_quota > $("#themax_" + i).val()) {
|
||||
$("#eva_adjust_postponement_detail_quota_02_reward_new2_" + i).text(formatNumber2(new_sarary_with_quota - $("#themax_" + i).val(), 3));
|
||||
} else {
|
||||
$("#eva_adjust_postponement_detail_quota_02_reward_new2_" + i).text(formatNumber2(0, 3));
|
||||
}
|
||||
|
||||
sum_receive_quota += receive_quota;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user