index.wxml 7.94 KB
<!-- src引入filter.wxs, module给模块起名 -->
<wxs src="../index.wxs" module="filter" />
<navigation-bar bindnavbarReady="navbarReady" showWhiteMenu showMenu="{{ true }}" bindback="back" bindshowMenuPopup="showMenuPopup" navStyle="{{ navStyle }}">
  <view class="navigation-title">
    <view class="navigation-title-text text-hide">{{userInfo.shopMerchantName || '全部'}}</view>
    <!-- <view class="arrow" wx:if="{{ userInfo.isSuper }}">
			<image src="/images/arrow-bottom.png" />
		</view> -->
  </view>
</navigation-bar>
<view class="bg"></view>
<view style="height:100vh;overflow: hidden;">
  <view class="layout {{ flag?'opacity':''}} {{waitInputCount?'mtTips':'' }}" style="height:calc(100vh - {{ navBarHeight}}px); margin-top:{{ navBarHeight + 'px' }}">
    <block wx:if="{{ navBarHeight > 0 }}">
      <view class="tips">
        <view class="tips-text text-hide">
          你好,
          <text>{{loginRoleLabel[loginRole]|| ''}}{{userInfo.name || ''}}</text>
        </view>
        <!-- <view class="change_box">
          <view class="change_btn {{changeSelectIndex == index ? 'active' : ''}}" bindtap="changeStaticData" data-index="{{index}}" wx:for="{{changeBtnData}}" wx:key="index" wx:for-index="index">{{item.label}}</view>
        </view> -->
      </view>
      <view class="swiper-wrap">
        <swiper bindchange="changeSwiper">
          <block wx:for="{{ 3 }}" wx:key="index">
            <swiper-item>
              <view class="swiper-item">
                <view class="total-wrap">
                  <view class="item left">
                    <view class="title">{{changeSelectIndex==0?'今日':changeSelectIndex==1?'本月':'累计'}}产值</view>
                    <veiw class="number" wx:if="{{ userInfo.userType == 2 && !(userInfo.isSuper|| userInfo.loginRole ==3) }}">
                      <text class="unit">¥</text>
                      <text>{{userStat[changeBtnData[changeSelectIndex].valueObj].totalOrderMoney||0}}</text>
                    </veiw>
                    <veiw class="number" wx:else>
                      <text class="unit">¥</text>
                      <text>{{userStat[changeBtnData[changeSelectIndex].valueFn].totalOrderMoney||0}}</text>
                    </veiw>
                  </view>
                  <view class="item">
                    <view class="title">转化率</view>
                    <view class="number" wx:if="{{ userInfo.userType == 2 && !(userInfo.isSuper|| userInfo.loginRole ==3) }}">
                      <text>{{userStat[changeBtnData[changeSelectIndex].valueObj].upgradeRate||0}}</text>
                      <text class="units">%</text>
                    </view>
                    <view class="number" wx:else>
                      <text>{{userStat[changeBtnData[changeSelectIndex].valueFn].upgradeRate||0}}</text>
                      <text class="units">%</text>
                    </view>
                  </view>
                </view>
                <view class="custom-statistic">
                  <view class="customItem" wx:for="{{ totalList }}" data-item="{{ item }}" bindtap="navTabPage" wx:key="index">
                    <block wx:if="{{ item.index==2 }}">
                      <view class="label">
                        <text>{{item.name}} </text>
                        <text data-item="{{ item }}" catchtap="navTabPage" data-type="wait">/{{item.waitname}}</text>
                      </view>
                      <view class="number">
                        <view class="firstValue">{{userStat[changeBtnData[changeSelectIndex].valueObj][item.itemName]||0}}</view>
                        <view class="lastValue">/{{userStat[changeBtnData[changeSelectIndex].valueObj][item.waititemName]||0}}</view>
                      </view>
                    </block>
                    <block wx:else>
                      <view class="label">{{item.name}}</view>
                      <view class="number" wx:if="{{ userInfo.userType == 2 && !(userInfo.isSuper|| userInfo.loginRole ==3) }}">
                        <text class="unit" wx:if="{{ item.unit }}">{{item.unit}}</text>
                        <view>{{userStat[changeBtnData[changeSelectIndex].valueObj][item.itemName]||0}}</view>
                      </view>
                      <view class="number" wx:else>
                        <text class="unit" wx:if="{{ item.unit }}">{{item.unit}}</text>
                        <view>{{userStat[changeBtnData[changeSelectIndex].valueFn][item.itemName]||0}}</view>
                      </view>
                    </block>
                  </view>
                </view>
              </view>
            </swiper-item>
          </block>
        </swiper>
        <view class="dots">
          <view wx:for="{{ 3 }}" wx:key="item" wx:for-index="idx" class="dot {{ changeSelectIndex==idx?'active':'' }}"></view>
        </view>
      </view>  
      <block wx:if="{{ !isNoStaff }}">
        <div class="menu">
          <block wx:for="{{ menu }}" wx:key="index">
            <view class="item" bindtap="jump" data-item="{{ item }}" data-type="{{ userInfo.userType }}">
              <image src="{{ IMG_URL}}upgrade/{{item.icon }}.png" />
              <view class="label">{{item.name}}</view>
              <view class="hot_icon" wx:if="{{ item.hot }}">热</view>
              <view class="hot_icon" wx:if="{{ item.tipsNum }}">{{item.tipsNum}}</view>
              <view class="bubble_icon" wx:if="{{ item.noRead }}"></view>
            </view>
          </block>
        </div>
      </block>
      <block wx:if="{{ isNoStaff }}">
        <div class="menu noStaff">
          <block wx:for="{{ menu }}" wx:key="index">
            <view class="item" bindtap="jump" data-item="{{ item }}" data-type="{{ userInfo.userType }}">
              <image src="{{ IMG_URL}}upgrade/{{item.icon }}.png" />
              <view class="label">{{item.name}}</view>
              <view class="hot_icon" wx:if="{{ item.tipsNum }}">{{item.tipsNum}}</view>
            </view>
          </block>
        </div>
      </block>
      <block wx:if="{{ !isNoStaff }}">
        <div class="menu" wx:if="{{ newMenu.length>0 }}">
          <block wx:for="{{ newMenu }}" wx:key="index">
            <view class="item" bindtap="jump" data-item="{{ item }}" data-type="{{ userInfo.userType }}">
              <image src="{{ IMG_URL}}upgrade/{{item.icon }}.png" />
              <view class="label">{{item.name}}</view>
              <view class="hot_icon" wx:if="{{ item.hot }}">热</view>
              <view class="hot_icon" wx:if="{{ item.tipsNum }}">{{item.tipsNum}}</view>
              <view class="bubble_icon" wx:if="{{ item.noRead }}"></view>
            </view>
          </block>
        </div>
      </block>
    </block>
  </view>
</view>
<modal id="modal2" class="modal" custom="true" btns="{{ ['取消','确定'] }}">
  <view class="modatcontent">
    <view class="modalbox {{ selectType == 1?'act': '' }} com" bindtap="selectType" data-type="1">
      <gl-image class="icon" src="/miniProgram/order1.png"></gl-image>
      新增工单
    </view>
    <view class="modalbox cancle {{ selectType == 2?'act': '' }}" bindtap="selectType" data-type="2">
      <gl-image class="icon" src="/miniProgram/order3.png"></gl-image>
      战败下单
    </view>
  </view>
</modal>
<recording-order-popup wx:if="{{ showOrderpop }}" show="{{ showOrderpop }}" bind:success="navigator" title="请选择交易参考号" />
<block wx:if="{{ userInfo.isSuper || userInfo.loginRole== 3 || userInfo.loginRole== 5 }}">
  <side-select-by-page-popup show="{{ shopSideSelectPopup }}" bindconfirm="storeSearchEvent" subIndex="{{ subIndex }}" hasTabBar="true" />
</block>
<block wx:else>
  <side-select-popup show="{{ shopSideSelectPopup }}" storeList="{{ storeRange }}" bindconfirm="storeSearchEvent" subIndex="{{ subIndex }}" hasTabBar="true" />
</block>
<task-dialog wx:if="{{ showTaskDialog }}" showDialog="{{ showTaskDialog }}" taskInfo="{{ taskInfo }}"></task-dialog>