<description-po>
      <link rel="stylesheet" href="css/product-details.css">
      <link rel="stylesheet" href="css/popup.css">
    <div class="main">
      <div class="product-details content">
        <div class="page-title">
          <h2>商品情報詳細</h2>
          <div class="btn-wrapper">
           <!--  <button type="button" class="color-btn green-btn" id="idExportPdf" style="display: { arColumn(list_button, 'navigation_id', 'B004').length ?  'inline' : 'none'  }" onclick="{ exportPdf }">{ arColumn(list_button, 'navigation_id', 'B004').length ? arColumn(list_button, 'navigation_id', 'B004')[0]['display_contents'] : '' }</button> -->

            <a href="#view-pdf/{encodeURIComponent(product_id)}/1" class="pdf-tab-view color-btn green-btn" id="pdf-tab-view" target="_blank" style="display: { arColumn(list_button, 'navigation_id', 'B004').length && permission != 5 ?  'inline' : 'none'  }">{ arColumn(list_button, 'navigation_id', 'B004').length ? arColumn(list_button, 'navigation_id', 'B004')[0]['display_contents'] : '' }</a>

            <a href="#" class="pdf-tab-view color-btn green-btn"  style="display: { arColumn(list_button, 'navigation_id', 'B004').length && permission == 5 ?  'inline' : 'none'  }">{ arColumn(list_button, 'navigation_id', 'B004').length ? arColumn(list_button, 'navigation_id', 'B004')[0]['display_contents'] : '' }</a>

            <button type="button" class="color-btn orange-btn" style="display: {  arColumn(list_button, 'navigation_id', 'B001').length ? 'inline' : 'none'  }" onclick="{ addFavorite }">{ arColumn(list_button, 'navigation_id', 'B001').length ? arColumn(list_button, 'navigation_id', 'B001')[0]['display_contents'] : '' }</button>
            
          </div>
        </div>
        <table class="detail-table">
          <tr>
            <th>品番</th>
            <td colspan="5" data-test="supplier_sku_test_cafe">
              {product_detail.supplier_sku ? product_detail.supplier_sku : ''}　{product_detail.manufacturer_sku ? '［製造元品番:'+product_detail.manufacturer_sku+'］' : ''}
              <a if={product_detail.url1} target="_blank" href="{product_detail.url1}"><i class="fa fa-external-link-square"></i>メーカー製品ページ</a>
              <a if={product_detail.supplier_comp_code=='20000488'} target="_blank" href="https://labchem-wako.fujifilm.com/jp/product/result/product.html?fw={product_detail.supplier_sku}"><i class="fa fa-external-link-square"></i>メーカー製品ページ</a>
            </td>
          </tr>
          <tr>
            <th>品名</th>
            <td if={!IWAI_SITE} colspan="5">
              <p>{product_detail.name}{(product_detail.supplier_comp_code == SUPPLIER_COMP_CODE && product_detail.msg4 !== MSG4 && product_detail.msg4 !== '') ? '【'+product_detail.msg4+'】' : '' }</p>
              <p>{product_detail.name_jp == product_detail.name ? '' : product_detail.name_jp}</p>
            </td>
            <td if={IWAI_SITE} colspan="5">
              <p>{product_detail.name_jp}</p>
              <!-- <p>{product_detail.name_jp == product_detail.name ? '' : product_detail.name_jp}</p> -->
            </td>
          </tr>
          <tr>
            <th>規格</th>
            <td>{product_detail.class_name_jp}</td>
            <th>内容量</th>
            <td>{product_detail.volume_unit_label}</td>
            <th rowspan="4">商品画像</th>
            <td class="product-img" rowspan="4">
              <a href="{product_detail.photo_url}" target="_blank"><img src="{product_detail.photo_url}" id="product_photo" style="max-height:250px;max-width:250px" if={product_detail.photo_url}></a>
            </td>
          </tr>
          <tr>
            <th>販売元</th>
            <td>{product_detail.sales_origin_maker_name}</td>
            <th>製造元/ブランド</th>
            <td>{!product_detail.brand_name ? product_detail.maker_name : (!product_detail.maker_name ? product_detail.brand_name : product_detail.maker_name + '/' + product_detail.brand_name) }</td>
          </tr>
          <tr>
            <th if={!IWAI_SITE}>{check_cas_code ? 'CAS RN®' : 'CAS番号' }</th>
            <th if={IWAI_SITE}><span class="cas_no"></span></th>
            <td>{product_detail.cas_code}</td>
            <th>EANコード</th>
            <td>{product_detail.ean}</td>
          </tr>
          <tr>
            <th>メーカー在庫情報</th>
            <td class="padding-add-vertical"><p style="margin-bottom:0;">{product_detail.reg_stock}</p><p style="margin-bottom:0;" if = {product_detail.brp_created_time != ''}>更新日時: {product_detail.brp_created_time}</p></td>
            <th>メーカー標準納期</th>
            <td>{product_detail.reg_devtime}</td>
          </tr>
          <tr>
            <th rowspan="4">法規情報</th>
            <td rowspan="4" colspan="3" if={(arColumn(list_field, 'navigation_id', 'F007').length > 0) && arColumn(list_field, 'navigation_id', 'F007')[0].used_status == 'Y'}>
              <div if={!(!product_detail.hazadous_name && !product_detail.poisonous_material_name && !product_detail.poisonous_medicine_name && !product_detail.medicine_name && !product_detail.animal_medicine_name && !product_detail.specifical_medicine_name && !product_detail.medical_equipmentl_name && !product_detail.psychotropic_drug_name && !product_detail.stimulant_drug_material_name && !product_detail.stimulant_drug_material_name && !product_detail.cartagenal_name && !product_detail.prtrl_name && !product_detail.cscll_name && !product_detail.biological_origin_name && !product_detail.international_controlled_substance_name && !product_detail.ozone_protect_name && !product_detail.chemical_weapon_name && !product_detail.safety_and_health_act_name && !product_detail.sds_name && !product_detail.radiation_hazard_prevention_name && !product_detail.air_pollution_control_name && !product_detail.water_pollution_control_name && !product_detail.soil_contamination_name)}>
                <li>{product_detail.hazadous_name ? ( (list_text_check_2.indexOf(product_detail.hazadous_name) >= 0) ? '' : '危険物(消防法): ' + product_detail.hazadous_name) : '危険物(消防法): 情報なし'}</li>
                
                <li>{product_detail.poisonous_material_name ? ((list_text_check_2.indexOf(product_detail.poisonous_material_name) >= 0) ? '' : '毒劇物(毒物及び劇物取締法): ' + product_detail.poisonous_material_name) : '毒劇物(毒物及び劇物取締法): 情報なし'}</li>
                
                <li>{product_detail.poisonous_medicine_name ? ((list_text_check_2.indexOf(product_detail.poisonous_medicine_name) >= 0) ? '' : '毒劇薬: ' + product_detail.poisonous_medicine_name) : '毒劇薬: 情報なし'}</li>

                <li>{product_detail.medicine_name ? ((list_text_check_2.indexOf(product_detail.medicine_name) >= 0) ? '' : '医薬品(薬事法): ' + product_detail.medicine_name) : '医薬品(薬事法): 情報なし'}</li>

                <li>{product_detail.animal_medicine_name ? ((list_text_check_2.indexOf(product_detail.animal_medicine_name) >= 0) ? '' : '動物薬: ' + product_detail.animal_medicine_name) : '動物薬: 情報なし'}</li>

                <li>{product_detail.specifical_medicine_name ? ((list_text_check_2.indexOf(product_detail.specifical_medicine_name) >= 0) ? '' : '指定薬物: ' + product_detail.specifical_medicine_name) : '指定薬物: 情報なし'}</li>

                <li>{product_detail.medical_equipmentl_name ? ((list_text_check_2.indexOf(product_detail.medical_equipmentl_name) >= 0) ? '' : '医療機器: ' + product_detail.medical_equipmentl_name) : '医療機器: 情報なし'}</li>

                <li>{product_detail.psychotropic_drug_name ? ((list_text_check_2.indexOf(product_detail.psychotropic_drug_name) >= 0) ? '' : '麻薬・向精神薬(麻薬および向精神薬取締法) ' + product_detail.psychotropic_drug_name) : '麻薬・向精神薬(麻薬および向精神薬取締法) 情報なし'}</li>
                
                <li>{product_detail.stimulant_drug_material_name ? ((list_text_check_2.indexOf(product_detail.stimulant_drug_material_name) >= 0) ? '' : '覚せい剤原料: ' + product_detail.stimulant_drug_material_name) : '覚せい剤原料: 情報なし'}</li>

                <li>{product_detail.duty_free_alcohol_name ? ((list_text_check_2.indexOf(product_detail.duty_free_alcohol_name) >= 0) ? '' : '免税アルコール: ' + product_detail.duty_free_alcohol_name) : '免税アルコール: 情報なし'}</li>

                <li>{product_detail.cartagenal_name ? ((list_text_check_2.indexOf(product_detail.cartagenal_name) >= 0) ? '' : 'カルタヘナ: ' + product_detail.cartagenal_name) : 'カルタヘナ: 情報なし'}</li>
                
                <li>{product_detail.prtrl_name ? ((list_text_check_2.indexOf(product_detail.prtrl_name) >= 0) ? '' : 'PRTR法: ' + product_detail.prtrl_name) : 'PRTR法: 情報なし'}</li>
                
                <li>{product_detail.cscll_name ? ((list_text_check_2.indexOf(product_detail.cscll_name) >= 0) ? '' : '化審法: ' + product_detail.cscll_name) : '化審法: 情報なし'}</li>

                <li>{product_detail.international_controlled_substance_name ? ((list_text_check_2.indexOf(product_detail.international_controlled_substance_name) >= 0) ? '' : '国際規制物質: ' + product_detail.international_controlled_substance_name) : '国際規制物質: 情報なし'}</li>

                <li>{product_detail.ozone_protect_name ? ((list_text_check_2.indexOf(product_detail.ozone_protect_name) >= 0) ? '' : 'オゾン層保護法: ' + product_detail.ozone_protect_name) : 'オゾン層保護法: 情報なし'}</li>

                <li>{product_detail.chemical_weapon_name ? ((list_text_check_2.indexOf(product_detail.chemical_weapon_name) >= 0) ? '' : '化学兵器禁止法: ' + product_detail.chemical_weapon_name) : '化学兵器禁止法: 情報なし'}</li>

                <li>{product_detail.safety_and_health_act_name ? ((list_text_check_2.indexOf(product_detail.safety_and_health_act_name) >= 0) ? '' : '労働安全衛生法: ' + product_detail.safety_and_health_act_name) : '労働安全衛生法: 情報なし'}</li>

                <li>{product_detail.sds_name ? ((list_text_check_2.indexOf(product_detail.sds_name) >= 0) ? '' : 'SDS該当区分: ' + product_detail.sds_name) : 'SDS該当区分: 情報なし'}</li>

                <li>{product_detail.radiation_hazard_prevention_name ? ((list_text_check_2.indexOf(product_detail.radiation_hazard_prevention_name) >= 0) ? '' : '放射線障害防止法: ' + product_detail.radiation_hazard_prevention_name) : '放射線障害防止法: 情報なし'}</li>

                <li>{product_detail.biological_origin_name ? ((list_text_check_2.indexOf(product_detail.biological_origin_name) >= 0) ? '' : '生物由来製品: ' + product_detail.biological_origin_name) : '生物由来製品: 情報なし'}</li>

                <li>{product_detail.soil_contamination_name ? ((list_text_check_2.indexOf(product_detail.soil_contamination_name) >= 0) ? '' : '土壌汚染対策法: ' + product_detail.soil_contamination_name) : '土壌汚染対策法: 情報なし'}</li>


  <!-- 
              { (product_detail.hazadous_name ? ( (list_text_check_2.indexOf(product_detail.hazadous_name) >= 0) ? 1 : f1) : f1) }

              {(product_detail.poisonous_material_name ? ( (list_text_check_2.indexOf(product_detail.poisonous_material_name) >= 0) ? 2 : f2) : f2)} 
              {(product_detail.psychotropic_drug_name ? ( (list_text_check_2.indexOf(product_detail.psychotropic_drug_name) >= 0) ? 3 : f3) : f3)}  
              {(product_detail.cartagenal_name ? ( (list_text_check_2.indexOf(product_detail.cartagenal_name) >= 0) ? 4 : f4) : f4)}  
              {(product_detail.prtrl_name ? ( (list_text_check_2.indexOf(product_detail.prtrl_name) >= 0) ? 5 : f5) : f5)}  
              {(product_detail.safety_and_health_act_name ? ( (list_text_check_2.indexOf(product_detail.safety_and_health_act_name) >= 0) ? 6 : f6) : f6)  }
   -->
<!-- 
                <li if={(   
                  (product_detail.hazadous_name ? ( (list_text_check_2.indexOf(product_detail.hazadous_name) >= 0) ? true : false) : false) && 
                  (product_detail.poisonous_material_name ? ( (list_text_check_2.indexOf(product_detail.poisonous_material_name) >= 0) ? true : false) : false) && 
                  (product_detail.poisonous_medicine_name ? ( (list_text_check_2.indexOf(product_detail.poisonous_medicine_name) >= 0) ? true : false) : false) &&    
                  (product_detail.medicine_name ? ( (list_text_check_2.indexOf(product_detail.medicine_name) >= 0) ? true : false) : false) &&    
                  (product_detail.animal_medicine_name ? ( (list_text_check_2.indexOf(product_detail.animal_medicine_name) >= 0) ? true : false) : false) &&  
                  (product_detail.specifical_medicine_name ? ( (list_text_check_2.indexOf(product_detail.specifical_medicine_name) >= 0) ? true : false) : false) &&    
                  (product_detail.medical_equipmentl_name ? ( (list_text_check_2.indexOf(product_detail.medical_equipmentl_name) >= 0) ? true : false) : false) &&    
                  (product_detail.psychotropic_drug_name ? ( (list_text_check_2.indexOf(product_detail.psychotropic_drug_name) >= 0) ? true : false) : false) && 
                  (product_detail.stimulant_drug_material_name ? ( (list_text_check_2.indexOf(product_detail.stimulant_drug_material_name) >= 0) ? true : false) : false) &&    
                  (product_detail.duty_free_alcohol_name ? ( (list_text_check_2.indexOf(product_detail.duty_free_alcohol_name) >= 0) ? true : false) : false) &&    
                  (product_detail.cartagenal_name ? ( (list_text_check_2.indexOf(product_detail.cartagenal_name) >= 0) ? true : false) : false) && 
                  (product_detail.prtrl_name ? ( (list_text_check_2.indexOf(product_detail.prtrl_name) >= 0) ? true : false) : false) && 
                  (product_detail.cscll_name ? ( (list_text_check_2.indexOf(product_detail.cscll_name) >= 0) ? true : false) : false) &&    
                  (product_detail.international_controlled_substance_name ? ( (list_text_check_2.indexOf(product_detail.international_controlled_substance_name) >= 0) ? true : false) : false) &&    
                  (product_detail.ozone_protect_name ? ( (list_text_check_2.indexOf(product_detail.ozone_protect_name) >= 0) ? true : false) : false) &&    
                  (product_detail.chemical_weapon_name ? ( (list_text_check_2.indexOf(product_detail.chemical_weapon_name) >= 0) ? true : false) : false) &&    
                  (product_detail.safety_and_health_act_name ? ( (list_text_check_2.indexOf(product_detail.safety_and_health_act_name) >= 0) ? true : false) : false) && 
                  (product_detail.sds_name ? ( (list_text_check_2.indexOf(product_detail.sds_name) >= 0) ? true : false) : false) &&    
                  (product_detail.radiation_hazard_prevention_name ? ( (list_text_check_2.indexOf(product_detail.radiation_hazard_prevention_name) >= 0) ? true : false) : false)   
                  (product_detail.water_pollution_control_name ? ( (list_text_check_2.indexOf(product_detail.water_pollution_control_name) >= 0) ? true : false) : false)   
                  (product_detail.air_pollution_control_name ? ( (list_text_check_2.indexOf(product_detail.air_pollution_control_name) >= 0) ? true : false) : false)   
                  
                )}>非該当</li> -->
                <li>____________</li>
                <li>水質汚濁防止法:{product_detail.water_pollution_control_name ? product_detail.water_pollution_control_name : '情報なし'}</li>
                <li>大気汚染防止法:{product_detail.air_pollution_control_name ? product_detail.air_pollution_control_name : '情報なし'}</li>
              </div>

              <div>{(!product_detail.hazadous_name && !product_detail.poisonous_material_name && !product_detail.poisonous_medicine_name && !product_detail.medicine_name && !product_detail.animal_medicine_name && !product_detail.specifical_medicine_name && !product_detail.medical_equipmentl_name && !product_detail.psychotropic_drug_name && !product_detail.stimulant_drug_material_name && !product_detail.stimulant_drug_material_name && !product_detail.cartagenal_name && !product_detail.prtrl_name && !product_detail.cscll_name && !product_detail.biological_origin_name && !product_detail.international_controlled_substance_name && !product_detail.ozone_protect_name && !product_detail.chemical_weapon_name && !product_detail.safety_and_health_act_name && !product_detail.sds_name && !product_detail.radiation_hazard_prevention_name && !product_detail.air_pollution_control_name && !product_detail.water_pollution_control_name && !product_detail.soil_contamination_name) ? '非該当' : ''}</div>
              <div if={comment_for_regulations_text}>
                <button class="popupform-comment-for-regulation-open" if={ comment_for_regulations_text != '未発注品' }>{comment_for_regulations_text}</button>
                <span if={ comment_for_regulations_text == '未発注品' }>{comment_for_regulations_text}</span>
              </div>
            </td>
            <td rowspan="4" colspan="3" if={!(arColumn(list_field, 'navigation_id', 'F007').length > 0)}>

              <div if={!(!product_detail.hazadous_name && !product_detail.poisonous_material_name && !product_detail.poisonous_medicine_name && !product_detail.medicine_name && !product_detail.animal_medicine_name && !product_detail.specifical_medicine_name && !product_detail.medical_equipmentl_name && !product_detail.psychotropic_drug_name && !product_detail.stimulant_drug_material_name && !product_detail.stimulant_drug_material_name && !product_detail.cartagenal_name && !product_detail.prtrl_name && !product_detail.cscll_name && !product_detail.biological_origin_name && !product_detail.international_controlled_substance_name && !product_detail.ozone_protect_name && !product_detail.chemical_weapon_name && !product_detail.safety_and_health_act_name && !product_detail.sds_name && !product_detail.radiation_hazard_prevention_name && !product_detail.air_pollution_control_name && !product_detail.water_pollution_control_name && !product_detail.soil_contamination_name && !product_detail.comment_for_regulations)}>

                <div>{(list_text_check_1.indexOf(product_detail.hazadous_name) >= 0) ? ''  : (product_detail.hazadous_name ? '危険物: ' + product_detail.hazadous_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.poisonous_material_name) >= 0) ? '' : (product_detail.poisonous_material_name ? '毒劇物: '+ product_detail.poisonous_material_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.poisonous_medicine_name) >= 0) ? '' : (product_detail.poisonous_medicine_name ? '毒劇薬: '+ product_detail.poisonous_medicine_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.medicine_name) >= 0) ? '' : (product_detail.medicine_name ? '医薬品: '+ product_detail.medicine_name : '') }</div>

                <div>{(list_text_check_1.indexOf(product_detail.animal_medicine_name) >= 0) ? '' : (product_detail.animal_medicine_name ? '動物薬: '+ product_detail.animal_medicine_name : '') }</div>

                <div>{(list_text_check_1.indexOf(product_detail.specifical_medicine_name) >= 0) ? ''  : (product_detail.specifical_medicine_name ? '指定薬物: '+ product_detail.specifical_medicine_name : '') }</div>

                <div>{(list_text_check_1.indexOf(product_detail.medical_equipmentl_name) >= 0) ? '' : (product_detail.medical_equipmentl_name ? '医療機器: '+ product_detail.medical_equipmentl_name : '') }</div>

                <div>{(list_text_check_1.indexOf(product_detail.psychotropic_drug_name) >= 0) ? '' : (product_detail.psychotropic_drug_name ? '麻薬・向精神薬: '+ product_detail.psychotropic_drug_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.stimulant_drug_material_name) >= 0) ? '' : (product_detail.stimulant_drug_material_name ? '覚せい剤原料: ' + product_detail.stimulant_drug_material_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.duty_free_alcohol_name) >= 0) ? '' : (product_detail.duty_free_alcohol_name ? '免税アルコール: ' + product_detail.duty_free_alcohol_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.cartagenal_name) >= 0) ? ''  : (product_detail.cartagenal_name ? 'カルタヘナ: '+ product_detail.cartagenal_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.prtrl_name) >= 0) ? '' : (product_detail.prtrl_name ? 'PRTR法: '+ product_detail.prtrl_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.cscll_name) >= 0) ? '' : (product_detail.cscll_name ? '化審法: '+ product_detail.cscll_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.international_controlled_substance_name) > 0) ? ''  : (product_detail.international_controlled_substance_name ? '国際規制物質: '+ product_detail.international_controlled_substance_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.ozone_protect_name) >= 0) ? ''  : (product_detail.ozone_protect_name ? 'オゾン層保護法: ' + product_detail.ozone_protect_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.chemical_weapon_name) >= 0) ? '' : (product_detail.chemical_weapon_name ? '化学兵器禁止法: '+ product_detail.chemical_weapon_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.safety_and_health_act_name) >= 0) ? '' : (product_detail.safety_and_health_act_name ? '労働安全衛生法: '+ product_detail.safety_and_health_act_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.sds_name) >= 0) ? '' : (product_detail.sds_name ? 'SDS該当区分: '+ product_detail.sds_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.radiation_hazard_prevention_name) >= 0) ? '' : (product_detail.radiation_hazard_prevention_name ? '放射線障害防止法: ' + product_detail.radiation_hazard_prevention_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.water_pollution_control_name) >= 0) ? '' : (product_detail.water_pollution_control_name ? '水質汚濁防止法: '+ product_detail.water_pollution_control_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.air_pollution_control_name) >= 0) ? '' : (product_detail.air_pollution_control_name ? '大気汚染防止法: '+ product_detail.air_pollution_control_name : '')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.biological_origin_name) >= 0) ? '' : (product_detail.biological_origin_name ? '生物由来製品: '+ product_detail.biological_origin_name : '')}</div>
                
                <div>{(list_text_check_1.indexOf(product_detail.soil_contamination_name) >= 0) ? '' : (product_detail.soil_contamination_name ? '土壌汚染対策法: '+ product_detail.soil_contamination_name : '')}</div>

                <div if={product_detail.supplier_comp_code != '20000057'}>{(list_text_check_1.indexOf(product_detail.comment_for_regulations) >= 0) ? '' : (product_detail.comment_for_regulations ? product_detail.comment_for_regulations : '')}</div>
                
              </div>
              <div if={comment_for_regulations_text}>
                <button class="popupform-comment-for-regulation-open" if={ comment_for_regulations != '未発注品' }>{comment_for_regulations_text}</button>
                <span if={ comment_for_regulations == '未発注品' }>{comment_for_regulations_text}</span>
              </div>
              <div if={IWAI_SITE && overseas_goods_flag > 0}>
                <p>当欄に表示がない製品も含め法規制情報は最新でない可能性があります。</p>
                <p>再確認後、取扱い出来ない場合もございますが予めご了承ください。</p>
              </div>
              <!-- <div>{(!product_detail.hazadous_name && !product_detail.poisonous_material_name && !product_detail.poisonous_medicine_name && !product_detail.medicine_name && !product_detail.animal_medicine_name && !product_detail.specifical_medicine_name && !product_detail.medical_equipmentl_name && !product_detail.psychotropic_drug_name && !product_detail.stimulant_drug_material_name && !product_detail.stimulant_drug_material_name && !product_detail.cartagenal_name && !product_detail.prtrl_name && !product_detail.cscll_name && !product_detail.international_controlled_substance_name && !product_detail.ozone_protect_name && !product_detail.chemical_weapon_name && !product_detail.safety_and_health_act_name && !product_detail.sds_name && !product_detail.radiation_hazard_prevention_name && !product_detail.air_pollution_control_name && !product_detail.water_pollution_control_name) ? 'なし' : ''}</div> -->
            </td>
            <th>定価</th>
           <!--  <td>{ !isNaN(parseInt(product_detail.list_price)) ? parseInt(product_detail.list_price).toLocaleString('en') + '円' : '' }</td> -->
            <td class="right">
               <div data-test="price_test_cafe" style="text-align: right;" if={campaign_retail_price_end_date(product_detail.campaign_retail_price,product_detail.campaign_start_date,product_detail.campaign_end_date,product_detail.campaign_published_date,product_detail.campaign_close_date).length > 0} >
                 <div style="display: { parseInt(product_detail.campaign_retail_price) >=1 ? 'block' : 'none' }">［キャンペーン中］</div>
                 <div style="border-top:0px; display: { parseInt(product_detail.campaign_retail_price) >=1 ? 'block' : 'none' }"><strike>{ !isNaN(parseInt(product_detail.list_price)) ? (product_detail.list_price == 0 || product_detail.all_hidden_price ? 'お見積り' : parseInt(product_detail.list_price).toLocaleString('en') + '円' ) : '' }</strike></div>
                 <div style="border-top:0px;"><b style="color: red">{ !isNaN(parseInt(product_detail.campaign_retail_price)) && (product_detail.campaign_retail_price != 0) && !product_detail.all_hidden_price ? ( parseInt(product_detail.campaign_retail_price).toLocaleString('en') + '円' ) : 'お見積り' }</b></div>
                 <div style="border-top:0px; display: { parseInt(product_detail.campaign_retail_price) >=1 ? 'block' : 'none' }" class="campaign_date_0">{ campaign_retail_price_end_date(product_detail.campaign_retail_price,product_detail.campaign_start_date,product_detail.campaign_end_date,product_detail.campaign_published_date,product_detail.campaign_close_date)}</div>
               </div>

               <div data-test="price_sale_test_cafe" if={!(campaign_retail_price_end_date(product_detail.campaign_retail_price,product_detail.campaign_start_date,product_detail.campaign_end_date,product_detail.campaign_published_date,product_detail.campaign_close_date).length > 0)} >{ !isNaN(parseInt(product_detail.list_price)) ? (product_detail.list_price == 0 || product_detail.all_hidden_price? 'お見積り' : parseInt(product_detail.list_price).toLocaleString('en') + '円' ) : '' }</div>
            </td>
            <!-- <td if={IWAI_SITE}>
              <div data-test="price_test_cafe">
                  { !isNaN(parseInt(product_detail.list_price)) ? (product_detail.list_price == 0 ? 'お見積り' : parseInt(product_detail.list_price).toLocaleString('en') + '円' ) : '' }
                  <input type="hidden" id="selling_tanka_{index}" value="{element.selling_tanka}">
              </div>

            </td> -->
          </tr>
          <tr>
            <th>保存方法</th>
            <td>{product_detail.storage_temperature}</td>
          </tr>
          <tr>
            <th>製品データシート</th>
            <td align="center"><a style="display: {product_detail.url2 ? 'block' : 'none'}" href="{product_detail.url2}" target="_blank">データシート</a></td>
          </tr>
          <tr>
            <th>SDS情報</th>
            <td align="center"><a style="display: {product_detail.sds_url ? 'block' : 'none'}" href="{product_detail.sds_url}" target="_blank">データシート</a></td>
          </tr>
          <tr>
            <th>商品概要</th>
            <td class="product-overview" colspan="5">
              <div class="overview-text">{product_detail.product_overview}</div>
            </td>
          </tr>
          <tr if={showInfoCampaign(product_detail, list_field, kikan_code) || (IWAI_SITE && product_detail.campaign_name && !product_detail.campaign_published_date && !product_detail.campaign_close_date && !product_detail.campaign_start_date && !product_detail.campaign_end_date)}>
            <th>キャンペーン名</th>
            <td colspan="5">
              <a style="display: { product_detail.campaign_url ? 'block' : 'none' }" class="redirect_link_campaign" href="{product_detail.campaign_url ? product_detail.campaign_url : ''}" target="_blank">{product_detail.campaign_name}</a>
              <p style="display: { !product_detail.campaign_url ? 'block' : 'none' }" class="redirect_link_campaign link_color">{product_detail.campaign_name}</p>
            </td>
          </tr>
          <tr if={showInfoCampaign(product_detail, list_field, kikan_code) || (IWAI_SITE && product_detail.campaign_name && !product_detail.campaign_published_date && !product_detail.campaign_close_date && !product_detail.campaign_start_date && !product_detail.campaign_end_date)}>
            <th>キャンペーン適用条件</th>
            <td colspan="5">
              <p>{product_detail.campaign_require}</p>
            </td>
          </tr>
        </table>
        <div class="left" if={(!IWAI_SITE) || (IWAI_SITE && (product_detail.supplier_comp_code == '20000118' || product_detail.supplier_comp_code == '20000190'))} style="margin-top: 10px;">
          <a href={!IWAI_SITE ? 'https://support.bio-purchase.com/notice/' : 'https://www.iwai-chem.co.jp/products/iwec/#module-information'} target="_blank">✔ 掲載情報のご利用にあたって</a>
        </div>
        <table class="dealer-table">
          <thead>
            <tr>
              <th class="table-title" colspan="9">販売店情報</th>
            </tr>
            <tr>
              <td>販売店名</td>
              <td>納入価格</td>
              <td if={!checkVisibleTime('F014')}>標準納期</td>
              <td if={!checkVisibleTime('F015')}>発注締め時間</td>
              <td if={!checkVisibleTime('F016')}>販売店在庫</td>
              <td if={!checkVisibleTime('F017')}>納期目安</td>
              <td>数量</td>
              <td style="min-width:110px;" class="btn-td-class">商品購入</td>
            </tr>
          </thead>
          <tbody>
            <tr each = { element, index in products_dealer_customers_list }>
              <td>{ element.dealer_co_name } { element.dealer_dep_name }</td>
              <td class="right">
               <!--  <div>
                  { !isNaN(parseInt(element.selling_tanka)) ? ((element.list_price == element.selling_tanka) ? 'お見積り' : Math.round(element.selling_tanka).toLocaleString('en') + '円' )  : '' }
                  <input type="hidden" id="selling_tanka_{index}" value="{element.selling_tanka}">
                </div>
                <div>
                  <div style="border-top:0px;">
                    <b style="color:red">
                      { campaign_retail_price_end_date(product_detail.campaign_retail_price,product_detail.campaign_start_date,product_detail.campaign_end_date)}
                    </b>
                </div> -->

                <div data-test="price_sale_test_cafe" if={campaign_retail_price_end_date(product_detail.campaign_retail_price,product_detail.campaign_start_date,product_detail.campaign_end_date,product_detail.campaign_published_date,product_detail.campaign_close_date).length > 0} >
                 <!--  <div style="display: { parseInt(product_detail.campaign_retail_price) >=1 ? 'block' : 'none' }">［キャンペーン中］</div>
                  <div style="border-top:0px; display: { parseInt(product_detail.campaign_retail_price) >=1 ? 'block' : 'none' }"><strike>{ !isNaN(parseInt(product_detail.list_price)) ? (product_detail.list_price == 0 ? 'お見積り' : parseInt(product_detail.list_price).toLocaleString('en') + '円' ) : '' }</strike></div>
                  <div style="border-top:0px; display: { parseInt(product_detail.campaign_retail_price) >=1 ? 'block' : 'none' }"><b style="color: red">{ !isNaN(parseInt(element.selling_tanka)) ? ((product_detail.list_price == element.selling_tanka) ? 'お見積り' : parseInt(element.selling_tanka).toLocaleString('en') + '円' ) : '' }</b></div>
                  <div style="border-top:0px; display: { isNaN(parseInt(product_detail.campaign_retail_price)) || parseInt(product_detail.campaign_retail_price) < 1 ? 'block' : 'none' }">{ !isNaN(parseInt(element.selling_tanka)) ? ((product_detail.list_price == element.selling_tanka) ? 'お見積り' : parseInt(element.selling_tanka).toLocaleString('en') + '円' ) : '' }</div>
                  <div style="border-top:0px; display: { parseInt(product_detail.campaign_retail_price) >=1 ? 'block' : 'none' }" class="campaign_date_{index}">{ campaign_retail_price_end_date(product_detail.campaign_retail_price,product_detail.campaign_start_date,product_detail.campaign_end_date,product_detail.campaign_published_date,product_detail.campaign_close_date)}</div> -->
                  <div style="border-top:0px; display: { parseInt(product_detail.campaign_retail_price) >=1 ? 'block' : 'none' }">{ (!isNaN(parseInt(element.selling_tanka)) && (element.selling_tanka != 0)) ? ( parseInt(element.selling_tanka).toLocaleString('en') + '円' ) : 'お見積り' }</div>
                  <!--<div style="border-top:0px; display: { parseInt(product_detail.campaign_retail_price) >=1 ? 'block' : 'none' }">{ !isNaN(parseInt(element.selling_tanka)) ? ((product_detail.list_price == element.selling_tanka) ? 'お見積り' : parseInt(element.selling_tanka).toLocaleString('en') + '円' ) : '' }</div>-->
                </div>

                <div data-test="price_sale_test_cafe" if={!(campaign_retail_price_end_date(product_detail.campaign_retail_price,product_detail.campaign_start_date,product_detail.campaign_end_date,product_detail.campaign_published_date,product_detail.campaign_close_date).length > 0)} >{ (!isNaN(parseInt(element.selling_tanka)) && (element.selling_tanka != 0)) ? ( parseInt(element.selling_tanka).toLocaleString('en') + '円' ) : 'お見積り' }</div>

                <div if={product_detail.extra_cost_div == '1'}><u class="tooltips" data-tooltip="別途送料が発生します。&#10;詳細は販売店へお問合せ下さい。">※別途費用</u></div>
                <div if={product_detail.extra_cost_div == '2'}><u class="tooltips" data-tooltip="別途設置費用が発生します。&#10;詳細は販売店へお問合せ下さい。">※別途費用</u></div>
                <div if={product_detail.extra_cost_div == '9'}><u class="tooltips" data-tooltip="別途諸費用が発生します。&#10;詳細は販売店へお問合せ下さい。">※別途費用</u></div>

              </td>
              <td if={!checkVisibleTime('F014')}>{ !checkVisibleTime('F014') ? element.standard_delivery_time : '' }</td>
              <td if={!checkVisibleTime('F015')}>{ !checkVisibleTime('F015') ? element.closing_time : '' }</td>

              <td if={!IWAI_SITE && !checkVisibleTime('F016')}><div class="img-loader-F loading_F016" style="display: none">&nbsp;</div><span class="timeout-text" if={souko_zaiko_su_text == 'タイムアウト'}>{ element.souko_zaiko_su_text }</span><span if={element.souko_zaiko_su_text != 'タイムアウト'}>{ element.souko_zaiko_su_text }<p if={element.souko_zaiko_su_updated}>({element.souko_zaiko_su_updated}現在)</p></span></td>
              <td if={!IWAI_SITE && !checkVisibleTime('F017')} style="text-align: center;"><div class="img-loader-F loading_F017" style="display: none">&nbsp;</div><button class="popupform-oversea-open" if={ checkOverSea && checkOverSea != 'タイムアウト' && ( souko_zaiko_su === 0 || souko_zaiko_su === '0' || souko_zaiko_su === '' )}>{ checkOverSea } </button><span if={ checkOverSea && checkOverSea != 'タイムアウト' && souko_zaiko_su !== 0 && souko_zaiko_su !== '0' && souko_zaiko_su !== ''}>{checkOverSea}</span><span class="timeout-text" if={checkOverSea == 'タイムアウト'}>{checkOverSea}</span></td>

              <td if={IWAI_SITE && !checkVisibleTime('F016')}><div class="img-loader-F loading_F016" style="display: none">&nbsp;</div><span class="timeout-text" if={element.souko_zaiko_su_text == 'タイムアウト'}>{ element.souko_zaiko_su_text }</span><span if={element.souko_zaiko_su_text != 'タイムアウト'}>{ element.souko_zaiko_su_text }
              <p if={element.souko_zaiko_su_updated}>({element.souko_zaiko_su_updated}現在)</p></span></td>
              <td if={IWAI_SITE && !checkVisibleTime('F017')} style="text-align: center;"><div class="img-loader-F loading_F017" style="display: none">&nbsp;</div><button class="popupform-oversea-open" if={ element.over_sea_text && element.over_sea_text != 'タイムアウト' && ( souko_zaiko_su === 0 || souko_zaiko_su === '0' || souko_zaiko_su === '' )}>{ element.over_sea_text } </button><span if={ element.over_sea_text && element.over_sea_text != 'タイムアウト' && souko_zaiko_su !== 0 && souko_zaiko_su !== '0' && souko_zaiko_su !== ''}>{element.over_sea_text}</span><span class="timeout-text" if={element.over_sea_text == 'タイムアウト'}>{element.over_sea_text}</span></td>
              <td align="center"><input type="number" min="1" class="order-input spinner" value="1" id="{ 'quantity' + index }" maxlength="10" oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"></td>
              <td class="btn-td btn-td-class" style="display: {member_authority != 5 ? 'table-cell' : 'none'}; white-space: nowrap;">
                <button type="button" class="color-btn red-btn" style="display: { arColumn(list_button, 'navigation_id', 'B002').length ?  'inline' : 'none' ? 'inline' : 'none' };margin:{checkRetailPrice ? '23.5px 0' : '13.5px 0'}" onclick="{ addToCart }" value="{ index }" if={(!isNaN(parseInt(element.selling_tanka)) && (element.selling_tanka != 0) && ((checkCampaign && !checkCampaignRetailPrice) || !(checkCampaign)) )}><i class="fa fa-shopping-cart" aria-hidden="true"></i>{ arColumn(list_button, 'navigation_id', 'B002').length ? arColumn(list_button, 'navigation_id', 'B002')[0]['display_contents']  : '' }</button>
                <button type="button" class="color-btn gray-btn tooltips" style="display: { arColumn(list_button, 'navigation_id', 'B002').length ?  'inline' : 'none' ? 'inline' : 'none' };margin:{checkRetailPrice ? '23.5px 0' : '13.5px 0'}" value="{ index }" if={(isNaN(parseInt(element.selling_tanka)) || (element.selling_tanka == 0) || (checkCampaign && checkCampaignRetailPrice) )} disabled data-tooltip="カートはご利用いただけません。「見積依頼へ」へお進みください。"><i class="fa fa-shopping-cart" aria-hidden="true"></i>{ arColumn(list_button, 'navigation_id', 'B002').length ? arColumn(list_button, 'navigation_id', 'B002')[0]['display_contents']  : '' }</button>
                <button type="button" class="color-btn green-btn" style="display: { arColumn(list_button, 'navigation_id', 'B003').length ? 'inline' : 'none'};margin:{checkRetailPrice ? '23.5px 0' : '13.5px 0'}" onclick="{ addMitsumori }" value="{ index }"><i class="fa fa-arrow-right"></i>{ arColumn(list_button, 'navigation_id', 'B003').length ? arColumn(list_button, 'navigation_id', 'B003')[0]['display_contents']  : '' }</button>
              </td>
              <td style="min-width:110px;" if={ member_authority == 5 && products_dealer_customers_list.length && products_dealer_customers_list[0].dealer_tanto_email }>ご購入・お見積りには本サイトへの登録が必要です。 <br>お問合せ先：<a href="javascript:void()" onclick="{ sendMail }">{ products_dealer_customers_list[0].dealer_tanto_email }</a></td>
              <td style="min-width:110px;" if={ member_authority == 5 && products_dealer_customers_list.length && !products_dealer_customers_list[0].dealer_tanto_email}>
                現在このサイトから商品の購入はできません。<br><a href="https://www.iwai-chem.co.jp/products/service/iwec/application/">登録申請はこちら</a>
              </td>
              <td if={ !member_authority == 5 && !products_dealer_customers_list.length }></td>
            </tr>
          </tbody>
          <tfoot>
            <tr>
              <td if={IWAI_SITE} colspan="8" style="text-align: right;border:none">
                <div class="wrapper-link-search-back">
                  <a href="#iwai-search/simple" class="link-search-back">商品検索画面に戻る</a>
                </div>
              </td>
            </tr>
          </tfoot>
        </table>
        <div class="modal-wrapper">
          <div class="o_modal" id="login-popupform" style="display:none">
            <div class="o_modal_box">
              <div class="o_modal_head">
                <a id="login-popupform-Close" onclick="{ close }"><i class="fa fa-times"></i></a>
              </div>
              <div class="o_modal_body">
                <div class="o_modal_main">
                  <!-- <h3 class="modal-title"></h3> -->
                  
                </div>
              </div>
            </div>
          </div>
        </div>

        <div class="modal-wrapper">
          <div class="o_modal" id="popupform-oversea" style="display:none">
            <div class="o_modal_box">
              <div class="o_modal_head">
                <a id="popupform-oversea-close-link"><i class="fa fa-times"></i></a>
              </div>
              <div class="o_modal_body">
                <div class="o_modal_main">
                  <h3 class="modal-title">納期注意事項</h3>
                  <p>※納期目安は確実な納期ではありません。</p>
 　               <p>詳細な納期はお問い合わせ願います。</p>
                  <br />
                  <p>※国内外ともに在庫無しの場合は納期目安表示の対象外となります。</p>
                  <!-- <p style="text-align: right;"><button id="popupform-oversea-close-button">閉じる</button></p> -->
                </div>
              </div>
            </div>
          </div>
        </div>

        <div class="modal-wrapper">
          <div class="o_modal" id="popupform-comment-for-regulation" style="display:none">
            <div class="o_modal_box">
              <div class="o_modal_head">
                <a id="popupform-comment-for-regulation-close-link"><i class="fa fa-times"></i></a>
              </div>
              <div class="o_modal_body">
                <div class="o_modal_main">
                  <h3 class="modal-title">法規情報について</h3>
                  <table class="table table-striped">
                    <thead>
                      <tr>
                        <th><b>法規情報 表記</b></th>
                        <th><b>内容</b></th>
                      </tr>
                    </thead>
                    <tbody>
                      <tr>
                        <td>毒</td>
                        <td>医薬用外毒物</td>
                      </tr>
                      <tr>
                        <td>劇 </td>
                        <td>医薬用外劇物</td>
                      </tr>
                      <tr>
                        <td>労 </td>
                        <td>
                          <p>労働安全衛生法57条第１項 表示対象物質</p>
                          <p>労働安全衛生法57条2　　　通知対象物質</p>
                        </td>
                      </tr>
                      <tr>
                        <td>原 </td>
                        <td>特定麻薬向精神薬原料</td>
                      </tr>
                      <tr>
                        <td>PR </td>
                        <td>化学物質排出把握管理促進法（ＰＲＴＲ法）指定化学物質</td>
                      </tr>
                      <tr>
                        <td>カ </td>
                        <td>カルタヘナ法対象物質</td>
                      </tr>
                      <tr>
                        <td>危 </td>
                        <td>消防法危険物</td>
                      </tr>
                      <tr>
                        <td>危◯△ </td>
                        <td>危険物第◯類第△石油類　（◯△=数値） </td>
                      </tr>
                      <tr>
                        <td>危４ア </td>
                        <td>危険物第４類アルコール類</td>
                      </tr>
                      <tr>
                        <td>危４特 </td>
                        <td>危険物第４類特殊引火物</td>
                      </tr>
                      <tr>
                        <td>危４油 </td>
                        <td>危険物第４類動植物油類</td>
                      </tr>
                    </tbody>
                  </table>
                  <p>凡例）カ労危４ア：　「カルタヘナ法、安衛法通知対象物質、危険物第４類アルコール類　に該当」</p>
                </div>
              </div>
            </div>
          </div>
        </div>
        <!-- <div class="login-form" style="display:none">
          
        </div> -->
            <script>
            this.IWAI_SITE = IWAI_SITE;
            var user_info = JSON.parse(localStorage.getItem('EcUserInfo'));
            this.product_id = opts.result['product_id'];
            this.list_button = user_info.list_navigation.B;
            this.list_field = user_info.list_navigation.F;
            this.member_authority = user_info.member_authority;
            this.kikan_code = user_info.kikan_code;
            this.product_detail = opts.result['product_detail'][0];
            this.supplier_comp_code = opts.result['product_detail'][0]['supplier_comp_code'];
            if(!IWAI_SITE) {
              this.souko_zaiko_su = opts.result['souko_zaiko_su'];
            }
            this.products_dealer_customers_list = opts.result['products_dealer_customers_list'];
            this.email = this.products_dealer_customers_list.length > 0 ? this.products_dealer_customers_list[0].dealer_tanto_email : '';
            this.list_text_check_1 = ['非消防法危険物 又は未チェック', '非該当', '対象外', '情報なし', '未確認', '未設定', ''];
            this.list_text_check_2 = ['非消防法危険物 又は未チェック', '非該当', '対象外'];
            this.permission = '';
            this.comment_for_regulations = opts.result['product_detail'][0]['comment_for_regulations'];
            this.comment_for_regulations_text = '';
            this.overseas_goods_flag = '';
            this.souko_zaiko_su = '';
            this.souko_zaiko_su_updated = '';
            this.souko_zaiko_su_text = '';
            this.checkOverSea = '';
            this.check_cas_code = false;
            this.checkCampaign = campaign_retail_price_end_date(this.product_detail.campaign_retail_price,this.product_detail.campaign_start_date,this.product_detail.campaign_end_date,this.product_detail.campaign_published_date,this.product_detail.campaign_close_date).length > 0;
            this.checkCampaignRetailPrice = isNaN(parseInt(this.product_detail.campaign_retail_price)) || parseInt(this.product_detail.campaign_retail_price) < 1;
            var thisTag = this;
            // ES old
            this.checkRetailPrice = campaign_retail_price(thisTag.product_detail['campaign_retail_price'],thisTag.product_detail['campaign_start_date'],thisTag.product_detail['campaign_end_date']) != '' ? true : false;
            // ES BRP
            // this.checkRetailPrice = campaign_retail_price(thisTag.product_detail['campaign_suggest_delivery_price'],thisTag.product_detail['campaign_start'],thisTag.product_detail['campaign_end']) != '' ? true : false;
            var product_detail_global = opts.result['product_detail'][0];
            var products_dealer_customers_list_global = opts.result['products_dealer_customers_list'];
            this.SUPPLIER_COMP_CODE = SUPPLIER_COMP_CODE;
            this.MSG4 = MSG4;
            this.on("mount", function(){
              var check_detail = arColumn(thisTag.list_field, 'navigation_id', 'F019');
              if (check_detail.length > 0) {
                if (check_detail[0].display_status == 'Y') {
                  thisTag.check_cas_code = true;
                  thisTag.update(thisTag.check_cas_code);
                }
              }
              $.each(thisTag.products_dealer_customers_list, function(i, e){
                var campaign_date = $(".campaign_date_"+i).html() ? $(".campaign_date_"+i).html().split("|") : '';
                var campaign_start_date = campaign_date[0] ? campaign_date[0] + '～<br>' : '';
                var campaign_end_date = campaign_date[1] ? campaign_date[1] + 'まで' : '';
                $(".campaign_date_" + i).html(campaign_start_date + "" + campaign_end_date);
              })
              if(!IWAI_SITE) {
                var campaign_date = $(".campaign_date_price").html() ? $(".campaign_date_price").html().split("|") : '';
                var campaign_start_date = campaign_date[0] ? campaign_date[0] + '～<br>' : '';
                var campaign_end_date = campaign_date[1] ? campaign_date[1] + 'まで' : '';
                $(".campaign_date_price").html(campaign_start_date + "" + campaign_end_date);
              }

              if(IWAI_SITE) {
                var cas_no = 'CAS番号';
                if(thisTag.check_cas_code){
                  cas_no = 'CAS RN<sup>&reg;</sup>';
                }
                $('.cas_no').html(cas_no);
              }
            });
            $(function(){
                if(IWAI_SITE) {
                  $(".redirect_link_campaign").click(function(e) {
                    if(!$(e.target).attr('href')){
                      e.preventDefault();
                    }
                  });
                }
                thisTag.buttonViewMore();
                popupFormOverSea();
                var spinner = $( ".spinner" ).spinner();
                $('.openEc41').on('click', function () {
                    var index = $(this).attr('index');
                    if ($('#check_cart_delivery_' + index).val() == 0) {
                        var suryo = $('#quantity' + index).val();
                        var accessTokenCognito = localStorage.getItem('accessTokenCognito');
                        var url = URL_API + '/api/cart/create?token=' + accessTokenCognito;
                        var data = [];
                        var item_name = product_detail_global.name_jp;
                        if(product_detail_global.name_jp != '' && product_detail_global.name != ''){
                            item_name = product_detail_global.name;
                        }
                        data.push({ 
                            'supp_sku': product_detail_global.supplier_sku,
                            'item_name': item_name,
                            'item_sku': product_detail_global.sku,
                            'capacity': product_detail_global.volume_unit_label,
                            'kikaku': product_detail_global.class_name_jp,
                            'teika_tanka': product_detail_global.list_price,
                            'maker_name': product_detail_global.maker_name,
                            'supp_co_cd': product_detail_global.supplier_comp_code,
                            'supp_co_name': product_detail_global.sales_origin_maker_name,
                            'dealer_co_cd': products_dealer_customers_list_global[index].dealer_co_cd,
                            'tanka' : products_dealer_customers_list_global[index].selling_tanka,
                            'suryo' : suryo,
                            'status': 2
                        });
                        $.ajax({
                            url: url,
                            type: 'POST',
                            timeout: 20000,
                            data: {
                                data: data
                            },
                            success: function (res) {
                              countTotalCart();
                                if(res.status == 100){
                                    riot.mount('app','maintain',{ messege:res.messege });
                                    return false;
                                }
                                if(data.status == 'not_authorize'){
                                    var url = "#";
                                    $(location).attr("href", url );
                                    return false;
                                }
                                var cart = res.listCart[0];
                                $('#cart_seq_' + index).val(cart.cart_seq);
                                $('#quantity_' + index).text(cart.suryo);
                                $('#check_cart_delivery_' + index).val(1);
                                $('#ec41_' + index).fadeIn();
                            },
                            error: function (xhr, stt, err) {
                                alert('エラー');
                            }
                        });
                    } else {
                        $('#ec41_' + index).fadeIn();
                    }
                });
              $(document).on('click','.closeEc41', function() {
                  var index = $(this).attr('index');
                  $('#check_cart_delivery_' + index).val(0);
                  $('#deliverydate_'+index).val('');
                  $('#comment_spp_'+index).val('');
                  $('#ec41_' + index).fadeOut();
              });
              $( ".order-input" ).spinner({
                stop: function( event, ui ) {
                  var quantity = event.target.id;
                  var order_input = $("#"+ quantity).val();
                  if(order_input != ''){
                    if(order_input <= 0){
                        alert('0以上の正数を入力してください。');
                        $('#' + quantity).val('1');
                    }
                    $(".pdf-tab-view").attr('href','#view-pdf/'+thisTag.product_id+'/' + order_input);
                  } else {
                    $(".pdf-tab-view").attr('href','#view-pdf/'+thisTag.product_id+'/0');
                  }
                }
              });
              checkVisibleCommentForRegulations();
              checkPermission();
              callOwlAndBrp();

              if( thisTag.products_dealer_customers_list.length > 0  && thisTag.member_authority != 5 ) {

                var compCode = thisTag.products_dealer_customers_list[0]['customer_co_cd'];
                var accessTokenCognito = localStorage.getItem('accessTokenCognito');
                var querySuggest = [];
                querySuggest.push('token=' + accessTokenCognito);
                querySuggest.push('comp_code=' + compCode);
                var url = URL_API + '/api/ec12/get_navigation_setting';
                url += '?' + querySuggest.join('&');

                $.ajax({

                  url: url,
                  type: 'GET',
                  timeout: 60000,
                  success: function (res) {                   

                    if(res.status == 100){
                        riot.mount('app','maintain',{ messege:res.messege });
                        return false;
                    }
                    if(res.status == 'not_authorize'){
                        var url = "#";
                        $(location).attr("href", url );
                        return false;
                    }

                    // if( res.navigation_setting.list.length > 0 ) {

                    //   $.each( res.navigation_setting.list, function( nav_key, nav_val ) {

                    //     if ( nav_val.navigation_id == 'B002' || nav_val.navigation_id == 'B003' ) {
                          
                    //       $('.btn-td-class').hide();
                    //       return false;

                    //     }

                    //   }); 

                    // }

                  },
                  error: function (xhr, stt, err) {
                      alert('error');
                  }
                });

              }

            });
  
            callOwlAndBrp = function(e){
              // window.setTimeout(function(){
                var check_detail = arColumn(thisTag.list_field, 'navigation_id', 'F016');
                if(!IWAI_SITE) {
                    getSoukoZaikoSu();
                }
                else {
                  if (check_detail.length > 0) {
                    if (check_detail[0].used_status != 'N' && check_detail[0].display_status != 'N') {
                      getSoukoZaikoSu();
                    }
                  }
                }
                // var check_detail = arColumn(thisTag.list_field, 'navigation_id', 'F017');
                // if (check_detail.length > 0) {
                //   if (check_detail[0].used_status != 'N' && check_detail[0].display_status != 'N') {
                //      getOverseasBrp();
                //     thisTag.checkOverSea = checkOverSea(thisTag.souko_zaiko_su, thisTag.overseas_goods_flag);
                //     thisTag.update(thisTag.checkOverSea)
                //     popupFormOverSea();
                //   }
                // }
              // }, 1000);
            }
            
            getOverseasBrp = function(e){
                var supplier_comp_code = thisTag.product_detail.supplier_comp_code;
                var maker_name = thisTag.product_detail.maker_name;
                var maker_code = thisTag.product_detail.maker_code;
                var maker_brand = thisTag.product_detail.maker_brand;
                var querySuggest = [];
                var accessTokenCognito = localStorage.getItem('accessTokenCognito');
                querySuggest.push('token=' + accessTokenCognito);
                if(supplier_comp_code){
                  querySuggest.push('supplier_comp_code=' + supplier_comp_code);
                }
                if(maker_brand){
                  querySuggest.push('maker_brand=' + encodeURIComponent(maker_brand));
                }
                if(maker_name){
                  querySuggest.push('maker_name=' + encodeURIComponent(maker_name));
                }
                if(maker_code){
                  querySuggest.push('maker_code=' + encodeURIComponent(maker_code));
                }
                var url = URL_API + '/api/get_single_manufacture';
                url += '?' + querySuggest.join('&');
                $.ajax({
                    url: url,
                    type: 'GET',
                    timeout: 20000,
                    // async:false,
                    beforeSend: function() {
                        $('#img-loader').hide();
                        $(".loading_F017").show();
                    },
                    afterSend: function() {
                        $(".loading_F017").hide();
                    },
                    success: function (data) {
                        if(data.status == 100){
                            riot.mount('app','maintain',{ messege:data.messege });
                            return false;
                        }
                        if(data.status == 'not_authorize'){
                            var url = "#";
                            $(location).attr("href", url );
                            return false;
                        }
                        if(data.message == 'success'){
                            var overseas_goods_flag = data.result.overseas_goods_flag;
                            thisTag.overseas_goods_flag = overseas_goods_flag;
                            thisTag.update(thisTag.overseas_goods_flag);
                            $.each(thisTag.products_dealer_customers_list, function(i, e){
                              if((IWAI_SITE && e.souko_zaiko_su >= 0 && !checkEmpty(e.souko_zaiko_su)) || (!IWAI_SITE && e.souko_zaiko_su)){
                                thisTag.products_dealer_customers_list[i]['over_sea_text'] = checkOverSea(e.souko_zaiko_su, thisTag.overseas_goods_flag)
                              } else {
                                thisTag.products_dealer_customers_list[i]['over_sea_text'] = 'タイムアウト';
                              }
                            });
                            thisTag.update(thisTag.products_dealer_customers_list);
                            popupFormOverSea();
                        } 
                        $(".loading_F017").hide();
                        if(data.message == 'error'){
                          thisTag.checkOverSea = 'タイムアウト';
                          thisTag.update(thisTag.checkOverSea);
                        }
                    },
                    error: function (xhr, stt, err) {
                        $(".loading_F017").hide();
                        thisTag.overseas_goods_flag = 'タイムアウト';
                        thisTag.update(thisTag.overseas_goods_flag);
                    }
                });
            }
            updateSoukoZaikoSu = function(list_owl, param){
                var result = {};
                var list_result = [];
                var max_souko = 0;
                $.each(thisTag.products_dealer_customers_list, function(index_dealer_cus, value_dealer_cus){
                  if(list_owl.length == 0){
                    thisTag.products_dealer_customers_list[index_dealer_cus]['souko_zaiko_su_updated'] = '';
                    thisTag.products_dealer_customers_list[index_dealer_cus]['souko_zaiko_su_text'] = '取寄品';
                    thisTag.products_dealer_customers_list[index_dealer_cus]['souko_zaiko_su'] = '';
                  }
                  $.each(list_owl, function(i, e){
                    var souko_list = [];
                    if(!IWAI_SITE) {
                      $.each(param.list_dealer_cd, function(index_dealer_cd, dealer_cd){
                        var item = param.sku + "_" + dealer_cd;
                        if(i == item){
                          var souko_zaiko_su = parseInt(e.souko_zaiko_su);
                          var souko_zaiko_su_updated = e.updated;
                          if(value_dealer_cus.dealer_co_cd == dealer_cd){
                            thisTag.products_dealer_customers_list[index_dealer_cus]['souko_zaiko_su_updated'] = souko_zaiko_su_updated;
                            thisTag.products_dealer_customers_list[index_dealer_cus]['souko_zaiko_su_text'] = souko_zaiko_su ? (souko_zaiko_su >= 3 ? '3以上' : souko_zaiko_su)  : '取寄品';
                            thisTag.products_dealer_customers_list[index_dealer_cus]['souko_zaiko_su'] = souko_zaiko_su ;
                          }
                        } else {
                          thisTag.products_dealer_customers_list[index_dealer_cus]['souko_zaiko_su_updated'] = '';
                          thisTag.products_dealer_customers_list[index_dealer_cus]['souko_zaiko_su_text'] = '取寄品';
                          thisTag.products_dealer_customers_list[index_dealer_cus]['souko_zaiko_su'] = '';
                        }
                      });
                    }
                    else {
                      var item = param.sku + "_" + value_dealer_cus.dealer_co_cd;
                      if(i == item){
                        var souko_zaiko_su = e.souko_zaiko_su >= 0 && !checkEmpty(e.souko_zaiko_su) ? parseInt(e.souko_zaiko_su) : '';
                        var souko_zaiko_su_updated = e.updated;
                          thisTag.products_dealer_customers_list[index_dealer_cus]['souko_zaiko_su_updated'] = souko_zaiko_su_updated;
                          thisTag.products_dealer_customers_list[index_dealer_cus]['souko_zaiko_su_text'] = souko_zaiko_su >= 0 ? (souko_zaiko_su >= 3 ? '3以上' : souko_zaiko_su)  : '取寄品';
                          thisTag.products_dealer_customers_list[index_dealer_cus]['souko_zaiko_su'] = souko_zaiko_su ;
                        
                      } else {
                        thisTag.products_dealer_customers_list[index_dealer_cus]['souko_zaiko_su_updated'] = '';
                        thisTag.products_dealer_customers_list[index_dealer_cus]['souko_zaiko_su_text'] = '取寄品';
                        thisTag.products_dealer_customers_list[index_dealer_cus]['souko_zaiko_su'] = '';
                      }
                    }
                  });
                });  
                thisTag.update(thisTag.products_dealer_customers_list);
            }
            getSoukoZaikoSu = function(e){
                var querySuggest = [];
                var sku = thisTag.product_detail.sku;
                var products_dealer_customers_list = thisTag.products_dealer_customers_list;
                if(!IWAI_SITE) {
                  var supplier_comp_code = thisTag.product_detail.supplier_comp_code;
                }
                var list_dealer_cd = [];
                $.each(products_dealer_customers_list, function(i, e){
                  list_dealer_cd.push(e.dealer_co_cd);
                });
                var accessTokenCognito = localStorage.getItem('accessTokenCognito');
                querySuggest.push('token=' + accessTokenCognito);
                querySuggest.push('sku=' + encodeURIComponent(sku));
                querySuggest.push('list_dealer_cd=' + list_dealer_cd.join(","));
                var url = URL_API + '/api/owl/get_souko_zaiko_su';
                url += '?' + querySuggest.join('&');
                $.ajax({
                    url: url,
                    type: 'GET',
                    timeout: 20000,
                    // async:false,
                    beforeSend: function() {
                        $('#img-loader').hide();
                        $(".loading_F016").show();
                    },
                    afterSend: function() {
                        $(".loading_F016").hide();
                    },
                    success: function (data) {
                        if(data.status == 100){
                            riot.mount('app','maintain',{ messege:data.messege });
                            return false;
                        }
                        if(data.status == 'not_authorize'){
                            var url = "#";
                            $(location).attr("href", url );
                            return false;
                        }
                        if(data.message == 'success'){
                            var list_souko = data.list_owl;
                            var param = {
                              sku: sku,
                              list_dealer_cd: list_dealer_cd
                            };
                            updateSoukoZaikoSu(list_souko, param);
                        }
                        $(".loading_F016").hide();
                        var check_detail = arColumn(thisTag.list_field, 'navigation_id', 'F017');
                        if (check_detail.length > 0) {
                          if (check_detail[0].used_status != 'N' && check_detail[0].display_status != 'N') {
                            getOverseasBrp();
                          }
                        }
                    },
                    error: function (xhr, stt, err) {
                        $(".loading_F016").hide();
                        thisTag.checkOverSea = 'タイムアウト';
                        thisTag.update(thisTag.checkOverSea);
                        thisTag.souko_zaiko_su = 'タイムアウト';
                        thisTag.update(thisTag.souko_zaiko_su);
                    }
                });
            }
            popupFormOverSea = function (){
              $('.popupform-oversea-open').on('click',function(e){
                $('#popupform-oversea').fadeIn();
              });
              $('#popupform-oversea-close-link').on('click',function(e){
                $('#popupform-oversea').fadeOut();
              });
              $('#popupform-oversea-close-button').on('click',function(e){
                $('#popupform-oversea').fadeOut();
              });
            }
            popupFormCommentForRegulations = function(e){
              $('.popupform-comment-for-regulation-open').on('click',function(e){
                $('#popupform-comment-for-regulation').fadeIn();
              });
              $('#popupform-comment-for-regulation-close-link').on('click',function(e){
                $('#popupform-comment-for-regulation').fadeOut();
              });
              $('#popupform-comment-for-regulation-close-button').on('click',function(e){
                $('#popupform-comment-for-regulation').fadeOut();
              });
            }
            checkVisibleTime = function (navigation_id) { // with navigation type F
              var check_detail = arColumn(thisTag.list_field, 'navigation_id', navigation_id);
              if (check_detail.length > 0) {
                  if (check_detail[0].used_status == 'N' || check_detail[0].display_status == 'N') {
                      return true;
                  }
              }
              return false;
            }

            checkOverSea = function (souko_zaiko_su, over_sea){
                var text = 'タイムアウト';
                if(!souko_zaiko_su || souko_zaiko_su === '0' || souko_zaiko_su === 0){
                    if(over_sea !== 0 && over_sea !== '0'){
                        text = "１０～１４営業日";
                    } else {
                        text = '２～５営業日';
                    }
                } else {
                    if(over_sea === 0 || over_sea === '0'){
                        text = "１～３営業日";
                    } else {
                        text = '１～３営業日';
                    }
                }
                return text;
            } 
            checkVisibleCommentForRegulations = function(e){
              // thisTag.supplier_comp_code  = '20000057';
                 // thisTag.comment_for_regulations = '未発注品casc'; 
                var comment_for_regulations = thisTag.comment_for_regulations; 
                var supplier_comp_code = thisTag.supplier_comp_code;
                if(supplier_comp_code == '20000057' && comment_for_regulations){
                    if(comment_for_regulations == '未発注品'){
                        thisTag.comment_for_regulations_text = 'ご依頼をいただいた上で改めて法規制の確認をさせていただきますため、取り扱いができない場合がございますのでご留意ください。';
                    } else {
                        thisTag.comment_for_regulations_text = comment_for_regulations;
                    }
                } else {
                  thisTag.comment_for_regulations_text = '';
                }
                thisTag.update(thisTag.comment_for_regulations_text);
                popupFormCommentForRegulations();
            }
            this.buttonViewMore = function(e){
                $(".view-more-mobile").click(function(){
                  var parent_item = $(this).parent('.items-label').parent('.items');
                  var items = parent_item.children(".items-content");
                  if(!items.hasClass("open-content")){
                    $(this).text('縮小');
                    items.addClass("open-content");
                  } else {
                    $(this).text('拡大');
                    items.removeClass("open-content");
                  }
                });
            }

            checkPermission = function (e){

                var accessTokenCognito = localStorage.getItem('accessTokenCognito');
                var url = URL_API + '/api/check_permission?token=' + accessTokenCognito;
                $.ajax({
                    url: url,
                    type: 'GET',
                    timeout: 20000,
                    success: function (data) {
                        if(data.status == 100){
                            riot.mount('app','maintain',{ messege:data.messege });
                            return false;
                        }
                        if(data.status == 'not_authorize'){
                            var url = "#";
                            $(location).attr("href", url );
                            return false;
                        }
                        if(data.message == 'success'){
                            var member_authority = data.permission.member_authority;
                            thisTag.permission = member_authority;

                            thisTag.update(thisTag.permission);
                        }
                    },
                    error: function (xhr, stt, err) {
                        alert('エラー');
                    }
                });
            }
            addToCart = function (e) {
                var index = e.target.value;

                var quantity = $('#quantity' + index).val();
                var date = new Date();
                var order_date = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate();
                var accessTokenCognito = localStorage.getItem('accessTokenCognito');
                var url = URL_API + '/api/cart/create?token=' + accessTokenCognito + '&is_ariba=' + true;
                var data = [];
                var name = '';
                var agent = localStorage.getItem('agent_id');

                if (this.product_detail['name_jp'] != '' && this.product_detail['name_jp'] != null) {
                  name = this.product_detail['name_jp'];
                } else {
                  name = this.product_detail['name'];
                }
                if(this.product_detail['supplier_comp_code'] == this.SUPPLIER_COMP_CODE && this.product_detail['msg4'] && this.product_detail['msg4'] !== this.MSG4 ) {
                  name = this.product_detail['name'] + '【' + this.product_detail['msg4'] + '】';
                }
                if(quantity == '-'){
                  quantity = '';
                }
                data.push({
                    'supp_sku': this.product_detail.supplier_sku,
                    'item_name': name,
                    'item_sku': this.product_detail.sku,
                    'capacity': this.product_detail.volume_unit_label,
                    'kikaku': this.product_detail.class_name_jp,
                    // 'teika_tanka': this.product_detail.list_price,
                    'maker_name': this.product_detail.maker_name,
                    'supp_co_cd': this.product_detail.supplier_comp_code,
                    'supp_co_name': this.product_detail.sales_origin_maker_name,
                    'dealer_co_cd': this.products_dealer_customers_list[index].dealer_co_cd,
                    'dealer_dep_cd': this.products_dealer_customers_list[index].dealer_dep_cd,
                    'tanka': $("#selling_tanka_" + index).val(),
                    'suryo': quantity,
                    'agent_users_id': agent,
    //                'order_date': order_date,
                    'status': 0
                });
                $.ajax({
                    url: url,
                    type: 'POST',
                    timeout: 20000,
                    data: {
                        data: data,
                        screen: 'ec12'
                    },
                    success: function (data) {
                        if(data.status == 100){
                            riot.mount('app','maintain',{ messege:data.messege });
                            return false;
                        }
                        if(data.status == 'not_authorize'){
                            var url = "#";
                            $(location).attr("href", url );
                            return false;
                        }
                        // alert('カートに追加しました。');
    //                    riot.route('/carts/cartlist');
                        if (data.message && data.errors) {
                            alert("処理が実行できませんでした。時間をおいて再度お試しください。同様のメッセージが再度出る場合はお手数ですがシステム提供者にご連絡ください。");
                        } else {
                            countTotalCart();
                            alert('カートに追加しました。\nカート画面から発注処理を行ってください。');
                        }
                    },
                    error: function (xhr, stt, err) {
                        alert('エラー');
                    }
                });
            };
            deliveryDate = function (e) {
                var index = e.target.value;
                var car_seq = $('#cart_seq_' + index).val();
                var suryo = $('#quantity_' + index).text();
                var kakuko = $('.kakudo:checked').val();
                var deliverydate = $('#deliverydate_'+index).val();
                var comment_spp = $('#comment_spp_'+index).val();
                var accessTokenCognito = localStorage.getItem('accessTokenCognito');
                var url = URL_API + '/api/cart/create?token=' + accessTokenCognito;
                var agent = localStorage.getItem('agent_id');
                var data = [];
                data.push({
                    'cart_seq': car_seq,
    //                'suryo' : suryo,
                    'kakuko': kakuko,
                    'deliverydate': deliverydate,
                    'agent_users_id': agent,
                    'comment_spp': comment_spp
                });
                $.ajax({
                    url: url,
                    type: 'POST',
                    timeout: 20000,
                    data: {
                        data: data,
                        screen: 'ec12'
                    },
                    success: function (data) {
                        if(data.status == 100){
                            riot.mount('app','maintain',{ messege:data.messege });
                            return false;
                        }
                        if(data.status == 'not_authorize'){
                            var url = "#";
                            $(location).attr("href", url );
                            return false;
                        }
                        countTotalCart();
                        alert('納期照会に追加しました。');
    //                    riot.route('/delivery/inquiries_list');
                    },
                    error: function (xhr, stt, err) {
                        alert('エラー');
                    }
                });
            };
            addFavorite = function () {
                var accessTokenCognito = localStorage.getItem('accessTokenCognito');
                var url = URL_API + '/api/cart/create?token=' + accessTokenCognito;
                var agent = localStorage.getItem('agent_id');
                var data = [];
                var name = '';

                if (this.product_detail['name_jp'] != '' && this.product_detail['name_jp'] != null) {
                  name = this.product_detail['name_jp'];
                } else {
                  name = this.product_detail['name'];
                }
                if(this.product_detail['supplier_comp_code'] == this.SUPPLIER_COMP_CODE && this.product_detail['msg4'] && this.product_detail['msg4'] !== this.MSG4) {
                  name = this.product_detail['name'] + '【' + this.product_detail['msg4'] + '】';
                }
                data.push({
                    'supp_sku': this.product_detail.supplier_sku,
                    'item_name': name,
                    'item_sku': this.product_detail.sku,
                    'capacity': this.product_detail.volume_unit_label,
                    'kikaku': this.product_detail.class_name_jp,
                    // 'teika_tanka': this.product_detail.list_price,
                    'agent_users_id': agent,
                    'maker_name': this.product_detail.maker_name,
                    'supp_co_cd': this.product_detail.supplier_comp_code,
                    'supp_co_name': this.product_detail.sales_origin_maker_name,
                    'price_group': this.product_detail.price_group,
                    'dealer_co_cd': this.products_dealer_customers_list[0] ? this.products_dealer_customers_list[0].dealer_co_cd : '',
                    'dealer_dep_cd': this.products_dealer_customers_list[0] ? this.products_dealer_customers_list[0].dealer_dep_cd : '',
                    'favorite_status': 1
                });

                $.ajax({
                    url: url,
                    type: 'POST',
                    timeout: 20000,
                    data: {
                      data: data,
                      screen: 'ec12'
                    },
                    success: function (data) {
                      if(data.status == 100){
                          riot.mount('app','maintain',{ messege:data.messege });
                          return false;
                      }
                      if(data.status == 'not_authorize'){
                          var url = "#";
                          $(location).attr("href", url );
                          return false;
                      }
                      if(data.message == 'success'){
                        countTotalCart();
                        alert('お気に入りリストに追加しました。'); 
                        return false;
                      } 
                      
                      if(data.message == 'errors'){
                        var errors = [];  
                        $.each(data.errors,function(key,item){
                          errors.push(item + '\n');
                        });

                        var err = errors.join('');
                        alert(err);
                        return false;
                      }
    //                    riot.route('/carts/cartlist');
                    },
                    error: function (xhr, stt, err) {
                       alert('エラー');
                    }
                });
            }
            addMitsumori = function (e) {
                var index = e.target.value;
                var quantity = $('#quantity' + index).val();
                var accessTokenCognito = localStorage.getItem('accessTokenCognito');
                var url = URL_API + '/api/cart/create?token=' + accessTokenCognito;
                var agent = localStorage.getItem('agent_id');
                var data = [];
                var name = '';

                if (this.product_detail['name_jp'] != '' && this.product_detail['name_jp'] != null) {
                  name = this.product_detail['name_jp'];
                } else {
                  name = this.product_detail['name'];
                }
                if(this.product_detail['supplier_comp_code'] == this.SUPPLIER_COMP_CODE && this.product_detail['msg4'] && this.product_detail['msg4'] !== this.MSG4) {
                  name = this.product_detail['name'] + '【' + this.product_detail['msg4'] + '】';
                }
                data.push({
                    'supp_sku': this.product_detail.supplier_sku,
                    'item_name': name,
                    'agent_users_id': agent,
                    'item_sku': this.product_detail.sku,
                    'capacity': this.product_detail.volume_unit_label,
                    'kikaku': this.product_detail.class_name_jp,
                    'teika_tanka': this.product_detail.list_price,
                    'maker_name': this.product_detail.maker_name,
                    'supp_co_cd': this.product_detail.supplier_comp_code,
                    'supp_co_name': this.product_detail.sales_origin_maker_name,
                    'dealer_co_cd': this.products_dealer_customers_list[index].dealer_co_cd,
                    'dealer_dep_cd': this.products_dealer_customers_list[index].dealer_dep_cd,
                    'tanka': Math.round(this.products_dealer_customers_list[index].selling_tanka),
                    'suryo': quantity,
                    'mitsumori_status': 1,
                    'mitsumori_request_date': new Date().toJSON().slice(0,10).replace(/-/g,'-')
                });

                $.ajax({
                    url: url,
                    type: 'POST',
                    timeout: 20000,
                    data: {
                      data: data,
                      screen: 'ec12'
                    },
                    success: function (data) {
                        if(data.status == 100){
                            riot.mount('app','maintain',{ messege:data.messege });
                            return false;
                        }
                        if(data.status == 'not_authorize'){
                            var url = "#";
                            $(location).attr("href", url );
                            return false;
                        }
                        countTotalCart();
                        alert('見積フォルダに追加しました。\n見積フォルダから見積依頼処理を行ってください。');
    //                    riot.route('/carts/cartlist');
                    },
                    error: function (xhr, stt, err) {
                       alert('エラー');
                    }
                });
            }

            exportPdf = function() {

              var orderInput = $(".order-input").val();
              var windowheight = $( window ).height();
              var accessTokenCognito = localStorage.getItem('accessTokenCognito');
              var url = URL_API + '/api/ec12PO/export_pdf?token=' + accessTokenCognito;
              var data = [];
              data.push({
                  'order_input': orderInput,
                  'products_dealer_customers_list': this.products_dealer_customers_list,
                  'product_detail': this.product_detail,
              });
              $.ajax({
                  url: url,
                  type: 'POST',
                  timeout: 20000,
                  data: {
                    data: data
                  },
                  success: function (data) {
                    if(data.status == 100){
                        riot.mount('app','maintain',{ messege:data.messege });
                        return false;
                    }
                    if(data.status == 'not_authorize'){
                        var url = "#";
                        $(location).attr("href", url );
                        return false;
                    }
                    // $('.pdf-tab-view').attr('href',data.pdf_url);
                    $('.pdf-tab-view').attr('href',data.pdf_url);
                    // $('.pdf-tab-view').trigger("click");
                    // $('.o_modal').css('display', 'block');
                    // $(".popup-pdf").html('<iframe style="overflow:hidden;" height="'+windowheight+'" width="100%" allowfullscreen scrolling="no" src="'+data.pdf_url+'" frameborder="0" allowfullscreen></iframe>');
                    document.getElementById("pdf-tab-view").click();
                    // $( ".pdf-tab-view" ).click();
                      //alert('見積依頼しました。');
  //                    riot.route('/carts/cartlist');
                  },
                  error: function (xhr, stt, err) {
                     alert('エラー');
                  }
              });

            }
            this.close = function(){
                $('#S02-3').fadeOut();
            }

            sendMail = function() {
              if(thisTag.products_dealer_customers_list[0].dealer_tanto_email){
                window.location.href = "mailto:"+thisTag.email+"?subject=BPMサイト登録のお問合せ";
              }
            }
            // $(document).on('click', '.link-search-back', function() {
            //     button_back_ec12 = 'ec12toec10';
            // })
        </script>
</description-po>
