detail.wxml 6.15 KB
<!-- tabDate/pages/detail/detail.wxml -->
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<block wx:if="{{ flag }}">
	<view class="main {{ isFullSucreen && detail.inviteStatus != 4?'isFullSucreen':'' }}">
		<view class="box">
			<view class="title">客户信息</view>
			<view class="customer-list">
				<block wx:for="{{ customerObj }}" wx:key="index">
					<view class="item">
						<view class="label">{{item.label}}</view>
						<view
							class="value {{ item.key != 'userPortrait' ? 'text-hide' : '' }}"
							style="color:{{ item.color }};"
							catchtap="item.callBack"
							data-data="{{ detail[item.key] }}"
						>
							<!-- <view>{{item.key}}</view> -->
							<block wx:if="{{ item.key=='carName' }}">
								<block wx:if="{{ detail.customer.carSeriesName }}">
									<!-- <view class="between"> -->
									{{detail.customer.carBrand}}-{{detail.customer.carChildsBrandName}}-{{detail.customer.carSeriesName}}
									<!-- </view> -->
								</block>
							</block>
							<block wx:elif="{{ item.key == 'couponName' }}">
								<text>{{item.enum? item.enum[detail[item.key]] : detail[item.key] || ''}}</text>
								<text>({{item.enum? item.enum[detail[item.e_key]] : detail[item.e_key] || ''}})</text>
							</block>
							<view wx:elif="{{ item.key == 'userPortrait' }}" class="portrait">
								<view wx:for="{{ detail[item.key] }}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" class="portrait-item">{{subItem}}</view>
							</view>
							<block wx:else>{{item.enum? item.enum[detail[item.key]] : detail[item.key] || ''}}</block>
						</view>
						<block wx:if="{{ item.copy }}">
							<view class="copy" catchtap="setCopyData" data-content="{{ detail[item.key] }}">复制</view>
						</block>
						<block wx:if="{{ item.portrait&&isOrder }}">
							<view class="copy" catchtap="editProtrait">编辑</view>
						</block>
					</view>
				</block>
			</view>
		</view>
		<view class="box">
			<block wx:if="{{ !userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2&&isOrder }}">
				<!-- 已施工/已撤销/已支付 不显示 -->
				<view
					wx:if="{{ detail.inviteStatus != 4&&detail.inviteStatus!=6&&detail.inviteStatus!=7 }}"
					class="icon date-icon"
					bindtap="showPopup"
					data-name="showDate"
				>
					<image src="../../images/date.png" />
				</view>
			</block>
			<view class="title">到店时间</view>
			<block wx:if="{{ detail.inviteDate }}">
				<view class="date-box">
					<!-- 已撤销的时间显示灰色 -->
					<view class="date text-center {{ detail.inviteStatus == 6 ? 'gray' : '' }}">
						{{detail.inviteDate}}
						<!-- 已施工/已支付/已撤销 不显示 -->
						<block
							wx:if="{{ !userInfo.isSuper && userInfo.merchantType  && userInfo.userType == 2 && detail.inviteStatus!=4 && detail.inviteStatus!=7 && detail.inviteStatus != 6&&isOrder }}"
						>
							<view class="cancel y-center" bindtap="cancelInvite">取消预约</view>
						</block>
					</view>
					<view class="tips text-center">跟进人:{{detail.userName || ''}}</view>
				</view>
			</block>
			<block wx:else>
				<view class="nothing text-center">暂无记录</view>
			</block>
		</view>
		<view class="box">
			<view class="title">客户跟进记录</view>
			<block wx:if="{{ detail.remarks.length > 0 }}">
				<view class="record-box">
					<block wx:for="{{ detail.remarks }}" wx:key="index">
						<view class="record {{ index != 0 ? 'opacity' : '' }}">
							<view class="line" wx:if="{{ index != detail.remarks.length - 1 }}" />
							<block wx:if="{{ detail.remarks.length > 1 }}">
								<block wx:if="{{ index == 0 }}">
									<view class="arc-icon">
										<image src="/images/active-arc.png" />
									</view>
								</block>
								<block wx:else>
									<view class="arc" />
								</block>
							</block>
							<view class="time">
								<view class="year">{{item.year}}</view>
								{{item.time}}
							</view>
							<view class="info">
								<block wx:for="{{ recordObj }}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
									<view class="item">
										<view class="label">
											<block wx:if="{{ ind==0 }}">
												<view>{{i.label}}</view>
											</block>
											<block wx:else>
												<view class="w2">
													<block wx:for="{{ i.label }}" wx:key="in" wx:for-index="in" wx:for-item="c">
														<text>{{c}}</text>
													</block>
												</view>
											</block>
											:
										</view>
										<view class="value">{{i.enum? i.enum[item[i.key]]+item.inviteDate :item[i.key]||'无'}}</view>
									</view>
								</block>
								<block
									wx:if="{{ !userInfo.isSuper && userInfo.merchantType && index == 0 && userInfo.userType == 2&&detail.inviteStatus!=6&&isOrder }}"
								>
									<view class="icon" bindtap="showPopup" data-name="showRemark">
										<image src="../../images/edit.png" />
									</view>
								</block>
							</view>
						</view>
					</block>
				</view>
			</block>
			<block wx:else>
				<view class="nothing text-center">暂无记录</view>
			</block>
		</view>
		<!-- 已施工/已撤销/已支付 不显示 -->
		<view
			wx:if="{{ detail.inviteStatus != 4&&detail.inviteStatus != 6 && detail.inviteStatus != 7&&isOrder }}"
			class="btns {{ isFullSucreen?'isFullSucreen-btn':'' }}"
		>
			<view class="btn text-center" bindtap="orderSubmit">去下单</view>
		</view>
	</view>
	<date-picker show="{{ showDate }}" merchantId="{{ detail.merchantCoupon.yqMerchantId }}" />
	<remark-popup wx:if="{{ showRemark }}" show="{{ showRemark }}" bindconfirm="remarkConfirm" placeholder="请填写内容,最多15个字" maxlength="15" />
</block>
<modal id="modal2" class="modal" custom="true" btns="{{ ['取消','确定'] }}">
	<view class="modatcontent">
		<view class="modalbox {{ selectType == 1?'act': '' }} com" bindtap="selectType" data-type="1">
			<gl-image class="icon" src="/miniProgram/order1.png"></gl-image>
			新增工单
		</view>
		<view class="modalbox cancle {{ selectType == 2?'act': '' }}" bindtap="selectType" data-type="2">
			<gl-image class="icon" src="/miniProgram/order3.png"></gl-image>
			战败下单
		</view>
	</view>
</modal>