1 2 3$(document).ready(function () { 4 5 init(); 6 $(window).on('pageshow', init); 7 8 dispStocksum(); 9 10 // åºèãã«ãã¦ã³çæ 11 $('.hc02js-top-inquiry--prefectureList').change(function () { 12 var $form = $(this).closest('form'); 13 14 15 // åºèãã«ãã¦ã³åæå 16 $form.find('.hc02js-top-inquiry--shopName').remove(); 17 18 // æ¥åºå¸ææ¥ãã«ãã¦ã³åæå 19 $form.find('.hc02js-top-inquiry--dateList').children().not('[selected=selected]').remove(); 20 $form.find('.hc02js-top-inquiry--timeList').children().not('[selected=selected]').remove(); 21 22 var url = "/jsp/addon/common/inquiryShopListAjax.jsp"; 23 var prefectureId = $form.find('.hc02js-top-inquiry--prefectureList').val(); 24 25 if (prefectureId) { 26 $.ajax({ 27 type: "GET", 28 async: true, 29 url: url, 30 data: { 31 entry: 'assets/hc/system/exEntry/top/shopPulldown', 32 prefecture_id: prefectureId 33 }, 34 dataType: "html" 35 }).done(function (data) { 36 $('.hc02js-top-inquiry--shopList').append(data); 37 }).fail(function (data) { 38 }); 39 } 40 41 }); 42 43 // ç¸è«ç®çã«ããæ¥åºæ¥æã®æ¸ãæã 44 $('input[name=car_radio]').change(function () { 45 var $form = $(this).closest('form'); 46 var shopCd = $form.find('.hc02js-top-inquiry--shopList').val(); 47 var carRadio = $form.find('[name=car_radio]:checked').val(); 48 createInquiryDate($form, shopCd,carRadio) 49 }); 50 51 // æ¥åºå¸ææ¥ãã«ãã¦ã³çæã»æ¥åºäºç´æ å ±åå¾ï¼åºè夿´æï¼ 52 $('.hc02js-top-inquiry--shopList').change(function () { 53 var $form = $(this).closest('form'); 54 var shopCd = $form.find('.hc02js-top-inquiry--shopList').val(); 55 var carRadio = $form.find('[name=car_radio]:checked').val(); 56 setInquiryInfo($form, shopCd); 57 createInquiryDate($form, shopCd,carRadio) 58 }); 59 60 // æ»å® 61 $('.hc02js-top-satei--makerList').change(function () { 62 // è»ç¨®ãã«ãã¦ã³åæå 63 $('.hc02js-top-satei--car').remove(); 64 65 // å¹´å¼ãã«ãã¦ã³åæå 66 $('.hc02js-top-satei--year').remove(); 67 $('.hc02js-top-satei--yearList').prop("disabled", false); 68$('.hc02js-top-satei--yearListPulldown').removeClass("nolist"); 69 $('.hc02js-top-satei--yearList').append('<option class="option hc02js-top-satei--year" value="">ã¡ã¼ã«ã¼ã»è»ç¨®ãå ã«ã鏿ãã ãã</option>'); 70 71 var url = "/json.jsp" 72 var makerCd = $('.hc02js-top-satei--makerList').val(); 73 74 if (makerCd) { 75 $.ajax({
76 type: "GET", 77 async: true, 78 url: url, 79 data: { 80 id: 8448934, 81 entry: 'assets/hc/system/exEntry/top/sateiCarList', 82 maker_cd: makerCd 83 }, 84 dataType: "text" 85 }).done(function (data) { 86 $('.hc02js-top-satei--carList').append(data); 87 var makerNameUrl = ''; 88 if ($('.hc02js-top-satei--makerList option:selected').text() != "ãã®ä»") { 89 makerNameUrl = $('.hc02js-top-satei--car').val().split(',')[0]; 90 } 91 setSateiUrl(makerNameUrl, "", ""); 92 }).fail(function (data) { 93 }); 94 } else { 95 setSateiUrl("", "", ""); 96 $('.hc02js-top-satei--carList').append('<option class="option hc02js-top-satei--car" value="">ã¡ã¼ã«ã¼ãå ã«ã鏿ãã ãã</option>'); 97 } 98 99 }); 100 101 $('.hc02js-top-satei--carList').change(function () { 102 // å¹´å¼ãã«ãã¦ã³åæå 103 $('.hc02js-top-satei--year').remove(); 104 $('.hc02js-top-satei--yearList').prop("disabled", false); 105 106 var url = "/json.jsp" 107 var makerNameUrl = $('.hc02js-top-satei--carList').val().split(',')[0]; 108 var carNameUrl = $('.hc02js-top-satei--carList').val().split(',')[1]; 109 110 if (makerNameUrl && carNameUrl) { 111 $.ajax({
112 type: "GET", 113 async: true, 114 url: url, 115 data: { 116 id: 8448936, 117 entry: 'assets/hc/system/exEntry/top/sateiYearList', 118 type: "1", 119 maker_name_url: makerNameUrl, 120 car_name_url: carNameUrl 121 }, 122 dataType: "html" 123 }).done(function (data) { 124 // è²·åç¸å ´æ å ±ãåå¨ããªãå ´åãã«ãã¦ã³ãéæ´»æ§å 125 if (!data.includes("hc02js-top-satei--year")) { 126 $('.hc02js-top-satei--yearList').prop("disabled", true); 127$('.hc02js-top-satei--yearListPulldown').addClass("nolist"); 128 } else { 129 $('.hc02js-top-satei--yearList').append(data); 130 } 131 setSateiUrl(makerNameUrl, carNameUrl, ""); 132 }).fail(function (data) { 133 }); 134 } else { 135 if ($('.hc02js-top-satei--carList option:selected').text() != "ãã®ä»") { 136 $('.hc02js-top-satei--yearList').append('<option class="option hc02js-top-satei--year" value="">ã¡ã¼ã«ã¼ã»è»ç¨®ãå ã«ã鏿ãã ãã</option>'); 137 } else { 138 $('.hc02js-top-satei--yearList').prop("disabled", true); 139 } 140 var makerNameUrl = ''; 141 if ($('.hc02js-top-satei--makerList option:selected').text() != "ãã®ä»") { 142 makerNameUrl = $('.hc02js-top-satei--car').val().split(',')[0]; 143 } 144 setSateiUrl(makerNameUrl, "", ""); 145 } 146 147 }); 148 149 $('.hc02js-top-satei--yearList').change(function () { 150 151 var makerNameUrl = $('.hc02js-top-satei--carList').val().split(',')[0]; 152 var carNameUrl = $('.hc02js-top-satei--carList').val().split(',')[1]; 153 var year = $('.hc02js-top-satei--yearList').val(); 154 155 setSateiUrl(makerNameUrl, carNameUrl, year); 156 157 }); 158 159 // ã©ã¸ãªãã¿ã³å¤æ´æã«MIK:IKã夿´ 160 $('[name="car_radio"]').change( function() { 161 var $form = $(this).closest('form'); 162 let scheFlg = $form.find('[name=appoint_flg]').val(); 163 let visitType = $form.find('[name=car_radio]:checked').val(); 164 if (visitType == 0) { 165 if (scheFlg == 0) { 166 $form.find('[name=insertionCdHid]').val($form.find('[name=notScheSellInsertionCdHid]').val()); 167 } else { 168 $form.find('[name=insertionCdHid]').val($form.find('[name=sellInsertionCdHid]').val()); 169 } 170 $form.find('[name=insertionKindCdHid]').val($form.find('[name=sellInsertionKindCdHid]').val()); 171 } else { 172 if (scheFlg == 0) { 173 $form.find('[name=insertionCdHid]').val($form.find('[name=notScheBuyInsertionCdHid]').val()); 174 } else { 175 $form.find('[name=insertionCdHid]').val($form.find('[name=buyInsertionCdHid]').val()); 176 } 177 $form.find('[name=insertionKindCdHid]').val($form.find('[name=buyInsertionKindCdHid]').val()); 178 } 179 }); 180 181}); 182 183$(window).on('load',function() { 184 dispNorico(); 185 dispNewCampaignInfo(); 186}); 187 188// æ¥åºå¸ææ¥ãã«ãã¦ã³çæ 189function createInquiryDate(form, shopCd,carRadio) { 190 var $form = form; 191 // æ¥åºå¸ææ¥ãã«ãã¦ã³åæå 192 $form.find('.hc02js-top-inquiry--dateList').children().not('[selected=selected]').remove(); 193 $form.find('.hc02js-top-inquiry--timeList').children().not('[selected=selected]').remove(); 194 if (shopCd) { 195 $.ajax({
196 type: 'GET', 197 url: '/json.jsp', 198 data: { 199 id: 8448938, 200 entry: 'assets/hc/system/exEntry/top/datePulldown', 201 shop_code: shopCd, 202 redirect_url: location.pathname, 203 action_id: "gmbFormLp", 204 car_radio: carRadio 205 }, 206 dataType: 'text', 207 async: false, 208 cache: false 209 }).done(function (data) { 210 $('[name=inquiry_form]').find('*[name=inp_day]').append(data); 211 if ($form.find('[name=dept_id]').val()) { 212 // æ¥åºæ¥ãæ¸ãæãå¾ãæ¥åºæéãæ¸ãæãã 213 setTimeList(form); 214 } 215 216 }).fail(function (data) { 217 }); 218 219 } 220} 221 222// æ¥åºå¸ææéã®ä»»æï¼å¿ é åæ¿ 223function changeInquiryTimeAnyReq() { 224 var segment_element = $('[name=appoint_flg]'); 225 if(segment_element.length > 0 && segment_element.val() == '1'){ 226 // ã¹ã±ã¸ã¥ã¼ã©é£æºåºèã®å ´åã叿æéãå¿ é ã«ãã 227 var timeAny = document.querySelectorAll(".hc02js-top-inquiry--timeListAny") 228 if(timeAny.length !== 0){ 229 timeAny[0].style.display = "none"; 230 } 231 var timeReq = document.querySelectorAll(".hc02js-top-inquiry--timeListReq") 232 if(timeReq.length !== 0){ 233 timeReq[0].style.display = "block"; 234 } 235 236 $('.hc02js-top-inquiry--timeListVl').addClass('vl-required'); 237 $('.hc02js-top-inquiry--timeListVl').addClass('vl-error-class-error'); 238 239 }else{ 240 // ã¹ã±ã¸ã¥ã¼ã©é£æºåºè以å¤ã®å ´åã叿æéãä»»æã«ãã 241 var timeAny = document.querySelectorAll(".hc02js-top-inquiry--timeListAny") 242 if(timeAny.length !== 0){ 243 timeAny[0].style.display = "block"; 244 } 245 var timeReq = document.querySelectorAll(".hc02js-top-inquiry--timeListReq") 246 if(timeReq.length !== 0){ 247 timeReq[0].style.display = "none"; 248 } 249 $('.hc02js-top-inquiry--timeListVl').removeClass('vl-required'); 250 $('.hc02js-top-inquiry--timeListVl').removeClass('vl-error-class-error'); 251 252 // 表示ä¸ã®ã¨ã©ã¼ã¡ãã»ã¼ã¸è¡¨ç¤ºããã«ãã¦ã³ã®èµ¤è²ãè§£é¤ 253 $('.hc02js-top-inquiry--timeListVl').removeClass('error'); 254 var timeErr = document.querySelectorAll(".hc02js-top-inquiry--timeListErr") 255 if(timeErr.length !== 0){ 256 timeErr[0].style.display = "none"; 257 } 258 } 259} 260 261// ãã©ã¼ã éä¿¡paramè¨å® 262function setInquiryInfo(form, shopCd) { 263 264 var $form = form; 265 266 if (shopCd) { 267 $.ajax({
268 type: 'GET', 269 url: '/json.jsp', 270 data: { 271 id: 8448938, 272 entry: 'assets/hc/system/exEntry/top/inquiryInfo', 273 shop_code: shopCd, 274 redirect_url: location.pathname, 275 action_id: "gmbFormLp" 276 }, 277 dataType: 'json', 278 async: true, 279 cache: false 280 }).done(function (data) { 281 $form.find('[name=dept_id]').val(shopCd); 282 $form.find('[name=buy_click_url]').val(data["buy_click_url"]); 283 $form.find('[name=sell_click_url]').val(data["sell_click_url"]); 284 $form.find('[name=api_request]').val(data["api_request"]); 285 $form.find('[name=api_error_url]').val(data["api_error_url"]); 286 $form.find('[name=shopDetailInquiry]').val(data["shop_detail_inquiry"]); 287 $form.find('[name=shopDetailInquiry2]').val(data["shop_detail_inquiry_2"]); 288 $form.find('[name=appoint_flg]').val(data["appoint_flg"]); 289 let scheFlg = $form.find('[name=appoint_flg]').val(); 290 let visitType = $form.find('[name=car_radio]:checked').val(); 291 if (visitType == 0) { 292 if (scheFlg == 0) { 293 $form.find('[name=insertionCdHid]').val($form.find('[name=notScheSellInsertionCdHid]').val()); 294 } else { 295 $form.find('[name=insertionCdHid]').val($form.find('[name=sellInsertionCdHid]').val()); 296 } 297 $form.find('[name=insertionKindCdHid]').val($form.find('[name=sellInsertionKindCdHid]').val()); 298 } else { 299 if (scheFlg == 0) { 300 $form.find('[name=insertionCdHid]').val($form.find('[name=notScheBuyInsertionCdHid]').val()); 301 } else { 302 $form.find('[name=insertionCdHid]').val($form.find('[name=buyInsertionCdHid]').val()); 303 } 304 $form.find('[name=insertionKindCdHid]').val($form.find('[name=buyInsertionKindCdHid]').val()); 305 } 306 if (data["directFlg"]){ 307 $form.find('[name=insertionCdHid]').val($form.find('[name=directInsertionCdHid]').val()); 308 $form.find('[name=mediaCdHid]').val($form.find('[name=directMediaCdHid]').val()); 309 } 310 311 }).fail(function (data) { 312 313 }); 314 } 315} 316 317// æ»å®ç¸å ´é·ç§»å çæ 318function setSateiUrl(makerNameUrl, carNameUrl, year) { 319 var url = "/satei/souba/"; 320 if (makerNameUrl) { 321 url = "/satei/souba/" + makerNameUrl + "/"; 322 } 323 if (carNameUrl) { 324 url = "/satei/souba/" + makerNameUrl + "/" + carNameUrl + "/"; 325 } 326 if (year) { 327 url = "/satei/souba/" + makerNameUrl + "/" + carNameUrl + "/" + year + "/"; 328 } 329 330 $(".hc02js-top-satei--btn").attr("href", url); 331} 332 333// ç»é²å°æ°è¡¨ç¤º 334function dispStocksum() { 335 let url = "/json.jsp"; 336 $.ajax({
337 type: "GET", 338 async: true, 339 url: url, 340 data: { 341 id: 8448941, 342 entry_id: 8448942, 343 entry_id_evidence:8448942, 344 pc_sp_class: 0 345 }, 346 dataType: "html" 347 }).done(function (data) { 348 $('.hc02js-top-async-stocksum').html(data); 349 }).fail(function (data) { 350 }); 351} 352 353function init() { 354 $('.hc02js-top-satei--makerList').val($('hc02js-top-satei--makerList option[selected=selected]').val()); 355 $('.hc02js-top-satei--carList').val($('hc02js-top-satei--carList option[selected=selected]').val()); 356 $('.hc02js-top-satei--yearList').val($('hc02js-top-satei--yearList option[selected=selected]').val()); 357} 358 359function dispNorico() { 360 var element = document.createElement("script"); 361 element.src = "/assets/hc/system/js/top/norico_pc.js?nocache=0607"; 362 document.body.appendChild(element); 363} 364 365function dispNewCampaignInfo() { 366 var element = document.createElement("script"); 367 element.src = "/assets/hc/system/js/top/newCampaignInfo_pc.js?nocache=0607"; 368 document.body.appendChild(element); 369} 370 371
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.