
--- client/resources/api/bsrp.js
+++ client/resources/api/bsrp.js
... | ... | @@ -33,4 +33,9 @@ |
33 | 33 |
// 출장 정보, 출장 품의 재신청 |
34 | 34 |
export const reapplyBsrpProc = (id, data) => { |
35 | 35 |
return apiClient.post(`/bsrp/${id}/reapplyBsrp.json`, data); |
36 |
+} |
|
37 |
+ |
|
38 |
+// 출장 정보, 출장 품의 수정 |
|
39 |
+export const cancelBsrpCnsulProc = (data) => { |
|
40 |
+ return apiClient.put(`/bsrp/${data}/cancelBsrpCnsul.json`); |
|
36 | 41 |
}(파일 끝에 줄바꿈 문자 없음) |
--- client/resources/api/bsrpRport.js
+++ client/resources/api/bsrpRport.js
... | ... | @@ -28,4 +28,9 @@ |
28 | 28 |
// 출장 복명 재신청 |
29 | 29 |
export const reapplyBsrpRport = data => { |
30 | 30 |
return fileClient.post('/bsrpRport/reapplyBsrpRport.file', data); |
31 |
+} |
|
32 |
+ |
|
33 |
+// 출장 복명 수정 |
|
34 |
+export const cancelBsrpRportProc = data => { |
|
35 |
+ return fileClient.put(`/bsrpRport/${data}/cancelBsrpRport.json`); |
|
31 | 36 |
}(파일 끝에 줄바꿈 문자 없음) |
--- client/resources/api/vcatn.js
+++ client/resources/api/vcatn.js
... | ... | @@ -43,4 +43,9 @@ |
43 | 43 |
// 휴가 재신청 |
44 | 44 |
export const reapplyVcatnProc = (id, data) => { |
45 | 45 |
return apiClient.post(`/vcatn/${id}/reapplyVcatn.json`, data); |
46 |
+} |
|
47 |
+ |
|
48 |
+// 휴가 취소 |
|
49 |
+export const cancelVcatnProc = (data) => { |
|
50 |
+ return apiClient.put(`/vcatn/${data}/cancelVcatn.json`); |
|
46 | 51 |
}(파일 끝에 줄바꿈 문자 없음) |
--- client/views/component/bsrp/BsrpRportView.vue
+++ client/views/component/bsrp/BsrpRportView.vue
... | ... | @@ -53,6 +53,9 @@ |
53 | 53 |
<button type="button" class="btn sm secondary" @click="handleNavigation('bsrpRportReapply', pageId)">복명서 재신청</button> |
54 | 54 |
</template> |
55 | 55 |
</template> |
56 |
+ <template v-if="isCancelable"> |
|
57 |
+ <button type="button" class="btn sm secondary" @click="handleCancel">취소</button> |
|
58 |
+ </template> |
|
56 | 59 |
<button type="button" class="btn sm tertiary" @click="handleNavigation('list')">목록</button> |
57 | 60 |
</div> |
58 | 61 |
<ReturnPopup v-if="showReportPopup" @close="showReportPopup = false" @confirm="handleRejection" /> |
... | ... | @@ -144,6 +147,15 @@ |
144 | 147 |
); |
145 | 148 |
return mySanctn && mySanctn.confmAt === 'W' && this.pageMode === 'sanctns'; |
146 | 149 |
}, |
150 |
+ |
|
151 |
+ // 취소 가능 여부 |
|
152 |
+ isCancelable() { |
|
153 |
+ const sanctnList = this.bsrpRport.sanctnList; |
|
154 |
+ const mySanctn = sanctnList.find( |
|
155 |
+ item => item.confmerId == this.$store.state.userInfo.userId |
|
156 |
+ ); |
|
157 |
+ return ((mySanctn && this.pageMode === 'sanctns') || this.isApplicant) && this.reportSanctnStatus === 'approved'; |
|
158 |
+ }, |
|
147 | 159 |
}, |
148 | 160 |
|
149 | 161 |
mounted() { |
... | ... | @@ -208,6 +220,20 @@ |
208 | 220 |
} |
209 | 221 |
}, |
210 | 222 |
|
223 |
+ // 복명 취소 (결재 승인 취소) |
|
224 |
+ async handleCancel() { |
|
225 |
+ const isCheck = confirm("출장 복명을 취소하시겠습니까?"); |
|
226 |
+ if (!isCheck) return; |
|
227 |
+ |
|
228 |
+ try { |
|
229 |
+ await cancelVcatnProc(this.pageId); |
|
230 |
+ alert("출장 복명이 취소되었습니다."); |
|
231 |
+ this.handleNavigation('view', this.pageId); |
|
232 |
+ } catch (error) { |
|
233 |
+ this.handleError(error); |
|
234 |
+ } |
|
235 |
+ }, |
|
236 |
+ |
|
211 | 237 |
// 첨부 파일 다운로드 핸들러 |
212 | 238 |
async handleDownload(fileOrdr) { |
213 | 239 |
const selectedFile = this.bsrpRport.fileList.find(file => file.ordr == fileOrdr); |
--- client/views/pages/Manager/attendance/BsrpView.vue
+++ client/views/pages/Manager/attendance/BsrpView.vue
... | ... | @@ -100,6 +100,9 @@ |
100 | 100 |
<button type="button" class="btn sm primary" @click="handleNavigation('bsrpRportInsert', pageId)">복명서 작성</button> |
101 | 101 |
</template> |
102 | 102 |
</template> |
103 |
+ <template v-if="isCancelable"> |
|
104 |
+ <button type="button" class="btn sm secondary" @click="handleCancel">취소</button> |
|
105 |
+ </template> |
|
103 | 106 |
<button type="button" class="btn sm tertiary" @click="handleNavigation('list')">목록</button> |
104 | 107 |
</div> |
105 | 108 |
<!-- 출장 복명서 --> |
... | ... | @@ -114,7 +117,7 @@ |
114 | 117 |
import ViewerComponent from '../../../component/editor/ViewerComponent.vue'; |
115 | 118 |
import BsrpRportView from '../../../component/bsrp/BsrpRportView.vue'; |
116 | 119 |
// API |
117 |
-import { findBsrpProc, deleteBsrpProc } from '../../../../resources/api/bsrp'; |
|
120 |
+import { findBsrpProc, deleteBsrpProc, cancelBsrpCnsulProc } from '../../../../resources/api/bsrp'; |
|
118 | 121 |
import { updateConfmAtProc } from '../../../../resources/api/sanctns'; |
119 | 122 |
|
120 | 123 |
export default { |
... | ... | @@ -207,7 +210,16 @@ |
207 | 210 |
} |
208 | 211 |
|
209 | 212 |
return userList; |
210 |
- } |
|
213 |
+ }, |
|
214 |
+ |
|
215 |
+ // 취소 가능 여부 |
|
216 |
+ isCancelable() { |
|
217 |
+ const sanctnList = this.bsrpCnsul.sanctnList; |
|
218 |
+ const mySanctn = sanctnList.find( |
|
219 |
+ item => item.confmerId == this.$store.state.userInfo.userId |
|
220 |
+ ); |
|
221 |
+ return ((mySanctn && this.pageMode === 'sanctns') || this.isApplicant) && this.sanctnStatus === 'approved'; |
|
222 |
+ }, |
|
211 | 223 |
}, |
212 | 224 |
|
213 | 225 |
async created() { |
... | ... | @@ -285,6 +297,20 @@ |
285 | 297 |
} |
286 | 298 |
}, |
287 | 299 |
|
300 |
+ // 출장 취소 (결재 승인 취소) |
|
301 |
+ async handleCancel() { |
|
302 |
+ const isCheck = confirm("출장 품의를 취소하시겠습니까?"); |
|
303 |
+ if (!isCheck) return; |
|
304 |
+ |
|
305 |
+ try { |
|
306 |
+ await cancelBsrpCnsulProc(this.pageId); |
|
307 |
+ alert("출장 품의를 취소했습니다."); |
|
308 |
+ this.handleNavigation('view', this.pageId); |
|
309 |
+ } catch (error) { |
|
310 |
+ this.handleError(error); |
|
311 |
+ } |
|
312 |
+ }, |
|
313 |
+ |
|
288 | 314 |
// 반려 결재 핸들러 |
289 | 315 |
async handleRejection(reason) { |
290 | 316 |
this.returnResn = reason; |
--- client/views/pages/Manager/attendance/VcatnInsert.vue
+++ client/views/pages/Manager/attendance/VcatnInsert.vue
... | ... | @@ -566,7 +566,6 @@ |
566 | 566 |
endMnt: this.vacationInfo.endMnt, |
567 | 567 |
detailCn: this.vacationCnsul.detailCn, |
568 | 568 |
sanctnList: sanctnList, |
569 |
- excessReqstAt: this.excessReqst ? 'Y' : 'N', |
|
570 | 569 |
}; |
571 | 570 |
}, |
572 | 571 |
}, |
--- client/views/pages/Manager/attendance/VcatnView.vue
+++ client/views/pages/Manager/attendance/VcatnView.vue
... | ... | @@ -63,6 +63,9 @@ |
63 | 63 |
<button type="button" class="btn sm secondary" @click="handleNavigation('reapply', pageId)">재신청</button> |
64 | 64 |
</template> |
65 | 65 |
</template> |
66 |
+ <template v-if="isCancelable"> |
|
67 |
+ <button type="button" class="btn sm secondary" @click="handleCancel">취소</button> |
|
68 |
+ </template> |
|
66 | 69 |
<button type="button" class="btn sm tertiary" @click="handleNavigation('list')">목록</button> |
67 | 70 |
</div> |
68 | 71 |
</div> |
... | ... | @@ -74,7 +77,7 @@ |
74 | 77 |
import ViewerComponent from '../../../component/editor/ViewerComponent.vue'; |
75 | 78 |
import SanctnViewList from '../../../component/Sanctn/SanctnViewList.vue'; |
76 | 79 |
// API |
77 |
-import { findVcatnProc, deleteVcatnProc } from '../../../../resources/api/vcatn'; |
|
80 |
+import { findVcatnProc, deleteVcatnProc, cancelVcatnProc } from '../../../../resources/api/vcatn'; |
|
78 | 81 |
import { updateConfmAtProc } from '../../../../resources/api/sanctns'; |
79 | 82 |
|
80 | 83 |
export default { |
... | ... | @@ -145,6 +148,15 @@ |
145 | 148 |
item => item.confmerId == this.$store.state.userInfo.userId |
146 | 149 |
); |
147 | 150 |
return mySanctn && mySanctn.confmAt === 'W' && this.pageMode === 'sanctns'; |
151 |
+ }, |
|
152 |
+ |
|
153 |
+ // 취소 가능 여부 |
|
154 |
+ isCancelable() { |
|
155 |
+ const sanctnList = this.vacationInfo.sanctnList; |
|
156 |
+ const mySanctn = sanctnList.find( |
|
157 |
+ item => item.confmerId == this.$store.state.userInfo.userId |
|
158 |
+ ); |
|
159 |
+ return ((mySanctn && this.pageMode === 'sanctns') || this.isApplicant) && this.approvalStatus === 'approved'; |
|
148 | 160 |
}, |
149 | 161 |
}, |
150 | 162 |
|
... | ... | @@ -223,6 +235,20 @@ |
223 | 235 |
} |
224 | 236 |
}, |
225 | 237 |
|
238 |
+ // 휴가 취소 (결재 승인 취소) |
|
239 |
+ async handleCancel() { |
|
240 |
+ const isCheck = confirm("휴가를 취소하시겠습니까?"); |
|
241 |
+ if (!isCheck) return; |
|
242 |
+ |
|
243 |
+ try { |
|
244 |
+ await cancelVcatnProc(this.pageId); |
|
245 |
+ alert("휴가가 취소되었습니다."); |
|
246 |
+ this.handleNavigation('view', this.pageId); |
|
247 |
+ } catch (error) { |
|
248 |
+ this.handleError(error); |
|
249 |
+ } |
|
250 |
+ }, |
|
251 |
+ |
|
226 | 252 |
// 페이지 이동 핸들러 |
227 | 253 |
handleNavigation(type, id) { |
228 | 254 |
const routeMap = { |
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?