<nav type="back" url="/nova-tourism/pages/index/index?active=4" background-color="#46a9a4" title="商户端" />
<view class="box" style="color: #382E2E;">
  <view class="store">
    <image class="store-img" src="{{store.cover}}" />
    <view class="store-box">
      <view class="store-name">{{store.storeName}}</view>
      <view class="draw_box" style="margin-top: 10rpx;">
        <view class="withdraw" bindtap="openPayouts">
          提现
        </view>
        <view>
          <!-- 可提现 {{earnings}} 元 -->
          <!-- <view style="font-size: 20rpx;">订单+分润</view> -->
        </view>
      </view>
    </view>
  </view>
  <view class="business">
    <view class="business-x">
      <view class="order-number">
        <view class="order-title">总订单数</view>
        <view class="order-titles">
          <view class="item gray">民宿：{{room_count||0}}，商品：{{gift_count||0}}</view>
          <view class="item">合计：{{totalCount}}</view>
        </view>
      </view>
      <view class="order-today">
        <view class="order-title">今日订单数</view>
        <view class="order-titles">
          <view class="item gray">民宿：{{room_todayCount||0}}，商品：{{gift_todayCount||0}}</view>
          <view class="item">合计：{{todayCount}}</view>
        </view>
      </view>
    </view>
    <view class="business-y">
      <view class="order-number">
        <view class="order-title">总营业额</view>
        <view class="order-titles">
          <view class="item gray">民宿：{{room_totalPrice||0}}，商品：{{gift_totalPrice||0}}</view>
          <view class="item"></view>
          <view class="item">合计：{{totalPrice}}</view>
        </view>
      </view>
      <view class="order-today">
        <view class="order-title">今日营业额</view>
        <view class="order-titles">
          <view class="item gray">民宿：{{room_todayPrice||0}} ，商品：{{gift_todayPrice||0}}</view>
          <view class="item">合计：{{todayPrice}}</view>
        </view>
      </view>
    </view>
  </view>

  <view class="management">
    <!-- <block wx:if="{{store.type=='catering'}}">
            <view class="box-title" bindtap="orderlist">
                <view class="box-details">
                    <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/dkdoeo112500451.png" size="20"/>
                    <view class="name">订单管理</view>
                </view>
                <van-icon name="arrow" />
            </view>
        </block> -->
    <block wx:if="{{store.type=='stay'}}">
      <view class="box-title" bindtap="order2list">
        <view class="box-details">
          <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/dkdoeo112500451.png" size="20" />
          <view class="name">民宿订单管理</view>
        </view>
        <van-icon name="arrow" />
      </view>
      <view class="box-title" bindtap="giftOrder2list">
        <view class="box-details">
          <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/dkdoeo112500451.png" size="20" />
          <view class="name">商品订单管理</view>
        </view>
        <van-icon name="arrow" />
      </view>
    </block>
    <!-- <block wx:if="{{store.type=='shop'}}">
            <view class="box-title" bindtap="order3list">
                <view class="box-details">
                    <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/dkdoeo112500451.png" size="20"/>
                    <view class="name">订单管理</view>
                </view>
                <van-icon name="arrow" />
            </view>
        </block> -->
    <view class="box-title" bindtap="account">
      <view class="box-details">
        <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/vbg148112459179.png" size="20" />
        <view class="name">账户管理</view>
      </view>
      <van-icon name="arrow" />
    </view>
    <!-- <view class="box-title" bindtap="comments"wx:if="{{store.type!='shop'}}">
            <view class="box-details">
                <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/eb7p71112500348.png" size="20"/>
                <view class="name">评价管理</view>
            </view>
            <van-icon name="arrow" />
        </view> -->

    <!-- <block wx:if="{{store.type=='catering'}}">
            <view class="box-title" bindtap="package">
                <view class="box-details">
                    <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/mujk1h112500264.png" size="20"/>
                    <view class="name">套餐管理</view>
                </view>
                <van-icon name="arrow" />
            </view>
            <view class="box-title" bindtap="dishes">
                <view class="box-details">
                    <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/ct7c17112500163.png" size="20"/>
                    <view class="name">菜品管理</view>
                </view>
                <van-icon name="arrow" />
            </view>
            <view class="box-title" bindtap="tables">
                <view class="box-details">
                    <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/1ue61m112500082.png" size="20"/>
                    <view class="name">桌台管理</view>
                </view>
                <van-icon name="arrow" />
            </view>
            <view class="box-title" bindtap="category">
                <view class="box-details">
                    <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/kl11mf112459857.png" size="20"/>
                    <view class="name">菜品类型管理</view>
                </view>
                <van-icon name="arrow" />
            </view>

        </block> -->
    <block wx:if="{{store.type=='stay'}}">
      <view class="box-title" bindtap="roommanage">
        <view class="box-details">
          <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/7d11hf112459718.png" size="20" />
          <view class="name">房型管理</view>
        </view>
        <van-icon name="arrow" />
      </view>
    </block>
    <block wx:if="{{store.type=='stay'}}">
      <view class="box-title" bindtap="goodmanage">
        <view class="box-details">
          <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/7d11hf112459718.png" size="20" />
          <view class="name">商超管理</view>
        </view>
        <van-icon name="arrow" />
      </view>
    </block>

    <view class="box-title" data-url="/nova-tourism/pages/my/merchant/merchant-home/my-users/index" bindtap="gourl">
      <view class="box-details">
        <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/vbg148112459179.png" size="20" />
        <view class="name">本店用户</view>
      </view>
      <van-icon name="arrow" />
    </view>

    <!-- <view class="box-title" data-url="/common-page/pages/sharing/index?path=yswx&uid={{uid}}" bindtap="gourl"> -->
    <view class="box-title" data-url="/nova-tourism/pages/my/sharing/index?path=yswx&uid={{uid}}" bindtap="gourl">
      <view class="box-details">
        <van-icon name="https://file-cloud.fmode.cn/EbxZUK5lBI/20241211/i18ml9095731989.png" size="20" />
        <view class="name">推广本店</view>
      </view>
      <van-icon name="arrow" />
    </view>

    <block wx:if="{{store.type=='shop'}}">
      <!-- <view class="box-title">商品管理</view> -->
      <!-- <view class="box-title" bindtap="goods">
                <view class="box-details">
                    <van-icon name="https://file-cloud.fmode.cn/sHNeVwSaAg/20230705/l1hdoe112459997.png" size="20"/>
                    <view class="name">商品管理</view>
                </view>
                <van-icon name="arrow" />
            </view> -->
      <!-- <view class="box-title" bindtap="category">
                <view class="box-details">
                    <van-icon name="gift-o" />
                    <view>类型管理</view>
                </view>
                <van-icon name="arrow" />
            </view> -->
    </block>
  </view>
</view>
<view class="bommon" bind:tap="codeVerify" style="color: #382E2E;">扫码核销</view>
<view class="bommon" bind:tap="logout" style="color: #382E2E;">退出登录</view>
<!-- <block wx:if="{{store.type=='catering'}}">
    <view class="bommon" bind:tap="code">扫码核销</view>
</block> -->

<van-popup class="refund_popup" custom-style="height: 500rpx" show="{{ isShowPayouts }}" position="bottom" round bind:close="closePayouts">
  <view class="title">
    可提现金额
  </view>
  <view class="refundPopup">
    <view class="payoutsBox" data-channel="sharing" data-price="{{sharing}}" bind:tap="toWithdraw">
      <view class="box_title">
        <van-icon name="balance-pay" size='18'/>
        分润：
      </view>
      <view class="price">
        {{sharing}} <text>元</text>
      </view>
      <view class="overPrice">
        累计申请 {{overSharing}} 元
      </view>
    </view>
    <view class="payoutsBox" data-channel="turnover" data-price="{{turnover}}" bind:tap="toWithdraw">
      <view class="box_title">
        <van-icon name="shop-o" size='18'/>
        营业额：
      </view>
      <view class="price">
        {{turnover}} <text>元</text>
      </view>
      <view class="overPrice">
        累计申请 {{overTurnover}} 元
      </view>
    </view>
   
    <!-- <view class="withdraw" bindtap="toWithdraw">
      提现
    </view> -->
  </view>
</van-popup>