<!-- pages/dashboardModule/userOrderPerformance/userOrderPerformance.wxml -->
<view class="flex-col page">
  <text class="self-center text">客户订单明细</text>

  <view class="flex-col self-stretch mt-19">
    <view class="flex-col section">
      <view class="flex-col group">
        <text class="self-start font text_2">订单号</text>
        <view class="flex-col justify-start items-start self-stretch text-wrapper">
          <input
            class="text_3 font text_1"
            placeholder="请输入订单号"
            value="{{orderNumber}}"
            type="number"
            bindinput="onOrderNumberInput"
          />
        </view>
      </view>

      <view
        class="flex-col justify-start items-center text-wrapper_3"
        bindtap="searchOrder"
      >
        <text class="font_2 text_7">搜索</text>
      </view>
    </view>

    <view class="flex-col mt-35">
      <!-- 有数据时渲染列表 -->
      <block wx:if="{{OrderItems.length}}">
        <view
          class="flex-col list-item mt-22"
          wx:for="{{OrderItems}}"
          wx:for-item="item"
          wx:for-index="index"
          wx:key="id"
        >
          <view class="flex-row items-baseline" style="display: flex; justify-content: space-between;">
            <text class="font_2 text_8">订单号：</text>
            <text class="font_3">{{item.orderNumber}}</text>
          </view>

          <view class="flex-row justify-between mt-19">
            <text class="font_2 text_9">用户：</text>
            <text class="font_4 text_10">{{item.nickName}}</text>
          </view>

          <view class="flex-row justify-between items-center mt-19">
            <text class="font_2 text_11">手机号：</text>
            <text class="font_3 text_12">{{item.phoneNumber}}</text>
          </view>

          <view class="flex-row justify-between items-center mt-19">
            <text class="font_2 text_13">金额：</text>
            <text class="font_3 text_24">￥{{item.totalAmount}}</text>
          </view>

          <view class="flex-row justify-between items-center mt-19">
            <text class="font_2 text_15">状态：</text>
            <text class="font_4 text_16">{{item.orderStatus}}</text>
          </view>

          <view class="flex-row justify-between items-center mt-19">
            <text class="font_2 text_17">抽成：</text>
            <text class="font_4 text_18">主管：{{item.firstRate * 100}}%，员工：{{item.secondRate * 100}}%
            </text>
          </view>

          <view class="flex-row justify-between items-center mt-19">
            <text class="font_2 text_19">奖励：</text>
            <text class="font_4 text_20">主管：¥{{item.firstReward}}，员工：¥{{item.secondReward}}
            </text>
          </view>

          <view class="flex-row justify-between mt-19">
            <text class="font_2 text_21">提成状态：</text>
            <text class="font_4 text_23">{{item.commissionStatus}}</text>
          </view>

          <!-- <view class="flex-row justify-between mt-19">
            <text class="font_2 text_4">创建时间：</text>
            <text class="font_3 text_5">{{item.createTime}}</text>
          </view> -->
        </view>
      </block>

      <!-- 无数据时提示 -->
      <block wx:else>
        <text class="self-center font text_4">暂无数据</text>
      </block>
    </view>
  </view>
</view>
