ปรับปรุงสิทธิการมองเห็นต่างๆ

This commit is contained in:
Nakorn Rientrakrunchai
2020-03-01 17:17:43 +07:00
parent c65c179e85
commit f8f46bb346
29 changed files with 448 additions and 696 deletions

View File

@@ -27,6 +27,7 @@ namespace TodoAPI2.Controllers
private ILogger<eva_create_evaluation_detail_processController> _logger; private ILogger<eva_create_evaluation_detail_processController> _logger;
private Ieva_create_evaluation_detail_processService _repository; private Ieva_create_evaluation_detail_processService _repository;
private IConfiguration Configuration { get; set; } private IConfiguration Configuration { get; set; }
private Iexternal_employeeService emp;
#endregion #endregion
#region Properties #region Properties
@@ -37,13 +38,17 @@ namespace TodoAPI2.Controllers
/// Default constructure for dependency injection /// Default constructure for dependency injection
/// </summary> /// </summary>
/// <param name="repository"></param> /// <param name="repository"></param>
/// <param name="configuration"></param> /// <param name="configuration"></param>
/// <param name="logger"></param> /// <param name="logger"></param>
public eva_create_evaluation_detail_processController(ILogger<eva_create_evaluation_detail_processController> logger, Ieva_create_evaluation_detail_processService repository, IConfiguration configuration) /// <param name="inemp"></param>
public eva_create_evaluation_detail_processController(ILogger<eva_create_evaluation_detail_processController> logger,
Iexternal_employeeService inemp,
Ieva_create_evaluation_detail_processService repository, IConfiguration configuration)
{ {
_logger = logger; _logger = logger;
_repository = repository; _repository = repository;
Configuration = configuration; Configuration = configuration;
emp = inemp;
} }
/// <summary> /// <summary>
@@ -64,9 +69,19 @@ namespace TodoAPI2.Controllers
try try
{ {
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
var result = _repository.GetWithSelection(id);
return Ok(result); if (!string.IsNullOrEmpty(HttpContext.Request.Cookies["user_id"]))
{
var loginid = Convert.ToInt32(HttpContext.Request.Cookies["user_id"]);
var e = emp.GetEmployeeForLogin(Convert.ToInt32(loginid));
var result = _repository.GetWithSelection(id, e.id);
return Ok(result);
}
else
{
return Unauthorized();
}
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -122,7 +137,17 @@ namespace TodoAPI2.Controllers
try try
{ {
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
return Ok(_repository.GetListBycreate_evaluation_id(create_evaluation_id));
if (!string.IsNullOrEmpty(HttpContext.Request.Cookies["user_id"]))
{
var loginid = Convert.ToInt32(HttpContext.Request.Cookies["user_id"]);
var e = emp.GetEmployeeForLogin(Convert.ToInt32(loginid));
return Ok(_repository.GetListBycreate_evaluation_id(create_evaluation_id, e.id));
}
else
{
return Unauthorized();
}
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -149,7 +174,17 @@ namespace TodoAPI2.Controllers
try try
{ {
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
return Ok(_repository.GetListBySearch(model));
if (!string.IsNullOrEmpty(HttpContext.Request.Cookies["user_id"]))
{
var loginid = Convert.ToInt32(HttpContext.Request.Cookies["user_id"]);
var e = emp.GetEmployeeForLogin(Convert.ToInt32(loginid));
return Ok(_repository.GetListBySearch(model, e.id));
}
else
{
return Unauthorized();
}
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@@ -12,10 +12,10 @@ namespace TodoAPI2.Models
{ {
public interface Ieva_create_evaluation_detail_processService public interface Ieva_create_evaluation_detail_processService
{ {
List<eva_create_evaluation_detail_processViewModel> GetListBycreate_evaluation_id(int? create_evaluation_id); List<eva_create_evaluation_detail_processViewModel> GetListBycreate_evaluation_id(int? create_evaluation_id, int? emp_id);
List<eva_create_evaluation_detail_processViewModel> GetListBySearch(eva_create_evaluation_detail_processSearchModel model); List<eva_create_evaluation_detail_processViewModel> GetListBySearch(eva_create_evaluation_detail_processSearchModel model, int? emp_id);
eva_create_evaluation_detail_processWithSelectionViewModel GetWithSelection(int id); eva_create_evaluation_detail_processWithSelectionViewModel GetWithSelection(int id, int? emp_id);
eva_create_evaluation_detail_processWithSelectionViewModel GetBlankItem(); eva_create_evaluation_detail_processWithSelectionViewModel GetBlankItem();

View File

@@ -56,7 +56,7 @@ namespace TodoAPI2.Models
#region Public Functions #region Public Functions
#region Query Functions #region Query Functions
public eva_create_evaluation_detail_processWithSelectionViewModel Get(int id) public eva_create_evaluation_detail_processWithSelectionViewModel Get(int id, int? emp_id)
{ {
var allemp = emp.GetListByemployee_type(null, null); var allemp = emp.GetListByemployee_type(null, null);
@@ -100,6 +100,22 @@ namespace TodoAPI2.Models
create_evaluation_score1 = fk_eva_create_evaluationResult10.score1, create_evaluation_score1 = fk_eva_create_evaluationResult10.score1,
create_evaluation_score2 = fk_eva_create_evaluationResult10.score2, create_evaluation_score2 = fk_eva_create_evaluationResult10.score2,
status_self = m_eva_create_evaluation_detail_process.status_self,
status_chief = m_eva_create_evaluation_detail_process.status_chief,
status_supervisor = m_eva_create_evaluation_detail_process.status_supervisor,
role_code = getRoleCode(emp_id, m_eva_create_evaluation_detail_process.chief,
m_eva_create_evaluation_detail_process.chief,
fk_eva_create_evaluationResult10.employee_id,
fk_eva_create_evaluationResult10.supervisor1_id,
fk_eva_create_evaluationResult10.supervisor2_id),
role_desc = getRoleName(emp_id, m_eva_create_evaluation_detail_process.chief,
m_eva_create_evaluation_detail_process.chief,
fk_eva_create_evaluationResult10.employee_id,
fk_eva_create_evaluationResult10.supervisor1_id,
fk_eva_create_evaluationResult10.supervisor2_id),
isActive = m_eva_create_evaluation_detail_process.isActive, isActive = m_eva_create_evaluation_detail_process.isActive,
Created = m_eva_create_evaluation_detail_process.created, Created = m_eva_create_evaluation_detail_process.created,
Updated = m_eva_create_evaluation_detail_process.updated Updated = m_eva_create_evaluation_detail_process.updated
@@ -108,9 +124,9 @@ namespace TodoAPI2.Models
return data[0]; return data[0];
} }
public eva_create_evaluation_detail_processWithSelectionViewModel GetWithSelection(int id) public eva_create_evaluation_detail_processWithSelectionViewModel GetWithSelection(int id, int? emp_id)
{ {
var item = Get(id); var item = Get(id, emp_id);
item.item_org_id = ext.GetDepartmentData(); item.item_org_id = ext.GetDepartmentData();
item.item_level_score = (from i in _repository.Context.eva_level_score item.item_level_score = (from i in _repository.Context.eva_level_score
orderby i.min_score orderby i.min_score
@@ -122,21 +138,21 @@ namespace TodoAPI2.Models
{ {
var i = new eva_create_evaluation_detail_processWithSelectionViewModel(); var i = new eva_create_evaluation_detail_processWithSelectionViewModel();
i.item_org_id = ext.GetDepartmentData(); i.item_org_id = ext.GetDepartmentData();
i.item_level_score = (from j in _repository.Context.eva_level_score //i.item_level_score = (from j in _repository.Context.eva_level_score
orderby j.min_score // orderby j.min_score
select Mapper.Map<eva_level_scoreViewModel>(i)).ToList(); // select Mapper.Map<eva_level_scoreViewModel>(i)).ToList();
return i; return i;
} }
public List<eva_create_evaluation_detail_processViewModel> GetListBycreate_evaluation_id(int? create_evaluation_id) public List<eva_create_evaluation_detail_processViewModel> GetListBycreate_evaluation_id(int? create_evaluation_id, int? emp_id)
{ {
var model = new eva_create_evaluation_detail_processSearchModel(); var model = new eva_create_evaluation_detail_processSearchModel();
model.create_evaluation_id = create_evaluation_id; model.create_evaluation_id = create_evaluation_id;
return GetListBySearch(model); return GetListBySearch(model, emp_id);
} }
public List<eva_create_evaluation_detail_processViewModel> GetListBySearch(eva_create_evaluation_detail_processSearchModel model) public List<eva_create_evaluation_detail_processViewModel> GetListBySearch(eva_create_evaluation_detail_processSearchModel model, int? emp_id)
{ {
var allemp = emp.GetListByemployee_type(null, null); var allemp = emp.GetListByemployee_type(null, null);
@@ -160,7 +176,13 @@ namespace TodoAPI2.Models
&& (fk_external_employee.department_id == model.org_id || !model.org_id.HasValue) && (fk_external_employee.department_id == model.org_id || !model.org_id.HasValue)
&& (fk_external_employee.employee_no == model.search_employee_code || string.IsNullOrEmpty(model.search_employee_code)) && (fk_external_employee.employee_no == model.search_employee_code || string.IsNullOrEmpty(model.search_employee_code))
&& (fk_external_employee.fullname.Contains(model.search_employee_fullname) || string.IsNullOrEmpty(model.search_employee_fullname)) && (fk_external_employee.fullname.Contains(model.search_employee_fullname) || string.IsNullOrEmpty(model.search_employee_fullname))
&& emp_id.HasValue
&& (
(m_eva_create_evaluation_detail_process.chief.HasValue && emp_id == m_eva_create_evaluation_detail_process.chief)
|| (fk_eva_create_evaluationResult10.employee_id.HasValue && emp_id == fk_eva_create_evaluationResult10.employee_id)
|| (fk_eva_create_evaluationResult10.supervisor1_id.HasValue && emp_id == fk_eva_create_evaluationResult10.supervisor1_id)
|| (fk_eva_create_evaluationResult10.supervisor2_id.HasValue && emp_id == fk_eva_create_evaluationResult10.supervisor2_id)
)
orderby m_eva_create_evaluation_detail_process.created descending orderby m_eva_create_evaluation_detail_process.created descending
select new eva_create_evaluation_detail_processViewModel() select new eva_create_evaluation_detail_processViewModel()
@@ -182,6 +204,22 @@ namespace TodoAPI2.Models
org_id_external_linkage_external_name = fk_external_employee.department_name, org_id_external_linkage_external_name = fk_external_employee.department_name,
status_self = m_eva_create_evaluation_detail_process.status_self,
status_chief = m_eva_create_evaluation_detail_process.status_chief,
status_supervisor = m_eva_create_evaluation_detail_process.status_supervisor,
role_code = getRoleCode(emp_id, m_eva_create_evaluation_detail_process.chief,
m_eva_create_evaluation_detail_process.chief,
fk_eva_create_evaluationResult10.employee_id,
fk_eva_create_evaluationResult10.supervisor1_id,
fk_eva_create_evaluationResult10.supervisor2_id),
role_desc = getRoleName(emp_id, m_eva_create_evaluation_detail_process.chief,
m_eva_create_evaluation_detail_process.chief,
fk_eva_create_evaluationResult10.employee_id,
fk_eva_create_evaluationResult10.supervisor1_id,
fk_eva_create_evaluationResult10.supervisor2_id),
isActive = m_eva_create_evaluation_detail_process.isActive, isActive = m_eva_create_evaluation_detail_process.isActive,
Created = m_eva_create_evaluation_detail_process.created, Created = m_eva_create_evaluation_detail_process.created,
Updated = m_eva_create_evaluation_detail_process.updated Updated = m_eva_create_evaluation_detail_process.updated
@@ -191,6 +229,26 @@ namespace TodoAPI2.Models
return data; return data;
} }
private string getRoleCode(int? emp_id, int? chief, int? supervisor1, int? supervisor2, int? supervisor1A, int? supervisor2A)
{
if (emp_id == chief) return "1";
else if (emp_id == supervisor1) return "1";
else if (emp_id == supervisor2) return "2";
else if (emp_id == supervisor1A) return "3";
else if (emp_id == supervisor2A) return "4";
return "";
}
private string getRoleName(int? emp_id, int? chief, int? supervisor1, int? supervisor2, int? supervisor1A, int? supervisor2A)
{
if (emp_id == chief) return "ผู้ประเมิน";
else if (emp_id == supervisor1) return "ผู้ประเมิน";
else if (emp_id == supervisor2) return "ผู้ประเมินสูสุด";
else if (emp_id == supervisor1A) return "ผู้บังคับบัญชาเหนือขึ้นไป";
else if (emp_id == supervisor2A) return "ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)";
return "";
}
#endregion #endregion

View File

@@ -43,5 +43,15 @@ namespace TodoAPI2.Models
public Guid? create_evaluation_id_eva_create_evaluation_performance_plan_id { get; set; } public Guid? create_evaluation_id_eva_create_evaluation_performance_plan_id { get; set; }
public string org_id_external_linkage_external_name { get; set; } public string org_id_external_linkage_external_name { get; set; }
public string status_self { get; set; }
public string status_chief { get; set; }
public string status_supervisor { get; set; }
public string role_desc { get; set; }
public string role_code { get; set; }
} }
} }

View File

@@ -157,6 +157,15 @@ namespace TodoAPI2.Models
var existingEntity = _repository.Get(id); var existingEntity = _repository.Get(id);
if (existingEntity != null) if (existingEntity != null)
{ {
var current_detail = (from k in _repository.Context.eva_create_evaluation_detail
where k.id == model.id
select k).FirstOrDefault();
if (current_detail.status_chief == "Y")
{
throw new Exception("ผู้ประเมิน ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
}
existingEntity.create_evaluation_id = model.create_evaluation_id; existingEntity.create_evaluation_id = model.create_evaluation_id;
existingEntity.supervisor1 = model.supervisor1; existingEntity.supervisor1 = model.supervisor1;
existingEntity.supervisor1_result = model.supervisor1_result; existingEntity.supervisor1_result = model.supervisor1_result;

View File

@@ -144,9 +144,7 @@ namespace TodoAPI2.Models
{ {
var entity = GetEntity(model); var entity = GetEntity(model);
entity.id = GetNewPrimaryKey(); entity.id = GetNewPrimaryKey();
var inserted = _repository.Insert(entity); var inserted = _repository.Insert(entity);
return Get(inserted.id); return Get(inserted.id);
@@ -157,6 +155,15 @@ namespace TodoAPI2.Models
var existingEntity = _repository.Get(id); var existingEntity = _repository.Get(id);
if (existingEntity != null) if (existingEntity != null)
{ {
var current_detail = (from k in _repository.Context.eva_create_evaluation_detail
where k.id == model.id
select k).FirstOrDefault();
if (current_detail.status_supervisor == "Y")
{
throw new Exception("ผู้ประเมินสูงสุด ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
}
existingEntity.create_evaluation_id = model.create_evaluation_id; existingEntity.create_evaluation_id = model.create_evaluation_id;
existingEntity.supervisor2 = model.supervisor2; existingEntity.supervisor2 = model.supervisor2;
existingEntity.supervisor2_result = model.supervisor2_result; existingEntity.supervisor2_result = model.supervisor2_result;

View File

@@ -157,6 +157,15 @@ namespace TodoAPI2.Models
throw new Exception("ไม่สามารถบันทึกค่าน้ำหนักในส่วนผลสัมฤทธิ์ของงาน ได้เกิน 100"); throw new Exception("ไม่สามารถบันทึกค่าน้ำหนักในส่วนผลสัมฤทธิ์ของงาน ได้เกิน 100");
} }
var current_detail = (from i in _repository.Context.eva_create_evaluation_detail
where i.id == model.create_evaluation_detail_id
select i).FirstOrDefault();
if(current_detail.status_self == "Y")
{
throw new Exception("คุณนำส่งข้อตกลงการประเมินไปแล้ว ไม่สามารถบันทึกได้");
}
if (!string.IsNullOrEmpty(model.thefile)) if (!string.IsNullOrEmpty(model.thefile))
{ {
//Move file from temp to physical //Move file from temp to physical
@@ -185,6 +194,15 @@ namespace TodoAPI2.Models
throw new Exception("ไม่สามารถบันทึกค่าน้ำหนักในส่วนผลสัมฤทธิ์ของงาน ได้เกิน 100"); throw new Exception("ไม่สามารถบันทึกค่าน้ำหนักในส่วนผลสัมฤทธิ์ของงาน ได้เกิน 100");
} }
var current_detail = (from i in _repository.Context.eva_create_evaluation_detail
where i.id == model.create_evaluation_detail_id
select i).FirstOrDefault();
if (current_detail.status_self == "Y")
{
throw new Exception("คุณนำส่งข้อตกลงการประเมินไปแล้ว ไม่สามารถบันทึกได้");
}
var existingEntity = _repository.Get(id); var existingEntity = _repository.Get(id);
if (existingEntity != null) if (existingEntity != null)
{ {
@@ -231,6 +249,15 @@ namespace TodoAPI2.Models
var existingEntity = _repository.Get(i.id.Value); var existingEntity = _repository.Get(i.id.Value);
if (existingEntity != null) if (existingEntity != null)
{ {
var current_detail = (from k in _repository.Context.eva_create_evaluation_detail
where k.id == existingEntity.create_evaluation_detail_id
select k).FirstOrDefault();
if (current_detail.status_self == "Y")
{
throw new Exception("ผู้รับการประเมิน ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
}
existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id; existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id;
existingEntity.achievement = i.achievement; existingEntity.achievement = i.achievement;
existingEntity.weight = i.weight; existingEntity.weight = i.weight;

View File

@@ -156,6 +156,15 @@ namespace TodoAPI2.Models
public eva_evaluation_achievement_processViewModel Update(int id, eva_evaluation_achievement_processInputModel model) public eva_evaluation_achievement_processViewModel Update(int id, eva_evaluation_achievement_processInputModel model)
{ {
var current_detail = (from i in _repository.Context.eva_create_evaluation_detail
where i.id == model.create_evaluation_detail_id
select i).FirstOrDefault();
if (current_detail.status_chief == "Y")
{
throw new Exception("ผู้ประเมิน ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
}
var existingEntity = _repository.Get(id); var existingEntity = _repository.Get(id);
if (existingEntity != null) if (existingEntity != null)
{ {
@@ -186,6 +195,16 @@ namespace TodoAPI2.Models
if (i.active_mode == "1" && i.id.HasValue) // update if (i.active_mode == "1" && i.id.HasValue) // update
{ {
var existingEntity = _repository.Get(i.id.Value); var existingEntity = _repository.Get(i.id.Value);
var current_detail = (from k in _repository.Context.eva_create_evaluation_detail
where k.id == existingEntity.create_evaluation_detail_id
select k).FirstOrDefault();
if (current_detail.status_chief == "Y")
{
throw new Exception("ผู้ประเมิน ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
}
if (existingEntity != null) if (existingEntity != null)
{ {
//existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id; //existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id;

View File

@@ -20,14 +20,14 @@ namespace TodoAPI2.Models
public class eva_evaluation_achievement_process2Service : Ieva_evaluation_achievement_process2Service public class eva_evaluation_achievement_process2Service : Ieva_evaluation_achievement_process2Service
{ {
private IBaseRepository2<eva_evaluation_achievementEntity, int> _repository; private IBaseRepository2<eva_evaluation_achievementEntity, int> _repository;
private IMyDatabase db; private IMyDatabase db;
private Iexternal_linkageService ext; private Iexternal_linkageService ext;
public eva_evaluation_achievement_process2Service(IBaseRepository2<eva_evaluation_achievementEntity, int> repository, IMyDatabase mydb, Iexternal_linkageService inext) public eva_evaluation_achievement_process2Service(IBaseRepository2<eva_evaluation_achievementEntity, int> repository, IMyDatabase mydb, Iexternal_linkageService inext)
{ {
_repository = repository; _repository = repository;
db = mydb; db = mydb;
ext = inext; ext = inext;
} }
#region Private Functions #region Private Functions
@@ -47,7 +47,7 @@ namespace TodoAPI2.Models
{ {
return Mapper.Map<List<eva_evaluation_achievement_process2ViewModel>>(entities); return Mapper.Map<List<eva_evaluation_achievement_process2ViewModel>>(entities);
} }
#endregion #endregion
#region Public Functions #region Public Functions
@@ -77,12 +77,12 @@ namespace TodoAPI2.Models
public List<eva_evaluation_achievement_process2ViewModel> GetListBycreate_evaluation_detail_id(int? create_evaluation_detail_id) public List<eva_evaluation_achievement_process2ViewModel> GetListBycreate_evaluation_detail_id(int? create_evaluation_detail_id)
{ {
var model = new eva_evaluation_achievement_process2SearchModel(); var model = new eva_evaluation_achievement_process2SearchModel();
model.create_evaluation_detail_id = create_evaluation_detail_id; model.create_evaluation_detail_id = create_evaluation_detail_id;
return GetListBySearch(model); return GetListBySearch(model);
} }
public List<eva_evaluation_achievement_process2ViewModel> GetListBySearch(eva_evaluation_achievement_process2SearchModel model) public List<eva_evaluation_achievement_process2ViewModel> GetListBySearch(eva_evaluation_achievement_process2SearchModel model)
{ {
var data = ( var data = (
from m_eva_evaluation_achievement_process2 in _repository.Context.eva_evaluation_achievement from m_eva_evaluation_achievement_process2 in _repository.Context.eva_evaluation_achievement
@@ -92,7 +92,7 @@ namespace TodoAPI2.Models
from fk_eva_create_evaluation_detailResult1 in eva_create_evaluation_detailResult1.DefaultIfEmpty() from fk_eva_create_evaluation_detailResult1 in eva_create_evaluation_detailResult1.DefaultIfEmpty()
where 1==1 where 1 == 1
//&& (m_eva_evaluation_achievement_process2.id == model.id || !model.id.HasValue) //&& (m_eva_evaluation_achievement_process2.id == model.id || !model.id.HasValue)
&& (m_eva_evaluation_achievement_process2.create_evaluation_detail_id == model.create_evaluation_detail_id || !model.create_evaluation_detail_id.HasValue) && (m_eva_evaluation_achievement_process2.create_evaluation_detail_id == model.create_evaluation_detail_id || !model.create_evaluation_detail_id.HasValue)
@@ -135,10 +135,10 @@ namespace TodoAPI2.Models
int? newkey = 0; int? newkey = 0;
var x = (from i in _repository.Context.eva_evaluation_achievement var x = (from i in _repository.Context.eva_evaluation_achievement
orderby i.id descending orderby i.id descending
select i).Take(1).ToList(); select i).Take(1).ToList();
if(x.Count > 0) if (x.Count > 0)
{ {
newkey = x[0].id + 1; newkey = x[0].id + 1;
} }
@@ -160,7 +160,7 @@ namespace TodoAPI2.Models
} }
var inserted = _repository.Insert(entity); var inserted = _repository.Insert(entity);
return Get(inserted.id); return Get(inserted.id);
} }
@@ -174,21 +174,21 @@ namespace TodoAPI2.Models
existingEntity.weight = model.weight; existingEntity.weight = model.weight;
if (!string.IsNullOrEmpty(model.thefile)) if (!string.IsNullOrEmpty(model.thefile))
{ {
if (model.thefile.StartsWith("Uploads")) if (model.thefile.StartsWith("Uploads"))
{ {
var thefileFileName = FileUtil.MoveTempUploadFileToActualPath( var thefileFileName = FileUtil.MoveTempUploadFileToActualPath(
model.thefile, FilePathConstant.DirType.FilesTestUpload, existingEntity.id, existingEntity.thefile); model.thefile, FilePathConstant.DirType.FilesTestUpload, existingEntity.id, existingEntity.thefile);
existingEntity.thefile = thefileFileName; existingEntity.thefile = thefileFileName;
} }
else else
{ {
existingEntity.thefile = model.thefile; existingEntity.thefile = model.thefile;
} }
}
else
{
existingEntity.thefile = null;
} }
else
{
existingEntity.thefile = null;
}
//existingEntity.score = model.score; //existingEntity.score = model.score;
existingEntity.score2 = model.score2; existingEntity.score2 = model.score2;
@@ -204,38 +204,48 @@ namespace TodoAPI2.Models
return Get(updated.id); return Get(updated.id);
} }
else else
throw new NotificationException("No data to update"); throw new NotificationException("No data to update");
} }
public string UpdateMultiple(List<eva_evaluation_achievement_process2InputModel> model) public string UpdateMultiple(List<eva_evaluation_achievement_process2InputModel> model)
{ {
foreach(var i in model) foreach (var i in model)
{ {
if (i.active_mode == "1" && i.id.HasValue) // update if (i.active_mode == "1" && i.id.HasValue) // update
{ {
var existingEntity = _repository.Get(i.id.Value); var existingEntity = _repository.Get(i.id.Value);
var current_detail = (from k in _repository.Context.eva_create_evaluation_detail
where k.id == existingEntity.create_evaluation_detail_id
select k).FirstOrDefault();
if (current_detail.status_supervisor == "Y")
{
throw new Exception("ผู้ประเมินสูงสุด ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
}
if (existingEntity != null) if (existingEntity != null)
{ {
existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id; existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id;
existingEntity.achievement = i.achievement; existingEntity.achievement = i.achievement;
existingEntity.weight = i.weight; existingEntity.weight = i.weight;
if (!string.IsNullOrEmpty(i.thefile)) if (!string.IsNullOrEmpty(i.thefile))
{ {
if (i.thefile.StartsWith("Uploads")) if (i.thefile.StartsWith("Uploads"))
{ {
var thefileFileName = FileUtil.MoveTempUploadFileToActualPath( var thefileFileName = FileUtil.MoveTempUploadFileToActualPath(
i.thefile, FilePathConstant.DirType.FilesTestUpload, existingEntity.id, existingEntity.thefile); i.thefile, FilePathConstant.DirType.FilesTestUpload, existingEntity.id, existingEntity.thefile);
existingEntity.thefile = thefileFileName; existingEntity.thefile = thefileFileName;
} }
else else
{ {
existingEntity.thefile = i.thefile; existingEntity.thefile = i.thefile;
} }
} }
else else
{ {
existingEntity.thefile = null; existingEntity.thefile = null;
} }
//existingEntity.score = i.score; //existingEntity.score = i.score;
existingEntity.score2 = i.score2; existingEntity.score2 = i.score2;
@@ -257,15 +267,15 @@ namespace TodoAPI2.Models
_repository.InsertWithoutCommit(entity); _repository.InsertWithoutCommit(entity);
} }
else if (i.active_mode == "0" && i.id.HasValue) // remove else if (i.active_mode == "0" && i.id.HasValue) // remove
{ {
_repository.DeleteWithoutCommit(i.id.Value); _repository.DeleteWithoutCommit(i.id.Value);
} }
else if (i.active_mode == "0" && !i.id.HasValue) else if (i.active_mode == "0" && !i.id.HasValue)
{ {
// nothing to do // nothing to do
} }
} }
_repository.Context.SaveChanges(); _repository.Context.SaveChanges();
return model.Count().ToString(); return model.Count().ToString();
} }

View File

@@ -20,14 +20,14 @@ namespace TodoAPI2.Models
public class eva_evaluation_behaviorService : Ieva_evaluation_behaviorService public class eva_evaluation_behaviorService : Ieva_evaluation_behaviorService
{ {
private IBaseRepository2<eva_evaluation_behaviorEntity, int> _repository; private IBaseRepository2<eva_evaluation_behaviorEntity, int> _repository;
private IMyDatabase db; private IMyDatabase db;
private Iexternal_linkageService ext; private Iexternal_linkageService ext;
public eva_evaluation_behaviorService(IBaseRepository2<eva_evaluation_behaviorEntity, int> repository, IMyDatabase mydb, Iexternal_linkageService inext) public eva_evaluation_behaviorService(IBaseRepository2<eva_evaluation_behaviorEntity, int> repository, IMyDatabase mydb, Iexternal_linkageService inext)
{ {
_repository = repository; _repository = repository;
db = mydb; db = mydb;
ext = inext; ext = inext;
} }
#region Private Functions #region Private Functions
@@ -47,7 +47,7 @@ namespace TodoAPI2.Models
{ {
return Mapper.Map<List<eva_evaluation_behaviorViewModel>>(entities); return Mapper.Map<List<eva_evaluation_behaviorViewModel>>(entities);
} }
#endregion #endregion
#region Public Functions #region Public Functions
@@ -77,12 +77,12 @@ namespace TodoAPI2.Models
public List<eva_evaluation_behaviorViewModel> GetListBycreate_evaluation_detail_id(int? create_evaluation_detail_id) public List<eva_evaluation_behaviorViewModel> GetListBycreate_evaluation_detail_id(int? create_evaluation_detail_id)
{ {
var model = new eva_evaluation_behaviorSearchModel(); var model = new eva_evaluation_behaviorSearchModel();
model.create_evaluation_detail_id = create_evaluation_detail_id; model.create_evaluation_detail_id = create_evaluation_detail_id;
return GetListBySearch(model); return GetListBySearch(model);
} }
public List<eva_evaluation_behaviorViewModel> GetListBySearch(eva_evaluation_behaviorSearchModel model) public List<eva_evaluation_behaviorViewModel> GetListBySearch(eva_evaluation_behaviorSearchModel model)
{ {
var data = ( var data = (
from m_eva_evaluation_behavior in _repository.Context.eva_evaluation_behavior from m_eva_evaluation_behavior in _repository.Context.eva_evaluation_behavior
@@ -92,7 +92,7 @@ namespace TodoAPI2.Models
from fk_eva_create_evaluation_detailResult1 in eva_create_evaluation_detailResult1.DefaultIfEmpty() from fk_eva_create_evaluation_detailResult1 in eva_create_evaluation_detailResult1.DefaultIfEmpty()
where 1==1 where 1 == 1
&& (m_eva_evaluation_behavior.create_evaluation_detail_id == model.create_evaluation_detail_id || !model.create_evaluation_detail_id.HasValue) && (m_eva_evaluation_behavior.create_evaluation_detail_id == model.create_evaluation_detail_id || !model.create_evaluation_detail_id.HasValue)
@@ -124,10 +124,10 @@ namespace TodoAPI2.Models
int? newkey = 0; int? newkey = 0;
var x = (from i in _repository.Context.eva_evaluation_behavior var x = (from i in _repository.Context.eva_evaluation_behavior
orderby i.id descending orderby i.id descending
select i).Take(1).ToList(); select i).Take(1).ToList();
if(x.Count > 0) if (x.Count > 0)
{ {
newkey = x[0].id + 1; newkey = x[0].id + 1;
} }
@@ -149,8 +149,17 @@ namespace TodoAPI2.Models
throw new Exception("ไม่สามารถบันทึกค่าน้ำหนักในส่วนผลสัมฤทธิ์ของงาน ได้เกิน 100"); throw new Exception("ไม่สามารถบันทึกค่าน้ำหนักในส่วนผลสัมฤทธิ์ของงาน ได้เกิน 100");
} }
var current_detail = (from i in _repository.Context.eva_create_evaluation_detail
where i.id == model.create_evaluation_detail_id
select i).FirstOrDefault();
if (current_detail.status_self == "Y")
{
throw new Exception("คุณนำส่งข้อตกลงการประเมินไปแล้ว ไม่สามารถบันทึกได้");
}
var inserted = _repository.Insert(entity); var inserted = _repository.Insert(entity);
return Get(inserted.id); return Get(inserted.id);
} }
@@ -169,6 +178,15 @@ namespace TodoAPI2.Models
throw new Exception("ไม่สามารถบันทึกค่าน้ำหนักในส่วนพฤติกรรมการปฏิบัติงาน ได้เกิน 100"); throw new Exception("ไม่สามารถบันทึกค่าน้ำหนักในส่วนพฤติกรรมการปฏิบัติงาน ได้เกิน 100");
} }
var current_detail = (from i in _repository.Context.eva_create_evaluation_detail
where i.id == model.create_evaluation_detail_id
select i).FirstOrDefault();
if (current_detail.status_self == "Y")
{
throw new Exception("คุณนำส่งข้อตกลงการประเมินไปแล้ว ไม่สามารถบันทึกได้");
}
var existingEntity = _repository.Get(id); var existingEntity = _repository.Get(id);
if (existingEntity != null) if (existingEntity != null)
{ {
@@ -181,21 +199,30 @@ namespace TodoAPI2.Models
return Get(updated.id); return Get(updated.id);
} }
else else
throw new NotificationException("No data to update"); throw new NotificationException("No data to update");
} }
public string UpdateMultiple(List<eva_evaluation_behaviorInputModel> model) public string UpdateMultiple(List<eva_evaluation_behaviorInputModel> model)
{ {
foreach(var i in model) foreach (var i in model)
{ {
if (i.active_mode == "1" && i.id.HasValue) // update if (i.active_mode == "1" && i.id.HasValue) // update
{ {
var existingEntity = _repository.Get(i.id.Value); var existingEntity = _repository.Get(i.id.Value);
if (existingEntity != null) if (existingEntity != null)
{ {
existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id; var current_detail = (from k in _repository.Context.eva_create_evaluation_detail
existingEntity.behavior = i.behavior; where k.id == existingEntity.create_evaluation_detail_id
existingEntity.weight = i.weight; select k).FirstOrDefault();
if (current_detail.status_self == "Y")
{
throw new Exception("ผู้รับการประเมิน ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
}
existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id;
existingEntity.behavior = i.behavior;
existingEntity.weight = i.weight;
_repository.UpdateWithoutCommit(i.id.Value, existingEntity); _repository.UpdateWithoutCommit(i.id.Value, existingEntity);
@@ -208,15 +235,15 @@ namespace TodoAPI2.Models
_repository.InsertWithoutCommit(entity); _repository.InsertWithoutCommit(entity);
} }
else if (i.active_mode == "0" && i.id.HasValue) // remove else if (i.active_mode == "0" && i.id.HasValue) // remove
{ {
_repository.DeleteWithoutCommit(i.id.Value); _repository.DeleteWithoutCommit(i.id.Value);
} }
else if (i.active_mode == "0" && !i.id.HasValue) else if (i.active_mode == "0" && !i.id.HasValue)
{ {
// nothing to do // nothing to do
} }
} }
_repository.Context.SaveChanges(); _repository.Context.SaveChanges();
return model.Count().ToString(); return model.Count().ToString();
} }

View File

@@ -193,6 +193,15 @@ namespace TodoAPI2.Models
var existingEntity = _repository.Get(i.id.Value); var existingEntity = _repository.Get(i.id.Value);
if (existingEntity != null) if (existingEntity != null)
{ {
var current_detail = (from k in _repository.Context.eva_create_evaluation_detail
where k.id == existingEntity.create_evaluation_detail_id
select k).FirstOrDefault();
if (current_detail.status_chief == "Y")
{
throw new Exception("ผู้ประเมิน ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
}
//existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id; //existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id;
//existingEntity.behavior = i.behavior; //existingEntity.behavior = i.behavior;
//existingEntity.weight = i.weight; //existingEntity.weight = i.weight;

View File

@@ -190,6 +190,15 @@ namespace TodoAPI2.Models
var existingEntity = _repository.Get(i.id.Value); var existingEntity = _repository.Get(i.id.Value);
if (existingEntity != null) if (existingEntity != null)
{ {
var current_detail = (from k in _repository.Context.eva_create_evaluation_detail
where k.id == existingEntity.create_evaluation_detail_id
select k).FirstOrDefault();
if (current_detail.status_supervisor == "Y")
{
throw new Exception("ผู้ประเมินสูงสุด ส่งแบบประเมินไปแล้ว บันทึกไม่ได้");
}
//existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id; //existingEntity.create_evaluation_detail_id = i.create_evaluation_detail_id;
//existingEntity.behavior = i.behavior; //existingEntity.behavior = i.behavior;
//existingEntity.weight = i.weight; //existingEntity.weight = i.weight;

View File

@@ -1,83 +0,0 @@
@{
Layout = "~/Views/Shared/_Layout.cshtml";
ViewData["Title"] = "eva_adjust_postponement_detail_normal_02";
}
<section class="wrapper">
<div class="row">
<div class="col-sm-12">
<section class="card">
<header class="card-header">
จัดการ eva_adjust_postponement_detail_normal_02
<span class="tools pull-right">
<a href="javascript:;" class="fa fa-chevron-down"></a>
</span>
</header>
<div class="card-body">
<div style="padding-bottom:20px">
<button type="button" class="btn btn-primary" onclick="javascript:eva_adjust_postponement_detail_normal_02_Add()">
<i class="fa fa-plus" style="color:white;"></i> เพิ่มรายการ
</button>
</div>
<table id="eva_adjust_postponement_detail_normal_02Table" class="display table table-bordered table-striped">
<thead>
<tr>
<th>ลำดับ</th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_id'>รหัสอ้างอิง</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_adjust_postponement_id'>รหัสอ้างอิงตาราง eva_adjust_postponement</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_employee_id'>ผู้รับการประเมิน</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_new_cost_living'>ค่าครองชีพใหม่</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_remark'>หมายเหตุ</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_emp_code'>รหัสพนักงาน</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_emp_fullname'>ชื่อ-นามสกุล</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_emp_position'>ตำแหน่ง</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_emp_level'>ระดับ</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_total_score'>คะแนนรวม</label></th>
<th><label id='h_eva_adjust_postponement_detail_normal_02_eva_result'>ผลการประเมิน</label></th>
<th>กิจกรรม</th>
</tr>
</thead>
<tbody class="thin-border-bottom" id="eva_adjust_postponement_detail_normal_02Body"></tbody>
</table>
<div style="text-align:right; padding-bottom:20px">
<label id="score_label">Total Score: 0</label>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">ยกเลิก</button>
<button type="button" class="btn btn-primary" onclick="javascript:eva_adjust_postponement_detail_normal_02_Save(getUrlParameter('id'))">บันทึก</button>
</div>
</div>
</section>
</div>
</div>
</section>
@section FooterPlaceHolder{
<script src="~/js/eva_adjust_postponement_detail_normal_02/eva_adjust_postponement_detail_normal_02_inline.js"></script>
<script>
$(document).ready(function () {
//var id = getUrlParameter("id");
//if (id) {
// eva_adjust_postponement_detail_normal_02_InitialForm(id);
//}
eva_adjust_postponement_detail_normal_02_InitialForm('');
});
$(document).on("change", ".input_score", function () {
eva_adjust_postponement_detail_normal_02_Summary();
});
</script>
}

View File

@@ -1,85 +0,0 @@
@{
Layout = "~/Views/Shared/_Layout.cshtml";
ViewData["Title"] = "eva_adjust_postponement_detail_quota_02";
}
<section class="wrapper">
<div class="row">
<div class="col-sm-12">
<section class="card">
<header class="card-header">
จัดการ eva_adjust_postponement_detail_quota_02
<span class="tools pull-right">
<a href="javascript:;" class="fa fa-chevron-down"></a>
</span>
</header>
<div class="card-body">
<div style="padding-bottom:20px">
<button type="button" class="btn btn-primary" onclick="javascript:eva_adjust_postponement_detail_quota_02_Add()">
<i class="fa fa-plus" style="color:white;"></i> เพิ่มรายการ
</button>
</div>
<table id="eva_adjust_postponement_detail_quota_02Table" class="display table table-bordered table-striped">
<thead>
<tr>
<th>ลำดับ</th>
<th><label id='h_eva_adjust_postponement_detail_quota_02_id'>รหัสอ้างอิง</label></th>
<th><label id='h_eva_adjust_postponement_detail_quota_02_adjust_postponement_quota_id'>รหัสอ้างอิงตาราง eva_adjust_postponement</label></th>
<th><label id='h_eva_adjust_postponement_detail_quota_02_employee_id'>ผู้รับการประเมิน</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_cost_living'>ค่าครองชีพ ก่อนปรับเลื่อน</label></th>
<th><label id='h_eva_adjust_postponement_detail_quota_02_middle'>ค่ากลางฐานในการคำนวณ</label></th>
<th><label id='h_eva_adjust_postponement_detail_quota_02_promoted_percentage'>ร้อยละที่ได้เลื่อน</label></th>
<th><label id='h_eva_adjust_postponement_detail_quota_02_total_promote'>จำนวนเงินที่ได้เลื่อน</label></th>
<th><label id='h_eva_adjust_postponement_detail_quota_02_new_sarary'>เงินเดือนใหม่</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>
<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_emp_code'>รหัสพนักงาน</label></th>
<th><label id='h_eva_adjust_postponement_detail_quota_02_emp_fullname'>ชื่อ-นามสกุล</label></th>
<th><label id='h_eva_adjust_postponement_detail_quota_02_emp_position'>ตำแหน่ง</label></th>
<th><label id='h_eva_adjust_postponement_detail_quota_02_emp_level'>ระดับ</label></th>
<th><label id='h_eva_adjust_postponement_detail_quota_02_total_score'>คะแนนรวม</label></th>
<th><label id='h_eva_adjust_postponement_detail_quota_02_eva_result'>ผลการประเมิน</label></th>
<th>กิจกรรม</th>
</tr>
</thead>
<tbody class="thin-border-bottom" id="eva_adjust_postponement_detail_quota_02Body"></tbody>
</table>
<div style="text-align:right; padding-bottom:20px">
<label id="score_label">Total Score: 0</label>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">ยกเลิก</button>
<button type="button" class="btn btn-primary" onclick="javascript:eva_adjust_postponement_detail_quota_02_Save(getUrlParameter('id'))">บันทึก</button>
</div>
</div>
</section>
</div>
</div>
</section>
@section FooterPlaceHolder{
<script src="~/js/eva_adjust_postponement_detail_quota_02/eva_adjust_postponement_detail_quota_02_inline.js"></script>
<script>
$(document).ready(function () {
//var id = getUrlParameter("id");
//if (id) {
// eva_adjust_postponement_detail_quota_02_InitialForm(id);
//}
eva_adjust_postponement_detail_quota_02_InitialForm('');
});
$(document).on("change", ".input_score", function () {
eva_adjust_postponement_detail_quota_02_Summary();
});
</script>
}

View File

@@ -262,11 +262,30 @@
</table> </table>
</section> </section>
<br />
<section class="wrapper">
<div class="title col-md-12"><div class="line"></div>ส่งข้อตกลงการประเมิน</div>
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_status_id" />
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_status_create_evaluation_id" />
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_status_status_self" />
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_status_status_chief" />
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_status_status_supervisor" />
<div class="row">
<div class="form-group col-md-12">
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('next0')">ส่งข้อตกลงการประเมิน</button>
</div>
</div>
</section>
@section FooterPlaceHolder{ @section FooterPlaceHolder{
<script src="~/js/eva_create_evaluation_detail_agreement/eva_create_evaluation_detail_agreement_d.js"></script> <script src="~/js/eva_create_evaluation_detail_agreement/eva_create_evaluation_detail_agreement_d.js"></script>
<script src="~/js/eva_evaluation_achievement/eva_evaluation_achievement.js"></script> <script src="~/js/eva_evaluation_achievement/eva_evaluation_achievement.js"></script>
<script src="~/js/eva_evaluation_behavior/eva_evaluation_behavior.js"></script> <script src="~/js/eva_evaluation_behavior/eva_evaluation_behavior.js"></script>
<script src="~/js/eva_create_evaluation_detail_status/eva_create_evaluation_detail_status_d.js"></script>
<script> <script>
$(document).ready(function () { $(document).ready(function () {
var id = getUrlParameter("id"); var id = getUrlParameter("id");
@@ -276,6 +295,7 @@
eva_evaluation_achievement_InitialForm(); eva_evaluation_achievement_InitialForm();
eva_evaluation_behavior_InitiateDataTable(id); eva_evaluation_behavior_InitiateDataTable(id);
eva_evaluation_behavior_InitialForm(); eva_evaluation_behavior_InitialForm();
eva_create_evaluation_detail_status_SetEditForm(id);
} else { } else {
eva_create_evaluation_detail_agreement_SetCreateForm(); eva_create_evaluation_detail_agreement_SetCreateForm();
} }

View File

@@ -58,7 +58,8 @@
<th><label id='h_eva_create_evaluation_detail_process_employee_position'>ตำแหน่ง</label></th> <th><label id='h_eva_create_evaluation_detail_process_employee_position'>ตำแหน่ง</label></th>
<th><label id='h_eva_create_evaluation_detail_process_employee_position_level'>ระดับตำแหน่ง</label></th> <th><label id='h_eva_create_evaluation_detail_process_employee_position_level'>ระดับตำแหน่ง</label></th>
<th><label id='h_eva_create_evaluation_detail_process_employee_org'>หน่วยงาน</label></th> <th><label id='h_eva_create_evaluation_detail_process_employee_org'>หน่วยงาน</label></th>
<th><label id='h_role_desc'>หน้าที่ของคุณ</label></th>
<th><label>ผู้รับการประเมิน<br/>ส่งแบบประเมินแล้ว</label></th>
<th><label>สถานะทำแบบประเมิน<br />(ผู้ประเมิน)</label></th> <th><label>สถานะทำแบบประเมิน<br />(ผู้ประเมิน)</label></th>
<th><label>สถานะทำแบบประเมิน<br />(ผู้ประเมินสูงสุด)</label></th> <th><label>สถานะทำแบบประเมิน<br />(ผู้ประเมินสูงสุด)</label></th>

View File

@@ -21,7 +21,7 @@
</div> </div>
<section class="wrapper"> <section class="wrapper">
<div class="title col-md-12"><div class="line"></div>ประเมินผลเพื่อปรับเลื่อนเงินเดือน</div> <div class="title col-md-12"><div class="line"></div>ประเมินผลเพื่อปรับเลื่อนเงินเดือน <span style="color:red;" id="thestatus"></span></div>
<section class="card no-border"> <section class="card no-border">
<div class="card-body" style=""> <div class="card-body" style="">
@@ -146,7 +146,7 @@
<div class="row"> <div class="row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<button type="button" class="btn btn-primary" onclick="javascript:eva_evaluation_achievement_process_Save(getUrlParameter('id'))">บันทึก</button> <button id="btn01" type="button" class="btn btn-primary" onclick="javascript:eva_evaluation_achievement_process_Save(getUrlParameter('id'))">บันทึก</button>
</div> </div>
</div> </div>
@@ -196,7 +196,7 @@
<div class="row"> <div class="row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<button type="button" class="btn btn-primary" onclick="javascript:eva_evaluation_behavior_process_Save(getUrlParameter('id'))">บันทึก</button> <button id="btn02" type="button" class="btn btn-primary" onclick="javascript:eva_evaluation_behavior_process_Save(getUrlParameter('id'))">บันทึก</button>
</div> </div>
</div> </div>
@@ -250,7 +250,7 @@
<div class="row"> <div class="row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_summary1_PutUpdate()">บันทึก</button> <button id="btn03" type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_summary1_PutUpdate()">บันทึก</button>
</div> </div>
</div> </div>
@@ -296,11 +296,11 @@
<div class="row"> <div class="row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review01_PutUpdate()">บันทึก</button> <button id="btna01" type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review01_PutUpdate()">บันทึก</button>
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('next1')">ส่งแบบประเมิน</button> <button id="btna02" type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('next1')">ส่งแบบประเมิน</button>
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('back1')">ตีกลับแบบประเมิน</button> <button id="btna03" type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('back1')">ตีกลับแบบประเมิน</button>
</div> </div>
</div> </div>

View File

@@ -21,7 +21,7 @@
</div> </div>
<section class="wrapper"> <section class="wrapper">
<div class="title col-md-12"><div class="line"></div>ประเมินผลเพื่อปรับเลื่อนเงินเดือน</div> <div class="title col-md-12"><div class="line"></div>ประเมินผลเพื่อปรับเลื่อนเงินเดือน <span style="color:red;" id="thestatus"></span></div>
<section class="card no-border"> <section class="card no-border">
<div class="card-body" style=""> <div class="card-body" style="">
@@ -147,7 +147,7 @@
<div class="row"> <div class="row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<button type="button" class="btn btn-primary" onclick="javascript:eva_evaluation_achievement_process2_Save(getUrlParameter('id'))">บันทึก</button> <button id="btn01" type="button" class="btn btn-primary" onclick="javascript:eva_evaluation_achievement_process2_Save(getUrlParameter('id'))">บันทึก</button>
</div> </div>
</div> </div>
@@ -198,7 +198,7 @@
<div class="row"> <div class="row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<button type="button" class="btn btn-primary" onclick="javascript:eva_evaluation_behavior_process2_Save(getUrlParameter('id'))">บันทึก</button> <button id="btn02" type="button" class="btn btn-primary" onclick="javascript:eva_evaluation_behavior_process2_Save(getUrlParameter('id'))">บันทึก</button>
</div> </div>
</div> </div>
@@ -252,7 +252,7 @@
<div class="row"> <div class="row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_summary2_PutUpdate()">บันทึก</button> <button id="btn03" type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_summary2_PutUpdate()">บันทึก</button>
</div> </div>
</div> </div>
@@ -337,11 +337,11 @@
<div class="row"> <div class="row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review02_PutUpdate()">บันทึก</button> <button id="btnb01" type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review02_PutUpdate()">บันทึก</button>
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('next2')">ส่งแบบประเมิน</button> <button id="btnb02" type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('next2')">ส่งแบบประเมิน</button>
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('back2')">ตีกลับแบบประเมิน</button> <button id="btnb03" type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('back2')">ตีกลับแบบประเมิน</button>
</div> </div>
</div> </div>
</section> </section>
@@ -388,7 +388,7 @@
<div class="row"> <div class="row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review03_PutUpdate()">บันทึก</button> <button id="btnc01" type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review03_PutUpdate()">บันทึก</button>
</div> </div>
</div> </div>
</section> </section>
@@ -432,7 +432,7 @@
<div class="row"> <div class="row">
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review04_PutUpdate()">บันทึก</button> <button id="btnd01" type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review04_PutUpdate()">บันทึก</button>
</div> </div>
</div> </div>

View File

@@ -1,94 +0,0 @@
@using Microsoft.Extensions.Configuration
@inject IConfiguration Configuration
@{
ViewData["Title"] = "eva_create_evaluation_detail_review01";
Layout = "_LayoutDirect";
}
<div class="row page-title">
<div class="col-md-5">
<div class="page-title">
@Configuration["SiteInformation:modulename"]
</div>
</div>
<div class="col-md-7">
<ol class="breadcrumb" style="">
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]">หน้าแรก</a></li>
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]@Configuration["SiteInformation:appsite"]">@Configuration["SiteInformation:modulename"]</a></li>
<li class="breadcrumb-item active">eva_create_evaluation_detail_review01</li>
</ol>
</div>
</div>
<section class="wrapper">
<div class="title col-md-12"><div class="line"></div>บันทึกข้อมูล eva_create_evaluation_detail_review01</div>
<section class="card no-border">
<header class="card-header">
กรุณากรอกข้อมูลลงในแบบฟอร์ม
</header>
<div class="card-body" style="">
<div class="row">
<div class="col-md-12">
<div class='row'></div>
<div class='row'>
<div class="form-group col-md-6">
<label id="lab_eva_create_evaluation_detail_review01_supervisor1" for="eva_create_evaluation_detail_review01_supervisor1">ผู้ประเมิน</label>
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review01_supervisor1" />
</div>
<div class="form-group col-md-6">
<label id="lab_eva_create_evaluation_detail_review01_create_evaluation_id" for="eva_create_evaluation_detail_review01_create_evaluation_id">แบบประเมิน</label>
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review01_create_evaluation_id" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-6">
<label id="lab_eva_create_evaluation_detail_review01_supervisor1_result" for="eva_create_evaluation_detail_review01_supervisor1_result">ผลการประเมิน</label>
<select class="form-control" id="eva_create_evaluation_detail_review01_supervisor1_result" iLabel="ผลการประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review01"></select>
</div>
<div class="form-group col-md-6">
<label id="lab_eva_create_evaluation_detail_review01_supervisor1_date" for="eva_create_evaluation_detail_review01_supervisor1_date">วันที่ประเมิน</label>
<input class="form-control" type="text" id="eva_create_evaluation_detail_review01_supervisor1_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review01" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-12">
<label id="lab_eva_create_evaluation_detail_review01_supervisor1_remark" for="eva_create_evaluation_detail_review01_supervisor1_remark">ความเห็นผู้ประเมิน</label>
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review01_supervisor1_remark" iLabel="ความเห็นผู้ประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review01"></textarea>
</div>
</div>
</div>
</div>
</div>
</section>
<div class="row">
<div class="form-group col-md-12">
<button type="button" class="btn btn-outline" onclick="javascript:window_close()" style="background-color: #fff;">ยกเลิก</button>
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review01_PutUpdate()">บันทึก</button>
</div>
</div>
</section>
@section FooterPlaceHolder{
<script src="~/js/eva_create_evaluation_detail_review01/eva_create_evaluation_detail_review01_d.js"></script>
<script>
$(document).ready(function () {
var id = getUrlParameter("id");
if (id) {
eva_create_evaluation_detail_review01_SetEditForm(id);
} else {
eva_create_evaluation_detail_review01_SetCreateForm();
}
SetupValidationRemark("eva_create_evaluation_detail_review01");
});
</script>
}

View File

@@ -1,99 +0,0 @@
@using Microsoft.Extensions.Configuration
@inject IConfiguration Configuration
@{
ViewData["Title"] = "eva_create_evaluation_detail_review02";
Layout = "_LayoutDirect";
}
<div class="row page-title">
<div class="col-md-5">
<div class="page-title">
@Configuration["SiteInformation:modulename"]
</div>
</div>
<div class="col-md-7">
<ol class="breadcrumb" style="">
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]">หน้าแรก</a></li>
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]@Configuration["SiteInformation:appsite"]">@Configuration["SiteInformation:modulename"]</a></li>
<li class="breadcrumb-item active">eva_create_evaluation_detail_review02</li>
</ol>
</div>
</div>
<section class="wrapper">
<div class="title col-md-12"><div class="line"></div>บันทึกข้อมูล eva_create_evaluation_detail_review02</div>
<section class="card no-border">
<header class="card-header">
กรุณากรอกข้อมูลลงในแบบฟอร์ม
</header>
<div class="card-body" style="">
<div class="row">
<div class="col-md-12">
<div class='row'></div>
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_review02_id" for="eva_create_evaluation_detail_review02_id">รหัสอ้างอิง</label>
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review02_id" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_review02_create_evaluation_id" for="eva_create_evaluation_detail_review02_create_evaluation_id">แบบประเมิน</label>
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review02_create_evaluation_id" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_review02_supervisor2" for="eva_create_evaluation_detail_review02_supervisor2">ผู้ประเมินสูงสุด</label>
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review02_supervisor2" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-6">
<label id="lab_eva_create_evaluation_detail_review02_supervisor2_result" for="eva_create_evaluation_detail_review02_supervisor2_result">ผลการประเมิน</label>
<select class="form-control" id="eva_create_evaluation_detail_review02_supervisor2_result" iLabel="ผลการประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review02"></select>
</div>
<div class="form-group col-md-6">
<label id="lab_eva_create_evaluation_detail_review02_supervisor2_date" for="eva_create_evaluation_detail_review02_supervisor2_date">วันที่ประเมิน</label>
<input class="form-control" type="text" id="eva_create_evaluation_detail_review02_supervisor2_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review02" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-12">
<label id="lab_eva_create_evaluation_detail_review02_supervisor2_remark" for="eva_create_evaluation_detail_review02_supervisor2_remark">ความเห็นผู้ประเมินสูงสุด</label>
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review02_supervisor2_remark" iLabel="ความเห็นผู้ประเมินสูงสุด" iRequire="true" iGroup="eva_create_evaluation_detail_review02"></textarea>
</div>
</div>
</div>
</div>
</div>
</section>
<div class="row">
<div class="form-group col-md-12">
<button type="button" class="btn btn-outline" onclick="javascript:window_close()" style="background-color: #fff;">ยกเลิก</button>
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review02_PutUpdate()">บันทึก</button>
</div>
</div>
</section>
@section FooterPlaceHolder{
<script src="~/js/eva_create_evaluation_detail_review02/eva_create_evaluation_detail_review02_d.js"></script>
<script>
$(document).ready(function () {
var id = getUrlParameter("id");
if (id) {
eva_create_evaluation_detail_review02_SetEditForm(id);
} else {
eva_create_evaluation_detail_review02_SetCreateForm();
}
SetupValidationRemark("eva_create_evaluation_detail_review02");
});
</script>
}

View File

@@ -1,99 +0,0 @@
@using Microsoft.Extensions.Configuration
@inject IConfiguration Configuration
@{
ViewData["Title"] = "eva_create_evaluation_detail_review03";
Layout = "_LayoutDirect";
}
<div class="row page-title">
<div class="col-md-5">
<div class="page-title">
@Configuration["SiteInformation:modulename"]
</div>
</div>
<div class="col-md-7">
<ol class="breadcrumb" style="">
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]">หน้าแรก</a></li>
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]@Configuration["SiteInformation:appsite"]">@Configuration["SiteInformation:modulename"]</a></li>
<li class="breadcrumb-item active">eva_create_evaluation_detail_review03</li>
</ol>
</div>
</div>
<section class="wrapper">
<div class="title col-md-12"><div class="line"></div>บันทึกข้อมูล eva_create_evaluation_detail_review03</div>
<section class="card no-border">
<header class="card-header">
กรุณากรอกข้อมูลลงในแบบฟอร์ม
</header>
<div class="card-body" style="">
<div class="row">
<div class="col-md-12">
<div class='row'></div>
<div class='row'>
<div class="form-group col-md-6">
<label id="lab_eva_create_evaluation_detail_review03_supervisor1A" for="eva_create_evaluation_detail_review03_supervisor1A">ผู้บังคับบัญชาเหนือขึ้นไป</label>
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review03_supervisor1A" />
</div>
<div class="form-group col-md-6">
<label id="lab_eva_create_evaluation_detail_review03_create_evaluation_id" for="eva_create_evaluation_detail_review03_create_evaluation_id">แบบประเมิน</label>
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review03_create_evaluation_id" />
</div>
<div class="form-group col-md-6">
<label id="lab_eva_create_evaluation_detail_review03_id" for="eva_create_evaluation_detail_review03_id">รหัสอ้างอิง</label>
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review03_id" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-6">
<label id="lab_eva_create_evaluation_detail_review03_supervisor1A_result" for="eva_create_evaluation_detail_review03_supervisor1A_result">ผลการประเมิน</label>
<select class="form-control" id="eva_create_evaluation_detail_review03_supervisor1A_result" iLabel="ผลการประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review03" ></select>
</div>
<div class="form-group col-md-6">
<label id="lab_eva_create_evaluation_detail_review03_supervisor1A_date" for="eva_create_evaluation_detail_review03_supervisor1A_date">วันที่ประเมิน</label>
<input class="form-control" type="text" id="eva_create_evaluation_detail_review03_supervisor1A_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review03" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-12">
<label id="lab_eva_create_evaluation_detail_review03_supervisor1A_remark" for="eva_create_evaluation_detail_review03_supervisor1A_remark">ความเห็นผู้ประเมิน</label>
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review03_supervisor1A_remark" iLabel="ความเห็นผู้ประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review03" ></textarea>
</div>
</div>
</div>
</div>
</div>
</section>
<div class="row">
<div class="form-group col-md-12">
<button type="button" class="btn btn-outline" onclick="javascript:window_close()" style="background-color: #fff;">ยกเลิก</button>
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review03_PutUpdate()">บันทึก</button>
</div>
</div>
</section>
@section FooterPlaceHolder{
<script src="~/js/eva_create_evaluation_detail_review03/eva_create_evaluation_detail_review03_d.js"></script>
<script>
$(document).ready(function () {
var id = getUrlParameter("id");
if (id) {
eva_create_evaluation_detail_review03_SetEditForm(id);
} else {
eva_create_evaluation_detail_review03_SetCreateForm();
}
SetupValidationRemark("eva_create_evaluation_detail_review03");
});
</script>
}

View File

@@ -1,99 +0,0 @@
@using Microsoft.Extensions.Configuration
@inject IConfiguration Configuration
@{
ViewData["Title"] = "eva_create_evaluation_detail_review04";
Layout = "_LayoutDirect";
}
<div class="row page-title">
<div class="col-md-5">
<div class="page-title">
@Configuration["SiteInformation:modulename"]
</div>
</div>
<div class="col-md-7">
<ol class="breadcrumb" style="">
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]">หน้าแรก</a></li>
<li class="breadcrumb-item "><a href="@Configuration["SiteInformation:mainsite"]@Configuration["SiteInformation:appsite"]">@Configuration["SiteInformation:modulename"]</a></li>
<li class="breadcrumb-item active">eva_create_evaluation_detail_review04</li>
</ol>
</div>
</div>
<section class="wrapper">
<div class="title col-md-12"><div class="line"></div>บันทึกข้อมูล eva_create_evaluation_detail_review04</div>
<section class="card no-border">
<header class="card-header">
กรุณากรอกข้อมูลลงในแบบฟอร์ม
</header>
<div class="card-body" style="">
<div class="row">
<div class="col-md-12">
<div class='row'></div>
<div class='row'>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_review04_id" for="eva_create_evaluation_detail_review04_id">รหัสอ้างอิง</label>
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review04_id" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_review04_create_evaluation_id" for="eva_create_evaluation_detail_review04_create_evaluation_id">แบบประเมิน</label>
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review04_create_evaluation_id" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_review04_supervisor2A" for="eva_create_evaluation_detail_review04_supervisor2A">ผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง (สูงสุด)</label>
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review04_supervisor2A" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-6">
<label id="lab_eva_create_evaluation_detail_review04_supervisor2A_result" for="eva_create_evaluation_detail_review04_supervisor2A_result">ผลการประเมิน</label>
<select class="form-control" id="eva_create_evaluation_detail_review04_supervisor2A_result" iLabel="ผลการประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review04" ></select>
</div>
<div class="form-group col-md-6">
<label id="lab_eva_create_evaluation_detail_review04_supervisor2A_date" for="eva_create_evaluation_detail_review04_supervisor2A_date">วันที่ประเมิน</label>
<input class="form-control" type="text" id="eva_create_evaluation_detail_review04_supervisor2A_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review04" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-12">
<label id="lab_eva_create_evaluation_detail_review04_supervisor2A_remark" for="eva_create_evaluation_detail_review04_supervisor2A_remark">ความเห็นผู้ประเมินสูงสุด</label>
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review04_supervisor2A_remark" iLabel="ความเห็นผู้ประเมินสูงสุด" iRequire="true" iGroup="eva_create_evaluation_detail_review04" ></textarea>
</div>
</div>
</div>
</div>
</div>
</section>
<div class="row">
<div class="form-group col-md-12">
<button type="button" class="btn btn-outline" onclick="javascript:window_close()" style="background-color: #fff;">ยกเลิก</button>
<button type="button" class="btn btn-submit" onclick="javascript:eva_create_evaluation_detail_review04_PutUpdate()">บันทึก</button>
</div>
</div>
</section>
@section FooterPlaceHolder{
<script src="~/js/eva_create_evaluation_detail_review04/eva_create_evaluation_detail_review04_d.js"></script>
<script>
$(document).ready(function () {
var id = getUrlParameter("id");
if (id) {
eva_create_evaluation_detail_review04_SetEditForm(id);
} else {
eva_create_evaluation_detail_review04_SetCreateForm();
}
SetupValidationRemark("eva_create_evaluation_detail_review04");
});
</script>
}

View File

@@ -137,9 +137,9 @@
<th><label id='h_eva_promoted_percentage_code'>รหัสร้อยละที่ได้เลื่อน</label></th> <th><label id='h_eva_promoted_percentage_code'>รหัสร้อยละที่ได้เลื่อน</label></th>
<th><label id='h_eva_promoted_percentage_detail'>ระดับผลการประเมิน</label></th> <th><label id='h_eva_promoted_percentage_detail'>ระดับผลการประเมิน</label></th>
<th><label id='h_eva_promoted_percentage_promoted_percentage'>ร้อยละที่ได้เลื่อน</label></th> <th><label id='h_eva_promoted_percentage_promoted_percentage'>ร้อยละที่ได้เลื่อน</label></th>
<th><label id='h_eva_promoted_percentage_max_score'>ช่วงคะแนนสูงสุด</label></th>
<th><label id='h_eva_promoted_percentage_min_score'>ช่วงคะแนนต่ำสุด</label></th> <th><label id='h_eva_promoted_percentage_min_score'>ช่วงคะแนนต่ำสุด</label></th>
<th><label id='h_eva_promoted_percentage_max_score'>ช่วงคะแนนสูงสุด</label></th>
</tr> </tr>
</thead> </thead>
<tbody></tbody> <tbody></tbody>

View File

@@ -966,13 +966,14 @@
<response code="200">Returns the item</response> <response code="200">Returns the item</response>
<response code="500">Error Occurred</response> <response code="500">Error Occurred</response>
</member> </member>
<member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_processController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_create_evaluation_detail_processController},TodoAPI2.Models.Ieva_create_evaluation_detail_processService,Microsoft.Extensions.Configuration.IConfiguration)"> <member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_processController.#ctor(Microsoft.Extensions.Logging.ILogger{TodoAPI2.Controllers.eva_create_evaluation_detail_processController},TodoAPI2.Models.Iexternal_employeeService,TodoAPI2.Models.Ieva_create_evaluation_detail_processService,Microsoft.Extensions.Configuration.IConfiguration)">
<summary> <summary>
Default constructure for dependency injection Default constructure for dependency injection
</summary> </summary>
<param name="repository"></param> <param name="repository"></param>
<param name="configuration"></param> <param name="configuration"></param>
<param name="logger"></param> <param name="logger"></param>
<param name="inemp"></param>
</member> </member>
<member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_processController.Get(System.Int32)"> <member name="M:TodoAPI2.Controllers.eva_create_evaluation_detail_processController.Get(System.Int32)">
<summary> <summary>

View File

@@ -86,12 +86,14 @@ function eva_create_evaluation_detail_process_GoCreate() {
//window_open(appsite + "/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d"); //window_open(appsite + "/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d");
} }
function eva_create_evaluation_detail_process_GoEdit(a) { function eva_create_evaluation_detail_process_GoEdit(a, role_code) {
window_open(appsite + "/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d?id=" + a); if(role_code=="1"){
} window_open(appsite + "/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d?id=" + a);
}
function eva_create_evaluation_detail_process_GoEdit2(a) { else
window_open(appsite + "/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2?id=" + a); {
window_open(appsite + "/eva_create_evaluation_detail_processView/eva_create_evaluation_detail_process_d2?id=" + a);
}
} }
function eva_create_evaluation_detail_process_SetEditForm(a) { function eva_create_evaluation_detail_process_SetEditForm(a) {
@@ -174,6 +176,8 @@ function eva_create_evaluation_detail_process_GoDelete(a) {
var eva_create_evaluation_detail_processTableV; var eva_create_evaluation_detail_processTableV;
var eva_create_evaluation_detail_process_setupTable = function (result) { var eva_create_evaluation_detail_process_setupTable = function (result) {
console.log(result);
tmp = '"'; tmp = '"';
eva_create_evaluation_detail_processTableV = $('#eva_create_evaluation_detail_processTable').DataTable({ eva_create_evaluation_detail_processTableV = $('#eva_create_evaluation_detail_processTable').DataTable({
"processing": true, "processing": true,
@@ -188,7 +192,9 @@ var eva_create_evaluation_detail_process_setupTable = function (result) {
{ "data": "employee_position" }, { "data": "employee_position" },
{ "data": "employee_position_level" }, { "data": "employee_position_level" },
{ "data": "org_id_external_linkage_external_name" }, { "data": "org_id_external_linkage_external_name" },
{ "data": "role_desc" },
{ "data": "id" }, { "data": "id" },
{ "data": "id" },
{ "data": "id" }, { "data": "id" },
], ],
"columnDefs": [ "columnDefs": [
@@ -196,22 +202,28 @@ var eva_create_evaluation_detail_process_setupTable = function (result) {
"targets": 0, "targets": 0,
"data": "id", "data": "id",
"render": function (data, type, row, meta) { "render": function (data, type, row, meta) {
return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_create_evaluation_detail_process_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> " return "<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_create_evaluation_detail_process_GoEdit(" + tmp + data + tmp + "," + tmp + row["role_code"] + tmp + ")'><i class='fa fa-pencil'></i></button> ";
+"<button type='button' class='btn btn-warning btn-sm' onclick='javascript:eva_create_evaluation_detail_process_GoEdit2(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> ";
} }
}, },
{ {
"targets": -1, "targets": -1,
"data": "id", "data": "status_supervisor",
"render": function (data, type, row, meta) { "render": function (data, type, row, meta) {
return ""; return row["status_supervisor"];
} }
}, },
{ {
"targets": -2, "targets": -2,
"data": "id", "data": "status_chief",
"render": function (data, type, row, meta) { "render": function (data, type, row, meta) {
return ""; return row["status_chief"];
}
},
{
"targets": -3,
"data": "status_self",
"render": function (data, type, row, meta) {
return row["status_self"];
} }
}], }],
"language": { "language": {

View File

@@ -75,6 +75,7 @@ eva_create_evaluation_detail_processObject.search_employee_fullname = $("#eva_cr
function eva_create_evaluation_detail_process_InitialForm() { function eva_create_evaluation_detail_process_InitialForm() {
var successFunc = function (result) { var successFunc = function (result) {
eva_create_evaluation_detail_process_FeedDataToForm(result); eva_create_evaluation_detail_process_FeedDataToForm(result);
endLoad(); endLoad();
}; };
startLoad(); startLoad();
@@ -86,7 +87,8 @@ function eva_create_evaluation_detail_process_InitialForm() {
function eva_create_evaluation_detail_process_SetEditForm(a) { function eva_create_evaluation_detail_process_SetEditForm(a) {
var successFunc = function (result) { var successFunc = function (result) {
eva_create_evaluation_detail_process_editMode = "UPDATE"; eva_create_evaluation_detail_process_editMode = "UPDATE";
eva_create_evaluation_detail_process_FeedDataToForm(result); eva_create_evaluation_detail_process_FeedDataToForm(result);
setPageByRoleAndStatus(result.role_code, result.status_self, result.status_chief, result.status_supervisor);
endLoad(); endLoad();
}; };
startLoad(); startLoad();
@@ -147,6 +149,19 @@ function eva_create_evaluation_detail_process_GoDelete(a) {
//================= Multi-Selection Function ========================================= //================= Control Function =========================================
function setPageByRoleAndStatus(role_code, status_self, status_chief, status_supervisor){
if(status_chief === "Y"){
$("#btn01").hide();
$("#btn02").hide();
$("#btn03").hide();
$("#btna01").hide();
$("#btna02").hide();
$("#btna03").hide();
$("#thestatus").text("(ผู้ประเมิน ส่งแบบประเมินแล้ว)");
$("#eva_create_evaluation_detail_review01_supervisor1_date").attr("disabled", true);
$("#eva_create_evaluation_detail_review01_supervisor1_remark").attr("disabled", true);
}
}

View File

@@ -86,6 +86,7 @@ function eva_create_evaluation_detail_process_SetEditForm(a) {
var successFunc = function (result) { var successFunc = function (result) {
eva_create_evaluation_detail_process_editMode = "UPDATE"; eva_create_evaluation_detail_process_editMode = "UPDATE";
eva_create_evaluation_detail_process_FeedDataToForm(result); eva_create_evaluation_detail_process_FeedDataToForm(result);
setPageByRoleAndStatus(result.role_code, result.status_self, result.status_chief, result.status_supervisor);
endLoad(); endLoad();
}; };
startLoad(); startLoad();
@@ -146,6 +147,44 @@ function eva_create_evaluation_detail_process_GoDelete(a) {
//================= Multi-Selection Function ========================================= //================= Control Function =========================================
function setPageByRoleAndStatus(role_code, status_self, status_chief, status_supervisor){
if(status_supervisor === "Y"){
$("#btn01").hide();
$("#btn02").hide();
$("#btn03").hide();
$("#btnb01").hide();
$("#btnb02").hide();
$("#btnb03").hide();
$("#thestatus").text("(ผู้ประเมินสูงสุด ส่งแบบประเมินแล้ว)");
$("#eva_create_evaluation_detail_review02_supervisor2_result").attr("disabled", true);
$("#eva_create_evaluation_detail_review02_supervisor2_date").attr("disabled", true);
$("#eva_create_evaluation_detail_review02_supervisor2_remark").attr("disabled", true);
}
$("#eva_create_evaluation_detail_review03_supervisor1A_result").attr("disabled", true);
$("#eva_create_evaluation_detail_review03_supervisor1A_date").attr("disabled", true);
$("#eva_create_evaluation_detail_review03_supervisor1A_remark").attr("disabled", true);
$("#btnc01").hide();
$("#eva_create_evaluation_detail_review04_supervisor2A_result").attr("disabled", true);
$("#eva_create_evaluation_detail_review04_supervisor2A_date").attr("disabled", true);
$("#eva_create_evaluation_detail_review04_supervisor2A_remark").attr("disabled", true);
$("#btnd01").hide();
if(role_code === "3"){
$("#eva_create_evaluation_detail_review03_supervisor1A_result").attr("disabled", false);
$("#eva_create_evaluation_detail_review03_supervisor1A_date").attr("disabled", false);
$("#eva_create_evaluation_detail_review03_supervisor1A_remark").attr("disabled", false);
$("#btnc01").show();
}
if(role_code === "4"){
$("#eva_create_evaluation_detail_review04_supervisor2A_result").attr("disabled", false);
$("#eva_create_evaluation_detail_review04_supervisor2A_date").attr("disabled", false);
$("#eva_create_evaluation_detail_review04_supervisor2A_remark").attr("disabled", false);
$("#btnd01").show();
}
}

View File

@@ -63,7 +63,10 @@ function eva_create_evaluation_detail_status_PutUpdate(a) {
} }
var data = eva_create_evaluation_detail_status_GetFromForm(); var data = eva_create_evaluation_detail_status_GetFromForm();
if(a == "next1"){ if(a == "next0"){
data.status_self = "Y";
}
else if(a == "next1"){
data.status_chief = "Y"; data.status_chief = "Y";
} }
else if(a == "back1"){ else if(a == "back1"){

View File

@@ -165,8 +165,8 @@ var eva_promoted_percentage_setupTable = function (result) {
{ "data": "code" }, { "data": "code" },
{ "data": "detail" }, { "data": "detail" },
{ "data": "promoted_percentage" }, { "data": "promoted_percentage" },
{ "data": "max_score" }, { "data": "min_score" },
{ "data": "min_score" }, { "data": "max_score" },
], ],
"columnDefs": [ "columnDefs": [
{ {