createVisit.wxml
3.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<!--packageCustomer/pages/createVisit/createVisit.wxml-->
<glsx-privacy appletName="销售助手" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<navigation-bar showBack="{{true}}" bind:navbarReady="onNavbarReady">新增拜访</navigation-bar>
<view class="visit-create" style="padding-top: {{navHeight}}px;">
<view class="card">
<view class="row" bindtap="openTimePicker">
<view class="label">拜访时间 <text class="star">*</text></view>
<view class="value">
<text wx:if="{{infoData.visitTimeText}}" class="value-text">{{infoData.visitTimeText}}</text>
<block wx:else>
<text class="placeholder">点击选择</text>
</block>
<image src="{{IMG_URL}}customer/arrow.png" mode=""/>
</view>
</view>
<view class="row">
<view class="label">联系人 <text class="star">*</text></view>
<view class="value">
<input class="input" placeholder="请输入" maxlength="15" placeholder-class="input-ph" value="{{infoData.contactName}}" bindinput="onContactInput" />
</view>
</view>
<view class="row no-border">
<view class="label">拜访内容 <text class="star">*</text></view>
</view>
<view class="textarea-wrap">
<textarea class="textarea" placeholder="请输入" disabled="{{timeVisible || textareaDisabled}}" placeholder-class="input-ph" value="{{infoData.content}}" bindinput="onContentInput" />
<view class="counter">{{contentLength}}/100</view>
</view>
<view class="row no-border">
<view class="label">拜访照片</view>
</view>
<view class="uploader-wrap">
<view class="content_box">
<view class="image_content" wx:for="{{infoData.attachmentList}}" wx:key="index">
<image bindtap="previewImage" class="image_box" data-url="{{infoData.attachmentList}}" data-index="{{index}}" src="{{item}}"/>
<image class="del_icon" src="{{IMG_URL}}customer/del-icon.png" mode="" bindtap="deleteFile" data-index="{{index}}" />
</view>
<view class="upload_content" bindtap="uploadImages" wx:if="{{!infoData.attachmentList.length}}">
<image src="{{IMG_URL}}customer/add-icon.png"></image>
</view>
</view>
</view>
<view class="row no-border location-row">
<view class="label">拜访签到</view>
<view class="value location-value">
<text wx:if="{{locationName}}" class="value-text">{{locationName}}</text>
<view class="location-text" wx:else bind:tap="getLocation">
<text class="placeholder">获取定位</text>
<image class="addr-icon" src="{{IMG_URL}}customer/location.png" />
</view>
</view>
</view>
</view>
<view class="isFullSucreen btn">
<view class="cancel" bindtap="handleCancel">取消</view>
<view class="confirm" bindtap="handleConfirm">提交</view>
</view>
</view>
<!-- 结果弹窗组件:统一反馈弹窗 -->
<result-dialog id="resultDialog" bind:ok="onDialogOk" bind:close="onDialogClose" />
<popup bind:hidePopup="cancel" bind:confirm="popupConfirm" show="{{timeVisible}}" title="拜访时间" height="50vh">
<van-datetime-picker id="datePicker" show-toolbar="{{false}}" min-date="{{ minDate }}" max-date="{{ maxDate }}" model:value="{{ currentDate }}" type="datetime" bind:change="onChange"/>
</popup>