Sfoglia il codice sorgente

상품가격예약관리

eskim 5 anni fa
parent
commit
4c5a65d923

+ 2 - 1
style24.admin/src/main/java/com/style24/admin/biz/dao/TsaGoodsDao.java

@@ -687,7 +687,7 @@ public interface TsaGoodsDao {
 	int getGoodsPriceResDupChkCount(GoodsPriceRes goodsPriceRes);
 
 	/**
-	 * 상품 가격예약 등록
+	 * 상품 가격예약 등록(화면)
 	 *
 	 * @param goodsPriceRes
 	 * @return void
@@ -705,4 +705,5 @@ public interface TsaGoodsDao {
 	 * @since 2020. 11. 13
 	 */
 	void deleteGoodPriceRes(GoodsPriceRes goodsPriceRes);
+
 }

+ 115 - 2
style24.admin/src/main/java/com/style24/admin/biz/service/TsaGoodsService.java

@@ -1,6 +1,7 @@
 package com.style24.admin.biz.service;
 
 import java.io.IOException;
+import java.text.SimpleDateFormat;
 import java.util.Collection;
 
 import org.springframework.beans.factory.annotation.Autowired;
@@ -1826,10 +1827,11 @@ public class TsaGoodsService {
 		if (goodsPriceRes.getArrGoodsCd().length <= 0) {
 			throw new IllegalStateException(message.getMessage("FAIL_1001"));
 		}
-
+		int idx = 0;
 		for (String goodsCd : goodsPriceRes.getArrGoodsCd()) {
 
 			goodsPriceRes.setGoodsCd(goodsCd);
+			goodsPriceRes.setEndGoodsPrice(goodsPriceRes.getArrEndGoodsPrice()[idx]);
 			goodsPriceRes.setRegNo(TsaSession.getInfo().getUserNo());
 			goodsPriceRes.setUpdNo(TsaSession.getInfo().getUserNo());
 
@@ -1843,7 +1845,7 @@ public class TsaGoodsService {
 			goods.setRegNo(TsaSession.getInfo().getUserNo());
 			goods.setUpdNo(TsaSession.getInfo().getUserNo());
 			goods.setGoodsCd(goodsPriceRes.getGoodsCd());
-
+			idx++;
 		}
 	}
 
@@ -1867,4 +1869,115 @@ public class TsaGoodsService {
 			idx++;
 		}
 	}
+
+	/**
+	 * 상품 가격예약 저장
+	 *
+	 * @param goodsPriceList
+	 * @return
+	 * @author eskim
+	 * @since 2020. 11. 16
+	 */
+	@Transactional("shopTxnManager")
+	public void saveGoodsPriceExcelupload(Collection<GoodsPriceRes> goodsPriceList, String excelFilename) {
+
+		String targetPath = GagaFileUtil.getConcatenationPath(env.getProperty("upload.excel.target.path"), "excel");
+		if (goodsPriceList == null || goodsPriceList.isEmpty()) {
+			this.deleteExceluploadFile(targetPath, excelFilename);
+			throw new IllegalStateException(message.getMessage("FAIL_1001"));
+		}
+
+		// 입력값 확인
+		String goodsPriceResvCheck = getGoodsPriceResvCheck(goodsPriceList);
+		if (!"SUCC".equals(goodsPriceResvCheck)) {
+			this.deleteExceluploadFile(targetPath, excelFilename);
+			throw new IllegalStateException(goodsPriceResvCheck);
+		}
+
+		int index = 0;
+		for (GoodsPriceRes goodsPriceRes : goodsPriceList) {
+			goodsPriceRes.setUpdNo(TsaSession.getInfo().getUserNo());
+			goodsPriceRes.setRegNo(TsaSession.getInfo().getUserNo());
+
+			// 엑셀조회를 위한 SEARCH 테이블 생성
+			SearchData searchData = new SearchData();
+			searchData.setRegNo(goodsPriceRes.getRegNo());
+			searchData.setSearchCd(goodsPriceRes.getGoodsCd());
+			searchData.setDispOrd(index);
+			if (index == 0) {
+				commonService.deleteExceluploadSearCh(searchData);
+			}
+
+			commonService.createExceluploadSearch(searchData);
+
+			goodsDao.createGoodPriceRes(goodsPriceRes);
+
+			index++;
+		}
+	}
+
+	/*
+	 * 상품 가격예약 엑셀조회용 상품 저장 - 입력값 확인
+	 */
+	private String getGoodsPriceResvCheck(Collection<GoodsPriceRes> goodsPriceList) {
+
+		int cnt = 0;
+		for (GoodsPriceRes goodsPriceRes : goodsPriceList) {
+
+			if (StringUtils.isEmpty(goodsPriceRes.getGoodsCd())) {
+				return (cnt + 2) + "행의 상품코드를 확인해주세요";
+			}
+			if (StringUtils.isEmpty(goodsPriceRes.getResGoodsPrice())) {
+				return (cnt + 2) + "행의 예약가격을 확인해주세요.";
+			}
+			if (goodsPriceRes.getResGoodsPrice() <= 0) {
+				return (cnt + 2) + "행의 예약가격을 확인해주세요.";
+			}
+
+			String nowDate = GagaDateUtil.getToday();	//yyyyMMdd
+			SimpleDateFormat dateFormatParser = new SimpleDateFormat("yyyyMMdd");
+			dateFormatParser.setLenient(false);
+			try {
+				dateFormatParser.parse(goodsPriceRes.getApplyStdt() );
+			} catch (Exception e) {
+				return (cnt + 2) + "행의 예약시작일을 확인해주세요.";
+			}
+			try {
+				dateFormatParser.parse(goodsPriceRes.getApplyEddt() );
+			} catch (Exception e) {
+				return (cnt + 2) + "행의 예약종료일을 확인해주세요.";
+			}
+
+			if (Integer.parseInt(goodsPriceRes.getApplyStdt()) > Integer.parseInt(goodsPriceRes.getApplyEddt())) {
+				return (cnt + 2) + "행의 예약 시작일은 종료일보다 보다 클 수 없습니다.";
+			}
+
+			if (Integer.parseInt(goodsPriceRes.getApplyStdt()) <= Integer.parseInt(nowDate)) {
+				return (cnt + 2) + "행의 예약 시작일자는 현재일자 보다 작거나 같을 수 없습니다.";
+			}
+
+			//정상가와 비교
+			Goods searchGoods = new Goods();
+			searchGoods.setGoodsCd(goodsPriceRes.getGoodsCd());
+			Goods goods = goodsDao.getGoods(searchGoods);
+			if (goods == null) {
+				return (cnt + 2) + "행의 상품코드를 확인해주세요";
+			}
+			if (goods.getListPrice() < goodsPriceRes.getResGoodsPrice()) {
+				return (cnt + 2) + "행의 상품 정상가보다 예약판매가가 더 큽니다.";
+			}
+			if (!"Y".equals(goods.getSelfGoodsYn())) {
+				return (cnt + 2) + "행의 상품은 자사상품이 아닙니다.";
+			}
+
+			if(goodsDao.getGoodsPriceResDupChkCount(goodsPriceRes) > 0 ) {
+				return (cnt + 2) + "행은 이미 등록된 상품 가격예약이 존재합니다. \n(상품코드 : " + goodsPriceRes.getGoodsCd() + ")";
+			}
+
+
+			cnt++;
+		}
+
+		return "SUCC";
+	}
 }

+ 46 - 8
style24.admin/src/main/java/com/style24/admin/biz/web/TsaGoodsController.java

@@ -1237,7 +1237,7 @@ public class TsaGoodsController extends TsaBaseController {
 	@ResponseBody
 	public GagaResponse deleteGoodsRsvtTnm(@RequestBody GoodsTnmRes goodsTnmRes) {
 		goodsService.deleteGoodsRsvtTnm(goodsTnmRes);
-		return super.ok(message.getMessage("SUCC_0001"));
+		return super.ok(message.getMessage("SUCC_0003"));
 	}
 
 
@@ -1373,7 +1373,7 @@ public class TsaGoodsController extends TsaBaseController {
 	@ResponseBody
 	public GagaResponse deleteGoodsEpSkip(@RequestBody GoodsEpSkip goodsEpSkip) {
 		goodsService.deleteGoodsEpSkip(goodsEpSkip);
-		return super.ok(message.getMessage("SUCC_0001"));
+		return super.ok(message.getMessage("SUCC_0003"));
 	}
 
 
@@ -1471,7 +1471,7 @@ public class TsaGoodsController extends TsaBaseController {
 	 * @author eskim
 	 * @since 2020. 11. 12
 	 */
-	@GetMapping("/reserve/sell/regist/form")
+	@GetMapping("/reserve/sell/popup/form")
 	@ResponseBody
 	public ModelAndView goodsReserveSellRegistForm() {
 		ModelAndView mav = new ModelAndView();
@@ -1507,7 +1507,7 @@ public class TsaGoodsController extends TsaBaseController {
 	@ResponseBody
 	public GagaResponse deleteGoodsResSell(@RequestBody GoodsResSell goodsResSell) {
 		goodsService.deleteGoodsResSell(goodsResSell);
-		return super.ok(message.getMessage("SUCC_0001"));
+		return super.ok(message.getMessage("SUCC_0003"));
 	}
 
 	/**
@@ -1596,7 +1596,7 @@ public class TsaGoodsController extends TsaBaseController {
 	@ResponseBody
 	public GagaResponse deleteNoticeGoods(@RequestBody NoticeGoods noticeGoods) {
 		goodsService.deleteNoticeGoods(noticeGoods);
-		return super.ok(message.getMessage("SUCC_0001"));
+		return super.ok(message.getMessage("SUCC_0003"));
 	}
 
 	/**
@@ -1762,7 +1762,7 @@ public class TsaGoodsController extends TsaBaseController {
 	 * @author eskim
 	 * @since 2020. 11. 13
 	 */
-	@GetMapping("/price/reserve/regist/form")
+	@GetMapping("/price/reserve/popup/form")
 	@ResponseBody
 	public ModelAndView goodsPriceReserveRegistForm() {
 		ModelAndView mav = new ModelAndView();
@@ -1779,7 +1779,7 @@ public class TsaGoodsController extends TsaBaseController {
 	 * @author eskim
 	 * @since 2020. 11. 13
 	 */
-	@PostMapping("/price/reserve/regist/save")
+	@PostMapping("/price/reserve/save")
 	@ResponseBody
 	public GagaResponse saveGoodsPriceRes(@RequestBody GoodsPriceRes goodsPriceRes) {
 		goodsService.createGoodPriceRes(goodsPriceRes);
@@ -1798,7 +1798,45 @@ public class TsaGoodsController extends TsaBaseController {
 	@ResponseBody
 	public GagaResponse deleteGoodsPriceRes(@RequestBody GoodsPriceRes goodsPriceRes) {
 		goodsService.deleteGoodsPriceRes(goodsPriceRes);
-		return super.ok(message.getMessage("SUCC_0001"));
+		return super.ok(message.getMessage("SUCC_0003"));
+	}
+
+
+	/**
+	 * 상품 가격예약 변경
+	 *
+	 * @param goods
+	 * @return
+	 * @throws Exception
+	 * @author eskim
+	 * @since 2020. 02. 20
+	 */
+	@PostMapping("/price/excelupload/save")
+	@ResponseBody
+	public GagaResponse saveGoodsPriceResvExcelupload(@RequestBody Goods goods) throws Exception {
+
+		log.info("[saveGoodsPriceResvExcelupload] goods={} ",goods);
+		ObjectMapper mapper = new ObjectMapper();
+
+		String targetPath = GagaFileUtil.getConcatenationPath(env.getProperty("upload.excel.target.path"), "excel");
+		log.info("[saveGoodsPriceResvExcelupload] targetPath={} ",targetPath);
+		// DB 처리 시 사용되는 파라미터명(셀명) 설정
+		String[] cellName = {"goodsCd", "resGoodsPrice", "applyStdt", "applyEddt"};
+
+		Collection<GagaMap> ecxelGoodsList = GagaExcelUtil.getList(GagaFileUtil.getConcatenationPath(targetPath, goods.getExcelFileNm()), 0, cellName, 0);
+
+		Collection<GoodsPriceRes> goodsPriceList = new ArrayList<>();
+		for (GagaMap map : ecxelGoodsList) {
+			GoodsPriceRes goodsPriceRes = mapper.convertValue(map, GoodsPriceRes.class);
+			goodsPriceList.add(goodsPriceRes);
+		}
+
+		goodsService.saveGoodsPriceExcelupload(goodsPriceList, goods.getExcelFileNm());
+
+		// 파일 삭제
+		GagaFileUtil.deleteFile(GagaFileUtil.getConcatenationPath(targetPath, goods.getExcelFileNm()));
+
+		return super.ok("");
 	}
 
 }

+ 10 - 0
style24.admin/src/main/java/com/style24/persistence/domain/GoodsPriceRes.java

@@ -27,9 +27,19 @@ public class GoodsPriceRes extends TscBaseDomain {
 
 	private String cfrmNm;
 
+	private String goodsNm;
+	private String supplyGoodsCd;
+	private String brandEnm;
+	private String goodsStat;
+	private int currPrice;
+
+
 	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
 	private String[] arrGoodsCd;
 
+	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+	private int[] arrEndGoodsPrice;
+
 	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
 	private int[] arrGoodsPriceResSq;
 

+ 3 - 1
style24.admin/src/main/java/com/style24/persistence/domain/GoodsSearch.java

@@ -70,7 +70,9 @@ public class GoodsSearch extends TscBaseDomain {
 	private String barcode;
 	private String dateGbn;
 	private String goodsTnmRes;
-	private int goodsPriceRes;
+	private int goodsPriceResSt;
+	private int goodsPriceResEd;
+	private String selfGoodsYn;
 
 	private String goodsType;
 	private String selfMallYn;

+ 28 - 6
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -2408,8 +2408,16 @@
 		    <if test='beforSkipFlag != null and beforSkipFlag == "Y"'>
 		                               AND GR.APPLY_EDDT >= NOW() 
 		    </if>
+		    <if test="goodsPriceResSt != null and goodsPriceResSt != ''">
+		                               AND GR.RES_GOODS_PRICE >= #{goodsPriceResSt}
+		    </if>
+		    <if test="goodsPriceResEd != null and goodsPriceResEd != ''">
+		    <![CDATA[
+		                               AND GR.RES_GOODS_PRICE <= #{goodsPriceResEd}
+		     ]]>
+		    </if>
 		</if>
-		<if test="searchGb != null and searchGb =='EXCEL'">
+		<if test="searchGb != null and (searchGb =='EXCEL' or searchGb =='EXCELRESULT')">
 		INNER JOIN (
 		            SELECT SEARCH_CD
 		                 , TMP_DISP_ORD
@@ -2445,6 +2453,8 @@
 		    SELECT A.*, @rownum := @rownum + 1 AS RNUM FROM (
 		        SELECT
 		                G.GOODS_CD
+		              , G.CURR_PRICE
+		              , G.LIST_PRICE
 		              , B.BRAND_ENM
 		              , B.BRAND_GRP_NM
 		              , G.BRAND_CD
@@ -2467,6 +2477,8 @@
 		              , GR.REG_NO
 		              , FN_GET_USER_NM(GR.REG_NO) AS REG_NM
 		              , DATE_FORMAT(GR.REG_DT,'%Y%m%d%H%i%S') AS REG_DT
+		              , FN_GET_USER_NM(GR.UPD_NO) AS UPD_NM
+		              , DATE_FORMAT(GR.UPD_DT,'%Y%m%d%H%i%S') AS UPD_DT
 		        FROM TB_GOODS G
 		        JOIN ( SELECT @rownum := 0) R
 		        INNER JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD
@@ -2484,8 +2496,16 @@
 		            <if test='beforSkipFlag != null and beforSkipFlag == "Y"'>
 		                                       AND GR.APPLY_EDDT >= NOW() 
 		            </if>
+		            <if test="goodsPriceResSt != null and goodsPriceResSt != ''">
+		                                       AND GR.RES_GOODS_PRICE >= #{goodsPriceResSt}
+		            </if>
+		            <if test="goodsPriceResEd != null and goodsPriceResEd != ''">
+		            <![CDATA[
+		                                       AND GR.RES_GOODS_PRICE <= #{goodsPriceResEd}
+		             ]]>
+		            </if>
 		        </if>
-		        <if test="searchGb != null and searchGb =='EXCEL'">
+		        <if test="searchGb != null and (searchGb =='EXCEL' or searchGb =='EXCELRESULT')">
 		        INNER JOIN (
 		                    SELECT SEARCH_CD
 		                         , TMP_DISP_ORD
@@ -2508,9 +2528,10 @@
 		                   )
 		        </if>
 		        WHERE 1=1
+		        AND G.SELF_GOODS_YN = #{selfGoodsYn}
 		        <if test="searchGb == null or searchGb =='BASIC'" >
 		        <include refid="getGoodsListCondition_sql"/>
-		        ORDER BY  GR.APPLY_STDT DESC, GR.APPLY_EDDT DESC, G.GOODS_CD, GR.GOODS_TNM_RES_SQ
+		        ORDER BY  GR.APPLY_STDT DESC, GR.APPLY_EDDT DESC, G.GOODS_CD, GR.GOODS_PRICE_RES_SQ
 		        </if>
 		        <if test="searchGb != null and searchGb =='EXCEL'">
 		        ORDER BY SD.TMP_DISP_ORD
@@ -2523,7 +2544,7 @@
 		/* TsaGoods.getGoodsPriceResDupChkCount */
 		SELECT COUNT(GOODS_CD)
 		FROM TB_GOODS_PRICE_RES
-		WHERE 1=1
+		WHERE GOODS_CD = #{goodsCd}
 		<![CDATA[
 		AND APPLY_STDT <= DATE_FORMAT(#{applyStdt}, '%Y%m%d%H%i%S')
 		]]>
@@ -2556,10 +2577,10 @@
 		, #{endGoodsPrice}
 		, STR_TO_DATE(#{applyStdt},'%Y%m%d%H%i%S')
 		, STR_TO_DATE(#{applyEddt},'%Y%m%d%H%i%S')
-		, #{cfrmYn}
+		, NVL(#{cfrmYn},'N')
 		, #{cfrmNo}
 		, #{cfrmDt}
-		, #{applyYn}
+		, NVL(#{applyYn},'N')
 		, #{regNo}
 		, NOW()
 		, #{updNo}
@@ -2572,6 +2593,7 @@
 		/* TsaGoods.deleteGoodPriceRes */
 		DELETE FROM TB_GOODS_PRICE_RES
 		WHERE GOODS_PRICE_RES_SQ = #{goodsPriceResSq}
+		AND APPLY_YN = 'N'
 	</delete>
 
 </mapper>

+ 1 - 1
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsListForm.html

@@ -177,7 +177,7 @@
 						</td>
 						<th>판매가</th>
 						<td>
-							<input type="text" class="w90" name="currPriceSt" id="currPriceSt" maxlength="10" data-valid-type="numeric"/>원 ~ <input type="text" class="w90" name="currPriceEd" id="currPriceEd" maxlength="10" data-valid-type="numeric"/>원
+							<input type="text" class="w90 aR" name="currPriceSt" id="currPriceSt" maxlength="10" data-valid-type="numeric"/>원 ~ <input type="text" class="w90 aR" name="currPriceEd" id="currPriceEd" maxlength="10" data-valid-type="numeric"/>원
 						</td>
 						<th>할인율</th>
 						<td>

+ 105 - 30
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsPriceReserveForm.html

@@ -23,6 +23,7 @@
 		<div class="infoBox menu-desc">
 		</div>
 		<form id="goodsPriceResForm" name="goodsPriceResForm" action="#" th:action="@{'/goods/price/reserve/list'}">
+		<input type="hidden" id="selfGoodsYn" name="selfGoodsYn" value="Y"/>
 		<input type="hidden" id="searchGb" name="searchGb" />
 		<input type="hidden" id="arrGoodsCd" name="arrGoodsCd" />
  		<!-- 패널 영역1 -->
@@ -35,32 +36,30 @@
 			<div class="panelContent">
 				<table class="frmStyle">
 					<colgroup>
-						<col width="8%"/>
 						<col width="10%"/>
-						<col width="8%"/>
+						<col width="23%"/>
+						<col width="10%"/>
+						<col width="23%"/>
 						<col width="10%"/>
-						<col width="8%"/>
-						<col width="20%"/>
-						<col width="8%"/>
 						<col/>
 					</colgroup>
 					<tr>
 						<th>업체/브랜드</th>
-						<td colspan="5">
+						<td colspan="3">
 							<select name="supplyCompCd" id="supplyCompCd">
 								<option value="" th:if="${sessionInfo.roleCd} != 'G001_B000'">[전체]</option>
 								<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
 							<span id="multiBrand"></span>
 						</td>
-						<th rowspan="2">키워드</th>
-						<td rowspan="2">
+						<th rowspan="3">키워드</th>
+						<td rowspan="3">
 							<select name="search" id="search">
 								<option value="searchGoodsCd">상품코드</option>
 								<option value="searchGoodsNum">품번</option>
 								<option value="searchSupplyGoodsCd">업체상품코드</option>
 							</select>
-							<textarea class="textareaR2 w50p" name="condition" id="condition"></textarea>
+							<textarea class="textareaR3 w50p" name="condition" id="condition"></textarea>
 						</td>
 					</tr>
 					<tr>
@@ -70,10 +69,12 @@
 						</td>
 						<th>예약가격</th>
 						<td>
-							<input type="text" class="w200" name="goodsPriceRes" id="goodsPriceRes" maxlength="10" data-valid-type="integer"/>
+							<input type="text" class="w100 aR" name="goodsPriceResSt" id="goodsPriceResSt" maxlength="10" data-valid-type="numeric"/>원 ~ <input type="text" class="w100 aR" name="goodsPriceResEd" id="goodsPriceResEd" maxlength="10" data-valid-type="numeric"/>원
 						</td>
+					</tr>
+					<tr>
 						<th>시즌/년도</th>
-						<td>
+						<td colspan="3">
 							<select  name="styleYear" id="styleYear">
 								<option value="">[전체]</option>
 								<option th:if="${styleYearList}" th:each="oneData, status : ${styleYearList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
@@ -86,7 +87,7 @@
 					</tr>
 					<tr>
 						<th>예약일</th>
-						<td colspan="7" id="sellTerms"></td>
+						<td colspan="5" id="sellTerms"></td>
 					</tr>
 				</table>
 				<ul class="panelBar">
@@ -104,8 +105,14 @@
 			<!-- 상단버튼 영역  -->
 			<ul class="panelBar">
 				<li>
-					<button type="button" class="btn btn-default btn-lg" onclick="cfnDownloadSampleFile('SF003');">상품엑셀조회 양식 다운로드</button>
+					<select id="excelSample" name="excelSample">
+						<option value="">[선택]</option>
+						<option value="SF003">상품엑셀조회양식</option>
+						<option value="SF018" th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">상품가격예약등록양식</option>
+					</select>
+					<button type="button" class="btn btn-default btn-lg" id="btnExcelSampleDownLoad">다운로드</button>
 					<button type="button" class="btn btn-base btn-lg" id="btnGoodsExcelUpLoad">엑셀조회</button>
+					<button type="button" class="btn btn-success btn-lg" id="btnGoodsExcelSave" th:if="${sessionInfo.roleCd == 'G001_0000' OR sessionInfo.roleCd == 'G001_A000' OR sessionInfo.roleCd == 'G001_A101' OR sessionInfo.roleCd == 'G001_A100' OR sessionInfo.roleCd == 'G001_A001'}">상품가격예약등록</button>
 					<button type="button" class="btn btn-success  btn-lg" id="btnGoodsPriceResSave">예약등록</button>
 					<button type="button" class="btn btn-danger btn-lg" id="btnGoodsPriceResDelete">예약삭제</button>
 				</li>
@@ -146,37 +153,49 @@
 		{headerName: 'No', width: 60, cellClass: 'text-center',
 			valueGetter: function(params) { return cfnGridNumner('goodsPriceResForm',params.node.rowIndex, 'A');}
 		},
-		{headerName: "브랜드명", field: "brandGrpNm", width: 130, cellClass: 'text-center'},
-		{headerName: "상품코드", field: "goodsCd", width: 140, cellClass: 'text-center'},
-		{headerName: "상품명", field: "goodsNm", width: 180, cellClass: 'text-left'
+		{headerName: "브랜드명", field: "brandEnm", width: 110, cellClass: 'text-center'},
+		{headerName: "상품코드", field: "goodsCd", width: 110, cellClass: 'text-center'},
+		{headerName: "상품명", field: "goodsNm", width: 200, cellClass: 'text-left'
 			,cellRenderer: function(params) {
 				return '<a href="javascript:void(0);">' + params.value + '</a>';
 			}
 		},
-		{headerName: "상품타이틀", field: "goodsTnm", width: 200, cellClass: 'text-left'},
-		{headerName: "예약상품타이틀", field: "regGoodsTnm", width: 200, cellClass: 'text-left'},
-		{headerName: "예약시작일시", field: "applyStdt", width: 150, cellClass: 'text-center',
+		{headerName: "상품상태", field: "goodsStat" , width: 100, cellClass: 'text-center',
+			cellEditorParams: { values: gagaAgGrid.extractValues(goodsStatList) },
+			valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
+			valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
+		},
+		{headerName: "현재상품가격", field: "currPrice", width: 110, cellClass: 'text-right'
+			,valueFormatter: function(params) {return params.value.addComma();}
+		},
+		{headerName: "예약상품가격", field: "resGoodsPrice", width: 110, cellClass: 'text-right'
+			,valueFormatter: function(params) {return params.value.addComma();}
+			,cellStyle : function(params){return { 'color': 'red'}}
+		},
+		{headerName: "예약시작일시", field: "applyStdt", width: 130, cellClass: 'text-center',
 			cellRenderer: function(params) {
-				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") : '';
 			}
 		},
-		{headerName: "예약종료일시", field: "applyEddt", width: 150, cellClass: 'text-center',
+		{headerName: "예약종료일시", field: "applyEddt", width: 130, cellClass: 'text-center',
 			cellRenderer: function(params) {
-				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD") : '';
 			}
 		},
-		{headerName: "상품상태", field: "goodsStat" , width: 100, cellClass: 'text-center',
-			cellEditorParams: { values: gagaAgGrid.extractValues(goodsStatList) },
-			valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
-			valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
-		},
 		{headerName: "등록일시", field: "regDt", width: 150, cellClass: 'text-center',
 			cellRenderer: function(params) {
 				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
 			}
 		},
 		{headerName: "등록자", field: "regNm", width: 100, cellClass: 'text-center'},
-		{headerName: "상품타이틀예약순번", field: "goodsPriceResSq", hide: true}
+		{headerName: "수정일시", field: "updDt", width: 150, cellClass: 'text-center',
+			cellRenderer: function(params) {
+				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
+			}
+		},
+		{headerName: "수정자", field: "updNm", width: 100, cellClass: 'text-center'},
+		{headerName: "상품가겨예약순번", field: "goodsPriceResSq", hide: true},
+		{headerName: "적용여부", field: "applyYn", hide: true}
 	];
 	
 	// Get GridOptions
@@ -226,10 +245,13 @@
 		
 		if (typeof(gbn) != 'undefined' &&  gbn == 'EXCEL'){
 			$("#goodsPriceResForm input[name=searchGb]").val("EXCEL");
+		}else if (typeof(gbn) != 'undefined' &&  gbn == 'EXCELRESULT'){
+			$("#goodsPriceResForm input[name=searchGb]").val("EXCELRESULT");
 		}else{
 			$("#goodsPriceResForm input[name=searchGb]").val("BASIC");
 		}
 		
+		
 		if(!fnConditionCheck()) return;
 		
 		gagaPaging.init('goodsPriceResForm', fnSearchCallBack, 'goodsListPagination', $('#goodsPriceResForm').find('#pageSize').val());
@@ -254,7 +276,9 @@
 		var formId = '#goodsPriceResForm';
 		var form = document.goodsPriceResForm;
 
-		if($("#goodsPriceResForm input[name=searchGb]").val() == "EXCEL") return true;
+		if($("#goodsPriceResForm input[name=searchGb]").val() == "EXCEL" || $("#goodsPriceResForm input[name=searchGb]").val() == "EXCELRESULT") {
+			return true;
+		}
 		
 		var searchFlag = false;
 		var cnt = 0;
@@ -395,6 +419,17 @@
 				return false;
 			}
 		
+			if ((toDateStr > item.applyStdt) && ("Y" == $('#goodsRsvtTnmForm input[name=applyYn]').val())){
+				chkFlag = true;
+				mcxDialog.alertC("시작된 예약 상품은 삭제할 수 없습니다.", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						$('#goodsRsvtTnmForm input[name=applyEdYMD]').focus();
+					}
+				});
+				return false;
+			}
+			
 			arrGoodsCd.push(item.goodsCd);
 			arrGoodsPriceResSq.push(item.goodsPriceResSq);
 		});
@@ -412,7 +447,7 @@
 			};
 			
 			var jsonData = JSON.stringify(data);
-			gagajf.ajaxJsonSubmit('/goods/title/reserve/delete', jsonData, fnGoodsPriceResDeleteCollBack);
+			gagajf.ajaxJsonSubmit('/goods/price/reserve/delete', jsonData, fnGoodsPriceResDeleteCollBack);
 			}
 		});
 	});
@@ -421,6 +456,46 @@
 		//fnGoodsRsvtTnmListSearch($("#goodsPriceResForm input[name=searchGb]").val());
 	}
 	
+	//엑셀양식 다운로드
+	$('#btnExcelSampleDownLoad').on('click', function (){
+		var gb = $("#goodsPriceResForm select[name=excelSample]").val();
+		if (gagajf.isNull(gb)){
+			mcxDialog.alertC("다운로드 할 양식을 선택해주세요", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$('#goodsPriceResForm select[name=excelSample]').focus();
+				}
+			});
+			return false;
+		}
+		
+		cfnDownloadSampleFile($("#goodsPriceResForm select[name=excelSample]").val());	
+		
+	});
+	
+	//엑셀 상품 가격예약 저장
+	$('#btnGoodsExcelSave').on('click', function() {
+		cfnExcelUploadPopup('goodsPriceResvExcelUpload', 'goodsPriceResvExcelSave');
+	});
+	
+	var goodsPriceResvExcelSave = function(result){
+		mcxDialog.confirm('상품가격예약을 진행하시겠습니까?', {
+			cancelBtnText: "취소",
+			sureBtnText: "확인",
+			sureBtnClick: function(){
+				var data = {procJob : result.procJob
+						,excelFileNm : result.excelFileNm
+						};
+			var jsonData = JSON.stringify(data);
+			gagajf.ajaxJsonSubmit('/goods/price/excelupload/save', jsonData, fnGoodsSizeStockExcelSaveCallBack);
+			}
+		});	
+	}
+	
+	var fnGoodsSizeStockExcelSaveCallBack = function(result){
+		fnGoodsPriceSearch("EXCELRESULT");
+	}
+	
 	$(document).ready(function() {
 
 		cfnCreateCalendar('#sellTerms', 'applyStdt', 'applyEddt', true, '예약일', 'X');

+ 70 - 56
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsPriceReservePopupForm.html

@@ -24,30 +24,20 @@
 			<div class="panelContent">
 				<table class="frmStyle">
 					<colgroup>
+						<col style="width:10%;"/>
+						<col style="width:20%;"/>
 						<col style="width:10%;"/>
 						<col/>
 					</colgroup>
 					<tr>
-						<th>상품가격<em class="required" title="필수"></em></th>
-						<td><input type="text" class="w100p" id="goodsPrice" name="goodsPrice"  maxlength="10" /></td>
-					</tr>
-					<tr>
-						<th>예약일시<em class="required" title="필수"></em></th>
+						<th>상품예약가격<em class="required" title="필수"></em></th>
+						<td><input type="text" class="w100p aR" id="resGoodsPrice" name="resGoodsPrice" maxlength="10" data-valid-type="numeric" /></td>
+						<th>예약일자<em class="required" title="필수"></em></th>
 						<td>
 							<input name="applyStYMD" id="applyStYMD" type="text" class="w80 schDate" maxlength="10" required="required" data-valid-name="예약시작일" />
-							<select name="applyStHH" id="applyStHH" required="required" data-valid-name="예약 시작시간">
-								<th:block th:each="num, index  : ${#numbers.sequence(0,23)}">
-								<option  th:value="${#numbers.formatInteger(num,2)}" th:text="|${#numbers.formatInteger(num,2)}시|" >시간</option>
-								</th:block>
-							</select>
 							<input name="applyStdt" id="applyStdt" type="hidden" />
 							~
 							<input name="applyEdYMD" id="applyEdYMD" type="text" class="w80 schDate" maxlength="10" required="required" data-valid-name="예약 종료일" />
-							<select name="applyEdHH" id="applyEdHH" required="required" data-valid-name="예약 종료시간">
-								<th:block th:each="num: ${#numbers.sequence(0,23)}">
-								<option  th:value="${#numbers.formatInteger(num,2)}"  th:text="|${#numbers.formatInteger(num,2)}시|" th:selected="${#numbers.formatInteger(num,2)}==23 ? 'true'">시간</option>
-								</th:block>
-							</select>
 							<input name="applyEddt" id="applyEddt" type="hidden" />
 						</td>
 					</tr>
@@ -55,17 +45,17 @@
 			</div>
 			<ul class="panelBar">
 				<li class="left">
-					<button type="button" class="btn btn-danger btn-lg" id="btnDeleteGoodsRsvtTnm">상품삭제</button>
+					<button type="button" class="btn btn-danger btn-lg" id="btnDeleteGoodsPriceRsvt">상품삭제</button>
 				</li>
 				<li class="right">
 					<button type="button" class="btn btn-base btn-lg" id="btnSearchExcel">엑셀조회</button>
 					<button type="button" class="btn btn-info btn-lg" id="btnSearchGoods">상품조회</button>
 				</li>
 			</ul>
-			<div id="gridGoodsRsvtTnmList" style="width: 100%; height: 400px;" class="ag-theme-balham"></div>
+			<div id="gridGoodsPriceRsvtList" style="width: 100%; height: 400px;" class="ag-theme-balham"></div>
 			<ul class="panelBar">
 				<li class="right">
-					<button type="button" class="btnRight btn btn-base btn-lg" id="btnSaveGoodsRsvtTnm">적용</button>
+					<button type="button" class="btnRight btn btn-base btn-lg" id="btnSaveGoodsPriceRsvt">적용</button>
 				</li>
 			</ul>
 			</form>	
@@ -74,22 +64,28 @@
 <script th:inline="javascript">
 /*<![CDATA[*/
 	
-	var rsvtGoodsTnmColumnDefs = [
+	var rsvtGoodsPriceColumnDefs = [
 		{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
 		{headerName: 'No', width: 50, cellClass: 'text-center',valueGetter: function(params) { return params.node.rowIndex+1}},
 		{headerName: "상품코드", field: "goodsCd", width: 140, cellClass: 'text-center'},
 		{headerName: "상품명", field: "goodsNm", width: 330, cellClass: 'text-left'},
-		{headerName: "현재상품타이틀", field: "goodsTnm", width: 250, cellClass: 'text-left'}
+		{headerName: "정상가", field: "listPrice" , width: 120, cellClass: 'text-right'
+			,valueFormatter: function(params) {return params.value.addComma();}
+		},
+		{headerName: "현재판매가", field: "currPrice", width: 120, cellClass: 'text-right'
+			,valueFormatter: function(params) {return params.value.addComma();},
+		}
+		
 	];
 	
 	// Get GridOptions
-	var rsvtGoodsTnmGridOptions = gagaAgGrid.getGridOptions(rsvtGoodsTnmColumnDefs);
-	rsvtGoodsTnmGridOptions.enableBrowserTooltips = true;
+	var rsvtGoodsPriceGridOptions = gagaAgGrid.getGridOptions(rsvtGoodsPriceColumnDefs);
+	rsvtGoodsPriceGridOptions.enableBrowserTooltips = true;
 	
 	// 중복 선택 가능
-	rsvtGoodsTnmGridOptions.rowSelection = 'multiple';
-	rsvtGoodsTnmGridOptions.suppressRowClickSelection = true;
-	//rsvtGoodsTnmGridOptions.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
+	rsvtGoodsPriceGridOptions.rowSelection = 'multiple';
+	rsvtGoodsPriceGridOptions.suppressRowClickSelection = true;
+	//rsvtGoodsPriceGridOptions.rowHeight = 60; //이미지가 있을경우 높이 지정해야함.
 
 	// 상품 조회 클릭 시
 	$('#btnSearchGoods').on('click', function() {
@@ -99,7 +95,7 @@
 	// 상품 조회 콜백함수
 	var fnSearchGoods = function(result) {
 		if (result.length < 1) return;
-		var oldData = gagaAgGrid.getAllRowData(rsvtGoodsTnmGridOptions);
+		var oldData = gagaAgGrid.getAllRowData(rsvtGoodsPriceGridOptions);
 		$.each(result, function(idx, item) {
 			var isInvalid = false;
 			if (oldData != null && oldData.length != 0){
@@ -113,16 +109,16 @@
 					return isInvalid;
 				}
 			}
-			gagaAgGrid.addRowData(rsvtGoodsTnmGridOptions, {"goodsCd" : item.goodsCd, "goodsNm" : item.goodsNm, "goodsTnm" : item.goodsTnm});
+			gagaAgGrid.addRowData(rsvtGoodsPriceGridOptions, {"goodsCd" : item.goodsCd, "goodsNm" : item.goodsNm, "listPrice" : item.listPrice, "currPrice" : item.currPrice});
 		});
 		uifnPopupClose('popupGoods');
 		return false;
 	};
 
 	// 저장 클릭 시
-	$('#btnSaveGoodsRsvtTnm').on('click', function() {
+	$('#btnSaveGoodsPriceRsvt').on('click', function() {
 
-		var allRowData = gagaAgGrid.getAllRowData(rsvtGoodsTnmGridOptions);
+		var allRowData = gagaAgGrid.getAllRowData(rsvtGoodsPriceGridOptions);
 
 		if(allRowData.length == 0){
 			mcxDialog.alertC("상품을 조회한 후 추가해주세요.", {
@@ -133,11 +129,11 @@
 			return;
 		}
 
-		if(gagajf.isNull($("#goodsPriceRsvtForm input[name=goodsTnm]").val())) {
-			mcxDialog.alertC("상품 타이틀을 입력하세요.",{
+		if(gagajf.isNull($("#goodsPriceRsvtForm input[name=resGoodsPrice]").val())) {
+			mcxDialog.alertC("상품 예약가격을 입력하세요.",{
 				sureBtnText: "확인",
 				sureBtnClick: function() {
-					$("#goodsPriceRsvtForm input[name=goodsTnm]").focus();
+					$("#goodsPriceRsvtForm input[name=resGoodsPrice]").focus();
 				}
 			});
 			return false;
@@ -147,7 +143,7 @@
 		var toDate = $('#goodsPriceRsvtForm input[name=applyEdYMD]').val();
 
 		if (gagajf.isNull(fromDate)) {
-			mcxDialog.alertC("예약  시작일자를 입력하세요.", {
+			mcxDialog.alertC("예약 시작일자를 입력하세요.", {
 				sureBtnText: "확인",
 				sureBtnClick: function() {
 					$('#goodsPriceRsvtForm input[name=applyStYMD]').focus();
@@ -175,15 +171,27 @@
 			});
 			return false;
 		}
+		
+		var optCheck = false;
+		$.each(allRowData, function(index, item) {
+			if (item.listPrice < $("#goodsPriceRsvtForm input[name=resGoodsPrice]").val()){
+				optCheck = true;
+				mcxDialog.alertC("가격예약 상품중 정상가보다 높은 상품이 존재합니다.<br/>확인해 주세요", {
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						rsvtGoodsPriceGridOptions.api.setFocusedCell(index, "goodsCd", null);
+					}
+				});	
+				return false;
+			}
+		});
 
-		var applyStdt = $('#goodsPriceRsvtForm input[name=applyStYMD]').val().replaceAll("-","") +
-		$('#goodsPriceRsvtForm select[name=applyStHH]').val() + "0000";
-
-		var applyEddt = $('#goodsPriceRsvtForm input[name=applyEdYMD]').val().replaceAll("-","") +
-		$('#goodsPriceRsvtForm select[name=applyEdHH]').val() +"5959";
+		if (optCheck) return false;
+		
+		var applyStdt = $('#goodsPriceRsvtForm input[name=applyStYMD]').val().replaceAll("-","") ;
+		var applyEddt = $('#goodsPriceRsvtForm input[name=applyEdYMD]').val().replaceAll("-","");
 
-		$('#goodsPriceRsvtForm input[name=applyStdt]').val(applyStdt);
-		$('#goodsPriceRsvtForm input[name=applyEddt]').val(applyEddt);
+		
 
 		if ($('#goodsPriceRsvtForm input[name=applyStdt]').val() > $('#goodsPriceRsvtForm input[name=applyEddt]').val()) {
 			mcxDialog.alertC("예약 시작일자는 종료일자 보다 클 수 없습니다.", {
@@ -195,10 +203,10 @@
 			return false;
 		}
 
-		var toDateStr = new Date().format("YYYYMMDDHHmmss");
+		var toDateStr = new Date().format("YYYYMMDD");
 
 		if (toDateStr >= applyStdt){
-			mcxDialog.alertC("예약 시작일시는 현재일시 보다 작거나 같을 수 없습니다.",  {
+			mcxDialog.alertC("예약 시작일자는 현재일자 보다 작거나 같을 수 없습니다.",  {
 				sureBtnText: "확인",
 				sureBtnClick: function() {
 					$('#goodsPriceRsvtForm input[name=applyStYMD]').focus();
@@ -208,7 +216,7 @@
 		}
 
 		if (toDateStr >= applyEddt){
-			mcxDialog.alertC("예약 종료일시는 현재일시 보다 작거나 같을 수 없습니다.", {
+			mcxDialog.alertC("예약 종료일자는 현재일자 보다 작거나 같을 수 없습니다.", {
 				sureBtnText: "확인",
 				sureBtnClick: function() {
 					$('#goodsPriceRsvtForm input[name=applyEdYMD]').focus();
@@ -222,55 +230,61 @@
 			sureBtnText: "확인",
 			sureBtnClick: function(){
 				var arrGoodsCd = [];
+				var arrEndGoodsPrice = [];
 				allRowData.forEach(function(item, index) {
 					arrGoodsCd.push(item.goodsCd);
+					arrEndGoodsPrice.push(item.currPrice);
 				});
+				
+				$('#goodsPriceRsvtForm input[name=applyStdt]').val(applyStdt +"000000");
+				$('#goodsPriceRsvtForm input[name=applyEddt]').val(applyEddt +"235959");
 
-				var data = {goodsTnm : $('#goodsPriceRsvtForm input[name=goodsTnm]').val()
+				var data = {resGoodsPrice : $('#goodsPriceRsvtForm input[name=resGoodsPrice]').val()
 							, applyStdt : $('#goodsPriceRsvtForm input[name=applyStdt]').val()
 							, applyEddt : $('#goodsPriceRsvtForm input[name=applyEddt]').val()
 							, arrGoodsCd : arrGoodsCd
+							, arrEndGoodsPrice : arrEndGoodsPrice
 				};
 
 				var jsonData = JSON.stringify(data);
-				gagajf.ajaxJsonSubmit('/goods/title/reserve/save', jsonData, fnGoodsRsvtTnmListFormClose);
+				gagajf.ajaxJsonSubmit('/goods/price/reserve/save', jsonData, fnGoodsPriceRsvtListFormClose);
 
 			}
 		});
 	});
 
 	// 조회상품 삭제
-	$('#btnDeleteGoodsRsvtTnm').on('click', function() {
-		var selectedData = rsvtGoodsTnmGridOptions.api.getSelectedRows();
+	$('#btnDeleteGoodsPriceRsvt').on('click', function() {
+		var selectedData = rsvtGoodsPriceGridOptions.api.getSelectedRows();
 		if (selectedData.length == 0) {
 			mcxDialog.alert('선택된 행이 없습니다.');
 			return;
 		}
 
 		//화면에서 삭제
-		var removedData = gagaAgGrid.removeRowData(rsvtGoodsTnmGridOptions, false);
+		var removedData = gagaAgGrid.removeRowData(rsvtGoodsPriceGridOptions, false);
 	});
 	
 	//엑셀 상품 조회
 	$('#btnSearchExcel').on('click', function() {
-		cfnExcelUploadPopup('goodsRsvtTnmExcelUpload', 'goodsRsvtTnmExcelUpload');
+		cfnExcelUploadPopup('goodsPriceRsvtExcelUpload', 'goodsPriceRsvtExcelUpload');
 	});
 
-	var goodsRsvtTnmExcelUpload = function(result){
+	var goodsPriceRsvtExcelUpload = function(result){
 		var data = {procJob : result.procJob
 			,excelFileNm : result.excelFileNm
 		};
 		var jsonData = JSON.stringify(data);
-		gagajf.ajaxJsonSubmit('/goods/search/excelupload/save', jsonData, fnRsvtGoodsTnmExcelUploadCallBack);
+		gagajf.ajaxJsonSubmit('/goods/search/excelupload/save', jsonData, fnRsvtGoodsPriceExcelUploadCallBack);
 	}
 
-	var fnRsvtGoodsTnmExcelUploadCallBack = function(result){
+	var fnRsvtGoodsPriceExcelUploadCallBack = function(result){
 		gagajf.ajaxJsonSubmit('/goods/excel/upload/goods/list', '', fnExcelSearchCallBack);
 	}
 
 	var fnExcelSearchCallBack = function(result){
 		if (result.goodsExcelList.length < 1) return;
-		var oldData = gagaAgGrid.getAllRowData(rsvtGoodsTnmGridOptions);
+		var oldData = gagaAgGrid.getAllRowData(rsvtGoodsPriceGridOptions);
 		$.each(result.goodsExcelList, function(idx, item) {
 			var isInvalid = false;
 			if (oldData != null && oldData.length != 0){
@@ -284,20 +298,20 @@
 					return isInvalid;
 				}
 			}
-			gagaAgGrid.addRowData(rsvtGoodsTnmGridOptions, {"goodsCd" : item.goodsCd, "goodsNm" : item.goodsNm, "goodsTnm" : item.goodsTnm});
+			gagaAgGrid.addRowData(rsvtGoodsPriceGridOptions, {"goodsCd" : item.goodsCd, "goodsNm" : item.goodsNm, "listPrice" : item.listPrice, "currPrice" : item.currPrice});
 		});
 		return;
 	}
 
 	//창종료
-	var fnGoodsRsvtTnmListFormClose = function(){
+	var fnGoodsPriceRsvtListFormClose = function(){
 		uifnPopupClose('popupGoodsTitleReserve');
 		fnGoodsTnmResDeleteCollBack();
 	}
 
 	$(document).ready(function() {
 		// Create a agGrid
-		gagaAgGrid.createGrid('gridGoodsRsvtTnmList', rsvtGoodsTnmGridOptions);
+		gagaAgGrid.createGrid('gridGoodsPriceRsvtList', rsvtGoodsPriceGridOptions);
 	});
 
 /*]]>*/

+ 1 - 1
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsReserveSellForm.html

@@ -323,7 +323,7 @@
 	
 	//예약등록
 	$('#btnGoodsResSellSave').click(function(e) {
-		var actionUrl = "/goods/reserve/sell/regist/form";
+		var actionUrl = "/goods/reserve/sell/popup/form";
 		cfnOpenModalPopup(actionUrl, 'popupGoodsRsvtList');
 	});