Add flow agreement
This commit is contained in:
1123
Migrations/20211016161223_AddFlowAgreement.Designer.cs
generated
Normal file
1123
Migrations/20211016161223_AddFlowAgreement.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
33
Migrations/20211016161223_AddFlowAgreement.cs
Normal file
33
Migrations/20211016161223_AddFlowAgreement.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace tb320eva.Migrations
|
||||
{
|
||||
public partial class AddFlowAgreement : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "status_supervisor_a",
|
||||
table: "eva_create_evaluation_detail",
|
||||
maxLength: 1,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<DateTime>(
|
||||
name: "status_supervisor_a_click_date",
|
||||
table: "eva_create_evaluation_detail",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "status_supervisor_a",
|
||||
table: "eva_create_evaluation_detail");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "status_supervisor_a_click_date",
|
||||
table: "eva_create_evaluation_detail");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -348,6 +348,11 @@ namespace tb320eva.Migrations
|
||||
|
||||
b.Property<DateTime?>("status_supervisor2A_click_date");
|
||||
|
||||
b.Property<string>("status_supervisor_a")
|
||||
.HasMaxLength(1);
|
||||
|
||||
b.Property<DateTime?>("status_supervisor_a_click_date");
|
||||
|
||||
b.Property<DateTime?>("status_supervisor_click_date");
|
||||
|
||||
b.Property<int?>("supervisor1");
|
||||
|
||||
@@ -91,6 +91,9 @@ namespace TodoAPI2.Models
|
||||
[MaxLength(1)]
|
||||
public string status_supervisor { get; set; }
|
||||
|
||||
[MaxLength(1)]
|
||||
public string status_supervisor_a { get; set; }
|
||||
|
||||
public int? supervisor1A { get; set; }
|
||||
|
||||
[MaxLength(1)]
|
||||
@@ -130,6 +133,7 @@ namespace TodoAPI2.Models
|
||||
public DateTime? status_chief_a_click_date { get; set; }
|
||||
public DateTime? status_chief_click_date { get; set; }
|
||||
public DateTime? status_supervisor_click_date { get; set; }
|
||||
public DateTime? status_supervisor_a_click_date { get; set; }
|
||||
public DateTime? status_supervisor1A_click_date { get; set; }
|
||||
public DateTime? status_supervisor2A_click_date { get; set; }
|
||||
|
||||
|
||||
@@ -128,6 +128,7 @@ namespace TodoAPI2.Models
|
||||
status_chief = m_eva_create_evaluation_detail_agreement.status_chief,
|
||||
status_chief_a = m_eva_create_evaluation_detail_agreement.status_chief_a,
|
||||
status_supervisor = m_eva_create_evaluation_detail_agreement.status_supervisor,
|
||||
status_supervisor_a = null,
|
||||
|
||||
org_id_external_linkage_external_name = fk_external_employee.department_name,
|
||||
|
||||
@@ -136,6 +137,7 @@ namespace TodoAPI2.Models
|
||||
status_self_a_click_date = m_eva_create_evaluation_detail_agreement.status_self_a_click_date,
|
||||
status_chief_a_click_date = m_eva_create_evaluation_detail_agreement.status_chief_a_click_date,
|
||||
status_supervisor_click_date = m_eva_create_evaluation_detail_agreement.status_supervisor_click_date,
|
||||
status_supervisor_a_click_date = null,
|
||||
|
||||
remark_hrm_work_record = fk_external_employee.remark_hrm_work_record
|
||||
+ GetWorkTimeText(fk_external_employee.packing_date, endDate),
|
||||
|
||||
@@ -52,6 +52,8 @@ namespace TodoAPI2.Models
|
||||
|
||||
public string status_supervisor { get; set; }
|
||||
|
||||
public string status_supervisor_a { get; set; }
|
||||
|
||||
public string remark_hrm_work_record { get; set; }
|
||||
|
||||
public string plan_round_year { get; set; }
|
||||
@@ -63,6 +65,7 @@ namespace TodoAPI2.Models
|
||||
public DateTime? status_chief_a_click_date { get; set; }
|
||||
public DateTime? status_chief_click_date { get; set; }
|
||||
public DateTime? status_supervisor_click_date { get; set; }
|
||||
public DateTime? status_supervisor_a_click_date { get; set; }
|
||||
|
||||
public decimal? score1 { get; set; }
|
||||
|
||||
@@ -77,6 +80,8 @@ namespace TodoAPI2.Models
|
||||
public string txt_status_chief { get { return getStatusText(status_chief) + MyHelper.GetDateStringForReport(status_chief_click_date) + " " + MyHelper.GetTimeStringFromDate(status_chief_click_date) + getHistoryLink(status_chief); } }
|
||||
public string txt_status_supervisor { get { return getStatusText(status_supervisor) + MyHelper.GetDateStringForReport(status_supervisor_click_date) + " " + MyHelper.GetTimeStringFromDate(status_supervisor_click_date) + getHistoryLink(status_supervisor); } }
|
||||
|
||||
public string txt_status_supervisor_a { get { return getStatusText(status_supervisor_a) + MyHelper.GetDateStringForReport(status_supervisor_a_click_date) + " " + MyHelper.GetTimeStringFromDate(status_supervisor_a_click_date) + getHistoryLink(status_supervisor_a); } }
|
||||
|
||||
public string role_desc { get; set; }
|
||||
|
||||
public string role_code { get; set; }
|
||||
|
||||
@@ -240,16 +240,26 @@ namespace TodoAPI2.Models
|
||||
else if (model.status_mode == "nextB")
|
||||
{
|
||||
existingEntity.status_chief_a_click_date = DateTime.Now;
|
||||
if (current_eva.employee_id == existingEntity.chief) // หัวหน้าและผู้ประเมินสูงสุด เป็นคนคนเดียวกัน
|
||||
{
|
||||
noti_to_employee_id = current_eva.supervisor1_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
noti_to_employee_id = current_eva.employee_id;
|
||||
}
|
||||
need_noti = false;
|
||||
add_history(DateTime.Now, "อนุมัติ ข้อตกลงการประเมิน", existingEntity.chief, existingEntity.id, 1);
|
||||
existingEntity.status_supervisor_a_click_date = null;
|
||||
noti_to_employee_id = current_eva.employee_id;
|
||||
noti_message = "กรุณาตรวจสอบ ข้อตกลงการประเมิน ของ {0}";
|
||||
noti_url = "/eva/eva_create_evaluation_detail_firstdocView/eva_create_evaluation_detail_firstdoc_d?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "ส่งข้อตกลงการประเมิน", model.employee_id, existingEntity.id, 1);
|
||||
}
|
||||
else if (model.status_mode == "backC")
|
||||
{
|
||||
existingEntity.status_supervisor_a_click_date = DateTime.Now;
|
||||
existingEntity.status_chief_a_click_date = null;
|
||||
noti_to_employee_id = existingEntity.chief;
|
||||
noti_message = "ข้อตกลงการประเมินของคุณ ({0}) ถูกตีกลับ";
|
||||
noti_url = "/eva/eva_create_evaluation_detail_firstdocView/eva_create_evaluation_detail_firstdoc_d?id=" + existingEntity.id.ToString();
|
||||
add_history(DateTime.Now, "ข้อตกลงการประเมิน ถูกตีกลับ", model.employee_id, existingEntity.id, 1);
|
||||
}
|
||||
else if (model.status_mode == "nextC")
|
||||
{
|
||||
existingEntity.status_supervisor_a_click_date = DateTime.Now;
|
||||
noti_to_employee_id = existingEntity.employee_id;
|
||||
add_history(DateTime.Now, "อนุมัติ ข้อตกลงการประเมิน", current_eva.employee_id, existingEntity.id, 1);
|
||||
}
|
||||
else if (model.status_mode == "next0")
|
||||
{
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
<th><label>สถานะทำแบบประเมิน<br />(ผู้รับการประเมิน)</label></th>
|
||||
<th><label>สถานะทำแบบประเมิน<br />(ผู้ประเมิน)</label></th>
|
||||
|
||||
<th><label>สถานะทำแบบประเมิน<br />(ผู้ประเมินสูงสุด)</label></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
|
||||
@@ -256,19 +256,19 @@
|
||||
|
||||
<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_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_supervisor" onclick="javascript:eva_create_evaluation_detail_review0A_PutUpdate('backC')">ส่งเอกสารคืน</button>
|
||||
<button type="button" class="btn btn-submit status_supervisor" onclick="javascript:eva_create_evaluation_detail_review0A_PutUpdate('save')">บันทึก</button>
|
||||
|
||||
<button class="btn btn-info" onclick="javascript:rep_eva_p01_DoSearch('pdf');">พิมพ์แบบข้อตกลง</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('nextB')">ส่งข้อตกลงการประเมิน</button>
|
||||
<button type="button" class="btn btn-submit status_supervisor" onclick="javascript:eva_create_evaluation_detail_review0A_PutUpdate('nextC')">ส่งข้อตกลงการประเมิน</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
@@ -320,6 +320,8 @@
|
||||
|
||||
$(".status_self").hide();
|
||||
$(".status_chief").hide();
|
||||
$(".status_supervisor").hide();
|
||||
|
||||
$("#status").text("");
|
||||
$(".approve_section").hide();
|
||||
$("#s2_text").hide();
|
||||
@@ -365,7 +367,32 @@
|
||||
$("#s1_text").text("ส่วนที่ 1 ข้อตกลงการปฏิบัติงาน");
|
||||
$("#s2_text").show();
|
||||
|
||||
} else if (role_code === "") { // ผู้รับการประเมิน
|
||||
}
|
||||
else if (role_code === "2") { // ผู้ประเมินสูงสุด
|
||||
$(".approve_section").show();
|
||||
$(".reject_section").show();
|
||||
|
||||
if (status_chief_a === "Y") {
|
||||
$(".status_supervisor").show();
|
||||
}
|
||||
if (status_supervisor_a === "Y") {
|
||||
$("#status").text("ข้อตกลงการประเมิน ได้รับการอนุมัติไปแล้ว");
|
||||
$(".approve_item").prop("disabled", true);
|
||||
$(".status_supervisor").hide();
|
||||
$("#eva_create_evaluation_detail_review0A_chief_a_reject_reason").prop("disabled", true);
|
||||
}
|
||||
else if (status_supervisor_a === "N") {
|
||||
$("#status").text("คุณตีกลับข้อตกลงการประเมิน กรูณารอแก้ไขและส่งกลับ");
|
||||
$(".approve_item").prop("disabled", true);
|
||||
$(".status_supervisor").hide();
|
||||
$("#eva_create_evaluation_detail_review0A_chief_a_reject_reason").prop("disabled", true);
|
||||
}
|
||||
|
||||
$("#s1_text").text("ส่วนที่ 1 ข้อตกลงการปฏิบัติงาน");
|
||||
$("#s2_text").show();
|
||||
|
||||
}
|
||||
else if (role_code === "") { // ผู้รับการประเมิน
|
||||
$(".status_self").show();
|
||||
if (status_self_a === "Y") {
|
||||
$(".status_self").hide();
|
||||
|
||||
@@ -200,6 +200,7 @@ var eva_create_evaluation_detail_firstdoc_setupTable = function (result) {
|
||||
{ "data": "org_id_external_linkage_external_name" },
|
||||
{ "data": "txt_status_self_a" },
|
||||
{ "data": "txt_status_chief_a" },
|
||||
{ "data": "txt_status_supervisor_a" },
|
||||
|
||||
],
|
||||
"columnDefs": [
|
||||
|
||||
Reference in New Issue
Block a user