Commit 96e1eaff by peema_phongam

previous interviewer

parent 97ca0bdb
......@@ -43,8 +43,8 @@
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/fullcalendar-yearview/lang-all.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/VIEWCALENDAR.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/DATEINPUT.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/CSS/Bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/jquery-ui-1.11.4.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/CSS/Bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/JS/EMPVIEW_FUNC.js"></script>
......@@ -203,12 +203,104 @@
</div>
</div>
<div class="center new-line">
<button type="button" class="btn btn-info" ng-click='saveDraff()' ng-disabled='headdata.status == 2 ' >ผลประเมินก่อนหน้า</button>
<button type="button" class="btn btn-info" data-toggle="collapse" data-target="#collapseExample">ผลประเมินก่อนหน้า</button>
<button type="button" class="btn btn-info" ng-click='saveDraff()' swlang code='SW012867' ng-disabled='headdata.status == 2 ' ng-hide='notedit'>Save Draft</button>
<button type="button" class="btn btn-info" ng-click='save()' swlang code='SW012098' ng-disabled='headdata.status == 2 ' ng-hide='notedit'>Submit</button>
<%-- <button type="button" class="btn btn-warning" ng-click='goprint()' swlang code='SW005455'>Print</button> --%>
</div>
<div class='spece-bot'></div>
<div class="collapse" id="collapseExample">
<div class='table-responsive' ng-repeat="pre in previous">
<table class="table table-head table-bordered">
<tr>
<th colspan='10 text-left' ng-if="pre.header.dept.toUpperCase() == 'HR'">ใบประเมินผู้สมัครสำหรับแผนกบุคคล</th>
<th colspan='10 text-left' ng-if="pre.header.dept.toUpperCase() == 'DEPT'">ใบประเมินผู้สมัครสำหรับหน่วยงาน (PL 2 - PL 4)</th>
</tr>
<tr>
<td class='b' swlang code='SW001984'>fullname</td>
<td colspan='4'>{{headdata.fullname}}</td>
<td class='b' swlang code='SW000057'>position</td>
<td colspan='4'>{{headdata.job}}</td>
</tr>
</table>
<table class="table table-head table-bordered">
<thead>
<tr>
<th>ลำดับ</th>
<th class='b text-left' style="width:400px">หัวข้อการพิจารณาของหน่วยงาน</th>
<th>ดีมาก / 5</th>
<th>ดี / 4</th>
<th>ปานกลาง / 3</th>
<th>พอใช้ / 2</th>
<th>ไม่ดี / 1</th>
</tr>
</thead>
<tbody>
<tr ng-repeat='aps in pre.apsform.form'>
<td class='center'>{{$index+1}}</td>
<td>{{aps.topic}}</td>
<td class='center'><input class='score2' ng-model='aps.score' ng-value='5' type='radio' ng-disabled='true'/></td>
<td class='center'><input class='score2' ng-model='aps.score' ng-value='4' type='radio' ng-disabled='true'/></td>
<td class='center'><input class='score2' ng-model='aps.score' ng-value='3' type='radio' ng-disabled='true'/></td>
<td class='center'><input class='score2' ng-model='aps.score' ng-value='2' type='radio' ng-disabled='true'/></td>
<td class='center'><input class='score2' ng-model='aps.score' ng-value='1' type='radio' ng-disabled='true'/></td>
</tr>
<tr>
<td class='trash b' colspan='2'>สรุป</td>
<td class='center b'>{{ getSumScoreByScoreForm(pre.apsform.form, 5) }}</td>
<td class='center b'>{{ getSumScoreByScoreForm(pre.apsform.form, 4) }}</td>
<td class='center b'>{{ getSumScoreByScoreForm(pre.apsform.form, 3) }}</td>
<td class='center b'>{{ getSumScoreByScoreForm(pre.apsform.form, 2) }}</td>
<td class='center b'>{{ getSumScoreByScoreForm(pre.apsform.form, 1) }}</td>
</tr>
<tr>
<td class='trash b' colspan='2'>รวมคะแนน</td>
<td class='center b' colspan='5'>{{ getSumScoreByForm(pre.apsform.form) }}</td>
</tr>
</tbody>
</table>
<div class="row new-line" ng-repeat='com in pre.apsform.comment track by $index'>
<div class="col-lg-1 col-xs-1 trash">{{ $index+1 }}.</div>
<div class="col-lg-11 col-xs-11 showtxt">
<p class="hide"></p>
<textarea rows="5" cols="120" ng-model='com.comment' ng-disabled='true'></textarea>
</div>
</div>
<div class="form-horizontal new-line">
<div class="row">
<div class="col-lg-7 col-xs-12">
<div class="controls form-inline ">
<input class='score3_1' ng-model='pre.apsform.appropriate' value='1' type='radio' ng-disabled='true'/>
<label class='label1'>เหมาะสม</label>
<input class='score3_2' ng-model='pre.apsform.appropriate' value='0' type='radio' ng-disabled='true'/>
<label class='label2'>ไม่เหมาะสม</label>
<input class='score3_3' ng-model='pre.apsform.appropriate' value='2' type='radio' ng-disabled='true'/>
<label class='label3'>เหมาะกับตำแหน่งอื่น</label>
<label class='label3' ng-show='apsform.appropriate == 2'>(ระบุ)</label>
<input class='form-control extend3' ng-model='pre.apsform.job_other' type='text' ng-disabled='true' ng-show='pre.apsform.appropriate == 2'/>
<label id='job_other'></label>
</div>
</div>
<div class="col-lg-3 hide-print">
<label class="b">ลงชื่อ </label>
<label>{{pre.header.committee_fullname}} </label>
</div>
<div class="col-lg-2 hide-print">
<label> {{pre.header.apsdate}}</label>
<label> ผู้สัมภาษณ์</label>
</div>
</div>
</div>
<div class='spece-bot'></div>
</div>
</div>
</div> <!-- end csc-block-white -->
</div> <!-- end csc-content -->
</form>
......
......@@ -9,6 +9,7 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_DEPT', ['$sc
$scope.contextPath = ''
$scope.headdata = {}
$scope.formdata = {}
$scope.previous = []
let question = new Question()
$scope.examdata = {}
$scope.score2 = ''
......@@ -63,6 +64,7 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_DEPT', ['$sc
InterviewcandidateCtrl.manageInterviewForm.query($scope.myparam).$promise.then(function(data){
$scope.headdata = data.header
$scope.formdata = data.apsform
$scope.previous = data.previous
setFormAPS()
$scope.isReady = true
})
......@@ -92,6 +94,30 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_DEPT', ['$sc
return (result / 50).toFixed(2)
}
$scope.getSumScoreByForm = ($form) => {
let result = 0
if($form != undefined){
for(var i = 0; i < $form.length; i++){
let sform = $form[i];
result += parseInt(sform.score)
}
}
return (result / 50).toFixed(2);
}
$scope.getSumScoreByScoreForm = ($form, score) => {
let result = 0
if($form != undefined){
for(var i = 0; i < $form.length; i++){
let sform = $form[i];
if(sform.score == score){
result += parseInt(sform.score)
}
}
}
return (result / 50).toFixed(2);
}
$scope.getSumScoreByScore = (score) => {
let result = 0
if($scope.formdata.form != undefined){
......
......@@ -150,6 +150,30 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_RESULT', ['$
return result;
}
$scope.getSumScoreByForm = ($form) => {
let result = 0
if($form != undefined){
for(var i = 0; i < $form.length; i++){
let sform = $form[i];
result += parseInt(sform.score)
}
}
return (result / 50).toFixed(2);
}
$scope.getSumScoreByScoreForm = ($form, score) => {
let result = 0
if($form != undefined){
for(var i = 0; i < $form.length; i++){
let sform = $form[i];
if(sform.score == score){
result += parseInt(sform.score)
}
}
}
return (result / 50).toFixed(2);
}
$scope.getSumScoreByScore = (score) => {
let result = 0
if($scope.formdata.form != undefined){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment