From 520c90d498dfc9b5b6cd3ffa1586d3fea3770ae0 Mon Sep 17 00:00:00 2001
From: SeoJin Kim
Date: Sun, 25 Apr 2021 23:43:31 +0900
Subject: [PATCH] =?UTF-8?q?[Spring][=EC=87=BC=ED=95=91=EB=AA=B0=20?=
=?UTF-8?q?=ED=94=84=EB=A1=9C=EC=A0=9D=ED=8A=B8][21]=20=EC=83=81=ED=92=88?=
=?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EC=88=98=EC=A0=95=20=EA=B5=AC=ED=98=84=20?=
=?UTF-8?q?-=201?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
https://kimvampa.tistory.com/206
---
.../com/vam/controller/AdminController.java | 4 +-
.../WEB-INF/views/admin/goodsDetail.jsp | 33 ++-
.../WEB-INF/views/admin/goodsModify.jsp | 155 ++++++++++
.../resources/css/admin/goodsModify.css | 280 ++++++++++++++++++
.../maven/com.vam/controller/pom.properties | 2 +-
.../com/vam/controller/AdminController.java | 4 +-
.../WEB-INF/views/admin/goodsDetail.jsp | 25 +-
.../WEB-INF/views/admin/goodsModify.jsp | 155 ++++++++++
.../resources/css/admin/goodsModify.css | 280 ++++++++++++++++++
.../maven/com.vam/controller/pom.properties | 2 +-
10 files changed, 916 insertions(+), 24 deletions(-)
create mode 100644 VamPa/src/main/webapp/WEB-INF/views/admin/goodsModify.jsp
create mode 100644 VamPa/src/main/webapp/resources/css/admin/goodsModify.css
create mode 100644 VamPa_MySQL/src/main/webapp/WEB-INF/views/admin/goodsModify.jsp
create mode 100644 VamPa_MySQL/src/main/webapp/resources/css/admin/goodsModify.css
diff --git a/VamPa/src/main/java/com/vam/controller/AdminController.java b/VamPa/src/main/java/com/vam/controller/AdminController.java
index 44bdeb2..de60332 100644
--- a/VamPa/src/main/java/com/vam/controller/AdminController.java
+++ b/VamPa/src/main/java/com/vam/controller/AdminController.java
@@ -82,8 +82,8 @@ public class AdminController {
}
- /* 상품 조회 페이지 */
- @GetMapping("/goodsDetail")
+ /* 상품 조회 페이지, 상품 수정 페이지 */
+ @GetMapping({"/goodsDetail", "/goodsModify"})
public void goodsGetInfoGET(int bookId, Criteria cri, Model model) throws JsonProcessingException {
logger.info("goodsGetInfo()........." + bookId);
diff --git a/VamPa/src/main/webapp/WEB-INF/views/admin/goodsDetail.jsp b/VamPa/src/main/webapp/WEB-INF/views/admin/goodsDetail.jsp
index 66989d2..217190e 100644
--- a/VamPa/src/main/webapp/WEB-INF/views/admin/goodsDetail.jsp
+++ b/VamPa/src/main/webapp/WEB-INF/views/admin/goodsDetail.jsp
@@ -138,15 +138,15 @@
-
-
+
+
@@ -161,14 +161,6 @@
$("#discount_interface").attr("value", bookDiscount);
- /* 출판일 값 가공 */
- let publeYear = '${goodsInfo.publeYear}';
- let length = publeYear.indexOf(" ");
-
- publeYear = publeYear.substring(0, length);
-
- $("input[name='publeYear']").attr("value", publeYear);
-
/* 책 소개 */
ClassicEditor
.create(document.querySelector('#bookIntro_textarea'))
@@ -283,6 +275,21 @@
}); // $(document).ready
+ /* 목록 이동 버튼 */
+ $("#cancelBtn").on("click", function(e){
+ e.preventDefault();
+ $("#moveForm").submit();
+ });
+
+ /* 수정 페이지 이동 */
+ $("#modifyBtn").on("click", function(e){
+ e.preventDefault();
+ let addInput = '';
+ $("#moveForm").append(addInput);
+ $("#moveForm").attr("action", "/admin/goodsModify");
+ $("#moveForm").submit();
+ });
+
+
+ <%@include file="../includes/admin/header.jsp" %>
+
+
+
+ <%@include file="../includes/admin/footer.jsp" %>
+
diff --git a/VamPa/src/main/webapp/WEB-INF/views/admin/goodsModify.jsp b/VamPa/src/main/webapp/WEB-INF/views/admin/goodsModify.jsp
new file mode 100644
index 0000000..c462af0
--- /dev/null
+++ b/VamPa/src/main/webapp/WEB-INF/views/admin/goodsModify.jsp
@@ -0,0 +1,155 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+
+
+