<!--pages/mine/shop/mineshop.wxml-->
<cu-custom isBack="{{true}}">
  <view slot="content">店铺职工</view>
</cu-custom>

<scroll-view refresher-enabled="true" refresher-threshold="{{50}}" refresher-background="#fff"
  bindrefresherrefresh="dorefreshList" refresher-triggered="{{isRefreshing}}">
  <van-swipe-cell style="margin:5rpx;" id="swipe-item" right-width="{{ 90 }}" wx:for="{{shopStaffList}}" wx:key="index"
    bind:close="onClose" bind:open="onOpen" async-close="true">
    <view class="cu-list menu solid" style="margin-left:10rpx;margin-right:10rpx;" bindtap="showStaffDetail"
      data-item="{{item}}">
      <view class="cu-item" style="padding:30rpx">
        <view class="content">
          <view class="text-black">
            <text class="text-cut">{{item.userName.length>0 ? item.userName:'未录入'}}</text>
          </view>
          <view class="text-gray text-sm flex">
            <text class="text-cut">{{item.positionName.length>0? item.positionName :'未录入'}}</text>
          </view>
        </view>
        <view class="action">
          <view wx:if="{{item.auditStatus==0}}">
            <view class="cu-btn round bg-blue shadow" bindtap="doVerify" data-item="{{item}}">审核</view>
          </view>
          <view wx:elif="{{item.auditStatus==1}}">
            <view class="cu-tag round bg-blue sm" wx:if="{{item.isAdmin==0}}">
              {{item.isLeader==1 ? '(领导)':''}}管理员
            </view>
            <view wx:else>
              <view class="cu-tag round bg-red sm">
                {{item.isLeader==1 ? '领导':'职工'}}
              </view>
            </view>
          </view>
          <view wx:else="{{item.auditStatus==-1}}">
            <view class="cu-tag round bg-red sm">不通过</view>
          </view>
        </view>
      </view>
    </view>
    <!-- 功能按钮 -->
    <view slot="right">
      <view class="flex flex-wrap center">
        <view class="bg-red text-center light" style="padding:60rpx" data-key="{{item}}" data-menu="del"
          bindtap="doDelItem">
          <view class="text-lg">删除</view>
        </view>
        <!-- <view class="bg-blue text-center light" bindtap="doEditItem" data-key="{{item}}" style="padding:60rpx"
          data-menu="edit">
          <view class="text-lg">编辑</view>
        </view> -->
      </view>
    </view>
    <view>
    </view>
  </van-swipe-cell>
  <!-- 添加按钮 -->
  <!-- <view class="cu-card bg-white padding-xs margin-left-sm margin-right-sm margin-top-sm radius">
    <view class="cu-item bg-img  bg-gradual-gray" bindtap="toAddShop">
      <view class="cardTitle">
        <text class="cuIcon-add text-white"></text>
      </view>
    </view>
  </view> -->
</scroll-view>