Commit 97ca0bdb by peema_phongam

result hr / dept score

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