teachApplyCreate.wxml 4.75 KB
<navigation-bar
  showBack="{{ true }}"
  bindback="onBack"
  bindnavbarReady="navbarReady"
  navStyle="background-color:#ffffff;box-shadow:none;"
>
  <view class="nav-title">带教申请</view>
</navigation-bar>

<view class="create-page" style="padding-top: {{ navBarHeight }}px;">
  <scroll-view scroll-y class="create-scroll">
    <view class="form-card">
      <view class="form-row" bindtap="pickMerchant">
        <view class="label"><text class="req">*</text>归属门店</view>
        <view class="value {{ merchantName ? '' : 'placeholder' }}">
          {{ merchantName || '点击选择' }}
        </view>
        <view class="arrow">›</view>
      </view>

      <view class="form-row" bindtap="pickBusiness">
        <view class="label"><text class="req">*</text>归属业务</view>
        <view class="value {{ businessName ? '' : 'placeholder' }}">
          {{ businessName || '点击选择' }}
        </view>
        <view class="arrow">›</view>
      </view>

      <view class="form-row" bindtap="pickStaff">
        <view class="label"><text class="req">*</text>需带教驻店人员</view>
        <view class="value {{ staffNames ? '' : 'placeholder' }}">
          {{ staffNames || '点击选择' }}
        </view>
        <view class="arrow">›</view>
      </view>

      <view class="form-row disabled">
        <view class="label"><text class="req">*</text>归属区域督导</view>
        <view class="value {{ supervisorName ? '' : 'placeholder' }}">
          {{ supervisorDisplayText }}
        </view>
      </view>

      <view class="textarea-block">
        <view class="textarea-title"><text class="req">*</text>申请描述</view>
        <view class="textarea-wrap">
          <gl-textarea
            bindinput="onDescInput"
            maxlength="{{ descriptionMaxLength }}"
            showWordLimit
            value="{{ description }}"
            placeholder="请简单描述申请信息"
            placeholderColor="#bbbbbb"
            color="#222222"
            textStyle="font-size:28rpx;line-height:40rpx;"
          />
        </view>
      </view>
    </view>
    <view class="bottom-safe"></view>
  </scroll-view>

  <view class="footer-bar isFullSucreen">
    <view class="submit-btn" bindtap="submit">提交</view>
  </view>
</view>

<popup
  title="选择门店"
  show="{{ merchantPopupShow }}"
  height="85%"
  bindconfirm="confirmMerchantPopup"
  bindcancel="cancelMerchantPopup"
>
  <view class="picker-search">
    <image src="/images/search.png" class="picker-search__icon" />
    <input
      type="text"
      placeholder="门店名称/编号"
      class="picker-search__input"
      value="{{ merchantKeyword }}"
      placeholder-class="input-placeholder"
      bindinput="onMerchantKeywordInput"
      bindconfirm="searchMerchant"
    />
    <block wx:if="{{ merchantKeyword }}">
      <image
        src="/images/clear.png"
        class="picker-search__clear"
        bindtap="clearMerchantKeyword"
      />
    </block>
  </view>
  <scroll-view scroll-y class="picker-list" enhanced show-scrollbar="{{ false }}">
    <block wx:if="{{ merchantLoading }}">
      <view class="picker-tip">加载中...</view>
    </block>
    <block wx:elif="{{ merchantList.length }}">
      <view
        class="picker-item {{ merchantIndex === index ? 'active' : '' }}"
        wx:for="{{ merchantList }}"
        wx:key="merchantId"
        bindtap="chooseMerchant"
        data-index="{{ index }}"
      >
        <view class="picker-item__main">
          <view class="picker-item__name text-hide">{{ item.merchantName }}</view>
          <view class="picker-item__sub">{{ item.merchantId }}</view>
        </view>
        <view class="picker-item__mark" wx:if="{{ merchantIndex === index }}">✓</view>
      </view>
    </block>
    <empty-data wx:else emptyText="暂无门店" />
  </scroll-view>
</popup>

<popup
  title="选择员工"
  show="{{ staffPopupShow }}"
  height="70%"
  bindconfirm="confirmStaffPopup"
  bindcancel="cancelStaffPopup"
>
  <scroll-view scroll-y class="picker-list picker-list--staff" enhanced show-scrollbar="{{ false }}">
    <block wx:if="{{ staffLoading }}">
      <view class="picker-tip">加载中...</view>
    </block>
    <block wx:elif="{{ staffOptions.length }}">
      <view
        class="picker-item {{ item.checked ? 'active' : '' }}"
        wx:for="{{ staffOptions }}"
        wx:key="index"
        catchtap="toggleStaff"
        data-index="{{ index }}"
      >
        <view class="picker-item__main">
          <view class="picker-item__name">{{ item.userName }}</view>
          <view class="picker-item__sub">{{ item.userPhone }}</view>
        </view>
        <view class="picker-item__mark" wx:if="{{ item.checked }}">✓</view>
      </view>
    </block>
    <empty-data wx:else emptyText="暂无驻店人员" />
  </scroll-view>
</popup>