<!-- 前台导入numberFormat.wxs -->
<wxs src='/utils/numberFormat.wxs' module="numberFormat"></wxs>
<!-- 加载图层 -->
<loading wx:if="{{loading}}"></loading>
<!-- 顶部 -->
<view style="position: absolute;">
  <image src="{{imageUrl + 'home-back.png'}}" class="head-image"></image>
  <!-- 公司 -->
  <view class="company" style="top:{{statusHeight + 'rpx'}}">
    <view style="display: flex;align-items: center;" catchtap="changeCp">
      <view class="company-change-class">
        {{companyName?companyName:''}}
      </view>
      <image src="/static/image/triangle.png" style="width: 28rpx;height:28rpx;"></image>
    </view>

    <view style="margin-top: 40rpx;display: flex;">
      <!-- 头像 -->
      <open-data type="userAvatarUrl" class='wx-avatar'></open-data>

      <view style="margin-left: 30rpx;width: calc(100% - 200rpx);">
        <!-- 昵称 -->
        <view class="nick-name" style="display: flex;width: 100%;">
          <view style="width: 99%;">
            你好 {{staffName?staffName:''}}
          </view>
          <view style="text-align: right;margin-right: 10rpx;" bindtap="toNotice">
            <view class="notice-view">
              <view class="todo-view-app-item-icon-tip" wx:if="{{noticeCount}}">{{noticeCount}}</view>
              <image catchtap="handleWxService" src="/static/image/wx.png" style="width: 100%;height:100%;" />
            </view>
          </view>
        </view>
        <!-- 部门 -->
        <view class="store">
          <view> {{orgName?orgName:''}}</view>
          <!-- <view wx:if="{{version}}" style="width:77vw;text-align-last: right;font-size: 11px;display: flex; justify-content: flex-end;"> 当前版本号: {{version}}
            <van-icon name="upgrade" size="20px" bind:click="checkHasManualUpdate" />
          </view> -->
        </view>
        <!--到期日期 续费-->
        <view class="endDate" wx:if="{{cpEndDate}}">
          <view style="display: flex;">{{$t['cpEndDate'] + '：' + cpEndDate}}
            <view wx:if="{{dueFlag}}" style="color:#e00808;margin-left: 20rpx;">{{dueFlag?$t['dueText']:''}}</view>
          </view>
          <!--到期日期前15天显示续费-->
          <dk-tag wx:if="{{dueFlag}}" padding="0 20rpx" height="30rpx" color="#FF7B1A" textColor="#FFFFFF" radius="5rpx" roundFlag="{{true}}" marginRight="12rpx" value="续费" catchtap="handleRecharge"></dk-tag>
        </view>
      </view>
    </view>
  </view>
</view>

<!--待办工作-->
<view class="content" style="padding-top: {{ (statusHeight + 210) + 'rpx'}};" >
  <!--待办工作-->
  <view class="todo-view" wx:if="{{waitMenuFlag}}" >
    <view class="todo-view-title">待办工作</view>
    <view class="todo-view-app">
      <view class="todo-view-app-item" wx:for="{{waitMenu}}" wx:for-item="item" data-item="{{item}}" catchtap="toApp" wx:if="{{item.show}}">
        <view class="todo-view-app-item-icon">
          <!-- 待办角标提醒 -->
          <view class="todo-view-app-item-icon-tip" wx:if="{{item.count}}">{{item.count?item.count:0}}</view>
          <image src="{{imageUrl + item.icon}}" style="width:100%;height:100%;" />
        </view>
        <view class="todo-view-app-item-name">{{item.title}}</view>
      </view>
    </view>
  </view>

  <!--门店助手-->
  <van-tabs animated active="{{ active }}" swipeable nav-class="mine-tabs-custom-class" bind:change="onChange">
    <van-tab name="store">
      <!-- 助手 -->
      <view class="helper-out-view">
        <view class="helper-view">
          <!-- 门店助手 -->
          <view class="helper-view-header">
            <view class="helper-view-header-name">门店助手</view>
            <view class="helper-view-header-tags">
              <dk-tabs-custom model:value="{{storeHelperValue}}" data-filterindex="1" data-querytype="storeHelper" bind:change="changeTabs" list="{{tagList}}" />
            </view>
          </view>
          <!-- 主体部分 -->
          <view class="helper-view-content" style="position: relative;">
            <view class="help-view-content-item" catchtap="toOtherPage" wx:for="{{valueAmounts}}" wx:for-item="item" wx:key="index" data-datevalue="{{storeHelperValue}}" style="--filterBlur--:{{filterBlur1}}">
              <view class="help-view-content-item-important">
                <dk-cell contentRight="{{false}}" amount="{{true}}" left="0" contentFontSize="15" contentColor="#FF7B1A" contentFontWeight="bold" content="{{item.value}}"></dk-cell>
              </view>
              <view class="help-view-content-item-text">{{item.title}}</view>
            </view>
          </view>
        </view>
      </view>
    </van-tab>
  </van-tabs>


  <view style="margin-top: 30rpx;">
    <view class="todo-view" style="margin-bottom: 4rpx;background: linear-gradient(90deg, #D5DEFF 0%, #F3FAFF 100%);">
      <view class="todo-view-title" style="display: flex;align-items: center;"  catch:tap="toBeginnerGuide">
        <view style="color:#1B365D;font-weight: bold;width: 30%;">新手指导</view>
        <view style="color:#1B365D;width: 40%;">三步快速掌握</view>
        <view style="color:#1B365D;width: 30%;display: flex;align-items: center;justify-content: right;"><van-icon name="arrow"color="#1B365D" /><van-icon name="arrow" /><van-icon name="arrow" /></view>
      </view>
    </view>
    <!--商户设置-->
    <view class="todo-view" style="margin-bottom: 4rpx;">
      <view class="todo-view-title" catch:tap="toSetting">{{$t['settingCommany']}}</view>
    </view>
    <!--操作手册-->
    <view class="todo-view" style="margin-bottom: 4rpx;">
      <view style="display: flex;justify-content: space-between;">
        <view class="todo-view-title" catch:tap="toOperateGuide" data-type="pdf">{{$t['operateGuide']}}</view>
        <van-icon wx:if="{{!playFlag}}" name="play" size="20rpx" color="#1B365D" data-type="open" catch:tap="toOperateGuideVideo" />
        <van-icon wx:if="{{playFlag}}" name="cross" size="20rpx" color="#1B365D" data-type="close" catch:tap="toOperateGuideVideo" />
      </view>
      <video wx:if="{{playFlag}}" id="myVideo" src="{{videoSrc}}" class="van-uploader__preview-image" muted show-mute-btn show-fullscreen-btn enable-progress-gesture="{{false}}" autoplay="{{false}}" loop show-progress show-bottom-progress show-play-btn></video>
    </view>
    <!-- <view class="todo-view" style="margin-bottom: 4rpx;">
      <view class="todo-view-title" catch:tap="toPay">微信支付</view>
    </view> -->
    <!-- <view class="todo-view" style="margin-bottom: 4rpx;">
      <view class="todo-view-title" catch:tap="toTestExample">toTestExample</view>
    </view> -->
    <view class="todo-view" style="display: flex;justify-content:space-between;align-items: center;margin-bottom: 4rpx;" wx:if="{{gradeCode == 'STD'}}" catchtap="handleUpgrade">
      <view class="todo-view-title">标准版</view>
      <view class="todo-view-title" style="display: flex;justify-content:space-between;align-items: center;">
        <image src="{{imageUrl + 'diamond.png'}}" style="width:40rpx;height:40rpx; margin-right: 10rpx;" />
        升级专业版
      </view>
    </view>
    <!--版本号-->
    <view wx:if="{{version}}" class="todo-view" style="margin-bottom: 4rpx;display: flex;justify-content: space-between;">
      <view class="todo-view-title" catch:tap="toSetting">当前版本号: {{version}}</view>
      <van-icon name="upgrade" size="20px" bind:click="checkHasManualUpdate" />
    </view>
  </view>

</view>



<!-- 退出 -->
<view style="margin: 100rpx 30rpx;">
    <van-button custom-style="height:88rpx;border-radius:15rpx ;" color="#3E69F6" size="large"  bind:tap="logout">退出 </van-button>
</view>

<van-dialog id="van-dialog" />