<wxs src='../../../utils/formatFuc.wxs' module="utils"></wxs>

<view>
  <image src="/static/images/csr.png"
    style="width: 70px;height: 70px;position: fixed;z-index: 1;top: 700rpx;right: 20rpx;" bindtap="goIm"></image>
  <!-- <contact-button class="csr" type="default-dark"
    style="opacity: 0;position: fixed;z-index: 99;right: 16rpx; width: 100rpx;height: 100rpx;top:726rpx"
    session-from="weapp" size="27">
  </contact-button> -->
</view>

<view class="user-top-bj">
  <view class="study-center" bindtap="goLearnCenter">
    <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/wx-servant/icon-college.png"></image>
    <view>学习中心</view>
  </view>
</view>
<!-- 用户信息 -->

<view class="container">
  <view class="user-wrapper">
    <view class="user-info">
      <image class="user-img" src="{{homeInfo.workerInfo.headPic}}" mode="aspectFill"></image>
      <view class="user-right">
        <view class="user-name">
          <view> <text>{{isUat?'测试帐号':homeInfo.workerInfo.workerName}}</text> {{homeInfo.workerInfo.gender}}</view>
          <view class="job-year">在线时长 {{homeInfo.onPositionYear}}年</view>
        </view>
        <view class="city-station">
          {{homeInfo.workerInfo.cityName}} {{homeInfo.workerInfo.postStation}} {{homeInfo.workerInfo.station}}
        </view>

      </view>


    </view>
    <view class="user-bottom">
      <view class="user-tag">
        <block wx:if="{{labelName.length>0}}">
          <view wx:for="{{labelName}}" wx:key="index">{{item}}</view>
          <!-- <view>师傅</view> -->
        </block>

      </view>
      <view class="health" bindtap="goNucleicList">
        <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/wx-servant/icon-jkdk.png"></image>
        <text>返乡调查</text>
      </view>
    </view>
  </view>

  <!-- 模块 -->
  <view class="module-nav">
    <view class="nav-item" bindtap="getPerfect">
      <image mode="aspectFit" src="/static/images/upgrade/icon-wsxx.png" class="nav-img"></image>
      <view class="nav-text">完善信息</view>
    </view>
    <view class="nav-item" bindtap='goBookIndex' data-route='/pages/mall/catalog/catalog' data-index='4'>
      <image mode="aspectFit" src="/static/images/upgrade/icon-wlsc.png" class="nav-img"></image>
      <view class="nav-text">物料商城</view>
    </view>
    <view class="nav-item" data-route='/pages/mall/order/order' data-index='1' bindtap='goBookIndex'>
      <image mode="aspectFit" src="/static/images/upgrade/icon-wldd.png" class="nav-img"></image>
      <view class="nav-text">物料订单</view>
    </view>
		<view class="nav-item" bindtap='goMaster'>
      <image mode="aspectFit" src="/static/images/upgrade/icon-zzy.png" class="nav-img" style="width:40rpx;height:40rpx;"></image>
      <view class="nav-text">招招盈</view>
    </view>
    <!-- <view class="nav-item" bindtap='goHouse'>
      <image mode="aspectFit" src="/static/images/upgrade/icon-wdzs.png" class="nav-img"></image>
      <view class="nav-text">我的住宿</view>
    </view> -->
    <view class="nav-item" bindtap='goLeave'>
      <image mode="aspectFit" src="/static/images/upgrade/icon-qj.png" class="nav-img"></image>
      <view class="nav-text">请
        假</view>
    </view>
  </view>
  <!-- 消息中心 -->
  <view class="message-center">
    <view class="message-title">
      <view class="msg-title-left">
        <image src="/static/images/upgrade/icon-message.png"></image>
        <text class="title-text">消息中心</text>
        <view class="msg-num" wx:if="{{unReadSize>0}}">{{unReadSize}}</view>
      </view>
      <view class="msg-title-right" bindtap="goMessage">
        查看明细>
      </view>
    </view>
    <view class="box-wrapper" wx:if="{{workerNotice.length>0}}">
      <image src="/static/images/upgrade/icon-alert.png" mode="aspectFit"></image>
      <view class="msg-box">
        <swiper class="swiper-container" vertical="true" autoplay="true" circular="true" interval="3000">
          <block wx:for="{{workerNotice}}" wx:key="index">
            <!-- 3       <navigator url="/pages/upgrade/messageList?title={{item.url}}" open-type="navigate"> -->
            <swiper-item>
              <view class="msg-item">
                <view class="content-wrapper">
                  <view class="msg-content">{{item.content}}
                  </view>
                </view>
              </view>
            </swiper-item>
            <!-- 7       </navigator> -->
          </block>
        </swiper>
        <!-- <view class="{{animate?'anim':''}}" >
    <view class="msg-item" wx:for="{{homeInfo.workerNotice}}" wx:key="index">
    
      <view class="content-wrapper">
      <view class="msg-content">{{item.content}}
      </view>
      <view> > </view>
    </view>
    </view>
  </view> -->
      </view>
    </view>
  </view>

  <!-- 面试邀请 -->
  <view class="interview" wx:if="{{interviewShow}}" wx:for="{{interviewInfo}}" wx:key="index">
    <view class="interview-title">
      <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/wx-servant/icon-interview.png"></image>
      <view>面试邀请</view>
    </view>
    <view class="interview-date">
      面试时间：{{item.interviewTime}}
    </view>
    <view class="interview-location">
      面试地点：{{item.address}}
    </view>
		<view class="interview-location">
      面试内容：{{item.interviewContent}}
    </view>
    <view class="interview-operate">
			<view wx:if="{{item.status!=1&&item.subStatusVal!=''}}">{{item.subStatusVal}}</view>
     <view wx:if="{{item.status!=1&&item.subStatusVal==''}}">{{item.statusVal}}</view>
		  <view class="interview-refuse" wx:if="{{item.status==1}}" bindtap="operateInterview" data-type="4"  data-id="{{item.id}}">
        <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/wx-servant/icon-refuse.png"></image>
        <view> 狠心拒绝</view>

      </view>
      <view class="interview-accept" wx:if="{{item.status==1}}" bindtap="operateInterview" data-type="1" data-id="{{item.id}}">
        <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/wx-servant/icon-accept.png"></image>
        <view> 接受邀请</view>
      </view>
    </view>
  </view>


  <!-- 复购看板 -->
  <block wx:if="{{!interviewShow}}">
    <view class="rebuy-board">
      <view class="rebuy-title">
        <view class="rebuy-title-left">
          <image src="/static/images/upgrade/icon-cart.png" mode="aspectFit"></image>
          <view>复购看板</view>
        </view>
        <view class="rebuy-week">
          <block>
            <image src="/static/images/upgrade/icon-arrow-left.png" mode="aspectFit" bindtap="lastWeek"></image>
            <view class="last-week" bindtap="lastWeek">上周</view>
          </block>
          <view class="current-week">{{currentWeek}}周</view>
          <block>
            <view class="next-week" bindtap="nextWeek">下周</view>
            <image src="/static/images/upgrade/icon-arrow-right.png" mode="aspectFit" bindtap="nextWeek"></image>
          </block>

        </view>
      </view>
      <!-- 推荐码 -->
      <view class="recommand-line">
        <view>推荐码</view>
        <view class="code" bindtap="copyNum">{{homeInfo.workerShareCode}}</view>
        <image src="/static/images/upgrade/icon-copy.png" mode="aspectFit" bindtap="copyNum"></image>
      </view>
      <view class="rebuy-content">
        <!-- 复购单量 -->
        <view class="rebuy-orders">
          <view class="title">复购单量</view>
          <view class="single-block">
            <view>
              <text>{{myRebuyInfo.looseOrderRebuy}}</text>/{{myRebuyInfo.looseOrder}}
            </view>
            <view class="tag">散单</view>
          </view>
          <view class="cycle-block">
            <view>
              <text>{{myRebuyInfo.cycleOrderRebuy}}</text>/{{myRebuyInfo.cycleOrder}}
            </view>
            <view class="tag">周期复购</view>
          </view>

        </view>
        <!-- 复购指标 -->
        <view class=" rebuy-orders rebuy-goals">
          <view class="title">复购指标</view>
          <view class="single-block">
            <view>
              <text>{{utils.numRate(myRebuyInfo.looseOrderRebuyRate)}}</text>
            </view>
            <view class="mark-wrapper">
              <view class="tag">散单T+7</view>
              <view class="mark" wx:if="{{myRebuyInfo.looseOrderNoWarn!=''}}">距离合格 仅剩{{myRebuyInfo.looseOrderNoWarn}}单
              </view>
            </view>

          </view>
          <view class="cycle-block">
            <view>
              <text>{{utils.numRate(myRebuyInfo.cycleOrderRebuyRate)}}</text>
            </view>
            <view class="mark-wrapper">
              <view class="tag">周期T+30</view>
              <view class="mark" wx:if="{{myRebuyInfo.cycleOrderNoWarn!=''}}">距离合格 仅剩{{myRebuyInfo.cycleOrderNoWarn}}单
              </view>
            </view>

          </view>
        </view>
      </view>
    </view>
    <!-- 服务费记账本 -->
    <view class="sally-book" data-type="2" bindtap="goSalaryDetail">
      <view class="sally-title">
        <image src="/static/images/upgrade/icon-jzb.png"></image>
        <view class="middle">服务费记账本</view>
        <view class="sally-detail" data-type="1" catchtap="goSalaryDetail">查看明细> </view>
      </view>
      <view class="sally-content">
        <text>本月服务费</text>
        <text class="sally-num">{{homeInfo.salary}} 元</text>
      </view>
      <view class="sally-history">
        <text>历史累计</text>
        <text class="history-num">{{homeInfo.total}}元</text>
      </view>
    </view>

    <!-- 我的站长 -->
    <view class="my-leader">
      <view class="leader-title">
        <image src="/static/images/upgrade/icon-zz.png"></image>
        <text>我的站长</text>
      </view>
      <view class="leader-name">
        高级站长 {{homeInfo.stationAdminName}}
      </view>
      <view class="call-wrapper">
        <view data-mobile="{{homeInfo.stationAdminTel}}" bindtap="makeCall">呼叫站长</view>
        <view data-mobile="021-61916016" bindtap="makeCall">呼叫客服</view>
        <!-- <view bindtap="goJoinCp">邀请加企微</view> -->
      </view>
    </view>
  </block>
  <!-- 退出登录 -->
  <view class="logout" bindtap="exitLogin">退出登录</view>







</view>



<!-- 消息提醒 -->
<van-overlay show="{{modalShow}}" custom-style="background: rgba(194,191,191,0.61);">
  <view class="overlay-wrapper">
    <view class="modal-list">

      <view class="modal-block-bottom modal-block" wx:if="{{workerNoticeAlert.length>1}}">


      </view>
      <view class="modal-block-top modal-block {{workerNoticeAlert.length==1?'one-modal':''}}">
        <view class="content">
          <view class="title">
            <view class="left">
              <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/wx-servant/icon-alert.png" class="alert">
              </image>
              <view>{{alertNoticeInfo.title}}</view>
            </view>
            <view class="right" style="overflow:hidden;white-space:nowrap;">
              {{utils.formatDate(alertNoticeInfo.sendTime)}}
            </view>
          </view>
          <view class="line tiket-num">
            关联单据：<text>{{alertNoticeInfo.rno}}</text>
          </view>
          <view class="line">
            问题类型：{{alertNoticeInfo.noticeType}}
          </view>
          <view class="line-two">
            提醒内容：{{alertNoticeInfo.content}}
          </view>
        </view>
        <view class="operate" bindtap="goFeedback">
          <view wx:if="{{alertNoticeInfo.isFeedback==1}}">填写反馈</view>
          <view wx:else>立即处理</view>
          <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/wx-servant/icon-right.png"></image>
        </view>


      </view>
      <image mode="aspectFit" src="https://jzmall.lifejingzhi.com/file/wx-servant/msg-close.png" class="close"
        bindtap="closeModal"></image>
    </view>
  </view>
</van-overlay>