index.wxml 5.36 KB
<!--tabWorkOrder/pages/residentManage/components/accountAllocation/index.wxml-->
<view class="container">
	<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="info">员工调店分配新门店账号,业务督导需要处理员工的账号管理,若旧门店账号不再使用,请禁用旧账号,请标记勾选员工所在店面</view>
	<view class="title">
		账号列表
		<text>请勾选员工目前调岗在店的门店名称</text>
	</view>
	<block wx:if="{{ isFlag }}">
		<scroll-view
			class="account-box"
			style="height: calc(100% - var(--fontSize340));"
			enhanced="{{ true }}"
			show-scrollbar="{{ false }}"
			scroll-y
			bindscrolltolower="mineReachBottom"
		>
			<view class="list" wx:if="{{ accountList.length>0 }}">
				<view class="item" wx:for="{{ accountList }}" wx:key="index">
					<view class="header">
						<view class="left">
							<view class="name">
								<view class="staff">{{item.staffName}}</view>
								<text>{{item.staffPhone}}</text>
							</view>
							<view class="tags">
								<view class="tag" wx:for="{{ item.labelArr }}" wx:for-item="tag" wx:for-index="key" wx:key="key">{{businessType[tag]}}</view>
							</view>
						</view>
						<view class="right" bind:tap="goToStaff" data-index="{{ index }}">新增员工账号</view>
					</view>
					<view class="item-content">
						<view class="content-account" wx:for="{{ item.staffAccountList }}" wx:for-item="account" wx:for-index="i" wx:key="i">
							<view class="account-header">
								<view class="park-name">
									账号{{i+1}}
									<view class="yqMerchant-box">
										<view class="text-hide">{{account.yqMerchantName}}</view>
										{{account.yqMerchantId}}
									</view>
								</view>
								<view class="operation">
									<van-switch
										class="active-switch"
										checked="{{ account.deletedState }}"
										active-color="#2C66F7"
										inactive-color="#D0D2D6"
										data-index="{{ index }}"
										data-account-index="{{ i }}"
										bind:change="onChange"
										size="25px"
									/>
									<view class="switch-text">
										<view class="active" wx:if="{{ account.deletedState }}">启用</view>
										<view class="disabled" wx:else>禁用</view>
									</view>
								</view>
							</view>
							<view class="store-list">
								<view
									class="store"
									wx:for="{{ account.unfold?account.checkList:account.staffConfigList }}"
									wx:for-item="store"
									wx:for-index="s"
									wx:key="s"
								>
									<view class="choose">
										<view
											class="choose-open"
											wx:if="{{ account.deletedState }}"
											catch:tap="updateConfig"
											data-index="{{ index }}"
											data-account-index="{{ i }}"
											data-store-index="{{ s }}"
										>
											<!-- <gl-image webp mode="widthFix" wx:if="{{store.deferredOpenState}}" class="select" src="/check.png" /> -->
											<image mode="widthFix" wx:if="{{ store.deferredOpenState }}" class="select" src="{{ IMG_URL2 }}checkbox-checked.png" />
											<gl-image webp mode="widthFix" wx:else class="select" src="/no-check.png" />
										</view>
										<view class="choose-open" wx:else>
											<gl-image webp mode="widthFix" wx:if="{{ store.deferredOpenState }}" class="select" src="/dis-check.png" />
											<gl-image webp mode="widthFix" wx:else class="select" src="/no-dis-check.png" />
										</view>
									</view>
									<view class="store-info">
										<view class="name">
											<view class="text-hide">{{store.merchantName}}</view>
											{{store.merchantId}}
										</view>
										<view class="time" wx:if="{{ store.startEffectiveTime }}">生效时间:{{store.startEffectiveTime?store.startEffectiveTime:'-'}}</view>
									</view>
								</view>
							</view>
							<block wx:if="{{ account.unfold }}">
								<view class="more" catchtap="packupList" data-index="{{ index }}" data-account-index="{{ i }}">
									查看员工更多可登录4s店
									<view class="pack-up">
										<image src="{{ IMG_URL }}arrow.png" />
									</view>
								</view>
							</block>
							<block wx:else>
								<view class="more" catchtap="packupList" data-index="{{ index }}" data-account-index="{{ i }}">
									折叠无效非在岗门店
									<view class="pack-up down">
										<image src="{{ IMG_URL }}arrow.png" />
									</view>
								</view>
							</block>
						</view>
					</view>
				</view>
				<block wx:if="{{ nothing }}">
					<view class="list-nothing">到底了~</view>
				</block>
			</view>
			<view class="no-data" wx:else>
				<empty-data />
			</view>
		</scroll-view>
	</block>
</view>
<dialog
	show="{{ showModal }}"
	confirmText="确定"
	cancelText="取消"
	showCancelButton
	success="{{ success }}"
	bindconfirm="dialogConfirm"
	bindcancel="dialogClose"
	text="{{ dialogText }}"
></dialog>
<time-picker
	show="{{ showTimeModal }}"
	confirmText="确定"
	cancelText="取消"
	showCancelButton
	success="{{ success }}"
	bindconfirm="timeConfirm"
	bindcancel="dialogTimeClose"
></time-picker>