|
@@ -4,8 +4,11 @@ import 'package:one_key/models/notebook.dart'; |
|
@@ -4,8 +4,11 @@ import 'package:one_key/models/notebook.dart'; |
|
4
|
import 'package:one_key/res/colors.dart';
|
4
|
import 'package:one_key/res/colors.dart';
|
|
5
|
|
5
|
|
|
6
|
import 'package:one_key/models/table.dart' as t;
|
6
|
import 'package:one_key/models/table.dart' as t;
|
|
|
|
7
|
+import 'package:one_key/utils/utils.dart';
|
|
7
|
import 'package:one_key/widgets/v_empty_view.dart';
|
8
|
import 'package:one_key/widgets/v_empty_view.dart';
|
|
8
|
|
9
|
|
|
|
|
10
|
+import '../utils/screen_util.dart';
|
|
|
|
11
|
+
|
|
9
|
class FTableItem extends StatefulWidget {
|
12
|
class FTableItem extends StatefulWidget {
|
|
10
|
final t.Table table;
|
13
|
final t.Table table;
|
|
11
|
final bool canSelected; //是否能选中
|
14
|
final bool canSelected; //是否能选中
|
|
@@ -59,6 +62,9 @@ class FTableItemState extends State<FTableItem> { |
|
@@ -59,6 +62,9 @@ class FTableItemState extends State<FTableItem> { |
|
59
|
return GestureDetector(
|
62
|
return GestureDetector(
|
|
60
|
onTap: () {
|
63
|
onTap: () {
|
|
61
|
if (widget.canSelected && widget.fromPage == 'change') {
|
64
|
if (widget.canSelected && widget.fromPage == 'change') {
|
|
|
|
65
|
+ if (table.isLock == '1' && signStr != '已预订') {
|
|
|
|
66
|
+ return;
|
|
|
|
67
|
+ }
|
|
62
|
//从变更页面进来 canChoose = true
|
68
|
//从变更页面进来 canChoose = true
|
|
63
|
if (widget.canSelected && signStr.isEmpty) {
|
69
|
if (widget.canSelected && signStr.isEmpty) {
|
|
64
|
setState(() {
|
70
|
setState(() {
|
|
@@ -88,6 +94,9 @@ class FTableItemState extends State<FTableItem> { |
|
@@ -88,6 +94,9 @@ class FTableItemState extends State<FTableItem> { |
|
88
|
} else if (widget.fromPage == 'new' &&
|
94
|
} else if (widget.fromPage == 'new' &&
|
|
89
|
widget.canSelected &&
|
95
|
widget.canSelected &&
|
|
90
|
signStr.isEmpty) {
|
96
|
signStr.isEmpty) {
|
|
|
|
97
|
+ if (table.isLock == '1' && signStr != '已预订') {
|
|
|
|
98
|
+ return;
|
|
|
|
99
|
+ }
|
|
91
|
//从安排桌位进来
|
100
|
//从安排桌位进来
|
|
92
|
setState(() {
|
101
|
setState(() {
|
|
93
|
table.selected = !(table.selected ?? false);
|
102
|
table.selected = !(table.selected ?? false);
|
|
@@ -95,6 +104,9 @@ class FTableItemState extends State<FTableItem> { |
|
@@ -95,6 +104,9 @@ class FTableItemState extends State<FTableItem> { |
|
95
|
widget.onSelected(table);
|
104
|
widget.onSelected(table);
|
|
96
|
} else if (widget.fromPage == 'table_manage' ||
|
105
|
} else if (widget.fromPage == 'table_manage' ||
|
|
97
|
widget.fromPage == 'room_manage') {
|
106
|
widget.fromPage == 'room_manage') {
|
|
|
|
107
|
+ if (table.isLock == '1' && signStr != '已预订') {
|
|
|
|
108
|
+ return;
|
|
|
|
109
|
+ }
|
|
98
|
setState(() {
|
110
|
setState(() {
|
|
99
|
table.selected = !(table.selected ?? false);
|
111
|
table.selected = !(table.selected ?? false);
|
|
100
|
});
|
112
|
});
|
|
@@ -113,296 +125,382 @@ class FTableItemState extends State<FTableItem> { |
|
@@ -113,296 +125,382 @@ class FTableItemState extends State<FTableItem> { |
|
113
|
widget.onSelected(table);
|
125
|
widget.onSelected(table);
|
|
114
|
}
|
126
|
}
|
|
115
|
},
|
127
|
},
|
|
116
|
- child: Stack(
|
|
|
|
117
|
- children: <Widget>[
|
|
|
|
118
|
- Container(
|
|
|
|
119
|
- // width: ScreenUtil().setWidth(160),
|
|
|
|
120
|
- // height: ScreenUtil().setWidth(widget.height),
|
|
|
|
121
|
- // margin: EdgeInsets.all(ScreenUtil().setWidth(9)),
|
|
|
|
122
|
- decoration: BoxDecoration(
|
|
|
|
123
|
- color: widget.need && signStr == '已预订' && !isSelf
|
|
|
|
124
|
- ? MyColours.color_afbcc4
|
|
|
|
125
|
- : widget.canSelected && table.selected
|
|
|
|
126
|
- ? MyColours.color_199095
|
|
|
|
127
|
- : MyColours.color_ffffff,
|
|
|
|
128
|
- border: Border.all(
|
|
|
|
129
|
- width: ScreenUtil().setWidth(2),
|
|
|
|
130
|
- color: MyColours.color_E0E0E0),
|
|
|
|
131
|
- borderRadius: BorderRadius.all(
|
|
|
|
132
|
- Radius.circular(ScreenUtil().setWidth(20)))),
|
|
|
|
133
|
- child: Stack(
|
|
|
|
134
|
- // alignment: Alignment.center,
|
|
|
|
135
|
- children: <Widget>[
|
128
|
+ child: table.isLock == '1' &&
|
|
|
|
129
|
+ signStr != '已预订' &&
|
|
|
|
130
|
+ widget.fromPage != 'tablePhoto'
|
|
|
|
131
|
+ ? Stack(
|
|
|
|
132
|
+ children: [
|
|
136
|
Container(
|
133
|
Container(
|
|
137
|
- // alignment: Alignment.center,
|
|
|
|
138
|
- // color: Colors.blueAccent,
|
|
|
|
139
|
- // height: ScreenUtil().setWidth(widget.height),
|
|
|
|
140
|
- // padding: EdgeInsets.symmetric(
|
|
|
|
141
|
- // horizontal: ScreenUtil().setWidth(20)),
|
|
|
|
142
|
- // margin: EdgeInsets.only(left: ScreenUtil().setWidth(20)),
|
|
|
|
143
|
- child: Column(
|
|
|
|
144
|
- // mainAxisSize: MainAxisSize.min,
|
|
|
|
145
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
146
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
147
|
- children: <Widget>[
|
|
|
|
148
|
- widget.need && signStr == '已预订' && !isSelf
|
|
|
|
149
|
- ? SizedBox()
|
|
|
|
150
|
- : VEmptyView(10),
|
|
|
|
151
|
- Container(
|
|
|
|
152
|
- // color: Colors.red,
|
|
|
|
153
|
- alignment: Alignment.center,
|
|
|
|
154
|
- child: Text(
|
|
|
|
155
|
- table.name,
|
|
|
|
156
|
- maxLines: 1,
|
|
|
|
157
|
- style: TextStyle(
|
|
|
|
158
|
- color:
|
|
|
|
159
|
- (widget.need && signStr == '已预订' && !isSelf)
|
|
|
|
160
|
- ? MyColours.color_333333
|
|
|
|
161
|
- : (widget.canSelected && table.selected)
|
|
|
|
162
|
- ? MyColours.color_ffffff
|
|
|
|
163
|
- : MyColours.color_333333,
|
|
|
|
164
|
- fontSize: ScreenUtil().setSp(34),
|
|
|
|
165
|
- decoration: TextDecoration.none,
|
|
|
|
166
|
- fontWeight: FontWeight.bold),
|
|
|
|
167
|
- overflow: TextOverflow.ellipsis,
|
|
|
|
168
|
- )
|
|
|
|
169
|
- // Text(
|
|
|
|
170
|
- // table.name,
|
|
|
|
171
|
- // // textAlign: TextAlign.center,
|
|
|
|
172
|
- // maxLines: 2,
|
|
|
|
173
|
- // style: TextStyle(
|
|
|
|
174
|
- // color: table.signStr == '已停用'
|
|
|
|
175
|
- // ? MyColours.color_999999
|
|
|
|
176
|
- // : MyColours.color_353535,
|
|
|
|
177
|
- // fontSize: ScreenUtil().setSp(28),
|
|
|
|
178
|
- // decoration: TextDecoration.none,
|
|
|
|
179
|
- // fontWeight: FontWeight.normal),
|
|
|
|
180
|
- // overflow: TextOverflow.ellipsis,
|
|
|
|
181
|
- // ),
|
|
|
|
182
|
- ),
|
|
|
|
183
|
- ((table.reserver != null && table.reserver != '') ||
|
|
|
|
184
|
- (table.pnum != '' &&
|
|
|
|
185
|
- table.pnum != null &&
|
|
|
|
186
|
- table.pnum != '0'))
|
|
|
|
187
|
- ? VEmptyView(8)
|
|
|
|
188
|
- : SizedBox(),
|
|
|
|
189
|
- signStr == '已预订' && !isSelf
|
|
|
|
190
|
- ? SizedBox()
|
|
|
|
191
|
- : Text(
|
|
|
|
192
|
- table.tableNum,
|
134
|
+ // width: ScreenUtil().setWidth(160),
|
|
|
|
135
|
+ // height: ScreenUtil().setWidth(widget.height),
|
|
|
|
136
|
+ // margin: EdgeInsets.all(ScreenUtil().setWidth(9)),
|
|
|
|
137
|
+ decoration: BoxDecoration(
|
|
|
|
138
|
+ color: MyColours.color_DBDBDB,
|
|
|
|
139
|
+ border: Border.all(
|
|
|
|
140
|
+ width: ScreenUtil().setWidth(2),
|
|
|
|
141
|
+ color: MyColours.color_BFC4D4),
|
|
|
|
142
|
+ borderRadius: BorderRadius.all(
|
|
|
|
143
|
+ Radius.circular(ScreenUtil().setWidth(20)))),
|
|
|
|
144
|
+ child: Column(
|
|
|
|
145
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
146
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
147
|
+ children: <Widget>[
|
|
|
|
148
|
+ widget.need && signStr == '已预订' && !isSelf
|
|
|
|
149
|
+ ? SizedBox()
|
|
|
|
150
|
+ : VEmptyView(10),
|
|
|
|
151
|
+ Container(
|
|
|
|
152
|
+ // color: Colors.red,
|
|
|
|
153
|
+ alignment: Alignment.center,
|
|
|
|
154
|
+ child: Text(
|
|
|
|
155
|
+ table.name,
|
|
|
|
156
|
+ maxLines: 1,
|
|
193
|
style: TextStyle(
|
157
|
style: TextStyle(
|
|
194
|
- color: signStr == '已预订' && !isSelf
|
|
|
|
195
|
- ? MyColours.color_353535
|
|
|
|
196
|
- : (widget.canSelected && table.selected)
|
|
|
|
197
|
- ? MyColours.color_ffffff
|
|
|
|
198
|
- : MyColours.color_353535,
|
|
|
|
199
|
- fontSize: ScreenUtil().setSp(22),
|
158
|
+ color: MyColours.color_333333,
|
|
|
|
159
|
+ fontSize: ScreenUtil().setSp(36),
|
|
200
|
decoration: TextDecoration.none,
|
160
|
decoration: TextDecoration.none,
|
|
201
|
- fontWeight: FontWeight.normal),
|
161
|
+ fontWeight: FontWeight.bold),
|
|
202
|
overflow: TextOverflow.ellipsis,
|
162
|
overflow: TextOverflow.ellipsis,
|
|
203
|
- ),
|
|
|
|
204
|
- signStr == '已预订' &&
|
|
|
|
205
|
- !isSelf &&
|
|
|
|
206
|
- ((table.reserver != null &&
|
|
|
|
207
|
- !table.reserver.isEmpty) ||
|
|
|
|
208
|
- (table.pnum != '' &&
|
|
|
|
209
|
- table.pnum != null &&
|
|
|
|
210
|
- table.pnum != '0'))
|
|
|
|
211
|
- ? Text(
|
|
|
|
212
|
- (table.reserver == null || table.reserver.isEmpty)
|
|
|
|
213
|
- ? (table.pnum != '' &&
|
|
|
|
214
|
- table.pnum != null &&
|
|
|
|
215
|
- table.pnum != '0')
|
|
|
|
216
|
- ? '(${table.pnum}人)'
|
|
|
|
217
|
- : ''
|
|
|
|
218
|
- : '${table.reserver}' +
|
|
|
|
219
|
- (table.pnum != '' &&
|
|
|
|
220
|
- table.pnum != null &&
|
|
|
|
221
|
- table.pnum != '0'
|
|
|
|
222
|
- ? '(${table.pnum}人)'
|
|
|
|
223
|
- : ''),
|
163
|
+ )),
|
|
|
|
164
|
+ VEmptyView(10),
|
|
|
|
165
|
+ Image.asset(
|
|
|
|
166
|
+ Utils.getImgPath('lock'),
|
|
|
|
167
|
+ width: w(16),
|
|
|
|
168
|
+ )
|
|
|
|
169
|
+ ],
|
|
|
|
170
|
+ )),
|
|
|
|
171
|
+ Positioned(
|
|
|
|
172
|
+ left: 0,
|
|
|
|
173
|
+ top: 0,
|
|
|
|
174
|
+ child: table.tidStr == null
|
|
|
|
175
|
+ ? Container()
|
|
|
|
176
|
+ : Container(
|
|
|
|
177
|
+ // width: ScreenUtil().setWidth(60),
|
|
|
|
178
|
+ // height: ScreenUtil().setWidth(42),
|
|
|
|
179
|
+ padding: EdgeInsets.all(ScreenUtil().setWidth(4)),
|
|
|
|
180
|
+ alignment: Alignment.center,
|
|
|
|
181
|
+ decoration: BoxDecoration(
|
|
|
|
182
|
+ // color: widget.canSelected && table.selected
|
|
|
|
183
|
+ // ? MyColours.color_199095
|
|
|
|
184
|
+ // : Color.fromRGBO(239, 239, 239, 1),
|
|
|
|
185
|
+ borderRadius: BorderRadius.only(
|
|
|
|
186
|
+ topLeft: Radius.circular(ScreenUtil().setWidth(20)),
|
|
|
|
187
|
+ // topRight:
|
|
|
|
188
|
+ // Radius.circular(ScreenUtil().setWidth(8)),
|
|
|
|
189
|
+ // bottomRight: Radius.circular(
|
|
|
|
190
|
+ // ScreenUtil().setWidth(8))
|
|
|
|
191
|
+ )),
|
|
|
|
192
|
+ child: Text(table.tidStr,
|
|
224
|
style: TextStyle(
|
193
|
style: TextStyle(
|
|
225
|
- color: signStr == '已预订' && !isSelf
|
|
|
|
226
|
- ? MyColours.color_353535
|
|
|
|
227
|
- : (widget.canSelected && table.selected)
|
|
|
|
228
|
- ? MyColours.color_ffffff
|
|
|
|
229
|
- : MyColours.color_353535,
|
|
|
|
230
|
- fontSize: ScreenUtil().setSp(22),
|
194
|
+ color: MyColours.color_999999,
|
|
|
|
195
|
+ fontSize: ScreenUtil().setSp(20),
|
|
231
|
decoration: TextDecoration.none,
|
196
|
decoration: TextDecoration.none,
|
|
232
|
- fontWeight: FontWeight.normal),
|
|
|
|
233
|
- overflow: TextOverflow.ellipsis,
|
|
|
|
234
|
- )
|
|
|
|
235
|
- : SizedBox(),
|
197
|
+ fontWeight: FontWeight.normal)),
|
|
|
|
198
|
+ ),
|
|
|
|
199
|
+ ),
|
|
|
|
200
|
+ ],
|
|
|
|
201
|
+ )
|
|
|
|
202
|
+ : Stack(
|
|
|
|
203
|
+ children: <Widget>[
|
|
|
|
204
|
+ Container(
|
|
|
|
205
|
+ // width: ScreenUtil().setWidth(160),
|
|
|
|
206
|
+ // height: ScreenUtil().setWidth(widget.height),
|
|
|
|
207
|
+ // margin: EdgeInsets.all(ScreenUtil().setWidth(9)),
|
|
|
|
208
|
+ decoration: BoxDecoration(
|
|
|
|
209
|
+ color: widget.need && signStr == '已预订' && !isSelf
|
|
|
|
210
|
+ ? table.sign == '10'
|
|
|
|
211
|
+ ? MyColours.color_FEF3E6
|
|
|
|
212
|
+ : MyColours.color_afbcc4
|
|
|
|
213
|
+ : widget.canSelected && table.selected
|
|
|
|
214
|
+ ? MyColours.color_199095
|
|
|
|
215
|
+ : MyColours.color_ffffff,
|
|
|
|
216
|
+ border: Border.all(
|
|
|
|
217
|
+ width: ScreenUtil().setWidth(2),
|
|
|
|
218
|
+ color: MyColours.color_E0E0E0),
|
|
|
|
219
|
+ borderRadius: BorderRadius.all(
|
|
|
|
220
|
+ Radius.circular(ScreenUtil().setWidth(20)))),
|
|
|
|
221
|
+ child: Stack(
|
|
|
|
222
|
+ // alignment: Alignment.center,
|
|
|
|
223
|
+ children: <Widget>[
|
|
|
|
224
|
+ Container(
|
|
|
|
225
|
+ // alignment: Alignment.center,
|
|
|
|
226
|
+ // color: Colors.blueAccent,
|
|
|
|
227
|
+ // height: ScreenUtil().setWidth(widget.height),
|
|
|
|
228
|
+ // padding: EdgeInsets.symmetric(
|
|
|
|
229
|
+ // horizontal: ScreenUtil().setWidth(20)),
|
|
|
|
230
|
+ // margin: EdgeInsets.only(left: ScreenUtil().setWidth(20)),
|
|
|
|
231
|
+ child: Column(
|
|
|
|
232
|
+ // mainAxisSize: MainAxisSize.min,
|
|
|
|
233
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
234
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
235
|
+ children: <Widget>[
|
|
|
|
236
|
+ widget.need && signStr == '已预订' && !isSelf
|
|
|
|
237
|
+ ? SizedBox()
|
|
|
|
238
|
+ : VEmptyView(10),
|
|
|
|
239
|
+ Container(
|
|
|
|
240
|
+ // color: Colors.red,
|
|
|
|
241
|
+ alignment: Alignment.center,
|
|
|
|
242
|
+ child: Text(
|
|
|
|
243
|
+ table.name,
|
|
|
|
244
|
+ maxLines: 1,
|
|
|
|
245
|
+ style: TextStyle(
|
|
|
|
246
|
+ color: (widget.need &&
|
|
|
|
247
|
+ signStr == '已预订' &&
|
|
|
|
248
|
+ !isSelf)
|
|
|
|
249
|
+ ? MyColours.color_333333
|
|
|
|
250
|
+ : (widget.canSelected &&
|
|
|
|
251
|
+ table.selected)
|
|
|
|
252
|
+ ? MyColours.color_ffffff
|
|
|
|
253
|
+ : MyColours.color_333333,
|
|
|
|
254
|
+ fontSize: ScreenUtil().setSp(34),
|
|
|
|
255
|
+ decoration: TextDecoration.none,
|
|
|
|
256
|
+ fontWeight: FontWeight.bold),
|
|
|
|
257
|
+ overflow: TextOverflow.ellipsis,
|
|
|
|
258
|
+ )
|
|
|
|
259
|
+ // Text(
|
|
|
|
260
|
+ // table.name,
|
|
|
|
261
|
+ // // textAlign: TextAlign.center,
|
|
|
|
262
|
+ // maxLines: 2,
|
|
|
|
263
|
+ // style: TextStyle(
|
|
|
|
264
|
+ // color: table.signStr == '已停用'
|
|
|
|
265
|
+ // ? MyColours.color_999999
|
|
|
|
266
|
+ // : MyColours.color_353535,
|
|
|
|
267
|
+ // fontSize: ScreenUtil().setSp(28),
|
|
|
|
268
|
+ // decoration: TextDecoration.none,
|
|
|
|
269
|
+ // fontWeight: FontWeight.normal),
|
|
|
|
270
|
+ // overflow: TextOverflow.ellipsis,
|
|
|
|
271
|
+ // ),
|
|
|
|
272
|
+ ),
|
|
|
|
273
|
+ ((table.reserver != null && table.reserver != '') ||
|
|
|
|
274
|
+ (table.pnum != '' &&
|
|
|
|
275
|
+ table.pnum != null &&
|
|
|
|
276
|
+ table.pnum != '0'))
|
|
|
|
277
|
+ ? VEmptyView(8)
|
|
|
|
278
|
+ : SizedBox(),
|
|
|
|
279
|
+ signStr == '已预订' && !isSelf
|
|
|
|
280
|
+ ? SizedBox()
|
|
|
|
281
|
+ : Text(
|
|
|
|
282
|
+ table.tableNum,
|
|
|
|
283
|
+ style: TextStyle(
|
|
|
|
284
|
+ color: signStr == '已预订' && !isSelf
|
|
|
|
285
|
+ ? MyColours.color_353535
|
|
|
|
286
|
+ : (widget.canSelected &&
|
|
|
|
287
|
+ table.selected)
|
|
|
|
288
|
+ ? MyColours.color_ffffff
|
|
|
|
289
|
+ : MyColours.color_353535,
|
|
|
|
290
|
+ fontSize: ScreenUtil().setSp(22),
|
|
|
|
291
|
+ decoration: TextDecoration.none,
|
|
|
|
292
|
+ fontWeight: FontWeight.normal),
|
|
|
|
293
|
+ overflow: TextOverflow.ellipsis,
|
|
|
|
294
|
+ ),
|
|
|
|
295
|
+ signStr == '已预订' &&
|
|
|
|
296
|
+ !isSelf &&
|
|
|
|
297
|
+ ((table.reserver != null &&
|
|
|
|
298
|
+ !table.reserver.isEmpty) ||
|
|
|
|
299
|
+ (table.pnum != '' &&
|
|
|
|
300
|
+ table.pnum != null &&
|
|
|
|
301
|
+ table.pnum != '0'))
|
|
|
|
302
|
+ ? Text(
|
|
|
|
303
|
+ (table.reserver == null ||
|
|
|
|
304
|
+ table.reserver.isEmpty)
|
|
|
|
305
|
+ ? (table.pnum != '' &&
|
|
|
|
306
|
+ table.pnum != null &&
|
|
|
|
307
|
+ table.pnum != '0')
|
|
|
|
308
|
+ ? '(${table.pnum}人)'
|
|
|
|
309
|
+ : ''
|
|
|
|
310
|
+ : '${table.reserver}' +
|
|
|
|
311
|
+ (table.pnum != '' &&
|
|
|
|
312
|
+ table.pnum != null &&
|
|
|
|
313
|
+ table.pnum != '0'
|
|
|
|
314
|
+ ? '(${table.pnum}人)'
|
|
|
|
315
|
+ : ''),
|
|
|
|
316
|
+ style: TextStyle(
|
|
|
|
317
|
+ color: signStr == '已预订' && !isSelf
|
|
|
|
318
|
+ ? MyColours.color_353535
|
|
|
|
319
|
+ : (widget.canSelected &&
|
|
|
|
320
|
+ table.selected)
|
|
|
|
321
|
+ ? MyColours.color_ffffff
|
|
|
|
322
|
+ : MyColours.color_353535,
|
|
|
|
323
|
+ fontSize: ScreenUtil().setSp(22),
|
|
|
|
324
|
+ decoration: TextDecoration.none,
|
|
|
|
325
|
+ fontWeight: FontWeight.normal),
|
|
|
|
326
|
+ overflow: TextOverflow.ellipsis,
|
|
|
|
327
|
+ )
|
|
|
|
328
|
+ : SizedBox(),
|
|
|
|
329
|
+
|
|
|
|
330
|
+ widget.need &&
|
|
|
|
331
|
+ signStr == '已预订' &&
|
|
|
|
332
|
+ !isSelf &&
|
|
|
|
333
|
+ table.nickName != null &&
|
|
|
|
334
|
+ table.nickName != ''
|
|
|
|
335
|
+ ? Padding(
|
|
|
|
336
|
+ padding: EdgeInsets.only(
|
|
|
|
337
|
+ top: ScreenUtil().setWidth(6),
|
|
|
|
338
|
+ bottom: ScreenUtil().setWidth(8),
|
|
|
|
339
|
+ ),
|
|
|
|
340
|
+ child: Text(
|
|
|
|
341
|
+ table.nickName != null &&
|
|
|
|
342
|
+ table.nickName != ''
|
|
|
|
343
|
+ ? '${table.nickName}订'
|
|
|
|
344
|
+ : '',
|
|
|
|
345
|
+ style: TextStyle(
|
|
|
|
346
|
+ color: MyColours.color_353535,
|
|
|
|
347
|
+ fontSize: ScreenUtil().setSp(22),
|
|
|
|
348
|
+ decoration: TextDecoration.none,
|
|
|
|
349
|
+ fontWeight: FontWeight.normal),
|
|
|
|
350
|
+ overflow: TextOverflow.ellipsis,
|
|
|
|
351
|
+ ),
|
|
|
|
352
|
+ )
|
|
|
|
353
|
+ : SizedBox(),
|
|
|
|
354
|
+ // VEmptyView(6),
|
|
|
|
355
|
+ // Text(
|
|
|
|
356
|
+ // table.lowStr,
|
|
|
|
357
|
+ // style: TextStyle(
|
|
|
|
358
|
+ // color: MyColours.color_777777,
|
|
|
|
359
|
+ // fontSize: ScreenUtil().setSp(26),
|
|
|
|
360
|
+ // decoration: TextDecoration.none,
|
|
|
|
361
|
+ // fontWeight: FontWeight.normal),
|
|
|
|
362
|
+ // overflow: TextOverflow.ellipsis,
|
|
|
|
363
|
+ // )
|
|
|
|
364
|
+ signStr == '已预订' && !isSelf
|
|
|
|
365
|
+ ? Container(
|
|
|
|
366
|
+ // width: ScreenUtil().setWidth(160),
|
|
|
|
367
|
+ height: ScreenUtil().setWidth(34),
|
|
|
|
368
|
+ )
|
|
|
|
369
|
+ : SizedBox()
|
|
|
|
370
|
+ ],
|
|
|
|
371
|
+ ),
|
|
|
|
372
|
+ ),
|
|
236
|
|
373
|
|
|
237
|
- widget.need &&
|
|
|
|
238
|
- signStr == '已预订' &&
|
|
|
|
239
|
- !isSelf &&
|
|
|
|
240
|
- table.nickName != null &&
|
|
|
|
241
|
- table.nickName != ''
|
|
|
|
242
|
- ? Padding(
|
|
|
|
243
|
- padding: EdgeInsets.only(
|
|
|
|
244
|
- top: ScreenUtil().setWidth(6),
|
|
|
|
245
|
- bottom: ScreenUtil().setWidth(8),
|
|
|
|
246
|
- ),
|
|
|
|
247
|
- child: Text(
|
|
|
|
248
|
- table.nickName != null && table.nickName != ''
|
|
|
|
249
|
- ? '${table.nickName}订'
|
|
|
|
250
|
- : '',
|
|
|
|
251
|
- style: TextStyle(
|
|
|
|
252
|
- color: MyColours.color_353535,
|
|
|
|
253
|
- fontSize: ScreenUtil().setSp(22),
|
|
|
|
254
|
- decoration: TextDecoration.none,
|
|
|
|
255
|
- fontWeight: FontWeight.normal),
|
|
|
|
256
|
- overflow: TextOverflow.ellipsis,
|
|
|
|
257
|
- ),
|
|
|
|
258
|
- )
|
|
|
|
259
|
- : SizedBox(),
|
|
|
|
260
|
- // VEmptyView(6),
|
|
|
|
261
|
- // Text(
|
|
|
|
262
|
- // table.lowStr,
|
|
|
|
263
|
- // style: TextStyle(
|
|
|
|
264
|
- // color: MyColours.color_777777,
|
|
|
|
265
|
- // fontSize: ScreenUtil().setSp(26),
|
|
|
|
266
|
- // decoration: TextDecoration.none,
|
|
|
|
267
|
- // fontWeight: FontWeight.normal),
|
|
|
|
268
|
- // overflow: TextOverflow.ellipsis,
|
|
|
|
269
|
- // )
|
|
|
|
270
|
signStr == '已预订' && !isSelf
|
374
|
signStr == '已预订' && !isSelf
|
|
271
|
- ? Container(
|
|
|
|
272
|
- // width: ScreenUtil().setWidth(160),
|
|
|
|
273
|
- height: ScreenUtil().setWidth(34),
|
|
|
|
274
|
- )
|
|
|
|
275
|
- : SizedBox()
|
375
|
+ ? SizedBox()
|
|
|
|
376
|
+ : Positioned(
|
|
|
|
377
|
+ left: 0,
|
|
|
|
378
|
+ top: 0,
|
|
|
|
379
|
+ child: table.tidStr == null
|
|
|
|
380
|
+ ? Container()
|
|
|
|
381
|
+ : Container(
|
|
|
|
382
|
+ // width: ScreenUtil().setWidth(60),
|
|
|
|
383
|
+ // height: ScreenUtil().setWidth(42),
|
|
|
|
384
|
+ padding: EdgeInsets.all(
|
|
|
|
385
|
+ ScreenUtil().setWidth(4)),
|
|
|
|
386
|
+ alignment: Alignment.center,
|
|
|
|
387
|
+ decoration: BoxDecoration(
|
|
|
|
388
|
+ color: widget.canSelected &&
|
|
|
|
389
|
+ table.selected
|
|
|
|
390
|
+ ? MyColours.color_199095
|
|
|
|
391
|
+ : Color.fromRGBO(
|
|
|
|
392
|
+ 239, 239, 239, 1),
|
|
|
|
393
|
+ borderRadius: BorderRadius.only(
|
|
|
|
394
|
+ topLeft: Radius.circular(
|
|
|
|
395
|
+ ScreenUtil().setWidth(20)),
|
|
|
|
396
|
+ // topRight:
|
|
|
|
397
|
+ // Radius.circular(ScreenUtil().setWidth(8)),
|
|
|
|
398
|
+ // bottomRight: Radius.circular(
|
|
|
|
399
|
+ // ScreenUtil().setWidth(8))
|
|
|
|
400
|
+ )),
|
|
|
|
401
|
+ child: Text(table.tidStr,
|
|
|
|
402
|
+ style: TextStyle(
|
|
|
|
403
|
+ color: widget.canSelected &&
|
|
|
|
404
|
+ table.selected
|
|
|
|
405
|
+ ? MyColours.color_ffffff
|
|
|
|
406
|
+ : MyColours.color_333333,
|
|
|
|
407
|
+ fontSize: ScreenUtil().setSp(20),
|
|
|
|
408
|
+ decoration: TextDecoration.none,
|
|
|
|
409
|
+ fontWeight: FontWeight.normal)),
|
|
|
|
410
|
+ ),
|
|
|
|
411
|
+ ),
|
|
|
|
412
|
+ // widget.need && signStr == '已预订'
|
|
|
|
413
|
+ // ? Positioned(
|
|
|
|
414
|
+ // bottom: 0,
|
|
|
|
415
|
+ // left: 0,
|
|
|
|
416
|
+ // right: 0,
|
|
|
|
417
|
+ // child: signStr.isEmpty
|
|
|
|
418
|
+ // ? Container()
|
|
|
|
419
|
+ // : Container(
|
|
|
|
420
|
+ // width: ScreenUtil().setWidth(160),
|
|
|
|
421
|
+ // height: ScreenUtil().setWidth(40),
|
|
|
|
422
|
+ // alignment: Alignment.center,
|
|
|
|
423
|
+ // decoration: BoxDecoration(
|
|
|
|
424
|
+ // color: signStr == '已停用'
|
|
|
|
425
|
+ // ? MyColours.color_777777
|
|
|
|
426
|
+ // : signStr == '已买单'
|
|
|
|
427
|
+ // ? MyColours.color_F59A23
|
|
|
|
428
|
+ // : MyColours.color_E95750,
|
|
|
|
429
|
+ // borderRadius: BorderRadius.only(
|
|
|
|
430
|
+ // bottomLeft: Radius.circular(
|
|
|
|
431
|
+ // ScreenUtil().setWidth(8)),
|
|
|
|
432
|
+ // bottomRight: Radius.circular(
|
|
|
|
433
|
+ // ScreenUtil().setWidth(8)))),
|
|
|
|
434
|
+ // child: Text(
|
|
|
|
435
|
+ // signStr,
|
|
|
|
436
|
+ // style: TextStyle(
|
|
|
|
437
|
+ // color: MyColours.color_ffffff,
|
|
|
|
438
|
+ // fontSize: ScreenUtil().setSp(24),
|
|
|
|
439
|
+ // decoration: TextDecoration.none,
|
|
|
|
440
|
+ // fontWeight: FontWeight.normal),
|
|
|
|
441
|
+ // ),
|
|
|
|
442
|
+ // ),
|
|
|
|
443
|
+ // )
|
|
|
|
444
|
+ // : SizedBox(),
|
|
276
|
],
|
445
|
],
|
|
277
|
),
|
446
|
),
|
|
278
|
),
|
447
|
),
|
|
279
|
-
|
|
|
|
280
|
- signStr == '已预订' && !isSelf
|
448
|
+ // Positioned(
|
|
|
|
449
|
+ // top: 3,
|
|
|
|
450
|
+ // right: 5,
|
|
|
|
451
|
+ // child: widget.canSelected && (table.selected ?? false)
|
|
|
|
452
|
+ // ? Image.asset(
|
|
|
|
453
|
+ // "assets/icon_selected.png",
|
|
|
|
454
|
+ // width: ScreenUtil().setWidth(40),
|
|
|
|
455
|
+ // height: ScreenUtil().setWidth(40),
|
|
|
|
456
|
+ // )
|
|
|
|
457
|
+ // : Container()),
|
|
|
|
458
|
+ widget.need && signStr == '已预订' && !isSelf
|
|
281
|
? SizedBox()
|
459
|
? SizedBox()
|
|
282
|
: Positioned(
|
460
|
: Positioned(
|
|
283
|
- left: 0,
|
|
|
|
284
|
- top: 0,
|
|
|
|
285
|
- child: table.tidStr == null
|
|
|
|
286
|
- ? Container()
|
|
|
|
287
|
- : Container(
|
|
|
|
288
|
- // width: ScreenUtil().setWidth(60),
|
|
|
|
289
|
- // height: ScreenUtil().setWidth(42),
|
|
|
|
290
|
- padding:
|
|
|
|
291
|
- EdgeInsets.all(ScreenUtil().setWidth(4)),
|
|
|
|
292
|
- alignment: Alignment.center,
|
|
|
|
293
|
- decoration: BoxDecoration(
|
|
|
|
294
|
- color: widget.canSelected && table.selected
|
|
|
|
295
|
- ? MyColours.color_199095
|
|
|
|
296
|
- : Color.fromRGBO(239, 239, 239, 1),
|
|
|
|
297
|
- borderRadius: BorderRadius.only(
|
|
|
|
298
|
- topLeft: Radius.circular(
|
|
|
|
299
|
- ScreenUtil().setWidth(20)),
|
|
|
|
300
|
- // topRight:
|
|
|
|
301
|
- // Radius.circular(ScreenUtil().setWidth(8)),
|
|
|
|
302
|
- // bottomRight: Radius.circular(
|
|
|
|
303
|
- // ScreenUtil().setWidth(8))
|
|
|
|
304
|
- )),
|
|
|
|
305
|
- child: Text(table.tidStr,
|
|
|
|
306
|
- style: TextStyle(
|
|
|
|
307
|
- color:
|
|
|
|
308
|
- widget.canSelected && table.selected
|
|
|
|
309
|
- ? MyColours.color_ffffff
|
|
|
|
310
|
- : MyColours.color_333333,
|
|
|
|
311
|
- fontSize: ScreenUtil().setSp(20),
|
|
|
|
312
|
- decoration: TextDecoration.none,
|
|
|
|
313
|
- fontWeight: FontWeight.normal)),
|
|
|
|
314
|
- ),
|
|
|
|
315
|
- ),
|
|
|
|
316
|
- // widget.need && signStr == '已预订'
|
|
|
|
317
|
- // ? Positioned(
|
|
|
|
318
|
- // bottom: 0,
|
|
|
|
319
|
- // left: 0,
|
|
|
|
320
|
- // right: 0,
|
|
|
|
321
|
- // child: signStr.isEmpty
|
|
|
|
322
|
- // ? Container()
|
|
|
|
323
|
- // : Container(
|
|
|
|
324
|
- // width: ScreenUtil().setWidth(160),
|
|
|
|
325
|
- // height: ScreenUtil().setWidth(40),
|
|
|
|
326
|
- // alignment: Alignment.center,
|
|
|
|
327
|
- // decoration: BoxDecoration(
|
|
|
|
328
|
- // color: signStr == '已停用'
|
|
|
|
329
|
- // ? MyColours.color_777777
|
|
|
|
330
|
- // : signStr == '已买单'
|
|
|
|
331
|
- // ? MyColours.color_F59A23
|
|
|
|
332
|
- // : MyColours.color_E95750,
|
|
|
|
333
|
- // borderRadius: BorderRadius.only(
|
|
|
|
334
|
- // bottomLeft: Radius.circular(
|
|
|
|
335
|
- // ScreenUtil().setWidth(8)),
|
|
|
|
336
|
- // bottomRight: Radius.circular(
|
|
|
|
337
|
- // ScreenUtil().setWidth(8)))),
|
|
|
|
338
|
- // child: Text(
|
|
|
|
339
|
- // signStr,
|
|
|
|
340
|
- // style: TextStyle(
|
|
|
|
341
|
- // color: MyColours.color_ffffff,
|
|
|
|
342
|
- // fontSize: ScreenUtil().setSp(24),
|
|
|
|
343
|
- // decoration: TextDecoration.none,
|
|
|
|
344
|
- // fontWeight: FontWeight.normal),
|
|
|
|
345
|
- // ),
|
|
|
|
346
|
- // ),
|
|
|
|
347
|
- // )
|
|
|
|
348
|
- // : SizedBox(),
|
461
|
+ left: ScreenUtil().setWidth(18),
|
|
|
|
462
|
+ bottom: ScreenUtil().setWidth(12),
|
|
|
|
463
|
+ child: table.isPhoto != 1
|
|
|
|
464
|
+ ? Image.asset(
|
|
|
|
465
|
+ widget.canSelected && table.selected
|
|
|
|
466
|
+ ? 'assets/f_camera_white.png'
|
|
|
|
467
|
+ : "assets/f_camera.png",
|
|
|
|
468
|
+ width: ScreenUtil().setWidth(22),
|
|
|
|
469
|
+ height: ScreenUtil().setWidth(22),
|
|
|
|
470
|
+ )
|
|
|
|
471
|
+ : Container()),
|
|
|
|
472
|
+ Positioned(
|
|
|
|
473
|
+ bottom: 0,
|
|
|
|
474
|
+ right: 0,
|
|
|
|
475
|
+ left: 0,
|
|
|
|
476
|
+ child: signStr == '已预订' && !isSelf
|
|
|
|
477
|
+ ? Container(
|
|
|
|
478
|
+ // width: ScreenUtil().setWidth(160),
|
|
|
|
479
|
+ height: ScreenUtil().setWidth(34),
|
|
|
|
480
|
+ alignment: Alignment.centerLeft,
|
|
|
|
481
|
+ padding: EdgeInsets.symmetric(
|
|
|
|
482
|
+ horizontal: ScreenUtil().setWidth(10)),
|
|
|
|
483
|
+ decoration: BoxDecoration(
|
|
|
|
484
|
+ color: table.sign == '10'
|
|
|
|
485
|
+ ? MyColours.color_F7C797
|
|
|
|
486
|
+ : MyColours.color_d7d7d7,
|
|
|
|
487
|
+ borderRadius: BorderRadius.only(
|
|
|
|
488
|
+ bottomLeft: Radius.circular(
|
|
|
|
489
|
+ ScreenUtil().setWidth(20)),
|
|
|
|
490
|
+ bottomRight: Radius.circular(
|
|
|
|
491
|
+ ScreenUtil().setWidth(20)))),
|
|
|
|
492
|
+ child: Text(
|
|
|
|
493
|
+ table.sign == '10' ? table.label : '新客',
|
|
|
|
494
|
+ style: TextStyle(
|
|
|
|
495
|
+ color: MyColours.color_353535,
|
|
|
|
496
|
+ fontSize: ScreenUtil().setSp(24),
|
|
|
|
497
|
+ decoration: TextDecoration.none,
|
|
|
|
498
|
+ fontWeight: FontWeight.normal),
|
|
|
|
499
|
+ ),
|
|
|
|
500
|
+ )
|
|
|
|
501
|
+ : SizedBox())
|
|
349
|
],
|
502
|
],
|
|
350
|
),
|
503
|
),
|
|
351
|
- ),
|
|
|
|
352
|
- // Positioned(
|
|
|
|
353
|
- // top: 3,
|
|
|
|
354
|
- // right: 5,
|
|
|
|
355
|
- // child: widget.canSelected && (table.selected ?? false)
|
|
|
|
356
|
- // ? Image.asset(
|
|
|
|
357
|
- // "assets/icon_selected.png",
|
|
|
|
358
|
- // width: ScreenUtil().setWidth(40),
|
|
|
|
359
|
- // height: ScreenUtil().setWidth(40),
|
|
|
|
360
|
- // )
|
|
|
|
361
|
- // : Container()),
|
|
|
|
362
|
- widget.need && signStr == '已预订' && !isSelf
|
|
|
|
363
|
- ? SizedBox()
|
|
|
|
364
|
- : Positioned(
|
|
|
|
365
|
- left: ScreenUtil().setWidth(18),
|
|
|
|
366
|
- bottom: ScreenUtil().setWidth(12),
|
|
|
|
367
|
- child: table.isPhoto != 1
|
|
|
|
368
|
- ? Image.asset(
|
|
|
|
369
|
- widget.canSelected && table.selected
|
|
|
|
370
|
- ? 'assets/f_camera_white.png'
|
|
|
|
371
|
- : "assets/f_camera.png",
|
|
|
|
372
|
- width: ScreenUtil().setWidth(22),
|
|
|
|
373
|
- height: ScreenUtil().setWidth(22),
|
|
|
|
374
|
- )
|
|
|
|
375
|
- : Container()),
|
|
|
|
376
|
- Positioned(
|
|
|
|
377
|
- bottom: 0,
|
|
|
|
378
|
- right: 0,
|
|
|
|
379
|
- left: 0,
|
|
|
|
380
|
- child: signStr == '已预订' && !isSelf
|
|
|
|
381
|
- ? Container(
|
|
|
|
382
|
- // width: ScreenUtil().setWidth(160),
|
|
|
|
383
|
- height: ScreenUtil().setWidth(34),
|
|
|
|
384
|
- alignment: Alignment.centerLeft,
|
|
|
|
385
|
- padding: EdgeInsets.symmetric(
|
|
|
|
386
|
- horizontal: ScreenUtil().setWidth(10)),
|
|
|
|
387
|
- decoration: BoxDecoration(
|
|
|
|
388
|
- color: MyColours.color_d7d7d7,
|
|
|
|
389
|
- borderRadius: BorderRadius.only(
|
|
|
|
390
|
- bottomLeft:
|
|
|
|
391
|
- Radius.circular(ScreenUtil().setWidth(20)),
|
|
|
|
392
|
- bottomRight:
|
|
|
|
393
|
- Radius.circular(ScreenUtil().setWidth(20)))),
|
|
|
|
394
|
- child: Text(
|
|
|
|
395
|
- '新客',
|
|
|
|
396
|
- style: TextStyle(
|
|
|
|
397
|
- color: MyColours.color_353535,
|
|
|
|
398
|
- fontSize: ScreenUtil().setSp(24),
|
|
|
|
399
|
- decoration: TextDecoration.none,
|
|
|
|
400
|
- fontWeight: FontWeight.normal),
|
|
|
|
401
|
- ),
|
|
|
|
402
|
- )
|
|
|
|
403
|
- : SizedBox())
|
|
|
|
404
|
- ],
|
|
|
|
405
|
- ),
|
|
|
|
406
|
);
|
504
|
);
|
|
407
|
}
|
505
|
}
|
|
408
|
} |
506
|
} |