newPunch.wxml
6.53 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<!--pages/index/rank/rank.wxml-->
<view class="punch_detail">
<view class="title_card">
<van-cell-group border="{{ false }}">
<van-field value="{{ form.taskTitle }}" placeholder="请输入标题" border="{{ false }}" bind:change="onfieldChange" />
</van-cell-group>
<view class="grey_line"></view>
<view class="box_card">
<van-cell-group border="{{ false }}">
<van-field value="{{ form.taskDesc }}" type="textarea" placeholder="请输入" autosize border="{{ false }}" bind:change="onfieldDescChange" />
</van-cell-group>
</view>
<view class="tip_card">
<van-uploader accept='image' file-list="{{ fileList }}" deletable="{{ true }}" bind:after-read="afterRead" bind:delete="delFile">
<view class="tip_item">
<image class="pic" src="/img/answer/tp1.png" alt="" />
</view>
</van-uploader>
<!-- <view class="tip_item">
<image class="pic" src="/img/answer/sp1.png" alt="" />
</view>
<view class="tip_item">
<image class="pic" src="/img/answer/yp1.png" alt="" />
</view> -->
</view>
</view>
<view class="white_card">
<view class="bold_font">需要提交数据</view>
<view>
<van-switch checked="{{ form.hasData }}" size='20' active-value='1' inactive-value='2' bind:change="onSwitch" />
</view>
</view>
<view class="grey_line"></view>
<view class="white_card_nopadding" wx:if="{{form.hasData == 1}}">
<van-cell-group border="{{ false }}">
<van-cell title="统计单位" value="{{ form.statisticsUnit }}" is-link label="请选择统计单位" border="{{ false }}" bindtap="openUnitShow" />
</van-cell-group>
</view>
<view class="white_card" wx:if="{{form.hasData == 1}}">
<view>允许补卡</view>
<view>
<van-switch checked="{{ form.allowRepairCard }}" size='20' bind:change="onChange" active-value='1' inactive-value='2' />
</view>
</view>
<view class="sm_grey_font">
开启后,在打卡周期内,学生家长可对未打卡的任务进行补卡。
</view>
<view class="white_card_nopadding">
<van-cell-group border="{{ false }}">
<van-cell title="开始时间" value="{{ form.startDate }}" is-link border="{{ false }}" bindtap="openStartTimeShow" />
</van-cell-group>
</view>
<view class="white_card_nopadding">
<van-cell-group border="{{ false }}">
<van-cell title="打卡周期" value="{{ form.taskCycle + ' 天'}}" is-link border="{{ false }}" bindtap="openClockCycleShow" />
</van-cell-group>
</view>
<view class="white_card_nopadding">
<van-cell-group border="{{ false }}">
<van-cell title="打卡频次" value="{{ form.taskFrequency }}" is-link border="{{ false }}" bindtap="openClockRateShow" />
</van-cell-group>
</view>
<view class="clearance"></view>
<view class="white_card_nopadding">
<van-cell-group border="{{ false }}">
<van-cell title="打卡提醒" value="{{ form.remindTime }}" is-link border="{{ false }}" bindtap="openClockRemindShow" />
</van-cell-group>
</view>
<view class="white_card_nopadding">
<van-cell-group border="{{ false }}">
<van-cell title="缺卡打卡提醒" value="{{ form.lackNum + ' 次' }}" is-link border="{{ false }}" bindtap="openClockLackShow" />
</van-cell-group>
</view>
<view class="sm_grey_font">
学生如缺卡达到一定条件,将会提醒家长
</view>
<view class="white_card_nopadding">
<van-cell-group border="{{ false }}" >
<van-cell title="提交时必须包含" value="{{ form.submitCondition }}" is-link border="{{ false }}" bindtap="openContainShow" />
</van-cell-group>
</view>
<view class="clearance"></view>
<view class="btn">
<van-button type="info" round block bindtap="createTask">创建打卡</van-button>
</view>
<!--统计单位-->
<van-popup show="{{ unitShow }}" position="bottom" custom-style="height: 40%;" round bind:close="closeUnitShow">
<van-picker columns="{{ columnsUnit }}" bind:confirm="changeUnitShow" bind:cancel="closeUnitShow" show-toolbar title="统计单位" />
</van-popup>
<!--开始时间-->
<van-popup show="{{ startTimeShow }}" position="bottom" custom-style="height: 40%;" round bind:close="closeStartTimeShow">
<!-- <van-picker columns="{{ columnsStartTime }}" bind:confirm="changeStartTimeShow" bind:cancel="closeStartTimeShow" show-toolbar title="开始时间" /> -->
<van-datetime-picker title="开始时间" type="date" value="{{ form.startTimeShow }}" min-date="{{ minDate }}" bind:confirm="changeStartTimeShow" bind:cancel="closeStartTimeShow" formatter="{{ formatter }}" />
</van-popup>
<!--打卡周期-->
<van-popup show="{{ clockCycleShow }}" position="bottom" custom-style="height: 40%;" round bind:close="closeClockCycleShow">
<van-picker columns="{{ columnsClockCycle }}" bind:confirm="changeClockCycleShow" bind:cancel="closeClockCycleShow" show-toolbar title="打卡周期" />
</van-popup>
<!--打卡频次-->
<van-popup show="{{ clockRateShow }}" position="bottom" custom-style="height: 40%;" round bind:close="closeClockRateShow">
<van-picker columns="{{ columnsClockRate }}" bind:confirm="changeClockRateShow" bind:cancel="closeClockRateShow" show-toolbar title="打卡频次" />
</van-popup>
<!--打卡提醒-->
<van-popup show="{{ clockRemindShow }}" position="bottom" custom-style="height: 40%;" round bind:close="closeClockRemindShow">
<van-picker columns="{{ columnsClockRemind }}" bind:confirm="changeClockRemindShow" bind:cancel="closeClockRemindShow" show-toolbar title="打卡提醒" />
</van-popup>
<!--打卡缺卡提醒-->
<van-popup show="{{ clockLackShow }}" position="bottom" custom-style="height: 40%;" round bind:close="closeClockLackShow">
<van-picker columns="{{ columnsClockLack }}" bind:confirm="changeClockLackShow" bind:cancel="closeClockLackShow" show-toolbar title="缺卡打卡提醒" />
</van-popup>
<!-- 必须包含 -->
<van-popup show="{{ containShow }}" position="bottom" custom-style="height: 40%;" round bind:close="closeContainShow">
<van-picker columns="{{ columnsContain }}" bind:confirm="changeContainShow" bind:cancel="closeContainShow" show-toolbar title="提交时必须包含" />
</van-popup>
</view>