' + featuresHtml; $("#featuresTh").after(featuresHtml); } else { featuresHtml = '
' + makerHtml; $("#manufactureName").after(makerHtml); } else { makerHtml = '
' + makerHtml; var tmpMakerHtml = $("#makerItemName2").html(); $("#makerItemName2").html(tmpMakerHtml + makerHtml); } var pordCdFormalArticle = '
' + detailList[i].formalArticle; if (null == detailList[i].pordCd || "" == detailList[i].pordCd) { pordCdFormalArticle = "-" + pordCdFormalArticle; } else if (8 === detailList[i].pordCd.length) { pordCdFormalArticle = detailList[i].pordCd.substring(0, 4) + "-" + detailList[i].pordCd.substring(4, 8) + pordCdFormalArticle; } else { pordCdFormalArticle = detailList[i].pordCd.substring(0, 3) + "-" + detailList[i].pordCd.substring(3, 7) + pordCdFormalArticle; } if(i === 0){ var pordHtml = '
' + pordCdFormalArticle + '
'; $("#pordCdFormalArticleTh").after(pordHtml); }else{ var pordHtml = '
' + pordCdFormalArticle + '
'; var tmpPordHtml = $("#pordCdFormalArticleSlide").html(); $("#pordCdFormalArticleSlide").html(tmpPordHtml + pordHtml); } var obPrice = detailList[i].orangebookPrc;if ("1" === detailList[i].orangebookPrcFlg) { obPrice = '¥' + Number(obPrice).toLocaleString();}if (i === 0) { $("#obPrice1").html(obPrice); } else { var obPriceHtml = '
' + obPrice + '
'; var tmpObPriceHtml = $("#obPrice2").html(); $("#obPrice2").html(tmpObPriceHtml + obPriceHtml);} var orderUnit = detailList[i].minAordQty + detailList[i].minAordUnitName; if (i === 0) { $("#orderUnit1").html(orderUnit); } else { var orderUnitHtml = '
' + orderUnit + '
'; var tmpOrderUnitHtml = $("#orderUnit2").html(); $("#orderUnit2").html(tmpOrderUnitHtml + orderUnitHtml); } var zaikoBorder = "border01"; if (0 === detailList[i].objSimilarItemSpecList.length) { zaikoBorder = "border02"; $("#zaikoth").removeClass("border01"); $("#zaikoth").addClass("border02"); } var zaikoHtml = ''; if (i === 0) { zaikoHtml = '
'; } else { zaikoHtml += '
'; } zaikoHtml += '
'; if ("1" === detailList[i].stckOrderKbn) { var zenkokuZaiko = detailList[i].nationalStockCnt + detailList[i].baseQtyUnitName; if (detailList[i].nationalStockCnt === 0) { zenkokuZaiko = '-'; } zaikoHtml += '
全国在庫数:' + zenkokuZaiko + 'Stock Qty
'; zaikoHtml += '
'; zaikoHtml += '
'; } else { zaikoHtml += '
メーカー取寄品です
'; zaikoHtml += '
'; zaikoHtml += '
';} if (i === 0) { $("#zaikoth").after(zaikoHtml); } else { var tmpZaikoHtml = $("#zaikoSlide").html(); $("#zaikoSlide").html(tmpZaikoHtml + zaikoHtml); } var kikakuValueHtml = ''; var kikakuValueSlideHtml = ''; var borderClass = "border01"; for (let j = 0; j < detailList[i].objSimilarItemSpecList.length; j++) { if (j === (detailList[i].objSimilarItemSpecList.length - 1)) { borderClass = "border02"; } if (i === 0) { //$("#kikakuTh" + j).after('
' + detailList[i].objSimilarItemSpecList[j].specValue + '
'); $("#kikakuTh" + j).after('
' + detailList[i].objSimilarItemSpecList[j].specValue + '
'); } else { //kikakuValueSlideHtml = '
' + detailList[i].objSimilarItemSpecList[j].specValue + '
'; kikakuValueSlideHtml = '
' + detailList[i].objSimilarItemSpecList[j].specValue + '
'; $(kikakuValueSlideHtml).appendTo($("#kikakuSlide" + j)); } } } // レコメンドパーツの表示設定$("#similarSection").css('display', 'block'); var idResearchUrl = $("#reSearch").children().attr("href") + "&callTimeShortageFlg=" + param2; $("#reSearch").children().attr("href",idResearchUrl); $("#reSearch").children().attr("data-url",idResearchUrl); setBalloonDisp(); setOptionDisp(); var setRecommendTrackingFunc = function(json) { var messageId = json.resultMap.OB3130S200.messageId; var statusCd = json.resultMap.OB3130S200.statusCd; if( statusCd !== 0 || json.OB3130S200 === null ){ $("[data-name='messageIdSim']").html("
"); $("[data-name='messageIdSim']").css('display', 'none'); } } // var setRecommendTrackingReq = '{"langCd":"ja"'; setRecommendTrackingReq += ',"ob3130S200Param":{"callerFuncId":"OB1080S150"'; setRecommendTrackingReq += ',"callingArticleCd":"UBN12X050 6559"'; setRecommendTrackingReq += ',"similarItemRecommendDispSku":"' + (detailList.length - 1) + '"'; setRecommendTrackingReq += '}}'; $(function() { CallFacadeService(setRecommendTrackingReq, '/ja/f/rest/OBFacadeWebService', setRecommendTrackingFunc); }); };var callGetSimilarItemRecommendReq = '{"langCd":"ja"';callGetSimilarItemRecommendReq += ',"ob3130S030Param":{"callerFuncId":"OB1080S150"';callGetSimilarItemRecommendReq += ',"similarItemRecommendInqKbn":"1"';callGetSimilarItemRecommendReq += ',"siteId":"ob"';callGetSimilarItemRecommendReq += ',"callerItemList":[';callGetSimilarItemRecommendReq += '{"objSimilarItemRecommendNo":"0","callerArticleCd":"UBN12X050 6559"}';callGetSimilarItemRecommendReq += ']}}';$(function() {CallFacadeService(callGetSimilarItemRecommendReq, '/ja/f/rest/OBFacadeWebService', getSimilarItemRecommendFunc);});});$(window).on('load scroll resize', function() {if ($('#tbl_s').offset() == undefined) {return;} var pos = $(this).scrollTop(); var win_h = $(window).height(); var btn_h = 27; var tbl_h = 0; var tbl_s = $('#tbl_s').offset().top; var tbl_e = $('#tbl_e').offset().top; var btn_pos = 0; if (tbl_s > pos + win_h) { } else { tbl_h = win_h - (tbl_s - pos); if (tbl_h >= btn_h) { if (tbl_s > pos) { btn_pos = tbl_h / 2 - (btn_h / 2); } else if (tbl_e > pos + win_h) { btn_pos = (pos - tbl_s) + (win_h / 2 - btn_h); tbl_h = win_h; } else { tbl_h = tbl_e - pos; if (tbl_h >= btn_h) { btn_pos = (pos - tbl_s) + ((tbl_e - pos) / 2 - (btn_h / 2)); } else { btn_pos = (pos - tbl_s) + (tbl_e - pos) - btn_h; } } } $(".k-slide--04 .slick-arrow").css('top', btn_pos); }});function makeImageUrl(selectItemCd) {var url = "";var encodedItemCd = encodeURIComponent(selectItemCd).replace(/%20/g, '+');//リクエストパラメータ.類似品一覧フラグ = '1'の場合 if("0" == '1'){ url += "/ja/f/view/OB1130S02001.xhtml"; url += "?detailNo=" + ""; url += "&articleCd=" + encodedItemCd; url += "&vstOfficeCd1=" + ""; url += "&vstOfficeCd2=" + ""; url += "&vstOfficeCd3=" + ""; url += "&vstOfficeCd4=" + ""; url += "&vstOfficeCd5=" + ""; url += "&vstOffice1=" + ""; url += "&vstOffice2=" + ""; url += "&vstOffice3=" + ""; url += "&vstOffice4=" + ""; url += "&vstOffice5=" + ""; url += "&zipNo=" + ""; url += "&address=" + ""; url += "&prefCd=" + ""; url += "&pref=" + ""; url += "&fromEvent=returnd"; }else{ url += "/ja/c/products/index.html" + "?itemCd=" + encodedItemCd; } return url;}var addToCartSim = function(selectItemCd, callTimeShortageFlg, callingArticlePrc, selectSimilarItemPrc, selectSimilarItemDisplayOrder, cartKbn) {var quantityId = "basketNumTxt" + (selectSimilarItemDisplayOrder + 1);var quantity = $("#" + quantityId).val();var checkResult = cartNumCheckCommon(quantityId, quantity);if (checkResult) {var addToCartSimFunc = function(json){var statusCd = json.resultMap.OB3110S290.statusCd; var message = json.resultMap.OB3110S290.message; $("[data-name='addsb_balloon_text_sim_" + (selectSimilarItemDisplayOrder + 1) + "']").html(message);if(statusCd != 0){var messageId = json.resultMap.OB3110S290.messageId;$("[data-name='messageIdSim']").html("
");$("[data-name='messageIdSim']").css('display', 'none');return false; } else{$(window).trigger("_notify_count_changed"); } setCartInTracking(selectItemCd, callTimeShortageFlg, callingArticlePrc, selectSimilarItemPrc, selectSimilarItemDisplayOrder, cartKbn); } var addToCartSimReq = '{"langCd":"ja", '; addToCartSimReq += '\"ob3110S290Param\":{'; addToCartSimReq += '"callerFuncId": "OB1080S150", '; addToCartSimReq += '"itemList":[{"articleCd":"' + selectItemCd + '", "amount":' + quantity + '}]}}'; CallFacadeService(addToCartSimReq, '/ja/f/rest/OBFacadeWebService', addToCartSimFunc); $("[data-name='addsb_balloon_sim_" + (selectSimilarItemDisplayOrder + 1) + "']").css('display', 'block');} else {$("[data-name='addsb_balloon_sim_" + (selectSimilarItemDisplayOrder + 1) + "']").css('display', 'none');return false;}}var addToEstimateSim = function(selectItemCd, callTimeShortageFlg, callingArticlePrc, selectSimilarItemPrc, selectSimilarItemDisplayOrder, cartKbn) {var quantityId = "basketNumTxt" + (selectSimilarItemDisplayOrder + 1);var quantity = $("#" + quantityId).val();var checkResult = cartNumCheckCommon(quantityId, quantity);if (checkResult) {var addToEstimateSimFunc = function(json){var statusCd = json.resultMap.OB3110S300.statusCd; var message = json.resultMap.OB3110S300.message; $("[data-name='addeb_balloon_text_sim_" + (selectSimilarItemDisplayOrder + 1) + "']").html(message);if(statusCd != 0){var messageId = json.resultMap.OB3110S300.messageId;$("[data-name='messageIdSim']").html("
");$("[data-name='messageIdSim']").css('display', 'none');return false; } else{$(window).trigger("_notify_count_changed"); } setCartInTracking(selectItemCd, callTimeShortageFlg, callingArticlePrc, selectSimilarItemPrc, selectSimilarItemDisplayOrder, cartKbn); } var addToEstimateSimReq = '{"langCd":"ja", '; addToEstimateSimReq += '\"ob3110S300Param\":{'; addToEstimateSimReq += '"callerFuncId": "OB1080S150", '; addToEstimateSimReq += '"itemList":[{"articleCd":"' + selectItemCd + '", "amount":' + quantity + '}]}}'; CallFacadeService(addToEstimateSimReq, '/ja/f/rest/OBFacadeWebService', addToEstimateSimFunc); $("[data-name='addeb_balloon_sim_" + (selectSimilarItemDisplayOrder + 1) + "']").css('display', 'block');} else {$("[data-name='addeb_balloon_sim_" + (selectSimilarItemDisplayOrder + 1) + "']").css('display', 'none');return false;}}var cartNumCheckCommon = function(quantityId, quantity) {var checkResult = true;var inputErrMsg = cartNumCheckSimilar(quantity, '数量は半角整数で入力して下さい。', '数量は1以上の値を入力して下さい。', '数量を整数で入力して下さい。');if (null !== inputErrMsg) {checkResult = false;var errHtml = '';errHtml += ' ' + inputErrMsg + '
");$("[data-name='messageIdSim']").css('display', 'none'); } } var setSelectTrackingReq = '{"langCd":"ja", '; setSelectTrackingReq += '\"ob3130S210Param\":{'; setSelectTrackingReq += '"callerFuncId": "OB1080S150", '; setSelectTrackingReq += '"callingArticleCd": "UBN12X050 6559", '; setSelectTrackingReq += '"selectSimilarItemArticleCd": "' + param1 + '", '; setSelectTrackingReq += '"callTimeShortageFlg": "' + param2 + '", '; setSelectTrackingReq += '"callingArticlePrc": "' + param3 + '", '; setSelectTrackingReq += '"selectSimilarItemPrc": "' + param4 + '", '; setSelectTrackingReq += '"selectSimilarItemDisplayOrder": "' + param5 + '" '; setSelectTrackingReq += '}}'; CallFacadeService(setSelectTrackingReq, '/ja/f/rest/OBFacadeWebService', setSelectTrackingFunc);}var setBalloonDisp = function() {var lastId = kikakuLastId;if ("" == lastId) {lastId = "zaiko";}$("#" + lastId).on('init', function(slick){ $("[data-threepoint='one']").each(function() {$(this).addClass('u-line03--hidden02');});$("[data-threepoint='two']").each(function() {$(this).addClass('u-line03--hidden');});}); $("[data-event='balloon_sim']").each(function() { var $this = $(this); var $btn = $this.find("[data-event='balloon_btn_sim']"); var $tip = $this.find("[data-event='balloon_tip_sim']"); $tip.attr("aria-hidden", true); $btn.on("click", function() { $tip.addClass("is-active").attr("aria-hidden", false); setTimeout( function () { $tip.removeClass("is-active").attr("aria-hidden", true); } , 5000 ); return false; }); });}var setOptionDisp = function() {$("[data-slick='similar_product']").each(function() { $(this).slick({ autoplay: false, infinite: false, speed: 300, slidesToScroll: 1, dots: false, asNavFor: ".similar_product-child", slidesToShow: $(this).data("col"), draggable: false, swipe: false }); }); $(".similar_product-child").each(function() { $(this).slick({ autoplay: false, infinite: false, speed: 300, slidesToScroll: 1, dots: false, slidesToShow: $(this).data("col"), arrows: false, draggable: false, swipe: false }); }); $('body:not(.iPad) #zaiko .a-tooltip__title').hover( function() { $('#zaiko .similar_product-child [aria-hidden="true"]').addClass('u-opacity-0'); $('#zaiko .similar_product-child .slick-list').addClass('u-overflw-v'); }, function() { $('#zaiko .similar_product-child .slick-list').removeClass('u-overflw-v'); $('#zaiko .similar_product-child [aria-hidden="true"]').removeClass('u-opacity-0'); } ); $('body:not(.iPad) #zaiko div:nth-child(2)').hover( function() { $('#zaiko div:nth-child(2)').addClass('u-zIndex-10'); }, function() { $('#zaiko div:nth-child(2)').removeClass('u-zIndex-10'); } ); $('.js-modalOpen').on('click', function(e) { e.preventDefault(); var url = $(this).data('url'); if (url) { $.d_showModalDialog_cms(url); } }); $('.js-modalOpen-stock').on('click', function(e) { e.preventDefault(); var url = $(this).data('url'); var data = { 'articleCd': $(this).data('itemcd'), 'unitName': $(this).data('unitname') }; var option = { 'data' : data, } if (url) { $.d_showModalDialog_cms(url, option); } }); } var setCartInTracking = function (param1, param2, param3, param4, param5, param6) { var setCartInTrackingFunc = function(json){ var messageId = json.resultMap.OB3130S220.messageId; var statusCd = json.resultMap.OB3130S220.statusCd; if ( 0 !== statusCd) {$("[data-name='messageIdSim']").html("
");$("[data-name='messageIdSim']").css('display', 'none'); } } var setCartInTrackingReq = '{"langCd":"ja", '; setCartInTrackingReq += '\"ob3130S220Param\":{'; setCartInTrackingReq += '"callerFuncId": "OB1080S150", '; setCartInTrackingReq += '"cartType": "' + param6 + '", '; setCartInTrackingReq += '"callingArticleCd": "UBN12X050 6559", '; setCartInTrackingReq += '"selectSimilarItemArticleCd": "' + param1 + '", '; setCartInTrackingReq += '"callTimeShortageFlg": "' + param2 + '", '; setCartInTrackingReq += '"callingArticlePrc": "' + param3 + '", '; setCartInTrackingReq += '"selectSimilarItemPrc": "' + param4 + '", '; setCartInTrackingReq += '"selectSimilarItemDisplayOrder": "' + param5 + '" '; setCartInTrackingReq += '}}'; CallFacadeService(setCartInTrackingReq, '/ja/f/rest/OBFacadeWebService', setCartInTrackingFunc);}