eskim преди 5 години
родител
ревизия
0ef8e0b28d

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

@@ -759,11 +759,27 @@ public class TsaGoodsService {
 		goods.setGoodsTnm(GagaStringUtil.replace(GagaStringUtil.replace(goods.getGoodsTnm(), "&lt;", "<"), "&gt;", ">"));
 		goods.setGoodsSnm1(GagaStringUtil.replace(GagaStringUtil.replace(goods.getGoodsSnm1(), "&lt;", "<"), "&gt;", ">"));
 
-		// 가격변경일
-		if (goods.getCurrPrice() != goods.getCurrPriceOrg()) {
-			goods.setCurrBprice(goods.getCurrPriceOrg());
-		} else {
-			goods.setCurrPrice(goods.getCurrPriceOrg());
+		// 세트일 경우 상품 가격 확인
+		if ("G056_S".equals(goods.getGoodsType())) {
+
+			Collection<GoodsCompose> goodsExtendList = goods.getGoodsComposeListNew();
+			int currPriceSum = 0;
+			for (GoodsCompose regGoodsExtend : goodsExtendList) {
+				currPriceSum  = currPriceSum + regGoodsExtend.getCompsCurrPrice();
+			}
+
+			if (currPriceSum != goods.getCurrPriceOrg()) {
+				goods.setCurrBprice(goods.getCurrPriceOrg());
+				goods.setCurrPrice(currPriceSum);
+				goods.setDcRate((int)(this.getDcRate(goods.getListPrice() , currPriceSum)));
+			}
+		}else {
+			// 가격변경일
+			if (goods.getCurrPrice() != goods.getCurrPriceOrg()) {
+				goods.setCurrBprice(goods.getCurrPriceOrg());
+			} else {
+				goods.setCurrPrice(goods.getCurrPriceOrg());
+			}
 		}
 
 		// 승인일
@@ -1071,7 +1087,7 @@ public class TsaGoodsService {
 		regGoods.setBrandCd(goods.getBrandCd());
 		regGoods.setItemkindCd(goods.getItemkindCd());
 		regGoods.setGoodsNm(GagaStringUtil.replace(GagaStringUtil.replace(goods.getGoodsNm(), "&lt;", "<"), "&gt;", ">"));
-		regGoods.setStyleYear(goods.getStyleYear()); // createGoodsExtend 에서 코드 변경 작업
+		regGoods.setStyleYear(goods.getStyleYear());
 		regGoods.setSeasonCd(goods.getSeasonCd());
 		regGoods.setSexGb(goods.getSexGb());
 		regGoods.setColorCd(goods.getColorCd());
@@ -1081,37 +1097,37 @@ public class TsaGoodsService {
 		regGoods.setSelfMallYn(goods.getSelfMallYn());
 		regGoods.setGoodsStat("G008_20"); // 정보부족
 		regGoods.setFormalGb("G009_10"); // 정상 기본값 처리
-		regGoods.setGoodsGb("G03_11"); // 자사상품은 신규
-		regGoods.setDistributionGb("G03_12");
+		regGoods.setGoodsGb("G073_11"); // 자사상품은 신규
+		regGoods.setDistributionGb("G065_12"); // 유통구분
 		regGoods.setGoodsNum(goodsCd);
 
 		regGoods.setListPrice(goods.getCurrPrice());
 		regGoods.setCurrPrice(goods.getCurrPrice());
 		regGoods.setDcRate((int)(this.getDcRate(goods.getCurrPrice(), goods.getCurrPrice())));
 
-		Collection<GoodsCompose> goodsExtendList = null;
+		Collection<GoodsCompose> goodsComposeList = null;
 		try {
-			goodsExtendList = mapper.readValue(goods.getGoodsComposeList(), new TypeReference<Collection<GoodsCompose>>() {
+			goodsComposeList = mapper.readValue(goods.getGoodsComposeList(), new TypeReference<Collection<GoodsCompose>>() {
 			});
 		} catch (Exception e) {
 			e.printStackTrace();
 			throw new IllegalStateException(message.getMessage("딜상품 저장 중 오류로 인해 저장되지 않았습니다."));
 		}
 
-		for (GoodsCompose goodsExtend : goodsExtendList) {
-			goodsExtend.setGoodsCd(regGoods.getGoodsCd());
-			goodsExtend.setGoodsType(regGoods.getGoodsType());
-			goodsExtend.setRegNo(TsaSession.getInfo().getUserNo());
-			goodsExtend.setUpdNo(TsaSession.getInfo().getUserNo());
+		for (GoodsCompose goodsCompose : goodsComposeList) {
+			goodsCompose.setGoodsCd(regGoods.getGoodsCd());
+			goodsCompose.setGoodsType(regGoods.getGoodsType());
+			goodsCompose.setRegNo(TsaSession.getInfo().getUserNo());
+			goodsCompose.setUpdNo(TsaSession.getInfo().getUserNo());
 
 			Goods extendGoods = new Goods();
-			extendGoods.setGoodsCd(goodsExtend.getCompsGoodsCd());
+			extendGoods.setGoodsCd(goodsCompose.getCompsGoodsCd());
 			extendGoods = goodsDao.getGoods(extendGoods);
 			if (StringUtils.isEmpty(extendGoods.getBrandCd())) {
-				throw new IllegalStateException(message.getMessage("구성상품 중 " + goodsExtend.getCompsGoodsCd() + " 상품 정보를 확인해 주세요."));
+				throw new IllegalStateException(message.getMessage("구성상품 중 " + goodsCompose.getCompsGoodsCd() + " 상품 정보를 확인해 주세요."));
 			}
 
-			if ("Y".equals(goodsExtend.getBaseYn())) {
+			if ("Y".equals(goodsCompose.getBaseYn())) {
 				regGoods.setBrandCd(extendGoods.getBrandCd());
 				regGoods.setItemkindCd(extendGoods.getItemkindCd());
 				regGoods.setSupplyCompCd(extendGoods.getSupplyCompCd());
@@ -1119,10 +1135,88 @@ public class TsaGoodsService {
 			}
 		}
 
-		this.createGoodsExtend(regGoods, goodsExtendList); // 딜상품 관련 정보 저장
+		this.createGoodsExtend(regGoods, goodsComposeList); // 딜상품 관련 정보 저장
 	}
 
+	/**
+	 * 세트상품 저장
+	 *
+	 * @param goods
+	 * @return
+	 * @author eskim
+	 * @since 2020. 11. 04
+	 */
+	@Transactional("shopTxnManager")
+	public void saveGoodsSet(Goods goods) {
+
+		Goods regGoods = new Goods();
+
+		// <,> replace 처리
+		regGoods.setRegNo(TsaSession.getInfo().getUserNo());
+		regGoods.setUpdNo(TsaSession.getInfo().getUserNo());
 
+		String goodsCd = this.getGoodsCodeSeq("S", "S");
+		regGoods.setGoodsCd(goodsCd);
+		regGoods.setSupplyGoodsCd(goodsCd);
+		regGoods.setGoodsType("G056_S");
+		regGoods.setSupplyCompCd(goods.getSupplyCompCd());
+		regGoods.setBrandCd(goods.getBrandCd());
+		regGoods.setItemkindCd(goods.getItemkindCd());
+		regGoods.setGoodsNm(GagaStringUtil.replace(GagaStringUtil.replace(goods.getGoodsNm(), "&lt;", "<"), "&gt;", ">"));
+		regGoods.setStyleYear(goods.getStyleYear());
+		regGoods.setSeasonCd(goods.getSeasonCd());
+		regGoods.setSexGb(goods.getSexGb());
+		regGoods.setColorCd(goods.getColorCd());
+		regGoods.setMainColorYn("Y");
+		regGoods.setMakeNm(goods.getMakeNm());
+		regGoods.setMakeYmd(goods.getMakeYmd());
+		regGoods.setSelfMallYn(goods.getSelfMallYn());
+		regGoods.setGoodsStat("G008_20"); // 정보부족
+		regGoods.setFormalGb("G009_10"); // 정상 기본값 처리
+		regGoods.setGoodsGb("G073_11"); // 자사상품은 신규
+		regGoods.setDistributionGb("G065_12"); // 유통구분
+		regGoods.setGoodsNum(goodsCd);
+
+		Collection<GoodsCompose> goodsComposeList = null;
+		try {
+			goodsComposeList = mapper.readValue(goods.getGoodsComposeList(), new TypeReference<Collection<GoodsCompose>>() {
+			});
+		} catch (Exception e) {
+			throw new IllegalStateException(message.getMessage("세트상품 저장 중 오류로 인해 저장되지 않았습니다."));
+		}
+
+		int listPriceSum = 0;
+		int currPriceSum = 0;
+		for (GoodsCompose goodsCompose : goodsComposeList) {
+			goodsCompose.setGoodsCd(regGoods.getGoodsCd());
+			goodsCompose.setGoodsType(regGoods.getGoodsType());
+			goodsCompose.setRegNo(TsaSession.getInfo().getUserNo());
+			goodsCompose.setUpdNo(TsaSession.getInfo().getUserNo());
+
+			Goods extendGoods = new Goods();
+			extendGoods.setGoodsCd(goodsCompose.getCompsGoodsCd());
+			extendGoods = goodsDao.getGoods(extendGoods);
+			if (StringUtils.isEmpty(extendGoods.getBrandCd())) {
+				throw new IllegalStateException(message.getMessage("구성상품 중 " + goodsCompose.getCompsGoodsCd() + " 상품 정보를 확인해 주세요."));
+			}
+			listPriceSum += extendGoods.getListPrice();
+			currPriceSum += goodsCompose.getCompsCurrPrice(); // 입력값
+
+			if ("Y".equals(goodsCompose.getBaseYn())) {
+				regGoods.setBrandCd(extendGoods.getBrandCd());
+				regGoods.setItemkindCd(extendGoods.getItemkindCd());
+				regGoods.setGoodsNum(extendGoods.getGoodsNum());
+				regGoods.setSupplyCompCd(extendGoods.getSupplyCompCd());
+				regGoods.setFormalGb(extendGoods.getFormalGb());
+			}
+		}
+
+		regGoods.setListPrice(listPriceSum);
+		regGoods.setCurrPrice(currPriceSum);
+		regGoods.setDcRate((int)(this.getDcRate(listPriceSum, currPriceSum)));
+
+		this.createGoodsExtend(regGoods, goodsComposeList); // 세트상품 관련 정보 저장
+	}
 
 	/**
 	 * 세트/딜 상품 관련 저장
@@ -1132,7 +1226,7 @@ public class TsaGoodsService {
 	 * @author eskim
 	 * @since 2020. 10. 30
 	 */
-	private void createGoodsExtend(Goods regGoods, Collection<GoodsCompose> goodsExtendList) {
+	private void createGoodsExtend(Goods regGoods, Collection<GoodsCompose> goodsComposeList) {
 		// 브랜드 확인
 		Brand brand = new Brand();
 		brand.setBrandCd(regGoods.getBrandCd());
@@ -1176,7 +1270,7 @@ public class TsaGoodsService {
 		StringBuilder goodsDescSb = new StringBuilder(); // 상품상세
 
 		int dispOrd = 1;
-		for (GoodsCompose regGoodsExtend : goodsExtendList) {
+		for (GoodsCompose regGoodsExtend : goodsComposeList) {
 			regGoodsExtend.setDispOrd(dispOrd);
 			goodsDao.saveGoodsCompose(regGoodsExtend); // 구성상품기본 저장
 			dispOrd++;

+ 17 - 14
style24.admin/src/main/java/com/style24/admin/biz/web/TsaGoodsController.java

@@ -776,6 +776,9 @@ public class TsaGoodsController extends TsaBaseController {
 		mav.addObject("styleYearList", rendererService.getYearList(toYear,0,5));
 		// 매입유형
 		mav.addObject("buyingTypeList", rendererService.getAvailCommonCodeList("G035"));
+		// 색상
+		Color color = new Color();
+		mav.addObject("colorCdList", rendererService.getColorList(color));
 		// 상품상태
 		String[] exceptCds = {"G008_00"};
 		mav.addObject("goodsStatList", rendererService.getCommonCodeList("G008", "Y", exceptCds));
@@ -785,20 +788,20 @@ public class TsaGoodsController extends TsaBaseController {
 		return mav;
 	}
 
-//	/**
-//	 * 세트 상품 등록
-//	 *
-//	 * @param goods
-//	 * @return
-//	 * @author eskim
-//	 * @since 2020. 06. 12
-//	 */
-//	@PostMapping("/set/save")
-//	@ResponseBody
-//	public GagaResponse saveGoodsSet(@RequestBody Goods goods) {
-//		goodsService.saveGoodsSet(goods);
-//		return super.ok(message.getMessage("SUCC_0001"));
-//	}
+	/**
+	 * 세트 상품 등록
+	 *
+	 * @param goods
+	 * @return
+	 * @author eskim
+	 * @since 2020. 11. 04
+	 */
+	@PostMapping("/set/save")
+	@ResponseBody
+	public GagaResponse saveGoodsSet(@RequestBody Goods goods) {
+		goodsService.saveGoodsSet(goods);
+		return super.ok(message.getMessage("SUCC_0001"));
+	}
 
 	/**
 	 * 딜상품구성 화면

+ 1 - 0
style24.admin/src/main/java/com/style24/persistence/domain/GoodsCompose.java

@@ -25,6 +25,7 @@ public class GoodsCompose extends TscBaseDomain {
 	private String baseYn;
 	private String useYn;
 
+	private int compsCurrPriceOrg;
 	private int currPrice;
 	private String goodsStat;
 	private String imgPath1;

+ 8 - 3
style24.admin/src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -1012,6 +1012,7 @@
 		     , GOODS_SNM
 		     , FORMAL_GB
 		     , GOODS_STAT
+		     , SELL_FEE_RATE
 		     , ERP_STOCK_LINK_YN
 		     , CHANGEABLE_YN
 		     , PRE_PPNT_USABLE_YN
@@ -1201,6 +1202,7 @@
 		     , A.DISP_ORD
 		     , A.QTY
 		     , A.COMPS_CURR_PRICE
+		     , A.COMPS_CURR_PRICE AS COMPS_CURR_PRICE_ORG
 		     , A.COMPS_GOODS_OPT_NM
 		     , A.BASE_YN
 		     , A.USE_YN
@@ -1212,7 +1214,7 @@
 		     , I.IMG_PATH6
 		     , I.IMG_TYPE
 		     , A.REG_NO
-		     , FN_GET_USER_NM(A.REG_NO) AS UPD_NM
+		     , FN_GET_USER_NM(A.REG_NO) AS REG_NM
 		     , DATE_FORMAT(A.REG_DT, '%Y%m%d%H%i%S') AS REG_DT
 		     , A.UPD_NO
 		     , FN_GET_USER_NM(A.UPD_NO) AS UPD_NM
@@ -1363,6 +1365,7 @@
 		  , PRE_MPNT_USABLE_YN = #{preMpntUsableYn}
 		  , DISTRIBUTION_GB = #{distributionGb}
 		  , AGE_GRP_CD = #{ageGrpCd}
+		  , SELL_FEE_RATE = #{sellFeeRate}
 		  , UPD_NO = #{updNo}
 		  , UPD_DT = NOW()
 		WHERE GOODS_CD = #{goodsCd}
@@ -1421,7 +1424,7 @@
 		         , #{goodsType}
 		         , #{dispOrd}
 		         , #{qty}
-		         , (CASE WHEN #{goodsType} = 'S' THEN #{compsCurrPrice}
+		         , (CASE WHEN #{goodsType} = 'G056_S' THEN #{compsCurrPrice}
 		                ELSE 0 END)
 		         , #{compsGoodsOptNm}
 		         , #{baseYn}
@@ -1434,6 +1437,8 @@
 		ON DUPLICATE KEY UPDATE 
 		           DISP_ORD = #{dispOrd}
 		         , COMPS_GOODS_OPT_NM = #{compsGoodsOptNm}
+		         , COMPS_CURR_PRICE = (CASE WHEN #{goodsType} = 'G056_S' THEN #{compsCurrPrice}
+		                                    ELSE 0 END)
 		         , USE_YN = #{useYn}
 		         , UPD_NO = #{updNo}
 		         , UPD_DT = NOW()
@@ -1552,7 +1557,7 @@
 	<insert id="createGoodsSequence" parameterType="Goods">
 		/* TsaGoods.createGoodsSequence */
 		<selectKey keyProperty="goodsSq" resultType="int" order="AFTER">
-		SELECT GOODS_SQ FROM TB_GOODS_SEQUENCE
+		SELECT MAX(GOODS_SQ) FROM TB_GOODS_SEQUENCE
 		</selectKey>
 		INSERT INTO TB_GOODS_SEQUENCE (GOODS_SQ) VALUES (NULL)
 	</insert>

+ 9 - 6
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsDealForm.html

@@ -80,8 +80,7 @@
 					</tr>
 					<tr>
 						<th>색상<em class="required" title="필수"></em></th>
-						<td >
-							<select name="colorCd" id="colorCd">
+						<td ><select name="colorCd" id="colorCd">
 								<option value="">[전체]</option>
 								<option th:if="${colorCdList}" th:each="oneData, status : ${colorCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
 							</select>
@@ -128,13 +127,17 @@
 			,cellRenderer: function(params) {
 				if (params.data.imgType == "G030_A"){
 					if (gagajf.isNull(params.value)) {
-						return '<img width="60" src="'+ params.data.imgPath6 + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
+						return '<img width="60" src="'+ params.data.imgPath6 + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
 					} else {
-						return '<img width="60" src="'+ params.value + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
+						return '<img width="60" src="'+ params.value + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
 					}
 					
 				}else{
-					return '<img width="60" src="'+ params.value + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
+					if(!gagajf.isNull(params.data.imgPath6)){
+						return '<img width="60" src="'+ uploadGoodsUrl+params.data.imgPath6 + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
+					}else{
+						return '<img width="60" src="'+ uploadGoodsUrl+params.value + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
+					}	
 				}
 			}
 		},
@@ -236,7 +239,7 @@
 					isExist = true;
 				}
 			});
-			if (goods.goodsType != 'G056_N'){
+			if (goods.goodsType != "G056_N"){
 				isExist = true;
 			}
 

+ 101 - 31
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsDetailForm.html

@@ -33,7 +33,7 @@
 				<input type="hidden" id="niClsfNm" name="niClsfNm" />
 				<input type="hidden" id="uploadGoodsUrl" name="uploadGoodsUrl" th:value="${@environment.getProperty('upload.goods.view')}"/>
 				<input type="hidden" id="goodsType" name="goodsType" />
-				<input type="hidden" id="GoodsComposeList" name="GoodsComposeList" />
+				<input type="hidden" id="goodsComposeList" name="goodsComposeList" />
 				<table class="frmStyle">
 					<colgroup>
 						<col width="11%"/>
@@ -106,7 +106,7 @@
 										<th>상품타이틀</th>
 										<td colspan="5">
 											<input type="text" class="w80p" id="goodsTnm" name="goodsTnm" maxlength=""></input>
-											<span class="byteChk"><em class="cBlue" id="goodsTnmLen">0</em>/200 bytes</span>
+											<span class="byteChk"><em class="cBlue" id="goodsTnmLen">0</em>/100 bytes</span>
 											<input type="hidden" id="goodsTnmOrg" name="goodsTnmOrg"/>
 										</td>
 									</tr>
@@ -225,7 +225,9 @@
 										<th>최초승인일</th>
 										<td><span id="frstCfrmDtTxt"></span></td>
 										<th>판매수수료율<em class="required" title="필수"></em></th>
-										<td><span id="sellFeeRateTxt"></span> %</td>
+										<td><input type="text" class="w80p aR" id="sellFeeRate" name="sellFeeRate" maxlength="10" data-valid-type="numeric"/> %
+											<input type="hidden" id="sellFeeRateOrg" name="sellFeeRateOrg"/>
+										</td>
 										<th>자사몰 노출여부<em class="required" title="필수"></em></th>
 										<td>
 											<label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnY" value="Y"  checked/>Y</label>
@@ -252,7 +254,7 @@
 									<tr>
 										<th>PC포인트<em class="required" title="필수"></em></th>
 										<td>
-											<input type="text" class="w50 aR" id="pntPrate" name="pntPrate" data-valid-type="integer" maxlength="3"/> % /&nbsp;
+											<input type="text" class="w50 aR" id="pntPrate" name="pntPrate" data-valid-type="numeric" maxlength="3"/> % /&nbsp;
 											<input type="hidden" id="pntPrateOrg" name="pntPrateOrg"/>
 											<label class="rdoBtn"><input type="radio" name="prePpntUsableYn" id="prePpntUsableYnY" value="Y"/>Y</label>
 											<label class="rdoBtn"><input type="radio" name="prePpntUsableYn" id="prePpntUsableYnN" value="N"/>N</label>
@@ -260,7 +262,7 @@
 										</td>
 										<th>모바일포인트<em class="required" title="필수"></em></th>
 										<td>
-											<input type="text" class="w50 aR" id="pntMrate" name="pntMrate" data-valid-type="integer" maxlength="3"/> % /&nbsp;
+											<input type="text" class="w50 aR" id="pntMrate" name="pntMrate" data-valid-type="numeric" maxlength="3"/> % /&nbsp;
 											<input type="hidden" id="pntMrateOrg" name="pntMrateOrg"/>
 											<label class="rdoBtn"><input type="radio" name="preMpntUsableYn" id="preMpntUsableYnY" value="Y"/>Y</label>
 											<label class="rdoBtn"><input type="radio" name="preMpntUsableYn" id="preMpntUsableYnN" value="N"/>N</label>
@@ -513,6 +515,7 @@
 		},
 		{headerName: "재고연동여부", field: "erpStockLinkYn" , width: 100, cellClass: 'text-center'},
 		{headerName: "자사몰노출여부", field: "selfMallYn" , width: 120, cellClass: 'text-center'},
+		{headerName: "판매수수료율", field: "sellFeeRate" , width: 120, cellClass: 'text-right'},
 		{headerName: "사용자검색어", field: "goodsSnm1" , width: 150, cellClass: 'text-left'},
 		{headerName: "검색어", field: "goodsSnm" , width: 450, cellClass: 'text-left', tooltipField: "goodsSnm"}
 	];
@@ -548,16 +551,19 @@
 		{headerName: "구성상품코드", field: "compsGoodsCd" , width: 130, cellClass: 'text-center'},
 		{headerName: "구성상품코드명", field: "compsGoodsNm" , width: 200, cellClass: 'text-left'},
 		//{headerName: "순서", field: "dispOrd" , width: 80, cellClass: 'text-right',editable: true, required: true},
-		{headerName: "수량", field: "qty" , width: 100, cellClass: 'text-right'
+		{headerName: "수량", field: "qty" , width: 80, cellClass: 'text-right'
 			,valueFormatter: function(params) { return Number(params.value).addComma();}
 		},
 		{headerName: "판매가", field: "currPrice" , width: 100, cellClass: 'text-right'
 			,valueFormatter: function(params) { return Number(params.value).addComma();}
 		},
-		{headerName: "상품판매가", field: "compsCurrPrice" , width: 150, cellClass: 'text-right'
-			,valueFormatter: function(params) { return Number(params.value).addComma();}
+		{headerName: "상품판매가", field: "compsCurrPrice" , width: 100, cellClass: 'text-right'
+			,valueFormatter: function(params) { return Number(params.value).addComma();}, editable: true, required: true,
+			cellEditor: 'textCellEditor',
+			cellEditorParams: { maxlength: 14, validType: 'numeric'}
 		},
-		{headerName: "기준여부(품목-카테고리)", field: "baseYn", width: 180, cellClass: 'text-center'},
+		{headerName: "상품판매가ORG", field: "compsCurrPriceOrg" , width: 100, cellClass: 'text-right', hide: true},
+		{headerName: "기준여부(품목-카테고리)", field: "baseYn", width: 160, cellClass: 'text-center'},
 		{headerName: "전시여부", field: "useYn", width: 100, cellClass: 'text-center',editable: true,
 			cellEditor: 'agRichSelectCellEditor',
 			cellEditorParams: { values: gagaAgGrid.extractValues(useYnList), required: true },
@@ -570,13 +576,13 @@
 			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' ,
+		{headerName: "등록일시", field: "regDt", width: 140, 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: "updDt", width: 150, cellClass: 'text-center' ,
+		{headerName: "수정일시", field: "updDt", width: 140, cellClass: 'text-center' ,
 			cellRenderer: function(params) {
 				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmmss").format("YYYY-MM-DD HH:mm:ss") : '';
 			}
@@ -638,6 +644,7 @@
 	// 드래그
 	gridGoodsComposeOptions.suppressRowClickSelection = true;
 	gridGoodsComposeOptions.rowDragManaged = true;
+	gridGoodsComposeOptions.stopEditingWhenGridLosesFocus = true;
 	//gridGoodsComposeOptions.rowDeselection = true;
 	//gridGoodsComposeOptions.enableMultiRowDragging = true;
 	//gridGoodsComposeOptions.rowSelection = 'multiple';
@@ -708,13 +715,13 @@
 
 			$("#goodsDetailForm input[name=goodsNm]").val(result.goodsNm);
 			$('#goodsDetailForm input[name=goodsNmOrg]').val(result.goodsNm);
-			fnDataLengthCheck('goodsNm');
+			fnDataLengthCheck('goodsNm',200);
 			$("#goodsDetailForm input[name=goodsTnm]").val(result.goodsTnm);
 			$('#goodsDetailForm input[name=goodsTnmOrg]').val(result.goodsTnm);
-			fnDataLengthCheck('goodsTnm');
+			fnDataLengthCheck('goodsTnm',100);
 			$("#goodsDetailForm input[name=goodsSnm1]").val(result.goodsSnm1);
 			$("#goodsDetailForm input[name=goodsSnm1Org]").val(result.goodsSnm1);
-			fnDataLengthCheck('goodsSnm1');
+			fnDataLengthCheck('goodsSnm1',200);
 			$("#goodsDetailForm textarea[name=goodsSnmTxt]").val(result.goodsSnm);
 			$("#goodsDetailForm input[name=goodsSnm]").val(result.goodsSnm);
 			$('#goodsDetailForm').find('#listPriceTxt').html(result.listPrice.addComma());
@@ -749,7 +756,9 @@
 			}else{
 				$("#goodsDetailForm input:radio[name=selfMallYn]:input[value='N']").trigger('click');
 			}
-			$('#goodsDetailForm').find('#sellFeeRateTxt').html(result.sellFeeRate);
+			
+			$('#goodsDetailForm input[name=sellFeeRate]').val(result.sellFeeRate);
+			$("#goodsDetailForm input[name=sellFeeRateOrg]").val(result.sellFeeRate);
 			
 			if (result.prePpntUsableYn == "Y"){
 				$("#goodsDetailForm input:radio[name=prePpntUsableYn]:input[value='Y']").trigger('click');
@@ -780,7 +789,7 @@
 
 			//입점상품일 경우
 			if (result.selfGoodsYn == "N"){
-				$('#goodsDetailForm').find('#erplinkarea').hide();
+				//$('#goodsDetailForm').find('#erplinkarea').hide();
 				$("#goodsDetailForm").find("#selfGoodsDpTitle").html('원코드');
 				$("#goodsDetailForm").find("#selfGoodsDpTxt").html('<div id="supplyGoodsCdTxt"></div>');
 				$('#goodsDetailForm').find('#supplyGoodsCdTxt').html(result.supplyGoodsCd);
@@ -862,16 +871,18 @@
 			//상품 구분에 따른 컬럼 사용여부처리 start
 			//세트
 			if ("G056_S" == result.goodsType){
-				$('#goodsDetailForm #erplinkarea').addClass('off');
+				//$('#goodsDetailForm #erplinkarea').addClass('off');
 				if (result.selfGoodsYn == "Y") $('#goodsDetailForm #GoodsComposeTab').css('display','block');
 				$('#goodsDetailForm #goodsNotiTab').css('display','none');
 				$('#goodsDetailForm #goodsColorTab').css('display','none');
+				$('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
+				$('#goodsDetailForm input[name=currPrice]').attr('readonly', true);
 			}else if ("G056_D" == result.goodsType){
-				$('#goodsDetailForm #erplinkarea').addClass('off');
-				$('#goodsDetailForm #erplinkarea').addClass('off');
+				//$('#goodsDetailForm #erplinkarea').addClass('off');
 				if (result.selfGoodsYn == "Y") $('#goodsDetailForm #GoodsComposeTab').css('display','block');
 				$('#goodsDetailForm #goodsNotiTab').css('display','none');
 				$('#goodsDetailForm #goodsColorTab').css('display','none');
+				$('#goodsDetailForm input[name=sellFeeRate]').attr('readonly', true);
 			}
 			
 			//상품 구분에 따른 컬럼 사용여부처리 end
@@ -928,6 +939,7 @@
 		}else{	//딜
 			gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'qty', false);
 			gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'compsCurrPrice', false);
+			gagaAgGrid.showOrHideColumn(gridGoodsComposeOptions, 'compsCurrPriceOrg', false);
 		}
 		gagaAgGrid.fetch("/goods/detail/compose/list?goodsCd=" + params.goodsCd , gridGoodsComposeOptions);
 	}	
@@ -972,17 +984,17 @@
 
 	//상품명 길이표시
 	$("#goodsDetailForm input[name=goodsNm]").bind('focus focusout input keyup keydown paste change', function () {
-		fnDataLengthCheck('goodsNm');
+		fnDataLengthCheck('goodsNm',200);
 	});
 
 	//상품타이틀 길이표시
 	$("#goodsDetailForm input[name=goodsTnm]").bind('focus focusout input keyup keydown paste change', function () {
-		fnDataLengthCheck('goodsTnm');
+		fnDataLengthCheck('goodsTnm',100);
 	});
 	
 	//사용자검색어 길이표시
 	$("#goodsDetailForm input[name=goodsSnm1]").bind('focus focusout input keyup keydown paste change', function () {
-		fnDataLengthCheck('goodsSnm1');
+		fnDataLengthCheck('goodsSnm1',200);
 	});
 
 	//판매가 변경시 할인율 계산
@@ -1050,8 +1062,8 @@
 	}
 
 	//데이터 길이 확인
-	var fnDataLengthCheck = function(id){
-		var maximumByte = 200;
+	var fnDataLengthCheck = function(id , maxByte){
+		var maximumByte = maxByte;
 		var strLenEng = $('#goodsDetailForm').find('#'+id).val().length;
 		var cbyteStr = 0;
 		var liLenStr = 0;
@@ -1186,8 +1198,6 @@
 				});
 			}
 			
-			
-			
 		}
 
 		if(optCheck) {
@@ -1268,7 +1278,25 @@
 			});
 			return false;
 		}
-		
+		//판매 수수료율
+		if ( gagajf.isNull($("#goodsDetailForm input[name=sellFeeRate]").val())) {
+			mcxDialog.alertC("판매수수료를 입력해 주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=sellFeeRate]").focus();
+				}
+			});
+			return false;
+		}
+		if(Number($("#goodsDetailForm input[name=sellFeeRate]").val()) < 0 || Number($("#goodsDetailForm input[name=sellFeeRate]").val()) > 100) {
+			mcxDialog.alertC("판매수수료를 올바르게 입력해주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=sellFeeRate]").focus();
+				}
+			});
+			return false;
+		}
 		// 포인트
 		if ( gagajf.isNull($("#goodsDetailForm input[name=pntPrate]").val())) {
 			mcxDialog.alertC("PC 포인트를 입력해 주세요.", {
@@ -1279,6 +1307,15 @@
 			});
 			return false;
 		}
+		if(Number($("#goodsDetailForm input[name=pntPrate]").val()) < 0 || Number($("#goodsDetailForm input[name=pntPrate]").val()) > 100) {
+			mcxDialog.alertC("PC 포인트를 올바르게 입력해주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=pntPrate]").focus();
+				}
+			});
+			return false;
+		}
 		if ( gagajf.isNull($("#goodsDetailForm input[name=pntMrate]").val())) {
 			mcxDialog.alertC("MOBILE 포인트를 입력해 주세요.", {
 				sureBtnText: "확인",
@@ -1288,7 +1325,16 @@
 			});
 			return false;
 		}
-
+		if(Number($("#goodsDetailForm input[name=pntMrate]").val()) < 0 || Number($("#goodsDetailForm input[name=pntMrate]").val()) > 100) {
+			mcxDialog.alertC("MOBILE 포인트를 올바르게 입력해주세요.", {
+				sureBtnText: "확인",
+				sureBtnClick: function() {
+					$("#goodsDetailForm input[name=pntMrate]").focus();
+				}
+			});
+			return false;
+		}
+		
 		// 주문수량
 		if ( gagajf.isNull($("#goodsDetailForm input[name=minOrdQty]").val())) {
 			mcxDialog.alertC("최소주문 수량을 입력해 주세요.", {
@@ -1545,6 +1591,7 @@
 		}else{
 			$("#goodsDetailForm").find("#dcRateTxt").html(dcRate);
 			$("#goodsDetailForm input[name=dcRate]").val(dcRate);
+			if (!fnGoodsComposeCheck()) return false;
 			fnSaveCheck();
 		}
 		
@@ -1594,17 +1641,20 @@
 			
 			if (comSelfGoodsYn != item.selfGoodsYn){
 				optCheck = true;
-				mcxDialog.alertC("구상품중 자사/입점상품 구분값이 다릅니다.<br/>확인해 주세요", {
+				mcxDialog.alertC("구상품중 자사/입점상품 구분값이 다릅니다.<br/>확인해 주세요", {
 					sureBtnText: "확인",
 					sureBtnClick: function() {
 						gridGoodsComposeOptions.api.setFocusedCell(index, "goodsCd", null);
 					}
 				});	
 				return false;
+				/*
 			}else{
+				
+				
 				if (comSelfGoodsYn == "N" && (comSupplyCompCd != item.supplyCompCd)){
 					optCheck = true;
-					mcxDialog.alertC("구상품중 입점은 같은 업체 상품만 가능합니다.<br/>확인해 주세요", {
+					mcxDialog.alertC("구상품중 입점은 같은 업체 상품만 가능합니다.<br/>확인해 주세요", {
 						sureBtnText: "확인",
 						sureBtnClick: function() {
 							gridGoodsComposeOptions.api.setFocusedCell(index, "goodsCd", null);
@@ -1612,6 +1662,21 @@
 					});	
 					return false;
 				}
+				*/
+			}
+			
+			// 세트 가격 체크
+			if ($("#goodsDetailForm input[name=goodsType]").val() == "G056_S"){
+				if (item.compsCurrPrice <= 0){
+					optCheck = true;
+					mcxDialog.alertC("구성상품 판매가를 확인해 주세요", {
+						sureBtnText: "확인",
+						sureBtnClick: function() {
+							gridGoodsComposeOptions.api.setFocusedCell(index, "compsCurrPrice", null);
+						}
+					});	
+					return false;
+				}
 			}
 			
 		});
@@ -1646,7 +1711,7 @@
 				//구성상품
 				var allData = gagaAgGrid.getAllRowData(gridGoodsComposeOptions);
 				var jsonData = JSON.stringify(allData);
-				$('#goodsDetailForm input[name=GoodsComposeList]').val(jsonData);
+				$('#goodsDetailForm input[name=goodsComposeList]').val(jsonData);
 				
 				$('#goodsDetailForm input[name=goodsNm]').val($('#goodsDetailForm input[name=goodsNm]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, "&quot;").replace(/\'/gi, "&#39;"));
 				$('#goodsDetailForm input[name=goodsTnm]').val($('#goodsDetailForm input[name=goodsTnm]').val().trim().replace(/\n|\r/g, "<br/>").replace(/\"/gi, "&quot;").replace(/\'/gi, "&#39;"));
@@ -1793,7 +1858,12 @@
 		if ($("#goodsDetailForm input[name=ageGrpCdOrg]").val() != $("#goodsDetailForm select[name=ageGrpCd]").val()){
 			return true;
 		}
+		// 판매수수료율
+		if ($("#goodsDetailForm input[name=sellFeeRateOrg]").val() != $("#goodsDetailForm input[name=sellFeeRate]").val()){
+			return true;
+		}
 
+		
 		return false;
 	}
 

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

@@ -358,7 +358,11 @@
 					}
 					
 				}else{
-					return '<img width="60" src="'+ params.value + '" alt="" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \''+ params.value +'\')" onerror="this.src=\'/image/no.gif\';"/>';
+					if(!gagajf.isNull(params.data.imgPath6)){
+						return '<img width="60" src="'+ uploadGoodsUrl+params.data.imgPath6 + '" alt="" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \''+ uploadGoodsUrl+params.data.imgPath6 +'\')" onerror="this.src=\'/image/no.gif\';"/>';
+					}else{
+						return '<img width="60" src="'+ uploadGoodsUrl+params.value + '" alt="" onclick="cfnOpenImagePreViewPopup(\'goodsImgView\', \''+ uploadGoodsUrl+params.value +'\')" onerror="this.src=\'/image/no.gif\';"/>';
+					}	
 				}
 			}
 		},

+ 124 - 153
style24.admin/src/main/webapp/WEB-INF/views/goods/GoodsSetForm.html

@@ -11,147 +11,144 @@
  *============================================================================
  * VER  DATE         AUTHOR      DESCRIPTION
  * ===  ===========  ==========  =============================================
- * 1.0  2020.05.26   eskim       최초 작성
+ * 1.0  2020.11.04   eskim       최초 작성
  *******************************************************************************
  -->	
-	<ul class="popup modal" data-width="1100" >
-		<li class="mdPopTitle">
-			<strong>세트 상품 구성</strong>
-			<button type="button" class="close" onclick="fnGoodsSetFormClose()"><i class="fa fa-times"></i></button>
-		</li>
-		<li class="mdPopContent" style="height:610px; overflow-y: auto;">
-			<ul class="notice">
-				<li>구성상품 등록시 기본값&nbsp;
-					<!-- 아이콘 툴팁 -->
-					<div class="iconTooltip">
-						<i class="fa fa-info" aria-hidden="true"></i>
-						<span class="left" style="width:400px; text-align:left;">
-						<!-- class="left" 또는 class="right" -->
-							- 상품상태 : 정보부족<br/>
-							- TAG가 : 구성상품의 TAG가 합<br/>
-							- 정상가 : 구성상품의 정상가 합<br/>
-							- 판매가 : 구성상품 판매가 입력값의 합<br/>
-							- 브랜드코드 : 구성상품의 기준여부 'Y'상품의 브랜드코드<br/>
-							- 품목코드 : 구성상품의 기준여부 'Y'상품의 품목코드<br/>
-							- 포인트 : 구성상품의 기준여부 'Y'상품의 브랜드 포인트<br/>
-							- 기본배송비 : 구성상품의 기준여부 'Y'상품의 브랜드 기본배송비<br/>
-							- 무료배송비기준 : 구성상품의 기준여부 'Y'상품의 브랜드 무료배송비기준<br/>
-							- 외부몰 판매가 : 구성상품 판매가 입력값의 합<br/>
-							- 상품이미지 : 상품상세에서 이미지 경로 등록 처리
-						</span>
-					</div>
-					<!-- //아이콘 툴팁 --> 
+	<div class="modalPopup" data-width="1100" >
+		<div class="panelStyle">
+			<div class="panelTitle">
+				<h2>세트 상품 구성</h2>
+				<button type="button" class="close" onclick="fnGoodsSetFormClose()"><i class="fa fa-times"></i></button>
+			</div>
+			<form id="goodsSetForm" name="goodsSetForm" th:method="post">
+			<input type="hidden" id="goodsComposeList" name="goodsComposeList" />
+			<div class="panelContent">
+				<ul class="notice">
+					<li>구성상품 등록시 기본값&nbsp;
+						<!-- 아이콘 툴팁 -->
+						<div class="iconTooltip">
+							<i class="fa fa-info" aria-hidden="true"></i>
+							<span class="left" style="width:400px; text-align:left;">
+							<!-- class="left" 또는 class="right" -->
+								- 상품상태 : 정보부족<br/>
+								- TAG가 : 구성상품의 TAG가 합<br/>
+								- 정상가 : 구성상품의 정상가 합<br/>
+								- 판매가 : 구성상품 판매가 입력값의 합<br/>
+								- 브랜드코드 : 구성상품의 기준여부 'Y'상품의 브랜드코드<br/>
+								- 품목코드 : 구성상품의 기준여부 'Y'상품의 품목코드<br/>
+								- 포인트 : 구성상품의 기준여부 'Y'상품의 브랜드 포인트<br/>
+								- 기본배송비 : 구성상품의 기준여부 'Y'상품의 브랜드 기본배송비<br/>
+								- 무료배송비기준 : 구성상품의 기준여부 'Y'상품의 브랜드 무료배송비기준<br/>
+							</span>
+						</div>
+						<!-- //아이콘 툴팁 --> 
+					</li>
+				</ul>
+				<table class="frmStyle">
+					<colgroup>
+						<col width="10%"/>
+						<col/>
+						<col width="10%"/>
+						<col width="23%"/>
+						<col width="10%"/>
+						<col width="23%"/>
+					</colgroup>
+					<tr>
+						<th>상품명<em class="required" title="필수"></em></th>
+						<td><input type="text" id="goodsNm" name="goodsNm" maxlength="60"/></td>
+						<th>자사노출여부<em class="required" title="필수"></em></th>
+						<td><label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnY" value="Y" checked/>Y</label>
+							<label class="rdoBtn"><input type="radio" name="selfMallYn" id="selfMallYnN" value="N"/>N</label>
+						</td>
+						<th>성별<em class="required" title="필수"></em></th>
+						<td><select  name="sexGb" id="sexGb">
+								<option value="">[전체]</option>
+								<option th:if="${sexGbList}" th:each="oneData, status : ${sexGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+					</tr>
+					<tr>
+						<th>년도/시즌<em class="required" title="필수"></em></th>
+						<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>
+							</select>
+							<select  name="seasonCd" id="seasonCd">
+								<option value="">[전체]</option>
+								<option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>원산지<em class="required" title="필수"></em></th>
+						<td><input type="text" class="w100" id="makeNm" name="makeNm" maxlength="20" /></td>
+					</tr>
+					<tr>
+						<th>색상<em class="required" title="필수"></em></th>
+						<td colspan="3">
+							<select name="colorCd" id="colorCd">
+								<option value="">[전체]</option>
+								<option th:if="${colorCdList}" th:each="oneData, status : ${colorCdList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
+							</select>
+						</td>
+						<th>제조년월일<em class="required" title="필수"></em></th>
+						<td><input type="text" class="w100" id="makeYmd" name="makeYmd" maxlength="8" data-valid-type="date"/></td>
+					</tr>
+				</table>
+			</div>	
+			<ul class="panelBar">
+				<li class="left">
+					<button type="button" class="btn btn-danger btn-lg" onclick="fnGoodsSetDeleteRow();">행삭제</button>
+				</li>
+				<li class="right">
+					<button type="button" class="btn btnRight btn-base btn-lg" onclick="fnOpenGoodsSetPopup();">구상상품추가</button>
 				</li>
 			</ul>
-			<form id="goodsSetForm" name="goodsSetForm" th:method="post">
-			<input type="hidden" id="extendGoodsList" name="extendGoodsList" />
-			<table class="frmStyle">
-				<colgroup>
-					<col width="10%"/>
-					<col/>
-					<col width="10%"/>
-					<col width="23%"/>
-					<col width="10%"/>
-					<col width="23%"/>
-				</colgroup>
-				<tr>
-					<th>상품명<i class="star"></i></th>
-					<td><input type="text" id="goodsNm" name="goodsNm" maxlength="60"/></td>
-					<th>자사노출여부<i class="star"></i></th>
-					<td><label><input type="radio" name="selfMallYn" id="selfMallYnY" value="Y" checked/>Y</label>
-						<label><input type="radio" name="selfMallYn" id="selfMallYnN" value="N"/>N</label>
-					</td>
-					<th>성별<i class="star"></i></th>
-					<td><select  name="sexGb" id="sexGb">
-							<option value="">[전체]</option>
-							<option th:if="${sexGbList}" th:each="oneData, status : ${sexGbList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-						</select>
-					</td>
-				</tr>
-				<tr>
-					<th>년도/시즌<i class="star"></i></th>
-					<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>
-						</select>
-						<select  name="seasonCd" id="seasonCd">
-							<option value="">[전체]</option>
-							<option th:if="${seasonList}" th:each="oneData, status : ${seasonList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-						</select>
-					</td>
-					<th>원산지<i class="star"></i></th>
-					<td><input type="text" class="w100" id="makeNm" name="makeNm" maxlength="20" /></td>
-				</tr>
-				<tr>
-					<th>색상<i class="star"></i></th>
-					<td colspan="3">
-						<select name="colorCd" id="colorCd">
-						</select>
-					</td>
-					<th>제조년월일<i class="star"></i></th>
-					<td><input type="text" class="w100" id="makeYmd" name="makeYmd" maxlength="8" data-valid-type="date"/></td>
-					<!-- <th>매입유형<i class="star"></i></th>
-					<td colspan="3">
-						<select  name="buyingType" id="buyingType">
-							<option value="">[선택]</option>
-							<option th:if="${buyingTypeList}" th:each="oneData, status : ${buyingTypeList}" th:value="${oneData.cd}" th:text="${'[' + oneData.cd + '] ' + oneData.cdNm}"></option>
-						</select>
-					</td> -->
-				</tr>
-			</table>
-			<div class="padT15 padB15">
-				<button type="button" class="btn btn-danger btn-lg" onclick="fnGoodsSetDeleteRow();">행삭제</button>
-				<button type="button" class="btn btnRight  btn-base btn-lg" onclick="fnOpenGoodsSetPopup();">구상상품추가</button>
-			</div>
 			<div id="gridGoodsSetList" style="height: 390px;" class="ag-theme-balham lh60"></div>
-		</form>	
-		</li>
-		<li class="mdPopBtnB padT15">
-			<th:block th:if="${sessionInfo.roleCd == '0000' OR sessionInfo.roleCd == 'A000' OR sessionInfo.roleCd == 'A101' OR sessionInfo.roleCd == 'A100' OR sessionInfo.roleCd == 'A001'}">
-			<button type="button" class="btn btnRight btn-success btn-lg" id="btnGoodsSetSave">저장</button>
-			</th:block>
-		</li>
-	</ul>
+			</form>
+			<ul class="panelBar">
+				<li  class="right">
+					<th:block 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 type="button" class="btn btnRight btn-success btn-lg" id="btnGoodsSetSave">저장</button>
+					</th:block>
+				</li>
+			</ul>
+		</div>	
+	</div>
 <script th:inline="javascript">
 /*<![CDATA[*/
-	var useYnList = cfnConvertToArray([[${useYnList}]]);
-	var goodsStatList = cfnConvertToArray([[${goodsStatList}]]);
+	var useYnList = gagajf.convertToArray([[${useYnList}]]);
+	var goodsStatList = gagajf.convertToArray([[${goodsStatList}]]);
 	// specify the columns
 	var columnGoodsSetDefs = [
-		{headerName: "정렬", field: "dispOrd", width: 70 ,hide: false, cellClass: 'text-center',  rowDrag: true },
 		{width: 40, minWidth: 40, cellClass: 'text-center', headerCheckboxSelection: true, checkboxSelection: true, filter: false},
+		{headerName: "정렬", field: "dispOrd", width: 70 ,hide: false, cellClass: 'text-center',  rowDrag: true },
 		//{headerName: 'No', width: 60, cellClass: 'text-center', valueGetter: function(params) { return params.node.rowIndex + 1 }},
 		{headerName: "이미지", field: "imgPath1", width: 100, height: 60, cellClass: 'text-center'
 			,cellRenderer: function(params) {
-				if (params.data.imgType == "A"){
-					if(!gagajf.isNull(params.data.imgPath6)){
-						return '<img width="60" src="'+ uploadGoodsUrl+params.data.imgPath6.replace("/1000/","/100/") + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
-					}else{
-						return '<img width="60" src="'+ uploadGoodsUrl+params.value.replace("/1000/","/100/") + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
-					}	
+				if (params.data.imgType == "G030_A"){
+					if (gagajf.isNull(params.value)) {
+						return '<img width="60" src="'+ params.data.imgPath6 + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
+					} else {
+						return '<img width="60" src="'+ params.value + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
+					}
+					
 				}else{
 					if(!gagajf.isNull(params.data.imgPath6)){
-						return '<img width="60" src="'+ params.data.imgPath1 + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
+						return '<img width="60" src="'+ uploadGoodsUrl+params.data.imgPath6 + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
 					}else{
-						return '<img width="60" src="'+ params.value + '" alt="" onerror="this.src=\'/image/no.gif\';"/>';
-					}
-					
+						return '<img width="60" src="'+ uploadGoodsUrl+params.value + '" alt=""  onerror="this.src=\'/image/no.gif\';"/>';
+					}	
 				}
 			}
 		},
-		{headerName: "구성상품코드", field: "extendGoodsCd" , width: 130, cellClass: 'text-center'},
-		{headerName: "구성상품명", field: "goodsNm" , width: 130, cellClass: 'text-left'},
+		{headerName: "구성상품코드", field: "compsGoodsCd" , width: 130, cellClass: 'text-center'},
+		{headerName: "구성상품명", field: "goodsNm" , width: 250, cellClass: 'text-left'},
 		//{headerName: "순서", field: "dispOrd" , width: 100, cellClass: 'text-center',editable: true, required: true},
 		{headerName: "수량", field: "qty" , width: 80, cellClass: 'text-right',editable: true, required: true},
-		{headerName: "상품판매가", field: "extendCurrPrice" , width: 120, cellClass: 'text-right',editable: true, required: true,
+		{headerName: "상품판매가", field: "compsCurrPrice" , width: 120, cellClass: 'text-right', editable: true, required: true,
 			cellEditor: 'textCellEditor',
 			cellEditorParams: { maxlength: 14, validType: 'numeric'}
 		},
-		/* {headerName: "임직원판매가", field: "extendStaffCurrPrice" , width: 120, cellClass: 'text-right',editable: true, required: true,
-			cellEditor: 'textCellEditor',
-			cellEditorParams: { maxlength: 14, validType: 'numeric'}
-		}, */
 		{headerName: "기준여부(품목/전시카테)", field: "baseYn" , width: 160, cellClass: 'text-center',editable: true, required: true,
 			cellEditor: 'agRichSelectCellEditor',
 			cellEditorParams: { values: gagaAgGrid.extractValues(useYnList) },
@@ -162,20 +159,7 @@
 			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: "selfGoodsYn" , width: 100, cellClass: 'text-center'}
-		/* {headerName: "등록일자", field: "regDt", width: 150, cellClass: 'text-center' ,
-			cellRenderer: function(params) {
-				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmm").format("YYYY-MM-DD HH:mm") : '';
-			}
-		},
-		{headerName: "등록자", field: "regId", width: 100, cellClass: 'text-center'},
-		{headerName: "수정일자", field: "regDt", width: 150, cellClass: 'text-center' ,
-			cellRenderer: function(params) {
-				return !gagajf.isNull(params.value) ? params.value.toDate("YYYYMMDDHHmm").format("YYYY-MM-DD HH:mm") : '';
-			}
-		},
-		{headerName: "수정자", field: "regId", width: 100, cellClass: 'text-center'} */
+		}
 	];
 
 	// Get GridOptions
@@ -216,11 +200,6 @@
 					mcxDialog.alert('다른 구성상품에 기준여부가 선택되어 있습니다.');
 					return;
 				}
-				
-				//기준상품의 색상 정보 읽어오기
-				var goodsCd = event.data.extendGoodsCd;
-				$("#goodsSetForm select[name=colorCd] option:gt(0)").remove();
-				cfnCreateCombo("/renderer/goods/brand/color/list/" + goodsCd, $('#goodsSetForm select[name=colorCd]'), "[선택]");
 			}	
 		}
 	}
@@ -257,19 +236,18 @@
 				}
 			});
 
-			if (goods.goodsType != 'N'){
+			if (goods.goodsType != "G056_N"){
 				isExist = true;
 			}
 			
 			if(!isExist){
 				
 				var data = { 
-						  extendGoodsCd: goods.goodsCd
-						, goodsType: 'S'
+						  compsGoodsCd: goods.goodsCd
+						, goodsType: 'G056_S'
 						, dispOrd: idx
 						, qty: 1
-						, extendCurrPrice: goods.currPrice
-						, extendStaffCurrPrice: goods.currPrice
+						, compsCurrPrice: goods.currPrice
 						, baseYn: 'N'
 						, goodsStat : goods.goodsStat
 						, useYn: 'Y'
@@ -297,8 +275,8 @@
 			cancelBtnText: "취소",
 			sureBtnText: "확인",
 			sureBtnClick: function(){
-				var extendGoodsList = gagaAgGrid.getAllRowData(gridGoodsSetOptions);
-				$("#goodsSetForm input[name=extendGoodsList]").val(JSON.stringify(extendGoodsList));
+				var goodsComposeList = gagaAgGrid.getAllRowData(gridGoodsSetOptions);
+				$("#goodsSetForm input[name=goodsComposeList]").val(JSON.stringify(goodsComposeList));
 				gagajf.ajaxFormSubmit("/goods/set/save", "#goodsSetForm", fnGoodsSetFormClose);
 			}
 		});
@@ -430,7 +408,7 @@
 				checkBaseYn = true;
 			}
 			
-			if(item.goodsStat != "90"){
+			if(item.goodsStat != "G008_90"){
 				optCheck = true;
 				mcxDialog.alertC("상품상태를 확인해 주세요.", {
 					sureBtnText: "확인",
@@ -498,15 +476,8 @@
 			return;
 		}
 		
-		var iTotalCnt = 0;
-		var iCnt = 0;
-		$.each(selectedData, function(index, item) {	
-			iTotalCnt ++;
-			if (item.crud == "C"){
-				gridGoodsSetOptions.api.updateRowData({remove: [item]});	
-				iCnt ++;
-			}
-		});
+		//화면에서 삭제
+		var removedData = gagaAgGrid.removeRowData(gridGoodsSetOptions, false);
 	}
 	
 /*]]>*/