|
|
@@ -106,7 +106,7 @@ console.log('brandGroupNo:'+brandGroupNo);
|
|
|
html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddTitlePopRow(this);">타이틀추가</button>';
|
|
|
html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddSubTextPopRow(this);">서브텍스트추가</button>';
|
|
|
}
|
|
|
- html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddGoodsRow(this);">상품추가</button>';
|
|
|
+ html += '<button type="button" class="btn btn-base btn-lg" id="addGoodsBtn'+i+'" onclick="fnAddGoodsRow(this);">상품추가</button>';
|
|
|
html += '<button type="button" class="btn btn-danger btn-lg" onclick="fnDeleteBrandRow(this);">삭제</button></td>';
|
|
|
html += '</tr>';
|
|
|
if(contentsLoc=='SMM009' || contentsLoc=='SMM012'){
|
|
|
@@ -176,7 +176,7 @@ console.log('brandGroupNo:'+brandGroupNo);
|
|
|
}
|
|
|
if(!gagajf.isNull(result[i].contentsGoodsList)){
|
|
|
// console.log(fnAddGoodsRow(result[i].contentsGoodsList));
|
|
|
- html += fnAddGoodsRow(result[i].contentsGoodsList);
|
|
|
+ html += fnAddGoodsRow(result[i].contentsGoodsList , i);
|
|
|
}
|
|
|
html += '</tbody></table>';
|
|
|
}
|
|
|
@@ -277,7 +277,7 @@ console.log('brandGroupNo:'+brandGroupNo);
|
|
|
html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddTitlePopRow(this);">타이틀추가</button>';
|
|
|
html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddSubTextPopRow(this);">서브텍스트추가</button>';
|
|
|
}
|
|
|
- html += '<button type="button" class="btn btn-base btn-lg" onclick="fnAddGoodsRow(this);">상품추가</button>';
|
|
|
+ html += '<button type="button" class="btn btn-base btn-lg" id="addGoodsBtn'+brandIdx+'" onclick="fnAddGoodsRow(this);">상품추가</button>';
|
|
|
html += '<button type="button" class="btn btn-danger btn-lg" onclick="fnDeleteBrandRow(this);">삭제</button></td>';
|
|
|
html += '</tr>';
|
|
|
if(contentsLoc=='SMM009' || contentsLoc=='SMM012'){
|
|
|
@@ -350,6 +350,11 @@ console.log('brandGroupNo:'+brandGroupNo);
|
|
|
changeYear: true,
|
|
|
defaultDate: $('.schDate').val()
|
|
|
});
|
|
|
+ if(contentsLoc == 'SBM007' || contentsLoc == 'SBM008' || contentsLoc == 'SBM009' || contentsLoc == 'SMM003' || contentsLoc == 'SMM007' || contentsLoc == 'SMM009'
|
|
|
+ || contentsLoc == 'SCM002' || contentsLoc == 'SCM003' || contentsLoc == 'SOM003'){
|
|
|
+ $("#addGoodsBtn"+brandIdx).click();
|
|
|
+ }
|
|
|
+
|
|
|
fnReloadIdx();
|
|
|
|
|
|
tableLen = tableLen+1;
|
|
|
@@ -360,6 +365,15 @@ console.log('brandGroupNo:'+brandGroupNo);
|
|
|
// $(this).attr('id','tabTable'+i);
|
|
|
$(this).find("input[name=dispOrd]").val(i+1);
|
|
|
//console.log($(this).attr('id'));
|
|
|
+ // if(contentsLoc == 'SBM007' || contentsLoc == 'SBM008' || contentsLoc == 'SBM009' || contentsLoc == 'SMM003' || contentsLoc == 'SMM007' || contentsLoc == 'SMM009'
|
|
|
+ // || contentsLoc == 'SCM002' || contentsLoc == 'SCM003' || contentsLoc == 'SOM003'){
|
|
|
+ // var tableIdx = $(this).find('input[name=tableIdx]').val();
|
|
|
+ // if(gagajf.isNull(tableIdx)){
|
|
|
+ // tableIdx = 0;
|
|
|
+ // }
|
|
|
+ // goodsIdx = tableIdx;
|
|
|
+ // console.log('tableIdx>>>'+tableIdx);
|
|
|
+ // }
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@@ -616,7 +630,8 @@ console.log('brandGroupNo:'+brandGroupNo);
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- if(contentsLoc=='SMM003'){
|
|
|
+ if(contentsLoc == 'SBM007' || contentsLoc == 'SBM008' || contentsLoc == 'SBM009' || contentsLoc == 'SMM003' || contentsLoc == 'SMM007' || contentsLoc == 'SMM009'
|
|
|
+ || contentsLoc == 'SCM002' || contentsLoc == 'SCM003' || contentsLoc == 'SOM003'){
|
|
|
if(!goodsArrValidation()){
|
|
|
return false;
|
|
|
}
|
|
|
@@ -867,7 +882,10 @@ console.log('brandGroupNo:'+brandGroupNo);
|
|
|
* 상품추가
|
|
|
*/
|
|
|
var goodsIdx = 0;
|
|
|
- var fnAddGoodsRow = function (param){
|
|
|
+ var fnAddGoodsRow = function (param , tableIndex){
|
|
|
+ if(!gagajf.isNull(tableIndex)){
|
|
|
+ goodsIdx = tableIndex;
|
|
|
+ }
|
|
|
var addRow = "goodsListTd"+goodsIdx;
|
|
|
|
|
|
var html = '<tr name="goodsRow">';
|