index.wxml 6.33 KB
<navigation-bar bindnavbarReady="navbarReady" showBack="{{show_confirm}}" bindback="back">
	{{!show_confirm?'预约管理':'筛选'}}
</navigation-bar>
<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="/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="/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="/images/filter.png" />
					</view>
				</view>
			</view>
			<tab-bar tabList="{{tabList}}"  bindclick="tabClick"  activeIndex="{{activeIndex}}"/>
		</view>
    <view class="list-bar">
      <view>今日预约 · <span class="txt-blue">{{inviteObj.dayInvited || 0}}</span></view>
      <view>本周预约 · <span class="txt-blue">{{inviteObj.weekInvited || 0}}</span></view>
      <view>超时未到店 · <span class="txt-blue">{{inviteObj.overdue || 0}}</span></view>
      <image class="icon-cal" src="{{IMG_URL}}miniProgram/date_icon.png" bindtap="jump" data-item="{}" data-recorderId='22' data-name="tabDate.apprManage"/>
    </view>
		<block wx:if="{{flag}}">
			<scroll-view
			             scroll-y
			             enable-back-to-top
			             refresher-enabled="{{true}}"
			             bindrefresherrefresh="search"
			             bindscrolltolower="scrollonReachBottom"
			             class="list"
			             style="height:calc(100vh - {{navBarHeight + 104}}px);"
			             refresher-threshold="104"
			             refresher-triggered="{{triggered}}"
			             class="list">
				<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 list-item content"
								      catchtap="jump"
								      data-ind='{{ind}}'
								      data-index='{{index}}'
								      bindtouchstart="touchstart"
								      bindtouchmove="touchmove"
								      bindtouchend="touchE"
								      data-name="detail"
									  data-recorderId='23'
								      data-item="{{li}}">
									<view class="status" style="color:{{status[li.inviteStatus].color}}">
										<block>{{status[li.inviteStatus].text}}</block>
										<block wx:if="{{li.inviteStatus !=4}}">
											<view class="line" style="background-color:{{status[li.inviteStatus].color}};" />
										</block>
									</view>
									<view class="name">
										<image src="/images/avatar.png" />
										<view class="name-text text-hide">{{li.customer.customerName || ''}}</view>
									</view>
									<view class="order-list">
										<block wx:for="{{orderObj}}" wx:key="index" 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>
														<text>{{li[i.key][i.c_key]|| ''}}</text>
														<text wx:if="{{li[i.key][i.e_key]}}">({{li[i.key][i.e_key]}})</text>
													</block>
												</view>
											</view>
										</block>
									</view>
									<view class="order-type">
										<view class="label">到店时间</view>
										<view class="time {{now<li.inviteDate?'':'gray'}}">{{li.time}}</view>
									</view>
									<view class="order-control">
										<block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && li.customerCoupon.usedFlag !='Y'&&li.inviteStatus !=4&&li.inviteStatus !=6}}">
											<view class="control-item" catchtap="showDateBox" data-item="{{li}}">
												<image src="../../images/date.png" class="date-icon" />
												预约
											</view>
										</block>
										<block wx:if="{{li.customer.customerPhone&&!phoneShow}}">
											<view class="control-item" data-phone="{{li.customer.customerPhone}}" catchtap="phoneCall">
												<image src="../../images/phone.png" class="phone-icon" />
												拨号
											</view>
										</block>
									</view>
								</view>
								<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>
							</view>
						</block>
					</block>
					<block wx:if="{{nothing}}">
						<view class="list-nothing">到底了~</view>
					</block>
				</block>
				<block wx:else>
					<view class="list-not">暂无数据</view>
				</block>
			</scroll-view>
		</block>
	</view>
</block>
<order-confirm
               show="{{show_confirm}}"
               userInfo="{{userInfo}}"
               type="2"
               navBarHeight="{{navBarHeight}}"
               inviteStatus="{{tabIndex}}" />
<date-picker show="{{showDate}}" merchantId="{{dateItem.merchantCoupon.yqMerchantId}}" />