Commit a5496baa by peema_phongam

update : interview manger / Ex / seniorEx

parent 43b88a9f
...@@ -18254,7 +18254,31 @@ Terminate,พนักงานพ้นสภาพ]]> ...@@ -18254,7 +18254,31 @@ Terminate,พนักงานพ้นสภาพ]]>
<![CDATA[1]]> <![CDATA[1]]>
</KEY> </KEY>
<VALUE> <VALUE>
<![CDATA[ประธาน,ประธาน]]> <![CDATA[ประธาน(ผู้บริหาร/ผู้จัดการฝ่าย),ประธาน(ผู้บริหาร/ผู้จัดการฝ่าย)]]>
</VALUE>
</DATA>
<DATA>
<KEY>
<![CDATA[2]]>
</KEY>
<VALUE>
<![CDATA[หน.ผ./ผจก.ฝ่ายบุคคล,หน.ผ./ผจก.ฝ่ายบุคคล]]>
</VALUE>
</DATA>
<DATA>
<KEY>
<![CDATA[3]]>
</KEY>
<VALUE>
<![CDATA[ผู้บริหาร BU,ผู้บริหาร BU]]>
</VALUE>
</DATA>
<DATA>
<KEY>
<![CDATA[4]]>
</KEY>
<VALUE>
<![CDATA[Senior Ex Director/COO BU,Senior Ex Director/COO BU]]>
</VALUE> </VALUE>
</DATA> </DATA>
</REFEREE_LEVEL> </REFEREE_LEVEL>
......
...@@ -289,7 +289,7 @@ ...@@ -289,7 +289,7 @@
<DESC_ENG>REFEREE_LEVEL</DESC_ENG> <DESC_ENG>REFEREE_LEVEL</DESC_ENG>
<DESC_THAI>สถานะการประเมิน</DESC_THAI> <DESC_THAI>สถานะการประเมิน</DESC_THAI>
<DEFAULTVALUE>0</DEFAULTVALUE> <DEFAULTVALUE>0</DEFAULTVALUE>
<COMPONENT type="radio"> <COMPONENT type="list">
<ALT_ENG>กำหนดสถานะการประเมิน</ALT_ENG> <ALT_ENG>กำหนดสถานะการประเมิน</ALT_ENG>
<ALT_THAI>กำหนดสถานะการประเมิน</ALT_THAI> <ALT_THAI>กำหนดสถานะการประเมิน</ALT_THAI>
<VALIDCODE>REFEREE_LEVEL</VALIDCODE> <VALIDCODE>REFEREE_LEVEL</VALIDCODE>
......
...@@ -91,7 +91,9 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_RESULT', ['$ ...@@ -91,7 +91,9 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_RESULT', ['$
hr: '', hr: '',
ex: '', ex: '',
seniorEx: '' seniorEx: ''
} },
appropriate: '',
job_other: ''
}] }]
$scope.myparam = { $scope.myparam = {
...@@ -103,11 +105,20 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_RESULT', ['$ ...@@ -103,11 +105,20 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_RESULT', ['$
$scope.headdata = data.header $scope.headdata = data.header
$scope.formdata = data.apsform $scope.formdata = data.apsform
$scope.previous = data.previous $scope.previous = data.previous
setFormAPS() setFormAPS()
$scope.isReady = true $scope.isReady = true
}) })
$scope.$watch('formdata.form', function (data) {
let listActor = ['manager', 'hr', 'ex', 'seniorEx']
if (data[0]) {
$scope.formdata.form[0].sign[listActor[parseInt('4')-1]] = $scope.headdata.committee_fullname
}
})
$scope.getResultHr = () => { $scope.getResultHr = () => {
let result = 0 let result = 0
...@@ -128,7 +139,6 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_RESULT', ['$ ...@@ -128,7 +139,6 @@ angular.module('APS_INTERVIEW').controller('APS_FORM_INTERVIEW_DHAS_RESULT', ['$
let findHr = $scope.previous.find(($item) => { let findHr = $scope.previous.find(($item) => {
return $item.header.dept.toUpperCase() === "DEPT" && $item.header.committeeid === $scope.committeeid return $item.header.dept.toUpperCase() === "DEPT" && $item.header.committeeid === $scope.committeeid
}) })
console.log(findHr)
if(findHr){ if(findHr){
for(var i = 0; i < findHr.apsform.form.length; i++){ for(var i = 0; i < findHr.apsform.form.length; i++){
let form = findHr.apsform.form[i]; let form = findHr.apsform.form[i];
......
...@@ -166,7 +166,7 @@ angular.module('APS_INTERVIEW').controller('listCandidate', ['$scope', '$http', ...@@ -166,7 +166,7 @@ angular.module('APS_INTERVIEW').controller('listCandidate', ['$scope', '$http',
if ($scope.dbName.toUpperCase() === ("STD_NEW")) { if ($scope.dbName.toUpperCase() === ("STD_NEW")) {
pageName = "../APS_FORM_INTERVIEW_DHAS.jsp"; pageName = "../APS_FORM_INTERVIEW_DHAS.jsp";
} else if ($scope.dbName.toUpperCase() === ("DHAS")) { } else if ($scope.dbName.toUpperCase() === ("DHAS")) {
if (list.judge == '1') { if (list.judge > 0) {
pageName = "../APS_FORM_INTERVIEW_DHAS_RESULT.jsp"; pageName = "../APS_FORM_INTERVIEW_DHAS_RESULT.jsp";
} else { } else {
pageName = "../APS_FORM_INTERVIEW_DHAS_DEPT.jsp" pageName = "../APS_FORM_INTERVIEW_DHAS_DEPT.jsp"
......
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
<th><swaplang code="SW000057">Position</swaplang></th> <th><swaplang code="SW000057">Position</swaplang></th>
<th ng-hide="chkPage()"><swaplang code="SW000019">Status</swaplang></th> <th ng-hide="chkPage()"><swaplang code="SW000019">Status</swaplang></th>
<th><swaplang code="SW001055">Sequencing</swaplang></th> <th><swaplang code="SW001055">Sequencing</swaplang></th>
<th class="text-center">ประธา</th> <th class="text-center">สถานะการประเมิ</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
...@@ -190,9 +190,16 @@ ...@@ -190,9 +190,16 @@
</select> </select>
</td> </td>
<td class="text-center"> <td class="text-center">
<md-checkbox ng-if="committee.referee_level == '1'" ng-disabled="haveJudge() && committee.judge !== '1'" ng-model="committee.judge" ng-false-value="'0'" ng-true-value="'1'" aria-label="Judge" ng-change="changeJudge()"> <%-- <span ng-if="committee.referee_level > 1">--%>
<%-- <input type="text" ng-model="committee.judge">--%> <%-- {{refereeStatus[committee.referee_level]}}--%>
<%-- <i class="fa fa-2x fa-check-circle-o" ng-if="committee.referee_level == '1'"></i>--%> <%-- </span>--%>
<%-- <md-checkbox ng-if="committee.referee_level == '1'" ng-disabled="haveJudge() && committee.judge !== '1'" ng-model="committee.judge" ng-false-value="'0'" ng-true-value="'1'" aria-label="Judge" ng-change="changeJudge()">--%>
<select class="form-control" ng-model="committee.judge">
<option ng-repeat="item in refereeStatus | filter:{id:'0'}" value="{{item.id}}">{{ item.desc }}</option>
<option ng-if="committee.referee_level > '0'" ng-repeat="item in refereeStatus | filter:{id:committee.referee_level}" value="{{item.id}}">{{ item.desc }}</option>
</select>
</td> </td>
</tr> </tr>
</tbody> </tbody>
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<th><swaplang code="BU2">bu2</swaplang></th> <th><swaplang code="BU2">bu2</swaplang></th>
<th><swaplang code="BU3">bu3</swaplang></th> <th><swaplang code="BU3">bu3</swaplang></th>
<th><swaplang code="SW003545">job</swaplang></th> <th><swaplang code="SW003545">job</swaplang></th>
<th>ประธา</th> <th>สถานะการประเมิ</th>
</tr> </tr>
</thead> </thead>
<tfoot> <tfoot>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<th><swaplang code="BU2">bu2</swaplang></th> <th><swaplang code="BU2">bu2</swaplang></th>
<th><swaplang code="BU3">bu3</swaplang></th> <th><swaplang code="BU3">bu3</swaplang></th>
<th><swaplang code="SW000057">Position</swaplang></th> <th><swaplang code="SW000057">Position</swaplang></th>
<th>ประธา</th> <th>สถานะการประเมิ</th>
</tr> </tr>
</tfoot> </tfoot>
<tbody> <tbody>
...@@ -43,7 +43,10 @@ ...@@ -43,7 +43,10 @@
<td>{{emp.bu2}}</td> <td>{{emp.bu2}}</td>
<td>{{emp.bu3}}</td> <td>{{emp.bu3}}</td>
<td>{{emp.position}}</td> <td>{{emp.position}}</td>
<td><i ng-if="emp.referee_level == '1'" class="fa fa-check-circle-o"></i></td> <td>
<!-- <i ng-if="emp.referee_level == '1'" class="fa fa-check-circle-o"></i>-->
{{refereeStatus[emp.referee_level]}}
</td>
<td class='hide' ng-if='$last'>{{callDataTable()}}</td> <!--call function DataTable After Load Emplist Data--> <td class='hide' ng-if='$last'>{{callDataTable()}}</td> <!--call function DataTable After Load Emplist Data-->
</tr> </tr>
</tbody> </tbody>
......
...@@ -41,6 +41,20 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial ...@@ -41,6 +41,20 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
eng: 'Success' eng: 'Success'
} }
}] }]
$scope.refereeStatus = [
{id:'0', desc:'กรรมการ'},
{id:'1', desc:'ประธาน(ผู้บริหาร/ผู้จัดการฝ่าย)'},
{id:'2', desc:'หน.ผ./ผจก.ฝ่ายบุคคล'},
{id:'3', desc:'ผู้บริหาร BU'},
{id:'4', desc:'Senior Ex Director/COO BU'},
]
// $scope.refereeStatus = [
// 'กรรมการ',
// 'ประธาน(ผู้บริหาร/ผู้จัดการฝ่าย)',
// 'หน.ผ./ผจก.ฝ่ายบุคคล',
// 'ผู้บริหาร BU',
// 'Senior Ex Director/COO BU'
// ]
let initSeqCommit = () =>{ let initSeqCommit = () =>{
$scope.seqlist = [] $scope.seqlist = []
...@@ -136,6 +150,13 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial ...@@ -136,6 +150,13 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
// MD-Dialog Controller // MD-Dialog Controller
$scope.searchCommitteeCtrl = ($scope, $mdDialog, RecService) => { $scope.searchCommitteeCtrl = ($scope, $mdDialog, RecService) => {
$scope.refereeStatus = [
'กรรมการ',
'ประธาน(ผู้บริหาร/ผู้จัดการฝ่าย)',
'หน.ผ./ผจก.ฝ่ายบุคคล',
'ผู้บริหาร BU',
'Senior Ex Director/COO BU'
]
$scope.referrelist = referrelist $scope.referrelist = referrelist
$scope.hide = () => { $scope.hide = () => {
...@@ -154,13 +175,13 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial ...@@ -154,13 +175,13 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
let setEmptoCOmmitee = (empID, index, ev) => { let setEmptoCOmmitee = (empID, index, ev) => {
let empItem = $filter('filter')(referrelist, {employeeid:empID}, true) let empItem = $filter('filter')(referrelist, {employeeid:empID}, true)
if(chkDuplicateCommittee(empID)){
angular.merge($scope.committee[index], empItem[0] ) angular.merge($scope.committee[index], empItem[0] )
}else{
showAlert(ev) // if(chkDuplicateCommittee(empID)){
} // angular.merge($scope.committee[index], empItem[0] )
// }else{
// showAlert(ev)
// }
// console.log($scope.committee); // console.log($scope.committee);
} }
...@@ -211,7 +232,7 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial ...@@ -211,7 +232,7 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
}); });
} }
}else{ }else{
alert('กรุณาเลือกกรรมการ') // alert('กรุณาเลือกกรรมการ')
} }
} }
...@@ -219,9 +240,17 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial ...@@ -219,9 +240,17 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
let result = false let result = false
for(let i=0;i<$scope.committee.length;i++){ for(let i=0;i<$scope.committee.length;i++){
if($scope.committee[i].employeeid != ''){ if($scope.committee[i].employeeid != ''){
let duplicate = $filter('filter')($scope.committee, {employeeid:$scope.committee[i].employeeid, judge:$scope.committee[i].judge}, true)
if (duplicate.length > 1) {
alert('รหัสกรรมการ ' + $scope.committee[i].employeeid + ' มีข้อมูลที่ซ้ำกัน')
result = false
break
}
result = true result = true
}else{ }else{
alert('กรุณาเลือกกรรมการ')
result = false result = false
break
} }
} }
return result return result
...@@ -250,7 +279,7 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial ...@@ -250,7 +279,7 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
savetype : save_type, savetype : save_type,
del_olddata : $scope.del_olddata del_olddata : $scope.del_olddata
} }
console.log(obj_param); // console.log(obj_param);
return obj_param return obj_param
} }
...@@ -289,7 +318,7 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial ...@@ -289,7 +318,7 @@ angular.module('RECRUIT').controller('CommitteeSetup', function ($scope, $mdDial
if ($scope.dbName.toUpperCase() === ("STD_NEW")) { if ($scope.dbName.toUpperCase() === ("STD_NEW")) {
pageName = "../APS_FORM_INTERVIEW_DHAS.jsp"; pageName = "../APS_FORM_INTERVIEW_DHAS.jsp";
} else if ($scope.dbName.toUpperCase() === ("DHAS")) { } else if ($scope.dbName.toUpperCase() === ("DHAS")) {
if (judge == '1') { if (judge && parseInt(judge) > 0) {
pageName = "../APS_FORM_INTERVIEW_DHAS_RESULT.jsp"; pageName = "../APS_FORM_INTERVIEW_DHAS_RESULT.jsp";
} else { } else {
pageName = "../APS_FORM_INTERVIEW_DHAS_DEPT.jsp" pageName = "../APS_FORM_INTERVIEW_DHAS_DEPT.jsp"
......
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