receptionRecording.wxml 3.22 KB
<!--packageCrew/pages/receptionRecording/receptionRecording.wxml-->
<wxs module="filter">
	var isShowEmpty = function (listData) {
		var listDataLength = 0
		for (var i = 0; i < listData.length; i++) {
		var curr = listData[i]
			listDataLength += curr.receptionStaticInfoDTOList ? curr.receptionStaticInfoDTOList.length : 0
		}
		return listDataLength > 0
	}
	module.exports = {
    isShowEmpty: isShowEmpty
  }
</wxs>
<view class="content">
	<view class="top-box">
		<view class="name">
			<view class="staff">
				{{detailInfo.staffName}}
				<image class="sex-icon" src="{{IMG_URL}}{{detailInfo.sex == 1 ? 'female-icon' : 'male-iconx'}}.png" mode="aspectFit" />
			</view>
		</view>
		<view class="items">
			<view class="item {{item.inline ? 'inline' : ''}}" style="{{item.width ? ('width:' + item.width + ';') : ''}}" wx:for="{{detailItems}}" wx:key="index">
				<view class="label">{{item.label}}:</view>
				<view class="value">{{detailInfo[item.key] || '-'}}</view>
			</view>
		</view>
	</view>
	<view class="date">
		<date-screen bind:search="search" customBackground="#F7F8FA"></date-screen>
	</view>
	<view class="grid grid-3">
		<view class="grid-item" wx:for="{{staticsItems}}" wx:key="label">
			<view class="label">{{item.label}}</view>
			<view class="value">{{item.value}}</view>
			<view class="sub {{item.subClass || ''}}" wx:if="{{item.subLabel}}">{{item.subLabel}}</view>
		</view>
	</view>
</view>
<scroll-view scroll-y class="list-box" enable-back-to-top refresher-enabled="{{true}}" bindscrolltolower="onBottomRefresh" style="height: calc(100% - var(--fontSize80));" scroll-top="{{scrollTop}}" refresher-threshold="104" refresher-triggered="{{triggered}}">
	<view class="box-content {{!filter.isShowEmpty(listData) ? 'empty-contant' : ''}}">
		<block wx:if="{{filter.isShowEmpty(listData)}}">
			<block wx:for="{{listData}}" wx:key="date" wx:if="{{item.receptionStaticInfoDTOList.length}}">
				<view class="date-section">
					<view class="list-date">{{item.staticDateStr}}</view>
					<block wx:if="{{!hideScore}}">
						<view class="static">
							<view class="static-warp">
								<view>
									<text class="summary-item green" data-type="upgrade" bindtap="filterItemData">成交 {{item.upgrades}}</text>
									<text class="line"></text>
								</view>
								<view>
									<text class="summary-item red" data-type="defeat" bindtap="filterItemData">战败 {{item.losses}}</text>
								</view>
							</view>
						</view>
					</block>
				</view>
				<block wx:for="{{item.receptionStaticInfoDTOList}}" wx:key="subIndex" wx:for-index="subIndex" wx:for-item="record">
					<view class="record-card" bind:tap="goto" data-record="{{record}}">
						<view class="record-card-top">
							<text class="round-dot" style="font-size: {{subIndex + 1 > 99 ? 'var(--fontSize16)' : 'var(--fontSize20)'}};">{{subIndex + 1}}</text>
							<view class="card-line"></view>
						</view>
						<view class="card-item" wx:key="subIndex">
							<record-item record="{{record}}"></record-item>
						</view>
					</view>
				</block>
			</block>
			<block wx:if="{{nothing}}">
				<view class="list-nothing">到底了~</view>
			</block>
		</block>
		<block wx:if="{{!filter.isShowEmpty(listData) && loaded}}">
			<empty-data />
		</block>
	</view>
</scroll-view>