
--- client/views/pages/adm/preferences/commonCodeManagement/CommonCodeManagement.vue
+++ client/views/pages/adm/preferences/commonCodeManagement/CommonCodeManagement.vue
... | ... | @@ -206,15 +206,26 @@ |
206 | 206 |
}, |
207 | 207 |
// 최상위 신규 객체 생성 |
208 | 208 |
topAdd() { |
209 |
+ if (this.selectedCd != null) { |
|
210 |
+ if (!confirm("작성 중인 공통코드정보는 저장되지 않습니다.\n계속 하시겠습니까?")) { |
|
211 |
+ return; |
|
212 |
+ } |
|
213 |
+ } |
|
214 |
+ this.selectedCd = null; // 선택된 코드 초기화 |
|
209 | 215 |
this.viewCode = JSON.parse(JSON.stringify(this.newCode)); |
210 | 216 |
this.originCode = this.viewCode.cd; |
211 | 217 |
this.submitStts = true; |
212 | 218 |
}, |
213 | 219 |
// 하위 신규 객체 생성 |
214 | 220 |
subAdd() { |
215 |
- if (Object.keys(this.viewCode).length === 0) { |
|
221 |
+ // if (Object.keys(this.viewCode).length === 0) { |
|
222 |
+ if (this.selectedCd == null) { |
|
216 | 223 |
alert("상위 코드를 지정해주세요."); |
217 | 224 |
return; |
225 |
+ } else { |
|
226 |
+ if (!confirm("작성 중인 공통코드정보는 저장되지 않습니다.\n계속 하시겠습니까?")) { |
|
227 |
+ return; |
|
228 |
+ } |
|
218 | 229 |
} |
219 | 230 |
const upCd = this.viewCode.cd; |
220 | 231 |
const upCdNm = this.viewCode.cdNm; |
... | ... | @@ -253,10 +264,14 @@ |
253 | 264 |
// axios: 목록 수정 |
254 | 265 |
async fnListUpdate() { |
255 | 266 |
try { |
267 |
+ if (!confirm("공통코드 목록을 저장하시겠습니까?\n 작성 중인 공통코드정보는 저장되지 않습니다.")) { |
|
268 |
+ return; |
|
269 |
+ } |
|
256 | 270 |
const res = await updateListProc(this.codeList); |
257 | 271 |
alert(res.data.message); |
258 | 272 |
if (res.status == 200) { |
259 | 273 |
this.findAll(); |
274 |
+ this.findByCd(); |
|
260 | 275 |
} |
261 | 276 |
} catch (error) { |
262 | 277 |
alert(error.res.data.message); |
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?