Commit 97ca0bdb by peema_phongam

result hr / dept score

parent b82e63b6
......@@ -45,7 +45,7 @@
<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()%>/JS/EMPVIEW_FUNC.js"></script>
<%-- <script type="text/javascript" src="<%=request.getContextPath()%>/JS/EMPVIEW_FUNC.js"></script>--%>
<script type='text/javascript' src='<%=request.getContextPath()%>/JS/urljobboard.js'></script>
......@@ -78,6 +78,9 @@
<input type='hidden' name='committeeid' value='<%=p_committeeid%>'/>
<input type='hidden' name='judge' value='<%=p_judge%>'/>
<input type='hidden' name='notedit' value='<%=p_notedit%>'/>
<div ng-hide="isReady" class='loading-page'>
<div class='spiner'></div>
</div>
<div class='container csc-content' id='target_warpper'>
<div class='csc-block-white'>
......@@ -435,7 +438,7 @@
<div class="col-lg-3 hide-print">
<label class="b">ลงชื่อ </label>
<label>{{headdata.committee_fullname}} </label>
<label>{{formdata.committee_fullname}} </label>
</div>
<div class="col-lg-2 hide-print">
<label>{{(formdata.apsdate | date : 'yyyy-MM-dd') | ddmmyyyyDate}}</label>
......@@ -445,7 +448,7 @@
<div class="col-xs-5 show-print"></div>
<div class="col-xs-4 show-print">
<label class="b">ลงชื่อ </label>
<label>{{headdata.committee_fullname}} </label>
<label>{{formdata.committee_fullname}} </label>
</div>
<div class="col-xs-3 show-print">
<label> {{(formdata.apsdate | date : 'yyyy-MM-dd') | ddmmyyyyDate}}</label>
......
......@@ -74,6 +74,9 @@
<input type='hidden' name='committeeid' value='<%=p_committeeid%>'/>
<input type='hidden' name='judge' value='<%=p_judge%>'/>
<input type='hidden' name='notedit' value='<%=p_notedit%>'/>
<div ng-hide="isReady" class='loading-page'>
<div class='spiner'></div>
</div>
<div class='container csc-content' id='target_warpper'>
<div class='csc-block-white'>
<div class='table-responsive'>
......
......@@ -68,6 +68,9 @@
<input type='hidden' name='committeeid' value='<%=p_committeeid%>'/>
<input type='hidden' name='judge' value='<%=p_judge%>'/>
<input type='hidden' name='notedit' value='<%=p_notedit%>'/>
<div ng-hide="isReady" class='loading-page'>
<div class='spiner'></div>
</div>
<div class='container csc-content' id='target_warpper'>
<div class='csc-block-white'>
<div class='table-responsive'>
......@@ -97,9 +100,9 @@
<%-- <td colspan='3'>{{headdata.bu2}}</td>--%>
<%-- </tr>--%>
<tr>
<td class='b' colspan="5">ผลการประเมินฝ่ายบุคคล <input type="text" ng-model="formdata.form[0].percentFromHr" ng-disabled='headdata.status == 2 || notedit'> %</td>
<td class='b' colspan="5">ผลการประเมินฝ่ายบุคคล {{getResultHr() | number:0}} %</td>
<td class='b' style="width:50%">ผลประเมินจากหน่วยงาน <input type="text" ng-model="formdata.form[0].percentFromDept" ng-disabled='headdata.status == 2 || notedit'> %</td>
<td class='b' style="width:50%">ผลประเมินจากหน่วยงาน {{getResultDept() | number:0}} %</td>
</tr>
</table>
......
......@@ -24,6 +24,7 @@
<body>
<div class='bg-com'></div>
<jsp:include page="EMV_HEADMENU.jsp" flush="true" />
<link rel="stylesheet" href="<%=request.getContextPath()%>/EMPVIEW/css/APP_UP/style_apsup.css" />
<link rel="stylesheet" href="css/Recruit.css"/>
<script type="text/javascript" src='../public/lib/angular-resource/angular-resource.min.js'></script>
......@@ -49,6 +50,9 @@
<section ng-controller='listCandidate'>
<div class="container csc-content">
<form name="cscform" class="form-horizontal" method="post">
<div ng-hide="isReady" class='loading-page'>
<div class='spiner'></div>
</div>
<input type='hidden' name='candidateid'/>
<input type='hidden' name='judge'/>
<input type='hidden' name='committeeid' value='<%=up.get("employeeid")%>' />
......@@ -58,9 +62,8 @@
<input type="hidden" name="__screen">
<input type="hidden" name="__fixCon">
<div class='loading-page'>
<div class='spiner'></div>
</div>
<div class="csc-block">
<div class="center">
......
......@@ -43,7 +43,7 @@
<input type='hidden' name='judge'/>
<div class='loading-page'>
<div ng-hide="isReady" class='loading-page'>
<div class='spiner'></div>
</div>
......
......@@ -14,6 +14,7 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_DEPT', ['$sc
$scope.score2 = ''
$scope.score3 = ''
$scope.score4 = ''
$scope.isReady = false
let DocumentContainer
let WindowObject
......@@ -63,8 +64,7 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_DEPT', ['$sc
$scope.headdata = data.header
$scope.formdata = data.apsform
setFormAPS()
console.log(data)
$scope.isReady = true
})
......
......@@ -9,11 +9,13 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_RESULT', ['$
$scope.contextPath = ''
$scope.headdata = {}
$scope.formdata = {}
$scope.previous = []
let question = new Question()
$scope.examdata = {}
$scope.score2 = ''
$scope.score3 = ''
$scope.score4 = ''
$scope.isReady = false
let DocumentContainer
let WindowObject
......@@ -86,12 +88,44 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_RESULT', ['$
InterviewcandidateCtrl.manageInterviewForm.query($scope.myparam).$promise.then(function(data){
$scope.headdata = data.header
$scope.formdata = data.apsform
$scope.previous = data.previous
setFormAPS()
console.log(data)
$scope.isReady = true
})
$scope.getResultHr = () => {
let result = 0
let findHr = $scope.previous.find(($item) => {
return $item.header.dept.toUpperCase() === "HR"
})
if(findHr){
for(var i = 0; i < findHr.apsform.form.length; i++){
let form = findHr.apsform.form[i];
result += parseInt(form.score)
}
}
return (result / 50) * 100;
}
$scope.getResultDept = () => {
let result = 0
let findHr = $scope.previous.find(($item) => {
return $item.header.dept.toUpperCase() === "DEPT" && $item.header.committeeid === $scope.committeeid
})
console.log(findHr)
if(findHr){
for(var i = 0; i < findHr.apsform.form.length; i++){
let form = findHr.apsform.form[i];
result += parseInt(form.score)
}
}
return (result / 50) * 100;
}
let setFormAPS = () => {
if($scope.formdata.form == ''){
$scope.formdata.form = $scope.apsform
......
......@@ -9,6 +9,7 @@ angular.module('APS_INTERVIEW').controller('InterviewForm', ['$scope', '$http',
$scope.candidate = {}
$scope.hrFullname = ''
$scope.hrJob = ''
$scope.isReady = false
$scope.contextPath = ''
$scope.headdata = {
fullname: '',
......@@ -86,9 +87,9 @@ angular.module('APS_INTERVIEW').controller('InterviewForm', ['$scope', '$http',
$scope.formdata = $scope.candidate.other.apsform
} else {
$scope.formdata.apsdate = new Date()
$scope.formdata.committee_fullname = $scope.hrFullname
$scope.formdata.committeeid = $scope.committeeid
}
// $scope.headdata.committee_fullname = $scope.hrFullname
// $scope.headdata.jobrouter = $scope.candidate.jobrouter
setFormAPS()
setExamData1()
......@@ -96,6 +97,7 @@ angular.module('APS_INTERVIEW').controller('InterviewForm', ['$scope', '$http',
setExamScore3()
setExamScore4()
setExamScore5()
$scope.isReady = true
})
......@@ -224,7 +226,7 @@ angular.module('APS_INTERVIEW').controller('InterviewForm', ['$scope', '$http',
result += parseInt(form.score)
}
}
return result;
return (result / 50).toFixed(2)
}
$scope.getSumScoreByScore = (score) => {
......@@ -237,7 +239,7 @@ angular.module('APS_INTERVIEW').controller('InterviewForm', ['$scope', '$http',
}
}
}
return result;
return (result / 50).toFixed(2)
}
$scope.addComment = () => {
......@@ -256,7 +258,7 @@ angular.module('APS_INTERVIEW').controller('InterviewForm', ['$scope', '$http',
$scope.formdata.status = 1
let model = {
candidateid: $scope.candidate.candidateid,
apsform: $scope.formdata
apsform: $scope.formdata
}
RecService.RestMcandidate.updateApsForm(model).$promise.then(function () {
alert(MyCode[18]);
......
......@@ -10,6 +10,7 @@ angular.module('APS_INTERVIEW').controller('listCandidate', ['$scope', '$http',
$scope.reverse = true
$scope.openReqs = []
$scope.listcandidate = []
$scope.isReady = false
//master data
$scope.status_desc = {
......@@ -152,7 +153,7 @@ angular.module('APS_INTERVIEW').controller('listCandidate', ['$scope', '$http',
InterviewcandidateCtrl.managelistcandidate.query().$promise.then(function(data){
$scope.listcandidate = data.listcandidateData;
// console.log($scope.listcandidate);
$('.loading-page').css('display', 'none')
$scope.isReady = true
})
$scope.goPage = function (list) {
......
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