รวม code ปรับปรุงตาม change request จากทีม

This commit is contained in:
Nakorn Rientrakrunchai
2020-04-26 13:27:10 +07:00
parent f353f73d17
commit 60dd022bea
29 changed files with 496 additions and 93 deletions

View File

@@ -73,10 +73,6 @@
</div>
<div class="right-zone">
<div style="display: flex;">
<input type="text" class="form-control search" style="border:none" placeholder="Search">
</div>
<div style="display: flex; padding-top:6px;">
<span class="allfontsize" data-fontsize="1" style="font-size:18px; width:20px; height:30px; display:flex; align-items:center; justify-content:center;">A</span>
<span class="allfontsize" data-fontsize="2" style="font-size:22px; width:20px; height:30px; display:flex; align-items:center; justify-content:center;">A</span>

View File

@@ -65,22 +65,12 @@
</div>
<div class="right-zone">
<div style="display: flex;">
<input type="text" class="form-control search" style="border:none" placeholder="Search">
</div>
<div style="display: flex; padding-top:6px;">
<span class="allfontsize" data-fontsize="1" style="font-size:18px; width:20px; height:30px; display:flex; align-items:center; justify-content:center;">A</span>
<span class="allfontsize" data-fontsize="2" style="font-size:22px; width:20px; height:30px; display:flex; align-items:center; justify-content:center;">A</span>
<span class="allfontsize" data-fontsize="3" style="font-size:26px; width:20px; height:30px; display:flex; align-items:center; justify-content:center; font-weight:bold;">A</span>
</div>
<div style="display: flex; cursor: pointer; position: relative;" id="toggle-chat-list">
<a href="@Environment.GetEnvironmentVariable("SiteInformation_chatsite")" style="color: unset; display: flex">
<i class="fa fa-comments" style="font-size: 18px;"></i>
<div id="chat-noti" class="badge badge-danger" style="display: none;"></div>
</a>
</div>
<div>
<div data-toggle="dropdown" style="display: flex; cursor: pointer; align-items: center;">

View File

@@ -29,6 +29,7 @@
<div class="row">
<div class="col-md-12">
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_process_id" />
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_process_employee_id" />
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_process_create_evaluation_id" />
<div class='row'>
@@ -104,16 +105,16 @@
ข้อมูลการลา ณ วันที่
</div>
<div class="col-md-3">
<input type="text" class="form-control" />
<input class="form-control" type="text" id="date_from" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่เริ่ม" />
</div>
<div class="col-md-1">
ถึง
</div>
<div class="col-md-3">
<input type="text" class="form-control" />
<input class="form-control" type="text" id="date_to" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่สิ้นสุด" />
</div>
<div class="col-md-2">
<button type="button" class="btn btn-outline" onclick="javascript:alert('กำลังจัดทำ')" style="background-color: #fff;">ค้นหา</button>
<button type="button" class="btn btn-outline" onclick="javascript:searchVacation();" style="background-color: #fff;">ค้นหา</button>
</div>
</div>
<div class="row">
@@ -139,16 +140,16 @@
<td>ครั้ง</td>
</tr>
<tr>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td><p id="sum_day_sick_leave"></p></td> @*ลาป่วย วัน*@
<td><p id="count_sick_leave"></p></td> @*ลาป่วย ครั้ง*@
<td><p id="sum_day_personal_leave"></p></td> @*ลากิจ วัน*@
<td><p id="count_personal_leave"></p></td> @*ลากิจ ครั้ง*@
<td><p id="sum_day_vacation_leave"></p></td> @*ลาพักผ่อน*@
<td><p id="count_stop_working"></p></td> @*ขอกลับก่อนเวลา*@
<td><p id="count_late_tad_processing_time_results"></p></td> @*สาย*@
<td><p id="count_absence_tad_processing_time_results"></p></td> @*ขาด*@
<td><p id="sum_day_sick_personal_leave"></p></td> @*รวม (ป่วย/กิจ) วัน*@
<td><p id="count_sick_personal_leave"></p></td> @*รวม (ป่วย/กิจ) ครั้ง*@
</tr>
</table>
</div>
@@ -400,6 +401,55 @@
SetupValidationRemark("eva_create_evaluation_detail_process");
SetupValidationRemark("eva_create_evaluation_detail_review01");
});
function searchVacation_GetFromForm() {
var searchVacationObject = new Object();
searchVacationObject.start_date = formatDateForGetParameter(getDate($("#date_from").val()));
searchVacationObject.end_date = formatDateForGetParameter(getDate($("#date_to").val()));
searchVacationObject.employee_id = $("#eva_create_evaluation_detail_process_employee_id").val();
console.log(searchVacationObject);
return searchVacationObject;
}
function searchVacation() {
if($("#date_from").val() === "") {
alert("กรุณาระบุ วันเริ่มต้น");
return;
}
if($("#date_to").val() === "") {
alert("กรุณาระบุ วันสิ้นสุด");
return;
}
var employee_API = "/api/external_employee/";
var successFunc = function (result) {
searchVacation_FeedDataToForm(result);
endLoad();
};
var p = $.param(searchVacation_GetFromForm());
startLoad();
AjaxGetRequest(apisite + employee_API + "GetLeaveOfEmployee?"+p, successFunc, AlertDanger);
}
function searchVacation_FeedDataToForm(data) {
$("#sum_day_sick_leave").text(data.sum_day_sick_leave);
$("#count_sick_leave").text(data.count_sick_leave);
$("#sum_day_personal_leave").text(data.sum_day_personal_leave);
$("#count_personal_leave").text(data.count_personal_leave);
$("#sum_day_vacation_leave").text(data.sum_day_vacation_leave);
$("#count_stop_working").text(data.count_stop_working);
$("#count_late_tad_processing_time_results").text(data.count_late_tad_processing_time_results);
$("#count_absence_tad_processing_time_results").text(data.count_absence_tad_processing_time_results);
$("#sum_day_sick_personal_leave").text(data.sum_day_sick_personal_leave);
$("#count_sick_personal_leave").text(data.count_sick_personal_leave);
}
</script>
}

View File

@@ -79,6 +79,7 @@
<div class="row">
<div class="col-md-12">
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_process_id" />
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_process_employee_id" />
<input class="form-control" type="hidden" id="eva_create_evaluation_detail_process_create_evaluation_id" />
<div class='row'>
@@ -108,7 +109,7 @@
<label id="lab_eva_create_evaluation_detail_process_employee_position" for="eva_create_evaluation_detail_process_employee_position">ตำแหน่ง</label>
<p class="form-control" id="eva_create_evaluation_detail_process_employee_position" />
</div>
<div class="form-group col-md-4">
<label id="lab_eva_create_evaluation_detail_process_employee_position_level" for="eva_create_evaluation_detail_process_employee_position_level">ระดับตำแหน่ง</label>
@@ -155,16 +156,16 @@
ข้อมูลการลา ณ วันที่
</div>
<div class="col-md-3">
<input type="text" class="form-control" />
<input class="form-control" type="text" id="date_from" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่เริ่ม" />
</div>
<div class="col-md-1">
ถึง
</div>
<div class="col-md-3">
<input type="text" class="form-control" />
<input class="form-control" type="text" id="date_to" data-provide="datepicker" data-date-language="th-th" iLabel="วันที่สิ้นสุด" />
</div>
<div class="col-md-2">
<button type="button" class="btn btn-outline" onclick="javascript:alert('กำลังจัดทำ')" style="background-color: #fff;">ค้นหา</button>
<button type="button" class="btn btn-outline" onclick="javascript:searchVacation();" style="background-color: #fff;">ค้นหา</button>
</div>
</div>
@@ -192,16 +193,16 @@
<td>ครั้ง</td>
</tr>
<tr>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td><p id="sum_day_sick_leave"></p></td> @*ลาป่วย วัน*@
<td><p id="count_sick_leave"></p></td> @*ลาป่วย ครั้ง*@
<td><p id="sum_day_personal_leave"></p></td> @*ลากิจ วัน*@
<td><p id="count_personal_leave"></p></td> @*ลากิจ ครั้ง*@
<td><p id="sum_day_vacation_leave"></p></td> @*ลาพักผ่อน*@
<td><p id="count_stop_working"></p></td> @*ขอกลับก่อนเวลา*@
<td><p id="count_late_tad_processing_time_results"></p></td> @*สาย*@
<td><p id="count_absence_tad_processing_time_results"></p></td> @*ขาด*@
<td><p id="sum_day_sick_personal_leave"></p></td> @*รวม (ป่วย/กิจ) วัน*@
<td><p id="count_sick_personal_leave"></p></td> @*รวม (ป่วย/กิจ) ครั้ง*@
</tr>
</table>
</div>
@@ -675,6 +676,53 @@
}
}
function searchVacation_GetFromForm() {
var searchVacationObject = new Object();
searchVacationObject.start_date = formatDateForGetParameter(getDate($("#date_from").val()));
searchVacationObject.end_date = formatDateForGetParameter(getDate($("#date_to").val()));
searchVacationObject.employee_id = $("#eva_create_evaluation_detail_process_employee_id").val();
console.log(searchVacationObject);
return searchVacationObject;
}
function searchVacation() {
if($("#date_from").val() === "") {
alert("กรุณาระบุ วันเริ่มต้น");
return;
}
if($("#date_to").val() === "") {
alert("กรุณาระบุ วันสิ้นสุด");
return;
}
var employee_API = "/api/external_employee/";
var successFunc = function (result) {
searchVacation_FeedDataToForm(result);
endLoad();
};
var p = $.param(searchVacation_GetFromForm());
startLoad();
AjaxGetRequest(apisite + employee_API + "GetLeaveOfEmployee?"+p, successFunc, AlertDanger);
}
function searchVacation_FeedDataToForm(data) {
$("#sum_day_sick_leave").text(data.sum_day_sick_leave);
$("#count_sick_leave").text(data.count_sick_leave);
$("#sum_day_personal_leave").text(data.sum_day_personal_leave);
$("#count_personal_leave").text(data.count_personal_leave);
$("#sum_day_vacation_leave").text(data.sum_day_vacation_leave);
$("#count_stop_working").text(data.count_stop_working);
$("#count_late_tad_processing_time_results").text(data.count_late_tad_processing_time_results);
$("#count_absence_tad_processing_time_results").text(data.count_absence_tad_processing_time_results);
$("#sum_day_sick_personal_leave").text(data.sum_day_sick_personal_leave);
$("#count_sick_personal_leave").text(data.count_sick_personal_leave);
}
</script>
}

View File

@@ -28,12 +28,12 @@
<div class="form-group col-md-3">
<label id='lab_s_rep_leave_total_employee_id' for='s_rep_leave_total_employee_id'>ชื่อ - สกุล</label>
<select class="form-control" id="s_rep_leave_total_employee_id" iLabel="ชื่อ - สกุล" iRequire="true" iGroup="s_rep_leave_total" title='ชื่อ - สกุล' placeholder='ชื่อ - สกุล'></select>
<select class="form-control" id="s_rep_leave_total_employee_id" iLabel="ชื่อ - สกุล" iRequire="false" iGroup="s_rep_leave_total" title='ชื่อ - สกุล' placeholder='ชื่อ - สกุล'></select>
</div>
<div class="form-group col-md-3">
<label id='lab_s_rep_leave_total_org_id' for='s_rep_leave_total_org_id'>หน่วยงาน</label>
<select class="form-control" id="s_rep_leave_total_org_id" iLabel="หน่วยงาน" iRequire="true" iGroup="s_rep_leave_total" title='หน่วยงาน' placeholder='หน่วยงาน'></select>
<select class="form-control" id="s_rep_leave_total_org_id" iLabel="หน่วยงาน" iRequire="false" iGroup="s_rep_leave_total" title='หน่วยงาน' placeholder='หน่วยงาน'></select>
</div>
<div class="form-group col-md-3">