cb_sadd.wxml
12.8 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<view class="page">
<nav backgroundColor="#199095" color="#ffffff">{{id ? '修改菜品' : '添加菜品'}}</nav>
<form bindsubmit="formSubmit">
<scroll-view scroll-y="true">
<block wx:if="{{image}}">
<view style="display:flex" bindtap="addCookimg">
<image style="width:100%;height:340rpx;" mode="widthFix" src="{{image}}"></image>
</view>
</block>
<block wx:else>
<block wx:if="{{tempimage}}">
<view style="display:flex" bindtap="addCookimg">
<image style="width:100%;height:340rpx;" mode="widthFix" src="{{tempimage}}"></image>
</view>
</block>
<block wx:else>
<view class="flex-vc addimg" style="height:290rpx;background:#efeef3;" bindtap="addCookimg">
<view style="width:128rpx;height:128rpx;border:2rpx solid #bdb9b9;border-radius:50%;" class="flex-cc"><image class="add-img" src="../image/take-picture.png"></image></view>
<view class="font32r smooth" style="margin-top:20rpx;text-align:center;color:#999;lettere-spacing:3rpx;">+ 菜谱效果图</view>
</view>
</block>
</block>
<view style="width:100%;padding:0 45rpx;padding-top:75rpx;padding-bottom:20rpx;box-sizing:border-box;background:#fff;">
<view class="menu-title-top flex-lr">
<view class="black-font font44r smooth" stylw="width:80%;"><input type="text" value="{{name}}" placeholder="请输入菜品名" placeholder-style="color:#999;" placeholder-class="smooth font34r" style="width:100%;font-weight:bold;height:64rpx;line-height:64rpx;" name="name" bindinput="changeName" maxlength="20" bindblur="getinfo"/></view>
<switchLiu definecheked="{{status}}" id="switch" bind:changecookstatus="cookswitch"></switchLiu>
</view>
<view class="flex-vr" style="margin-top:10rpx;align-items:flex-end;">
<block wx:if="{{status==1}}">
<view class="font24r smooth" style="color:#999;">商品已上架,在所有点餐设备上显示</view>
</block>
<block wx:else>
<view class="font24r smooth" style="color:#999;">商品已下架</view>
</block>
</view>
</view>
<block wx:if="{{reminderInfo}}">
<view style="padding-top:20rpx;padding-left:40rpx;" class="red-font font30r">{{reminderInfo}}</view>
</block>
<view class="cut"></view>
<view class="font30r black-font smooth bg_white height102r padd-left-right flex-ll">常用设置</view>
<view class="bg_white padd-left-right">
<view class="flex-lr height120r" bindtap="focusonName">
<view class="flex-ll" style="width:40%">
<view class="item-title font36r smooth black-font">菜品价格</view>
<text class="green-font font44r flex-cc" space="true" decode="true" style="margin-top:16rpx;"> *</text>
</view>
<input class="t-align-r font36r smooth" type="digit" name="price" value="{{price}}" placeholder="请输入价格" data-key="price" placeholder-class="smooth font34r {{priceInfo ? 'red-font' : 'gray-font'}}" bindblur="priceCondition" bindinput="priceinput" style="min-height:40rpx;"/>
<block wx:if="{{priceInfo}}">
<image src="../image/name-have.png" style="width:32rpx;height:32rpx;margin-left:10rpx;"></image>
</block>
</view>
<view class="flex-lr height120r" bindtap="focusonName">
<view class="item-title font36r smooth black-font" style="width:40%">菜品折扣价</view>
<input class="t-align-r font36r smooth black-font" bindinput="number_priceChange" type="digit" name="member_price" value="{{member_price}}" placeholder="请输入折扣价" data-key="member_price" placeholder-class="smooth font34rpx gray-font" bindblur="condition" style="min-height:40rpx;"/>
</view>
<block wx:if="{{memberinfo}}">
<view class="red-font font28r flex-rr" style="padding: 20rpx 0;">{{memberinfo}}</view>
</block>
<view class="height120r">
<picker data-id="{{item.cid}}" bindchange="selectType" value="{{selecttypeindex}}" range="{{typelisttext}}">
<view class="flex-lr picker height120r">
<view style="width:40%" class="flex-ll">
<view class="item-title font36r smooth black-font">菜品分类</view>
<text class="green-font font44r flex-cc" space="true" decode="true" style="margin-top:16rpx;"> *</text>
</view>
<view class="flex-rr t-align-r font38r smooth {{typelisttext[selecttypeindex]=='请选择' ? 'gray-font' : 'black-font'}}">
<block wx:if="{{classInfo}}">
<text class="red-font">{{classInfo}}</text>
<image src="../image/name-have.png" style="width:32rpx;height:32rpx;margin-left:10rpx;"></image>
</block>
<block wx:else>
{{typelisttext[selecttypeindex]}}
<image src="../image/click.png" class="icon12-22"></image>
</block>
</view>
</view>
</picker>
<!--<view style="width:30%;" class="flex-rr height120r">添加分类</view>-->
</view>
<view class="height120r">
<picker bindchange="selectUnit" value="{{selectunitindex}}" range="{{unitlisttext}}">
<view class="flex-lr picker height120r">
<view class="item-title font36r smooth black-font" style="width:30%">计价方式</view>
<view class="flex-rr t-align-r">
<view class="font38r smooth black-font">
{{unitlisttext[selectunitindex]}}
</view>
<image src="../image/click.png" class="icon12-22"></image>
</view>
</view>
</picker>
</view>
<!-- <view class="height120r">
<picker bindchange="selectPrint" value="{{selectprintindex}}" range="{{printlisttext}}">
<view class="flex-lr picker height120r">
<view class="item-title font36r smooth black-font" style="width:40%">后厨打印</view>
<view class="flex-rr t-align-r font38r smooth {{printlisttext[selectprintindex]=='请选择' ? 'gray-font': 'black-font'}}">
{{printlisttext[selectprintindex]}}
<image src="../image/click.png" class="icon12-22"></image>
</view>
</view>
</picker>
</view> -->
</view>
<view class="cut"></view>
<view class="font30r black-font smooth bg_white height102r padd-left-right flex-lr" bindtap="showMore">
<view>更多设置</view>
<block wx:if="{{moresetting==true}}">
<image src="../image/click.png" class="icon12-22"></image>
</block>
<block wx:else>
<view class="font28r gray-deep-font">收起</view>
</block>
</view>
<block wx:if="{{moresetting==true}}">
<view style="height:{{id ? '180rpx' : '300rpx'}};"></view>
</block>
<view class="bg_white padd-left-right" hidden="{{moresetting}}">
<view class="flex-lr height120r">
<view class="item-title font36r smooth black-font" style="width:40%">是否称重</view>
<block wx:if="{{is_weight==1}}">
<switch checked data-id="{{id}}" bindchange="switchweight1Change" color="#199095"/>
</block>
<block wx:else>
<switch data-id="{{id}}" bindchange="switchweight2Change"/>
</block>
</view>
<view class="flex-lr height120r" bindtap="godesc">
<view class="item-title font36r smooth black-font" style="width:40%">菜品描述</view>
<view class="font36r smooth">
<text class="{{desc ? 'black-font' : 'gray-font'}}">{{showdesc ? showdesc : '添加描述'}}</text>
<image src="../image/click.png" class="icon12-22"></image>
</view>
</view>
<view class="flex-lr height120r" >
<navigator url="../cookbook/cb_ggadd?id={{id}}" class="flex-lr" style="width:100%;" hover-class="none">
<view class="item-title font36r smooth black-font" style="width:40%">规格</view>
<view class="flex-rr">
<view class="t-align-r font36r smooth">
<block wx:if="{{spec}}">
<text class="{{spec!='' ? 'black-font' : 'gray-font'}}">
<block wx:if="{{spec!=''}}">查看规格</block>
<block wx:else>添加规格</block>
</text>
</block>
<block wx:else><text class="gray-font">添加规格</text></block>
</view>
<image src="../image/click.png" class="icon12-22"></image>
</view>
</navigator>
</view>
<view class="flex-lr height120r" bindtap="waylink" style="margin-bottom:{{id ? '225rpx' : '275rpx'}};">
<view class="item-title font36r smooth black-font" style="width:40%">做法</view>
<view class="flex-rr">
<view class="t-align-r font36r smooth {{practice ? 'black-font' : 'gray-font'}}">
<block wx:if="{{practice}}">
<text class="{{practice!='' ? 'black-font' : 'gray-font'}}">
<block wx:if="{{practice!=''}}">查看做法</block>
<block wx:else>添加做法</block>
</text>
</block>
<block wx:else><text class="gray-font">添加做法</text></block>
</view>
<image src="../image/click.png" class="icon12-22"></image>
</view>
</view>
</view>
</scroll-view>
<block wx:if="{{!id}}">
<button class="white-font font32r smooth save-button" style="width:560rpx;height:75rpx;background:#199095;line-height:75rpx;border-radius:8rpx;padding:0;bottom:150rpx;" formType="submit" data-type="2">保存并继续添加</button>
<button class="font32r smooth save-button" style="width:560rpx;height:72rpx;line-height:72rpx;border-radius:8rpx;margin-top:40rpx;background:#fff;padding:0;bottom:50rpx;border:1px solid #199095;color:#199095;" formType="submit" data-type="1">保存</button>
</block>
<block wx:else>
<button class="font32r smooth save-button" style="width:560rpx;height:75rpx;line-height:75rpx;border-radius:8rpx;margin-top:40rpx;background:#199095;padding:0;bottom:50rpx;color:#fff;" formType="submit" data-type="1">保存</button>
</block>
</form>
</view>
<block wx:if="{{id}}">
<loading hidden="{{hiddenLoading}}">正在加载</loading>
</block>
<!-- 提示弹出框 -->
<!--<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"></view>
<view class="modal-reminder-title font32r">{{reminderInfo}}</view>
<view class="modal-dialog-button flex-lr">
<view class="modal-button modal-confirm flex-cc font36r" bindtap="deleteConfirmModel" style="width:100%;">确定</view>
</view>
</view>-->
<netWork bind:netchange="netchange" id="network"></netWork>