index.wxml 9.23 KB
<wxs src="../../../utils/permission.wxs" module="perm" />
<wxs src="/tabWorkOrder/pages/tabWorkOrderRelevance/index.wxs" module="filter" />
<navigation-bar bindnavbarReady="navbarReady" showBack="{{ show_confirm }}" bindback="back">{{!show_confirm?'工单列表':'筛选'}}</navigation-bar>
<!-- wx:if="{{navBarHeight > 0}}" -->
<!--  -->
<block wx:if="{{ navBarHeight > 0 }}">
  <view class="main" style="margin-top:{{ navBarHeight }}px">
    <view class="to-box" style="top:{{ navBarHeight }}px">
      <view class="search-box">
        <view class="search-input">
          <image src="{{ IMG_URL }}images/search.png" class="search-icon" />
          <input type="text" placeholder="客户姓名/商品名称/订单编号/手机号" class="input" value="{{ keyword }}" placeholder-class="input-placeholder" bindinput="input" bindconfirm="search" />
          <block wx:if="{{ keyword }}">
            <image src="{{ IMG_URL }}images/clear.png" class="search-clear" bindtap="clear" />
          </block>
        </view>
        <view class="search text-center" bindtap="showConfirm">
          <view class="text-center">
            筛选
            <image class="search-filter" src="{{ IMG_URL }}images/filter.png" />
          </view>
        </view>
      </view>
      <!-- <tab-bar tabList="{{ tabList }}" bindclick="tabClick" activeIndex="{{ activeIndex }}" /> -->
    </view>
    <!-- 订单状态 1 待跟进, 2 不升级, 3 待支付,4 已支付,6 已评价 , 9 已撤销 -->
    <block wx:if="{{ flag }}">
      <scroll-view scroll-y enable-back-to-top refresher-enabled="{{ true }}" bindrefresherrefresh="search" bindscrolltolower="scrollonReachBottom" bindscroll="onPageScroll" class="list" style="height:calc(100vh - {{ navBarHeight }}px - var(--fontSize160));" refresher-threshold="104" refresher-triggered="{{ triggered }}">
        <block wx:if="{{ list.length > 0 }}">
          <block wx:for="{{ list }}" wx:key="index">
            <block wx:for="{{ item }}" wx:for-item="li" wx:for-index="ind" wx:key="ind">
              <view style="{{ li.txtStyle }}" class="touch-item {{ li.isTouchMove ? 'touch-move-active' : '' }}" data-ind="{{ ind }}" data-index="{{ index }}">
                <view class="item content" catchtap="jump" data-ind="{{ ind }}" data-index="{{ index }}" bindtouchstart="touchstart" bindtouchmove="touchmove" bindtouchend="touchE" data-name="{{ li.status == 3 ? 'confirmOrder' : li.status == 1 ? 'createOrder' : 'orderDetail' }}" data-item="{{ li }}">
                  <view class="status text-center" style="color:{{ li.statuscolor }};background-color:{{li.statusbackground }};">
                    <block wx:if="{{ li.status == 1||li.status == 3 }}">
                      <block wx:if="{{ status[li.status].background }}">
                        <view class="arc y-center">
                          <view class="outside box-center" style="background-color:{{ status[li.status].background }};" />
                          <view class="inside box-center" style="background-color:{{ status[li.status].color }};" />
                        </view>
                      </block>
                    </block>
                    <!-- 优先显示已撤销的 然后是已施工的 最后是其他的 -->
                    {{li.statusText }}
                  </view>
                  <view class="name">
                    <view class="name-text text-hide">{{li.customer.customerName}}</view>
                    <image class="name-sex-icon" src="{{ IMG_URL}}{{li.customer.customerSex == 1 ? 'miniProgram/icon-man.png' : 'miniProgram/icon-woman.png' }}" mode="" />
                  </view>
                  <view class="goods-list" style="padding-bottom:{{ li.subOrderList.length<1?0:'' }}">
                    <block wx:if="{{ li.subOrderList.length }}">
                      <block wx:for="{{ li.subOrderList }}" wx:key="sindex" wx:for-item="i" wx:for-index="sindex">
                        <view class="goods" wx:if="{{ li.showAllGoodsListFlag ? true : sindex < 2 }}">
                          <view class="goods-name text-hide">
                            {{filter.replaceItemText(i.upgradeGoodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || i.packageName||''}}
                          </view>
                          <view class="goods-price">
                            ¥
                            <text>{{i.totalPrice || 0}}</text>
                          </view>
                        </view>
                      </block>
                      <block wx:if="{{ li.subOrderList.length > 2 }}">
                        <view class="goods-more">
                          <text catch:tap="showAllGoodsList" data-item="{{ li }}">{{li.showAllGoodsListFlag ? '收起' : '查看全部'}}</text>
                          (共{{li.subOrderList.length}}件)
                        </view>
                      </block>
                    </block>
                  </view>
                  <view class="order-list">
                    <block wx:for="{{ orderObj }}" wx:key="sindex" wx:for-index="sindex" wx:for-item="i">
                      <view class="order">
                        <view class="order-label">{{i.label}}</view>
                        <view class="order-value">
                          <block wx:if="{{ i.arr }}">
                            <block wx:if="{{ li[i.arr[1]] }}">
                              <block wx:for="{{ i.arr }}" wx:key="sindex" wx:for-index="arr_index" wx:for-item="k">
                                <view class="order-value-item text-hide">
                                  <block wx:if="{{ arr_index == 1 }}">
                                    <text class="split">|</text>
                                  </block>
                                  {{li[k]}}
                                </view>
                              </block>
                            </block>
                          </block>
                          <block wx:else>{{li[i.key] || ''}}</block>
                        </view>
                      </view>
                    </block>
                    <view class="order" wx:if="{{ li.customerDailyDisplay.showCustomerTags }}">
                      <view class="order-label">日报标签</view>
                      <view class="order-value">{{ li.customerDailyDisplay.customerTagsText }}</view>
                    </view>
                    <view class="order" wx:if="{{ li.customerDailyDisplay.showActualDeliveryDate }}">
                      <view class="order-label">实际交付日期</view>
                      <view class="order-value">{{ li.customerDailyDisplay.actualDeliveryDate }}</view>
                    </view>
                  </view>

                  <view class="order-payType" wx:if="{{ li.selectPayType || li.selectPayType == 0 }}">
                    <view class="payType">
                      <view class="payType-label">支付方式</view>
                      <view class="payType-value">
                        {{payType[li['selectPayType']]}}
                        <image wx:if="{{ li.selectPayType == 1 }}" class="payType-image" src="{{ IMG_URL }}miniProgram/wxPay.png" mode="" />
                        <image wx:if="{{ li.selectPayType == 2 }}" class="payType-image" src="{{ IMG_URL }}miniProgram/store_pay.png" mode="" />
                        <image wx:if="{{ li.selectPayType == 3 }}" class="payType-image" src="{{ IMG_URL }}miniProgram/posPay.png" mode="" />
                      </view>
                    </view>
                    <block wx:if="{{ li.status != 1 && li.selectPayType != 0 && li.total_price != 0 }}">
                      <view class="order-price">
                        <view class="order-price-label">实付金额</view>
                        <view class="price">
                          <text class="unit">¥</text>
                          {{li.totalPrice}}
                        </view>
                      </view>
                    </block>
                  </view>
                </view>
                <block wx:if="{{ isMake }}">
                  <view wx:if="{{ !li['confirmIndex'] }}" class="del" catchtap="delBtn" data-ind="{{ ind }}" data-item="{{ li }}" data-index="{{ index }}">
                    <view>撤销</view>
                    <view>工单</view>
                  </view>
                  <view wx:else class="del confirm" catchtap="repeal" data-item="{{ li }}" data-index="{{ index }}">确认删除</view>
                </block>
              </view>
            </block>
          </block>
          <block wx:if="{{ nothing }}">
            <view class="list-nothing">到底了~</view>
          </block>
        </block>
        <block wx:else>
          <empty-data />
        </block>
      </scroll-view>
    </block>
  </view>
</block>

<block wx:if="{{ !perm.hasPermission.isSuper(userInfo) && userInfo.merchantType && userInfo.userType == 2 && !showIcon1 }}">
  <view class="arrowIcon">
    <image class="image" src="{{ IMG_URL }}upgrade/arrow-left.png" />
  </view>
</block>
<page-container show="{{ show_confirm }}" duration="{{ 0 }}" overlay="{{ false }}" bind:afterleave="back">
  <view wx:if="{{ showRendering }}">
    <order-screen show="{{ show_confirm }}" userInfo="{{ userInfo }}" navBarHeight="{{ navBarHeight }}" orderStatus="{{ tabIndex }}" />
  </view>
</page-container>
<study-permission-modal id="customModal" />