ปรับปรุง UI และ Flow ของงาน เพิ่มเติม

This commit is contained in:
Nakorn Rientrakrunchai
2021-02-13 12:31:34 +07:00
parent fc5cd13a6e
commit 2159daa300
15 changed files with 898 additions and 31 deletions

View File

@@ -0,0 +1,777 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using TTSW.EF;
namespace tb320eva.Migrations
{
[DbContext(typeof(DataContext))]
[Migration("25640213052452_AddRejectReason")]
partial class AddRejectReason
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.SerialColumn)
.HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
{
b.Property<int>("id");
b.Property<string>("command_no")
.HasMaxLength(4000);
b.Property<int?>("create_evaluation_id");
b.Property<DateTime>("created");
b.Property<int?>("fiscal_year");
b.Property<DateTime?>("imported_date");
b.Property<string>("imported_file")
.HasMaxLength(1000);
b.Property<bool>("isActive");
b.Property<decimal?>("limit");
b.Property<decimal?>("limit_frame");
b.Property<decimal?>("limit_frame_quota");
b.Property<decimal?>("limit_quota");
b.Property<int?>("managed_by");
b.Property<decimal?>("percentage");
b.Property<string>("report_type")
.HasMaxLength(1000);
b.Property<DateTime?>("theDate");
b.Property<int?>("theRound");
b.Property<DateTime>("updated");
b.HasKey("id");
b.HasIndex("create_evaluation_id");
b.ToTable("eva_adjust_postponement");
});
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b =>
{
b.Property<int>("id");
b.Property<int?>("adjust_postponement_id");
b.Property<int?>("adjust_postponement_quota_id");
b.Property<decimal?>("cost_living");
b.Property<DateTime>("created");
b.Property<int?>("employee_id");
b.Property<bool>("isActive");
b.Property<string>("level_this_time")
.HasMaxLength(1000);
b.Property<decimal?>("middle");
b.Property<string>("migration_eva_result")
.HasMaxLength(1000);
b.Property<decimal?>("migration_total_score");
b.Property<decimal?>("new_cost_living");
b.Property<decimal?>("new_sarary");
b.Property<decimal?>("new_sarary_with_quota");
b.Property<int?>("order_at_this_time");
b.Property<int?>("org_at_this_time");
b.Property<decimal?>("other_money_at_this_time");
b.Property<decimal?>("position_allowance_at_this_time");
b.Property<string>("position_this_time")
.HasMaxLength(1000);
b.Property<decimal?>("promoted_percentage");
b.Property<decimal?>("receive_quota");
b.Property<string>("remark")
.HasMaxLength(1000);
b.Property<decimal?>("sarary");
b.Property<decimal?>("total_promote");
b.Property<DateTime>("updated");
b.HasKey("id");
b.HasIndex("adjust_postponement_id");
b.HasIndex("adjust_postponement_quota_id");
b.ToTable("eva_adjust_postponement_detail");
});
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b =>
{
b.Property<int>("id");
b.Property<DateTime>("created");
b.Property<int?>("employee_id");
b.Property<Guid?>("evaluation_group_id");
b.Property<bool>("isActive");
b.Property<Guid?>("performance_plan_id");
b.Property<decimal?>("score1");
b.Property<decimal?>("score2");
b.Property<int?>("supervisor1_id");
b.Property<int?>("supervisor2_id");
b.Property<DateTime>("updated");
b.HasKey("id");
b.HasIndex("evaluation_group_id");
b.HasIndex("performance_plan_id");
b.ToTable("eva_create_evaluation");
});
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluation_detailEntity", b =>
{
b.Property<int>("id");
b.Property<decimal?>("Final_summary_chief");
b.Property<decimal?>("Final_summary_competency_chief");
b.Property<decimal?>("Final_summary_competency_supervisor");
b.Property<decimal?>("Final_summary_competency_supervisor1A");
b.Property<decimal?>("Final_summary_competency_supervisor2A");
b.Property<decimal?>("Final_summary_supervisor");
b.Property<decimal?>("Final_summary_supervisor1A");
b.Property<decimal?>("Final_summary_supervisor2A");
b.Property<decimal?>("achievement_chief");
b.Property<decimal?>("achievement_supervisor");
b.Property<decimal?>("achievement_supervisor1A");
b.Property<decimal?>("achievement_supervisor2A");
b.Property<int?>("chief");
b.Property<int?>("chief_a");
b.Property<DateTime?>("chief_a_date");
b.Property<string>("chief_a_reject_reason")
.HasMaxLength(1000);
b.Property<string>("chief_a_remark")
.HasMaxLength(1000);
b.Property<string>("chief_a_result")
.HasMaxLength(1);
b.Property<decimal?>("competency_chief");
b.Property<decimal?>("competency_supervisor");
b.Property<decimal?>("competency_supervisor1A");
b.Property<decimal?>("competency_supervisor2A");
b.Property<int?>("create_evaluation_id");
b.Property<DateTime>("created");
b.Property<int?>("employee_id");
b.Property<bool>("isActive");
b.Property<string>("level_score_chief")
.HasMaxLength(255);
b.Property<string>("level_score_supervisor")
.HasMaxLength(255);
b.Property<string>("level_score_supervisor1A")
.HasMaxLength(255);
b.Property<string>("level_score_supervisor2A")
.HasMaxLength(255);
b.Property<decimal?>("score_chief");
b.Property<decimal?>("score_supervisor");
b.Property<decimal?>("score_supervisor1A");
b.Property<decimal?>("score_supervisor2A");
b.Property<string>("status_chief")
.HasMaxLength(1);
b.Property<string>("status_chief_a")
.HasMaxLength(1);
b.Property<DateTime?>("status_chief_a_click_date");
b.Property<DateTime?>("status_chief_click_date");
b.Property<string>("status_self")
.HasMaxLength(1);
b.Property<string>("status_self_a")
.HasMaxLength(1);
b.Property<DateTime?>("status_self_a_click_date");
b.Property<DateTime?>("status_self_click_date");
b.Property<string>("status_supervisor")
.HasMaxLength(1);
b.Property<string>("status_supervisor1A")
.HasMaxLength(1);
b.Property<DateTime?>("status_supervisor1A_click_date");
b.Property<string>("status_supervisor2A")
.HasMaxLength(1);
b.Property<DateTime?>("status_supervisor2A_click_date");
b.Property<DateTime?>("status_supervisor_click_date");
b.Property<int?>("supervisor1");
b.Property<int?>("supervisor1A");
b.Property<DateTime?>("supervisor1A_date");
b.Property<string>("supervisor1A_remark")
.HasMaxLength(1000);
b.Property<string>("supervisor1A_result")
.HasMaxLength(1);
b.Property<DateTime?>("supervisor1_date");
b.Property<string>("supervisor1_remark")
.HasMaxLength(1000);
b.Property<string>("supervisor1_result")
.HasMaxLength(1);
b.Property<int?>("supervisor2");
b.Property<int?>("supervisor2A");
b.Property<DateTime?>("supervisor2A_date");
b.Property<string>("supervisor2A_remark")
.HasMaxLength(1000);
b.Property<string>("supervisor2A_result")
.HasMaxLength(1);
b.Property<DateTime?>("supervisor2_date");
b.Property<string>("supervisor2_remark")
.HasMaxLength(1000);
b.Property<string>("supervisor2_result")
.HasMaxLength(1);
b.Property<decimal?>("total_summary_chief");
b.Property<decimal?>("total_summary_competency_chief");
b.Property<decimal?>("total_summary_competency_supervisor");
b.Property<decimal?>("total_summary_competency_supervisor1A");
b.Property<decimal?>("total_summary_competency_supervisor2A");
b.Property<decimal?>("total_summary_supervisor");
b.Property<decimal?>("total_summary_supervisor1A");
b.Property<decimal?>("total_summary_supervisor2A");
b.Property<DateTime>("updated");
b.HasKey("id");
b.ToTable("eva_create_evaluation_detail");
});
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
{
b.Property<int>("id");
b.Property<string>("achievement")
.HasMaxLength(1000);
b.Property<int?>("create_evaluation_detail_id");
b.Property<DateTime>("created");
b.Property<bool>("isActive");
b.Property<decimal?>("score");
b.Property<decimal?>("score2");
b.Property<decimal?>("score3");
b.Property<decimal?>("score4");
b.Property<decimal?>("sumary");
b.Property<decimal?>("sumary2");
b.Property<decimal?>("sumary3");
b.Property<decimal?>("sumary4");
b.Property<string>("target_score1")
.HasMaxLength(255);
b.Property<string>("target_score2")
.HasMaxLength(255);
b.Property<string>("target_score3")
.HasMaxLength(255);
b.Property<string>("target_score4")
.HasMaxLength(255);
b.Property<string>("target_score5")
.HasMaxLength(255);
b.Property<string>("thefile")
.HasMaxLength(1000);
b.Property<DateTime>("updated");
b.Property<decimal?>("weight");
b.HasKey("id");
b.HasIndex("create_evaluation_detail_id");
b.ToTable("eva_evaluation_achievement");
});
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
{
b.Property<int>("id");
b.Property<string>("behavior")
.HasMaxLength(1000);
b.Property<int?>("create_evaluation_detail_id");
b.Property<DateTime>("created");
b.Property<bool>("isActive");
b.Property<decimal?>("score");
b.Property<decimal?>("score2");
b.Property<decimal?>("score3");
b.Property<decimal?>("score4");
b.Property<decimal?>("sumary");
b.Property<decimal?>("sumary2");
b.Property<decimal?>("sumary3");
b.Property<decimal?>("sumary4");
b.Property<string>("target_score1")
.HasMaxLength(255);
b.Property<string>("target_score2")
.HasMaxLength(255);
b.Property<string>("target_score3")
.HasMaxLength(255);
b.Property<string>("target_score4")
.HasMaxLength(255);
b.Property<string>("target_score5")
.HasMaxLength(255);
b.Property<DateTime>("updated");
b.Property<decimal?>("weight");
b.HasKey("id");
b.HasIndex("create_evaluation_detail_id");
b.ToTable("eva_evaluation_behavior");
});
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_groupEntity", b =>
{
b.Property<Guid>("id")
.ValueGeneratedOnAdd();
b.Property<string>("code")
.HasMaxLength(255);
b.Property<DateTime>("created");
b.Property<bool>("isActive");
b.Property<string>("thegroup")
.HasMaxLength(255);
b.Property<DateTime>("updated");
b.HasKey("id");
b.ToTable("eva_evaluation_group");
});
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b =>
{
b.Property<Guid>("id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("created");
b.Property<int?>("employee_id");
b.Property<Guid?>("evaluation_group_id");
b.Property<bool>("isActive");
b.Property<DateTime>("updated");
b.HasKey("id");
b.HasIndex("evaluation_group_id");
b.ToTable("eva_evaluation_group_detail");
});
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b =>
{
b.Property<int>("id");
b.Property<int?>("create_evaluation_detail_id");
b.Property<DateTime>("created");
b.Property<string>("indicators")
.HasMaxLength(4000);
b.Property<bool>("isActive");
b.Property<string>("mission_detail")
.HasMaxLength(4000);
b.Property<int?>("mission_no");
b.Property<string>("target")
.HasMaxLength(4000);
b.Property<DateTime>("updated");
b.HasKey("id");
b.HasIndex("create_evaluation_detail_id");
b.ToTable("eva_evaluation_operating_agreement");
});
modelBuilder.Entity("TodoAPI2.Models.eva_idp_planEntity", b =>
{
b.Property<int>("id");
b.Property<int?>("create_evaluation_detail_id");
b.Property<DateTime>("created");
b.Property<string>("develop")
.HasMaxLength(1000);
b.Property<string>("development_method")
.HasMaxLength(1000);
b.Property<DateTime?>("end_date");
b.Property<bool>("isActive");
b.Property<string>("period_text")
.HasMaxLength(1000);
b.Property<DateTime?>("start_date");
b.Property<DateTime>("updated");
b.HasKey("id");
b.ToTable("eva_idp_plan");
});
modelBuilder.Entity("TodoAPI2.Models.eva_level_scoreEntity", b =>
{
b.Property<Guid>("id")
.ValueGeneratedOnAdd();
b.Property<string>("code")
.HasMaxLength(255);
b.Property<DateTime>("created");
b.Property<string>("detail")
.HasMaxLength(1000);
b.Property<bool>("isActive");
b.Property<decimal?>("max_score");
b.Property<decimal?>("min_score");
b.Property<DateTime>("updated");
b.HasKey("id");
b.ToTable("eva_level_score");
});
modelBuilder.Entity("TodoAPI2.Models.eva_performance_planEntity", b =>
{
b.Property<Guid>("id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("created");
b.Property<int?>("fiscal_year");
b.Property<bool>("isActive");
b.Property<int?>("theTime");
b.Property<DateTime>("updated");
b.HasKey("id");
b.ToTable("eva_performance_plan");
});
modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b =>
{
b.Property<Guid>("id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("created");
b.Property<DateTime?>("end_date");
b.Property<bool>("isActive");
b.Property<int?>("list_no");
b.Property<Guid?>("performance_plan_id");
b.Property<string>("remark")
.HasMaxLength(1000);
b.Property<DateTime?>("start_date");
b.Property<string>("step")
.HasMaxLength(1000);
b.Property<DateTime>("updated");
b.HasKey("id");
b.HasIndex("performance_plan_id");
b.ToTable("eva_performance_plan_detail");
});
modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b =>
{
b.Property<Guid>("id")
.ValueGeneratedOnAdd();
b.Property<string>("code")
.HasMaxLength(255);
b.Property<DateTime>("created");
b.Property<string>("detail")
.HasMaxLength(1000);
b.Property<bool>("isActive");
b.Property<Guid?>("level_score_id");
b.Property<decimal?>("max_score");
b.Property<decimal?>("min_score");
b.Property<decimal?>("promoted_percentage");
b.Property<DateTime>("updated");
b.HasKey("id");
b.HasIndex("level_score_id");
b.ToTable("eva_promoted_percentage");
});
modelBuilder.Entity("TodoAPI2.Models.eva_salary_cylinderEntity", b =>
{
b.Property<int>("id");
b.Property<decimal?>("cost_living");
b.Property<DateTime>("created");
b.Property<bool>("isActive");
b.Property<decimal?>("middle");
b.Property<int?>("position_level");
b.Property<int?>("position_type");
b.Property<decimal?>("temporary_min");
b.Property<decimal?>("themax");
b.Property<decimal?>("themin");
b.Property<DateTime>("updated");
b.HasKey("id");
b.ToTable("eva_salary_cylinder");
});
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponementEntity", b =>
{
b.HasOne("TodoAPI2.Models.eva_create_evaluationEntity", "eva_create_evaluation")
.WithMany()
.HasForeignKey("create_evaluation_id");
});
modelBuilder.Entity("TodoAPI2.Models.eva_adjust_postponement_detailEntity", b =>
{
b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement")
.WithMany()
.HasForeignKey("adjust_postponement_id");
b.HasOne("TodoAPI2.Models.eva_adjust_postponementEntity", "eva_adjust_postponement_quota")
.WithMany()
.HasForeignKey("adjust_postponement_quota_id")
.HasConstraintName("FK_eva_adjust_postponement_detail_eva_adjust_postponement_adj~1");
});
modelBuilder.Entity("TodoAPI2.Models.eva_create_evaluationEntity", b =>
{
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group")
.WithMany()
.HasForeignKey("evaluation_group_id");
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan")
.WithMany()
.HasForeignKey("performance_plan_id");
});
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_achievementEntity", b =>
{
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
.WithMany()
.HasForeignKey("create_evaluation_detail_id");
});
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_behaviorEntity", b =>
{
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail")
.WithMany()
.HasForeignKey("create_evaluation_detail_id");
});
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_group_detailEntity", b =>
{
b.HasOne("TodoAPI2.Models.eva_evaluation_groupEntity", "eva_evaluation_group")
.WithMany()
.HasForeignKey("evaluation_group_id");
});
modelBuilder.Entity("TodoAPI2.Models.eva_evaluation_operating_agreementEntity", b =>
{
b.HasOne("TodoAPI2.Models.eva_create_evaluation_detailEntity", "eva_create_evaluation_detail_create_evaluation_detail_id")
.WithMany()
.HasForeignKey("create_evaluation_detail_id");
});
modelBuilder.Entity("TodoAPI2.Models.eva_performance_plan_detailEntity", b =>
{
b.HasOne("TodoAPI2.Models.eva_performance_planEntity", "eva_performance_plan")
.WithMany()
.HasForeignKey("performance_plan_id");
});
modelBuilder.Entity("TodoAPI2.Models.eva_promoted_percentageEntity", b =>
{
b.HasOne("TodoAPI2.Models.eva_level_scoreEntity", "eva_level_score")
.WithMany()
.HasForeignKey("level_score_id");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,23 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace tb320eva.Migrations
{
public partial class AddRejectReason : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "chief_a_reject_reason",
table: "eva_create_evaluation_detail",
maxLength: 1000,
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "chief_a_reject_reason",
table: "eva_create_evaluation_detail");
}
}
}

View File

@@ -199,6 +199,9 @@ namespace tb320eva.Migrations
b.Property<DateTime?>("chief_a_date");
b.Property<string>("chief_a_reject_reason")
.HasMaxLength(1000);
b.Property<string>("chief_a_remark")
.HasMaxLength(1000);

View File

@@ -174,6 +174,9 @@ namespace TodoAPI2.Models
public string chief_a_remark { get; set; }
public DateTime? chief_a_date { get; set; }
[MaxLength(1000)]
public string chief_a_reject_reason { get; set; }
}
}

View File

@@ -248,7 +248,7 @@ namespace TodoAPI2.Models
&& (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.fullname.Contains(model.search_employee_fullname) || string.IsNullOrEmpty(model.search_employee_fullname))
&& m_eva_create_evaluation_detail_agreement.employee_id == emp_id
&& (m_eva_create_evaluation_detail_agreement.employee_id == emp_id || m_eva_create_evaluation_detail_agreement.chief == emp_id)
orderby m_eva_create_evaluation_detail_agreement.created descending
select new eva_create_evaluation_detail_firstdocViewModel()

View File

@@ -68,11 +68,11 @@ namespace TodoAPI2.Models
public decimal? score2 { get; set; }
public string txt_status_self_a { get { return getStatusText(status_self_a) + MyHelper.GetDateStringForReport(status_self_a_click_date); } }
public string txt_status_self_a { get { return getStatusText2(status_self_a) + MyHelper.GetDateStringForReport(status_self_a_click_date); } }
public string txt_status_self { get { return getStatusText(status_self) + MyHelper.GetDateStringForReport(status_self_click_date); } }
public string txt_status_chief_a { get { return getStatusText(status_chief_a) + MyHelper.GetDateStringForReport(status_chief_a_click_date); } }
public string txt_status_chief_a { get { return getStatusText2(status_chief_a) + MyHelper.GetDateStringForReport(status_chief_a_click_date); } }
public string txt_status_chief { get { return getStatusText(status_chief) + MyHelper.GetDateStringForReport(status_chief_click_date); } }
public string txt_status_supervisor { get { return getStatusText(status_supervisor) + MyHelper.GetDateStringForReport(status_supervisor_click_date); } }
@@ -97,6 +97,22 @@ namespace TodoAPI2.Models
return " ";
}
private string getStatusText2(string s)
{
if (!string.IsNullOrEmpty(s))
{
if (s == "Y")
{
return "ส่งข้อตกลงแล้ว <br/>";
}
else if (s == "N")
{
return "ตีกลับ <br/>";
}
}
return " ";
}
}
}

View File

@@ -26,6 +26,8 @@ namespace TodoAPI2.Models
public DateTime? chief_a_date { get; set; }
public string chief_a_reject_reason { get; set; }
public string active_mode { get; set; }
}
}

View File

@@ -121,6 +121,7 @@ namespace TodoAPI2.Models
chief_a_result = m_eva_create_evaluation_detail_review0A.chief_a_result,
chief_a_remark = m_eva_create_evaluation_detail_review0A.chief_a_remark,
chief_a_date = m_eva_create_evaluation_detail_review0A.chief_a_date,
chief_a_reject_reason = m_eva_create_evaluation_detail_review0A.chief_a_reject_reason,
chief_a_result_external_linkage_external_name = fk_external_linkageResult3.external_name,
@@ -196,6 +197,7 @@ namespace TodoAPI2.Models
existingEntity.chief_a_result = model.chief_a_result;
existingEntity.chief_a_remark = model.chief_a_remark;
existingEntity.chief_a_date = model.chief_a_date;
existingEntity.chief_a_reject_reason = model.chief_a_reject_reason;
//existingEntity.SetAutoField(_repository.Context);
@@ -230,6 +232,7 @@ namespace TodoAPI2.Models
existingEntity.chief_a_result = i.chief_a_result;
existingEntity.chief_a_remark = i.chief_a_remark;
existingEntity.chief_a_date = i.chief_a_date;
existingEntity.chief_a_reject_reason = i.chief_a_reject_reason;
//existingEntity.SetAutoField(_repository.Context);
_repository.UpdateWithoutCommit(i.id.Value, existingEntity);
@@ -301,6 +304,7 @@ namespace TodoAPI2.Models
i.Add("chief_a_remark", "ความเห็นผู้ประเมินสูงสุด");
i.Add("chief_a_date", "วันที่ประเมิน");
i.Add("txt_chief_a_date", "วันที่ประเมิน");
i.Add("chief_a_reject_reason", "เหตุผลการส่งคืนเอกสาร");
return i;
}

View File

@@ -26,6 +26,8 @@ namespace TodoAPI2.Models
public string txt_chief_a_date { get { return MyHelper.GetDateStringForReport(this.chief_a_date); } }
public string chief_a_reject_reason { get; set; }
public string chief_a_result_external_linkage_external_name { get; set; }
}

View File

@@ -272,13 +272,13 @@ namespace TodoAPI2.Models
var i = new external_linkageViewModel();
i.external_id = 1;
i.external_code = "Y";
i.external_name = "เห็นด้วยกับข้อตกลงการประเมิน";
i.external_name = "เห็นชอบ";
result.Add(i);
var j = new external_linkageViewModel();
j.external_id = 2;
j.external_code = "N";
j.external_name = "ไม่เห็นด้วยและมีความเห็นต่าง";
j.external_name = "ความเห็นอื่นๆ";
result.Add(j);
return result;

View File

@@ -163,15 +163,16 @@
<br />
<section class="wrapper">
<div class="title"><div class="line"></div>ข้อตกลงการปฏิบัติงาน</div>
<div class="title"><div class="line"></div><span id="s1_text">ข้อตกลงการปฏิบัติงาน</span></div>
<div class="tools">
<div class="row">
<input class="form-control" type="hidden" id="s_eva_evaluation_operating_agreement_create_evaluation_detail_id" />
<div class="col-md-6">
<div class="col-md-12">
<span id="s2_text">ขอเสนอข้อตกลงการปฏิบัติงานตามภารกิจที่รับผิดชอบ และหรือภารกิจที่ได้รับมอบหมายเป็นพิเศษดังนี้</span>
<button class="btn btn-info status_self" onclick="javascript:eva_evaluation_operating_agreement_GoCreate();"><i class="fa fa-plus" style="font-size: 14px;"></i> เพิ่มรายการ</button>
<button class="btn btn-info" onclick="javascript:rep_eva_p01_DoSearch('pdf');">พิมพ์แบบข้อตกลง</button>
</div>
</div>
@@ -195,7 +196,7 @@
<br />
<section class="wrapper approve_section">
<div class="title col-md-12"><div class="line"></div>บันทึกผลการตรวจข้อตกลงการประเมิน</div>
<div class="title col-md-12"><div class="line"></div>ส่วนที่ 2 ความเห็นของผู้บังคับบัญชา (ผู้ประเมินชั้นต้น)</div>
<section class="card no-border">
<div class="card-body" style="">
@@ -209,19 +210,19 @@
<div class='row'>
<div class="form-group col-md-6">
<label id="lab_eva_create_evaluation_detail_review0A_chief_a_result" for="eva_create_evaluation_detail_review0A_chief_a_result">ผลการตรวจข้อตกลงการประเมิน</label>
<select class="form-control approve_item" id="eva_create_evaluation_detail_review0A_chief_a_result" iLabel="ผลการตรวจข้อตกลงการประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review0A"></select>
<label id="lab_eva_create_evaluation_detail_review0A_chief_a_result" for="eva_create_evaluation_detail_review0A_chief_a_result">ความเห็น</label>
<select class="form-control approve_item" id="eva_create_evaluation_detail_review0A_chief_a_result" iLabel="ความเห็น" iRequire="true" iGroup="eva_create_evaluation_detail_review0A"></select>
</div>
<div class="form-group col-md-6">
<label id="lab_eva_create_evaluation_detail_review0A_chief_a_date" for="eva_create_evaluation_detail_review0A_chief_a_date">วันที่ตรวจ</label>
<input class="form-control approve_item" type="text" id="eva_create_evaluation_detail_review0A_chief_a_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ตรวจ" iRequire="true" iGroup="eva_create_evaluation_detail_review0A" />
<div class="form-group col-md-6" style="display:none;">
<label id="lab_eva_create_evaluation_detail_review0A_chief_a_date" for="eva_create_evaluation_detail_review0A_chief_a_date">วันที่ให้ความเห็น</label>
<input class="form-control approve_item" type="text" id="eva_create_evaluation_detail_review0A_chief_a_date" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่ให้ความเห็น" iRequire="false" iGroup="eva_create_evaluation_detail_review0A" />
</div>
</div>
<div class='row'>
<div class="form-group col-md-12">
<label id="lab_eva_create_evaluation_detail_review0A_chief_a_remark" for="eva_create_evaluation_detail_review0A_chief_a_remark">ความเห็นของผู้ตรวจ</label>
<textarea class="form-control approve_item" rows="4" cols="50" id="eva_create_evaluation_detail_review0A_chief_a_remark" iLabel="ความเห็นของผู้ตรวจ" iRequire="false" iGroup="eva_create_evaluation_detail_review0A"></textarea>
<label id="lab_eva_create_evaluation_detail_review0A_chief_a_remark" for="eva_create_evaluation_detail_review0A_chief_a_remark">ความเห็นอื่นๆ</label>
<textarea class="form-control approve_item" rows="4" cols="50" id="eva_create_evaluation_detail_review0A_chief_a_remark" iLabel="ความเห็นอื่นๆ" iRequire="false" iGroup="eva_create_evaluation_detail_review0A"></textarea>
</div>
</div>
@@ -246,20 +247,40 @@
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_status_status_chief_a" />
<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 status_self" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('nextA')">ส่งข้อตกลงการประเมิน</button>
<button type="button" class="btn btn-submit status_self" onclick="javascript:alert('บันทึกเรียบร้อย')">บันทึก</button>
<section class="card no-border">
<div class="card-body" style="">
<button type="button" class="btn btn-submit status_chief" onclick="javascript:eva_create_evaluation_detail_review0A_PutUpdate('save')">บันทึก</button>
<button type="button" class="btn btn-submit status_chief" onclick="javascript:eva_create_evaluation_detail_review0A_PutUpdate('nextB')">อนุมัติข้อตกลงการประเมิน</button>
<button type="button" class="btn btn-submit status_chief" onclick="javascript:eva_create_evaluation_detail_review0A_PutUpdate('backB')">ตีกลับ</button>
<div class="row">
<div class="col-md-12">
<button type="button" class="btn btn-danger" onclick="javascript:window_close()"><i class="fa fa-repeat"></i> กลับ</button>
<div class="row">
<div class="form-group col-md-12">
<button type="button" class="btn btn-danger" onclick="javascript:window_close()"><i class="fa fa-repeat"></i> กลับ</button>
<button type="button" class="btn btn-submit status_self" onclick="javascript:alert('บันทึกเรียบร้อย')">บันทึก</button>
<button type="button" class="btn btn-submit status_self" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('nextA')">ส่งข้อตกลงการประเมิน</button>
<button type="button" class="btn btn-submit status_chief" onclick="javascript:eva_create_evaluation_detail_review0A_PutUpdate('backB')">ส่งเอกสารคืน</button>
<button type="button" class="btn btn-submit status_chief" onclick="javascript:eva_create_evaluation_detail_review0A_PutUpdate('save')">บันทึก</button>
<button type="button" class="btn btn-submit status_chief" onclick="javascript:eva_create_evaluation_detail_review0A_PutUpdate('nextB')">ส่งความเห็นของผู้บังคับบัญชา</button>
<button class="btn btn-info" onclick="javascript:rep_eva_p01_DoSearch('pdf');">พิมพ์แบบข้อตกลง</button>
</div>
</div>
<div class='row'>
<div class="form-group col-md-12">
<label id="lab_eva_create_evaluation_detail_review0A_chief_a_reject_reason" for="eva_create_evaluation_detail_review0A_chief_a_reject_reason">เหตุผลการส่งคืนเอกสาร</label>
<textarea class="form-control" rows="4" cols="50" id="eva_create_evaluation_detail_review0A_chief_a_reject_reason" iLabel="เหตุผลการส่งคืนเอกสาร" iRequire="false" iGroup="eva_create_evaluation_detail_review0A"></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</section>
@section FooterPlaceHolder{
@@ -273,15 +294,13 @@
var status_self_a = "";
var status_chief_a = "";
var role_code = "";
var show_tool = true;
$(document).ready(function () {
var id = getUrlParameter("id");
if (id) {
eva_create_evaluation_detail_firstdoc_SetEditForm(id);
eva_create_evaluation_detail_status_SetEditForm(id);
eva_evaluation_operating_agreement_InitiateDataTable();
eva_evaluation_operating_agreement_InitialForm();
eva_create_evaluation_detail_status_SetEditForm(id);
eva_create_evaluation_detail_review0A_SetEditForm(id);
} else {
@@ -300,6 +319,7 @@
$(".status_chief").hide();
$("#status").text("");
$(".approve_section").hide();
$("#s2_text").hide();
if (role_code === "1") { // ผู้ประเมิน
$(".approve_section").show();
@@ -316,6 +336,10 @@
$(".approve_item").prop("disabled", true);
$(".status_chief").hide();
}
$("#s1_text").text("ส่วนที่ 1 ข้อตกลงการปฏิบัติงาน");
$("#s2_text").show();
} else if (role_code === "") { // ผู้รับการประเมิน
$(".status_self").show();
if (status_self_a === "Y") {
@@ -333,7 +357,11 @@
$(".approve_item").prop("disabled", true);
$(".status_self").show();
}
}
}
</script>

View File

@@ -25,6 +25,13 @@ function eva_create_evaluation_detail_firstdoc_FeedDataToForm(data) {
status_chief_a = data.status_chief_a;
role_code = data.role_code;
if (role_code === "1") {
show_tool = false;
}
eva_evaluation_operating_agreement_InitiateDataTable();
eva_evaluation_operating_agreement_InitialForm();
CheckPermission();
console.log(data);
}

View File

@@ -10,6 +10,7 @@ function eva_create_evaluation_detail_review0A_FeedDataToForm(data) {
DropDownClearFormAndFeedWithData($("#eva_create_evaluation_detail_review0A_chief_a_result"), data, "id", "external_name", "item_chief_a_result", data.chief_a_result);
$("#eva_create_evaluation_detail_review0A_chief_a_remark").val(data.chief_a_remark);
$("#eva_create_evaluation_detail_review0A_chief_a_date").val(formatDate(data.chief_a_date));
$("#eva_create_evaluation_detail_review0A_chief_a_reject_reason").val(data.chief_a_reject_reason);
}
@@ -21,7 +22,7 @@ function eva_create_evaluation_detail_review0A_GetFromForm() {
eva_create_evaluation_detail_review0AObject.chief_a_result = $("#eva_create_evaluation_detail_review0A_chief_a_result").val();
eva_create_evaluation_detail_review0AObject.chief_a_remark = $("#eva_create_evaluation_detail_review0A_chief_a_remark").val();
eva_create_evaluation_detail_review0AObject.chief_a_date = getDate($("#eva_create_evaluation_detail_review0A_chief_a_date").val());
eva_create_evaluation_detail_review0AObject.chief_a_reject_reason = $("#eva_create_evaluation_detail_review0A_chief_a_reject_reason").val();
return eva_create_evaluation_detail_review0AObject;
}

View File

@@ -171,6 +171,7 @@ var eva_evaluation_operating_agreement_setupTable = function (result) {
{
"targets": 0, //1,
"data": "id",
"visible": show_tool,
"render": function (data, type, row, meta) {
return "<button type='button' class='btn btn-warning btn-sm status_self' onclick='javascript:eva_evaluation_operating_agreement_GoEdit(" + tmp + data + tmp + ")'><i class='fa fa-pencil'></i></button> <button type='button' class='btn btn-danger btn-sm status_self' onclick='javascript:eva_evaluation_operating_agreement_GoDelete(" + tmp + data + tmp + ")'><i class='fa fa-trash-o '></i></button> ";
}
@@ -186,7 +187,7 @@ var eva_evaluation_operating_agreement_setupTable = function (result) {
"language": {
"url": appsite + "/DataTables-1.10.16/thai.json"
},
"paging": true,
"paging": false,
"searching": false,
"bSort": false
});