<!--healthyService/pages/healthyDetail/healthyDetail.wxml-->
<nav navName="健康包服务详情"></nav>
<view class="page">
    <image src="{{img_host+'/mybg.png'}}"  mode="widthFix" class="dcimg"	lazy-load/>
    <view class="viewcell" >
        <view class="left">
          <image src="{{avatar}}" wx:if="{{avatar}}" mode="aspectFill" class="headimg"></image>
          <image src="{{img_host+'/doctor_avatar.png'}}" class="headimg" wx:else></image>
          <view class="onlinebox" wx:if="{{user.is_online==1}}">
           <image src="{{img_host+'/online.gif'}}" mode="" class="icon"/>
          </view>
        </view>
        <view class="right">
          <view class="namebox">
            <view class="name">{{user_name}}</view>
            <view class="type" wx:if="{{hospital.hospital_level_name != '未知'&& hospital.hospital_level_name}}">{{hospital.hospital_level_name}}</view>
            <view class="type" wx:if="{{multi_point_status == 1  && multi_point_enable==1}}">可处方</view>
          </view>
          <view class="hospital"><text class="hospital_name"  wx:if="{{doctor_title_name}}">{{doctor_title_name}}</text> <text wx:if="{{item.department_custom_name}}">{{item.department_custom_name}}</text></view>
          <view class="hospital"><text class="hospital_name" >{{hospital.hospital_name}}</text></view>
        </view>
      </view>
    <view class="detailbox">
        <view class="quanyi">
           <image src="../../static/images/quanyi.png" class="quanyiImg"/>
            <view class="quanyiText">服务权益</view>
        </view>
        <view class="con">
           <view class="cell">
             <view class="celltitle">专属标识：</view>
             <view class="celldesc">享有特殊标识，获得医生全面照护</view>
           </view>
           <view class="cell">
             <view class="celltitle">服务周期：</view>
             <view class="celldesc">购买后，从第一次消费起90天内</view>
           </view>
           <view class="cell">
             <view class="celltitle">图文问诊2次/月</view>
             <view class="celldesc">1、医生接诊后，每次可持续48小时; </view>
             <view class="celldesc">
                    2、图片、文字、语音形式，无限制的进行沟通;
            </view>
            <view class="celldesc">3、超出的问诊需按原价的图文服务购买。</view>
           </view>
           <view class="cell">
             <view class="celltitle">处方：</view>
             <view class="celldesc">1、每次问诊，只可产生一个处方单;
</view>
             <view class="celldesc">
                2、服务包含30盒肝爽颗粒(步长)，每月和医生问诊时，医生开具处方，选择收货地址即可，每次最多只发货10盒。
            </view>
           </view>
           <view class="cell">
             <view class="celltitle">优惠劵：</view>
             <view class="celldesc">1、赠送全品类药品劵10元（不可与其他优惠劵叠加使用）；

</view>
             <view class="celldesc">
                2、赠送肝胆相照商城优惠劵100元(仅限纽娃复合蛋白营养素固体饮料使用，注册肝胆相照商城后，2~3个工作日到账)。
            </view>
           </view>
           <view class="cell">
             <view class="celltitle">退费：</view>
             <view class="celldesc">1、未使用随时退;



</view>
             <view class="celldesc">
                2、健康包开始使用后如需退款请联系客服，退款不收取任何服务费等额外费用，但不支持部分退款:
            </view>
            <view class="celldesc">
                3、药品一经发出，问诊一经接诊，均概不退换;
            </view>
            <view class="celldesc">
                4、未消费健康包内容可退款，已消费服务的部分按原价计费，即:已发生的问诊按照问诊时互联网医院显示的价格结算，肝爽颗粒按照原价每盒42.8元结算。

            </view>
           </view>
        </view>
    </view>
    <view class="buttonbox">
       <view class="btn" bind:tap="showPatient">立即购买：￥{{current_price}}</view>
    </view>
</view>
<van-popup show="{{ show }}" bind:close="onClose"  closeable
  position="bottom"  round
  custom-style="min-height: 60%">
   <view class="titlepop">选择患者</view>
   <view class="personbox">
      <view class="row" wx:for-item="itemName" wx:for="{{family}}" wx:key="*this">
        <view class="cell" wx:for-item="item" wx:for="{{itemName}}" wx:key="family_id">
          <view class="cellinner" wx:if="{{!item.type}}" bindtap="selectPatient" data-familyId="{{item.family_id}}" data-sex="{{item.sex}}">
            <view class="person">
              <view class="name">{{item.card_name}}</view>
              <view class="tag" wx:if="{{item.relation==1}}">本人</view>
              <view class="tag" wx:elif="{{item.relation==2}}">父母</view>
              <view class="tag" wx:elif="{{item.relation==3}}">爱人</view>
              <view class="tag" wx:elif="{{item.relation==4}}">子女</view>
              <view class="tag" wx:elif="{{item.relation==5}}">亲戚</view>
              <view class="tag" wx:elif="{{item.relation==6}}">其他</view>
            </view>
            <view class="desc">
              <view class="sex" wx:if="{{item.sex===0}}">性别未知</view>
              <view class="sex" wx:elif="{{item.sex==1}}">男</view>
              <view class="sex" wx:else>女</view>
              <view class="age">{{item.age}}岁</view>
            </view>
            <image src="{{img_host+'/gou.png'}}"  class="gou" wx:if="{{item.family_id==currentFamilyId}}"></image>
          </view>
          <view class="celladd" bindtap="addPatient" wx:elif="{{item.type}}">
            +新建患者
          </view>
        </view>
      </view>
     
    </view>
    <view class="btnbox">
      <button class="btn" plain="true" disabled="{{currentFamilyId?false:true}}" bindtap="goNext">下一步</button>
    </view>
</van-popup>
<van-popup show="{{showAdd}}" round closeable z-index="999" position="bottom" custom-style="height:{{height}}rpx" bind:close="onCloseAdd">
    <view class="infobox">
      <view class="title">新建患者</view>
      <view class="info">
        <view class="name">真实姓名<text>*</text></view>
        <input  value="{{realName}}" type="text" bindinput="inputChange" placeholder="请输入真实姓名" data-id="realName"/>
      </view>
      <view class="info">
        <view class="name">身份证号<text>*</text></view>
        <input value="{{idCard}}" type="idcard" bindinput="inputChange" placeholder="请输入真实身份证号" data-id="idCard"/>
      </view>
      <view class="info">
        <view class="name">联系电话</view>
        <input  value="{{phoneNumber}}" type="number" 	bindblur="onblur"	bindfocus="onfocus" 	cursor-spacing="100" bindinput="inputChange" bindinput="inputChange" placeholder="请输入联系电话" data-id="phoneNumber"/>
      </view>
      <view class="info" bindtap="openPicker">
        <view class="name">患者关系</view>
        <input type="text" value="{{relation}}" placeholder="请选择与患者的关系" disabled="true" />
      </view>
      <view class="tip">
        <view class="warntitle">温馨提示：</view>
        <view class="warn">
          <view>1、根据国家卫健委要求,就医实行实名制，请如实填写患者信息。</view>
          <view>2、信息受隐私保护，仅接诊医生可见。
          </view>
          <view>3、6岁以下儿童不支持线上问诊，请到线下就诊。
          </view>
        </view>
      </view>
      <view class="next" bindtap="goSick">
       确定
   </view>
    </view>
  </van-popup>
  <van-dialog
  show-cancel-button
   class="mydailog"
   bind:confirm="goHasOrder"
  title="温馨提示"
  message="{{message}}"
  z-index="9999"
   theme='green'
  show="{{showWarn}}"
  confirm-button-color="#3CC7C0"
  cancel-button-text="取消"
>

</van-dialog>
<van-popup show="{{ showPicker }}" round position="bottom" 
z-index="9999"
custom-style="height:auto" bind:close="closePicker">
    <van-picker show-toolbar title="选择与患者之间的关系" columns="{{ columns }}" bind:cancel="closePicker" bind:confirm="onConfirm" />
  </van-popup>