
+++ client/resources/api/userYryc.js
... | ... | @@ -0,0 +1,6 @@ |
1 | +import { apiClient } from "./index"; | |
2 | + | |
3 | +// 사용자 연차 초과 신청 여부 조회 | |
4 | +export const findUserExcessReqstAtProc = () => { | |
5 | + return apiClient.get('/userYryc/findUserExcessReqstAt.json'); | |
6 | +}(파일 끝에 줄바꿈 문자 없음) |
--- client/views/pages/Manager/attendance/VcatnInsert.vue
+++ client/views/pages/Manager/attendance/VcatnInsert.vue
... | ... | @@ -59,6 +59,9 @@ |
59 | 59 |
<EditorComponent v-model:contents="vacationCnsul.detailCn" /> |
60 | 60 |
</td> |
61 | 61 |
</tr> |
62 |
+ <tr class="red" v-if="excessReqst"> |
|
63 |
+ <td colspan="2">금년도 연차 소진으로 인해 내년도 연차를 선 사용하는 휴가 신청건입니다.</td> |
|
64 |
+ </tr> |
|
62 | 65 |
</tbody> |
63 | 66 |
</table> |
64 | 67 |
</div> |
... | ... | @@ -81,6 +84,7 @@ |
81 | 84 |
import EditorComponent from '../../../component/editor/EditorComponent.vue'; |
82 | 85 |
// API |
83 | 86 |
import { findVcatnKndsProc, findVcatnProc, saveVcatnProc, findLastVcatnProc, updateVcatnProc, reapplyVcatnProc } from '../../../../resources/api/vcatn'; |
87 |
+import { findUserExcessReqstAtProc } from '../../../../resources/api/userYryc'; |
|
84 | 88 |
|
85 | 89 |
export default { |
86 | 90 |
name: 'VacationInsert', |
... | ... | @@ -129,6 +133,7 @@ |
129 | 133 |
}, |
130 | 134 |
vacationTypes: [], |
131 | 135 |
approvalCodes: [], |
136 |
+ excessReqst: false, |
|
132 | 137 |
}; |
133 | 138 |
}, |
134 | 139 |
|
... | ... | @@ -158,6 +163,7 @@ |
158 | 163 |
this.pageId = this.$route.query.id; |
159 | 164 |
this.pageMode = this.$route.query.type; |
160 | 165 |
|
166 |
+ await this.fetchUserExcessReqstAt(); // 사용자 연차 초과 신청 여부 조회 |
|
161 | 167 |
await this.fetchVacationTypes(); // 휴가 유형 조회 |
162 | 168 |
this.approvalCodes = await this.$findChildCodes('sanctn_code'); // 결재 구분 조회 |
163 | 169 |
}, |
... | ... | @@ -169,6 +175,30 @@ |
169 | 175 |
}, |
170 | 176 |
|
171 | 177 |
methods: { |
178 |
+ // 사용자 연차 초과 신청 여부 조회 |
|
179 |
+ async fetchUserExcessReqstAt() { |
|
180 |
+ try { |
|
181 |
+ const response = await findUserExcessReqstAtProc(); |
|
182 |
+ const result = response.data.data; |
|
183 |
+ |
|
184 |
+ this.excessReqst = result.isNegativeAnnualLeave; |
|
185 |
+ if (this.excessReqst) { |
|
186 |
+ const chk = confirm("금년도 연차를 모두 소진하였습니다.\n내년도 연차를 미리 사용하시겠습니까?"); |
|
187 |
+ if (!chk) { |
|
188 |
+ this.handleNavigation('list'); |
|
189 |
+ } |
|
190 |
+ } else { |
|
191 |
+ if (result.isTotalCntOver) { |
|
192 |
+ alert("이미 금년도 연차 보유 수 만큼 휴가를 신청한 상태입니다.\n마이너스 이월은 기존 휴가 신청이 모두 승인된 뒤 신청 가능합니다."); |
|
193 |
+ this.handleNavigation('list'); |
|
194 |
+ } |
|
195 |
+ } |
|
196 |
+ } catch (error) { |
|
197 |
+ this.handleError(error); |
|
198 |
+ this.handleNavigation('list'); |
|
199 |
+ } |
|
200 |
+ }, |
|
201 |
+ |
|
172 | 202 |
// 휴가 유형 조회 |
173 | 203 |
async fetchVacationTypes() { |
174 | 204 |
try { |
... | ... | @@ -536,8 +566,17 @@ |
536 | 566 |
endMnt: this.vacationInfo.endMnt, |
537 | 567 |
detailCn: this.vacationCnsul.detailCn, |
538 | 568 |
sanctnList: sanctnList, |
569 |
+ excessReqstAt: this.excessReqst ? 'Y' : 'N', |
|
539 | 570 |
}; |
540 | 571 |
}, |
541 | 572 |
}, |
542 | 573 |
}; |
543 |
-</script>(파일 끝에 줄바꿈 문자 없음) |
|
574 |
+</script> |
|
575 |
+<style scoped> |
|
576 |
+.red th, |
|
577 |
+.red td { |
|
578 |
+ text-align: center; |
|
579 |
+ color: #fb2c36 !important; |
|
580 |
+ background-color: #fef2f2 !important; |
|
581 |
+} |
|
582 |
+</style>(파일 끝에 줄바꿈 문자 없음) |
--- client/views/pages/Manager/attendance/VcatnList.vue
+++ client/views/pages/Manager/attendance/VcatnList.vue
... | ... | @@ -16,11 +16,11 @@ |
16 | 16 |
</div> |
17 | 17 |
<div class="boxs"> |
18 | 18 |
<div class="color-boxs"> |
19 |
- <div class="box" @click="handleFilterChange()"> |
|
19 |
+ <div class="box"> |
|
20 | 20 |
<h3>전체</h3> |
21 | 21 |
<div> |
22 |
- <span>{{ totalDays }}</span> |
|
23 |
- <small>({{ carriedOverDays }})</small> |
|
22 |
+ <span @click="handleFilterChange()">{{ totalDays }}</span> |
|
23 |
+ <small @click="handleExcessReqst(usedLeaveItem.code)">({{ carriedOverDays }})</small> |
|
24 | 24 |
</div> |
25 | 25 |
</div> |
26 | 26 |
<div class="box" @click="handleFilterChange(usedLeaveItem.code)"> |
... | ... | @@ -161,8 +161,20 @@ |
161 | 161 |
await this.handlePageChange(1); |
162 | 162 |
}, |
163 | 163 |
|
164 |
+ // 마이너스 이월 |
|
165 |
+ async handleExcessReqst(vcatnKnd) { |
|
166 |
+ this.searchParams.excessReqstAt = 'Y'; |
|
167 |
+ this.searchParams.vcatnKnd = vcatnKnd; |
|
168 |
+ await this.handlePageChange(1); |
|
169 |
+ }, |
|
170 |
+ |
|
164 | 171 |
// 필터 변경 핸들러 |
165 | 172 |
async handleFilterChange(vcatnKnd) { |
173 |
+ if (this.$isEmpty(vcatnKnd)) { |
|
174 |
+ this.searchParams.excessReqstAt = null; |
|
175 |
+ } else { |
|
176 |
+ this.searchParams.excessReqstAt = 'N'; |
|
177 |
+ } |
|
166 | 178 |
this.searchParams.vcatnKnd = vcatnKnd; |
167 | 179 |
await this.handlePageChange(1); |
168 | 180 |
}, |
--- client/views/pages/Manager/attendance/VcatnView.vue
+++ client/views/pages/Manager/attendance/VcatnView.vue
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 |
</tr> |
23 | 23 |
<tr> |
24 | 24 |
<th>기간</th> |
25 |
- <td colspan="3">{{ $formattedDates(vacationInfo) }}</td> |
|
25 |
+ <td colspan="3">{{ $formattedDates(vacationInfo) }} ({{ vacationInfo.totalDays }}일)</td> |
|
26 | 26 |
</tr> |
27 | 27 |
<tr> |
28 | 28 |
<th>세부사항</th> |
... | ... | @@ -42,9 +42,8 @@ |
42 | 42 |
<th>반려사유</th> |
43 | 43 |
<td colspan="3">{{ getRejectionReason(vacationInfo.sanctnList) }}</td> |
44 | 44 |
</tr> |
45 |
- <!-- 붉은 색 등 하여간 눈에 띄게 표기해야 함!! --> |
|
46 |
- <tr> |
|
47 |
- <td colspan="4">금년도 연차 소진으로 내년도 연차를 선 사용하는 휴가 신청건입니다.</td> |
|
45 |
+ <tr class="red" v-if="vacationInfo.excessReqstAt === 'Y'"> |
|
46 |
+ <td colspan="4">금년도 연차 소진으로 인해 내년도 연차를 선 사용하는 휴가 신청건입니다.</td> |
|
48 | 47 |
</tr> |
49 | 48 |
</tbody> |
50 | 49 |
</table> |
... | ... | @@ -107,6 +106,7 @@ |
107 | 106 |
detailCn: null, |
108 | 107 |
confmAtNm: null, |
109 | 108 |
rgsde: null, |
109 |
+ excessReqstAt: 'N', |
|
110 | 110 |
sanctnList: [] |
111 | 111 |
}, |
112 | 112 |
returnResn: null, |
... | ... | @@ -254,4 +254,12 @@ |
254 | 254 |
}, |
255 | 255 |
} |
256 | 256 |
}; |
257 |
-</script>(파일 끝에 줄바꿈 문자 없음) |
|
257 |
+</script> |
|
258 |
+<style scoped> |
|
259 |
+.red th, |
|
260 |
+.red td { |
|
261 |
+ text-align: center; |
|
262 |
+ color: #fb2c36 !important; |
|
263 |
+ background-color: #fef2f2 !important; |
|
264 |
+} |
|
265 |
+</style>(파일 끝에 줄바꿈 문자 없음) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?