From 949000f159db61caea8010b49d633767f7aae247 Mon Sep 17 00:00:00 2001 From: insung Date: Wed, 18 Dec 2024 12:18:34 +0900 Subject: [PATCH 1/6] update AdminController --- .../com/stockm8/controller/AdminController.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/stockMate/src/main/java/com/stockm8/controller/AdminController.java b/stockMate/src/main/java/com/stockm8/controller/AdminController.java index 3bc50c9..1034bc7 100644 --- a/stockMate/src/main/java/com/stockm8/controller/AdminController.java +++ b/stockMate/src/main/java/com/stockm8/controller/AdminController.java @@ -25,11 +25,6 @@ @RequestMapping(value = "/admin/*") public class AdminController { - // 현재 로그인한 사용자 정보 가져오기(인터셉터에서 정의됨) - private UserVO getCurrentUser(HttpServletRequest request) { - return (UserVO) request.getAttribute("currentUser"); - } - private static final Logger logger = LoggerFactory.getLogger(AdminController.class); @Inject @@ -38,11 +33,11 @@ private UserVO getCurrentUser(HttpServletRequest request) { private UserService userService; /** - * 관리자 메인 페이지 표시(GET) http://localhost:8088/admin/main - * + * 관리자 메인 페이지 표시(GET) * @throws Exception * */ + // http://localhost:8088/admin/main @GetMapping("/main") public String adminMainGET(@SessionAttribute("userId") Long userId, Model model) throws Exception { logger.info("adminMainGET() 호출 - 페이지 접근 (userId: {})", userId); @@ -72,15 +67,14 @@ public String adminApproveGET(@SessionAttribute("userId") Long userId, Model mod } /** - * 관리자 회원목록표시(GET) http://localhost:8088/admin/userList + * 관리자 회원목록표시(GET) * */ + // http://localhost:8088/admin/userList @RequestMapping(value = "/adminList", method = RequestMethod.GET) public String adminListGET(Model model, HttpServletRequest request, HttpServletResponse response) throws Exception { logger.info("adminListGET() 호출"); - UserVO currentUser = getCurrentUser(request); - int businessId = currentUser.getBusinessId(); return "admin/userList"; } From c433e524463fc2bcfe22c395cee7f45f734d564e Mon Sep 17 00:00:00 2001 From: BowWowBow Date: Wed, 18 Dec 2024 17:57:30 +0900 Subject: [PATCH 2/6] =?UTF-8?q?=EB=A9=94=EC=9D=B8=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20=ED=9A=8C=EC=9B=90?= =?UTF-8?q?=EA=B0=80=EC=9E=85=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stockm8/controller/HomeController.java | 14 ++ .../stockm8/controller/UserController.java | 2 +- .../webapp/WEB-INF/views/consultation.jsp | 29 ++- .../src/main/webapp/WEB-INF/views/intro.jsp | 40 +++- .../main/webapp/WEB-INF/views/location.jsp | 179 ++++++++++++++ .../src/main/webapp/WEB-INF/views/main.jsp | 62 ++--- .../src/main/webapp/WEB-INF/views/price.jsp | 218 ++++++++++++++++++ .../WEB-INF/views/user/showpassword.jsp | 17 ++ .../main/webapp/WEB-INF/views/user/signup.jsp | 33 +-- .../webapp/WEB-INF/views/warehouse/price.jsp | 12 + .../src/main/webapp/resources/css/36140.jpg | Bin 0 -> 2743520 bytes .../src/main/webapp/resources/css/9950253.jpg | Bin 0 -> 500729 bytes .../main/webapp/resources/css/stockmate.png | Bin 0 -> 28018 bytes .../css/\354\225\275\353\217\204.png" | Bin 0 -> 901614 bytes 14 files changed, 564 insertions(+), 42 deletions(-) create mode 100644 stockMate/src/main/webapp/WEB-INF/views/location.jsp create mode 100644 stockMate/src/main/webapp/WEB-INF/views/price.jsp create mode 100644 stockMate/src/main/webapp/WEB-INF/views/user/showpassword.jsp create mode 100644 stockMate/src/main/webapp/WEB-INF/views/warehouse/price.jsp create mode 100644 stockMate/src/main/webapp/resources/css/36140.jpg create mode 100644 stockMate/src/main/webapp/resources/css/9950253.jpg create mode 100644 stockMate/src/main/webapp/resources/css/stockmate.png create mode 100644 "stockMate/src/main/webapp/resources/css/\354\225\275\353\217\204.png" diff --git a/stockMate/src/main/java/com/stockm8/controller/HomeController.java b/stockMate/src/main/java/com/stockm8/controller/HomeController.java index bdd2290..ec5f570 100644 --- a/stockMate/src/main/java/com/stockm8/controller/HomeController.java +++ b/stockMate/src/main/java/com/stockm8/controller/HomeController.java @@ -118,4 +118,18 @@ public String introGET(Model model, HttpSession session) throws Exception { // model.addAttribute("resultVO", resultVO); return "/intro"; } + + // 회사소개 - /price (GET) + @RequestMapping(value = "/price", method = RequestMethod.GET) + public String priceGET(Model model, HttpSession session) throws Exception { + Long userId = (Long) session.getAttribute("userId"); +// if (id == null) { +// // 세션에 id가 없으면 에러 처리 +// return "redirect:/user/main"; +// } +// UserVO resultVO = userService.getUser(userId); +// model.addAttribute("resultVO", resultVO); + return "/price"; + } + } diff --git a/stockMate/src/main/java/com/stockm8/controller/UserController.java b/stockMate/src/main/java/com/stockm8/controller/UserController.java index fa2a6da..a3f0370 100644 --- a/stockMate/src/main/java/com/stockm8/controller/UserController.java +++ b/stockMate/src/main/java/com/stockm8/controller/UserController.java @@ -46,7 +46,7 @@ public class UserController { // http://localhost:8088/user/signup (o) // http://localhost:8088/user/signin (o) - // http://localhost:8088/user/main (o) + // http://localhost:8088/ (o) // http://localhost:8088/user/info1 (o) // http://localhost:8088/user/info2 (o) // http://localhost:8088/dashboard (o) diff --git a/stockMate/src/main/webapp/WEB-INF/views/consultation.jsp b/stockMate/src/main/webapp/WEB-INF/views/consultation.jsp index bf19f4f..d7dc1a9 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/consultation.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/consultation.jsp @@ -58,7 +58,7 @@ } .form-container input, .form-container textarea, .form-container button { - width: 95.3%; + width: 96%; margin-bottom: 8px; padding: 8px; border: none; @@ -80,6 +80,30 @@ background-color: #ffaa00; } + .back-button { + display: flex; + justify-content: center; /* 수평 중앙 정렬 */ + margin: 40px auto; /* 위아래 여백 추가 */ +} + +.back-button a { + text-decoration: none; + padding: 15px 30px; + background-color: #007BFF; + color: #fff; + border-radius: 10px; + font-size: 20px; + font-weight: bold; + font-family: 'Roboto', sans-serif; + transition: background-color 0.3s ease, transform 0.3s ease; +} + +.back-button a:hover { + background-color: #0056b3; + transform: scale(1.05); +} + + .footer { text-align: center; margin-top: 10px; @@ -145,6 +169,9 @@ 1588-2929 + diff --git a/stockMate/src/main/webapp/WEB-INF/views/intro.jsp b/stockMate/src/main/webapp/WEB-INF/views/intro.jsp index d6a0e56..98c0dad 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/intro.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/intro.jsp @@ -83,6 +83,34 @@ .footer a:hover { text-decoration: underline; } + .back-button { + margin-top: 30px; + } + + .back-button { + display: flex; + justify-content: center; /* 수평 중앙 정렬 */ + margin: 40px auto; /* 위아래 여백 추가 */ +} + +.back-button a { + text-decoration: none; + padding: 15px 30px; + background-color: #007BFF; + color: #fff; + border-radius: 10px; + font-size: 20px; + font-weight: bold; + font-family: 'Roboto', sans-serif; + transition: background-color 0.3s ease, transform 0.3s ease; +} + +.back-button a:hover { + background-color: #0056b3; + transform: scale(1.05); +} + + @@ -121,15 +149,25 @@

개발팀

-

개발팀은 이카운트 ERP의 모든 기능을 구현합니다.

+

개발팀은 stock-mate ERP의 모든 기능을 구현합니다.

고객사 제안과 전략적 개발 기능을 기반으로 개발 스케줄을 잡고 기능을 개발합니다.

완성된 기능이 무사히 업그레이드되었을 때의 뿌듯함을 느끼며, 고객 만족도를 위해 지속적으로 노력하고 있습니다.

+ + + + + + + + diff --git a/stockMate/src/main/webapp/WEB-INF/views/location.jsp b/stockMate/src/main/webapp/WEB-INF/views/location.jsp new file mode 100644 index 0000000..c9e34a6 --- /dev/null +++ b/stockMate/src/main/webapp/WEB-INF/views/location.jsp @@ -0,0 +1,179 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> + + + + + +창고 소개 + + + + +
+

창고 소개

+
+ + +
창고 개요
+ + +
+ +
+ 창고 이미지 +
+ + +
+

용인창고

+

+ 경기 용인시 처인구 양지면 주북로 105-5 본 창고는 연면적 11만 5천여 평 규모로, + 넓은 아드와 최적화된 물류 시스템을 갖춘 복합물류센터입니다.
+ 99% 이상의 전용률과 효율적인 도크 구성으로 물류 프로세스를 신속하게 처리할 수 있습니다. +

+
+
+ + + + + + + + diff --git a/stockMate/src/main/webapp/WEB-INF/views/main.jsp b/stockMate/src/main/webapp/WEB-INF/views/main.jsp index fcd8658..709f41b 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/main.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/main.jsp @@ -107,12 +107,7 @@ body { margin-bottom: 15px; } -.content p { - font-size: 1.2rem; - color: #bbbbbb; - line-height: 1.8; - margin-bottom: 30px; -} + /* Row Layout */ .content .row { @@ -164,9 +159,28 @@ body { text-decoration: underline; } -.map-section{ -margin: 0 auto; + + +.map-section { + display: flex; + flex-direction: column; + align-items: center; /* 가운데 정렬 */ + justify-content: center; + text-align: center; + height: 60vh; +} + +.map-section img { + max-width: 1050px; /* 이미지 최대 너비 설정 */ + width: 100%; /* 반응형 이미지 크기 */ + height: auto; + transition: transform 0.3s ease; /* 부드럽게 확대 효과 */ } + +.map-section img:hover { + transform: scale(1.5); /* 이미지 안에서만 확대 */ +} + @@ -181,28 +195,16 @@ margin: 0 auto; 회원가입 로그인 대시보드 사용법 - 상담문의 회사소개 창고소개 + 임대료 + 상담문의
-

20년 노하우의 지산그룹이 만든 안성창고

-

긍정 마인드를 통해 끊임없이 새로운 변화를 추구하고 있습니다

- - -

걸림돌을 디딤돌로 긍정의 끝은 무한한 가능성!

-

지산그룹은 지난 1999년 창립 이후 오늘에 이르기까지 물류센터 개발, 운영 등 물류분야와 국내 PC업계 최초의 스마트 팩토리 구현 등 -축적된 기술력과 차별화된 경영전략 및 인적구성으로 최고의 서비스를 제공해 왔습니다. -특히 건설전문가 집단의 역량을 살려 폭 넓은 지식과 경험을 바탕으로 분야별 전문 인력으로 구성되어 설계, 생산, 조립, 건설사업관리, -프로젝트관리 등 부동산 개발의 전 분양에 걸쳐 자부심을 가지며 국내 최고의 물류센터와 PC개발 전문기업으로 앞서 나아가고 있습니다. -어떠한 난관도 불가능한 것이 없다는 긍정 마인드를 통해 끊임없이 새로운 변화를 추구하는 지산그룹은 고객 여러분과 함께 하겠습니다.

- - - - - +

20년 노하우의 Stock-mate

+
Warehouse Exterior @@ -219,14 +221,22 @@ margin: 0 auto; 회사 약도
+ +
+

문의사항

+

대표번호: 031-532-0223

+

영업문의: 황성인 센터장 010-5555-6354

+

경기 용인시 처인구 양지면 주북로 105-5

+
+ + + - - +
diff --git a/stockMate/src/main/webapp/WEB-INF/views/dashboard.jsp b/stockMate/src/main/webapp/WEB-INF/views/dashboard.jsp index b678aab..c9e34a6 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/dashboard.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/dashboard.jsp @@ -1,362 +1,179 @@ <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> - - - - 대시보드 - + + +창고 소개 + -
- - -
${errorMessage}
-
- -
- 대시보드 -
- + +
+

창고 소개

+
- -
- - - -
- -
-

Order Time

-
- -
-

Donut Chart

- -
+ +
창고 개요
- -
-

Bar Chart

- -
-
-
+ +
+ +
+ 창고 이미지
- -
- 회사 정보 - 사업자 번호, 연락처 등 Footer 내용 -
+ +
+

용인창고

+

+ 경기 용인시 처인구 양지면 주북로 105-5 본 창고는 연면적 11만 5천여 평 규모로, + 넓은 아드와 최적화된 물류 시스템을 갖춘 복합물류센터입니다.
+ 99% 이상의 전용률과 효율적인 도크 구성으로 물류 프로세스를 신속하게 처리할 수 있습니다. +

+
+ + - - - + + - diff --git a/stockMate/src/main/webapp/WEB-INF/views/intro.jsp b/stockMate/src/main/webapp/WEB-INF/views/intro.jsp index d6a0e56..98c0dad 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/intro.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/intro.jsp @@ -83,6 +83,34 @@ .footer a:hover { text-decoration: underline; } + .back-button { + margin-top: 30px; + } + + .back-button { + display: flex; + justify-content: center; /* 수평 중앙 정렬 */ + margin: 40px auto; /* 위아래 여백 추가 */ +} + +.back-button a { + text-decoration: none; + padding: 15px 30px; + background-color: #007BFF; + color: #fff; + border-radius: 10px; + font-size: 20px; + font-weight: bold; + font-family: 'Roboto', sans-serif; + transition: background-color 0.3s ease, transform 0.3s ease; +} + +.back-button a:hover { + background-color: #0056b3; + transform: scale(1.05); +} + + @@ -121,15 +149,25 @@

개발팀

-

개발팀은 이카운트 ERP의 모든 기능을 구현합니다.

+

개발팀은 stock-mate ERP의 모든 기능을 구현합니다.

고객사 제안과 전략적 개발 기능을 기반으로 개발 스케줄을 잡고 기능을 개발합니다.

완성된 기능이 무사히 업그레이드되었을 때의 뿌듯함을 느끼며, 고객 만족도를 위해 지속적으로 노력하고 있습니다.

+ + + + + + + + diff --git a/stockMate/src/main/webapp/WEB-INF/views/location.jsp b/stockMate/src/main/webapp/WEB-INF/views/location.jsp new file mode 100644 index 0000000..c9e34a6 --- /dev/null +++ b/stockMate/src/main/webapp/WEB-INF/views/location.jsp @@ -0,0 +1,179 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> + + + + + +창고 소개 + + + + +
+

창고 소개

+
+ + +
창고 개요
+ + +
+ +
+ 창고 이미지 +
+ + +
+

용인창고

+

+ 경기 용인시 처인구 양지면 주북로 105-5 본 창고는 연면적 11만 5천여 평 규모로, + 넓은 아드와 최적화된 물류 시스템을 갖춘 복합물류센터입니다.
+ 99% 이상의 전용률과 효율적인 도크 구성으로 물류 프로세스를 신속하게 처리할 수 있습니다. +

+
+
+ + + + + + + + diff --git a/stockMate/src/main/webapp/WEB-INF/views/main.jsp b/stockMate/src/main/webapp/WEB-INF/views/main.jsp index fcd8658..709f41b 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/main.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/main.jsp @@ -107,12 +107,7 @@ body { margin-bottom: 15px; } -.content p { - font-size: 1.2rem; - color: #bbbbbb; - line-height: 1.8; - margin-bottom: 30px; -} + /* Row Layout */ .content .row { @@ -164,9 +159,28 @@ body { text-decoration: underline; } -.map-section{ -margin: 0 auto; + + +.map-section { + display: flex; + flex-direction: column; + align-items: center; /* 가운데 정렬 */ + justify-content: center; + text-align: center; + height: 60vh; +} + +.map-section img { + max-width: 1050px; /* 이미지 최대 너비 설정 */ + width: 100%; /* 반응형 이미지 크기 */ + height: auto; + transition: transform 0.3s ease; /* 부드럽게 확대 효과 */ } + +.map-section img:hover { + transform: scale(1.5); /* 이미지 안에서만 확대 */ +} + @@ -181,28 +195,16 @@ margin: 0 auto; 회원가입 로그인 대시보드 사용법 - 상담문의 회사소개 창고소개 + 임대료 + 상담문의
-

20년 노하우의 지산그룹이 만든 안성창고

-

긍정 마인드를 통해 끊임없이 새로운 변화를 추구하고 있습니다

- - -

걸림돌을 디딤돌로 긍정의 끝은 무한한 가능성!

-

지산그룹은 지난 1999년 창립 이후 오늘에 이르기까지 물류센터 개발, 운영 등 물류분야와 국내 PC업계 최초의 스마트 팩토리 구현 등 -축적된 기술력과 차별화된 경영전략 및 인적구성으로 최고의 서비스를 제공해 왔습니다. -특히 건설전문가 집단의 역량을 살려 폭 넓은 지식과 경험을 바탕으로 분야별 전문 인력으로 구성되어 설계, 생산, 조립, 건설사업관리, -프로젝트관리 등 부동산 개발의 전 분양에 걸쳐 자부심을 가지며 국내 최고의 물류센터와 PC개발 전문기업으로 앞서 나아가고 있습니다. -어떠한 난관도 불가능한 것이 없다는 긍정 마인드를 통해 끊임없이 새로운 변화를 추구하는 지산그룹은 고객 여러분과 함께 하겠습니다.

- - - - - +

20년 노하우의 Stock-mate

+
Warehouse Exterior @@ -219,14 +221,22 @@ margin: 0 auto; 회사 약도
+ +
+

문의사항

+

대표번호: 031-532-0223

+

영업문의: 황성인 센터장 010-5555-6354

+

경기 용인시 처인구 양지면 주북로 105-5

+
+ + + - - @@ -64,8 +65,10 @@ ${item.warehouseName} ${item.baseUnit} - 원 - 원 + + 원 + + 원 ${item.shipmentStatus} ${item.remarks} diff --git a/stockMate/src/main/webapp/WEB-INF/views/order/orderList.jsp b/stockMate/src/main/webapp/WEB-INF/views/order/orderList.jsp index 218d5fb..9922000 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/order/orderList.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/order/orderList.jsp @@ -31,7 +31,7 @@ - + 값이 없습니다 @@ -40,8 +40,8 @@ - - 원 + + 값이 없습니다 @@ -94,5 +94,4 @@ } - \ No newline at end of file diff --git a/stockMate/src/main/webapp/WEB-INF/views/order/register.jsp b/stockMate/src/main/webapp/WEB-INF/views/order/register.jsp index aa97d5c..2ea84ae 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/order/register.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/order/register.jsp @@ -2,59 +2,62 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> + 주문 발주 페이지 +

주문 발주

- + + 대시 보드 + 주문목록 +
+
-
주문 정보
-
-
-
-
- -
- 수주 - - - 발주 - -
-
-
-
-
-
-
- - -
-
-
-
- - -
-
-
-
-
+
주문 정보
+
+
+
+
+ +
+ 수주 + + + 발주 + +
+
+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
@@ -64,107 +67,101 @@
-
-
-
- 재고 정보 - -
-
-
-
-
- -
-
- - - - - - - - -
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
- -
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
- -
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
-
- -
-
-
- - -
-
-
-
-
+
+
+ 재고 정보 + +
+
+
+
+
+ +
+
+ + + + + + + +
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+ +
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
총계 정보
@@ -178,7 +175,8 @@
- + + @@ -230,457 +228,594 @@ - + + + /** + * 주문 관리 시스템 JavaScript 코드 + * - 재고 주문(수주/발주) 처리를 위한 프론트엔드 로직 + * - jQuery 기반으로 구현됨 + */ + + // DOM 셀렉터 상수 정의 - 자주 사용되는 HTML 요소들의 선택자를 미리 정의 + const SELECTORS = { + CARD: { + CONTAINER: '#stockInfoContainer', // 재고 정보 카드들을 모두 담고 있는 최상위 컨테이너 + TEMPLATE: '#stockInfoTemplate', // 새로운 재고 카드를 생성할 때 사용할 템플릿 + VISIBLE: '.stock-info-card:visible', // 현재 화면에 표시된 재고 정보 카드들 + STOCK_SELECT_BTN: '.stock-select-btn', // 각 카드의 재고 선택 버튼 + DELETE_BTN: '.delete-btn' // 각 카드의 삭제 버튼 + }, + FORM: { + ORDER: '#orderForm', // 전체 주문 폼 + ORDER_TYPE: 'input[name="orderType"]:checked', // 선택된 주문 유형 (수주/발주) + CREATED_AT: '#createdAt', // 주문 생성 날짜 입력 필드 + ORDER_NUMBER: '#orderNumber', // 주문 번호 입력 필드 + GRAND_TOTAL: '#grandTotal' // 총 주문 금액 표시 필드 + }, + MODAL: { + CONTAINER: '#stockListModal', // 재고 선택 모달 + CLOSE_BTN: '.btn-close', // 모달 닫기 버튼 + STOCK_LIST: '#stockListBody' // 재고 목록이 표시되는 테이블 본문 + }, + LOADING: '#loadingIndicator' // 로딩표시 인디게이터 + }; + + // 현재 선택 중인 재고 카드의 인덱스를 저장하는 전역 변수 모달에서 재고선택 시 사용 + let currentItemIndex = 0; + + /** + * 페이지 초기화 함수 + * - DOM이 완전히 로드된 후 실행됨 + * - 초기 날짜 설정, 주문번호 생성, 이벤트 리스너 설정 등을 수행 + */ + $(document).ready(function() { + // 현재 날짜를 주문 생성 날짜로 설정 + document.getElementById('createdAt').value = new Date().toISOString().split('T')[0]; + + // 새로운 주문번호 생성 요청 + generateNewOrderNumber(); + + // 재고 정보 카드 템플릿을 화면에서 숨김 + $('#stockInfoTemplate').hide(); + + // 모든 이벤트 리스너 설정 + setupEventListeners(); + + // 첫 번째 재고 정보 카드 추가 + addOrder(); + }); + + /** + * 계산 관련 유틸리티 + *주문 금액 계산과 관련된 함수들을 포함 + */ + const calculateUtils = { + // 단일 항목의 소계 계산 + // 파라미터 숫자 quantity - 주문 수량 + // 파라미터 숫자 unitPrice - 단가 + // 리턴 숫자 - 계산된 소계 금액 + + getItemTotal(quantity, unitPrice) { + return (parseInt(quantity) || 0) * (parseFloat(unitPrice) || 0); + }, + + // 전체 주문의 총계 계산 + // 파라미터 배열 items - 주문 항목 배열 + // 리턴 숫자 계산된 총계 금액 + + getGrandTotal(items) { + let total = 0; + items.forEach(item => { + total += this.getItemTotal(item.quantity, item.unitPrice); + }); + return total; + } + }; + + /** + * UI 업데이트 유틸리티 + * 화면 표시와 관련된 함수들을 포함 + */ + const uiUtils = { + // 숫자를 통화 형식으로 포맷팅 + // 파라미터 숫자 value - 변환할 숫자 + // 리턴 문자 - "###,###원" 형식의 문자열 + + formatPrice(value) { + return new Intl.NumberFormat('ko-KR').format(value) + '원'; + }, + + // 금액 표시 업데이트 + // 파라미터 jQuery element - 업데이트할 DOM 요소 + // 파라미터 숫자 value - 표시할 금액 + + updatePriceDisplay(element, value) { + element + .val(value) + .prop('type', 'text') + .val(this.formatPrice(value)); + } + }; + + /** + * 데이터 검증 유틸리티 + * 입력값 검증 관련 함수들을 포함 + */ + const validationUtils = { + // 주문 수량 검증 + // 수량이 1 이상인지 확인 + // 수주의 경우 가용 재고를 초과하지 않는지 확인 + //파라미터 jQuery input - 수량 입력 필드 + //리턴 불린 - 검증 통과 여부 + + + + validateQuantity(input) { + const card = input.closest('.stock-info-card'); + const orderType = $('input[name="orderType"]:checked').val(); + const quantity = parseInt(input.val()) || 0; + const available = parseInt(card.find('.available-stock').val()) || 0; + + if (quantity < 1) { + alert('주문 수량은 1 이상이어야 합니다.'); + input.val(1); + return false; + } + + if (orderType === 'OUTBOUND' && quantity > available) { + alert('수주 수량이 가용 재고를 초과할 수 없습니다.'); + input.val(available); + return false; + } + + return true; + }, + + // 전체 폼 검증 + // 주문 유형이 선택되었는지 확인 + // 모든 주문 항목에 재고가 선택되었는지 확인 + // 리턴 불린 - 검증 통과 여부 + validateForm() { + const orderType = $('input[name="orderType"]:checked').val(); + if (!orderType) { + alert('주문 유형을 선택해주세요.'); + return false; + } + + let isValid = true; + $('.stock-info-card:visible').each(function() { + const card = $(this); + if (!card.find('.stock-id').val()) { + alert('모든 주문에 대해 재고를 선택해주세요.'); + isValid = false; + return false; + } + }); + + return isValid; + } + }; + /** + * 주문 카드 관련 함수들 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 주석 추가 여기 까지 하다가 말음..... 더는 못해.. + */ + // 재고 정보 카드 추가 + function addOrder() { + // 템플릿 복제 + const newCard = $('#stockInfoTemplate').clone() + .removeAttr('id') + .show(); + + // 인덱스 설정 + const index = $('.stock-info-card:visible').length; + updateCardIndexes(newCard, index); + + // 컨테이너에 추가 + $('#stockInfoContainer').append(newCard); + + // 삭제 버튼 상태 업데이트 + updateDeleteButtonStatus(); + } + + // 카드 인덱스 업데이트 + function updateCardIndexes(card, index) { + card.find('input, textarea').each(function() { + const name = $(this).attr('name'); + if (name) { + $(this).attr('name', name.replace(/\[\d+\]/, `[${index}]`)); + } + }); + } + + // 모든 주문 항목의 인덱스 재정렬 + function updateOrderIndexes() { + $('.stock-info-card:visible').each(function(index) { + updateCardIndexes($(this), index); + }); + } + + /** + * 모달 관련 함수들 + */ + function openModal() { + $('#stockListModal').addClass('show'); + loadAvailableStocks(); + } + + function closeModal() { + $('#stockListModal').removeClass('show'); + } + + // 재고 목록 로드 + function loadAvailableStocks() { + showLoading(); + $.ajax({ + url: '/order/findAvailableStocks', + type: 'GET', + dataType: 'json', + success: function(data) { + renderStockList(data); + }, + error: function(xhr, status, error) { + console.error('Error:', error); + $('#stockListBody').html( + '재고 목록을 불러오는데 실패했습니다.' + ); + }, + complete: hideLoading + }); + } + + /** + * 재고 목록 표시 관련 함수들 + */ + // 재고 목록 렌더링 + function renderStockList(data) { + const tbody = $('#stockListBody'); + tbody.empty(); + + if (data && data.length > 0) { + data.forEach(function(stock) { + const row = createStockRow(stock); + tbody.append(row); + }); + } else { + tbody.html('가용 재고가 없습니다.'); + } + } + + // 재고 행 생성 + function createStockRow(stock) { + const row = $(''); + + [ + stock.stockId, + stock.product.productName, + stock.product.productBarcode || '-', + stock.warehouseName, + stock.warehouseId, + stock.totalQuantity, + stock.availableStock, + stock.product.productPrice, + stock.product.baseUnit + ].forEach(text => { + row.append($('').text(text)); + }); + + // 선택 버튼 추가 + const selectBtn = $(' -
+
-
+
diff --git a/stockMate/src/main/webapp/WEB-INF/views/business/register.jsp b/stockMate/src/main/webapp/WEB-INF/views/business/register.jsp index dc975ad..919e633 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/business/register.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/business/register.jsp @@ -7,24 +7,7 @@ 회사 등록 - +

비즈니스 등록

@@ -33,6 +16,11 @@
${errorMessage}
+ + <%-- 성공 메시지 표시 --%> + +
${successMessage}
+
@@ -54,8 +42,8 @@
- - + +

diff --git a/stockMate/src/main/webapp/WEB-INF/views/business/verify.jsp b/stockMate/src/main/webapp/WEB-INF/views/business/verify.jsp index 877210d..db21b53 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/business/verify.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/business/verify.jsp @@ -6,40 +6,7 @@ 비즈니스 인증 - +

비즈니스 인증

@@ -58,8 +25,8 @@

- - + +

diff --git a/stockMate/src/main/webapp/WEB-INF/views/category/delete.jsp b/stockMate/src/main/webapp/WEB-INF/views/category/delete.jsp index 5ee04a7..e1a4b81 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/category/delete.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/category/delete.jsp @@ -8,7 +8,8 @@ 카테고리 수정 - + +

카테고리 삭제

정말로 이 카테고리를 삭제하시겠습니까?

diff --git a/stockMate/src/main/webapp/WEB-INF/views/category/list.jsp b/stockMate/src/main/webapp/WEB-INF/views/category/list.jsp index 9e9db19..c5c3c6c 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/category/list.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/category/list.jsp @@ -70,9 +70,9 @@ -

/views/category/list.jsp

+

카테고리 목록

-

카테고리 목록 정보 출력

+ diff --git a/stockMate/src/main/webapp/WEB-INF/views/category/register.jsp b/stockMate/src/main/webapp/WEB-INF/views/category/register.jsp index c24a202..242f97d 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/category/register.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/category/register.jsp @@ -8,7 +8,6 @@ 카테고리 등록 - diff --git a/stockMate/src/main/webapp/WEB-INF/views/dashboard.jsp b/stockMate/src/main/webapp/WEB-INF/views/dashboard.jsp index b678aab..3671464 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/dashboard.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/dashboard.jsp @@ -7,39 +7,14 @@ 대시보드 + - - -
- -
- 대시보드 -
- - - -
- - - - -
-

Order Time

-
- -
-

Donut Chart

- -
- - -
-

Bar Chart

- -
-
-
-
- - -
- 회사 정보 - 사업자 번호, 연락처 등 Footer 내용 -
-
- - - - - - - diff --git a/stockMate/src/main/webapp/WEB-INF/views/user/signin.jsp b/stockMate/src/main/webapp/WEB-INF/views/user/signin.jsp index abf1c50..d0500d4 100644 --- a/stockMate/src/main/webapp/WEB-INF/views/user/signin.jsp +++ b/stockMate/src/main/webapp/WEB-INF/views/user/signin.jsp @@ -7,6 +7,7 @@ 로그인 + -
- - -
${errorMessage}
-
+ <%-- 에러 메시지 표시 --%> + +
${errorMessage}
+
+ + <%-- 성공 메시지 표시 --%> + +
${successMessage}
+
${warehouseDetail.updatedAt}
- + diff --git a/stockMate/src/main/webapp/WEB-INF/web.xml b/stockMate/src/main/webapp/WEB-INF/web.xml index 54513ce..ca3dc85 100644 --- a/stockMate/src/main/webapp/WEB-INF/web.xml +++ b/stockMate/src/main/webapp/WEB-INF/web.xml @@ -8,8 +8,7 @@ /WEB-INF/spring/*-context.xml - - + org.springframework.web.context.ContextLoaderListener @@ -18,7 +17,6 @@ com.stockm8.config.ApplicationLifecycleListener - diff --git a/stockMate/src/main/webapp/resources/css/bannerStyle.css b/stockMate/src/main/webapp/resources/css/bannerStyle.css new file mode 100644 index 0000000..1c1b118 --- /dev/null +++ b/stockMate/src/main/webapp/resources/css/bannerStyle.css @@ -0,0 +1,33 @@ +@charset "UTF-8"; + +.error-banner { + width: 100%; + background-color: #FCE4E4; + color: #D32F2F; + text-align: center; + padding: 10px 0; + font-size: 14px; + font-weight: 500; + position: absolute; + top: 0; + left: 0; + z-index: 1000; + border-bottom: 1px solid #F5C6C6; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +} + +.success-banner { + width: 100%; + background-color: #E6F4EA; + color: #2E7D32; + text-align: center; + padding: 10px 0; + font-size: 14px; + font-weight: 500; + position: absolute; + top: 0; + left: 0; + z-index: 1000; + border-bottom: 1px solid #C8E6C9; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +} \ No newline at end of file diff --git a/stockMate/src/main/webapp/resources/css/registerStyle2.css b/stockMate/src/main/webapp/resources/css/registerStyle2.css index 4d3b379..8f34a64 100644 --- a/stockMate/src/main/webapp/resources/css/registerStyle2.css +++ b/stockMate/src/main/webapp/resources/css/registerStyle2.css @@ -188,47 +188,13 @@ button:hover { color: #d32f2f; } -/* 검색창 스타일 */ -.search-container { - display: flex; - align-items: center; - position: absolute; /* 테이블 상단 우측에 배치 */ - top: 10px; - right: 20px; - width: 250px; /* 검색창 너비 */ - background-color: #fff; - border: 1px solid #ddd; - border-radius: 20px; /* 둥근 형태 */ - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); - padding: 5px 10px; - z-index: 10; -} - -/* 검색 필드 우측 상단 배치 */ -/* .search-field { */ -/* position: absolute; 부모를 기준으로 절대 위치 */ -/* top: 20px; 위에서 20px 여백 */ -/* right: 30px; 우측 정렬 */ -/* background-color: #fff; */ -/* border: 1px solid #ddd; */ -/* border-radius: 20px; */ -/* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */ -/* display: flex; */ -/* align-items: center; */ -/* padding: 5px 10px; */ -/* width: 250px; */ -/* z-index: 10; 다른 요소 위에 표시 */ -/* } */ - /* 검색 입력 필드 */ .search-input { - border: none; - outline: none; + width: 230px; font-size: 14px; - flex: 1; /* 너비를 가득 채우도록 설정 */ - padding: 5px 10px; border-radius: 20px; background-color: transparent; + float: right; } /* 검색 필드에 아이콘 추가 스타일 */ @@ -294,4 +260,3 @@ td button:hover { .hidden { display: none; } -