Browse Source

Merge branch 'develop' of http://112.172.147.34:4936/style24/style24.admin into develop

card007 5 năm trước cách đây
mục cha
commit
21180cd039

+ 3 - 2
src/main/java/com/style24/admin/biz/service/TsaDisplayService.java

@@ -704,8 +704,9 @@ public class TsaDisplayService {
 				if(contents1.getGoodsCdArr().length>0){
 					for(int i=0; i<contents1.getGoodsCdArr().length; i++){
 						contents1.setGoodsCd(contents1.getGoodsCdArr()[i]);
-						contents1.setGoodsNm(contents1.getGoodsNmArr()[i]);
-						contents1.setImgPath1(contents1.getGoodsImgArr()[i]);
+//						contents1.setGoodsNm(contents1.getGoodsNmArr()[i]);
+//						contents1.setImgPath1(contents1.getGoodsImgArr()[i]);
+						contents1.setDispOrd(Integer.parseInt(contents1.getGoodsDispOrdArr()[i]));
 						displayDao.saveContentsGoodsTemp(contents1);
 					}
 				}

+ 2 - 0
src/main/java/com/style24/persistence/domain/Contents.java

@@ -72,6 +72,8 @@ public class Contents extends TscBaseDomain {
     private String[] goodsNmArr;
     @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
     private String[] goodsImgArr;
+    @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
+    private String[] goodsDispOrdArr;
 
     @JsonFormat(with = JsonFormat.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY)
     private String[] brandGroup1Arr;

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

@@ -133,6 +133,7 @@ public class Goods extends TscBaseDomain {
 //	private String searchGb;
 
 	private String blankFlag;
+	private String contentsDispOrd;
 //
 //	private Integer sizeCurrStockQty;
 //	private Integer sizeBaseStockQty;

+ 2 - 1
src/main/java/com/style24/persistence/mybatis/shop/TsaDelivery.xml

@@ -502,6 +502,7 @@
 			, S.OPT_CD2 
 			, G.GOODS_STAT
 			, (SELECT CD_NM FROM TB_COMMON_CODE WHERE CD_GB = 'G008' AND CD =G.GOODS_STAT) AS GOODS_STAT_NM
+			, G.SUPPLY_COMP_CD
 		FROM  TB_GOODS G
 		INNER JOIN TB_BRAND B  ON G.BRAND_CD = B.BRAND_CD
 		INNER JOIN TB_OPTION S ON G.GOODS_CD = S.GOODS_CD			
@@ -514,7 +515,7 @@
 		</if>
 		<if test='searchTxt != null and searchTxt != ""'>
 			<if test='goodsGb == "goodsCd"'>
-				AND G.GOODS_CD LIKE UPPER(#{searchTxt} || '%')
+				AND G.GOODS_CD LIKE CONCAT(UPPER(#{searchTxt}),'%')
 			</if>
 			<if test='goodsGb == "goodsNm"'>
 				AND G.GOODS_NM LIKE #{searchTxt} || '%'

+ 15 - 5
src/main/java/com/style24/persistence/mybatis/shop/TsaDsiplay.xml

@@ -589,9 +589,10 @@
 		FROM	(
 			SELECT	@rownum := @rownum + 1 AS RNUM
 					,A.*
-					, CASE WHEN A.GOODS_TYPE = 'G056_S' THEN (SELECT IFNULL(SUM(CURR_STOCK_QTY), 0) - IFNULL(SUM(BASE_STOCK_QTY), 0) AS CURR_STOCK_QTY FROM VW_STOCK_COMPOSE WHERE GOODS_CD = A.GOODS_CD)
-					ELSE (SELECT IFNULL(SUM(CURR_STOCK_QTY), 0) - IFNULL(SUM(BASE_STOCK_QTY), 0) AS CURR_STOCK_QTY FROM VW_STOCK WHERE GOODS_CD = A.GOODS_CD)
-					END AS CURR_STOCK_QTY
+				--	, CASE WHEN A.GOODS_TYPE = 'G056_S' THEN (SELECT IFNULL(SUM(CURR_STOCK_QTY), 0) - IFNULL(SUM(BASE_STOCK_QTY), 0) AS CURR_STOCK_QTY FROM VW_STOCK_COMPOSE WHERE GOODS_CD = A.GOODS_CD)
+				--	ELSE (SELECT IFNULL(SUM(CURR_STOCK_QTY), 0) - IFNULL(SUM(BASE_STOCK_QTY), 0) AS CURR_STOCK_QTY FROM VW_STOCK WHERE GOODS_CD = A.GOODS_CD)
+				--	END AS CURR_STOCK_QTY
+					, IFNULL((SELECT STOCK_QTY FROM TB_GOODS_STOCK WHERE GOODS_CD = A.GOODS_CD),0) AS CURR_STOCK_QTY
 			FROM	(
 				SELECT	'카테고리확인' AS FULL_CATE_NM
 						, G.GOODS_CD
@@ -1663,8 +1664,13 @@
 		    ,#{preContentsSq}
 		    ,#{contentsSq}
 		    ,#{goodsCd}
-		    ,#{goodsNm}
-		    ,#{imgPath1}
+		    ,IFNULL(#{goodsNm},'')
+		    ,IFNULL(#{imgPath1},'')
+		    <choose>
+				<when test="dispOrd != null and dispOrd != ''">
+			,#{dispOrd}
+				</when>
+				<otherwise>
 		    ,(SELECT DISP_ORD FROM (SELECT IFNULL((MAX(DISP_ORD) + 1), 1) AS DISP_ORD
 		                            FROM	TB_CONTENTS_GOODS
 		                            WHERE 1=1
@@ -1677,6 +1683,8 @@
 		                            AND BRAND_GROUP_NO = #{brandGroupNo}
 		                            </if>
 		                        ) TMP)
+				</otherwise>
+			</choose>
 		    ,#{regNo}
 		    ,NOW()
 		)
@@ -1933,6 +1941,7 @@
 		SELECT CG.GOODS_CD
 		     , G.GOODS_NM
 		     , GI.SYS_IMG_NM
+		     , CG.DISP_ORD AS CONTENTS_DISP_ORD
 		FROM TB_CONTENTS_GOODS CG
 		JOIN TB_GOODS G ON CG.GOODS_CD = G.GOODS_CD
 		JOIN TB_GOODS_IMG GI ON G.GOODS_CD = GI.GOODS_CD AND G.MAIN_COLOR_CD = COLOR_CD AND GI.DEFAULT_IMG_YN = 'Y'
@@ -1942,5 +1951,6 @@
 		</if>
 		AND CG.CONTENTS_LOC = #{contentsLoc}
 		AND CG.CONTENTS_SQ = #{dispOrd}
+		ORDER BY CG.BRAND_GROUP_NO , CG.CATE_NO ,CG.LEAF_CATE_NO ,CG.CONTENTS_LOC ,CG.PRE_CONTENTS_SQ , CG.CONTENTS_SQ , CG.DISP_ORD
 	</select>
 </mapper>

+ 5 - 9
src/main/java/com/style24/persistence/mybatis/shop/TsaGoods.xml

@@ -625,17 +625,13 @@
 		            </foreach>
 		        </if>
 		        <if test="styleYear != null and styleYear != ''">
-		        AND G.STYLE_YEAR = (SELECT CD_NM FROM TB_COMMON_CODE WHERE CD = #{styleYear} AND CD_GB='G023')
+		        AND G.STYLE_YEAR = #{styleYear}
 		        </if>
 		        <if test="multiStyleYear != null and multiStyleYear != ''">
-		        AND G.STYLE_YEAR IN (SELECT CD_NM 
-		                             FROM TB_COMMON_CODE 
-		                             WHERE CD_GB='G023' 
-		                             AND CD IN 
-		                             <foreach collection="multiStyleYear" item="item" index="index"  open="(" close=")" separator=",">
-		                             #{item}
-		                             </foreach>
-		                             )
+		        AND G.STYLE_YEAR IN 
+		             <foreach collection="multiStyleYear" item="item" index="index"  open="(" close=")" separator=",">
+		             #{item}
+		             </foreach>
 		        </if>
 		        <if test="seasonCd != null and seasonCd != ''">
 		        AND G.SEASON_CD = #{seasonCd}

+ 4 - 3
src/main/java/com/style24/persistence/mybatis/shop/TsaPlan.xml

@@ -776,9 +776,10 @@
 	<select id="getPlanGoodsList" parameterType="Plan" resultType="Plan">
 		/* TsaPlan.getPlanGoodsList */
 		SELECT Q.*
-		    , (CASE WHEN Q.GOODS_TYPE = 'G056_N' THEN (SELECT IFNULL(SUM(CURR_STOCK_QTY - BASE_STOCK_QTY),0) FROM VW_STOCK WHERE GOODS_CD = Q.GOODS_CD) 
-		            ELSE (SELECT IFNULL(SUM(CURR_STOCK_QTY - BASE_STOCK_QTY),0) FROM VW_STOCK_COMPOSE WHERE GOODS_CD = Q.GOODS_CD) 
-		            END) AS STOCK_QTY_SUM
+		   -- , (CASE WHEN Q.GOODS_TYPE = 'G056_N' THEN (SELECT IFNULL(SUM(CURR_STOCK_QTY - BASE_STOCK_QTY),0) FROM VW_STOCK WHERE GOODS_CD = Q.GOODS_CD) 
+		   --         ELSE (SELECT IFNULL(SUM(CURR_STOCK_QTY - BASE_STOCK_QTY),0) FROM VW_STOCK_COMPOSE WHERE GOODS_CD = Q.GOODS_CD) 
+		   --         END) AS STOCK_QTY_SUM
+		    , IFNULL((SELECT STOCK_QTY FROM TB_GOODS_STOCK WHERE GOODS_CD = Q.GOODS_CD),0) AS STOCK_QTY_SUM
 		    , FN_GET_USER_NM(REG_NO) AS REG_NM
 		    , FN_GET_USER_NM(UPD_NO) AS UPD_NM
 		    , (SELECT MAX(SYS_IMG_NM) FROM TB_GOODS_IMG  WHERE GOODS_CD = Q.GOODS_CD AND COLOR_CD = Q.MAIN_COLOR_CD AND DEFAULT_IMG_YN = 'Y' ) AS SYS_IMG_NM

+ 5 - 9
src/main/java/com/style24/persistence/mybatis/shop/TsaStock.xml

@@ -97,17 +97,13 @@
 		            </foreach>
 		        </if>
 		        <if test="styleYear != null and styleYear != ''">
-		        AND G.STYLE_YEAR = (SELECT CD_NM FROM TB_COMMON_CODE WHERE CD = #{styleYear} AND CD_GB='G023')
+		        AND G.STYLE_YEAR = #{styleYear}
 		        </if>
 		        <if test="multiStyleYear != null and multiStyleYear != ''">
-		        AND G.STYLE_YEAR IN (SELECT CD_NM 
-		                             FROM TB_COMMON_CODE 
-		                             WHERE CD_GB='G023' 
-		                             AND CD IN 
-		                             <foreach collection="multiStyleYear" item="item" index="index"  open="(" close=")" separator=",">
-		                             #{item}
-		                             </foreach>
-		                             )
+		        AND G.STYLE_YEAR IN  
+		            <foreach collection="multiStyleYear" item="item" index="index"  open="(" close=")" separator=",">
+		            #{item}
+		            </foreach>
 		        </if>
 		        <if test="seasonCd != null and seasonCd != ''">
 		        AND G.SEASON_CD = #{seasonCd}

+ 2 - 2
src/main/webapp/WEB-INF/views/customer/OneToOneQnaDetailForm.html

@@ -89,8 +89,8 @@
 							</td>
 							<th>첨부 이미지</th>
 							<td class="userImg">
-								<img th:if="${counselInfo.sysFileNm1 != null}" style="height: 100px;" th:src="${@environment.getProperty('domain.image') + '/counsel/' + counselInfo.sysFileNm1}" alt="" onerror='this.src="/image/no.png"'/>
-								<img th:if="${counselInfo.sysFileNm2 != null}" style="height: 100px;" th:src="${@environment.getProperty('domain.image') + '/counsel/' + counselInfo.sysFileNm2}" alt="" onerror='this.src="/image/no.png"'/>
+								<img th:if="${counselInfo.sysFileNm1 != null}" style="height: 100px;" th:src="${@environment.getProperty('domain.image') + '/' + counselInfo.sysFileNm1}" alt="" onerror='this.src="/image/no.png"'/>
+								<img th:if="${counselInfo.sysFileNm2 != null}" style="height: 100px;" th:src="${@environment.getProperty('domain.image') + '/' + counselInfo.sysFileNm2}" alt="" onerror='this.src="/image/no.png"'/>
 							</td>
 						</tr>
 					</tbody>

+ 19 - 5
src/main/webapp/WEB-INF/views/delivery/BanGoodsRegistForm.html

@@ -139,23 +139,35 @@
 
 	$(document).ready(function() {
 		gagaAgGrid.createGrid('gridBanGoodsList', popGridOptions);
+		
+		$('#goodsStat').val('G008_90');
 	});
 
+	
 	// 조회
 	var fnPopSearch = function() {
 
 		var supplyCompcd = $('#bangoodsRegistForm select[name=supplyCompCd]').val();
-		if (gagajf.isNull(supplyCompcd)) {
-			mcxDialog.alert("업체를 선택해주세요!");
+		var searchTxt    = $('#bangoodsRegistForm input[name=searchTxt]').val();
+		
+		
+		if (gagajf.isNull(supplyCompcd) && gagajf.isNull(searchTxt)) {
+			mcxDialog.alert("업체를 선택 또는 상풐코드(상품명)을 입력해주세요!");
 			 $("#bangoodsRegistForm select[name=supplyCompCd]").focus();
 			return;
 		}
 		
 		var formId = '#bangoodsRegistForm';
-		gagaAgGrid.fetch($(formId).prop('action'), popGridOptions, formId);
+		var dd = gagaAgGrid.fetch($(formId).prop('action'), popGridOptions, formId,fnPopCallback);
+	}
+	// 조회 콜백 
+	var fnPopCallback = function(data){
+		var supplyCompcd = $('#bangoodsRegistForm select[name=supplyCompCd]').val();
+ 		if(gagajf.isNull(supplyCompcd)){
+ 			$('#bangoodsRegistForm select[name=supplyCompCd]').val(data[0].supplyCompCd);
+ 			$('#bangoodsRegistForm select[name=supplyCompCd]').trigger('change');
+		} 
 	}
-
-
 	// 저장
  	$('#btnBangoodsSave').on('click', function() {
 
@@ -223,6 +235,8 @@
 
 		cfnCreateCombo(actionUrl2, $('#bangoodsRegistForm select[name=popDelvLocCd]'), "[전체]");
 		
+
+		
 	});
 
 /*]]>*/

+ 9 - 1
src/main/webapp/WEB-INF/views/delivery/DeliveryListForm.html

@@ -334,7 +334,15 @@
 		{headerName: "출고택배사", 	field: "shipCompCd", 	width: 170, cellClass: 'text-center'
 			, valueGetter: function (params) { return gagaAgGrid.lookupValue(shipCompanyList, params.data.shipCompCd); }
 		},
-		{headerName: "배송추적", 		field: "invcTracking", 	width: 80, cellClass: 'text-center'},
+		{headerName: "배송추적", 		field: "invcTracking", 	width: 80, cellClass: 'text-center',
+			cellRenderer: function (params) {
+				if (params.value == "Y") {
+					return "요청";
+				} else {
+					return "미요청";
+				}
+			}
+		},
 		{headerName: "출고송장", 		field: "invoiceNo", 	width: 150, cellClass: 'text-left'},
 		{headerName: "송장등록수정", 	field: "invoiceNo", 	width: 120, cellClass: 'text-center'
 			, cellRenderer : function (params) {

+ 6 - 1
src/main/webapp/WEB-INF/views/display/GoodsDispOrdChangePopupForm.html

@@ -150,7 +150,7 @@
 				html += '<li><span>재고 :</span><em>'+resultList[i].currStockQty+'</em></li>';
 				html += '<li>';
 				html += '<span>전시순서 :</span>';
-				html += '<input type="text" name="dispOrdEdit" value="" />';
+				html += '<input type="text" name="dispOrdEdit" value="'+resultList[i].dispOrd+'" />';
 				html += '<input type="hidden" name="setDispOrd" value="'+resultList[i].dispOrd+'"/>';
 				html += '</li>';
 				html += '</ul>';
@@ -166,6 +166,8 @@
 					$(".item").eq(ind-1).before($(".item").eq(ind));
 					$(".item").eq(ind).find("input[name=setDispOrd]").val(Number($(".item").eq(ind).find("input[name=setDispOrd]").val())+1);
 					$(".item").eq(ind-1).find("input[name=setDispOrd]").val(Number($(".item").eq(ind-1).find("input[name=setDispOrd]").val())-1);
+					$(".item").eq(ind).find("input[name=dispOrdEdit]").val(Number($(".item").eq(ind).find("input[name=dispOrdEdit]").val())+1);
+					$(".item").eq(ind-1).find("input[name=dispOrdEdit]").val(Number($(".item").eq(ind-1).find("input[name=dispOrdEdit]").val())-1);
 				}
 			});
 			$(".fa-arrow-down").off('click');
@@ -175,6 +177,8 @@
 					$(".item").eq(ind+1).after($(".item").eq(ind));
 					$(".item").eq(ind).find("input[name=setDispOrd]").val(Number($(".item").eq(ind).find("input[name=setDispOrd]").val())-1);
 					$(".item").eq(ind+1).find("input[name=setDispOrd]").val(Number($(".item").eq(ind+1).find("input[name=setDispOrd]").val())+1);
+					$(".item").eq(ind).find("input[name=dispOrdEdit]").val(Number($(".item").eq(ind).find("input[name=dispOrdEdit]").val())-1);
+					$(".item").eq(ind+1).find("input[name=dispOrdEdit]").val(Number($(".item").eq(ind+1).find("input[name=dispOrdEdit]").val())+1);
 				}
 			});
 			fnViewInit();
@@ -360,6 +364,7 @@
 					firstOrd = Number(firstOrd);
 				}
 				$(".item").each(function(i){
+					$(this).find("input[name=dispOrdEdit]").val(i+firstOrd);
 					$(this).find("input[name=setDispOrd]").val(i+firstOrd);
 				});
 			}

+ 92 - 41
src/main/webapp/WEB-INF/views/display/MainContentsPopupForm.html

@@ -207,18 +207,18 @@
 				html += '>';
 				html += '	<th>띠배너<br>이미지</th>';
 				html += '	<td><div class="uFile w300">';
-				html += '			<input id="filePop_0" name="file" type="file" class="uFileInput w300" onchange="fnPopFileUpload(this, 0)"/>';
-				html += '			<label for="filePop_0" class="uFileLabel">파일선택</label>';
+				html += '			<input id="filePop_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnGnbFileUpload(this, '+i+', 0)"/>';
+				html += '			<label for="filePop_'+i+'" class="uFileLabel">파일선택</label>';
 				html += '			<input type="hidden" name="imgPath" value="'+result[i].imgPath1+'"/>';
 				html += '			<input type="hidden" name="newImgFile" value="" />';
 				html += '		</div>';
-				html += '	<div id="imgViewPop_0" class=';
+				html += '	<div id="imgViewPop_'+i+'" class=';
 				if(src!=''){
 					html += '"on">';
 				}else{
 					html += '"off">';
 				}
-				html += '		<img id="bannerPreViewUrlPop_0" src="'+src+'" style="height:100px; max-width:500px;"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',$(this).attr(\'src\'));"/>';
+				html += '		<img id="bannerPreViewUrlPop_'+i+'" src="'+src+'" style="height:100px; max-width:500px;"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',$(this).attr(\'src\'));"/>';
 				html += '	</div></td>';
 				html += '</tr>';
 
@@ -240,24 +240,29 @@
 				html += '</tr>';
 
 				html += '<tr name="imgPopRow" id="openBanner1" ';
-				if((result[i].contentsType!='IMG') || result[i].contentsType!='OPEN' && result[i].strVar7!='IMG'){
+				if(result[i].contentsType=='OPEN' && result[i].strVar7=='IMG'){
+					html += '	style="display:table-row;"';
+				}else{
 					html += '	style="display:none;"';
 				}
+				// if((result[i].contentsType!='IMG') || result[i].contentsType!='OPEN' && result[i].strVar7!='IMG'){
+				// 	html += '	style="display:none;"';
+				// }
 				html +='>';
 				html += '	<th>오픈배너<br>이미지</th>';
 				html += '	<td><div class="uFile w300">';
-				html += '			<input id="filePop_1" name="file" type="file" class="uFileInput w300" onchange="fnPopFileUpload(this, 1)"/>';
-				html += '			<label for="filePop_1" class="uFileLabel">파일선택</label>';
+				html += '			<input id="filePop_100'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnGnbFileUpload(this, 100'+i+', 1)"/>';
+				html += '			<label for="filePop_100'+i+'" class="uFileLabel">파일선택</label>';
 				html += '			<input type="hidden" name="imgPath" value="'+result[i].imgPath2+'"/>';
 				html += '			<input type="hidden" name="newImgFile" value="" />';
 				html += '		</div>';
-				html += '	<div id="imgViewPop_1" class=';
+				html += '	<div id="imgViewPop_100'+i+'" class=';
 				if(src!='' && result[i].imgPath2 != ''){
 					html += '"on">';
 				}else{
 					html += '"off">';
 				}
-				html += '		<img id="bannerPreViewUrlPop_1" src="'+src2+'" style="height:100px; max-width:500px;"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',$(this).attr(\'src2\'));"/>';
+				html += '		<img id="bannerPreViewUrlPop_100'+i+'" src="'+src2+'" style="height:100px; max-width:500px;"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',$(this).attr(\'src2\'));"/>';
 				html += '	</div></td>';
 				html += '</tr>';
 
@@ -496,17 +501,24 @@
 			$(obj).closest("table").find("[name=tabBgColorRow"+idx+"]").show();
 			$(obj).closest("table").find("[name=tabShowYnRow"+idx+"]").show();
 			$(obj).closest("table").find("[name=openBannerTypeTr"+idx+"]").show();
-			$(obj).closest("table").find("input:radio[name=openBannerType"+idx+"]:input[value=IMG]").prop('checked',true);
+			console.log($(obj).closest("table").find("input:radio[name=openBannerType"+idx+"]:checked").val());
+			if($(obj).closest("table").find("input:radio[name=openBannerType"+idx+"]:checked").val()=='HTML'){
+				$(obj).closest("table").find("input:radio[name=openBannerType"+idx+"]:input[value=HTML]").prop('checked',true);
+				$(obj).closest("table").find("[id=openBanner2]").show();
+			}else{
+				$(obj).closest("table").find("input:radio[name=openBannerType"+idx+"]:input[value=IMG]").prop('checked',true);
+				$(obj).closest("table").find("[id=openBanner2]").hide();
+			}
 			$(obj).closest("table").find("[id=openBanner0]").show();
 			$(obj).closest("table").find("[id=openBanner1]").show();
-			$(obj).closest("table").find("[id=openBanner2]").hide();
-			$(obj).closest("table").find("[name=file]").closest('div').find('label').text('파일선택');
-			$(obj).closest("table").find("[name=imgPath]").val('');
-			$(obj).closest("table").find("[name=newImgFile]").val('');
-			$("#bannerPreViewUrlPop_0").attr('src', '');
-			$("#imgViewPop_0").removeClass("on").addClass("off");
-			$("#bannerPreViewUrlPop_1").attr('src', '');
-			$("#imgViewPop_1").removeClass("on").addClass("off");
+
+			// $(obj).closest("table").find("[name=file]").closest('div').find('label').text('파일선택');
+			// $(obj).closest("table").find("[name=imgPath]").val('');
+			// $(obj).closest("table").find("[name=newImgFile]").val('');
+			// $("#bannerPreViewUrlPop_0").attr('src', '');
+			// $("#imgViewPop_0").removeClass("on").addClass("off");
+			// $("#bannerPreViewUrlPop_1").attr('src', '');
+			// $("#imgViewPop_1").removeClass("on").addClass("off");
 		}else if(cateType=='IMG'){
 			$(obj).closest("table").find("[name=tabBgColorRow"+idx+"]").show();
 			$(obj).closest("table").find("[name=tabShowYnRow"+idx+"]").hide();
@@ -515,13 +527,13 @@
 			$(obj).closest("table").find("[id=openBanner0]").show();
 			$(obj).closest("table").find("[id=openBanner1]").hide();
 			$(obj).closest("table").find("[id=openBanner2]").hide();
-			$(obj).closest("table").find("[name=file]").closest('div').find('label').text('파일선택');
-			$(obj).closest("table").find("[name=imgPath]").val('');
-			$(obj).closest("table").find("[name=newImgFile]").val('');
-			$("#bannerPreViewUrlPop_0").attr('src', '');
-			$("#imgViewPop_0").removeClass("on").addClass("off");
-			$("#bannerPreViewUrlPop_1").attr('src', '');
-			$("#imgViewPop_1").removeClass("on").addClass("off");
+			// $(obj).closest("table").find("[name=file]").closest('div').find('label').text('파일선택');
+			// $(obj).closest("table").find("[name=imgPath]").val('');
+			// $(obj).closest("table").find("[name=newImgFile]").val('');
+			// $("#bannerPreViewUrlPop_0").attr('src', '');
+			// $("#imgViewPop_0").removeClass("on").addClass("off");
+			// $("#bannerPreViewUrlPop_1").attr('src', '');
+			// $("#imgViewPop_1").removeClass("on").addClass("off");
 		}else if(cateType=='TEXT'){
 			$(obj).closest("table").find("[name=tabBgColorRow"+idx+"]").hide();
 			$(obj).closest("table").find("[name=tabShowYnRow"+idx+"]").hide();
@@ -530,13 +542,19 @@
 			$(obj).closest("table").find("[id=openBanner0]").hide();
 			$(obj).closest("table").find("[id=openBanner1]").hide();
 			$(obj).closest("table").find("[id=openBanner2]").hide();
-			$(obj).closest("table").find("[name=file]").closest('div').find('label').text('파일선택');
-			$(obj).closest("table").find("[name=imgPath]").val('');
-			$(obj).closest("table").find("[name=newImgFile]").val('');
-			$("#bannerPreViewUrlPop_0").attr('src', '');
-			$("#imgViewPop_0").removeClass("on").addClass("off");
-			$("#bannerPreViewUrlPop_1").attr('src', '');
-			$("#imgViewPop_1").removeClass("on").addClass("off");
+			// $(obj).closest("table").find("[name=file]").closest('div').find('label').text('파일선택');
+			// $(obj).closest("table").find("[name=imgPath]").val('');
+			// $(obj).closest("table").find("[name=newImgFile]").val('');
+			// $("#bannerPreViewUrlPop_0").attr('src', '');
+			// $("#imgViewPop_0").removeClass("on").addClass("off");
+			// $("#bannerPreViewUrlPop_1").attr('src', '');
+			// $("#imgViewPop_1").removeClass("on").addClass("off");
+			if($(obj).closest("table").find("[name=title]").length < 1){
+				fnAddTitlePopRow($(obj));
+			}
+			if($(obj).closest("table").find("[name=link]").length < 1){
+				fnAddLinkPopRow($(obj));
+			}
 		}
 	}
 
@@ -669,18 +687,18 @@
 			html += '<tr name="imgPopRow" id="openBanner0">';
 			html += '	<th>띠배너<br>이미지</th>';
 			html += '	<td><div class="uFile w300">';
-			html += '			<input id="filePop_0" name="file" type="file" class="uFileInput w300" onchange="fnPopFileUpload(this, 0)"/>';
-			html += '			<label for="filePop_0" class="uFileLabel">파일선택</label>';
+			html += '			<input id="filePop_'+dataIdx+'" name="file" type="file" class="uFileInput w300" onchange="fnGnbFileUpload(this, '+dataIdx+', 0)"/>';
+			html += '			<label for="filePop_'+dataIdx+'" class="uFileLabel">파일선택</label>';
 			html += '			<input type="hidden" name="imgPath" value=""/>';
 			html += '			<input type="hidden" name="newImgFile" value="" />';
 			html += '		</div>';
-			html += '	<div id="imgViewPop_0" class=';
+			html += '	<div id="imgViewPop_'+dataIdx+'" class=';
 			if(src!=''){
 				html += '"on">';
 			}else{
 				html += '"off">';
 			}
-			html += '		<img id="bannerPreViewUrlPop_0" src="'+src+'" style="height:100px; max-width:500px;"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',$(this).attr(\'src\'));"/>';
+			html += '		<img id="bannerPreViewUrlPop_'+dataIdx+'" src="'+src+'" style="height:100px; max-width:500px;"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',$(this).attr(\'src\'));"/>';
 			html += '	</div></td>';
 			html += '</tr>';
 
@@ -695,18 +713,18 @@
 			html += '<tr name="imgPopRow" id="openBanner1">';
 			html += '	<th>오픈배너<br>이미지</th>';
 			html += '	<td><div class="uFile w300">';
-			html += '			<input id="filePop_1" name="file" type="file" class="uFileInput w300" onchange="fnPopFileUpload(this, 1)"/>';
-			html += '			<label for="filePop_1" class="uFileLabel">파일선택</label>';
+			html += '			<input id="filePop_100'+dataIdx+'" name="file" type="file" class="uFileInput w300" onchange="fnGnbFileUpload(this, 100'+dataIdx+', 1)"/>';
+			html += '			<label for="filePop_100'+dataIdx+'" class="uFileLabel">파일선택</label>';
 			html += '			<input type="hidden" name="imgPath" value=""/>';
 			html += '			<input type="hidden" name="newImgFile" value="" />';
 			html += '		</div>';
-			html += '	<div id="imgViewPop_1" class=';
+			html += '	<div id="imgViewPop_100'+dataIdx+'" class=';
 			if(src!=''){
 				html += '"on">';
 			}else{
 				html += '"off">';
 			}
-			html += '		<img id="bannerPreViewUrlPop_1" src="'+src+'" style="height:100px; max-width:500px;"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',$(this).attr(\'src\'));"/>';
+			html += '		<img id="bannerPreViewUrlPop_100'+dataIdx+'" src="'+src+'" style="height:100px; max-width:500px;"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',$(this).attr(\'src\'));"/>';
 			html += '	</div></td>';
 			html += '</tr>';
 
@@ -803,6 +821,10 @@
 				$("#addMobImg"+dataIdx).click();
 			}
 		}
+		if(contentsLoc=='SGNB002'){
+			$("#addTitle"+dataIdx).click();
+			$("#addLink"+dataIdx).click();
+		}
 
 		if(contentsLoc=='SGNB001'){
 			gagaSn.setContents('#openBannerDesc'+dataIdx, '');
@@ -1078,7 +1100,11 @@
 				strVar5 = $(this).find("input[name=gnbBgColor"+thisIdx+"]").val();
 				strVar6 = $(this).find("input[name=gnbTextColor"+thisIdx+"]").val();
 				strVar8 = $(this).find("input:radio[name=todayYn"+thisIdx+"]:checked").val();
-				strVar7 = $(this).find("input:radio[name=openBannerType"+thisIdx+"]:checked").val();
+				if(contentsType=='OPEN'){
+					strVar7 = $(this).find("input:radio[name=openBannerType"+thisIdx+"]:checked").val();
+				}else{
+					strVar7 = '';
+				}
 				if($(this).find("input:radio[name=openBannerType"+thisIdx+"]:checked").val() == 'HTML'){
 					html = $(this).find("textarea[name=openBannerDesc"+thisIdx+"]").val();
 				}
@@ -1204,6 +1230,31 @@
 		if (typeof(file) == 'undefined'){
 			return;
 		}
+		console.log('ind>>>>'+ind);
+		// 파일 업로드
+		gagajf.ajaxFileUpload('/common/file/upload?subDir=/contents'
+				, file
+				, function(result) {
+					$(obj).closest('div').find('input:hidden[name=newImgFile]').val(result.newFileName);
+					$("#bannerPreViewUrlPop_"+ind).attr('src', $("#uploadDefaultUrlPop").val()+result.newFileName);
+					$("#imgViewPop_"+ind).removeClass("off").addClass("on");
+				}
+				, 'image'
+		);
+	}
+
+	/**
+	 * GNB배너 파일 첨부
+	 */
+	var fnGnbFileUpload = function (obj, ind, num){
+		var file = obj.files[0];
+		file.name = 'test';
+		if (typeof(file) == 'undefined'){
+			return;
+		}
+		var $obj = $(obj);
+		console.log('data-id::'+$("#mcTable"+ind).find('input[name=tableIdx]').val());
+
 		// 파일 업로드
 		gagajf.ajaxFileUpload('/common/file/upload?subDir=/contents'
 				, file

+ 76 - 63
src/main/webapp/WEB-INF/views/display/MainListForm.html

@@ -115,7 +115,8 @@
 								</li>
 								<th:block th:if="${sessionInfo.roleCd == 'G001_0000'}">
 									<li class="right">
-										<span class="cRed">* 레이아웃 저장 버튼 클릭 시 수정 및 삭제 된 레이아웃이 즉시 적용 됩니다.</span>
+										<span class="cRed">* 레이아웃 저장 버튼 클릭 시 수정 및 삭제 된 레이아웃이 즉시 적용 됩니다.</span><br/>
+										<span class="cRed">* 화면 캡처파일 관리는 SUPER관리자, 어드민관리자만 가능합니다.</span>
 									</li>
 								</th:block>
 							</ul>
@@ -252,9 +253,9 @@
 			}
 
 			if(colCnt==1 || colNo==1){
-				html += '<tbody><tr style="height:170px;">';
+				html += '<tbody><tr style="height:170px;">\n';
 			}else if(colNo==tdSize){
-				html += '<tr style="height:170px;">';
+				html += '<tr style="height:170px;">\n';
 			}
 
 			if(colNo>=tdSize){
@@ -275,28 +276,28 @@
 			// if(colCnt>5){
 			// 	maxWidth = parseInt(tdWidth/(Number(colCnt)/tdSize), 10);
 			// }
-			html += '" style="text-align:center; max-width:'+maxWidth+'px;">';
-			html += '<div><span style="font-weight:bold">'+result[i].contentsLoc+'</span></div><div><span>[ '+gagaAgGrid.lookupValue(contentsLocArr, result[i].contentsLoc)+' ]</span></div>';
-			html += '<input type="text" class="w200" name="contentsTitle" placeholder="메인타이틀" value="'+result[i].contentsTitle+'"/>';
-			html += '<br/>';
+			html += '" style="text-align:center; max-width:'+maxWidth+'px;">\n';
+			html += '<div><span style="font-weight:bold">'+result[i].contentsLoc+'</span></div><div><span>[ '+gagaAgGrid.lookupValue(contentsLocArr, result[i].contentsLoc)+' ]</span></div>\n';
+			html += '<input type="text" class="w200" name="contentsTitle" placeholder="메인타이틀" value="'+result[i].contentsTitle+'"/>\n';
+			html += '<br/>\n';
 			if(result[i].contentsYn=='C' || result[i].contentsYn=='A'){
-				html += '<button type="button" class="btn btn-success btn-lg" onclick="fnChangeContents(this);">수정</button>';
-				html += '<button type="button" class="btn btn-default btn-lg" onclick="fnUpdateContents(\''+result[i].contentsLoc+'\');">적용</button>';
+				html += '<button type="button" class="btn btn-success btn-lg" onclick="fnChangeContents(this);">수정</button>\n';
+				html += '<button type="button" class="btn btn-default btn-lg" onclick="fnUpdateContents(\''+result[i].contentsLoc+'\');">적용</button>\n';
 			}else if(result[i].contentsYn=='G'){
 				// if(result[i].contentsYn=='A'){
 				// 	html += '<button type="button" class="btn btn-success btn-lg" onclick="fnChangeContents(this);">수정</button>';
 				// 	html += '<button type="button" class="btn btn-default btn-lg" onclick="fnUpdateContents(\''+result[i].contentsLoc+'\');">적용</button>';
 				// 	html += '<br/>';
 				// }
-					html += '<button type="button" class="btn btn-success btn-lg" onclick="fnSearchCategory(\''+result[i].contentsLoc+'\');">상품관리</button>';
+					html += '<button type="button" class="btn btn-success btn-lg" onclick="fnSearchCategory(\''+result[i].contentsLoc+'\');">상품관리</button>\n';
 			}else{
-				html += '<li>위치설정</li>';
+				html += '<li>위치설정</li>\n';
 			}
-			html += '<input type="hidden" name="contentsLoc" value="'+result[i].contentsLoc+'"/>';
-			html += '<input type="hidden" name="colCnt" value="'+result[i].colCnt+'"/>';
-			html += '<input type="hidden" name="colNo" value="'+result[i].colNo+'"/>';
-			html += '<input type="hidden" name="contentsYn" value="'+result[i].contentsYn+'"/>';
-			html += '</td>';
+			html += '<input type="hidden" name="contentsLoc" value="'+result[i].contentsLoc+'"/>\n';
+			html += '<input type="hidden" name="colCnt" value="'+result[i].colCnt+'"/>\n';
+			html += '<input type="hidden" name="colNo" value="'+result[i].colNo+'"/>\n';
+			html += '<input type="hidden" name="contentsYn" value="'+result[i].contentsYn+'"/>\n';
+			html += '</td>\n';
 
 			if(colNo=='1'){
 				if(result[i].orgFileNm!=null && result[i].orgFileNm!='null' && result[i].orgFileNm!="" ){
@@ -313,45 +314,51 @@
 			}
 			if(tdSize==10){
 				if(colCnt==1 || colNo==colCnt){
-					html += '<td name="imgTd" style="width:300px;">';
-					html += '<div id="imgView_'+i+'" class="'+onOff+'">';
-					html += '<img id="bannerPreViewUrl_'+i+'" src="'+imgSrc+'" style="width:300px; height:120px"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',\''+imgSrc+'\');"/>';
-					html += '</div>';
-					html += '<div class="uFile w300">';
-					html += '<input id="file_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnFileUpload(this, '+i+');"/>';
-					html += '<label for="file_'+i+'" class="uFileLabel">파일선택</label>';
-					html += '<input type="hidden" name="orgFileNm" value="'+orgFileNm+'"/>';
-					html += '<input type="hidden" name="sysFileNm" value="'+sysFileNm+'"/>';
-					html += '<input type="hidden" name="newSysFileNm" value=""/>';
-					html += '</div>';
-					html += '</td>';
-					html += '<td name="deleteTd" style="max-width:50px;">';
+					html += '<td name="imgTd" style="width:300px;">\n';
+					html += '<div id="imgView_'+i+'" class="'+onOff+'">\n';
+					html += '<img id="bannerPreViewUrl_'+i+'" src="'+imgSrc+'" style="width:300px; height:120px"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',\''+imgSrc+'\');"/>\n';
+					html += '</div>\n';
+					// SUPER관리자,어드민관리자만 파일관리 가능
+					if(roleCd=='G001_0000' || roleCd=='G001_A000'){
+						html += '<div class="uFile w300">\n';
+						html += '<input id="file_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnFileUpload(this, '+i+');"/>\n';
+						html += '<label for="file_'+i+'" class="uFileLabel">파일선택</label>\n';
+						html += '<input type="hidden" name="orgFileNm" value="'+orgFileNm+'"/>\n';
+						html += '<input type="hidden" name="sysFileNm" value="'+sysFileNm+'"/>\n';
+						html += '<input type="hidden" name="newSysFileNm" value=""/>\n';
+						html += '</div>\n';
+					}
+					html += '</td>\n';
+					html += '<td name="deleteTd" style="max-width:50px;">\n';
 					if(roleCd=='G001_0000'){
-						html += '<button type="button" class="btn icn" onclick="fnDeleteRow(this);"><i class="fa fa-times" aria-hidden="true"></i></button>';
+						html += '<button type="button" class="btn icn" onclick="fnDeleteRow(this);"><i class="fa fa-times" aria-hidden="true"></i></button>\n';
 					}
-					html += '</td></tr></tbody>';
+					html += '</td></tr></tbody>\n';
 				}
 			}else{
 				if(colNo==(tdSize-1)){
-					html += '<td name="imgTd" rowspan="2" style="width:300px;">';
-					html += '<div id="imgView_'+i+'" class="'+onOff+'">';
-					html += '<img id="bannerPreViewUrl_'+i+'" src="'+imgSrc+'" style="width:300px; height:120px"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',\''+imgSrc+'\');"/>';
-					html += '</div>';
-					html += '<div class="uFile w300">';
-					html += '<input id="file_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnFileUpload(this, '+i+');"/>';
-					html += '<label for="file_'+i+'" class="uFileLabel">파일선택</label>';
-					html += '<input type="hidden" name="orgFileNm" value="'+orgFileNm+'"/>';
-					html += '<input type="hidden" name="sysFileNm" value="'+sysFileNm+'"/>';
-					html += '<input type="hidden" name="newSysFileNm" value=""/>';
-					html += '</div>';
-					html += '</td>';
-					html += '<td name="deleteTd" rowspan="2" style="max-width:50px;">';
+					html += '<td name="imgTd" rowspan="2" style="width:300px;">\n';
+					html += '<div id="imgView_'+i+'" class="'+onOff+'">\n';
+					html += '<img id="bannerPreViewUrl_'+i+'" src="'+imgSrc+'" style="width:300px; height:120px"  onclick="cfnOpenImagePreViewPopup(\'bannerPreimgViewPop\',\''+imgSrc+'\');"/>\n';
+					html += '</div>\n';
+					// SUPER관리자,어드민관리자만 파일관리 가능
+					if(roleCd=='G001_0000' || roleCd=='G001_A000'){
+						html += '<div class="uFile w300">\n';
+						html += '<input id="file_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnFileUpload(this, '+i+');"/>\n';
+						html += '<label for="file_'+i+'" class="uFileLabel">파일선택</label>\n';
+						html += '<input type="hidden" name="orgFileNm" value="'+orgFileNm+'"/>\n';
+						html += '<input type="hidden" name="sysFileNm" value="'+sysFileNm+'"/>\n';
+						html += '<input type="hidden" name="newSysFileNm" value=""/>\n';
+						html += '</div>\n';
+					}
+					html += '</td>\n';
+					html += '<td name="deleteTd" rowspan="2" style="max-width:50px;">\n';
 					if(roleCd=='G001_0000'){
-						html += '<button type="button" class="btn icn" onclick="fnDeleteRow(this);"><i class="fa fa-times" aria-hidden="true"></i></button>';
+						html += '<button type="button" class="btn icn" onclick="fnDeleteRow(this);"><i class="fa fa-times" aria-hidden="true"></i></button>\n';
 					}
-					html += '</td></tr>';
+					html += '</td></tr>\n';
 				}else if(colNo==colCnt){
-					html += '</tr></tbody>';
+					html += '</tr></tbody>\n';
 				}
 			}
 		}
@@ -366,9 +373,9 @@
 	 * 중분류 리스트
 	 */
 	var fnCate2NoCallBack = function (result){
-		var html = '<option value="">[선택]</option>';
+		var html = '<option value="">[선택]</option>\n';
 		for (var i=0; i<result.length; i++){
-			html += '<option value="'+result[i].cateNo+','+result[i].leafYn+'">['+result[i].cateNo+']'+result[i].cateNm+'</option>';
+			html += '<option value="'+result[i].cateNo+','+result[i].leafYn+'">['+result[i].cateNo+']'+result[i].cateNm+'</option>\n';
 		}
 		$("#searchForm select[name=cate2No]").html(html);
 		// grid 높이 조절
@@ -495,13 +502,16 @@
 			if(tdSize==10){
 				if(colCnt==1 || colNo==colCnt){
 					html += '<td name="imgTd" style="width:300px;">';
-					html += '<div class="uFile w300">';
-					html += '<input id="file_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnFileUpload(this, '+i+');"/>';
-					html += '<label for="file_'+i+'" class="uFileLabel">파일선택</label>';
-					html += '<input type="hidden" name="orgFileNm"/>';
-					html += '<input type="hidden" name="sysFileNm"/>';
-					html += '<input type="hidden" name="newSysFileNm"/>';
-					html += '</div>';
+					// SUPER관리자,어드민관리자만 파일관리 가능
+					if(roleCd=='G001_0000' || roleCd=='G001_A000'){
+						html += '<div class="uFile w300">';
+						html += '<input id="file_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnFileUpload(this, '+i+');"/>';
+						html += '<label for="file_'+i+'" class="uFileLabel">파일선택</label>';
+						html += '<input type="hidden" name="orgFileNm"/>';
+						html += '<input type="hidden" name="sysFileNm"/>';
+						html += '<input type="hidden" name="newSysFileNm"/>';
+						html += '</div>';
+					}
 					html += '<div id="imgView_'+i+'" class="off">';
 					html += '<img id="bannerPreViewUrl_'+i+'" src="" style="width:300px; height:120px"/>';
 					html += '</div>';
@@ -515,13 +525,16 @@
 			}else{
 				if(colNo==(tdSize-1)){
 					html += '<td name="imgTd" rowspan="2" style="width:300px;">';
-					html += '<div class="uFile w300">';
-					html += '<input id="file_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnFileUpload(this, '+i+');"/>';
-					html += '<label for="file_'+i+'" class="uFileLabel">파일선택</label>';
-					html += '<input type="hidden" name="orgFileNm"/>';
-					html += '<input type="hidden" name="sysFileNm"/>';
-					html += '<input type="hidden" name="newSysFileNm" value=""/>';
-					html += '</div>';
+					// SUPER관리자,어드민관리자만 파일관리 가능
+					if(roleCd=='G001_0000' || roleCd=='G001_A000'){
+						html += '<div class="uFile w300">';
+						html += '<input id="file_'+i+'" name="file" type="file" class="uFileInput w300" onchange="fnFileUpload(this, '+i+');"/>';
+						html += '<label for="file_'+i+'" class="uFileLabel">파일선택</label>';
+						html += '<input type="hidden" name="orgFileNm"/>';
+						html += '<input type="hidden" name="sysFileNm"/>';
+						html += '<input type="hidden" name="newSysFileNm" value=""/>';
+						html += '</div>';
+					}
 					html += '<div id="imgView_'+i+'" class="off">';
 					html += '<img id="bannerPreViewUrl_'+i+'" src="" style="width:300px; height:120px"/>';
 					html += '</div>';

+ 52 - 27
src/main/webapp/WEB-INF/views/display/MainMultiContentsPopupForm.html

@@ -175,14 +175,22 @@ console.log('brandGroupNo:'+brandGroupNo);
 				}
 			}
 			if(!gagajf.isNull(result[i].contentsGoodsList)){
-				console.log(fnAddGoodsRow(result[i].contentsGoodsList));
+				// console.log(fnAddGoodsRow(result[i].contentsGoodsList));
 				html += fnAddGoodsRow(result[i].contentsGoodsList);
 			}
 			html += '</tbody></table>';
 		}
 		$("#multiPopSortable").append(html);
 		$("#multiPopSortable").sortable();
-		$(".itemWrap").sortable();
+		$(".itemWrap").sortable({
+			stop : function (event, table){
+				$('.tableTest').each(function (i){
+					$('#goodsListTd'+i).find('.goodsClass').each(function (j){
+						$(this).find('input[name=dispOrdEdit]').val(j+1);
+					});
+				});
+			}
+		});
 		$('.schDate').datepicker("destroy");
 		$('.schDate').datepicker({
 			changeMonth: true,
@@ -607,9 +615,10 @@ console.log('brandGroupNo:'+brandGroupNo);
 			var subText2 = '';
 			var subText3 = '';
 			var subText4 = '';
-			var goodsImgArr = [];
+			// var goodsImgArr = [];
 			var goodsCdArr = [];
-			var goodsNmArr = [];
+			// var goodsNmArr = [];
+			var goodsDispOrdArr = [];
 			var i = 1;
 			$(this).find('input[name=planImgPath]').each(function(){
 				eval("imgPath" + i + "='"+$(this).val()+"'");
@@ -642,16 +651,20 @@ console.log('brandGroupNo:'+brandGroupNo);
 				i++;
 			});
 
-			$(this).find('input[name=goodsImgPath]').each(function(){
-				goodsImgArr.push($(this).val());
-			});
+			// $(this).find('input[name=goodsImgPath]').each(function(){
+			// 	goodsImgArr.push($(this).val());
+			// });
 
 			$(this).find('input[name=goodsCd]').each(function(){
 				goodsCdArr.push($(this).val());
 			});
 
-			$(this).find('input[name=goodsNm]').each(function(){
-				goodsNmArr.push($(this).val());
+			// $(this).find('input[name=goodsNm]').each(function(){
+			// 	goodsNmArr.push($(this).val());
+			// });
+
+			$(this).find('input[name=dispOrdEdit]').each(function(){
+				goodsDispOrdArr.push($(this).val());
 			});
 
 			var dispStdt = $(this).find("[name=dispStdt]").val().replace(/[^0-9]/g, '') + "" +$(this).find("[name=stTimeHour]").val().replace('시', '') + "" +$(this).find("[name=stTimeMin]").val().replace('분', '') + "00";
@@ -716,8 +729,9 @@ console.log('brandGroupNo:'+brandGroupNo);
 				, dispOrd : dispOrd
 				, multiContentsYn : 'Y'
 				, goodsCdArr : goodsCdArr
-				, goodsNmArr : goodsNmArr
-				, goodsImgArr : goodsImgArr
+				// , goodsNmArr : goodsNmArr
+				// , goodsImgArr : goodsImgArr
+				, goodsDispOrdArr : goodsDispOrdArr
 			};
 
 			dataArr.push(data);
@@ -789,27 +803,38 @@ console.log('brandGroupNo:'+brandGroupNo);
 		html += '<td colspan="3">';
 		html += '<div class="sortableWrap" data-unit="7" style="overflow-y:scroll;">';
 		html += '<div class="itemWrap" id="goodsListTd'+goodsIdx+'">';
-		if(typeof param!='object'){
+		// if(typeof param!='object'){
 			var imgPath = _goodsUrl;
 			for(let i=0; i<param.length; i++){
-				html += '<ul id="goodsUl'+i+'" class="item ui-state-default goodsClass" style="min-height:140px;"> ';
+				html += '<ul id="goodsUl'+i+'" class="item ui-state-default goodsClass" style="min-height:200px;"> ';
 				html += '<li class="img">';
 				html += '<img src="'+imgPath+ "/" +param[i].sysImgNm+'" onerror="this.src=\'/image/no.png\';"/>';
+				// html += '<div class="btnArea">';
+				// html += '<button type="button" class="icnSm" title="맨위로" onclick="fnUpdownBtn(\''+param[i].goodsCd+'\', \''+param[i].dispOrd+'\', \'up\');"><i class="fa fa-play-circle fa-rotate-270" aria-hidden="true"></i></button>';
+				// html += '<button type="button" class="icnSm" title="위로"><i class="fa fa-arrow-up" aria-hidden="true"></i></button>';
+				// html += '<button type="button" class="icnSm" title="맨아래로" onclick="fnUpdownBtn(\''+param[i].goodsCd+'\', \''+param[i].dispOrd+'\', \'down\');"><i class="fa fa-play-circle fa-rotate-90" aria-hidden="true"></i></button>';
+				// html += '<button type="button" class="icnSm" title="아래로"><i class="fa fa-arrow-down" aria-hidden="true"></i></button>';
+				// html += '</div>';
 				html += '</li>';
 				html += '<li class="cont">';
 				html += '<ul>';
 				html += '<li class="no" name="goodsCdLi"><span>'+param[i].goodsCd+'</span>';
-				html += '<input type="hidden" name="goodsImgPath" value="'+param[i].sysImgNm+'">';
+				// html += '<input type="hidden" name="goodsImgPath" value="'+param[i].sysImgNm+'">';
 				html += '<input type="hidden" name="goodsCd" value="'+param[i].goodsCd+'">';
-				html += '<input type="hidden" name="goodsNm" value="'+param[i].goodsNm+'">';
+				// html += '<input type="hidden" name="goodsNm" value="'+param[i].goodsNm+'">';
 				html += '<span style="margin-left:5px;"><a href="javascript:void(0);" id="delId" onclick="fnRemoveGoods(this,'+i+');">X</a></span>';
 				html += '</li>';
 				html += '</li>';
 				html += '<li class="title">'+param[i].goodsNm+'</li>';
+				html += '<li>';
+				html += '<span>전시순서 :</span>';
+				html += '<input type="text" name="dispOrdEdit" value="'+param[i].contentsDispOrd+'" />';
+				html += '<input type="hidden" name="setDispOrd" value="'+param[i].contentsDispOrd+'"/>';
+				html += '</li>';
 				html += '</ul>';
 				html += '</ul>';
 			}
-		}
+		// }
 		html += '</div>';
 		html += '</div>';
 		html += '</td>';
@@ -848,7 +873,7 @@ console.log('brandGroupNo:'+brandGroupNo);
 			if(i==0){
 				firstOrd = result[i].dispOrd;
 			}
-			html+='<ul id="goodsUl'+i+'" class="item ui-state-default goodsClass" style="min-height:140px;" ';
+			html+='<ul id="goodsUl'+i+'" class="item ui-state-default goodsClass" style="min-height:200px;" ';
 			if(result[i].goodsStat!="G008_90" || result[i].currStockQty<1){
 				html += 'background:#f5f5f5;';
 			}
@@ -863,24 +888,24 @@ console.log('brandGroupNo:'+brandGroupNo);
 			html += '<li class="cont">';
 			html += '<ul>';
 			html += '<li class="no" name="goodsCdLi"><span>'+result[i].goodsCd+'</span>';
-			html += '<input type="hidden" name="goodsImgPath" value="'+result[i].sysImgNm+'">';
+			// html += '<input type="hidden" name="goodsImgPath" value="'+result[i].sysImgNm+'">';
 			html += '<input type="hidden" name="goodsCd" value="'+result[i].goodsCd+'">';
-			html += '<input type="hidden" name="goodsNm" value="'+result[i].goodsNm+'">';
+			// html += '<input type="hidden" name="goodsNm" value="'+result[i].goodsNm+'">';
 			html += '<span style="margin-left:5px;"><a href="javascript:void(0);" id="delId" onclick="fnRemoveGoods(this,'+i+');">X</a></span>';
 			html += '</li>';
 			html += '<li class="title">'+result[i].goodsNm+'</li>';
-			/*html += '<li>';
+			html += '<li>';
 			html += '<span>전시순서 :</span>';
-			html += '<input type="text" name="dispOrdEdit" value="" />';
-			html += '<input type="text" name="setDispOrd" value="'+result[i].dispOrd+'"/>';
-			html += '</li>';*/
+			html += '<input type="text" name="dispOrdEdit" value="'+(i+1)+'" />';
+			html += '<input type="hidden" name="setDispOrd" value="'+(i+1)+'"/>';
+			html += '</li>';
 			html += '</ul>';
 			html += '</li>';
 			html += '</ul>';
 		}
 		$("#"+addRowTd).append(html);
-		$("#"+addRowTd).sortable();
-		/*$("#"+addRowTd).sortable({
+		// $("#"+addRowTd).sortable();
+		$("#"+addRowTd).sortable({
 			stop: function(event, ui) {
 				if(gagajf.isNull(firstOrd)){
 					firstOrd = 1;
@@ -888,10 +913,10 @@ console.log('brandGroupNo:'+brandGroupNo);
 					firstOrd = Number(firstOrd);
 				}
 				$("#"+addRowTd+" .item").each(function(i){
-					$(this).find("input[name=setDispOrd]").val(i+firstOrd);
+					$(this).find("input[name=dispOrdEdit]").val(i+firstOrd);
 				});
 			}
-		});*/
+		});
 		$("#"+addRowTd).disableSelection();
 		uifnPopupClose('popupGoods');
 		fnReloadGoodsListIdx(addRowTd);

+ 1 - 1
src/main/webapp/WEB-INF/views/marketing/MailTemplateDetailForm.html

@@ -831,7 +831,7 @@
 	
 	$(document).ready(function() {
 		// Create a summernote
-		let snOptions = gagaSn.getToolbarOptions();
+		let snOptions = gagaSn.getToolbarOptions('media');
 		gagaSn.createSummernote(snOptions, '#mailContent');
 		
 		gagaAgGrid.createGrid("mtcgGridList1", mtcgGridOptions1);

+ 22 - 24
src/main/webapp/WEB-INF/views/marketing/PlanDetailPopupForm.html

@@ -1027,6 +1027,22 @@
 				arr[idx] = item.basDays;
 			});
 			
+			var dupYn = false;
+			for(let i = 0; i < arr.length; i++) {
+			  const currElem = arr[i];
+			  for(let j = i+1; j < arr.length; j++) {
+			    if(currElem === arr[j]) {
+			      dupYn = true;
+			      break;
+			    }
+			  }
+			}
+			
+			if (dupYn == true) {
+				mcxDialog.alert('혜택적용 일수가 동일합니다.');
+				return;
+			}
+			
 			for(let i = 0; i < attendData.length; i++) {
 
 				if (attendData[i].benefitGb == 'A') {
@@ -1071,38 +1087,20 @@
 				}
 				
 				if (attendData[i].benefitGb == 'A' || attendData[i].benefitGb == 'C') {
-					data = {cpnId : attendData[i].cpnId};
-					var jsonData = JSON.stringify(data);
+					var param = {cpnId : attendData[i].cpnId};
+					var jsonData = JSON.stringify(param);
+					
 					gagajf.ajaxJsonSubmit('marketing/planning/attend/coupon', jsonData, function(result) {
 						if (result.length < 1) {
-							mcxDialog.alert('입력하신 쿠폰 아이디 ' + attendData[i].cpnId.addComma() + '은 유효하지 않습니다.');
-							flag = false;
-							return;
+							mcxDialog.alert('입력하신 쿠폰 ID ' + attendData[i].cpnId.addComma() + '은(는) 유효하지 않습니다.');
+							return false;
 						}
 					});
-					
-					if (flag == false) {
-						return;
-					}
 				}
 			};
 		}
 			
-		var dupYn = false;
-		for(let i = 0; i < arr.length; i++) {
-		  const currElem = arr[i];
-		  for(let j = i+1; j < arr.length; j++) {
-		    if(currElem === arr[j]) {
-		      dupYn = true;
-		      break;
-		    }
-		  }
-		}
-		
-		if (dupYn == true) {
-			mcxDialog.alert('혜택적용 일수가 동일합니다.');
-			return;
-		}
+	
 	 
 	 	gagajf.ajaxFormSubmit('/marketing/poll/list', formId, function(result) {
 				if (result.length < 1) {