cb_list.wxml
10.7 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<nav backgroundColor="#199095" color="#ffffff">菜品管理</nav>
<view class="bill-list flex-rs" style="top:{{headerheight}}px;">
<block wx:for="{{typelistData}}" wx:key="{{item.id}}">
<view class="bill-list-single font-more white-font {{item.style}} font28r" data-id="{{item.id}}" bindtap="typelink">{{item.class_name}}</view>
</block>
</view>
<view style="height:{{mtop}}px;"></view>
<block wx:if="{{listData!=''}}">
<scroll-view scroll-y style="height:{{specialHeight}}px;box-sizing:border-box;" scroll-into-view="{{toview}}" scroll-top="{{scrollTop}}">
<view class="type-table flex-cc">
<view class="type_tr type-tr-gray smooth">
<view class="type_th font30r black-font" bindtap="byOrder" data-order="{{set_order}}" style="justify-content:flex-start;width:20%;">
<text>排序</text>
<image src="../image/direction.png" class="icon22-26" background-size="cover"></image>
</view>
<view class="type_th font30r black-font" style="width:40%;justify-content:flex-start;padding-left:12rpx;box-sizing:border-box;">菜品名称</view>
<view class="type_th font30r black-font" bindtap="byStatus" data-status="{{set_status}}" style="width:25%;justify-content:flex-end;">
<text>上/下架</text>
<image src="../image/direction.png" class="icon22-26" background-size="cover"></image>
</view>
<view class="type_th font30r black-font" style="width:20%;justify-content:flex-end;">操作</view>
</view>
</view>
<view class="type-table flex-rs" style="width:100%;background:#fff;">
<block wx:for="{{listData}}" wx:key="{{item.id}}">
<view class="type_tr type-tr-com smooth black-font" style="margin:0 auto;">
<view id="intoview{{item.id}}"></view>
<block wx:if="{{class_type==1}}">
<view class="type_td" style="width:20%;padding-left:20rpx;box-sizing:border-box;text-align:left;">
<picker data-cid="{{item.cid}}" data-mclassid="{{item.mclassid}}" data-order="{{item.order_o}}" bindchange="setmarketCook" data-type="order" value="{{index}}" range="{{orderlist}}">
<view class="picker">{{item.order_o}}</view>
</picker>
</view>
</block>
<block wx:else>
<view class="type_td" style="width:20%;padding-left:20rpx;box-sizing:border-box;text-align:left;">
<picker data-id="{{item.id}}" data-type="order" bindchange="setcommonCook" value="{{index}}" range="{{orderlist}}">
<view class="picker">{{item.order_o}}</view>
</picker>
</view>
</block>
<block wx:if="{{class_type==1}}">
<view class="type_td font-more" data-id="{{item.cid}}" data-cid="{{item.mclassid}}" bindtap="updateCname" style="width:35%;text-align:left;margin-right:5%;">{{item.name}}</view>
</block>
<block wx:else>
<view class="type_td font-more" data-id="{{item.id}}" data-cid="{{item.cid}} "bindtap="updateCname" style="width:35%;text-align:left;margin-right:5%;">{{item.name}}</view>
</block>
<view class="type_td" style="width:20%;text-align:right;">
<block wx:if="{{class_type==1}}">
<block wx:if="{{item.status==1}}">
<switch checked data-id="{{item.cid}}" data-type="status" data-classtype="{{class_type}}" data-cid="{{item.mclassid}}" bindchange="setcommonCook" color="#199095"/>
</block>
<block wx:else>
<switch data-id="{{item.cid}}" data-type="status" data-classtype="{{class_type}}" data-cid="{{item.mclassid}}" bindchange="setcommonCook" color="#199095"/>
</block>
</block>
<block wx:else>
<block wx:if="{{item.status==1}}">
<switch checked data-id="{{item.id}}" data-type="status" data-classtype="{{class_type}}" data-cid="{{item.cid}}" bindchange="setcommonCook" color="#199095"/>
</block>
<block wx:else>
<switch data-id="{{item.id}}" data-type="status" data-classtype="{{class_type}}" data-cid="{{item.cid}}" bindchange="setcommonCook" color="#199095"/>
</block>
</block>
</view>
<block wx:if="{{class_type==1}}">
<view class="type_td" data-id="{{item.cid}}" bindtap="changeClear" style="width:20%;text-align:right;">更换</view>
</block>
<block wx:else>
<view class="type_td" data-id="{{item.id}}" bindtap="moreTypeName" style="width:20%;text-align:right;"><image src="../image/more-dot.png" background-size="cover" class="more-dot"></image></view>
</block>
</view>
</block>
</view>
<view style="height:160rpx;"></view>
</scroll-view>
</block>
<block wx:else>
<view class="nothing black-font font32r flex-vc bg_white" style="height:{{specialHeight}}px;padding-bottom:220rpx;box-sizing:border-box;">
<image src="../image/nothing.png" class="order-nothing" style="width:266rpx;height:288rpx;background:transparent;margin-top:-30rpx;"></image>
<view class="font34r smooth black-font" style="width:466rpx;margin:0 auto;margin-top:60rpx;height:76rpx;line-height:38rpx;">菜品是空哒,快去<text style="color:#199095;" bindtap="startVoice">语音录菜</text>或手动<text style="color:#199095;" bindtap="addCname">添加菜品</text>吧</view>
</view>
</block>
<block wx:if="{{class_type==1}}">
<navigator url="../marketing/ca_list?mid={{tid}}<ype=2" class="fixed-voice flex-vc font30r white-font smooth" hover-class="none">
<text class="flex-cc">添加</text>
<text class="flex-cc">菜品</text>
</navigator>
</block>
<block wx:else>
<view class="fixed-bottom {{voice_active=='' ? 'flex-lr' : 'flex-rr'}}" style="background:{{voice_active=='' && showshadow==true ? '#fff' : 'transparent'}};box-shadow:{{voice_active=='' && showshadow==true ? '0 -2px 5px rgba(0,0,0,.08)' : '0,0,0,rgba(0,0,0,0)'}}">
<view class="fixed-other-voice flex-vc white-font font28r smooth" bindtap="addCname" style="display:{{voice_active!='' ? 'none' :'flex'}};height:130rpx;background:#199095;border-radius:50%;">
<text class="flex-cc">添加</text>
<text class="flex-cc">菜品</text>
</view>
<view class="fixed-other-voice flex-vc white-font font30r" style="height:220rpx;background:transparent;" catchtouchstart="startVoice" catchtouchend="endVoice" catchtouchmove="cancel">
<image src="../image/{{voice_active=='' ? 'voice.png' : 'voice-active.png'}}" class="voice"></image>
<block wx:if="{{voice_active!=''}}">
<view class="white-font smooth font28r" style="margin-top:5rpx;margin-bottom:30rpx;">长按录菜</view>
</block>
</view>
</view>
</block>
<view class="all-cover" catchtap="closehide" hidden="{{blockhide}}">
<view class="voice-block white-font smooth" catchtouchend="endVoice">
<view class="start-status" hidden="{{start_status}}">
<view class="font30r flex-cc" style="width:100%;">松开结束,上滑取消</view>
<view class="font40r flex-cc" style="width:100%;margin-top:45rpx;">{{reminderInfo}}</view>
<view class="font40r flex-cc" style="width:100%;margin-top:5rpx;">{{textStr}}</view>
<view class="flex-cc" style="margin-top:70rpx;">
<block wx:for="{{line}}">
<view class="flex-cc">
<view class="voice-image {{animate=='' ? '' : 'voice-active'}}" style="height:{{animate=='' ? '25rpx' : '25rpx'}}"></view>
<view class="voice-image {{animate=='' ? '' : 'voice-active'}}" style="height:{{animate=='' ? '40rpx' : '25rpx'}}"></view>
<view class="voice-image {{animate=='' ? '' : 'voice-active'}}" style="height:{{animate=='' ? '55rpx' : '25rpx'}}"></view>
<view class="voice-image {{animate=='' ? '' : 'voice-active'}}" style="height:{{animate=='' ? '40rpx' : '25rpx'}}"></view>
<view class="voice-image {{animate=='' ? '' : 'voice-active'}}" style="height:{{animate=='' ? '25rpx' : '25rpx'}}"></view>
</view>
</block>
</view>
</view>
<view class="cancel-status flex-vc" hidden="{{cancel_status}}">
<image src="../image/back.png" class="cancel-image flex-cc" style="margin-top:90rpx;"></image>
<view class="font40r flex-cc white-font" style="margin-top:75rpx;">松开手指,取消录菜</view>
</view>
</view>
</view>
<!-- 删除弹出框 -->
<view class="modal-mask" hidden="{{dtn_ishidden}}"></view>
<view class="modal-dialog modal-dialog-reminder" hidden="{{dtn_ishidden}}">
<view class="modal-dialog-title flex-cc font36r black">{{title}}</view>
<view class="modal-reminder-title font32r">你确定要删除吗?</view>
<view class="modal-dialog-button flex-lr">
<view class="modal-button modal-cancel flex-cc font36r black" bindtap="deleteCancelModel">取消</view>
<view class="modal-button modal-confirm flex-cc font36r" bindtap="deleteConfirmModel">确定</view>
</view>
</view>
<view class="modal-mask" data-mask="mtn_ishidden" hidden="{{mtn_ishidden}}" bindtap="closeMore"></view>
<view class="modal-alert flex-vc" hidden="{{mtn_ishidden}}">
<view class="modal-menu font36r smooth black-font flex-cc" bindtap="selectlabel">选择标签</view>
<view bindtap="deleteCookName" class="modal-menu smooth black-font flex-cc font36r" style="border-bottom:0;" data-id="{{id}}">删除</view>
<view class="modal-close flex-cc" bindtap="closeMore">
<image class="close-image" src="../image/close.png" background-size="cover"></image>
</view>
</view>
<confirmAlert id="alert"></confirmAlert>
<netWork bind:netchange="netchange" id="network"></netWork>