<s09>
    <link rel="stylesheet" href="css/S09.css">
    <link rel="stylesheet" href="css/popup.css">
    <div class="main">
      <div class="content">
        <div class="page-title">
          <h2>商品情報詳細（サプライヤ用）</h2>
        </div>
        <table class="detail-table">
          <tr>
            <th>商品コード</th>
            <td colspan="5">
              {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>
            </td>
          </tr>
          <tr>
            <th>品名</th>
            <td colspan="5">
             	<p if={IWAI_SITE}>{product_detail.name_jp}</p>
		<p if={!IWAI_SITE}>{product_detail.name}</p>
             	<p if={!IWAI_SITE}>{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="7">商品画像</th>
            <td class="product-img" rowspan="7">
              <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>CAS番号</th>
            <td>{product_detail.cas_code}</td>
            <th>EANコード</th>
            <td>{product_detail.ean}</td>
          </tr>
          <tr>
            <th>メーカー在庫情報</th>
            <td>{product_detail.reg_stock}</td>
            <th>メーカー標準納期</th>
            <td>{product_detail.reg_devtime}</td>
          </tr>
          <tr>
            <th>定価</th>
            <td class="left">
              { !isNaN(parseInt(product_detail.list_price)) ? (product_detail.list_price == 0 ? 'お見積り' : parseInt(product_detail.list_price).toLocaleString('en') + '円' ) : '' }
              <!-- <div if={campaign_retail_price(product_detail.campaign_retail_price,product_detail.campaign_start_date,product_detail.campaign_end_date) == ''}>{ !isNaN(parseInt(product_detail.list_price)) ? parseInt(product_detail.list_price).toLocaleString('en') + '円': '' }</div>
              <div if={campaign_retail_price(product_detail.campaign_retail_price,product_detail.campaign_start_date,product_detail.campaign_end_date) != ''}><strike>{ !isNaN(parseInt(product_detail.list_price)) ? parseInt(product_detail.list_price).toLocaleString('en') + '円': '' }</strike></div>
              <hr style="border-top: 1px solid #ccc;margin: 10px 0px;">
              <div><b style="color:red">{ campaign_retail_price(product_detail.campaign_retail_price,product_detail.campaign_start_date,product_detail.campaign_end_date)}</b> <br> { campaign_retail_price_end_date(product_detail.campaign_retail_price,product_detail.campaign_start_date,product_detail.campaign_end_date)}</div> -->
            </td>
            <th>仕切価</th>
            <td>{product_detail.dealer_price}</td>
          </tr>
           <tr>
            <th>キャンペーン価格</th>
             <td style="color: red">
               <div 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.campaign_retail_price)) ? (product_detail.campaign_retail_price == 0 ? 'お見積り' : parseInt(product_detail.campaign_retail_price).toLocaleString('en') + '円' ) : '' }
               </div>
             </td>
            <th>キャンペーン仕切価</th>
             <td>
               <div 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.campaign_dealer_price)) ? (product_detail.campaign_dealer_price == 0 ? 'お見積り' : parseInt(product_detail.campaign_dealer_price).toLocaleString('en') + '円' ) : '' }
               </div>
             </td>
          </tr>
          <tr>
            <th>販売店連絡事項</th>
            <td colspan="3">{product_detail.msg2dealer ? product_detail.msg2dealer : ""}</td>
          </tr>
          <tr>
            <th rowspan="3">法規情報</th>
            <td rowspan="3" colspan="3" if={(arColumn(list_field, 'navigation_id', 'F007').length > 0) && IWAI_SITE}>
            <td rowspan="3" colspan="3" if={(arColumn(list_field, 'navigation_id', 'F007').length > 0) && arColumn(list_field, 'navigation_id', 'F007')[0].used_status == 'Y' && !IWAI_SITE}>
              <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.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.biological_origin_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) : '土壌汚染対策法: 情報なし22'}</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.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.biological_origin_name && !product_detail.soil_contamination_name) ? '非該当' : ''}</div>

            </td>
            <td rowspan="3" 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.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.biological_origin_name && !product_detail.soil_contamination_name)}>

                <div>{(list_text_check_1.indexOf(product_detail.hazadous_name) >= 0) ? (arColumn(list_field, 'navigation_id', 'F007').length > 0 ? '危険物: '+ (product_detail.hazadous_name ? product_detail.hazadous_name : '情報なし') : '')  : '危険物: '+ (product_detail.hazadous_name ? product_detail.hazadous_name : '情報なし')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.poisonous_material_name) >= 0) ? (arColumn(list_field, 'navigation_id', 'F007').length ? '毒劇物: '+ (product_detail.poisonous_material_name ? product_detail.poisonous_material_name : '情報なし'): '' ) : '毒劇物: '+ (product_detail.poisonous_material_name ? product_detail.poisonous_material_name : '情報なし')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.poisonous_medicine_name) >= 0) ? (arColumn(list_field, 'navigation_id', 'F007').length ? '毒劇薬: '+ (product_detail.poisonous_medicine_name ? product_detail.poisonous_medicine_name : '情報なし') : '') : '毒劇薬: '+(product_detail.poisonous_medicine_name ? product_detail.poisonous_medicine_name : '情報なし')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.medicine_name) >= 0) ? (arColumn(list_field, 'navigation_id', 'F007').length ? '医薬品: '+ (product_detail.medicine_name ? product_detail.medicine_name : '情報なし') : '') : '医薬品: '+ (product_detail.medicine_name ? product_detail.medicine_name : '情報なし') }</div>

                <div>{(list_text_check_1.indexOf(product_detail.animal_medicine_name) >= 0) ? (arColumn(list_field, 'navigation_id', 'F007').length ? '動物薬: '+ (product_detail.animal_medicine_name ? product_detail.animal_medicine_name : '情報なし') : ''): '動物薬: '+ (product_detail.animal_medicine_name ? product_detail.animal_medicine_name : '情報なし') }</div>

                <div>{(list_text_check_1.indexOf(product_detail.specifical_medicine_name) >= 0) ? (arColumn(list_field, 'navigation_id', 'F007').length ? '指定薬物: '+(product_detail.specifical_medicine_name ? product_detail.specifical_medicine_name : '情報なし') : '')  : '指定薬物: '+ (product_detail.specifical_medicine_name ? product_detail.specifical_medicine_name : '情報なし') }</div>

                <div>{(list_text_check_1.indexOf(product_detail.medical_equipmentl_name) >= 0) ? (arColumn(list_field, 'navigation_id', 'F007').length ? '医療機器: ' + (product_detail.medical_equipmentl_name ? product_detail.medical_equipmentl_name : '情報なし') : '' ) : '医療機器: '+ (product_detail.medical_equipmentl_name ? product_detail.medical_equipmentl_name : '情報なし') }</div>

                <div>{(list_text_check_1.indexOf(product_detail.psychotropic_drug_name) >= 0) ? (arColumn(list_field, 'navigation_id', 'F007').length ? '麻薬・向精神薬: '+ (product_detail.psychotropic_drug_name ? product_detail.psychotropic_drug_name : '情報なし') : '') : '麻薬・向精神薬: '+(product_detail.psychotropic_drug_name ? product_detail.psychotropic_drug_name : '情報なし')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.stimulant_drug_material_name) >= 0) ? (arColumn(list_field, 'navigation_id', 'F007').length ? '覚せい剤原料: '+ (product_detail.stimulant_drug_material_name ? product_detail.stimulant_drug_material_name : '情報なし') : '') : '覚せい剤原料: '+ (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) ? (arColumn(list_field, 'navigation_id', 'F007').length ? '免税アルコール: '+ (product_detail.duty_free_alcohol_name ? product_detail.duty_free_alcohol_name : '情報なし') : '') : '免税アルコール: '+(product_detail.duty_free_alcohol_name ? product_detail.duty_free_alcohol_name : '情報なし')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.cartagenal_name) >= 0) ? (arColumn(list_field, 'navigation_id', 'F007').length ? 'カルタヘナ: '+(product_detail.cartagenal_name ? product_detail.cartagenal_name : '情報なし') : '')  : 'カルタヘナ: '+(product_detail.cartagenal_name ? product_detail.cartagenal_name : '情報なし')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.prtrl_name) >= 0) ? (arColumn(list_field, 'navigation_id', 'F007').length ? 'PRTR法: '+ (product_detail.prtrl_name ? product_detail.prtrl_name : '情報なし') : '')  : 'PRTR法: '+(product_detail.prtrl_name ? product_detail.prtrl_name : '情報なし')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.cscll_name) >= 0) ? (arColumn(list_field, 'navigation_id', 'F007').length ? '化審法: '+(product_detail.cscll_name ? product_detail.cscll_name : '情報なし') : '')  : '化審法: '+(product_detail.cscll_name ? product_detail.cscll_name : '情報なし')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.international_controlled_substance_name) > 0) ? (arColumn(list_field, 'navigation_id', 'F007').length ? '国際規制物質: '+(product_detail.international_controlled_substance_name ? product_detail.international_controlled_substance_name : '情報なし') : '')  : '国際規制物質: '+(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) ? (arColumn(list_field, 'navigation_id', 'F007').length ? 'オゾン層保護法: '+ (product_detail.ozone_protect_name ? product_detail.ozone_protect_name : '情報なし') : '')  : 'オゾン層保護法: '+(product_detail.ozone_protect_name ? product_detail.ozone_protect_name : '情報なし')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.chemical_weapon_name) >= 0) ? (arColumn(list_field, 'navigation_id', 'F007').length ? '化学兵器禁止法: '+(product_detail.chemical_weapon_name ? product_detail.chemical_weapon_name : '情報なし') : '')   : '化学兵器禁止法: '+(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) ? (arColumn(list_field, 'navigation_id', 'F007').length ? '労働安全衛生法: '+(product_detail.safety_and_health_act_name ? product_detail.safety_and_health_act_name : '情報なし') : '')  : '労働安全衛生法: '+(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) ? (arColumn(list_field, 'navigation_id', 'F007').length ? 'SDS該当区分: '+(product_detail.sds_name ? product_detail.sds_name : '情報なし') : '') : 'SDS該当区分: '+(product_detail.sds_name ? product_detail.sds_name : '情報なし')}</div>

                <div>{(list_text_check_1.indexOf(product_detail.radiation_hazard_prevention_name) >= 0) ? (arColumn(list_field, 'navigation_id', 'F007').length ? '放射線障害防止法: '+(product_detail.radiation_hazard_prevention_name ? product_detail.radiation_hazard_prevention_name : '情報なし') : '')  : '放射線障害防止法: '+(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) ? (arColumn(list_field, 'navigation_id', 'F007').length ? '水質汚濁防止法: '+(product_detail.water_pollution_control_name ? product_detail.water_pollution_control_name : '情報なし') : '') : '水質汚濁防止法: '+(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) ? (arColumn(list_field, 'navigation_id', 'F007').length ? '大気汚染防止法: '+(product_detail.air_pollution_control_name ? product_detail.air_pollution_control_name : '情報なし') : '')  : '大気汚染防止法: '+(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>
              <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 && !product_detail.biological_origin_name && !product_detail.soil_contamination_name) ? 'なし' : ''}</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={overseas_goods_flag > 0}>
                <p>当欄に表示がない製品も含め法規制情報は最新でない可能性があります。</p>
                <p>再確認後、取扱い出来ない場合もございますが予めご了承ください。</p>
              </div>
            </td>
           <!--  <td rowspan="3" colspan="3">
              

              <div>{product_detail.hazadous_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.hazadous_name) > 0) ? '危険物: '+product_detail.hazadous_name : ''}</div>

              <div>{product_detail.poisonous_material_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.poisonous_material_name) > 0) ? '毒劇物: '+product_detail.poisonous_material_name : ''}</div>

              <div>{product_detail.poisonous_medicine_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.poisonous_medicine_name) > 0) ? '毒劇薬: '+product_detail.poisonous_medicine_name : ''}</div>
              <div>{product_detail.medicine_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.medicine_name) > 0) ? '医薬品: '+product_detail.medicine_name : ''}</div>
              <div>{product_detail.animal_medicine_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.animal_medicine_name) > 0) ? '動物薬: '+product_detail.animal_medicine_name : ''}</div>
              <div>{product_detail.specifical_medicine_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.specifical_medicine_name) > 0) ? '指定薬物: '+product_detail.specifical_medicine_name : ''}</div>
              <div>{product_detail.medical_equipmentl_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.medical_equipmentl_name) > 0) ? '医療機器: '+product_detail.medical_equipmentl_name : ''}</div>
              <div>{product_detail.psychotropic_drug_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.psychotropic_drug_name) > 0) ? '麻薬・向精神薬: '+product_detail.psychotropic_drug_name : ''}</div>
              <div>{product_detail.stimulant_drug_material_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.stimulant_drug_material_name) > 0) ? '覚せい剤原料: '+product_detail.stimulant_drug_material_name : ''}</div>
              <div>{product_detail.duty_free_alcohol_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.duty_free_alcohol_name) > 0) ? '免税アルコール: '+product_detail.duty_free_alcohol_name : ''}</div>
              <div>{product_detail.cartagenal_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.cartagenal_name) > 0) ? 'カルタヘナ: '+product_detail.cartagenal_name : ''}</div>
              <div>{product_detail.prtrl_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.prtrl_name) > 0) ? 'PRTR法: '+product_detail.prtrl_name : ''}</div>
              <div>{product_detail.cscll_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.cscll_name) > 0) ? '化審法: '+product_detail.cscll_name : ''}</div>
              <div>{product_detail.international_controlled_substance_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.international_controlled_substance_name) > 0) ? '国際規制物質: '+product_detail.international_controlled_substance_name : ''}</div>
              <div>{product_detail.ozone_protect_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.ozone_protect_name) > 0) ? 'オゾン層保護法: '+product_detail.ozone_protect_name : ''}</div>
              <div>{product_detail.chemical_weapon_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.chemical_weapon_name) > 0) ? '化学兵器禁止法: '+product_detail.chemical_weapon_name : ''}</div>
              <div>{product_detail.safety_and_health_act_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.safety_and_health_act_name) > 0) ? '労働安全衛生法: '+product_detail.safety_and_health_act_name : ''}</div>
              <div>{product_detail.sds_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.sds_name) > 0) ? 'SDS該当区分: '+product_detail.sds_name : ''}</div>
              <div>{product_detail.water_pollution_control_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.water_pollution_control_name) > 0) ? 'SDS該当区分: '+product_detail.water_pollution_control_name : ''}</div>
              <div>{product_detail.air_pollution_control_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.air_pollution_control_name) > 0) ? 'SDS該当区分: '+product_detail.air_pollution_control_name : ''}</div>
              <div>{product_detail.radiation_hazard_prevention_name && !(arColumn(list_field, 'navigation_id', 'F007').length && list_text_check.indexOf(product_detail.radiation_hazard_prevention_name) > 0) ? 'SDS該当区分: '+product_detail.radiation_hazard_prevention_name : ''}</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.air_pollution_control_name && !product_detail.radiation_hazard_prevention_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> -->
            <th>保存方法</th>
            <td>{product_detail.storage_temperature}</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 if={(!IWAI_SITE && showInfoCampaign(product_detail, list_field, kikan_code, screen)) || (IWAI_SITE && product_detail.campaign_name)}>
            <th>キャンペーン名</th>
            <td colspan="5">
              <a if={ product_detail.campaign_url } href={product_detail.campaign_url} target="_blank">{product_detail.campaign_name}</a>
              <span if={ !product_detail.campaign_url } class="link_color">{product_detail.campaign_name}</span>
            </td>
          </tr>
          <tr if={(!IWAI_SITE && showInfoCampaign(product_detail, list_field, kikan_code, screen)) || (IWAI_SITE && product_detail.campaign_name)}>
            <th>キャンペーン期間</th>
            <td colspan="5">
              <div 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}>
                {product_detail.campaign_start_date ? product_detail.campaign_start_date : '' } {product_detail.campaign_start_date && product_detail.campaign_end_date ? ' ～ ' : ' '}  {product_detail.campaign_end_date ? product_detail.campaign_end_date  : ''}
              </div>
            </td>
          </tr>
          <tr if={(!IWAI_SITE && showInfoCampaign(product_detail, list_field, kikan_code, screen)) || (IWAI_SITE && product_detail.campaign_name)}>
            <th>キャンペーン適用条件</th>
            <td colspan="5">{product_detail.campaign_require}</td>
          </tr>
          <tr if={(!IWAI_SITE && showInfoCampaign(product_detail, list_field, kikan_code, screen)) || (IWAI_SITE && product_detail.campaign_name)}>
            <th>キャンペーンメモ</th>
            <td colspan="5">{product_detail.campaign_memo}</td>
          </tr>
        </table>
        <div class="update-wrapper">
          <dl style="display: {product_detail.list_price_updated ? 'block':'none' }">
            <dt>定価更新日:</dt>
            <dd>{product_detail.list_price_updated}</dd>
          </dl>
          <dl style="display: {product_detail.regulation_updated ? 'block':'none' }">
            <dt>法規情報更新日:</dt>
            <dd>{product_detail.regulation_updated}</dd>
          </dl>
        </div>

        <div class="update-wrapper" style="display: flex;">
          <dl>
            <dt>顧客法人名:</dt>
            <dd>
              <div class="div-wraper-autocompleter text-left"><input style="width: 400px" type="text" id="co_name_search"></div>
            </dd>
          </dl>
          <button type="button" class="submit" id="search_customers" onclick={searchCustomer}>検索</button>
        </div>
        <table class="dealer-table">
          <thead>
            <tr>
              <th colspan="3">納入価格情報</th>
            </tr>
            <tr>
              <td>顧客名</td>
              <td style="width:15%">納入価格</td>
              <td style="width:8%"></td>
            </tr>
          </thead>
          <tbody>
            <tr each = { element, index in products_dealer_customers_list }>
              <td>{element.customer_co_name} {element.customer_dep_name}</td>
              <td class="right" style="white-space:nowrap">
              <!-- { !isNaN(parseInt(element.selling_tanka)) ? roundingPrice(parseInt(element.selling_tanka), element.price_rounding).toLocaleString('en') : '' }円 -->
<!--                <div if={campaign_retail_price_end_date(product_detail.campaign_retail_price,product_detail.campaign_start_date,product_detail.campaign_end_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)) ? ((element.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' }">{ campaign_retail_price_end_date(product_detail.campaign_retail_price,product_detail.campaign_start_date,product_detail.campaign_end_date)}</div>-->
<!--                </div>-->
<!--                  -->
<!--                <div if={!(campaign_retail_price_end_date(product_detail.campaign_retail_price,product_detail.campaign_start_date,product_detail.campaign_end_date).length > 0)} >{ !isNaN(parseInt(element.selling_tanka)) ? ((product_detail.list_price == element.selling_tanka) ? 'お見積り' : parseInt(element.selling_tanka).toLocaleString('en') + '円' ) : '' }</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="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>

                <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>

              </td>
              <td>
                <button type="button" class="submit" onclick={createCart} value="{ index }" if={element.customer_dep_cd}>見積作成</button>
              </td>
            </tr>
          </tbody>
          <tfoot>
            <tr>
              <td colspan="8" style="text-align: right;border:none">
                <!-- <div class="wrapper-link-search-back">
                  <a href="#s08" class="link-search-back">商品検索画面に戻る</a>
                </div> -->
              </td>
            </tr>
          </tfoot>
        </table>
      </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>
  
  
    <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.kikan_code = user_info.kikan_code;
    this.screen = 's09';
    this.product_detail = opts.result['product_detail'][0];
    this.list_text_check_1 = ['非消防法危険物 又は未チェック', '非該当', '対象外', '情報なし', '未確認', '未設定', ''];
    this.list_text_check_2 = ['非消防法危険物 又は未チェック', '非該当', '対象外'];
    this.comment_for_regulations = opts.result['product_detail'][0]['comment_for_regulations'];
    this.supplier_comp_code = opts.result['product_detail'][0]['supplier_comp_code'];
    this.comment_for_regulations_text = '';
    this.overseas_goods_flag = '';

    this.list_customer =  opts.result['products_dealer_customers_list'];
    this.products_dealer_customers_list = [];
    this.comp_code_search = '';
    var thisTag = this;

    $(function(){
       $("#co_name_search").change(function(e) {
        if(!$(e.target).val()) {
          thisTag.update({comp_code_search: ''});
        }
      });
      thisTag.getListSuggestCompanies();
      
    });

    

    this.getListSuggestCompanies = function() {
      let res = [];
      let resTemp = [];
      for (var i = 0; i < thisTag.list_customer.length; i++) {
        if (resTemp.indexOf(thisTag.list_customer[i].customer_co_name) == -1) {
          res.push({value: thisTag.list_customer[i].customer_co_name, label: thisTag.list_customer[i].customer_co_name, comp_index: i});
          resTemp.push(thisTag.list_customer[i].customer_co_name)
          
        }
      }

      $('#co_name_search').autocompleter({
      limit:10000, 
      highlightMatches:true, 
      source: res, 
      callback: function(value, index, object) {
        if($("#co_name_search").val() != '' && thisTag.list_customer[object.comp_index].customer_co_cd) {
          thisTag.update({comp_code_search: thisTag.list_customer[object.comp_index].customer_co_cd});
        } else {
          thisTag.update({comp_code_search: ''});
        }
      }
    });
    }
    this.createCart = function(e){
      var index = e.target.value;
      var accessTokenCognito = localStorage.getItem('accessTokenCognito');
      var url = URL_API +'/api/cart/add_cart_mitsumori?token=' + accessTokenCognito;
      if(this.product_detail['name_jp'] != '' && this.product_detail['name_jp'] != null){
        name = this.product_detail['name_jp'];
      } else {
        name = this.product_detail['name'];
      }
      var customer_co_cd = thisTag.products_dealer_customers_list[index]['customer_co_cd'];
      var customer_dep_cd = thisTag.products_dealer_customers_list[index]['customer_dep_cd'];
      var tanka = thisTag.products_dealer_customers_list[index]['selling_tanka'];
      var data = {
        ec_users_id: 'all',
        mitsumori_status: 2,
        supp_sku: thisTag.product_detail.supplier_sku,
        item_sku: thisTag.product_detail.sku,
        supp_co_cd: thisTag.product_detail.supplier_comp_code,
        item_name: name,
        kikaku: thisTag.product_detail.class_name_jp,
        capacity: thisTag.product_detail.volume_unit_label,
        supp_co_name: thisTag.product_detail.sales_origin_maker_name,
        maker_name: thisTag.product_detail.maker_name,
        teika_tanka: thisTag.product_detail.list_price,
        tanka: tanka,
        customer_co_cd: customer_co_cd,
        customer_dep_cd: customer_dep_cd,
      };
      $.ajax({
        url: url,
        type: 'POST',
        data: data,
        success: function(data){
          if(data.message == 'success'){
            alert("見積フォルダに追加しました。");
            thisTag.getListSuggestCompanies();
          }
        },
        error: function(xhr, stt, err){
          alert('エラー');
        }
      })
    }
    this.searchCustomer = function() {
      var query = [];
    
      var url = URL_API + '/v1/get_product_detail_s09';

      var accessTokenCognito = localStorage.getItem('accessTokenCognito');
      
      query.push('token=' + accessTokenCognito);

      query.push('customer_co_cd=' + encodeURI(thisTag.comp_code_search));
      var comp_name =  $("#co_name_search").val();
      let resTemp = [];
      if (comp_name) {
        for (var i = 0; i < thisTag.list_customer.length; i++) {
          if (resTemp.indexOf(thisTag.list_customer[i].customer_co_name) == -1) {
            resTemp.push(thisTag.list_customer[i].customer_co_name)
          }
        }
        if (resTemp.indexOf(comp_name) == -1) {
          return;
        }
      }
      query.push('screen=s09');
      query.push('id=' + thisTag.product_detail.sku);
      url += '?' + query.join('&');

      $.ajax({
        url: url,
        type: 'GET',
        dataType: 'JSON',
        success: function (res) {
          if(res.status == 100){
            riot.mount('app','maintain', { messege:res.messege });
            return false;
          }

          thisTag.update({
            products_dealer_customers_list: res.result.products_dealer_customers_list_search,
            list_customer:res.result.products_dealer_customers_list
          });

          thisTag.getListSuggestCompanies();
        },
        error: function () {
            alert('error');
        }
      });
    }

    roundingPrice = function (number,check) {
        var lastone = number.toString().split('').pop();
        var lastkey = number.toString().length - 1;
        if(check == 5){
            if(lastone < 5){
                var newNumber = number.toString().substring(0,lastkey) + '0';
            } else if(lastone > 5){
                var newNumber = number.toString().substring(0,lastkey) + '5';
            } else {
                var newNumber = number;
            }
            
        } else {
            var newNumber = number;
        } 
        return parseInt(newNumber);
    }
    
    $(function(){
        getOverseasBrp();
        checkVisibleCommentForRegulations();
  });
    
    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);
            }
        });
    }
    
    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();
    }
    
    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();
        });
    }
    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();
      });
    }
  
    </script>

</s09>
