|
|
@@ -689,7 +689,7 @@
|
|
|
<span class="title">옵션선택</span>
|
|
|
<div class="check_excluding form_field">
|
|
|
<div>
|
|
|
- <input id="soldoutSkipYn" name="soldoutSkipYn" type="checkbox" value="Y" th:onclick="fnOption1(this,[[${goodsInfo.goodsCd}]],[[${goodsInfo.selfGoodsYn}]]);"><label for="soldoutSkipYn"><span>품절제외</span> </label>
|
|
|
+ <input id="soldoutSkipYn" name="soldoutSkipYn" type="checkbox" value="Y" th:onclick="fnOption1(this,[[${goodsInfo.goodsCd}]]);"><label for="soldoutSkipYn"><span>품절제외</span> </label>
|
|
|
</div>
|
|
|
<div class="guidance" >
|
|
|
<!--210409_ 추가 : .guidance에 .ontoast 추가 시, toast 팝업 작동 -->
|
|
|
@@ -1105,7 +1105,7 @@
|
|
|
}
|
|
|
|
|
|
// 옵션1 조회
|
|
|
- var fnOption1 = function(ridx,goodsCd, selfGoodsYn){
|
|
|
+ var fnOption1 = function(ridx,goodsCd){
|
|
|
|
|
|
// 품절제외 여부
|
|
|
let optionSoldoutSkip = $('.pop_option_select').find('input[name=soldoutSkipYn]').is(":checked") ? 'Y' : 'N';
|
|
|
@@ -1160,8 +1160,8 @@
|
|
|
selfGoodsYn = item.selfGoodsYn;
|
|
|
}
|
|
|
let soldoutYn = "";
|
|
|
- if ("G008_90" != item.goodsStat || item.stockQty <= 0) soldoutYn = "true";
|
|
|
- tag += '<li aria-disabled="'+soldoutYn+'" data-soldout="'+soldoutYn +'" onclick="fnOption2('+ (idx+1)+', \''+ item.goodsCd+'\' , \''+ item.optCd1+'\', \''+ item.minOrdQty+'\', \''+ item.maxOrdQty+'\' )">\n';
|
|
|
+ if ("G008_90" != item.goodsStat || item.stockQty <= 0 || item.goodsStat != 'G008_90') soldoutYn = "true";
|
|
|
+ tag += '<li aria-disabled="'+soldoutYn+'" data-soldout="'+soldoutYn +'" onclick="fnOption2('+ ridx+', \''+ item.goodsCd+'\' , \''+ item.optCd1+'\', \''+ item.minOrdQty+'\', \''+ item.maxOrdQty+'\' )">\n';
|
|
|
tag += '<div>' +item.optCd1 +'</div>';
|
|
|
tag += '<input type="hidden" name="opt" value="'+ item.goodsCd+'" optCd1="'+ item.optCd1 +'" qty="'+ item.qty +'" />\n';
|
|
|
tag += '</li>\n';
|
|
|
@@ -1194,14 +1194,24 @@
|
|
|
if (selfGoodsYn == "Y"){
|
|
|
if (ridx == 1){
|
|
|
var opt_selecter01_1 = new sCombo('.pop_option_select .select_custom.item_opt1.item_opt1_1');
|
|
|
+ $('.pop_option_select .select_custom.item_opt2.item_opt2_1 .combo .list > li').eq(0).trigger("click");
|
|
|
+ $('.pop_option_select .select_custom.item_opt2.item_opt2_1').attr('disabled',true)
|
|
|
}else if (ridx == 2){
|
|
|
- var opt_selecter01_2 = new sCombo('.pop_option_select .select_custom.item_opt1.item_opt1_2');
|
|
|
+ var opt_selecter01_2 = new sCombo('.pop_option_select .select_custom.item_opt1.item_opt1_2');
|
|
|
+ $('.pop_option_select .select_custom.item_opt2.item_opt2_2 .combo .list > li').eq(0).trigger("click");
|
|
|
+ $('.pop_option_select .select_custom.item_opt2.item_opt2_2').attr('disabled',true)
|
|
|
}else if (ridx == 3){
|
|
|
var opt_selecter01_3 = new sCombo('.pop_option_select .select_custom.item_opt1.item_opt1_3');
|
|
|
+ $('.pop_option_select .select_custom.item_opt2.item_opt2_3 .combo .list > li').eq(0).trigger("click");
|
|
|
+ $('.pop_option_select .select_custom.item_opt2.item_opt2_3').attr('disabled',true)
|
|
|
}else if (ridx == 4){
|
|
|
var opt_selecter01_4 = new sCombo('.pop_option_select .select_custom.item_opt1.item_opt1_4');
|
|
|
+ $('.pop_option_select .select_custom.item_opt2.item_opt2_4 .combo .list > li').eq(0).trigger("click");
|
|
|
+ $('.pop_option_select .select_custom.item_opt2.item_opt2_4').attr('disabled',true)
|
|
|
}else{
|
|
|
var opt_selecter01_5 = new sCombo('.pop_option_select .select_custom.item_opt1.item_opt1_5');
|
|
|
+ $('.pop_option_select .select_custom.item_opt2.item_opt2_4 .combo .list > li').eq(0).trigger("click");
|
|
|
+ $('.pop_option_select .select_custom.item_opt2.item_opt2_4').attr('disabled',true)
|
|
|
}
|
|
|
|
|
|
}else{
|
|
|
@@ -1220,10 +1230,9 @@
|
|
|
|
|
|
// 옵션2 조회
|
|
|
var fnOption2 = function(ridx, goodsCd, optCd1, minOrdQty, maxOrdQty){
|
|
|
-
|
|
|
// 품절제외 여부
|
|
|
let optionSoldoutSkip = $('.pop_option_select').find('input[name=soldoutSkipYn]').is(":checked") ? 'Y' : 'N';
|
|
|
-
|
|
|
+
|
|
|
let selfGoodsYn = $("#cartForm input[name=selfGoodsYn]").val();
|
|
|
let data = {goodsCd : goodsCd
|
|
|
,optCd1 : optCd1
|
|
|
@@ -1231,7 +1240,7 @@
|
|
|
,mastrGoodsCd : $('#cartFprm input[name=goodsCd]').val()
|
|
|
};
|
|
|
let jsonData = JSON.stringify(data);
|
|
|
-
|
|
|
+
|
|
|
gagajf.ajaxJsonSubmit('/goods/detail/option2/list', jsonData, function(result) {
|
|
|
|
|
|
if (result.dataList != null && result.dataList.length > 0) {
|
|
|
@@ -1254,6 +1263,7 @@
|
|
|
}else{
|
|
|
$obj = $('.pop_option_select .select_custom.item_opt2.item_opt2_1');
|
|
|
}
|
|
|
+
|
|
|
let qty = $obj.parent().parent().find('.select_custom').attr('qty'); // 구성수량
|
|
|
|
|
|
$.each(result.dataList, function(idx, item) {
|
|
|
@@ -1300,7 +1310,7 @@
|
|
|
if (ridx == 1){
|
|
|
var opt_selecter02_1 = new sCombo('.pop_option_select .select_custom.item_opt2.item_opt2_1');
|
|
|
}else if (ridx == 2){
|
|
|
- var opt_selecter02_2 = new sCombo('.pop_option_select .select_custom.item_opt2.item_opt2_2');
|
|
|
+ var opt_selecter02_2 = new sCombo('.pop_option_select .select_custom.item_opt2.item_opt2_2');
|
|
|
}else if (ridx == 3){
|
|
|
var opt_selecter02_3 = new sCombo('.pop_option_select .select_custom.item_opt2.item_opt2_3');
|
|
|
}else if (ridx == 4){
|
|
|
@@ -1315,7 +1325,6 @@
|
|
|
}
|
|
|
|
|
|
});
|
|
|
-
|
|
|
}
|
|
|
|
|
|
// 수량 변경 클릭
|