Просмотр исходного кода

입점가격관리 - 승인 처리

eskim 5 лет назад
Родитель
Сommit
27bfe4c806

+ 37 - 0
style24.admin/src/main/java/com/style24/admin/biz/dao/TsaGoodsDao.java

@@ -804,4 +804,41 @@ public interface TsaGoodsDao {
 	 */
 	int getGoodsOptionCount(Option option);
 
+	/**
+	 * 상품 가격 승인 목록
+	 *
+	 * @param goodsPriceHst
+	 * @return
+	 * @author eskim
+	 * @since 2020. 11. 26
+	 */
+	Collection<GoodsPriceRes> getGoodsSupplyPriceList(GoodsPriceRes goodsPriceRes);
+
+	/**
+	 * 상품 가격수정
+	 *
+	 * @param goods
+	 * @author eskim
+	 * @since 2020. 11. 26
+	 */
+	void updateGoodsPrice(Goods goods);
+
+	/**
+	 * 상품 판매수수료율 수정
+	 *
+	 * @param goods
+	 * @author eskim
+	 * @since 2020. 11. 26
+	 */
+	void updateSellFeeRate(Goods goods);
+
+	/**
+	 * 상품 가격승인 적용일자 변경
+	 *
+	 * @param goodsPriceRes
+	 * @author eskim
+	 * @since 2020. 11. 26
+	 */
+	void updateGoodsSupplyPricecfrmDt(GoodsPriceRes goodsPriceRes);
+
 }

+ 55 - 0
style24.admin/src/main/java/com/style24/admin/biz/service/TsaGoodsService.java

@@ -2146,4 +2146,59 @@ public class TsaGoodsService {
 		return goodsDao.getGoodsOptionCount(option);
 	}
 
+	/**
+	 * 상품 가격승인관리 목록 조회
+	 *
+	 * @param goodsPriceHst
+	 * @return
+	 * @author eskim
+	 * @since 2020. 11. 26
+	 */
+	public Collection<GoodsPriceRes> getGoodsSupplyPriceList(GoodsPriceRes goodsPriceHst) {
+
+		return goodsDao.getGoodsSupplyPriceList(goodsPriceHst);
+	}
+
+	/**
+	 * 상품 가격승인관리 승인 처리
+	 *
+	 * @param goodsPriceHstList - 상품 가격 승인 목록
+	 * @author eskim
+	 * @since 2020. 11. 26
+	 */
+	@Transactional("shopTxnManager")
+	public void saveGoodsSupplyPrice(Collection<GoodsPriceRes> goodsPriceHstList) {
+
+		for (GoodsPriceRes goodsPriceRes : goodsPriceHstList) {
+			goodsPriceRes.setRegNo(TsaSession.getInfo().getUserNo());
+			goodsPriceRes.setUpdNo(TsaSession.getInfo().getUserNo());
+
+
+			Goods goods = new Goods();
+			goods.setRegNo(TsaSession.getInfo().getUserNo());
+			goods.setUpdNo(TsaSession.getInfo().getUserNo());
+			goods.setGoodsCd(goodsPriceRes.getGoodsCd());
+
+			goodsDao.createGoodsHst(goods);
+
+			// 판매가 변경
+			if (goodsPriceRes.getResGoodsPrice() > 0) {
+				log.info("goodsPriceRes.getTagPrice() ={}", goodsPriceRes.getListPrice());
+				log.info("goodsPriceRes.getResGoodsPrice() ={}", goodsPriceRes.getResGoodsPrice());
+				goods.setDcRate((int)(this.getDcRate(goodsPriceRes.getListPrice(), goodsPriceRes.getResGoodsPrice())));
+				goods.setCurrBprice(goodsPriceRes.getCurrPrice());
+				goods.setCurrPrice(goodsPriceRes.getResGoodsPrice());
+				goodsDao.updateGoodsPrice(goods);
+			}
+
+			// 판매수수료율 변경
+			if (goodsPriceRes.getSellFeeRate() != null) {
+				goods.setSellFeeRate(goodsPriceRes.getSellFeeRate());
+				goodsDao.updateSellFeeRate(goods);
+			}
+
+			goodsDao.updateGoodsSupplyPricecfrmDt(goodsPriceRes);
+		}
+	}
+
 }

+ 38 - 3
style24.admin/src/main/java/com/style24/admin/biz/web/TsaGoodsController.java

@@ -1181,7 +1181,8 @@ public class TsaGoodsController extends TsaBaseController {
 			supplyCompCd = TsaSession.getInfo().getSupplyCompCd();
 		}
 		mav.addObject("supplyCompList", rendererService.getSupplyCompanyList(supplyCompCd, "N"));
-
+		// 사용여부
+		mav.addObject("useYnList", rendererService.getAvailCommonCodeList("G002"));
 		// 상품상태
 		String[] exceptCds = {"G008_00"};
 		mav.addObject("goodsStatList", rendererService.getCommonCodeList("G008", "Y", exceptCds));
@@ -1192,6 +1193,41 @@ public class TsaGoodsController extends TsaBaseController {
 		return mav;
 	}
 
+	/**
+	 * 상품 가격승인관리 목록 조회
+	 *
+	 * @return
+	 * @author eskim
+	 * @since 2020. 11. 26
+	 */
+	@PostMapping("/supply/price/list")
+	@ResponseBody
+	public Collection<GoodsPriceRes> getGoodsSupplyPriceList(@RequestBody GoodsPriceRes goodsPriceRes) {
+
+		return goodsService.getGoodsSupplyPriceList(goodsPriceRes);
+	}
+
+	/**
+	 * 상품 가격승인관리 승인 처리
+	 *
+	 * @param itemkindList
+	 * @return
+	 * @author eskim
+	 * @since 2020. 11. 26
+	 */
+	@PostMapping("/supply/price/save")
+	@ResponseBody
+	public GagaResponse saveGoodsSupplyPrice(@RequestBody Collection<GoodsPriceRes> goodsPriceResList) {
+
+		if (!"G001_0000".equals(TsaSession.getInfo().getRoleCd()) && !"G001_A000".equals(TsaSession.getInfo().getRoleCd())
+			&& !"G001_A001".equals(TsaSession.getInfo().getRoleCd()) && !"G001_A100".equals(TsaSession.getInfo().getRoleCd())
+			&& !"G001_A101".equals(TsaSession.getInfo().getRoleCd())) {
+			throw new IllegalStateException("권한이 없습니다.");
+		}
+		goodsService.saveGoodsSupplyPrice(goodsPriceResList);
+		return super.ok(message.getMessage("SUCC_0001"));
+	}
+
 	/**
 	 * 상품 타이틀예약관리 화면
 	 *
@@ -1950,11 +1986,10 @@ public class TsaGoodsController extends TsaBaseController {
 	@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"};
 

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

@@ -30,10 +30,18 @@ public class GoodsPriceRes extends TscBaseDomain {
 
 	private String goodsNm;
 	private String supplyGoodsCd;
-	private String brandEnm;
 	private String goodsStat;
+	private String supplyCompCd;
+	private String supplyCompNm;
+	private String brandCd;
+	private String brandEnm;
+	private int listPrice;
 	private int currPrice;
-
+	private String dateGbn;
+	private String stDate;
+	private String edDate;
+	private String confirmY;
+	private Float goodsSellFeeRate;
 
 	@JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
 	private String[] arrGoodsCd;

+ 137 - 1
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -2023,7 +2023,7 @@
 		    ]]>
 		    </if>
 		    <if test='beforSkipFlag != null and beforSkipFlag == "Y"'>
-		   AND GR.DELV_RES_DT >= NOW() 
+		AND GR.DELV_RES_DT >= NOW() 
 		    </if>
 		</if>
 		<if test="searchGb != null and searchGb =='EXCEL'">
@@ -2866,5 +2866,141 @@
 		AND OPT_CD = #{optCd}
 		</if>
 	</select>
+	
+	<!-- 상품 가격 승인 목록 -->
+	<select id="getGoodsSupplyPriceList"  parameterType="GoodsPriceRes" resultType="GoodsPriceRes">
+		/* TsaGoods.getGoodsSupplyPriceList */
+		SELECT X.GOODS_PRICE_RES_SQ
+		     , X.GOODS_CD
+		     , X.RES_GOODS_PRICE
+		     , X.END_GOODS_PRICE
+		     , X.SELL_FEE_RATE
+		     , X.CFRM_YN
+		     , X.CFRM_NM
+		     , X.CFRM_NO
+		     , X.CFRM_DT
+		     , X.APPLY_YN
+		     , X.REG_NM
+		     , X.REG_DT
+		     , X.UPD_NM
+		     , X.UPD_DT
+		     , X.LIST_PRICE
+		     , X.CURR_PRICE
+		     , X.GOODS_STAT
+		     , X.GOODS_SELL_FEE_RATE
+		     , X.SUPPLY_COMP_CD
+		     , X.SUPPLY_COMP_NM
+		     , X.BRAND_CD
+		     , X.BRAND_ENM
+		FROM (
+		    SELECT A.GOODS_PRICE_RES_SQ
+		         , A.GOODS_CD
+		         , A.RES_GOODS_PRICE
+		         , A.END_GOODS_PRICE
+		         , A.SELL_FEE_RATE
+		         , A.CFRM_YN
+		         , FN_GET_USER_NM(A.CFRM_NO) AS CFRM_NM
+		         , A.CFRM_NO
+		         , DATE_FORMAT(A.CFRM_DT,'%Y%m%d%H%i%S') AS CFRM_DT
+		         , A.APPLY_YN
+		         , FN_GET_USER_NM(A.REG_NO) AS REG_NM
+		         , DATE_FORMAT(A.REG_DT,'%Y%m%d%H%i%S') AS REG_DT
+		         , FN_GET_USER_NM(A.UPD_NO) AS UPD_NM
+		         , DATE_FORMAT(A.UPD_DT,'%Y%m%d%H%i%S') AS UPD_DT
+		         , G.LIST_PRICE
+		         , G.CURR_PRICE
+		         , G.SELL_FEE_RATE AS GOODS_SELL_FEE_RATE
+		         , ROW_NUMBER() OVER(PARTITION BY A.GOODS_CD ORDER BY A.REG_DT DESC) AS RNUM
+		         , G.GOODS_STAT
+		         , G.BRAND_CD
+		         , B.BRAND_ENM
+		         , G.SUPPLY_COMP_CD
+		         , S.SUPPLY_COMP_NM
+		    FROM TB_GOODS_PRICE_RES A
+		    INNER JOIN TB_GOODS G ON A.GOODS_CD = G.GOODS_CD
+		                          AND G.SELF_GOODS_YN = 'N'
+		    INNER JOIN TB_BRAND B ON G.BRAND_CD = B.BRAND_CD
+		    INNER JOIN TB_SUPPLY_COMPANY S ON G.SUPPLY_COMP_CD = S.SUPPLY_COMP_CD
+		    WHERE 1 = 1
+		    <if test="goodsCd != null and goodsCd != ''">
+		    AND UPPER(G.GOODS_CD) = LIKE UPPER('%' || #{goodsCd} || '%')
+		    </if>
+		    <if test="supplyCompCd != null and supplyCompCd != ''">
+		    AND G.SUPPLY_COMP_CD = #{supplyCompCd}
+		    </if>
+		    <if test="brandCd != null and brandCd != ''">
+		    AND G.BRAND_CD = #{brandCd}
+		    </if>
+		    <if test="cfrmYn != null and cfrmYn != ''">
+		    AND A.CFRM_YN = #{cfrmYn}
+		    </if>
+		    <if test='confirmY != null and confirmY == "N"'>
+		        <if test='dateGbn != null and dateGbn == "R"'>
+		            <if test="stDate != null and stDate != ''">
+		    AND A.REG_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
+		            </if>
+		            <if test="edDate != null and edDate != ''">
+		            <![CDATA[
+		    AND A.REG_DT < DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S')
+		            ]]>
+		            </if>
+		        </if>
+		        <if test='dateGbn != null and dateGbn == "P"'>
+		            <if test="stDate != null and stDate != ''">
+		    AND A.CFRM_DT >= DATE_FORMAT(#{stDate}, '%Y-%m-%d %H:%i:%S')
+		            </if>
+		            <if test="edDate != null and edDate != ''">
+		            <![CDATA[
+		    AND A.CFRM_DT < DATE_FORMAT(DATE_ADD(#{edDate}, INTERVAL 1 DAY), '%Y-%m-%d %H:%i:%S') 
+		            ]]>
+		            </if>
+		        </if>
+		    </if>
+		) X
+		WHERE 1 = 1
+		<if test='confirmY != null and confirmY == "Y"'>
+		AND RNUM = 1
+		AND CFRM_DT IS NULL
+		</if>
+		ORDER BY X.REG_DT DESC, X.GOODS_CD
+	</select>
+	
+	<!-- 상품 가격수정 -->
+	<update id="updateGoodsPrice" parameterType="Goods">
+		/* TsaGoods.updateGoodsPrice */
+		UPDATE TB_GOODS
+		SET CURR_PRICE = #{currPrice}
+		  , CURR_BPRICE = #{currBprice}
+		  , PRICE_UPD_DT = NOW()
+		  , DC_RATE = #{dcRate}
+		  , UPD_NO = #{updNo}
+		  , UPD_DT = NOW()
+		WHERE GOODS_CD = #{goodsCd}
+	</update>
+	
+	<!-- 상품 판매수수료율수정 -->
+	<update id="updateSellFeeRate" parameterType="Goods">
+		/* TsaGoods.updateSellFeeRate */
+		UPDATE TB_GOODS
+		SET SELL_FEE_RATE = #{sellFeeRate}
+		  , UPD_NO = #{updNo}
+		  , UPD_DT = NOW()
+		WHERE GOODS_CD = #{goodsCd}
+	</update>
+	
+	<!-- 상품 가격승인 적용일자 변경 -->
+	<update id="updateGoodsSupplyPricecfrmDt" parameterType="GoodsPriceRes">
+		/* TsaGoods.updateGoodsSupplyPricecfrmDt */
+		UPDATE TB_GOODS_PRICE_RES
+		SET UPD_NO = #{updNo}
+		  , UPD_DT = NOW()
+		  , CFRM_DT = NOW()
+		  , CFRM_NO = #{regNo}
+		  , CFRM_YN = 'Y'
+		  , APPLY_YN = 'Y'
+		WHERE GOODS_CD = #{goodsCd}
+		AND GOODS_PRICE_RES_SQ = #{goodsPriceResSq}
+		AND CFRM_DT IS NULL
+	</update>
 	
 </mapper>

+ 67 - 34
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsSupplyPriceForm.html

@@ -22,18 +22,20 @@
 		<!-- 메뉴 설명 -->
 		<div class="infoBox menu-desc">
 		</div>
-		<form id="goodsPriceHstForm" name="goodsPriceHstForm" action="#" th:action="@{'/goods/price/hst/list'}">
+		<form id="goodsPriceHstForm" name="goodsPriceHstForm" action="#" th:action="@{'/goods/supply/price/list'}">
 		<input type="hidden" id="confirmY" name="confirmY">
  		<!-- 패널 영역1 -->
 		<div class="panelStyle" >
 			<div class="panelTitle">
-				<h3><i class="fa fa-info-circle"></i>아래 검색조건 중 하나를 꼭 입력해 주세요.</h3>
+				<h3><i class="fa fa-info-circle"></i>아래 검색조건 중 <font color="red">업체, 상품코드, 발생일</font> 중 하나를 꼭 입력해 주세요.</h3>
 			</div>
 			<div class="panelContent">
 				<table class="frmStyle">
 					<colgroup>
 						<col width="10%"/>
-						<col width="40%"/>
+						<col width="23%"/>
+						<col width="10%"/>
+						<col width="23%"/>
 						<col width="10%"/>
 						<col/>
 					</colgroup>
@@ -41,7 +43,7 @@
 						<th>업체/브랜드</th>
 						<td>
 							<select name="supplyCompCd" id="supplyCompCd">
-								<option value="" th:if="${sessionInfo.roleCd} != 'A101'">[전체]</option>
+								<option value="" >[전체]</option>
 								<option th:if="${supplyCompList}" th:each="oneData, status : ${supplyCompList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
 							<select name="brandCd" id="brandCd">
@@ -52,17 +54,24 @@
 						<td>
 							<input type="text" class="w150" name="goodsCd" id="goodsCd" maxlength="50"/>
 						</td>
+						<th>승인여부</th>
+						<td>
+							<select  name="cfrmYn" id="cfrmYn">
+								<option value="">[전체]</option>
+								<option th:if="${useYnList}" th:each="oneData, status : ${useYnList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
 					</tr>
 					<tr>
 						<th>발생일</th>
-						<td colspan="3" id="sellTerms"></td>
+						<td colspan="5" id="sellTerms"></td>
 					</tr>
 				</table>
 				<ul class="panelBar">
 					<li class="center">
 						<button type="button" class="btn btn-gray btn-lg" id="btnInit" >초기화</button>
 						<button type="button" class="btn btn-info btn-lg" id="btnSearch" >조회</button>&nbsp;&nbsp;&nbsp;&nbsp;
-						<button type="button" class="btn btn-base btn-lg" id="btnConfirmSearch" 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-base btn-lg" id="btnConfirmSearch" 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> -->
 					</li>
 				</ul>
 			</div>
@@ -94,11 +103,8 @@
 	columnDefs = [
 		{width: 40, minWidth: 40, cellClass: 'text-right', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
 		{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
-		{headerName: "등록일", field: "regYmd", width: 90, cellClass: 'text-center',
-			cellRenderer: function(params) {
-				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDD").format("YYYY-MM-DD") : '';
-			}
-		},
+		{headerName: "업체", field: "supplyCompNm" , width: 100, cellClass: 'text-center'},
+		{headerName: "브랜드", field: "brandEnm" , width: 100, cellClass: 'text-center'},
 		{headerName: "상품코드", field: "goodsCd", width: 130, cellClass: 'text-center'
 			,cellRenderer: function(params) {
 				return '<a href="javascript:void(0);">' + params.value + '</a>';
@@ -109,36 +115,45 @@
 			valueFormatter: function (params) { return gagaAgGrid.lookupValue(goodsStatList, params.value); },
 			valueParser: function (params) { return gagaAgGrid.lookupKey(goodsStatList, params.newValue); }
 		},
-		{headerName: "온라인 판매가", field: "onPrice", width: 120, cellClass: 'text-right'
+		{headerName: "온라인 현재판매가", field: "currPrice", width: 120, cellClass: 'text-right'
 			,valueFormatter: function(params) {return params.value.addComma();}
 		},
-		{headerName: "판매가조정대상금액", field: "gapPrice", width: 140, cellClass: 'text-right'
+		{headerName: "판매가조정대상금액", field: "resGoodsPrice", width: 140, cellClass: 'text-right'
 			,cellRenderer: function(params) {
-				var gapPrice = Number(params.data.onPrice) - Number(params.data.erpPrice);
-				
-				if (gapPrice >= 0){
-					return '<font color="red"> '+ gapPrice.addComma() +'</font>';
+				if (params.data.resGoodsPrice <= 0){
+					return "-";
 				}else{
-					return '<font color="blue"> '+ gapPrice.addComma() +'</font>';
+					var gapPrice = Number(params.data.currPrice) - Number(params.data.resGoodsPrice);
+					
+					if (gapPrice >= 0){
+						return '<font color="red"> '+ params.value.addComma() +'</font>';
+					}else{
+						return '<font color="blue"> '+ params.value.addComma() +'</font>';
+					}
+
 				}
 			}
 		},
-		{headerName: "온라인 판매수수료", field: "onTagPrice", width: 140, cellClass: 'text-right'
+		{headerName: "온라인 판매수수료", field: "goodsSellFeeRate", width: 140, cellClass: 'text-right'
 			,valueFormatter: function(params) {return params.value.addComma();}
 		},
-		{headerName: "판매수수료 조정대상수수료", field: "gapTagPrice", width: 180, cellClass: 'text-right'
+		{headerName: "판매수수료 조정대상수수료", field: "sellFeeRate", width: 180, cellClass: 'text-right'
 			,cellRenderer: function(params) {
-				var gapTagPrice = Number(params.data.onTagPrice) - Number(params.data.erpTagPrice);
-				
-				if (gapTagPrice >= 0){
-					return '<font color="red"> '+ gapTagPrice.addComma() +'</font>';
+				if (gagajf.isNull(params.data.sellFeeRate)){
+					return "-";
 				}else{
-					return '<font color="blue"> '+ gapTagPrice.addComma() +'</font>';
-				}
+					var gapRate = Number(params.data.goodsSellFeeRate) - Number(params.data.sellFeeRate);
+					
+					if (gapRate >= 0){
+						return '<font color="red"> '+ params.data.sellFeeRate +'</font>';
+					}else{
+						return '<font color="blue"> '+ params.data.sellFeeRate +'</font>';
+					}
+				}	
 			}
 		},
-		{headerName: "승인자", field: "applyId", width: 130, cellClass: 'text-center'},
-		{headerName: "승인일자", field: "applyDt" , width: 150, cellClass: 'text-center',
+		{headerName: "승인자", field: "cfrmNm", width: 130, cellClass: 'text-center'},
+		{headerName: "승인일자", field: "cfrmDt" , width: 150, cellClass: 'text-center',
 			cellRenderer: function(params) {
 				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
 			}
@@ -148,7 +163,7 @@
 				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
 			}
 		},
-		{headerName: "등록자", field: "regId" , width: 100, cellClass: 'text-center'}
+		{headerName: "등록자", field: "regNm" , width: 100, cellClass: 'text-center'}
 		
 	];
 	
@@ -239,7 +254,7 @@
 			for (i = 0; i < form.elements.length; i++ ) {
 				var el = form.elements[i];
 				
-				if ($(el).prop("type") == "text" || ($(el).prop("type") == "select-one" && el.name != "search" && el.name != "dateGbn")) {
+				if ($(el).prop("type") == "text" || ($(el).prop("type") == "select-one" && el.name != "search" && el.name != "dateGbn" && el.name != "cfrmYn")) {
 					if (!(el.value == null || el.value == "")) {
 						cnt++;
 					}
@@ -286,10 +301,10 @@
 	// 승인 클릭 시
 	$('#btnSaveGoodsPriceConfirm').on('click', function() {
 		
-		if ($("#goodsPriceHstForm input[name=confirmY]").val() != "Y"){
+		/* if ($("#goodsPriceHstForm input[name=confirmY]").val() != "Y"){
 			mcxDialog.alert("미승인목록 조회후 승인하세요.");
 			return false;
-		}
+		} */
 		
 		var selectedData = gagaAgGrid.selectedRowData(gridOptions);
 		
@@ -297,19 +312,37 @@
 			mcxDialog.alert('선택된 행이 없습니다.');
 			return;
 		}
+		var checkFlag = false;
+		$.each(selectedData, function(idx, item) {
 
+			if (!gagajf.isNull(item.cfrmDt)){
+				checkFlag = true;
+				mcxDialog.alertC(item.goodsCd +" 상품은 승인된 상품입니다. ",{
+					sureBtnText: "확인",
+					sureBtnClick: function() {
+						gridOptions.api.setFocusedCell(idx, "goodsCd", null);
+					}
+				});
+				return false;
+			}
+		});
+	
+		if (checkFlag){
+			return false;
+		}
+		
 		mcxDialog.confirm('승인 하시겠습니까?',{
 			cancelBtnText: "취소",
 			sureBtnText: "확인",
 			sureBtnClick: function(){
 				var jsonData = JSON.stringify(selectedData);
-				gagajf.ajaxJsonSubmit('/goods/price/hst/save', jsonData, fnSaveGoodsPriceConfirmCollBack); 
+				gagajf.ajaxJsonSubmit('/goods/supply/price/save', jsonData, fnSaveGoodsPriceConfirmCollBack); 
 			}
 		});
 	});	
 	
 	var fnSaveGoodsPriceConfirmCollBack = function(){
-		fnGoodsPriceHstListSearch('Y');
+		fnGoodsPriceHstListSearch('N');
 	}
 	
 	$(document).ready(function() {