|
|
@@ -182,7 +182,15 @@ console.log('brandGroupNo:'+brandGroupNo);
|
|
|
}
|
|
|
$("#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);
|
|
|
@@ -792,20 +806,31 @@ console.log('brandGroupNo:'+brandGroupNo);
|
|
|
// 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>';
|
|
|
}
|
|
|
@@ -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);
|