|
|
@@ -138,6 +138,9 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if(!gagajf.isNull(result[i].goodsArr)){
|
|
|
+ html += fnAddGoodsRow(result[i].goodsArr);
|
|
|
+ }
|
|
|
html += '</tbody></table>';
|
|
|
}
|
|
|
$("#multiPopSortable").append(html);
|
|
|
@@ -285,6 +288,7 @@
|
|
|
var fnReloadIdx = function (){
|
|
|
$(".tableTest").each(function(i){
|
|
|
$(this).attr('id','tabTable'+i);
|
|
|
+ $(this).find("input[name=dispOrd]").val(i+1);
|
|
|
//console.log($(this).attr('id'));
|
|
|
});
|
|
|
}
|
|
|
@@ -612,11 +616,12 @@
|
|
|
var goodsIdx = 0;
|
|
|
var fnAddGoodsRow = function (param){
|
|
|
var addRow = "goodsListTd"+goodsIdx;
|
|
|
- //console.log('addRowTd::'+addRowTd);
|
|
|
- console.log('addRow::'+addRow);
|
|
|
+ //console.log('addRow::'+addRow);
|
|
|
+
|
|
|
var html = '<tr name="goodsRow">';
|
|
|
html += '<th>상품추가<br><button type="button" class="btn btn-base btn-lg" onclick="fnDeleteTrRow(this);">삭제</button>';
|
|
|
html += '<br><button type="button" class="btn btn-base btn-lg" onclick="fnSearchGoods(\''+addRow+'\');">상품조회</button>';
|
|
|
+ html += '<input type="hidden" name="goodsArrTest" id="goodsArrTest" value="'+goodsArr+'">';
|
|
|
html += '</th>';
|
|
|
html += '<td colspan="3">';
|
|
|
//html += '<table style="border-style: solid;border-color: #ac2925; width:100%; height:20px;">';
|
|
|
@@ -628,6 +633,20 @@
|
|
|
//html += '<thead>';
|
|
|
html += '<div class="sortableWrap" data-unit="7" style="overflow-y:scroll;">';
|
|
|
html += '<div class="itemWrap" id="goodsListTd'+goodsIdx+'">';
|
|
|
+ if(typeof param!='object'){
|
|
|
+ var goodsArr = [];
|
|
|
+ goodsArr = param;
|
|
|
+ // 여기서 부터 시작! 상품불러오는거 똑같이 html 추가해서 체크
|
|
|
+ // +) 저장할때 TMP_CONTENTS_GOODS 에 상품코드, 상품명, 상품이미지경로 추가해서 3개다 불러와서 데이터 뿌릴수 있게
|
|
|
+ $.each(goodsArr.split(','), function(i){
|
|
|
+ console.log(i+':::>>>>>>>>>>>>>'+goodsArr.split(',')[i]);
|
|
|
+ goodsCd = goodsArr.split(',')[i];
|
|
|
+ html += '<ul id="goodsUl'+i+'" class="item ui-state-default goodsClass" style="min-height:130px;" ';
|
|
|
+ html += '">';
|
|
|
+ html += '<li class="no" name="goodsCdLi"><span>'+goodsCd+'</span></li>';
|
|
|
+ html += '</ul>';
|
|
|
+ });
|
|
|
+ }
|
|
|
html += '</div>';
|
|
|
html += '</div>';
|
|
|
//html += '</thead>';
|
|
|
@@ -641,13 +660,51 @@
|
|
|
}
|
|
|
goodsIdx++;
|
|
|
$(param).closest("table").find("tbody").append(html);
|
|
|
+
|
|
|
}else{
|
|
|
goodsIdx++;
|
|
|
return html;
|
|
|
}
|
|
|
+
|
|
|
fnReloadIdx();
|
|
|
}
|
|
|
|
|
|
+ var fnShowGoodsList = function (obj){
|
|
|
+ console.log('18181818');
|
|
|
+ var tableNm = obj;
|
|
|
+ var goodsCd1 = $("#"+tableNm).find("input[name=goodsArrTest]").val();
|
|
|
+ console.log('goodsCd1>>>'+goodsCd1);
|
|
|
+ //$("#"+tableNm);
|
|
|
+ var goodsCd = '';
|
|
|
+ $.each(goodsCd1.split(','), function(i){
|
|
|
+ console.log(i+':::>>>>>>>>>>>>>'+goodsCd1.split(',')[i]);
|
|
|
+ goodsCd = goodsCd1.split(',')[i];
|
|
|
+ html += '<ul id="goodsUl'+i+'" class="item ui-state-default goodsClass" style="min-height:130px;" ';
|
|
|
+ html += '">';
|
|
|
+ html += '<li class="no" name="goodsCdLi"><span>'+goodsCd+'</span></li>>';
|
|
|
+ html += '</ul>';
|
|
|
+ $("#goodsListTd0").append(html);
|
|
|
+ i++;
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ var fnShowGoodsList2 = function (param){
|
|
|
+ console.log('goodsArr>>>'+param);
|
|
|
+ var html = '';
|
|
|
+ var goodsCd = '';
|
|
|
+ $.each(param.split(','), function(i){
|
|
|
+ console.log(i+':::>>>>>>>>>>>>>'+param.split(',')[i]);
|
|
|
+ goodsCd = param.split(',')[i];
|
|
|
+ html += '<ul id="goodsUl'+i+'" class="item ui-state-default goodsClass" style="min-height:130px;" ';
|
|
|
+ html += '">';
|
|
|
+ html += '<li class="no" name="goodsCdLi"><span>'+goodsCd+'</span></li>>';
|
|
|
+ html += '</ul>';
|
|
|
+ $("#goodsListTd0").append(html);
|
|
|
+ i++;
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 상품조회
|
|
|
*/
|
|
|
@@ -736,7 +793,7 @@
|
|
|
}
|
|
|
$("#multiPopSortable").sortable({
|
|
|
stop: function(event, ui) {
|
|
|
- //fnReloadIdx();
|
|
|
+ fnReloadIdx();
|
|
|
}
|
|
|
});
|
|
|
$("#multiPopSortable").disableSelection();
|