staffDailyReport.wxml
2.2 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
<!-- TEST-ID: IT-ROUTE-002 packageDynamicForm.staffDailyReport -->
<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 }}"
>
<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" wx:if="{{ isDateWithinEditableWindow }}">
<view class="btns-con btns-con--stack">
<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>
</view>