negotiationDetail.wxml 3.21 KB
<!-- TEST-ID: IT-ROUTE-003 packageDynamicForm.negotiationDetail -->
<view class="layout">
	<navigation-bar bindback="jump" bindnavbarReady="navbarReady" showBack="{{ true }}">
		<view class="navigation-title">
			<view class="navigation-title-text text-hide">{{ merchantName || pageTitle }}</view>
		</view>
	</navigation-bar>

	<view style="margin-top:{{ navBarHeight }}px">
		<weekCalendar
			timeBean="{{ timeBean }}"
			bind:lastWeek="lastWeek"
			bind:nextWeek="nextWeek"
			bind:dayClick="dayClick"
		></weekCalendar>
	</view>

	<view class="loading-panel" wx:if="{{ loading }}">
		<view class="loading-skeleton"></view>
		<view class="loading-skeleton loading-skeleton--short"></view>
		<view class="loading-skeleton"></view>
	</view>

	<view class="error-panel" wx:elif="{{ loadError }}">
		<view class="error-panel__text">{{ loadError }}</view>
		<view class="error-panel__btn" bindtap="loadFormData">重新加载</view>
	</view>

	<scroll-view
		wx:else
		class="main {{ formDisabled ? 'main--readonly' : '' }}"
		scroll-y
		enhanced
		show-scrollbar="{{ false }}"
	>
		<view wx:if="{{ isDateWithinEditableWindow }}" class="today-plan-banner">
			<view class="today-plan-banner__left">
				<image class="today-plan-banner__icon" src="{{ todayPlanClassIconUrl }}" mode="aspectFit" />
				<text class="today-plan-banner__text">今日待接待客户数</text>
				<text class="today-plan-banner__count">{{ todayPlanCustomerCount }}</text>
			</view>
			<view
				wx:if="{{ !formDisabled }}"
				class="today-plan-banner__btn"
				bindtap="openTodayPlanCustomerPopup"
			>
				<text class="today-plan-banner__btn-text">查看客户</text>
				<image
					class="today-plan-banner__btn-arrow"
					src="{{ todayPlanArrowRightIconUrl }}"
					mode="aspectFit"
				/>
			</view>
		</view>
		<dynamic-form
			fixedFields="{{ fixedFields }}"
			section-groups="{{ sectionGroups }}"
			groupFields="{{ groupFields }}"
			values="{{ values }}"
			errors="{{ errors }}"
			disabled="{{ formDisabled }}"
			request-context="{{ requestContext }}"
			group-active-index="{{ groupActiveIndex }}"
			group-row-visible-map="{{ groupRowVisibleMap }}"
			group-row-total-map="{{ groupRowTotalMap }}"
			bind:change="onFieldChange"
			bind:groupadd="onGroupAdd"
			bind:groupremove="onGroupRemove"
			bind:groupnav="onGroupNav"
			bind:groupchange="onGroupChange"
		></dynamic-form>
		<view class="btns">
			<view class="btns-con btns-con--stack" wx:if="{{ isDateWithinEditableWindow }}">
				<block wx:if="{{ !isReportSubmitted }}">
					<view class="confirm text-center" bindtap="submit">提交</view>
				</block>
				<block wx:else>
					<view wx:if="{{ !isEditReport }}" class="confirm text-center" bindtap="editReport">编辑</view>
					<block wx:else>
						<view class="confirm text-center" bindtap="submit">保存</view>
						<view class="save text-center" bindtap="cancelReport">取消</view>
					</block>
				</block>
			</view>
		</view>
	</scroll-view>

	<today-plan-customer-popup
		show="{{ showTodayPlanPopup }}"
		anchor-date="{{ reportDate }}"
		merchant-id="{{ todayPlanMerchantId }}"
		advance-user-id="{{ todayPlanAdvanceUserId }}"
		staff-name="{{ todayPlanStaffName }}"
		bind:cancel="closeTodayPlanCustomerPopup"
		bind:confirm="onTodayPlanCustomersConfirm"
	/>
</view>