From da3e497e9c7134e39349cc77fe8d84e93b6999b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=95=EC=A4=80=EC=8B=9D=28PJS=29?= Date: Wed, 25 Feb 2026 11:20:10 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BD=94=EB=93=9C=20=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=EB=B0=8F=20=EC=A7=84=EB=A3=8C=EC=9C=A0=ED=98=95=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../settings/code/ctrl/CodeController.java | 188 ++++++++++++ .../madeu/crm/settings/code/dto/CodeDTO.java | 18 ++ .../crm/settings/code/dto/CodeGroupDTO.java | 15 + .../crm/settings/code/mapper/CodeMapper.java | 44 +++ .../settings/code/service/CodeService.java | 141 +++++++++ .../ctrl/MedicalCategoryController.java | 51 ++- .../mappers/crm/settings/code/CodeMapper.xml | 216 +++++++++++++ .../medicalcategory/MedicalCategoryMapper.xml | 4 +- .../static/js/web/settings/code/codeList.js | 178 +++++++++++ .../web/settings/code/popup/codeGroupPop.js | 131 ++++++++ .../js/web/settings/code/popup/codePop.js | 141 +++++++++ .../medicalcategory/medicalCategoryList.js | 82 +++-- .../popup/medicalCategoryInfoPop.js | 290 ------------------ .../popup/medicalCategoryInfoPopDept1.js | 135 ++++++++ .../popup/medicalCategoryInfoPopDept2.js | 144 +++++++++ .../popup/medicalCategoryInfoPopDept3.js | 144 +++++++++ .../popup/medicalCategoryInfoPopDept4.js | 172 +++++++++++ .../popup/medicalCategoryInfoPopDept5.js | 144 +++++++++ .../templates/web/settings/code/codeList.html | 132 ++++++++ .../web/settings/code/popup/codeGroupPop.html | 175 +++++++++++ .../web/settings/code/popup/codePop.html | 195 ++++++++++++ .../medicalcategory/medicalCategoryList.html | 12 +- .../popup/medicalCategoryInfoPopDept1.html | 179 +++++++++++ .../popup/medicalCategoryInfoPopDept2.html | 179 +++++++++++ .../popup/medicalCategoryInfoPopDept3.html | 179 +++++++++++ ....html => medicalCategoryInfoPopDept4.html} | 115 ++----- .../popup/medicalCategoryInfoPopDept5.html | 179 +++++++++++ 27 files changed, 3162 insertions(+), 421 deletions(-) create mode 100644 src/main/java/com/madeu/crm/settings/code/ctrl/CodeController.java create mode 100644 src/main/java/com/madeu/crm/settings/code/dto/CodeDTO.java create mode 100644 src/main/java/com/madeu/crm/settings/code/dto/CodeGroupDTO.java create mode 100644 src/main/java/com/madeu/crm/settings/code/mapper/CodeMapper.java create mode 100644 src/main/java/com/madeu/crm/settings/code/service/CodeService.java create mode 100644 src/main/resources/mappers/crm/settings/code/CodeMapper.xml create mode 100644 src/main/resources/static/js/web/settings/code/codeList.js create mode 100644 src/main/resources/static/js/web/settings/code/popup/codeGroupPop.js create mode 100644 src/main/resources/static/js/web/settings/code/popup/codePop.js delete mode 100644 src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPop.js create mode 100644 src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept1.js create mode 100644 src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept2.js create mode 100644 src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept3.js create mode 100644 src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept4.js create mode 100644 src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept5.js create mode 100644 src/main/resources/templates/web/settings/code/codeList.html create mode 100644 src/main/resources/templates/web/settings/code/popup/codeGroupPop.html create mode 100644 src/main/resources/templates/web/settings/code/popup/codePop.html create mode 100644 src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept1.html create mode 100644 src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept2.html create mode 100644 src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept3.html rename src/main/resources/templates/web/settings/medicalcategory/popup/{medicalCategoryInfoPop.html => medicalCategoryInfoPopDept4.html} (57%) create mode 100644 src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept5.html diff --git a/src/main/java/com/madeu/crm/settings/code/ctrl/CodeController.java b/src/main/java/com/madeu/crm/settings/code/ctrl/CodeController.java new file mode 100644 index 0000000..fe410e1 --- /dev/null +++ b/src/main/java/com/madeu/crm/settings/code/ctrl/CodeController.java @@ -0,0 +1,188 @@ +package com.madeu.crm.settings.code.ctrl; + +import com.madeu.constants.Constants; +import com.madeu.util.HttpUtil; +import com.madeu.crm.settings.code.service.CodeService; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.ModelAndView; + +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import java.util.HashMap; + +@Slf4j +@RestController +@RequiredArgsConstructor +@RequestMapping("/settings/code") +public class CodeController { + + private final CodeService codeService; + + /** + * 코드 관리 메인 화면 이동 + */ + @RequestMapping("/codeList.do") + public ModelAndView codeList(HttpServletRequest request, HttpServletResponse response) { + log.debug("CodeController codeList START"); + log.debug("CodeController codeList END"); + + return new ModelAndView("/web/settings/code/codeList"); + } + + /** + * 코드 그룹 리스트 조회 + */ + @PostMapping("/getCodeGroupList.do") + public HashMap getCodeGroupList(HttpServletRequest request, HttpServletResponse response) { + log.debug("CodeController getCodeGroupList START"); + HashMap paramMap = HttpUtil.getParameterMap(request); + HashMap map = new HashMap<>(); + + try { + map = codeService.getCodeGroupList(paramMap); + } catch (Exception e) { + log.error("getCodeGroupList : ", e); + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + } + return map; + } + + /** + * 코드 그룹 상세 조회 + */ + @PostMapping("/getCodeGroup.do") + public HashMap getCodeGroup(HttpServletRequest request, HttpServletResponse response) { + log.debug("CodeController getCodeGroup START"); + HashMap paramMap = HttpUtil.getParameterMap(request); + return codeService.getCodeGroup(paramMap); + } + + /** + * 코드 그룹 저장 (신규/수정) + */ + @PostMapping("/saveCodeGroup.do") + public HashMap saveCodeGroup(@RequestBody HashMap paramMap, + HttpServletRequest request, HttpServletResponse response) { + log.debug("CodeController saveCodeGroup START"); + HashMap map = new HashMap<>(); + + try { + map = codeService.saveCodeGroup(paramMap); + } catch (Exception e) { + log.error("saveCodeGroup : ", e); + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + } + return map; + } + + /** + * 코드 그룹 삭제 + */ + @PostMapping("/deleteCodeGroup.do") + public HashMap deleteCodeGroup(HttpServletRequest request, HttpServletResponse response) { + log.debug("CodeController deleteCodeGroup START"); + HashMap paramMap = HttpUtil.getParameterMap(request); + HashMap map = new HashMap<>(); + + try { + map = codeService.deleteCodeGroup(paramMap); + } catch (Exception e) { + log.error("deleteCodeGroup : ", e); + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + } + return map; + } + + // =================================== + // 상세 코드 관련 + // =================================== + + /** + * 상세 코드 리스트 조회 + */ + @PostMapping("/getCodeList.do") + public HashMap getCodeList(HttpServletRequest request, HttpServletResponse response) { + log.debug("CodeController getCodeList START"); + HashMap paramMap = HttpUtil.getParameterMap(request); + HashMap map = new HashMap<>(); + + try { + map = codeService.getCodeList(paramMap); + } catch (Exception e) { + log.error("getCodeList : ", e); + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + } + return map; + } + + /** + * 상세 코드 상세 조회 + */ + @PostMapping("/getCode.do") + public HashMap getCode(HttpServletRequest request, HttpServletResponse response) { + log.debug("CodeController getCode START"); + HashMap paramMap = HttpUtil.getParameterMap(request); + return codeService.getCode(paramMap); + } + + /** + * 상세 코드 저장 (신규/수정) + */ + @PostMapping("/saveCode.do") + public HashMap saveCode(@RequestBody HashMap paramMap, HttpServletRequest request, + HttpServletResponse response) { + log.debug("CodeController saveCode START"); + HashMap map = new HashMap<>(); + + try { + map = codeService.saveCode(paramMap); + } catch (Exception e) { + log.error("saveCode : ", e); + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + } + return map; + } + + /** + * 상세 코드 삭제 + */ + @PostMapping("/deleteCode.do") + public HashMap deleteCode(HttpServletRequest request, HttpServletResponse response) { + log.debug("CodeController deleteCode START"); + HashMap paramMap = HttpUtil.getParameterMap(request); + HashMap map = new HashMap<>(); + + try { + map = codeService.deleteCode(paramMap); + } catch (Exception e) { + log.error("deleteCode : ", e); + map.put("msgCode", Constants.FAIL); + map.put("msgDesc", "서버 오류가 발생했습니다."); + } + return map; + } + + // =================================== + // 팝업 화면 라우팅 + // =================================== + + @RequestMapping("/codeGroupPop.do") + public ModelAndView codeGroupPop(HttpServletRequest request, HttpServletResponse response) { + return new ModelAndView("/web/settings/code/popup/codeGroupPop"); + } + + @RequestMapping("/codePop.do") + public ModelAndView codePop(HttpServletRequest request, HttpServletResponse response) { + return new ModelAndView("/web/settings/code/popup/codePop"); + } +} diff --git a/src/main/java/com/madeu/crm/settings/code/dto/CodeDTO.java b/src/main/java/com/madeu/crm/settings/code/dto/CodeDTO.java new file mode 100644 index 0000000..e2caa25 --- /dev/null +++ b/src/main/java/com/madeu/crm/settings/code/dto/CodeDTO.java @@ -0,0 +1,18 @@ +package com.madeu.crm.settings.code.dto; + +import lombok.Data; + +@Data +public class CodeDTO { + private Integer pid; + private Integer storePid; + private String grpCd; + private String codeCd; + private String codeNm; + private String codeVal; + private String codeDesc; + private Integer codeSort; + private String listUse; + private String regDate; + private String upDate; +} diff --git a/src/main/java/com/madeu/crm/settings/code/dto/CodeGroupDTO.java b/src/main/java/com/madeu/crm/settings/code/dto/CodeGroupDTO.java new file mode 100644 index 0000000..bb69127 --- /dev/null +++ b/src/main/java/com/madeu/crm/settings/code/dto/CodeGroupDTO.java @@ -0,0 +1,15 @@ +package com.madeu.crm.settings.code.dto; + +import lombok.Data; + +@Data +public class CodeGroupDTO { + private Integer pid; + private Integer storePid; + private String grpCd; + private String grpNm; + private String grpDesc; + private String listUse; + private String regDate; + private String upDate; +} diff --git a/src/main/java/com/madeu/crm/settings/code/mapper/CodeMapper.java b/src/main/java/com/madeu/crm/settings/code/mapper/CodeMapper.java new file mode 100644 index 0000000..4329a0e --- /dev/null +++ b/src/main/java/com/madeu/crm/settings/code/mapper/CodeMapper.java @@ -0,0 +1,44 @@ +package com.madeu.crm.settings.code.mapper; + +import org.apache.ibatis.annotations.Mapper; +import java.util.HashMap; +import java.util.List; + +@Mapper +public interface CodeMapper { + // 1. 코드 그룹 리스트 + List> getCodeGroupList(HashMap paramMap); + + // 2. 코드 그룹 상세 단건 + HashMap getCodeGroup(HashMap paramMap); + + // 3. 코드 그룹 확인용 (중복검사) + int checkGrpCd(HashMap paramMap); + + // 4. 코드 그룹 등록 + int insertCodeGroup(HashMap paramMap); + + // 5. 코드 그룹 수정 + int updateCodeGroup(HashMap paramMap); + + // 6. 코드 그룹 삭제 (논리 삭제) + int deleteCodeGroup(HashMap paramMap); + + // 7. 상세 코드 리스트 + List> getCodeList(HashMap paramMap); + + // 8. 상세 코드 단건 + HashMap getCode(HashMap paramMap); + + // 9. 상세 코드 확인용 (중복검사) + int checkCodeCd(HashMap paramMap); + + // 10. 상세 코드 등록 + int insertCode(HashMap paramMap); + + // 11. 상세 코드 수정 + int updateCode(HashMap paramMap); + + // 12. 상세 코드 삭제 (논리 삭제) + int deleteCode(HashMap paramMap); +} diff --git a/src/main/java/com/madeu/crm/settings/code/service/CodeService.java b/src/main/java/com/madeu/crm/settings/code/service/CodeService.java new file mode 100644 index 0000000..79fb4df --- /dev/null +++ b/src/main/java/com/madeu/crm/settings/code/service/CodeService.java @@ -0,0 +1,141 @@ +package com.madeu.crm.settings.code.service; + +import com.madeu.crm.settings.code.mapper.CodeMapper; +import com.madeu.constants.Constants; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.HashMap; +import java.util.List; + +@Slf4j +@Service +@RequiredArgsConstructor +public class CodeService { + + private final CodeMapper codeMapper; + + // ========================================== + // 1. 코드 그룹 (Code Group) + // ========================================== + + public HashMap getCodeGroupList(HashMap paramMap) { + HashMap returnMap = new HashMap<>(); + List> rows = codeMapper.getCodeGroupList(paramMap); + + returnMap.put("msgCode", Constants.OK); + returnMap.put("rows", rows); + return returnMap; + } + + public HashMap getCodeGroup(HashMap paramMap) { + HashMap returnMap = new HashMap<>(); + HashMap data = codeMapper.getCodeGroup(paramMap); + + returnMap.put("msgCode", Constants.OK); + returnMap.put("data", data); + return returnMap; + } + + @Transactional(rollbackFor = Exception.class) + public HashMap saveCodeGroup(HashMap paramMap) { + HashMap returnMap = new HashMap<>(); + + String pid = paramMap.get("pid") == null ? "" : String.valueOf(paramMap.get("pid")); + + // 중복 검사 + int dupCnt = codeMapper.checkGrpCd(paramMap); + if (dupCnt > 0) { + returnMap.put("msgCode", Constants.FAIL); + returnMap.put("msgDesc", "이미 사용중인 코드그룹 ID입니다."); + return returnMap; + } + + if ("".equals(pid)) { + // 신규 등록 + codeMapper.insertCodeGroup(paramMap); + returnMap.put("msgDesc", "코드그룹이 등록되었습니다."); + } else { + // 수정 + codeMapper.updateCodeGroup(paramMap); + returnMap.put("msgDesc", "코드그룹이 수정되었습니다."); + } + + returnMap.put("msgCode", Constants.OK); + return returnMap; + } + + @Transactional(rollbackFor = Exception.class) + public HashMap deleteCodeGroup(HashMap paramMap) { + HashMap returnMap = new HashMap<>(); + + codeMapper.deleteCodeGroup(paramMap); + + returnMap.put("msgCode", Constants.OK); + returnMap.put("msgDesc", "코드그룹이 삭제되었습니다."); + return returnMap; + } + + // ========================================== + // 2. 상세 코드 (Code List) + // ========================================== + + public HashMap getCodeList(HashMap paramMap) { + HashMap returnMap = new HashMap<>(); + List> rows = codeMapper.getCodeList(paramMap); + + returnMap.put("msgCode", Constants.OK); + returnMap.put("rows", rows); + return returnMap; + } + + public HashMap getCode(HashMap paramMap) { + HashMap returnMap = new HashMap<>(); + HashMap data = codeMapper.getCode(paramMap); + + returnMap.put("msgCode", Constants.OK); + returnMap.put("data", data); + return returnMap; + } + + @Transactional(rollbackFor = Exception.class) + public HashMap saveCode(HashMap paramMap) { + HashMap returnMap = new HashMap<>(); + + String pid = paramMap.get("pid") == null ? "" : String.valueOf(paramMap.get("pid")); + + // 중복 검사 + int dupCnt = codeMapper.checkCodeCd(paramMap); + if (dupCnt > 0) { + returnMap.put("msgCode", Constants.FAIL); + returnMap.put("msgDesc", "이미 사용중인 상세 코드 ID입니다."); + return returnMap; + } + + if ("".equals(pid)) { + // 신규 등록 + codeMapper.insertCode(paramMap); + returnMap.put("msgDesc", "상세 코드가 등록되었습니다."); + } else { + // 수정 + codeMapper.updateCode(paramMap); + returnMap.put("msgDesc", "상세 코드가 수정되었습니다."); + } + + returnMap.put("msgCode", Constants.OK); + return returnMap; + } + + @Transactional(rollbackFor = Exception.class) + public HashMap deleteCode(HashMap paramMap) { + HashMap returnMap = new HashMap<>(); + + codeMapper.deleteCode(paramMap); + + returnMap.put("msgCode", Constants.OK); + returnMap.put("msgDesc", "상세 코드가 삭제되었습니다."); + return returnMap; + } +} diff --git a/src/main/java/com/madeu/crm/settings/medicalcategory/ctrl/MedicalCategoryController.java b/src/main/java/com/madeu/crm/settings/medicalcategory/ctrl/MedicalCategoryController.java index f18b5d1..4b3e471 100644 --- a/src/main/java/com/madeu/crm/settings/medicalcategory/ctrl/MedicalCategoryController.java +++ b/src/main/java/com/madeu/crm/settings/medicalcategory/ctrl/MedicalCategoryController.java @@ -45,14 +45,53 @@ public class MedicalCategoryController extends ManagerDraftAction { } /** - * 카테고리 상세/등록 팝업 화면 이동 + * 카테고리 1뎁스 팝업 화면 이동 (진료과목) */ - @RequestMapping("/infoPop.do") - public ModelAndView infoPop(HttpServletRequest request, HttpServletResponse response) { - log.debug("MedicalCategoryController infoPop START"); - log.debug("MedicalCategoryController infoPop END"); + @RequestMapping("/infoPopDept1.do") + public ModelAndView infoPopDept1(HttpServletRequest request, HttpServletResponse response) { + log.debug("MedicalCategoryController infoPopDept1 START"); + log.debug("MedicalCategoryController infoPopDept1 END"); + return new ModelAndView("/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept1"); + } - return new ModelAndView("/web/settings/medicalcategory/popup/medicalCategoryInfoPop"); + /** + * 카테고리 2뎁스 팝업 화면 이동 (진료유형) + */ + @RequestMapping("/infoPopDept2.do") + public ModelAndView infoPopDept2(HttpServletRequest request, HttpServletResponse response) { + log.debug("MedicalCategoryController infoPopDept2 START"); + log.debug("MedicalCategoryController infoPopDept2 END"); + return new ModelAndView("/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept2"); + } + + /** + * 카테고리 3뎁스 팝업 화면 이동 (제품/시술) + */ + @RequestMapping("/infoPopDept3.do") + public ModelAndView infoPopDept3(HttpServletRequest request, HttpServletResponse response) { + log.debug("MedicalCategoryController infoPopDept3 START"); + log.debug("MedicalCategoryController infoPopDept3 END"); + return new ModelAndView("/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept3"); + } + + /** + * 카테고리 4뎁스 팝업 화면 이동 (용량/출력) + */ + @RequestMapping("/infoPopDept4.do") + public ModelAndView infoPopDept4(HttpServletRequest request, HttpServletResponse response) { + log.debug("MedicalCategoryController infoPopDept4 START"); + log.debug("MedicalCategoryController infoPopDept4 END"); + return new ModelAndView("/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept4"); + } + + /** + * 카테고리 5뎁스 팝업 화면 이동 (부위) + */ + @RequestMapping("/infoPopDept5.do") + public ModelAndView infoPopDept5(HttpServletRequest request, HttpServletResponse response) { + log.debug("MedicalCategoryController infoPopDept5 START"); + log.debug("MedicalCategoryController infoPopDept5 END"); + return new ModelAndView("/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept5"); } // ==================== API 메서드 (JSON 반환) ==================== diff --git a/src/main/resources/mappers/crm/settings/code/CodeMapper.xml b/src/main/resources/mappers/crm/settings/code/CodeMapper.xml new file mode 100644 index 0000000..aa63fac --- /dev/null +++ b/src/main/resources/mappers/crm/settings/code/CodeMapper.xml @@ -0,0 +1,216 @@ + + + + + + + + + + + + + + + + + INSERT INTO crm_code_group ( + store_pid, + grp_cd, + grp_nm, + grp_desc, + list_use, + reg_date, + up_date + ) VALUES ( + #{storePid}, + #{grpCd}, + #{grpNm}, + #{grpDesc, jdbcType=VARCHAR}, + 'y', + NOW(), + NOW() + ) + + + + + UPDATE crm_code_group + + + grp_nm = #{grpNm}, + + + grp_desc = #{grpDesc}, + + + list_use = #{listUse}, + + up_date = NOW() + + WHERE pid = #{pid} + + + + + UPDATE crm_code_group + SET list_use = 'n', up_date = NOW() + WHERE pid = #{pid} + + + + + + + + + + + + + + + + INSERT INTO crm_code_list ( + store_pid, + grp_cd, + code_cd, + code_nm, + code_val, + code_desc, + code_sort, + list_use, + reg_date, + up_date + ) VALUES ( + #{storePid}, + #{grpCd}, + #{codeCd}, + #{codeNm}, + #{codeVal, jdbcType=VARCHAR}, + #{codeDesc, jdbcType=VARCHAR}, + IFNULL(#{codeSort}, 0), + 'y', + NOW(), + NOW() + ) + + + + + UPDATE crm_code_list + + + code_nm = #{codeNm}, + + + code_val = #{codeVal}, + + + code_desc = #{codeDesc}, + + + code_sort = #{codeSort}, + + + list_use = #{listUse}, + + up_date = NOW() + + WHERE pid = #{pid} + + + + + UPDATE crm_code_list + SET list_use = 'n', up_date = NOW() + WHERE pid = #{pid} + + + diff --git a/src/main/resources/mappers/crm/settings/medicalcategory/MedicalCategoryMapper.xml b/src/main/resources/mappers/crm/settings/medicalcategory/MedicalCategoryMapper.xml index 6de6eb8..65ec9cd 100644 --- a/src/main/resources/mappers/crm/settings/medicalcategory/MedicalCategoryMapper.xml +++ b/src/main/resources/mappers/crm/settings/medicalcategory/MedicalCategoryMapper.xml @@ -78,8 +78,10 @@ DATE_FORMAT(a.reg_date, '%Y-%m-%d %H:%i:%s') AS reg_date, DATE_FORMAT(a.up_date, '%Y-%m-%d %H:%i:%s') AS up_date, a.store_pid, - a.npay_use + a.npay_use, + p.divi_name AS parent_name FROM medical_divi_list a + LEFT JOIN medical_divi_list p ON a.divi_parent = p.pid WHERE a.pid = #{pid} diff --git a/src/main/resources/static/js/web/settings/code/codeList.js b/src/main/resources/static/js/web/settings/code/codeList.js new file mode 100644 index 0000000..52f3bef --- /dev/null +++ b/src/main/resources/static/js/web/settings/code/codeList.js @@ -0,0 +1,178 @@ +/** + * 공통코드 관리 화면 스크립트 + */ + +let tableGroup; +let tableCode; +let currentSelectedGroup = null; + +$(document).ready(function () { + initGrid(); + bindEvents(); + loadGroupData(); +}); + +function initGrid() { + let commonOpts = { + layout: "fitColumns", + selectableRows: 1, // 단일 선택 + selectableRowsRangeMode: "click", + height: "100%", + columnDefaults: { + headerTooltip: true, + headerHozAlign: "center", + hozAlign: "center" + } + }; + + // 1. 좌측 그룹 그리드 + tableGroup = new Tabulator("#gridGroup", Object.assign({}, commonOpts, { + columns: [ + { title: "No", field: "no", width: 60, formatter: "rownum", headerSort: false }, + { title: "그룹 ID", field: "grp_cd", width: 120 }, + { title: "그룹 명칭", field: "grp_nm", width: 150 }, + { title: "사용여부", field: "list_use", width: 80, formatter: ynFormatter }, + { + title: "수정", width: 60, headerSort: false, formatter: editFormatter, cellClick: function (e, cell) { + editGroup(cell.getRow().getData().pid); + } + }, + ], + })); + + tableGroup.on("rowClick", function (e, row) { + let data = row.getData(); + currentSelectedGroup = data; + + // 우측 패널 UI 활성화 + $("#codePanelTitle").html(`상세 코드 [${data.grp_nm} (${data.grp_cd})]`); + $("#codeSearchInput").prop("disabled", false); + $("#btnAddCode").prop("disabled", false).css({ + "background": "#3985EA", + "color": "#fff", + "border-color": "#3985EA" + }); + + loadCodeData(data.grp_cd); + }); + + // 2. 우측 상세 코드 그리드 + tableCode = new Tabulator("#gridCode", Object.assign({}, commonOpts, { + columns: [ + { title: "정렬", field: "code_sort", width: 60 }, + { title: "코드 ID", field: "code_cd", width: 120 }, + { title: "코드 명칭", field: "code_nm", width: 150 }, + { title: "추가값", field: "code_val", width: 120 }, + { title: "사용여부", field: "list_use", width: 80, formatter: ynFormatter }, + { + title: "수정", width: 60, headerSort: false, formatter: editFormatter, cellClick: function (e, cell) { + editCode(cell.getRow().getData().pid); + } + }, + ], + })); +} + +function ynFormatter(cell) { + return cell.getValue() === 'y' ? 'Y' : 'N'; +} + +function editFormatter(cell) { + return '수정'; +} + +function bindEvents() { + // 그룹 검색 + $("#groupSearchInput").on("keyup", function (e) { + if (e.keyCode === 13) loadGroupData(); + }); + + // 상세 코드 검색 + $("#codeSearchInput").on("keyup", function (e) { + if (e.keyCode === 13 && currentSelectedGroup) { + loadCodeData(currentSelectedGroup.grp_cd); + } + }); + + // 창 닫힐 때 리로드용 + window.addEventListener("message", function (event) { + if (event.data === 'reloadGroup') { + loadGroupData(); + } else if (event.data === 'reloadCode' && currentSelectedGroup) { + loadCodeData(currentSelectedGroup.grp_cd); + } + }, false); +} + +// ========================================== +// API 로드 +// ========================================== + +window.loadGroupData = function () { + let searchWd = $("#groupSearchInput").val(); + $.ajax({ + url: "/settings/code/getCodeGroupList.do", + type: "POST", + data: { searchWd: searchWd }, + success: function (res) { + if (res.msgCode === '0') { + tableGroup.setData(res.rows || []); + if (!currentSelectedGroup) { + tableCode.setData([]); + } + } else { + alert(res.msgDesc); + } + }, + error: function (e) { + console.error(e); + alert("그룹 조회 실패"); + } + }); +}; + +window.loadCodeData = function (grpCd) { + let searchWd = $("#codeSearchInput").val(); + $.ajax({ + url: "/settings/code/getCodeList.do", + type: "POST", + data: { grpCd: grpCd, searchWd: searchWd }, + success: function (res) { + if (res.msgCode === '0') { + tableCode.setData(res.rows || []); + } else { + alert(res.msgDesc); + } + }, + error: function (e) { + console.error(e); + alert("상세 코드 조회 실패"); + } + }); +}; + +// ========================================== +// 팝업 호출 +// ========================================== + +window.addGroup = function () { + let url = "/settings/code/codeGroupPop.do?mode=add"; + window.open(url, "codeGroupPop", "width=500, height=450, resizable=no, scrollbars=no, status=no;"); +}; + +window.editGroup = function (pid) { + let url = `/settings/code/codeGroupPop.do?mode=edit&pid=${pid}`; + window.open(url, "codeGroupPop", "width=500, height=450, resizable=no, scrollbars=no, status=no;"); +}; + +window.addCode = function () { + if (!currentSelectedGroup) return; + let url = `/settings/code/codePop.do?mode=add&grpCd=${currentSelectedGroup.grp_cd}&grpNm=${encodeURIComponent(currentSelectedGroup.grp_nm)}`; + window.open(url, "codePop", "width=500, height=550, resizable=no, scrollbars=no, status=no;"); +}; + +window.editCode = function (pid) { + if (!currentSelectedGroup) return; + let url = `/settings/code/codePop.do?mode=edit&pid=${pid}&grpCd=${currentSelectedGroup.grp_cd}&grpNm=${encodeURIComponent(currentSelectedGroup.grp_nm)}`; + window.open(url, "codePop", "width=500, height=550, resizable=no, scrollbars=no, status=no;"); +}; diff --git a/src/main/resources/static/js/web/settings/code/popup/codeGroupPop.js b/src/main/resources/static/js/web/settings/code/popup/codeGroupPop.js new file mode 100644 index 0000000..5996409 --- /dev/null +++ b/src/main/resources/static/js/web/settings/code/popup/codeGroupPop.js @@ -0,0 +1,131 @@ +/** + * 코드 그룹 팝업 스크립트 + */ +$(document).ready(function () { + const params = new URLSearchParams(window.location.search); + const mode = params.get('mode'); + const pid = params.get('pid'); + + initForm(); + bindEvents(); + + function initForm() { + if (mode === 'add') { + $("#popTitle").text('코드 그룹 신규 등록'); + $("#pid").val(''); + $("#btn_delete").hide(); + } else if (mode === 'edit') { + $("#popTitle").text('코드 그룹 정보 수정'); + $("#pid").val(pid); + $("#grpCd").prop("readonly", true).css("background-color", "#f9f9f9"); + $("#btn_delete").show(); + loadDetail(pid); + } + } + + function loadDetail(id) { + $.ajax({ + url: '/settings/code/getCodeGroup.do', + type: 'POST', + data: { pid: id }, + success: function (res) { + if (res.msgCode === '0') { + const data = res.data; + $("#grpCd").val(data.grp_cd); + $("#grpNm").val(data.grp_nm); + $("#grpDesc").val(data.grp_desc); + $("#listUse").val(data.list_use); + } else { + alert("정보를 불러올 수 없습니다."); + window.close(); + } + }, + error: function () { + alert("상세 정보 조회 통신 오류"); + window.close(); + } + }); + } + + function bindEvents() { + $("#btn_close").on("click", function () { + window.close(); + }); + + $("#btn_save").on("click", function () { + saveGroup(); + }); + + $("#btn_delete").on("click", function () { + deleteGroup(); + }); + } + + function saveGroup() { + const cd = $("#grpCd").val().trim(); + const nm = $("#grpNm").val().trim(); + + if (!cd) { + alert("그룹 ID를 입력하세요."); + $("#grpCd").focus(); + return; + } + if (!nm) { + alert("그룹 명칭을 입력하세요."); + $("#grpNm").focus(); + return; + } + + const submitObj = { + pid: $("#pid").val() || null, + storePid: $("#storePid").val(), + grpCd: cd, + grpNm: nm, + grpDesc: $("#grpDesc").val(), + listUse: $("#listUse").val() + }; + + $.ajax({ + url: '/settings/code/saveCodeGroup.do', + type: 'POST', + contentType: 'application/json', + data: JSON.stringify(submitObj), + success: function (res) { + alert(res.msgDesc); + if (res.msgCode === '0') { + if (window.opener) { + window.opener.postMessage('reloadGroup', '*'); + } + window.close(); + } + }, + error: function () { + alert("저장 중 시스템 오류가 발생했습니다."); + } + }); + } + + function deleteGroup() { + const pidVal = $("#pid").val(); + if (!pidVal) return; + if (!confirm("해당 코드 그룹을 삭제하시겠습니까?\n하위 상세 코드들도 모두 사용할 수 없게 됩니다.")) return; + + $.ajax({ + url: '/settings/code/deleteCodeGroup.do', + type: 'POST', + data: { pid: pidVal }, + success: function (res) { + alert(res.msgDesc); + if (res.msgCode === '0') { + if (window.opener) { + window.opener.postMessage('reloadGroup', '*'); + } + window.close(); + } + }, + error: function () { + alert("삭제 중 시스템 오류가 발생했습니다."); + } + }); + } +}); diff --git a/src/main/resources/static/js/web/settings/code/popup/codePop.js b/src/main/resources/static/js/web/settings/code/popup/codePop.js new file mode 100644 index 0000000..19a9942 --- /dev/null +++ b/src/main/resources/static/js/web/settings/code/popup/codePop.js @@ -0,0 +1,141 @@ +/** + * 상세 코드 팝업 스크립트 + */ +$(document).ready(function () { + const params = new URLSearchParams(window.location.search); + const mode = params.get('mode'); + const pid = params.get('pid'); + const grpCd = params.get('grpCd'); + const grpNm = decodeURIComponent(params.get('grpNm') || ''); + + initForm(); + bindEvents(); + + function initForm() { + $("#grpCd").val(grpCd); + $("#groupInfoText").text(`[그룹: ${grpNm} (${grpCd})]`); + + if (mode === 'add') { + $("#popTitle").text('상세 코드 신규 등록'); + $("#pid").val(''); + $("#btn_delete").hide(); + } else if (mode === 'edit') { + $("#popTitle").text('상세 코드 정보 수정'); + $("#pid").val(pid); + $("#codeCd").prop("readonly", true).css("background-color", "#f9f9f9"); + $("#btn_delete").show(); + loadDetail(pid); + } + } + + function loadDetail(id) { + $.ajax({ + url: '/settings/code/getCode.do', + type: 'POST', + data: { pid: id }, + success: function (res) { + if (res.msgCode === '0') { + const data = res.data; + $("#codeCd").val(data.code_cd); + $("#codeNm").val(data.code_nm); + $("#codeVal").val(data.code_val); + $("#codeDesc").val(data.code_desc); + $("#codeSort").val(data.code_sort); + $("#listUse").val(data.list_use); + } else { + alert("정보를 불러올 수 없습니다."); + window.close(); + } + }, + error: function () { + alert("상세 정보 조회 통신 오류"); + window.close(); + } + }); + } + + function bindEvents() { + $("#btn_close").on("click", function () { + window.close(); + }); + + $("#btn_save").on("click", function () { + saveCode(); + }); + + $("#btn_delete").on("click", function () { + deleteCode(); + }); + } + + function saveCode() { + const cd = $("#codeCd").val().trim(); + const nm = $("#codeNm").val().trim(); + + if (!cd) { + alert("코드 ID를 입력하세요."); + $("#codeCd").focus(); + return; + } + if (!nm) { + alert("코드 명칭을 입력하세요."); + $("#codeNm").focus(); + return; + } + + const submitObj = { + pid: $("#pid").val() || null, + storePid: $("#storePid").val(), + grpCd: $("#grpCd").val(), + codeCd: cd, + codeNm: nm, + codeVal: $("#codeVal").val(), + codeDesc: $("#codeDesc").val(), + codeSort: $("#codeSort").val() || 0, + listUse: $("#listUse").val() + }; + + $.ajax({ + url: '/settings/code/saveCode.do', + type: 'POST', + contentType: 'application/json', + data: JSON.stringify(submitObj), + success: function (res) { + alert(res.msgDesc); + if (res.msgCode === '0') { + if (window.opener) { + window.opener.postMessage('reloadCode', '*'); + } + window.close(); + } + }, + error: function () { + alert("저장 중 시스템 오류가 발생했습니다."); + } + }); + } + + function deleteCode() { + const pidVal = $("#pid").val(); + if (!pidVal) return; + if (!confirm("해당 상세 코드를 정말 삭제하시겠습니까?")) return; + + $.ajax({ + url: '/settings/code/deleteCode.do', + type: 'POST', + data: { pid: pidVal }, + success: function (res) { + alert(res.msgDesc); + if (res.msgCode === '0') { + if (window.opener) { + window.opener.postMessage('reloadCode', '*'); + } + window.close(); + } + }, + error: function () { + alert("삭제 중 시스템 오류가 발생했습니다."); + } + }); + } +}); diff --git a/src/main/resources/static/js/web/settings/medicalcategory/medicalCategoryList.js b/src/main/resources/static/js/web/settings/medicalcategory/medicalCategoryList.js index 9c67eca..a011b9e 100644 --- a/src/main/resources/static/js/web/settings/medicalcategory/medicalCategoryList.js +++ b/src/main/resources/static/js/web/settings/medicalcategory/medicalCategoryList.js @@ -125,7 +125,8 @@ $(document).ready(function () { index: "pid", layout: "fitColumns", placeholder: "상위 항목을 선택하세요.", - selectableRows: true, + selectableRows: true, // 5.x 에서 선택 기능 활성화 + selectableRowsRangeMode: "click", // 브라우저/그리드 자체 단축키 동작을 막고 순수 클릭 이벤트로 동작하게 함 height: "100%", columnDefaults: { headerTooltip: true, @@ -184,30 +185,29 @@ $(document).ready(function () { function handleRowClick(e, row, table, depth) { var tableId = table.element.id; - if (e.shiftKey && lastClickedRow[tableId]) { - // Shift+Click: 범위 선택 - var allRows = table.getRows(); - var startIdx = allRows.indexOf(lastClickedRow[tableId]); - var endIdx = allRows.indexOf(row); - if (startIdx === -1) startIdx = 0; - - var from = Math.min(startIdx, endIdx); - var to = Math.max(startIdx, endIdx); - - table.deselectRow(); - for (var i = from; i <= to; i++) { - allRows[i].select(); - } - } else if (e.ctrlKey || e.metaKey) { - // Ctrl+Click: 토글 선택 - row.toggleSelect(); - } else { - // 일반 클릭: 단일 선택 - table.deselectRow(); - row.select(); + if (e.shiftKey || e.ctrlKey || e.metaKey) { + // [MULTI-SELECT MODE] + // Shift+Click 또는 Ctrl+Click: + // Tabulator 자체 옵션(selectableRows: true)에 의해 다중 선택/토글이 자동으로 처리됩니다. + // 여러 줄이 동시 선택되어도 하위 뎁스 표(자식 그리드)에 여러 부모의 데이터를 보여줄 구조가 아니므로, + // 하위 표를 갱신하는 clickRow()를 호출하지 않고 여기서 함수를 완전히 종료합니다. + lastClickedRow[tableId] = row; + return; } + // [SINGLE-SELECT / NAVIGATION MODE] + // 일반 클릭: 해당 항목으로 "내비게이션(이동)"하려는 의도. + // 1) 내가 클릭한 행이 이미 선택되어 있는 상태라면 Tabulator가 클릭하면서 선택을 해제(토글)해버리는 것을 방지. + // 2) 다른 행들의 선택을 모두 해제하고, 내가 누른 행 1개만 확실히 선택되도록 강제합니다. + table.deselectRow(); + window.setTimeout(function () { + row.select(); + }, 0); + + // 3) 마지막 활성 행 갱신 lastClickedRow[tableId] = row; + + // 4) 자식 항목들을 불러와 다음 뎁스의 표에 뿌려줍니다. clickRow(row, depth); } @@ -219,7 +219,8 @@ $(document).ready(function () { function onCellDblClick(e, cell) { if (cell.getField() === "divi_name") { - editCategory(cell.getRow().getData().pid); + var data = cell.getRow().getData(); + editCategory(data.pid, data.divi_dept); } } table2.on("cellDblClick", onCellDblClick); @@ -541,8 +542,17 @@ $(document).ready(function () { /* ====== 팝업 관련 ====== */ - window.editCategory = function (pid) { - openInfoPopup('edit', pid); + window.editDepth1 = function () { + const pid = $("#depth1Select").val(); + if (!pid) { + alert("수정할 진료과목을 선택하세요."); + return; + } + editCategory(pid, 1); + }; + + window.editCategory = function (pid, diviDept) { + openInfoPopup('edit', pid, diviDept); }; window.addChildCategory = function (diviParent, diviDept, parentName) { @@ -573,14 +583,28 @@ $(document).ready(function () { diviDept = diviDept || ''; diviParent = diviParent || ''; parentName = parentName || ''; - const url = '/settings/medicalCategory/infoPop.do?mode=' + mode + '&pid=' + pid + '&diviDept=' + diviDept + '&diviParent=' + diviParent + '&parentName=' + encodeURIComponent(parentName); - let width = 650; - let height = 750; + // 뎁스별 분리된 URL 호출 + let endpoint = 'infoPopDept' + diviDept + '.do'; + if (!diviDept) { + // 예외 적인 fallback + endpoint = 'infoPopDept2.do'; + diviDept = 2; + } + + const url = '/settings/medicalCategory/' + endpoint + '?mode=' + mode + '&pid=' + pid + '&diviDept=' + diviDept + '&diviParent=' + diviParent + '&parentName=' + encodeURIComponent(parentName); + + let width = 600; + let height = 300; // Depth 2, 3, 5는 기본 300px + + if (diviDept == 4) { + height = 500; // Depth 4 (용량/출력)는 입력 필드가 많아 500px + } + let left = (screen.width - width) / 2; let top = (screen.height - height) / 2; - window.open(url, "MedicalCategoryInfoPopup", "width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + ",scrollbars=yes,resizable=yes"); + window.open(url, "MedicalCategoryInfoPopup_" + diviDept, "width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + ",scrollbars=yes,resizable=yes"); } initGrid(); diff --git a/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPop.js b/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPop.js deleted file mode 100644 index 8512259..0000000 --- a/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPop.js +++ /dev/null @@ -1,290 +0,0 @@ -/** - * 진료유형 상세/추가 팝업 스크립트 - * - medical_divi_list DDL 전체 컬럼 반영 - */ -$(document).ready(function () { - - // 1. URL 파라미터 파싱 - const params = new URLSearchParams(window.location.search); - const mode = params.get('mode'); // 'add' or 'edit' - const pid = params.get('pid'); - const diviDept = params.get('diviDept'); - const diviParent = params.get('diviParent'); - const parentName = params.get('parentName'); - - bindEvents(); - - // 뎁스3 또는 4이면 거래처 목록을 로드한 뒤 폼 초기화를 진행 - if (diviDept === '3' || diviDept === '4' || mode === 'edit') { - loadCustList().then(function () { - initForm(); - applyDepthUI(); - }); - } else { - initForm(); - applyDepthUI(); - } - - function applyDepthUI() { - const currentDept = $("#diviDept").val() || diviDept; - if (currentDept == '1') { - $("#trNoTax").show(); - $("#trNoTax1").show(); - } else { - $("#trNoTax").hide(); - $("#trNoTax1").hide(); - } - - // Depth 3: 제품/시술 정보 (거래처, 제품설명, 기타설명) - if (currentDept == '3') { - $("#productInfoTitle").show(); - $("#productInfoTable").show(); - } else { - $("#productInfoTitle").hide(); - $("#productInfoTable").hide(); - } - - // Depth 4: 용량/출력 정보 (단가, 할인가, 단위, 비율) - if (currentDept == '4') { - $("#volumeInfoTitle").show(); - $("#volumeInfoTable").show(); - } else { - $("#volumeInfoTitle").hide(); - $("#volumeInfoTable").hide(); - } - } - - // 거래처 셀렉트 박스 세팅 - function loadCustList() { - return new Promise(function (resolve) { - $.ajax({ - url: '/settings/medicalCategory/getCustList.do', - type: 'POST', - success: function (res) { - if (res.msgCode === '0' && res.data) { - const $select = $("#custListPid"); - $select.empty().append(''); - res.data.forEach(function (cust) { - $select.append(``); - }); - } - resolve(); - }, - error: function () { - console.error("거래처 목록 로드 실패"); - resolve(); - } - }); - }); - } - - // Depth별 타이틀 매핑 - var depthTitleMap = { - '1': '진료과목', - '2': '진료유형', - '3': '제품/시술', - '4': '용량/출력', - '5': '부위' - }; - - function getDepthTitle(dept) { - return depthTitleMap[dept] || '진료유형'; - } - - function initForm() { - if (mode === 'add') { - $("#popTitle").text(getDepthTitle(diviDept) + ' 신규 등록'); - $("#pid").val(''); - $("#diviDept").val(diviDept); - $("#diviParent").val(diviParent); - $("#btn_delete").hide(); - - if (diviParent !== '0' && parentName) { - $("#parentNameRow").show(); - $("#parentNameTxt").text(parentName); - } - } else if (mode === 'edit') { - $("#popTitle").text(getDepthTitle(diviDept) + ' 정보 수정'); - $("#pid").val(pid); - $("#btn_delete").show(); - loadDetail(pid); - } - } - - function loadDetail(id) { - $.ajax({ - url: '/settings/medicalCategory/getMedicalCategory.do', - type: 'POST', - data: { pid: id }, - success: function (res) { - if (res.msgCode === '0') { - const data = res.data; - $("#diviDept").val(data.divi_dept); - $("#diviParent").val(data.divi_parent); - $("#diviName").val(data.divi_name); - $("#diviSort").val(data.divi_sort); - $("#diviColor").val(data.divi_color || '#000000'); - - // 단가/제품 정보 - if (data.cust_list_pid && data.cust_list_pid !== 0) { - $("#custListPid").val(data.cust_list_pid); - } - $("#kindCost").val(data.kind_cost || 0); - $("#dcCost").val(data.dc_cost || 0); - $("#kindUnit").val(data.kind_unit || ''); - $("#kindUnitVol").val(data.kind_unit_vol || 0); - $("#kindUnit2").val(data.kind_unit2 || ''); - $("#kindMsg1").val(data.kind_msg1 || ''); - $("#kindMsg2").val(data.kind_msg2 || ''); - $("#ccRate").val(data.cc_rate || ''); - - // 설정 버튼들 - setRadio('listUse', data.list_use); - setCheckbox('clinicUse', data.clinic_use); - setCheckbox('expenseUse', data.expense_use); - setCheckbox('taxFree', data.tax_free); - setCheckbox('etcincomeUse', data.etcincome_use); - setCheckbox('etclossUse', data.etcloss_use); - setCheckbox('stockUse', data.stock_use); - setCheckbox('noTax', data.no_tax); - setCheckbox('noTax1', data.no_tax1); - setCheckbox('npayUse', data.npay_use); - - applyDepthUI(); - } else { - alert("정보를 불러올 수 없습니다."); - window.close(); - } - }, - error: function () { - alert("상세 정보 조회 통신 오류"); - window.close(); - } - }); - } - - function setRadio(name, value) { - if (value) { - $("input:radio[name='" + name + "'][value='" + value + "']").prop('checked', true); - } - } - - function getRadio(name) { - return $("input:radio[name='" + name + "']:checked").val(); - } - - function setCheckbox(name, value) { - if (value === 'y') { - $("input:checkbox[name='" + name + "']").prop('checked', true); - } else { - $("input:checkbox[name='" + name + "']").prop('checked', false); - } - } - - function getCheckbox(name) { - return $("input:checkbox[name='" + name + "']").is(":checked") ? 'y' : 'n'; - } - - function bindEvents() { - $("#btn_close").on("click", function () { - window.close(); - }); - - $("#btn_save").on("click", function () { - saveCategory(); - }); - - $("#btn_delete").on("click", function () { - deleteCategory(); - }); - } - - function saveCategory() { - const dName = $("#diviName").val().trim(); - if (!dName) { - alert("진료유형 명칭을 입력하세요."); - $("#diviName").focus(); - return; - } - - const submitObj = { - pid: $("#pid").val() || null, - storePid: $("#storePid").val(), - diviName: dName, - diviDept: $("#diviDept").val(), - diviParent: $("#diviParent").val(), - diviSort: parseInt($("#diviSort").val() || "0", 10), - diviColor: $("#diviColor").val(), - - // 구분 설정 - listUse: getRadio('listUse') || 'n', - clinicUse: getCheckbox('clinicUse'), - expenseUse: getCheckbox('expenseUse'), - taxFree: getCheckbox('taxFree'), - etcincomeUse: getCheckbox('etcincomeUse'), - etclossUse: getCheckbox('etclossUse'), - stockUse: getCheckbox('stockUse'), - noTax: getCheckbox('noTax'), - noTax1: getCheckbox('noTax1'), - npayUse: getCheckbox('npayUse'), - - // 단가/제품 정보 - custListPid: parseInt($("#custListPid").val() || "0", 10), - kindCost: parseFloat($("#kindCost").val() || "0"), - dcCost: parseFloat($("#dcCost").val() || "0"), - kindUnit: $("#kindUnit").val(), - kindUnitVol: parseFloat($("#kindUnitVol").val() || "0"), - kindUnit2: $("#kindUnit2").val(), - kindMsg1: $("#kindMsg1").val(), - kindMsg2: $("#kindMsg2").val(), - ccRate: $("#ccRate").val() - }; - - const targetUrl = mode === 'edit' ? '/settings/medicalCategory/modMedicalCategory.do' : '/settings/medicalCategory/putMedicalCategory.do'; - - $.ajax({ - url: targetUrl, - type: 'POST', - contentType: 'application/json', - data: JSON.stringify(submitObj), - success: function (res) { - alert(res.msgDesc); - if (res.msgCode === '0') { - if (window.opener && typeof window.opener.loadData === 'function') { - window.opener.loadData(true); - } - window.close(); - } - }, - error: function () { - alert("저장 중 시스템 오류가 발생했습니다."); - } - }); - } - - function deleteCategory() { - const pidVal = $("#pid").val(); - if (!pidVal) return; - - if (!confirm("해당 카테고리를 삭제하시겠습니까?\n하위 항목이 있을 경우 삭제되지 않습니다.")) return; - - $.ajax({ - url: '/settings/medicalCategory/delMedicalCategory.do', - type: 'POST', - data: { pid: pidVal }, - success: function (res) { - alert(res.msgDesc); - if (res.msgCode === '0') { - if (window.opener && typeof window.opener.loadData === 'function') { - window.opener.loadData(true); - } - window.close(); - } - }, - error: function () { - alert("삭제 중 시스템 오류가 발생했습니다."); - } - }); - } - -}); diff --git a/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept1.js b/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept1.js new file mode 100644 index 0000000..ecf0e91 --- /dev/null +++ b/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept1.js @@ -0,0 +1,135 @@ +/** + * 카테고리 Depth 1 팝업 스크립트 + */ +$(document).ready(function () { + const params = new URLSearchParams(window.location.search); + const mode = params.get('mode'); + const pid = params.get('pid'); + const diviDept = params.get('diviDept') || '1'; + const diviParent = params.get('diviParent') || '0'; + const parentName = params.get('parentName'); + + initForm(); + bindEvents(); + + function initForm() { + if (mode === 'add') { + $("#popTitle").text('진료과목 신규 등록'); + $("#pid").val(''); + $("#diviParent").val(diviParent); + $("#btn_delete").hide(); + + if (diviParent !== '0' && parentName) { + $("#parentNameRow").show(); + $("#parentNameTxt").text(parentName); + } + } else if (mode === 'edit') { + $("#popTitle").text('진료과목 정보 수정'); + $("#pid").val(pid); + $("#btn_delete").show(); + loadDetail(pid); + } + } + + function loadDetail(id) { + $.ajax({ + url: '/settings/medicalCategory/getMedicalCategory.do', + type: 'POST', + data: { pid: id }, + success: function (res) { + if (res.msgCode === '0') { + const data = res.data; + $("#diviParent").val(data.divi_parent || '0'); + $("#diviName").val(data.divi_name); + $("#diviSort").val(data.divi_sort); + $("#diviColor").val(data.divi_color || '#000000'); + } else { + alert("정보를 불러올 수 없습니다."); + window.close(); + } + }, + error: function () { + alert("상세 정보 조회 통신 오류"); + window.close(); + } + }); + } + + function bindEvents() { + $("#btn_close").on("click", function () { + window.close(); + }); + + $("#btn_save").on("click", function () { + saveCategory(); + }); + + $("#btn_delete").on("click", function () { + deleteCategory(); + }); + } + + function saveCategory() { + const dName = $("#diviName").val().trim(); + if (!dName) { + alert("진료과목 명칭을 입력하세요."); + $("#diviName").focus(); + return; + } + + const submitObj = { + pid: $("#pid").val() || null, + storePid: $("#storePid").val(), + diviName: dName, + diviDept: $("#diviDept").val(), + diviParent: $("#diviParent").val(), + diviSort: parseInt($("#diviSort").val() || "0", 10), + diviColor: $("#diviColor").val() + }; + + const targetUrl = mode === 'edit' ? '/settings/medicalCategory/modMedicalCategory.do' : '/settings/medicalCategory/putMedicalCategory.do'; + + $.ajax({ + url: targetUrl, + type: 'POST', + contentType: 'application/json', + data: JSON.stringify(submitObj), + success: function (res) { + alert(res.msgDesc); + if (res.msgCode === '0') { + if (window.opener && typeof window.opener.loadData === 'function') { + window.opener.loadData(true); + } + window.close(); + } + }, + error: function () { + alert("저장 중 시스템 오류가 발생했습니다."); + } + }); + } + + function deleteCategory() { + const pidVal = $("#pid").val(); + if (!pidVal) return; + if (!confirm("해당 카테고리를 삭제하시겠습니까?\n하위 항목이 있을 경우 삭제되지 않습니다.")) return; + + $.ajax({ + url: '/settings/medicalCategory/delMedicalCategory.do', + type: 'POST', + data: { pid: pidVal }, + success: function (res) { + alert(res.msgDesc); + if (res.msgCode === '0') { + if (window.opener && typeof window.opener.loadData === 'function') { + window.opener.loadData(true); + } + window.close(); + } + }, + error: function () { + alert("삭제 중 시스템 오류가 발생했습니다."); + } + }); + } +}); diff --git a/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept2.js b/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept2.js new file mode 100644 index 0000000..279e24d --- /dev/null +++ b/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept2.js @@ -0,0 +1,144 @@ +/** + * 카테고리 Depth 2 팝업 스크립트 + */ +$(document).ready(function () { + const params = new URLSearchParams(window.location.search); + const mode = params.get('mode'); + const pid = params.get('pid'); + const diviDept = params.get('diviDept'); + const diviParent = params.get('diviParent'); + const parentName = params.get('parentName'); + + initForm(); + bindEvents(); + + function initForm() { + if (mode === 'add') { + $("#popTitle").text('진료유형 신규 등록'); + $("#pid").val(''); + $("#diviParent").val(diviParent); + $("#btn_delete").hide(); + + if (diviParent !== '0' && parentName) { + $("#parentNameRow").show(); + $("#parentNameTxt").text(parentName); + } + } else if (mode === 'edit') { + $("#popTitle").text('진료유형 정보 수정'); + $("#pid").val(pid); + $("#btn_delete").show(); + loadDetail(pid); + } + } + + function loadDetail(id) { + $.ajax({ + url: '/settings/medicalCategory/getMedicalCategory.do', + type: 'POST', + data: { pid: id }, + success: function (res) { + if (res.msgCode === '0') { + const data = res.data; + $("#diviParent").val(data.divi_parent); + $("#diviName").val(data.divi_name); + $("#diviSort").val(data.divi_sort); + $("#diviColor").val(data.divi_color || '#000000'); + + // 상위 카테고리 명칭 표시 (Edit 모드) + if (data.parent_name) { + $("#parentNameRow").show(); + $("#parentNameTxt").text(data.parent_name); + } else if (parentName) { + $("#parentNameRow").show(); + $("#parentNameTxt").text(parentName); + } + } else { + alert("정보를 불러올 수 없습니다."); + window.close(); + } + }, + error: function () { + alert("상세 정보 조회 통신 오류"); + window.close(); + } + }); + } + + function bindEvents() { + $("#btn_close").on("click", function () { + window.close(); + }); + + $("#btn_save").on("click", function () { + saveCategory(); + }); + + $("#btn_delete").on("click", function () { + deleteCategory(); + }); + } + + function saveCategory() { + const dName = $("#diviName").val().trim(); + if (!dName) { + alert("진료유형 명칭을 입력하세요."); + $("#diviName").focus(); + return; + } + + const submitObj = { + pid: $("#pid").val() || null, + storePid: $("#storePid").val(), + diviName: dName, + diviDept: $("#diviDept").val(), + diviParent: $("#diviParent").val(), + diviSort: parseInt($("#diviSort").val() || "0", 10), + diviColor: $("#diviColor").val() + }; + + const targetUrl = mode === 'edit' ? '/settings/medicalCategory/modMedicalCategory.do' : '/settings/medicalCategory/putMedicalCategory.do'; + + $.ajax({ + url: targetUrl, + type: 'POST', + contentType: 'application/json', + data: JSON.stringify(submitObj), + success: function (res) { + alert(res.msgDesc); + if (res.msgCode === '0') { + if (window.opener && typeof window.opener.loadData === 'function') { + window.opener.loadData(true); + } + window.close(); + } + }, + error: function () { + alert("저장 중 시스템 오류가 발생했습니다."); + } + }); + } + + function deleteCategory() { + const pidVal = $("#pid").val(); + if (!pidVal) return; + if (!confirm("해당 카테고리를 삭제하시겠습니까?\n하위 항목이 있을 경우 삭제되지 않습니다.")) return; + + $.ajax({ + url: '/settings/medicalCategory/delMedicalCategory.do', + type: 'POST', + data: { pid: pidVal }, + success: function (res) { + alert(res.msgDesc); + if (res.msgCode === '0') { + if (window.opener && typeof window.opener.loadData === 'function') { + window.opener.loadData(true); + } + window.close(); + } + }, + error: function () { + alert("삭제 중 시스템 오류가 발생했습니다."); + } + }); + } +}); diff --git a/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept3.js b/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept3.js new file mode 100644 index 0000000..518bd60 --- /dev/null +++ b/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept3.js @@ -0,0 +1,144 @@ +/** + * 카테고리 Depth 3 팝업 스크립트 + */ +$(document).ready(function () { + const params = new URLSearchParams(window.location.search); + const mode = params.get('mode'); + const pid = params.get('pid'); + const diviDept = params.get('diviDept'); + const diviParent = params.get('diviParent'); + const parentName = params.get('parentName'); + + initForm(); + bindEvents(); + + function initForm() { + if (mode === 'add') { + $("#popTitle").text('제품/시술 신규 등록'); + $("#pid").val(''); + $("#diviParent").val(diviParent); + $("#btn_delete").hide(); + + if (diviParent !== '0' && parentName) { + $("#parentNameRow").show(); + $("#parentNameTxt").text(parentName); + } + } else if (mode === 'edit') { + $("#popTitle").text('제품/시술 정보 수정'); + $("#pid").val(pid); + $("#btn_delete").show(); + loadDetail(pid); + } + } + + function loadDetail(id) { + $.ajax({ + url: '/settings/medicalCategory/getMedicalCategory.do', + type: 'POST', + data: { pid: id }, + success: function (res) { + if (res.msgCode === '0') { + const data = res.data; + $("#diviParent").val(data.divi_parent); + $("#diviName").val(data.divi_name); + $("#diviSort").val(data.divi_sort); + $("#diviColor").val(data.divi_color || '#000000'); + + // 상위 카테고리 명칭 표시 (Edit 모드) + if (data.parent_name) { + $("#parentNameRow").show(); + $("#parentNameTxt").text(data.parent_name); + } else if (parentName) { + $("#parentNameRow").show(); + $("#parentNameTxt").text(parentName); + } + } else { + alert("정보를 불러올 수 없습니다."); + window.close(); + } + }, + error: function () { + alert("상세 정보 조회 통신 오류"); + window.close(); + } + }); + } + + function bindEvents() { + $("#btn_close").on("click", function () { + window.close(); + }); + + $("#btn_save").on("click", function () { + saveCategory(); + }); + + $("#btn_delete").on("click", function () { + deleteCategory(); + }); + } + + function saveCategory() { + const dName = $("#diviName").val().trim(); + if (!dName) { + alert("제품/시술 명칭을 입력하세요."); + $("#diviName").focus(); + return; + } + + const submitObj = { + pid: $("#pid").val() || null, + storePid: $("#storePid").val(), + diviName: dName, + diviDept: $("#diviDept").val(), // hidden = 3 + diviParent: $("#diviParent").val(), + diviSort: parseInt($("#diviSort").val() || "0", 10), + diviColor: $("#diviColor").val() + }; + + const targetUrl = mode === 'edit' ? '/settings/medicalCategory/modMedicalCategory.do' : '/settings/medicalCategory/putMedicalCategory.do'; + + $.ajax({ + url: targetUrl, + type: 'POST', + contentType: 'application/json', + data: JSON.stringify(submitObj), + success: function (res) { + alert(res.msgDesc); + if (res.msgCode === '0') { + if (window.opener && typeof window.opener.loadData === 'function') { + window.opener.loadData(true); + } + window.close(); + } + }, + error: function () { + alert("저장 중 시스템 오류가 발생했습니다."); + } + }); + } + + function deleteCategory() { + const pidVal = $("#pid").val(); + if (!pidVal) return; + if (!confirm("해당 카테고리를 삭제하시겠습니까?\n하위 항목이 있을 경우 삭제되지 않습니다.")) return; + + $.ajax({ + url: '/settings/medicalCategory/delMedicalCategory.do', + type: 'POST', + data: { pid: pidVal }, + success: function (res) { + alert(res.msgDesc); + if (res.msgCode === '0') { + if (window.opener && typeof window.opener.loadData === 'function') { + window.opener.loadData(true); + } + window.close(); + } + }, + error: function () { + alert("삭제 중 시스템 오류가 발생했습니다."); + } + }); + } +}); diff --git a/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept4.js b/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept4.js new file mode 100644 index 0000000..77362ec --- /dev/null +++ b/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept4.js @@ -0,0 +1,172 @@ +/** + * 카테고리 Depth 4 팝업 스크립트 + */ +$(document).ready(function () { + const params = new URLSearchParams(window.location.search); + const mode = params.get('mode'); + const pid = params.get('pid'); + const diviDept = params.get('diviDept'); + const diviParent = params.get('diviParent'); + const parentName = params.get('parentName'); + + initForm(); + bindEvents(); + + // 금액 포맷팅 함수 + function formatNumber(num) { + if (!num) return '0'; + return num.toString().replace(/[^0-9]/g, '').replace(/\B(?=(\d{3})+(?!\d))/g, ","); + } + + function unformatNumber(str) { + if (!str) return 0; + return parseFloat(str.toString().replace(/,/g, '')) || 0; + } + + function initForm() { + if (mode === 'add') { + $("#popTitle").text('용량/출력 신규 등록'); + $("#pid").val(''); + $("#diviParent").val(diviParent); + $("#btn_delete").hide(); + + if (diviParent !== '0' && parentName) { + $("#parentNameRow").show(); + $("#parentNameTxt").text(parentName); + } + } else if (mode === 'edit') { + $("#popTitle").text('용량/출력 정보 수정'); + $("#pid").val(pid); + $("#btn_delete").show(); + loadDetail(pid); + } + } + + function loadDetail(id) { + $.ajax({ + url: '/settings/medicalCategory/getMedicalCategory.do', + type: 'POST', + data: { pid: id }, + success: function (res) { + if (res.msgCode === '0') { + const data = res.data; + $("#diviParent").val(data.divi_parent); + $("#diviName").val(data.divi_name); + $("#diviSort").val(data.divi_sort); + $("#diviColor").val(data.divi_color || '#000000'); + + // 단가/제품 정보 (복구) + $("#kindCost").val(formatNumber(data.kind_cost)); + $("#dcCost").val(formatNumber(data.dc_cost)); + $("#kindUnit").val(data.kind_unit || ''); + $("#kindUnitVol").val(data.kind_unit_vol || 0); + + // 상위 카테고리 명칭 표시 (Edit 모드) + if (data.parent_name) { + $("#parentNameRow").show(); + $("#parentNameTxt").text(data.parent_name); + } else if (parentName) { + $("#parentNameRow").show(); + $("#parentNameTxt").text(parentName); + } + } else { + alert("정보를 불러올 수 없습니다."); + window.close(); + } + }, + error: function () { + alert("상세 정보 조회 통신 오류"); + window.close(); + } + }); + } + + function bindEvents() { + $("#btn_close").on("click", function () { + window.close(); + }); + + $("#btn_save").on("click", function () { + saveCategory(); + }); + + $("#btn_delete").on("click", function () { + deleteCategory(); + }); + + // 금액 콤마 자동 입력 이벤트 + $("#kindCost, #dcCost").on("keyup", function () { + $(this).val(formatNumber($(this).val())); + }); + } + + function saveCategory() { + const dName = $("#diviName").val().trim(); + if (!dName) { + alert("용량/출력 명칭을 입력하세요."); + $("#diviName").focus(); + return; + } + + const submitObj = { + pid: $("#pid").val() || null, + storePid: $("#storePid").val(), + diviName: dName, + diviDept: $("#diviDept").val(), // hidden = 4 + diviParent: $("#diviParent").val(), + diviSort: parseInt($("#diviSort").val() || "0", 10), + diviColor: $("#diviColor").val(), + + // 단가/제품 정보 (복구 및 포맷팅 처리) + kindCost: unformatNumber($("#kindCost").val()), + dcCost: unformatNumber($("#dcCost").val()), + kindUnit: $("#kindUnit").val(), + kindUnitVol: parseFloat($("#kindUnitVol").val() || "0") + }; + + const targetUrl = mode === 'edit' ? '/settings/medicalCategory/modMedicalCategory.do' : '/settings/medicalCategory/putMedicalCategory.do'; + + $.ajax({ + url: targetUrl, + type: 'POST', + contentType: 'application/json', + data: JSON.stringify(submitObj), + success: function (res) { + alert(res.msgDesc); + if (res.msgCode === '0') { + if (window.opener && typeof window.opener.loadData === 'function') { + window.opener.loadData(true); + } + window.close(); + } + }, + error: function () { + alert("저장 중 시스템 오류가 발생했습니다."); + } + }); + } + + function deleteCategory() { + const pidVal = $("#pid").val(); + if (!pidVal) return; + if (!confirm("해당 카테고리를 삭제하시겠습니까?\n하위 항목이 있을 경우 삭제되지 않습니다.")) return; + + $.ajax({ + url: '/settings/medicalCategory/delMedicalCategory.do', + type: 'POST', + data: { pid: pidVal }, + success: function (res) { + alert(res.msgDesc); + if (res.msgCode === '0') { + if (window.opener && typeof window.opener.loadData === 'function') { + window.opener.loadData(true); + } + window.close(); + } + }, + error: function () { + alert("삭제 중 시스템 오류가 발생했습니다."); + } + }); + } +}); diff --git a/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept5.js b/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept5.js new file mode 100644 index 0000000..b55acea --- /dev/null +++ b/src/main/resources/static/js/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept5.js @@ -0,0 +1,144 @@ +/** + * 카테고리 Depth 5 팝업 스크립트 + */ +$(document).ready(function () { + const params = new URLSearchParams(window.location.search); + const mode = params.get('mode'); + const pid = params.get('pid'); + const diviDept = params.get('diviDept'); + const diviParent = params.get('diviParent'); + const parentName = params.get('parentName'); + + initForm(); + bindEvents(); + + function initForm() { + if (mode === 'add') { + $("#popTitle").text('부위 신규 등록'); + $("#pid").val(''); + $("#diviParent").val(diviParent); + $("#btn_delete").hide(); + + if (diviParent !== '0' && parentName) { + $("#parentNameRow").show(); + $("#parentNameTxt").text(parentName); + } + } else if (mode === 'edit') { + $("#popTitle").text('부위 정보 수정'); + $("#pid").val(pid); + $("#btn_delete").show(); + loadDetail(pid); + } + } + + function loadDetail(id) { + $.ajax({ + url: '/settings/medicalCategory/getMedicalCategory.do', + type: 'POST', + data: { pid: id }, + success: function (res) { + if (res.msgCode === '0') { + const data = res.data; + $("#diviParent").val(data.divi_parent); + $("#diviName").val(data.divi_name); + $("#diviSort").val(data.divi_sort); + $("#diviColor").val(data.divi_color || '#000000'); + + // 상위 카테고리 명칭 표시 (Edit 모드) + if (data.parent_name) { + $("#parentNameRow").show(); + $("#parentNameTxt").text(data.parent_name); + } else if (parentName) { + $("#parentNameRow").show(); + $("#parentNameTxt").text(parentName); + } + } else { + alert("정보를 불러올 수 없습니다."); + window.close(); + } + }, + error: function () { + alert("상세 정보 조회 통신 오류"); + window.close(); + } + }); + } + + function bindEvents() { + $("#btn_close").on("click", function () { + window.close(); + }); + + $("#btn_save").on("click", function () { + saveCategory(); + }); + + $("#btn_delete").on("click", function () { + deleteCategory(); + }); + } + + function saveCategory() { + const dName = $("#diviName").val().trim(); + if (!dName) { + alert("부위 명칭을 입력하세요."); + $("#diviName").focus(); + return; + } + + const submitObj = { + pid: $("#pid").val() || null, + storePid: $("#storePid").val(), + diviName: dName, + diviDept: $("#diviDept").val(), // hidden = 5 + diviParent: $("#diviParent").val(), + diviSort: parseInt($("#diviSort").val() || "0", 10), + diviColor: $("#diviColor").val() + }; + + const targetUrl = mode === 'edit' ? '/settings/medicalCategory/modMedicalCategory.do' : '/settings/medicalCategory/putMedicalCategory.do'; + + $.ajax({ + url: targetUrl, + type: 'POST', + contentType: 'application/json', + data: JSON.stringify(submitObj), + success: function (res) { + alert(res.msgDesc); + if (res.msgCode === '0') { + if (window.opener && typeof window.opener.loadData === 'function') { + window.opener.loadData(true); + } + window.close(); + } + }, + error: function () { + alert("저장 중 시스템 오류가 발생했습니다."); + } + }); + } + + function deleteCategory() { + const pidVal = $("#pid").val(); + if (!pidVal) return; + if (!confirm("해당 카테고리를 삭제하시겠습니까?\n하위 항목이 있을 경우 삭제되지 않습니다.")) return; + + $.ajax({ + url: '/settings/medicalCategory/delMedicalCategory.do', + type: 'POST', + data: { pid: pidVal }, + success: function (res) { + alert(res.msgDesc); + if (res.msgCode === '0') { + if (window.opener && typeof window.opener.loadData === 'function') { + window.opener.loadData(true); + } + window.close(); + } + }, + error: function () { + alert("삭제 중 시스템 오류가 발생했습니다."); + } + }); + } +}); diff --git a/src/main/resources/templates/web/settings/code/codeList.html b/src/main/resources/templates/web/settings/code/codeList.html new file mode 100644 index 0000000..8ccdb0a --- /dev/null +++ b/src/main/resources/templates/web/settings/code/codeList.html @@ -0,0 +1,132 @@ + + + + + 코드 관리 + + + + + + + + + + + + + + + + +
+
+
+
공통코드 관리
+
+
+ +
+ +
+
+ 코드 그룹 +
+ + +
+
+
+
+ + +
+
+ 상세 코드 (좌측에서 그룹을 선택하세요) +
+ + +
+
+
+
+
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/web/settings/code/popup/codeGroupPop.html b/src/main/resources/templates/web/settings/code/popup/codeGroupPop.html new file mode 100644 index 0000000..6148f06 --- /dev/null +++ b/src/main/resources/templates/web/settings/code/popup/codeGroupPop.html @@ -0,0 +1,175 @@ + + + + + 코드 그룹 정보 + + + + + + +
+

코드 그룹 등록

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
* 그룹 ID
* 그룹 명칭
설명
사용 여부 + +
+ +
+ + + +
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/web/settings/code/popup/codePop.html b/src/main/resources/templates/web/settings/code/popup/codePop.html new file mode 100644 index 0000000..cea7b04 --- /dev/null +++ b/src/main/resources/templates/web/settings/code/popup/codePop.html @@ -0,0 +1,195 @@ + + + + + 상세 코드 정보 + + + + + + +
+

상세 코드 등록

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
* 코드 ID
* 코드 명칭
추가 값 (Val)
설명
정렬 순서
사용 여부 + +
+ +
+ + + +
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/web/settings/medicalcategory/medicalCategoryList.html b/src/main/resources/templates/web/settings/medicalcategory/medicalCategoryList.html index 5bae033..7e73e58 100644 --- a/src/main/resources/templates/web/settings/medicalcategory/medicalCategoryList.html +++ b/src/main/resources/templates/web/settings/medicalcategory/medicalCategoryList.html @@ -118,9 +118,15 @@ -
- +
diff --git a/src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept1.html b/src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept1.html new file mode 100644 index 0000000..58e081a --- /dev/null +++ b/src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept1.html @@ -0,0 +1,179 @@ + + + + + 진료과목 정보 + + + + + + +
+

진료과목(Depth 1) 등록

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
* 항목 명칭
정렬 순서 숫자가 낮을수록 먼저 + 표시됩니다.
색상 코드
+ +
+ + + +
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept2.html b/src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept2.html new file mode 100644 index 0000000..ad29af3 --- /dev/null +++ b/src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept2.html @@ -0,0 +1,179 @@ + + + + + 진료유형 정보 + + + + + + +
+

진료유형(Depth 2) 등록

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
* 항목 명칭
정렬 순서 숫자가 낮을수록 먼저 + 표시됩니다.
색상 코드
+ +
+ + + +
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept3.html b/src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept3.html new file mode 100644 index 0000000..375cb0f --- /dev/null +++ b/src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept3.html @@ -0,0 +1,179 @@ + + + + + 진료유형 정보 + + + + + + +
+

제품/시술(Depth 3) 등록

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
* 항목 명칭
정렬 순서 숫자가 낮을수록 먼저 + 표시됩니다.
색상 코드
+ +
+ + + +
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPop.html b/src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept4.html similarity index 57% rename from src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPop.html rename to src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept4.html index 3bc77aa..c9dd219 100644 --- a/src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPop.html +++ b/src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept4.html @@ -143,11 +143,10 @@
-

진료유형 등록

+

용량/출력(Depth 4) 등록

- + - @@ -177,84 +176,9 @@ - -
구분 설정
+ +
용량/출력 정보
- - - - - - - - - - - - - - - - - - - - - - - - - - -
노출 여부 - - -
구분 -   -   -   -   - -
재고관리품목 -      - -
비과세 - -
비세금 - -
- - -
제품/시술 정보
- - - - - - - - - - - - - - - - - - - -
거래처 - -
제품설명
기타설명
- - -
용량/출력 정보
- @@ -262,24 +186,31 @@ - + - - - - - - + +
단가 + 원 +
할인가
단위 - - 용량: - - +
비율사용량 + + +
@@ -291,7 +222,7 @@
- + \ No newline at end of file diff --git a/src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept5.html b/src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept5.html new file mode 100644 index 0000000..3c58d1c --- /dev/null +++ b/src/main/resources/templates/web/settings/medicalcategory/popup/medicalCategoryInfoPopDept5.html @@ -0,0 +1,179 @@ + + + + + 진료유형 정보 + + + + + + +
+

부위(Depth 5) 등록

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
* 항목 명칭
정렬 순서 숫자가 낮을수록 먼저 + 표시됩니다.
색상 코드
+ +
+ + + +
+
+ + + + + \ No newline at end of file