|
|
|
|
@@ -194,7 +194,7 @@
|
|
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|
|
|
|
|
|
<section class="wrapper">
|
|
|
|
|
<section class="wrapper approve_section">
|
|
|
|
|
<div class="title col-md-12"><div class="line"></div>บันทึกผลการตรวจข้อตกลงการประเมิน</div>
|
|
|
|
|
|
|
|
|
|
<section class="card no-border">
|
|
|
|
|
@@ -207,23 +207,21 @@
|
|
|
|
|
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review0A_create_evaluation_id" />
|
|
|
|
|
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_review0A_chief_a" />
|
|
|
|
|
|
|
|
|
|
<div class='row'></div>
|
|
|
|
|
<div class='row'></div>
|
|
|
|
|
<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" id="eva_create_evaluation_detail_review0A_chief_a_result" iLabel="ผลการตรวจข้อตกลงการประเมิน" iRequire="true" iGroup="eva_create_evaluation_detail_review0A"></select>
|
|
|
|
|
<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" 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" />
|
|
|
|
|
<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>
|
|
|
|
|
</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" rows="4" cols="50" id="eva_create_evaluation_detail_review0A_chief_a_remark" iLabel="ความเห็นของผู้ตรวจ" iRequire="true" iGroup="eva_create_evaluation_detail_review0A"></textarea>
|
|
|
|
|
<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>
|
|
|
|
|
|
|
|
|
|
@@ -233,16 +231,9 @@
|
|
|
|
|
</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_review0A_PutUpdate()">บันทึก</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<br />
|
|
|
|
|
<br class="approve_section" />
|
|
|
|
|
|
|
|
|
|
<section class="wrapper">
|
|
|
|
|
<div class="title col-md-12"><div class="line"></div>ส่งข้อตกลงการประเมิน <span id="status" style="color:red;"></span></div>
|
|
|
|
|
@@ -259,9 +250,12 @@
|
|
|
|
|
<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_chief" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('nextB')">อนุมัติข้อตกลงการประเมิน</button>
|
|
|
|
|
<button type="button" class="btn btn-submit status_chief" onclick="javascript:eva_create_evaluation_detail_status_PutUpdate('backB')">ตีกลับ</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('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>
|
|
|
|
|
|
|
|
|
|
<button type="button" class="btn btn-danger" onclick="javascript:window_close()"><i class="fa fa-repeat"></i> กลับ</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@@ -278,6 +272,7 @@
|
|
|
|
|
|
|
|
|
|
var status_self_a = "";
|
|
|
|
|
var status_chief_a = "";
|
|
|
|
|
var role_code = "";
|
|
|
|
|
|
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
var id = getUrlParameter("id");
|
|
|
|
|
@@ -294,25 +289,52 @@
|
|
|
|
|
}
|
|
|
|
|
SetupValidationRemark("eva_create_evaluation_detail_firstdoc");
|
|
|
|
|
SetupValidationRemark("eva_evaluation_operating_agreement");
|
|
|
|
|
SetupValidationRemark("eva_create_evaluation_detail_review0A");
|
|
|
|
|
|
|
|
|
|
setTimeout(CheckPermission, 1000);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function CheckPermission() {
|
|
|
|
|
if (status_self_a === "Y") {
|
|
|
|
|
|
|
|
|
|
$(".status_self").hide();
|
|
|
|
|
$("#status").text("คุณส่งแบบประเมินไปแล้ว");
|
|
|
|
|
$(".status_chief").show();
|
|
|
|
|
} else {
|
|
|
|
|
$(".status_chief").hide();
|
|
|
|
|
$("#status").text("");
|
|
|
|
|
$(".approve_section").hide();
|
|
|
|
|
|
|
|
|
|
if (role_code === "1") { // ผู้ประเมิน
|
|
|
|
|
$(".approve_section").show();
|
|
|
|
|
if (status_self_a === "Y") {
|
|
|
|
|
$(".status_chief").show();
|
|
|
|
|
}
|
|
|
|
|
if (status_chief_a === "Y") {
|
|
|
|
|
$("#status").text("ข้อตกลงการประเมิน ได้รับการอนุมัติไปแล้ว");
|
|
|
|
|
$(".approve_item").prop("disabled", true);
|
|
|
|
|
$(".status_chief").hide();
|
|
|
|
|
$("#status").text("แบบประเมินได้รับการอนุมัติไปแล้ว");
|
|
|
|
|
}
|
|
|
|
|
else if (status_chief_a === "N") {
|
|
|
|
|
$("#status").text("คุณตีกลับข้อตกลงการประเมิน กรูณารอผู้ประเมินแก้ไขและส่งกลับ");
|
|
|
|
|
$(".approve_item").prop("disabled", true);
|
|
|
|
|
$(".status_chief").hide();
|
|
|
|
|
}
|
|
|
|
|
} else if (role_code === "") { // ผู้รับการประเมิน
|
|
|
|
|
$(".status_self").show();
|
|
|
|
|
if (status_self_a === "Y") {
|
|
|
|
|
$(".status_self").hide();
|
|
|
|
|
}
|
|
|
|
|
if (status_chief_a === "Y") {
|
|
|
|
|
$("#status").text("ข้อตกลงการประเมิน ได้รับการอนุมัติไปแล้ว");
|
|
|
|
|
$(".approve_section").show();
|
|
|
|
|
$(".approve_item").prop("disabled", true);
|
|
|
|
|
$(".status_self").hide();
|
|
|
|
|
}
|
|
|
|
|
else if (status_chief_a === "N") {
|
|
|
|
|
$("#status").text("ข้อตกลงการประเมินของคุณถูกตีกลับ กรุณาแก้ไข และส่งใหม่");
|
|
|
|
|
$(".approve_section").show();
|
|
|
|
|
$(".approve_item").prop("disabled", true);
|
|
|
|
|
$(".status_self").show();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
}
|
|
|
|
|
|