Commit 0ce1aca44984a2b31caa1a2231efa244979cbc29

Authored by wdn127929
1 parent 55ebf60f

话机部分页面尺寸调整(宴会看板、宴会首页、桌位管理首页)

@@ -105,7 +105,8 @@ android { @@ -105,7 +105,8 @@ android {
105 signingConfig signingConfigs.release 105 signingConfig signingConfigs.release
106 } 106 }
107 debug{ 107 debug{
108 - minifyEnabled false 108 + // minifyEnabled false
  109 + minifyEnabled true
109 // TODO: Add your own signing config for the release build. 110 // TODO: Add your own signing config for the release build.
110 // Signing with the debug keys for now, so `flutter run --release` works. 111 // Signing with the debug keys for now, so `flutter run --release` works.
111 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 112 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 archiveVersion = 1; 3 archiveVersion = 1;
4 classes = { 4 classes = {
5 }; 5 };
6 - objectVersion = 46; 6 + objectVersion = 50;
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
@@ -512,7 +512,7 @@ @@ -512,7 +512,7 @@
512 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements; 512 CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
513 CODE_SIGN_IDENTITY = "Apple Development"; 513 CODE_SIGN_IDENTITY = "Apple Development";
514 CODE_SIGN_STYLE = Automatic; 514 CODE_SIGN_STYLE = Automatic;
515 - CURRENT_PROJECT_VERSION = 5132; 515 + CURRENT_PROJECT_VERSION = 513;
516 DEVELOPMENT_TEAM = 8J59HM8B82; 516 DEVELOPMENT_TEAM = 8J59HM8B82;
517 ENABLE_BITCODE = NO; 517 ENABLE_BITCODE = NO;
518 FLUTTER_BUILD_MODE = release; 518 FLUTTER_BUILD_MODE = release;
@@ -658,7 +658,7 @@ @@ -658,7 +658,7 @@
658 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements"; 658 CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
659 CODE_SIGN_IDENTITY = "Apple Development"; 659 CODE_SIGN_IDENTITY = "Apple Development";
660 CODE_SIGN_STYLE = Automatic; 660 CODE_SIGN_STYLE = Automatic;
661 - CURRENT_PROJECT_VERSION = 5132; 661 + CURRENT_PROJECT_VERSION = 513;
662 DEVELOPMENT_TEAM = 8J59HM8B82; 662 DEVELOPMENT_TEAM = 8J59HM8B82;
663 ENABLE_BITCODE = NO; 663 ENABLE_BITCODE = NO;
664 FLUTTER_BUILD_MODE = release; 664 FLUTTER_BUILD_MODE = release;
@@ -694,7 +694,7 @@ @@ -694,7 +694,7 @@
694 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; 694 CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
695 CODE_SIGN_IDENTITY = "Apple Development"; 695 CODE_SIGN_IDENTITY = "Apple Development";
696 CODE_SIGN_STYLE = Automatic; 696 CODE_SIGN_STYLE = Automatic;
697 - CURRENT_PROJECT_VERSION = 5132; 697 + CURRENT_PROJECT_VERSION = 513;
698 DEVELOPMENT_TEAM = 8J59HM8B82; 698 DEVELOPMENT_TEAM = 8J59HM8B82;
699 ENABLE_BITCODE = NO; 699 ENABLE_BITCODE = NO;
700 FLUTTER_BUILD_MODE = release; 700 FLUTTER_BUILD_MODE = release;
@@ -239,6 +239,8 @@ class MyAppState extends State<MyApp> { @@ -239,6 +239,8 @@ class MyAppState extends State<MyApp> {
239 // TODO: implement build 239 // TODO: implement build
240 return ScreenUtilInit( 240 return ScreenUtilInit(
241 designSize: const Size(750, 1334), 241 designSize: const Size(750, 1334),
  242 + // designSize: const Size(900, 1200),//话机尺寸,不能按照屏幕尺寸,大概调整合适
  243 +
242 minTextAdapt: true, 244 minTextAdapt: true,
243 splitScreenMode: true, 245 splitScreenMode: true,
244 builder: (context, child) { 246 builder: (context, child) {
@@ -3400,11 +3400,12 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -3400,11 +3400,12 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
3400 context, '变更预订') || 3400 context, '变更预订') ||
3401 widget.uid == 3401 widget.uid ==
3402 userModel.user.openid || 3402 userModel.user.openid ||
3403 - (userModel.user.role_name == '店长' &&  
3404 - detailEntity.role_name !=  
3405 - '管理员' &&  
3406 - detailEntity.role_name !=  
3407 - '店长')) { 3403 + (userModel.user.role_name ==
  3404 + '店长' &&
  3405 + detailEntity.role_name !=
  3406 + '管理员' &&
  3407 + detailEntity.role_name !=
  3408 + '店长')) {
3408 NavigatorUtil 3409 NavigatorUtil
3409 .goNoteBookChangeFPage( 3410 .goNoteBookChangeFPage(
3410 context, 3411 context,
@@ -3421,14 +3422,19 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -3421,14 +3422,19 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
3421 border: Border.all( 3422 border: Border.all(
3422 width: w(1), 3423 width: w(1),
3423 color: !(Utils.getAuthority( 3424 color: !(Utils.getAuthority(
3424 - context, '变更预订') ||  
3425 - widget.uid ==  
3426 - userModel.user.openid ||  
3427 - (userModel.user.role_name == '店长' &&  
3428 - detailEntity.role_name !=  
3429 - '管理员' &&  
3430 - detailEntity.role_name !=  
3431 - '店长')) 3425 + context, '变更预订') ||
  3426 + widget.uid ==
  3427 + userModel
  3428 + .user.openid ||
  3429 + (userModel.user
  3430 + .role_name ==
  3431 + '店长' &&
  3432 + detailEntity
  3433 + .role_name !=
  3434 + '管理员' &&
  3435 + detailEntity
  3436 + .role_name !=
  3437 + '店长'))
3432 ? MyColours.color_999999 3438 ? MyColours.color_999999
3433 : MyColours.color_199095, 3439 : MyColours.color_199095,
3434 ), 3440 ),
@@ -3442,14 +3448,19 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -3442,14 +3448,19 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
3442 child: Text('变更预订', 3448 child: Text('变更预订',
3443 style: TextStyle( 3449 style: TextStyle(
3444 color: !(Utils.getAuthority( 3450 color: !(Utils.getAuthority(
3445 - context, '变更预订') ||  
3446 - widget.uid ==  
3447 - userModel.user.openid ||  
3448 - (userModel.user.role_name == '店长' &&  
3449 - detailEntity.role_name !=  
3450 - '管理员' &&  
3451 - detailEntity.role_name !=  
3452 - '店长')) 3451 + context, '变更预订') ||
  3452 + widget.uid ==
  3453 + userModel.user
  3454 + .openid ||
  3455 + (userModel.user
  3456 + .role_name ==
  3457 + '店长' &&
  3458 + detailEntity
  3459 + .role_name !=
  3460 + '管理员' &&
  3461 + detailEntity
  3462 + .role_name !=
  3463 + '店长'))
3453 ? MyColours 3464 ? MyColours
3454 .color_999999 3465 .color_999999
3455 : MyColours 3466 : MyColours
@@ -188,420 +188,460 @@ class _FeastBoardPageState extends State<FeastBoardPage> { @@ -188,420 +188,460 @@ class _FeastBoardPageState extends State<FeastBoardPage> {
188 ), 188 ),
189 body: Column( 189 body: Column(
190 children: <Widget>[ 190 children: <Widget>[
191 - Container(  
192 - decoration:  
193 - BoxDecoration(color: MyColours.color_ffffff, boxShadow: [  
194 - BoxShadow(  
195 - offset: Offset(  
196 - 0,  
197 - ScreenUtil().setWidth(8),  
198 - ),  
199 - blurRadius: ScreenUtil().setWidth(8),  
200 - color: MyColours.color_26000000)  
201 - ]),  
202 - child: Column(  
203 - children: [  
204 - TableCalendar(  
205 - // rowHeight: ScreenUtil().setWidth(100),  
206 - rowHeight: ScreenUtil().setWidth(114),  
207 - calendarController: _calendarController,  
208 - initialSelectedDay: dateTimeNow,  
209 - onDaySelected: (day, events, holidays) {  
210 - if (!Utils.isOneDay(day, dateTimeNow)) {  
211 - //不是一天  
212 - dateTimeNow = day;  
213 - _getBanquetByDate();  
214 - }  
215 - },  
216 - // holidays: _holidays,  
217 - availableGestures: AvailableGestures.none, 191 + Expanded(
  192 + child: SingleChildScrollView(
  193 + controller: controller,
  194 + child: Column(children: <Widget>[
  195 + Container(
  196 + decoration: BoxDecoration(
  197 + color: MyColours.color_ffffff,
  198 + boxShadow: [
  199 + BoxShadow(
  200 + offset: Offset(
  201 + 0,
  202 + ScreenUtil().setWidth(8),
  203 + ),
  204 + blurRadius: ScreenUtil().setWidth(8),
  205 + color: MyColours.color_26000000)
  206 + ]),
  207 + child: Column(
  208 + children: [
  209 + TableCalendar(
  210 + // rowHeight: ScreenUtil().setWidth(100),
  211 + rowHeight: ScreenUtil().setWidth(114),
  212 + calendarController: _calendarController,
  213 + initialSelectedDay: dateTimeNow,
  214 + onDaySelected: (day, events, holidays) {
  215 + if (!Utils.isOneDay(day, dateTimeNow)) {
  216 + //不是一天
  217 + dateTimeNow = day;
  218 + _getBanquetByDate();
  219 + }
  220 + },
  221 + // holidays: _holidays,
  222 + availableGestures: AvailableGestures.none,
218 223
219 - locale: "zh_CN",  
220 - onVisibleDaysChanged: (date1, date2, cal) async {  
221 - feastModel.fullStatusByTime = {};  
222 - print('r');  
223 - UserModel userModel =  
224 - Provider.of<UserModel>(context, listen: false);  
225 - String startDay = (date1.millisecondsSinceEpoch / 1000)  
226 - .floor()  
227 - .toString();  
228 - String endDay = (date2.millisecondsSinceEpoch / 1000)  
229 - .floor()  
230 - .toString(); 224 + locale: "zh_CN",
  225 + onVisibleDaysChanged: (date1, date2, cal) async {
  226 + feastModel.fullStatusByTime = {};
  227 + print('r');
  228 + UserModel userModel = Provider.of<UserModel>(
  229 + context,
  230 + listen: false);
  231 + String startDay =
  232 + (date1.millisecondsSinceEpoch / 1000)
  233 + .floor()
  234 + .toString();
  235 + String endDay =
  236 + (date2.millisecondsSinceEpoch / 1000)
  237 + .floor()
  238 + .toString();
231 239
232 - Map<String, String> pramas = {  
233 - 'sid': userModel.user.sellerid,  
234 - 'rdate': '${startDay}',  
235 - 'edate': '${endDay}'  
236 - };  
237 - await feastModel.getExitsBanquetByDate(context, pramas,  
238 - showLoading: true);  
239 - setState(() {});  
240 - },  
241 - initialCalendarFormat: calendarShow  
242 - ? CalendarFormat.month  
243 - : CalendarFormat.week,  
244 - headerStyle: HeaderStyle(  
245 - decoration: BoxDecoration(color: MyColours.color_ffffff),  
246 - headerPadding: EdgeInsets.symmetric(  
247 - // vertical: ScreenUtil().setWidth(24),  
248 - horizontal: ScreenUtil().setWidth(66)),  
249 - formatButtonVisible: false,  
250 - centerHeaderTitle: true,  
251 - titleTextBuilder: (dateTime, _) {  
252 - return dateTime.year.toString() +  
253 - ' ' +  
254 - "年" +  
255 - ' ' +  
256 - dateTime.month.toString() +  
257 - ' ' +  
258 - "月";  
259 - },  
260 - titleTextStyle: TextStyle(  
261 - fontWeight: FontWeight.bold,  
262 - color: MyColours.color_515151,  
263 - fontSize: ScreenUtil().setSp(44)),  
264 - leftChevronIcon: Icon(Icons.chevron_left,  
265 - color: MyColours.color_000000,  
266 - size: ScreenUtil().setWidth(48)),  
267 - rightChevronIcon: Icon(Icons.chevron_right,  
268 - color: MyColours.color_000000,  
269 - size: ScreenUtil().setWidth(48)),  
270 - ),  
271 - calendarStyle: CalendarStyle(  
272 - contentPadding:  
273 - EdgeInsets.only(bottom: ScreenUtil().setWidth(8)),  
274 - weekdayStyle: TextStyle(  
275 - color: MyColours.color_2bb5b7,  
276 - fontSize: ScreenUtil().setSp(32)),  
277 - weekendStyle: TextStyle(  
278 - color: MyColours.color_f49a5e,  
279 - fontSize: ScreenUtil().setSp(32)),  
280 - selectedColor: MyColours.color_2bb5b7,  
281 - outsideDaysVisible: false,  
282 - ),  
283 - builders: CalendarBuilders(  
284 - dowWeekdayBuilder: (context, weekday) {  
285 - return Container(  
286 - color: MyColours.color_ffffff,  
287 - alignment: Alignment.center,  
288 - // margin:  
289 - // EdgeInsets.only(bottom: ScreenUtil().setWidth(20)),  
290 - padding: EdgeInsets.symmetric(  
291 - vertical: ScreenUtil().setWidth(15)),  
292 - child: Text(  
293 - weekday,  
294 - style: TextStyle(  
295 - color: MyColours.color_999999,  
296 - fontSize: ScreenUtil().setSp(32)),  
297 - ),  
298 - );  
299 - },  
300 - dayBuilder: (context, date, _) {  
301 - String keytemp = '${date.year}' +  
302 - '-' +  
303 - '${Utils.addZeroNumber(date.month)}' +  
304 - '-' +  
305 - '${Utils.addZeroNumber(date.day)}';  
306 - return Container(  
307 - // height: ScreenUtil().setWidth(210),  
308 - decoration: BoxDecoration(  
309 - // shape: BoxShape.circle,  
310 - // color: Colors.blue, 240 + Map<String, String> pramas = {
  241 + 'sid': userModel.user.sellerid,
  242 + 'rdate': '${startDay}',
  243 + 'edate': '${endDay}'
  244 + };
  245 + await feastModel.getExitsBanquetByDate(
  246 + context, pramas,
  247 + showLoading: true);
  248 + setState(() {});
  249 + },
  250 + initialCalendarFormat: calendarShow
  251 + ? CalendarFormat.month
  252 + : CalendarFormat.week,
  253 + headerStyle: HeaderStyle(
  254 + decoration: BoxDecoration(
  255 + color: MyColours.color_ffffff),
  256 + headerPadding: EdgeInsets.symmetric(
  257 + // vertical: ScreenUtil().setWidth(24),
  258 + horizontal: ScreenUtil().setWidth(66)),
  259 + formatButtonVisible: false,
  260 + centerHeaderTitle: true,
  261 + titleTextBuilder: (dateTime, _) {
  262 + return dateTime.year.toString() +
  263 + ' ' +
  264 + "年" +
  265 + ' ' +
  266 + dateTime.month.toString() +
  267 + ' ' +
  268 + "月";
  269 + },
  270 + titleTextStyle: TextStyle(
  271 + fontWeight: FontWeight.bold,
  272 + color: MyColours.color_515151,
  273 + fontSize: ScreenUtil().setSp(44)),
  274 + leftChevronIcon: Icon(Icons.chevron_left,
  275 + color: MyColours.color_000000,
  276 + size: ScreenUtil().setWidth(48)),
  277 + rightChevronIcon: Icon(Icons.chevron_right,
  278 + color: MyColours.color_000000,
  279 + size: ScreenUtil().setWidth(48)),
311 ), 280 ),
312 - // alignment: Alignment.center,  
313 - // margin: EdgeInsets.fromLTRB(  
314 - // ScreenUtil().setWidth(12),  
315 - // ScreenUtil().setWidth(12),  
316 - // ScreenUtil().setWidth(12),  
317 - // ScreenUtil().setWidth(10)),  
318 - // padding: EdgeInsets.symmetric(  
319 - // // horizontal: ScreenUtil().setWidth(12),  
320 - // vertical: ScreenUtil().setWidth(8),  
321 - // ),  
322 - child: Column(  
323 - mainAxisAlignment: MainAxisAlignment.center,  
324 - children: [  
325 - Text(  
326 - // "${_parseDateDay(date)}",  
327 - // '${Utils.addZeroNumber(date.day)}',  
328 - '${date.day}',  
329 - style: TextStyle().copyWith(  
330 - fontSize: ScreenUtil().setSp(32),  
331 - color: MyColours.color_515151,  
332 - fontWeight: FontWeight.bold)),  
333 - VEmptyView(4),  
334 - // Text(  
335 - // // "${_parseDateDay(date)}",  
336 - // '${Utils.getLunarSpecialDate(date)}',  
337 - // style: TextStyle().copyWith(  
338 - // fontSize: ScreenUtil().setSp(22),  
339 - // color: MyColours.color_353535),  
340 - // ),  
341 - Text(  
342 - "${_parseDateDay(date)}",  
343 - style: TextStyle().copyWith(  
344 - fontSize: ScreenUtil().setSp(20),  
345 - color: MyColours.color_515151), 281 + calendarStyle: CalendarStyle(
  282 + contentPadding: EdgeInsets.only(
  283 + bottom: ScreenUtil().setWidth(8)),
  284 + weekdayStyle: TextStyle(
  285 + color: MyColours.color_2bb5b7,
  286 + fontSize: ScreenUtil().setSp(32)),
  287 + weekendStyle: TextStyle(
  288 + color: MyColours.color_f49a5e,
  289 + fontSize: ScreenUtil().setSp(32)),
  290 + selectedColor: MyColours.color_2bb5b7,
  291 + outsideDaysVisible: false,
346 ), 292 ),
347 - feastModel.fullStatusByTime.keys  
348 - .contains(keytemp) &&  
349 - feastModel.fullStatusByTime[keytemp] ==  
350 - '1'  
351 - ? Container(  
352 - margin: EdgeInsets.symmetric(  
353 - vertical: ScreenUtil().setWidth(4)),  
354 - width: ScreenUtil().setWidth(16),  
355 - height: ScreenUtil().setWidth(16), 293 + builders: CalendarBuilders(
  294 + dowWeekdayBuilder: (context, weekday) {
  295 + return Container(
  296 + color: MyColours.color_ffffff,
  297 + alignment: Alignment.center,
  298 + // margin:
  299 + // EdgeInsets.only(bottom: ScreenUtil().setWidth(20)),
  300 + padding: EdgeInsets.symmetric(
  301 + vertical: ScreenUtil().setWidth(15)),
  302 + child: Text(
  303 + weekday,
  304 + style: TextStyle(
  305 + color: MyColours.color_999999,
  306 + fontSize: ScreenUtil().setSp(32)),
  307 + ),
  308 + );
  309 + },
  310 + dayBuilder: (context, date, _) {
  311 + String keytemp = '${date.year}' +
  312 + '-' +
  313 + '${Utils.addZeroNumber(date.month)}' +
  314 + '-' +
  315 + '${Utils.addZeroNumber(date.day)}';
  316 + return Container(
  317 + // height: ScreenUtil().setWidth(210),
  318 + decoration: BoxDecoration(
  319 + // shape: BoxShape.circle,
  320 + // color: Colors.blue,
  321 + ),
  322 + // alignment: Alignment.center,
  323 + // margin: EdgeInsets.fromLTRB(
  324 + // ScreenUtil().setWidth(12),
  325 + // ScreenUtil().setWidth(12),
  326 + // ScreenUtil().setWidth(12),
  327 + // ScreenUtil().setWidth(10)),
  328 + // padding: EdgeInsets.symmetric(
  329 + // // horizontal: ScreenUtil().setWidth(12),
  330 + // vertical: ScreenUtil().setWidth(8),
  331 + // ),
  332 + child: Column(
  333 + mainAxisAlignment:
  334 + MainAxisAlignment.center,
  335 + children: [
  336 + Text(
  337 + // "${_parseDateDay(date)}",
  338 + // '${Utils.addZeroNumber(date.day)}',
  339 + '${date.day}',
  340 + style: TextStyle().copyWith(
  341 + fontSize:
  342 + ScreenUtil().setSp(32),
  343 + color: MyColours.color_515151,
  344 + fontWeight: FontWeight.bold)),
  345 + VEmptyView(4),
  346 + // Text(
  347 + // // "${_parseDateDay(date)}",
  348 + // '${Utils.getLunarSpecialDate(date)}',
  349 + // style: TextStyle().copyWith(
  350 + // fontSize: ScreenUtil().setSp(22),
  351 + // color: MyColours.color_353535),
  352 + // ),
  353 + Text(
  354 + "${_parseDateDay(date)}",
  355 + style: TextStyle().copyWith(
  356 + fontSize: ScreenUtil().setSp(20),
  357 + color: MyColours.color_515151),
  358 + ),
  359 + feastModel.fullStatusByTime.keys
  360 + .contains(keytemp) &&
  361 + feastModel.fullStatusByTime[
  362 + keytemp] ==
  363 + '1'
  364 + ? Container(
  365 + margin: EdgeInsets.symmetric(
  366 + vertical: ScreenUtil()
  367 + .setWidth(4)),
  368 + width:
  369 + ScreenUtil().setWidth(16),
  370 + height:
  371 + ScreenUtil().setWidth(16),
  372 + decoration: BoxDecoration(
  373 + color:
  374 + MyColours.color_E34D59,
  375 + borderRadius:
  376 + BorderRadius.circular(
  377 + ScreenUtil()
  378 + .radius(8))),
  379 + )
  380 + : SizedBox()
  381 + ],
  382 + ),
  383 + );
  384 + },
  385 + selectedDayBuilder: (context, date, _) {
  386 + String keytemp = '${date.year}' +
  387 + '-' +
  388 + '${Utils.addZeroNumber(date.month)}' +
  389 + '-' +
  390 + '${Utils.addZeroNumber(date.day)}';
  391 + return Container(
  392 + // alignment: Alignment.center,
  393 + // margin: EdgeInsets.fromLTRB(
  394 + // ScreenUtil().setWidth(12),
  395 + // ScreenUtil().setWidth(12),
  396 + // ScreenUtil().setWidth(12),
  397 + // ScreenUtil().setWidth(32)),
  398 + padding: EdgeInsets.only(
  399 + bottom: ScreenUtil().setWidth(0),
  400 + left: ScreenUtil().setWidth(5),
  401 + right: ScreenUtil().setWidth(5),
  402 + top: ScreenUtil().setWidth(0)),
  403 + child: Container(
356 decoration: BoxDecoration( 404 decoration: BoxDecoration(
357 - color: MyColours.color_E34D59,  
358 borderRadius: BorderRadius.circular( 405 borderRadius: BorderRadius.circular(
359 - ScreenUtil().radius(8))),  
360 - )  
361 - : SizedBox()  
362 - ],  
363 - ),  
364 - );  
365 - },  
366 - selectedDayBuilder: (context, date, _) {  
367 - String keytemp = '${date.year}' +  
368 - '-' +  
369 - '${Utils.addZeroNumber(date.month)}' +  
370 - '-' +  
371 - '${Utils.addZeroNumber(date.day)}';  
372 - return Container(  
373 - // alignment: Alignment.center,  
374 - // margin: EdgeInsets.fromLTRB(  
375 - // ScreenUtil().setWidth(12),  
376 - // ScreenUtil().setWidth(12),  
377 - // ScreenUtil().setWidth(12),  
378 - // ScreenUtil().setWidth(32)),  
379 - padding: EdgeInsets.only(  
380 - bottom: ScreenUtil().setWidth(0),  
381 - left: ScreenUtil().setWidth(5),  
382 - right: ScreenUtil().setWidth(5),  
383 - top: ScreenUtil().setWidth(0)),  
384 - child: Container(  
385 - decoration: BoxDecoration(  
386 - borderRadius: BorderRadius.circular(  
387 - ScreenUtil().setWidth(10)),  
388 - color: MyColours.color_438E93),  
389 - child: Column(  
390 - mainAxisAlignment: MainAxisAlignment.center,  
391 - children: [  
392 - Text(  
393 - // "${_parseDateDay(date)}",  
394 - // '${Utils.addZeroNumber(date.day)}',  
395 - '${date.day}',  
396 - style: TextStyle().copyWith(  
397 - color: MyColours.color_F6F6F6,  
398 - fontSize: ScreenUtil().setSp(32),  
399 - fontWeight: FontWeight.bold),  
400 - ),  
401 - Text(  
402 - "${_parseDateDay(date)}",  
403 - // '${Utils.lunarCalendarHolidaysShow(date)}',  
404 - style: TextStyle().copyWith(  
405 - fontSize: ScreenUtil().setSp(22),  
406 - color: MyColours.color_F6F6F6),  
407 - ),  
408 - feastModel.fullStatusByTime.keys  
409 - .contains(keytemp) &&  
410 - feastModel.fullStatusByTime[keytemp] ==  
411 - '1'  
412 - ? Container(  
413 - margin: EdgeInsets.symmetric(  
414 - vertical: ScreenUtil().setWidth(4)),  
415 - width: ScreenUtil().setWidth(16),  
416 - height: ScreenUtil().setWidth(16),  
417 - decoration: BoxDecoration(  
418 - color: MyColours.color_E34D59,  
419 - borderRadius: BorderRadius.circular(  
420 - ScreenUtil().radius(8))),  
421 - )  
422 - : SizedBox()  
423 - ],  
424 - ),  
425 - ),  
426 - );  
427 - },  
428 - todayDayBuilder: (context, date, _) {  
429 - String keytemp = '${date.year}' +  
430 - '-' +  
431 - '${Utils.addZeroNumber(date.month)}' +  
432 - '-' +  
433 - '${Utils.addZeroNumber(date.day)}';  
434 - return Container(  
435 - // alignment: Alignment.center,  
436 - // margin: EdgeInsets.fromLTRB(  
437 - // ScreenUtil().setWidth(12),  
438 - // ScreenUtil().setWidth(12),  
439 - // ScreenUtil().setWidth(12),  
440 - // ScreenUtil().setWidth(32)),  
441 - padding: EdgeInsets.only(  
442 - bottom: ScreenUtil().setWidth(0),  
443 - left: ScreenUtil().setWidth(5),  
444 - right: ScreenUtil().setWidth(5),  
445 - top: ScreenUtil().setWidth(0)),  
446 - child: Container(  
447 - decoration: BoxDecoration(  
448 - borderRadius: BorderRadius.circular(  
449 - ScreenUtil().setWidth(10)),  
450 - color: MyColours.color_2bb5b7),  
451 - child: Column(  
452 - mainAxisAlignment: MainAxisAlignment.center,  
453 - children: [  
454 - Text(  
455 - // "${_parseDateDay(date)}",  
456 - // '${Utils.addZeroNumber(date.day)}',  
457 - '${date.day}',  
458 - style: TextStyle().copyWith(  
459 - color: MyColours.color_F6F6F6,  
460 - fontSize: ScreenUtil().setSp(32),  
461 - fontWeight: FontWeight.bold),  
462 - ),  
463 - Text(  
464 - "${_parseDateDay(date)}",  
465 - // '${Utils.lunarCalendarHolidaysShow(date)}',  
466 - style: TextStyle().copyWith(  
467 - fontSize: ScreenUtil().setSp(22),  
468 - color: MyColours.color_F6F6F6),  
469 - ),  
470 - feastModel.fullStatusByTime.keys  
471 - .contains(keytemp) &&  
472 - feastModel.fullStatusByTime[keytemp] ==  
473 - '1'  
474 - ? Container(  
475 - margin: EdgeInsets.symmetric(  
476 - vertical: ScreenUtil().setWidth(4)),  
477 - width: ScreenUtil().setWidth(16),  
478 - height: ScreenUtil().setWidth(16),  
479 - decoration: BoxDecoration(  
480 - color: MyColours.color_E34D59,  
481 - borderRadius: BorderRadius.circular(  
482 - ScreenUtil().radius(8))),  
483 - )  
484 - : SizedBox()  
485 - ],  
486 - ),  
487 - ),  
488 - );  
489 - // return Container(  
490 - // decoration: BoxDecoration(  
491 - // shape: BoxShape.circle,  
492 - // border: Border.all(  
493 - // color: MyColours.color_2bb5b7,  
494 - // width: ScreenUtil().setWidth(2))),  
495 - // alignment: Alignment.center,  
496 - // margin: EdgeInsets.fromLTRB(  
497 - // ScreenUtil().setWidth(12),  
498 - // ScreenUtil().setWidth(12),  
499 - // ScreenUtil().setWidth(12),  
500 - // ScreenUtil().setWidth(32)),  
501 - // padding: EdgeInsets.only(  
502 - // bottom: ScreenUtil().setWidth(8),  
503 - // left: ScreenUtil().setWidth(16),  
504 - // right: ScreenUtil().setWidth(16),  
505 - // top: ScreenUtil().setWidth(8)),  
506 - // child: Text(  
507 - // // '今',  
508 - // '${Utils.addZeroNumber(date.day)}',  
509 - // style: TextStyle().copyWith(  
510 - // fontSize: ScreenUtil().setSp(32),  
511 - // color: MyColours.color_2bb5b7),  
512 - // ),  
513 - // );  
514 - },  
515 - markersBuilder: (context, date, events, holidays) {  
516 - final children = <Widget>[]; 406 + ScreenUtil().setWidth(10)),
  407 + color: MyColours.color_438E93),
  408 + child: Column(
  409 + mainAxisAlignment:
  410 + MainAxisAlignment.center,
  411 + children: [
  412 + Text(
  413 + // "${_parseDateDay(date)}",
  414 + // '${Utils.addZeroNumber(date.day)}',
  415 + '${date.day}',
  416 + style: TextStyle().copyWith(
  417 + color: MyColours.color_F6F6F6,
  418 + fontSize:
  419 + ScreenUtil().setSp(32),
  420 + fontWeight: FontWeight.bold),
  421 + ),
  422 + Text(
  423 + "${_parseDateDay(date)}",
  424 + // '${Utils.lunarCalendarHolidaysShow(date)}',
  425 + style: TextStyle().copyWith(
  426 + fontSize:
  427 + ScreenUtil().setSp(22),
  428 + color: MyColours.color_F6F6F6),
  429 + ),
  430 + feastModel.fullStatusByTime.keys
  431 + .contains(keytemp) &&
  432 + feastModel.fullStatusByTime[
  433 + keytemp] ==
  434 + '1'
  435 + ? Container(
  436 + margin: EdgeInsets.symmetric(
  437 + vertical: ScreenUtil()
  438 + .setWidth(4)),
  439 + width:
  440 + ScreenUtil().setWidth(16),
  441 + height:
  442 + ScreenUtil().setWidth(16),
  443 + decoration: BoxDecoration(
  444 + color: MyColours
  445 + .color_E34D59,
  446 + borderRadius:
  447 + BorderRadius.circular(
  448 + ScreenUtil()
  449 + .radius(8))),
  450 + )
  451 + : SizedBox()
  452 + ],
  453 + ),
  454 + ),
  455 + );
  456 + },
  457 + todayDayBuilder: (context, date, _) {
  458 + String keytemp = '${date.year}' +
  459 + '-' +
  460 + '${Utils.addZeroNumber(date.month)}' +
  461 + '-' +
  462 + '${Utils.addZeroNumber(date.day)}';
  463 + return Container(
  464 + // alignment: Alignment.center,
  465 + // margin: EdgeInsets.fromLTRB(
  466 + // ScreenUtil().setWidth(12),
  467 + // ScreenUtil().setWidth(12),
  468 + // ScreenUtil().setWidth(12),
  469 + // ScreenUtil().setWidth(32)),
  470 + padding: EdgeInsets.only(
  471 + bottom: ScreenUtil().setWidth(0),
  472 + left: ScreenUtil().setWidth(5),
  473 + right: ScreenUtil().setWidth(5),
  474 + top: ScreenUtil().setWidth(0)),
  475 + child: Container(
  476 + decoration: BoxDecoration(
  477 + borderRadius: BorderRadius.circular(
  478 + ScreenUtil().setWidth(10)),
  479 + color: MyColours.color_2bb5b7),
  480 + child: Column(
  481 + mainAxisAlignment:
  482 + MainAxisAlignment.center,
  483 + children: [
  484 + Text(
  485 + // "${_parseDateDay(date)}",
  486 + // '${Utils.addZeroNumber(date.day)}',
  487 + '${date.day}',
  488 + style: TextStyle().copyWith(
  489 + color: MyColours.color_F6F6F6,
  490 + fontSize:
  491 + ScreenUtil().setSp(32),
  492 + fontWeight: FontWeight.bold),
  493 + ),
  494 + Text(
  495 + "${_parseDateDay(date)}",
  496 + // '${Utils.lunarCalendarHolidaysShow(date)}',
  497 + style: TextStyle().copyWith(
  498 + fontSize:
  499 + ScreenUtil().setSp(22),
  500 + color: MyColours.color_F6F6F6),
  501 + ),
  502 + feastModel.fullStatusByTime.keys
  503 + .contains(keytemp) &&
  504 + feastModel.fullStatusByTime[
  505 + keytemp] ==
  506 + '1'
  507 + ? Container(
  508 + margin: EdgeInsets.symmetric(
  509 + vertical: ScreenUtil()
  510 + .setWidth(4)),
  511 + width:
  512 + ScreenUtil().setWidth(16),
  513 + height:
  514 + ScreenUtil().setWidth(16),
  515 + decoration: BoxDecoration(
  516 + color: MyColours
  517 + .color_E34D59,
  518 + borderRadius:
  519 + BorderRadius.circular(
  520 + ScreenUtil()
  521 + .radius(8))),
  522 + )
  523 + : SizedBox()
  524 + ],
  525 + ),
  526 + ),
  527 + );
  528 + // return Container(
  529 + // decoration: BoxDecoration(
  530 + // shape: BoxShape.circle,
  531 + // border: Border.all(
  532 + // color: MyColours.color_2bb5b7,
  533 + // width: ScreenUtil().setWidth(2))),
  534 + // alignment: Alignment.center,
  535 + // margin: EdgeInsets.fromLTRB(
  536 + // ScreenUtil().setWidth(12),
  537 + // ScreenUtil().setWidth(12),
  538 + // ScreenUtil().setWidth(12),
  539 + // ScreenUtil().setWidth(32)),
  540 + // padding: EdgeInsets.only(
  541 + // bottom: ScreenUtil().setWidth(8),
  542 + // left: ScreenUtil().setWidth(16),
  543 + // right: ScreenUtil().setWidth(16),
  544 + // top: ScreenUtil().setWidth(8)),
  545 + // child: Text(
  546 + // // '今',
  547 + // '${Utils.addZeroNumber(date.day)}',
  548 + // style: TextStyle().copyWith(
  549 + // fontSize: ScreenUtil().setSp(32),
  550 + // color: MyColours.color_2bb5b7),
  551 + // ),
  552 + // );
  553 + },
  554 + markersBuilder:
  555 + (context, date, events, holidays) {
  556 + final children = <Widget>[];
517 557
518 - // if (events.isNotEmpty) {  
519 - // children.add(  
520 - // Positioned(  
521 - // right: 1,  
522 - // bottom: 1,  
523 - // child: _buildEventsMarker(date, events),  
524 - // ),  
525 - // );  
526 - // } 558 + // if (events.isNotEmpty) {
  559 + // children.add(
  560 + // Positioned(
  561 + // right: 1,
  562 + // bottom: 1,
  563 + // child: _buildEventsMarker(date, events),
  564 + // ),
  565 + // );
  566 + // }
527 567
528 - // if (holidays.isNotEmpty) {  
529 - // children.add(  
530 - // Positioned(  
531 - // right: ScreenUtil().setWidth(27),  
532 - // bottom: 0,  
533 - // top: ScreenUtil().setWidth(30),  
534 - // child: buildMarker(date)),  
535 - // Align(  
536 - // alignment: Alignment.bottomCenter,  
537 - // child: buildMarker(date),  
538 - // )  
539 - // );  
540 - // } 568 + // if (holidays.isNotEmpty) {
  569 + // children.add(
  570 + // Positioned(
  571 + // right: ScreenUtil().setWidth(27),
  572 + // bottom: 0,
  573 + // top: ScreenUtil().setWidth(30),
  574 + // child: buildMarker(date)),
  575 + // Align(
  576 + // alignment: Alignment.bottomCenter,
  577 + // child: buildMarker(date),
  578 + // )
  579 + // );
  580 + // }
541 581
542 - return [];  
543 - },  
544 - // singleMarkerBuilder: (context, dateTime, event) {  
545 - // return Container(  
546 - // width: ScreenUtil().setWidth(6),  
547 - // height: ScreenUtil().setWidth(6),  
548 - // margin:  
549 - // const EdgeInsets.symmetric(horizontal: 0.3),  
550 - // decoration: BoxDecoration(  
551 - // shape: BoxShape.circle,  
552 - // color: MyColours.color_ff0000,  
553 - // ),  
554 - // );  
555 - // },  
556 - ),  
557 - ),  
558 - InkWell(  
559 - onTap: () {  
560 - calendarShow = !calendarShow; 582 + return [];
  583 + },
  584 + // singleMarkerBuilder: (context, dateTime, event) {
  585 + // return Container(
  586 + // width: ScreenUtil().setWidth(6),
  587 + // height: ScreenUtil().setWidth(6),
  588 + // margin:
  589 + // const EdgeInsets.symmetric(horizontal: 0.3),
  590 + // decoration: BoxDecoration(
  591 + // shape: BoxShape.circle,
  592 + // color: MyColours.color_ff0000,
  593 + // ),
  594 + // );
  595 + // },
  596 + ),
  597 + ),
  598 + InkWell(
  599 + onTap: () {
  600 + calendarShow = !calendarShow;
561 601
562 - if (calendarShow) {  
563 - _calendarController  
564 - .setCalendarFormat(CalendarFormat.month);  
565 - } else {  
566 - _calendarController  
567 - .setCalendarFormat(CalendarFormat.week);  
568 - }  
569 - setState(() {});  
570 - },  
571 - child: Container(  
572 - width: double.infinity,  
573 - color: Colors.white,  
574 - child: Column(  
575 - children: [  
576 - VEmptyView(4),  
577 - Image.asset(  
578 - Utils.getImgPath(calendarShow  
579 - ? 'y_chevron_up_circle'  
580 - : 'y_chevron_down_circle'),  
581 - width: ScreenUtil().setWidth(32)),  
582 - VEmptyView(32), 602 + if (calendarShow) {
  603 + _calendarController.setCalendarFormat(
  604 + CalendarFormat.month);
  605 + } else {
  606 + _calendarController
  607 + .setCalendarFormat(CalendarFormat.week);
  608 + }
  609 + setState(() {});
  610 + },
  611 + child: Container(
  612 + width: double.infinity,
  613 + color: Colors.white,
  614 + child: Column(
  615 + children: [
  616 + VEmptyView(4),
  617 + Image.asset(
  618 + Utils.getImgPath(calendarShow
  619 + ? 'y_chevron_up_circle'
  620 + : 'y_chevron_down_circle'),
  621 + width: ScreenUtil().setWidth(32)),
  622 + VEmptyView(32),
  623 + ],
  624 + ),
  625 + ))
583 ], 626 ],
584 - ),  
585 - ))  
586 - ],  
587 - )),  
588 - VEmptyView(48),  
589 - Expanded(  
590 - child: ListView.builder(  
591 - shrinkWrap: true,  
592 - padding: EdgeInsets.symmetric(  
593 - horizontal: ScreenUtil().setWidth(8)),  
594 - controller: controller,  
595 - itemBuilder: (context, index) {  
596 - FeastBoardModel boardModel =  
597 - feastModel.banquetByDateData[index];  
598 - return FeastBoardItem(  
599 - boardModel: boardModel,  
600 - controller: controller,  
601 - isOpen: !calendarShow,  
602 - );  
603 - },  
604 - itemCount: feastModel.banquetByDateData.length)), 627 + )),
  628 + VEmptyView(48),
  629 + ListView.builder(
  630 + shrinkWrap: true,
  631 + padding: EdgeInsets.symmetric(
  632 + horizontal: ScreenUtil().setWidth(8)),
  633 + controller: controller,
  634 + itemBuilder: (context, index) {
  635 + FeastBoardModel boardModel =
  636 + feastModel.banquetByDateData[index];
  637 + return FeastBoardItem(
  638 + boardModel: boardModel,
  639 + controller: controller,
  640 + isOpen: !calendarShow,
  641 + );
  642 + },
  643 + itemCount: feastModel.banquetByDateData.length)
  644 + ]))),
605 Row( 645 Row(
606 children: [ 646 children: [
607 Expanded( 647 Expanded(
@@ -121,84 +121,95 @@ class _FeastPageState extends State<FeastPage> { @@ -121,84 +121,95 @@ class _FeastPageState extends State<FeastPage> {
121 body: Column( 121 body: Column(
122 crossAxisAlignment: CrossAxisAlignment.start, 122 crossAxisAlignment: CrossAxisAlignment.start,
123 children: [ 123 children: [
124 - VEmptyView(112),  
125 - Row(  
126 - mainAxisAlignment: MainAxisAlignment.spaceAround,  
127 - children: [  
128 - upAndDown('y_kanban', '宴会看板', onTap: () {  
129 - NavigatorUtil.goFeastBoardPage(context);  
130 - }),  
131 - upAndDown(  
132 - Utils.getAuthority(context, '新建宴会') ? 'y_new' : 'y_new_un',  
133 - '新建宴会', onTap: () {  
134 - if (Utils.getAuthority(context, '新建宴会')) {  
135 - NavigatorUtil.goFeastCreatePage(context, isCreate: true);  
136 - }  
137 - }),  
138 - InkWell(  
139 - onTap: () {  
140 - if (Utils.getAuthority(context, '待跟进')) {  
141 - NavigatorUtil.goFeastFollowUpPage(context);  
142 - }  
143 - },  
144 - child: Stack(clipBehavior: Clip.none, children: [ 124 + SingleChildScrollView(
  125 + child: Column(
  126 + crossAxisAlignment: CrossAxisAlignment.start,
  127 + children: [
  128 + VEmptyView(112),
  129 + Row(
  130 + mainAxisAlignment: MainAxisAlignment.spaceAround,
  131 + children: [
  132 + upAndDown('y_kanban', '宴会看板', onTap: () {
  133 + NavigatorUtil.goFeastBoardPage(context);
  134 + }),
145 upAndDown( 135 upAndDown(
146 - Utils.getAuthority(context, '待跟进')  
147 - ? 'y_schedule'  
148 - : 'y_schedule_un',  
149 - '待跟进', onTap: () {  
150 - if (Utils.getAuthority(context, '待跟进')) {  
151 - NavigatorUtil.goFeastFollowUpPage(context); 136 + Utils.getAuthority(context, '新建宴会')
  137 + ? 'y_new'
  138 + : 'y_new_un',
  139 + '新建宴会', onTap: () {
  140 + if (Utils.getAuthority(context, '新建宴会')) {
  141 + NavigatorUtil.goFeastCreatePage(context,
  142 + isCreate: true);
152 } 143 }
153 }), 144 }),
154 - feastModel.beFollowData != null &&  
155 - feastModel.beFollowData.length > 0 &&  
156 - (Utils.getAuthority(context, '待跟进'))  
157 - ? Positioned(  
158 - right: ScreenUtil().setWidth(0),  
159 - bottom: ScreenUtil().setWidth(38),  
160 - child: Container(  
161 - alignment: Alignment.center,  
162 - decoration: BoxDecoration(  
163 - borderRadius: BorderRadius.circular(  
164 - ScreenUtil().setWidth(16)),  
165 - color: MyColours.color_E34D59),  
166 - // width: ScreenUtil().setWidth(32),  
167 - height: ScreenUtil().setWidth(32),  
168 - padding: EdgeInsets.symmetric(horizontal: w(4)),  
169 - child: Text(  
170 - '${feastModel.beFollowData.length}',  
171 - style: TextStyle(  
172 - color: MyColours.color_F6F6F6,  
173 - fontWeight: FontWeight.bold,  
174 - fontSize: ScreenUtil().setSp(24)),  
175 - ),  
176 - ),  
177 - )  
178 - : SizedBox()  
179 - ])),  
180 - upAndDown(  
181 - Utils.getAuthority(context, '定金管理')  
182 - ? 'y_money'  
183 - : 'y_money_un',  
184 - '定金管理', onTap: () {  
185 - if (Utils.getAuthority(context, '定金管理')) {  
186 - NavigatorUtil.goFeastDepositDataPage(context);  
187 - }  
188 - })  
189 - ],  
190 - ),  
191 - VEmptyView(102),  
192 - Padding(  
193 - padding: EdgeInsets.only(left: ScreenUtil().setWidth(48)),  
194 - child: Text(  
195 - '7天内宴会',  
196 - style: TextStyle(  
197 - color: MyColours.color_000000,  
198 - fontSize: ScreenUtil().setSp(28)), 145 + InkWell(
  146 + onTap: () {
  147 + if (Utils.getAuthority(context, '待跟进')) {
  148 + NavigatorUtil.goFeastFollowUpPage(context);
  149 + }
  150 + },
  151 + child: Stack(clipBehavior: Clip.none, children: [
  152 + upAndDown(
  153 + Utils.getAuthority(context, '待跟进')
  154 + ? 'y_schedule'
  155 + : 'y_schedule_un',
  156 + '待跟进', onTap: () {
  157 + if (Utils.getAuthority(context, '待跟进')) {
  158 + NavigatorUtil.goFeastFollowUpPage(context);
  159 + }
  160 + }),
  161 + feastModel.beFollowData != null &&
  162 + feastModel.beFollowData.length > 0 &&
  163 + (Utils.getAuthority(context, '待跟进'))
  164 + ? Positioned(
  165 + right: ScreenUtil().setWidth(0),
  166 + bottom: ScreenUtil().setWidth(38),
  167 + child: Container(
  168 + alignment: Alignment.center,
  169 + decoration: BoxDecoration(
  170 + borderRadius: BorderRadius.circular(
  171 + ScreenUtil().setWidth(16)),
  172 + color: MyColours.color_E34D59),
  173 + // width: ScreenUtil().setWidth(32),
  174 + height: ScreenUtil().setWidth(32),
  175 + padding: EdgeInsets.symmetric(
  176 + horizontal: w(4)),
  177 + child: Text(
  178 + '${feastModel.beFollowData.length}',
  179 + style: TextStyle(
  180 + color: MyColours.color_F6F6F6,
  181 + fontWeight: FontWeight.bold,
  182 + fontSize: ScreenUtil().setSp(24)),
  183 + ),
  184 + ),
  185 + )
  186 + : SizedBox()
  187 + ])),
  188 + upAndDown(
  189 + Utils.getAuthority(context, '定金管理')
  190 + ? 'y_money'
  191 + : 'y_money_un',
  192 + '定金管理', onTap: () {
  193 + if (Utils.getAuthority(context, '定金管理')) {
  194 + NavigatorUtil.goFeastDepositDataPage(context);
  195 + }
  196 + })
  197 + ],
  198 + ),
  199 + VEmptyView(102),
  200 + Padding(
  201 + padding: EdgeInsets.only(left: ScreenUtil().setWidth(48)),
  202 + child: Text(
  203 + '7天内宴会',
  204 + style: TextStyle(
  205 + color: MyColours.color_000000,
  206 + fontSize: ScreenUtil().setSp(28)),
  207 + ),
  208 + ),
  209 + VEmptyView(26),
  210 + ],
199 ), 211 ),
200 ), 212 ),
201 - VEmptyView(26),  
202 Expanded(child: Consumer<FeastModel>(builder: (context, model, _) { 213 Expanded(child: Consumer<FeastModel>(builder: (context, model, _) {
203 if (model.pageState != PageState.Success) { 214 if (model.pageState != PageState.Success) {
204 return ExceptionPage( 215 return ExceptionPage(
@@ -223,7 +234,8 @@ class _FeastPageState extends State<FeastPage> { @@ -223,7 +234,8 @@ class _FeastPageState extends State<FeastPage> {
223 feastModel.banquetHome[index]; 234 feastModel.banquetHome[index];
224 return InkWell( 235 return InkWell(
225 onTap: () { 236 onTap: () {
226 - NavigatorUtil.goFeastDetailPage(context, sunModel.id,needChange: true); 237 + NavigatorUtil.goFeastDetailPage(context, sunModel.id,
  238 + needChange: true);
227 }, 239 },
228 child: FeastItem(controller, sunModel)); 240 child: FeastItem(controller, sunModel));
229 }, 241 },
@@ -565,7 +565,7 @@ class _MyContactListPageState extends State<MyContactListPage> { @@ -565,7 +565,7 @@ class _MyContactListPageState extends State<MyContactListPage> {
565 Container( 565 Container(
566 width: w(70), 566 width: w(70),
567 child: Text( 567 child: Text(
568 - widget.sellerPreserve 568 + widget.sellerPreserve??true
569 ? model.phone 569 ? model.phone
570 : Utils.starPhone('${model.phone}'), 570 : Utils.starPhone('${model.phone}'),
571 overflow: TextOverflow.ellipsis, 571 overflow: TextOverflow.ellipsis,
@@ -769,6 +769,7 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -769,6 +769,7 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
769 children: [ 769 children: [
770 Expanded( 770 Expanded(
771 child: SingleChildScrollView( 771 child: SingleChildScrollView(
  772 + controller: _controller,
772 child: Column( 773 child: Column(
773 children: [ 774 children: [
774 _item('客人所见菜单主题颜色选择', themeColerModel.name, onTap: () { 775 _item('客人所见菜单主题颜色选择', themeColerModel.name, onTap: () {
@@ -794,8 +795,7 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -794,8 +795,7 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
794 ), 795 ),
795 VEmptyView(24), 796 VEmptyView(24),
796 menuModelTemp == null || menuModelTemp.length == 0 797 menuModelTemp == null || menuModelTemp.length == 0
797 - ? Expanded(  
798 - child: Container( 798 + ? Container(
799 color: MyColours.color_ffffff, 799 color: MyColours.color_ffffff,
800 padding: EdgeInsets.symmetric(horizontal: w(20)), 800 padding: EdgeInsets.symmetric(horizontal: w(20)),
801 child: Column( 801 child: Column(
@@ -812,7 +812,7 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> { @@ -812,7 +812,7 @@ class _MenuThemeColorSetPageState extends State<MenuThemeColorSetPage> {
812 ), 812 ),
813 ], 813 ],
814 ), 814 ),
815 - )) 815 + )
816 : 816 :
817 // double cellWidth = (MediaQuery.of(context).size.width - 817 // double cellWidth = (MediaQuery.of(context).size.width -
818 // ScreenUtil().setWidth(40 * 2 + 15 * 2) / 2); 818 // ScreenUtil().setWidth(40 * 2 + 15 * 2) / 2);
@@ -65,6 +65,8 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { @@ -65,6 +65,8 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> {
65 final ItemPositionsListener itemPositionsListener = 65 final ItemPositionsListener itemPositionsListener =
66 ItemPositionsListener.create(); 66 ItemPositionsListener.create();
67 67
  68 + ScrollController controller = ScrollController();
  69 +
68 @override 70 @override
69 void initState() { 71 void initState() {
70 // TODO: implement initState 72 // TODO: implement initState
@@ -235,7 +237,7 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { @@ -235,7 +237,7 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> {
235 /// Generate item number [i]. 237 /// Generate item number [i].
236 Widget item(int i) { 238 Widget item(int i) {
237 return GridView.builder( 239 return GridView.builder(
238 - // controller: _areaController, 240 + controller: controller,
239 // physics: NeverScrollableScrollPhysics(), 241 // physics: NeverScrollableScrollPhysics(),
240 242
241 shrinkWrap: true, 243 shrinkWrap: true,
@@ -760,533 +762,478 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { @@ -760,533 +762,478 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> {
760 ], 762 ],
761 ), 763 ),
762 ), 764 ),
763 - tableManagerModel.tableOuterList.length == 0  
764 - ? Padding(  
765 - padding: EdgeInsets.only(  
766 - left: ScreenUtil().setWidth(100)),  
767 - child: Column(  
768 - crossAxisAlignment:  
769 - CrossAxisAlignment.start,  
770 - children: [  
771 - VEmptyView(180),  
772 - Row(  
773 - children: [  
774 - Text(  
775 - '1、',  
776 - style: TextStyle(  
777 - fontSize:  
778 - ScreenUtil().setSp(32),  
779 - color:  
780 - MyColours.color_BFC4D4),  
781 - ),  
782 - InkWell(  
783 - onTap: () async {  
784 - //添加区域弹框  
785 - await DialogUtil  
786 - .openTableManageCreateAreaDialog(  
787 - context,  
788 - onTap: (value) async {  
789 - print(value);  
790 - //添加区域  
791 - bool success = 765 + if (tableManagerModel.tableOuterList.length == 0)
  766 + Expanded(
  767 + child: Column(
  768 + crossAxisAlignment: CrossAxisAlignment.start,
  769 + children: [
  770 + VEmptyView(40),
  771 + Padding(
  772 + padding: EdgeInsets.only(
  773 + left: ScreenUtil().setWidth(100)),
  774 + child: Column(
  775 + crossAxisAlignment:
  776 + CrossAxisAlignment.start,
  777 + children: [
  778 + Row(
  779 + children: [
  780 + Text(
  781 + '1、',
  782 + style: TextStyle(
  783 + fontSize:
  784 + ScreenUtil().setSp(32),
  785 + color:
  786 + MyColours.color_BFC4D4),
  787 + ),
  788 + InkWell(
  789 + onTap: () async {
  790 + //添加区域弹框
  791 + await DialogUtil
  792 + .openTableManageCreateAreaDialog(
  793 + context,
  794 + onTap: (value) async {
  795 + print(value);
  796 + //添加区域
  797 + bool success =
  798 + await tableManagerModel
  799 + .addTableAreas(
  800 + context, value);
  801 + print(success);
  802 + if (success) {
  803 + Utils.showToast('添加成功!');
  804 + tableManagerModel
  805 + .currentArea = value;
  806 +
  807 + // TableManagerModel
  808 + // tableManagerModel1 =
  809 + // Provider.of<
  810 + // TableManagerModel>(
  811 + // context,
  812 + // listen: false);
  813 + // tableManagerModel1
  814 + // .getTableList(
  815 + // context,
  816 + // needLoading: false,
  817 + // );
  818 +
792 await tableManagerModel 819 await tableManagerModel
793 - .addTableAreas(  
794 - context, value);  
795 - print(success);  
796 - if (success) {  
797 - Utils.showToast('添加成功!');  
798 - tableManagerModel  
799 - .currentArea = value;  
800 -  
801 - // TableManagerModel  
802 - // tableManagerModel1 =  
803 - // Provider.of<  
804 - // TableManagerModel>(  
805 - // context,  
806 - // listen: false);  
807 - // tableManagerModel1  
808 - // .getTableList(  
809 - // context,  
810 - // needLoading: false,  
811 - // );  
812 -  
813 - await tableManagerModel  
814 - .refreshTable(context);  
815 - // await tableManagerModel  
816 - // .getTableList(context,  
817 - // needLoading: false);  
818 - // tableManagerModel.initData();  
819 -  
820 - // setState(() {  
821 - // updateMenu();  
822 - // });  
823 - // _scrollToIndex(widget  
824 - // .tableManagerModel  
825 - // .areas  
826 - // .length);  
827 -  
828 - }  
829 - });  
830 - },  
831 - child: Text('添加区域', 820 + .refreshTable(
  821 + context);
  822 + // await tableManagerModel
  823 + // .getTableList(context,
  824 + // needLoading: false);
  825 + // tableManagerModel.initData();
  826 +
  827 + // setState(() {
  828 + // updateMenu();
  829 + // });
  830 + // _scrollToIndex(widget
  831 + // .tableManagerModel
  832 + // .areas
  833 + // .length);
  834 +
  835 + }
  836 + });
  837 + },
  838 + child: Text('添加区域',
  839 + style: TextStyle(
  840 + fontSize: ScreenUtil()
  841 + .setSp(32),
  842 + color: MyColours
  843 + .color_438E93,
  844 + decoration:
  845 + TextDecoration
  846 + .underline)),
  847 + ),
  848 + Text('(如:一楼、二楼、东厅等)',
832 style: TextStyle( 849 style: TextStyle(
833 fontSize: ScreenUtil() 850 fontSize: ScreenUtil()
834 .setSp(32), 851 .setSp(32),
835 color: MyColours 852 color: MyColours
836 - .color_438E93,  
837 - decoration: TextDecoration  
838 - .underline)),  
839 - ),  
840 - Text('(如:一楼、二楼、东厅等)',  
841 - style: TextStyle(  
842 - fontSize:  
843 - ScreenUtil().setSp(32),  
844 - color:  
845 - MyColours.color_BFC4D4))  
846 - ],  
847 - ),  
848 - VEmptyView(40),  
849 - Text('2、选择要添加桌位的区域',  
850 - style: TextStyle(  
851 - fontSize:  
852 - ScreenUtil().setSp(32),  
853 - color: MyColours.color_BFC4D4)),  
854 - VEmptyView(40),  
855 - Text('3、点击“+”号添加桌位',  
856 - style: TextStyle(  
857 - fontSize:  
858 - ScreenUtil().setSp(32),  
859 - color: MyColours.color_BFC4D4)),  
860 - VEmptyView(120),  
861 - Image.asset(  
862 - "assets/empty_search.png",  
863 - width: ScreenUtil().setWidth(520),  
864 - height: ScreenUtil().setWidth(384),  
865 - ),  
866 - VEmptyView(40),  
867 - ],  
868 - ))  
869 - : SizedBox(),  
870 - tableManagerModel.tableOuterList.length == 0  
871 - ? SizedBox()  
872 - : Expanded(  
873 - // flex: 2,  
874 - child: Container(  
875 - constraints: BoxConstraints(  
876 - minHeight:  
877 - ScreenUtil().setWidth(100)),  
878 - color: MyColours.color_ffffff,  
879 - padding: EdgeInsets.symmetric(  
880 - vertical: ScreenUtil().setWidth(20),  
881 - horizontal:  
882 - ScreenUtil().setWidth(48)),  
883 - child: Column(  
884 - children: [  
885 - VEmptyView(26),  
886 - tableManagerModel.selectNumber !=  
887 - null &&  
888 - tableManagerModel  
889 - .tableOuterList[  
890 - tableManagerModel  
891 - .selectNumber]  
892 - .list  
893 - .length ==  
894 - 0  
895 - ? SizedBox()  
896 - : Row(children: [  
897 - InkWell(  
898 - onTap: () {  
899 - tableManagerModel  
900 - .tableOuterList[  
901 - tableManagerModel  
902 - .selectNumber]  
903 - .isSelect =  
904 - !tableManagerModel  
905 - .tableOuterList[  
906 - tableManagerModel  
907 - .selectNumber]  
908 - .isSelect; 853 + .color_BFC4D4))
  854 + ],
  855 + ),
  856 + VEmptyView(40),
  857 + Text('2、选择要添加桌位的区域',
  858 + style: TextStyle(
  859 + fontSize:
  860 + ScreenUtil().setSp(32),
  861 + color:
  862 + MyColours.color_BFC4D4)),
  863 + VEmptyView(40),
  864 + Text('3、点击“+”号添加桌位',
  865 + style: TextStyle(
  866 + fontSize:
  867 + ScreenUtil().setSp(32),
  868 + color:
  869 + MyColours.color_BFC4D4)),
  870 +
  871 + ],
  872 + )),
  873 + Align(
  874 + alignment: Alignment.center,
  875 + child: Image.asset(
  876 + "assets/empty_search.png",
  877 + width: ScreenUtil().setWidth(520),
  878 + height: ScreenUtil().setWidth(384),
  879 + ),
  880 + ),
  881 + VEmptyView(20),
  882 + ],
  883 + )),
  884 + if (tableManagerModel.tableOuterList.length > 0)
  885 + Expanded(
  886 + // flex: 2,
  887 + child: Container(
  888 + constraints: BoxConstraints(
  889 + minHeight:
  890 + ScreenUtil().setWidth(100)),
  891 + color: MyColours.color_ffffff,
  892 + padding: EdgeInsets.symmetric(
  893 + vertical: ScreenUtil().setWidth(20),
  894 + horizontal:
  895 + ScreenUtil().setWidth(48)),
  896 + child: Column(
  897 + children: [
  898 + VEmptyView(26),
  899 + tableManagerModel.selectNumber !=
  900 + null &&
  901 + tableManagerModel
  902 + .tableOuterList[
  903 + tableManagerModel
  904 + .selectNumber]
  905 + .list
  906 + .length ==
  907 + 0
  908 + ? SizedBox()
  909 + : Row(children: [
  910 + InkWell(
  911 + onTap: () {
  912 + tableManagerModel
  913 + .tableOuterList[
  914 + tableManagerModel
  915 + .selectNumber]
  916 + .isSelect =
  917 + !tableManagerModel
  918 + .tableOuterList[
  919 + tableManagerModel
  920 + .selectNumber]
  921 + .isSelect;
909 922
910 - if (!tableManagerModel 923 + if (!tableManagerModel
  924 + .tableOuterList[
  925 + tableManagerModel
  926 + .selectNumber]
  927 + .isSelect &&
  928 + tableManagerModel
  929 + .tableOuterList[
  930 + tableManagerModel
  931 + .selectNumber]
  932 + .selectTables
  933 + .length >
  934 + 0) {
  935 + for (t.Table item
  936 + in tableManagerModel
911 .tableOuterList[ 937 .tableOuterList[
912 tableManagerModel 938 tableManagerModel
913 .selectNumber] 939 .selectNumber]
914 - .isSelect &&  
915 - tableManagerModel  
916 - .tableOuterList[  
917 - tableManagerModel  
918 - .selectNumber]  
919 - .selectTables  
920 - .length >  
921 - 0) {  
922 - for (t.Table item  
923 - in tableManagerModel 940 + .list) {
  941 + item.selected =
  942 + false;
  943 + }
  944 + tableManagerModel
  945 + .tableOuterList[
  946 + tableManagerModel
  947 + .selectNumber]
  948 + .selectTables = [];
  949 + }
  950 + setState(() {});
  951 + },
  952 + child: Row(
  953 + children: [
  954 + Image.asset(
  955 + Utils.getImgPath(tableManagerModel
924 .tableOuterList[ 956 .tableOuterList[
925 tableManagerModel 957 tableManagerModel
926 .selectNumber] 958 .selectNumber]
927 - .list) {  
928 - item.selected =  
929 - false;  
930 - } 959 + .isSelect
  960 + ? 'base_radio_sel'
  961 + : 'base_radio_un'),
  962 + width: ScreenUtil()
  963 + .setWidth(40),
  964 + ),
  965 + HEmptyView(10),
  966 + Text(
  967 + '批量选择桌位',
  968 + style: TextStyle(
  969 + fontSize:
  970 + ScreenUtil()
  971 + .setSp(
  972 + 32),
  973 + color: MyColours
  974 + .color_000000),
  975 + ),
  976 + ],
  977 + )),
  978 + Spacer(),
  979 + tableManagerModel
  980 + .tableOuterList
  981 + .length >
  982 + 0 &&
  983 + tableManagerModel
  984 + .tableOuterList[
  985 + tableManagerModel
  986 + .selectNumber]
  987 + .isSelect
  988 + ? InkWell(
  989 + onTap: () {
931 tableManagerModel 990 tableManagerModel
932 .tableOuterList[ 991 .tableOuterList[
933 tableManagerModel 992 tableManagerModel
934 .selectNumber] 993 .selectNumber]
935 .selectTables = []; 994 .selectTables = [];
936 - }  
937 - setState(() {});  
938 - },  
939 - child: Row(  
940 - children: [  
941 - Image.asset(  
942 - Utils.getImgPath(tableManagerModel  
943 - .tableOuterList[  
944 - tableManagerModel  
945 - .selectNumber]  
946 - .isSelect  
947 - ? 'base_radio_sel'  
948 - : 'base_radio_un'),  
949 - width:  
950 - ScreenUtil()  
951 - .setWidth(  
952 - 40),  
953 - ),  
954 - HEmptyView(10),  
955 - Text(  
956 - '批量选择桌位',  
957 - style: TextStyle(  
958 - fontSize:  
959 - ScreenUtil()  
960 - .setSp(  
961 - 32),  
962 - color: MyColours  
963 - .color_000000),  
964 - ),  
965 - ],  
966 - )),  
967 - Spacer(),  
968 - tableManagerModel  
969 - .tableOuterList  
970 - .length >  
971 - 0 &&  
972 tableManagerModel 995 tableManagerModel
  996 + .tableOuterList[
  997 + tableManagerModel
  998 + .selectNumber]
  999 + .isAll =
  1000 + !tableManagerModel
  1001 + .tableOuterList[
  1002 + tableManagerModel
  1003 + .selectNumber]
  1004 + .isAll;
  1005 + if (tableManagerModel
973 .tableOuterList[ 1006 .tableOuterList[
974 tableManagerModel 1007 tableManagerModel
975 .selectNumber] 1008 .selectNumber]
976 - .isSelect  
977 - ? InkWell(  
978 - onTap: () {  
979 - tableManagerModel  
980 - .tableOuterList[  
981 - tableManagerModel  
982 - .selectNumber]  
983 - .selectTables = [];  
984 - tableManagerModel 1009 + .isAll) {
  1010 + for (t.Table item
  1011 + in tableManagerModel
985 .tableOuterList[ 1012 .tableOuterList[
986 tableManagerModel 1013 tableManagerModel
987 .selectNumber] 1014 .selectNumber]
988 - .isAll =  
989 - !tableManagerModel  
990 - .tableOuterList[  
991 - tableManagerModel  
992 - .selectNumber]  
993 - .isAll;  
994 - if (tableManagerModel  
995 - .tableOuterList[  
996 - tableManagerModel  
997 - .selectNumber]  
998 - .isAll) {  
999 - for (t.Table item  
1000 - in tableManagerModel  
1001 - .tableOuterList[  
1002 - tableManagerModel.selectNumber]  
1003 - .list) {  
1004 - item.selected =  
1005 - true;  
1006 - tableManagerModel 1015 + .list) {
  1016 + item.selected =
  1017 + true;
  1018 + tableManagerModel
  1019 + .tableOuterList[
  1020 + tableManagerModel
  1021 + .selectNumber]
  1022 + .selectTables
  1023 + .add(item);
  1024 + }
  1025 + } else {
  1026 + for (t.Table item
  1027 + in tableManagerModel
1007 .tableOuterList[ 1028 .tableOuterList[
1008 tableManagerModel 1029 tableManagerModel
1009 .selectNumber] 1030 .selectNumber]
1010 - .selectTables  
1011 - .add(  
1012 - item);  
1013 - }  
1014 - } else {  
1015 - for (t.Table item  
1016 - in tableManagerModel  
1017 - .tableOuterList[  
1018 - tableManagerModel.selectNumber]  
1019 - .list) {  
1020 - item.selected =  
1021 - false;  
1022 - } 1031 + .list) {
  1032 + item.selected =
  1033 + false;
1023 } 1034 }
1024 - setState(() {});  
1025 - },  
1026 - child: Row(  
1027 - crossAxisAlignment:  
1028 - CrossAxisAlignment  
1029 - .center, 1035 + }
  1036 + setState(() {});
  1037 + },
  1038 + child: Row(
  1039 + crossAxisAlignment:
  1040 + CrossAxisAlignment
  1041 + .center,
  1042 + children: [
  1043 + Image.asset(
  1044 + Utils.getImgPath(tableManagerModel
  1045 + .tableOuterList[tableManagerModel
  1046 + .selectNumber]
  1047 + .isAll
  1048 + ? 'mine_radio_sel'
  1049 + : 'mine_radio_nor'),
  1050 + width: ScreenUtil()
  1051 + .setWidth(
  1052 + 34)),
  1053 + Text(
  1054 + '全选',
  1055 + style: TextStyle(
  1056 + color: MyColours
  1057 + .color_515151,
  1058 + fontSize: ScreenUtil()
  1059 + .setSp(
  1060 + 32)),
  1061 + )
  1062 + ],
  1063 + ))
  1064 + : SizedBox()
  1065 + ]),
  1066 + tableManagerModel
  1067 + .tableOuterList[
  1068 + tableManagerModel
  1069 + .selectNumber]
  1070 + .list
  1071 + .length ==
  1072 + 0
  1073 + ? VEmptyView(20)
  1074 + : VEmptyView(60),
  1075 + Expanded(
  1076 + child: Column(
  1077 + children: [
  1078 + // Expanded(
  1079 + // child:
  1080 + item(tableManagerModel
  1081 + .selectNumber),
  1082 + if (tableManagerModel
  1083 + .tableOuterList[
  1084 + tableManagerModel
  1085 + .selectNumber]
  1086 + .list
  1087 + .length ==
  1088 + 0)
  1089 + Expanded(
  1090 + child: Padding(
  1091 + padding: EdgeInsets.only(
  1092 + left: ScreenUtil()
  1093 + .setWidth(50)),
  1094 + child: Column(
  1095 + crossAxisAlignment:
  1096 + CrossAxisAlignment
  1097 + .start,
  1098 + children: [
  1099 + VEmptyView(60),
  1100 + Row(
1030 children: [ 1101 children: [
1031 - Image.asset(  
1032 - Utils.getImgPath(tableManagerModel  
1033 - .tableOuterList[tableManagerModel  
1034 - .selectNumber]  
1035 - .isAll  
1036 - ? 'mine_radio_sel'  
1037 - : 'mine_radio_nor'),  
1038 - width: ScreenUtil()  
1039 - .setWidth(  
1040 - 34)),  
1041 Text( 1102 Text(
1042 - '全选',  
1043 - style: TextStyle(  
1044 - color: MyColours  
1045 - .color_515151,  
1046 - fontSize:  
1047 - ScreenUtil()  
1048 - .setSp(32)),  
1049 - ) 1103 + '1、添加区域(如:一楼、二楼、东厅等)',
  1104 + style: TextStyle(
  1105 + decoration:
  1106 + TextDecoration
  1107 + .lineThrough,
  1108 + fontSize:
  1109 + ScreenUtil().setSp(
  1110 + 32),
  1111 + color: MyColours
  1112 + .color_BFC4D4))
1050 ], 1113 ],
1051 - ))  
1052 - : SizedBox()  
1053 - ]),  
1054 - tableManagerModel  
1055 - .tableOuterList[  
1056 - tableManagerModel  
1057 - .selectNumber]  
1058 - .list  
1059 - .length ==  
1060 - 0  
1061 - ? VEmptyView(20)  
1062 - : VEmptyView(60),  
1063 - Expanded(  
1064 - child: item(tableManagerModel  
1065 - .selectNumber)),  
1066 - tableManagerModel  
1067 - .tableOuterList[  
1068 - tableManagerModel  
1069 - .selectNumber]  
1070 - .list  
1071 - .length ==  
1072 - 0  
1073 - ? Padding(  
1074 - padding: EdgeInsets.only(  
1075 - left: ScreenUtil()  
1076 - .setWidth(50)),  
1077 - child: Column(  
1078 - crossAxisAlignment:  
1079 - CrossAxisAlignment  
1080 - .start,  
1081 - children: [  
1082 - VEmptyView(60),  
1083 - Row(  
1084 - children: [  
1085 - Text(  
1086 - '1、添加区域(如:一楼、二楼、东厅等)', 1114 + ),
  1115 + VEmptyView(40),
  1116 + Text('2、选择要添加桌位的区域',
1087 style: TextStyle( 1117 style: TextStyle(
1088 - decoration:  
1089 - TextDecoration  
1090 - .lineThrough,  
1091 fontSize: ScreenUtil() 1118 fontSize: ScreenUtil()
1092 .setSp( 1119 .setSp(
1093 32), 1120 32),
1094 color: MyColours 1121 color: MyColours
1095 - .color_BFC4D4))  
1096 - ],  
1097 - ),  
1098 - VEmptyView(40),  
1099 - Text('2、选择要添加桌位的区域',  
1100 - style: TextStyle(  
1101 - fontSize:  
1102 - ScreenUtil()  
1103 - .setSp(  
1104 - 32),  
1105 - color: MyColours  
1106 - .color_BFC4D4)),  
1107 - VEmptyView(40),  
1108 - Text('3、点击“+”号添加桌位',  
1109 - style: TextStyle(  
1110 - fontSize:  
1111 - ScreenUtil() 1122 + .color_BFC4D4)),
  1123 + VEmptyView(40),
  1124 + Text('3、点击“+”号添加桌位',
  1125 + style: TextStyle(
  1126 + fontSize: ScreenUtil()
1112 .setSp( 1127 .setSp(
1113 32), 1128 32),
1114 - color: MyColours  
1115 - .color_BFC4D4)),  
1116 - VEmptyView(120),  
1117 - Image.asset(  
1118 - "assets/empty_search.png",  
1119 - width: ScreenUtil()  
1120 - .setWidth(520),  
1121 - height: ScreenUtil()  
1122 - .setWidth(384),  
1123 - ),  
1124 - VEmptyView(40),  
1125 - ],  
1126 - ))  
1127 - : SizedBox(),  
1128 - ],  
1129 - ))), 1129 + color: MyColours
  1130 + .color_BFC4D4)),
  1131 + VEmptyView(40),
  1132 + Align(
  1133 + alignment:
  1134 + Alignment
  1135 + .center,
  1136 + child:
  1137 + Image.asset(
  1138 + "assets/empty_search.png",
  1139 + width: ScreenUtil()
  1140 + .setWidth(
  1141 + 520),
  1142 + height: ScreenUtil()
  1143 + .setWidth(
  1144 + 384),
  1145 + )),
  1146 + // Spacer(),
  1147 + ],
  1148 + ))),
  1149 + ],
  1150 + ))
  1151 + ],
  1152 + ))),
1130 ])), 1153 ])),
1131 - tableManagerModel.tableOuterList.length == 0  
1132 - ? SizedBox()  
1133 - : model.pageState == PageState.Success &&  
1134 - tableManagerModel  
1135 - .tableOuterList[tableManagerModel.selectNumber]  
1136 - .isSelect  
1137 - ? Padding(  
1138 - padding: EdgeInsets.symmetric(  
1139 - horizontal: ScreenUtil().setWidth(48)),  
1140 - child: Column(  
1141 - children: [  
1142 - Row(  
1143 - mainAxisAlignment:  
1144 - MainAxisAlignment.spaceBetween,  
1145 - children: [  
1146 - CommonButton(  
1147 - content: "修改名称",  
1148 - width: 200,  
1149 - height: 72,  
1150 - fontSize: 32,  
1151 - onPress: () async {  
1152 - if (tableManagerModel  
1153 - .tableOuterList[  
1154 - tableManagerModel  
1155 - .selectNumber]  
1156 - .selectTables  
1157 - .length ==  
1158 - 0) {  
1159 - Utils.showToast('请选择桌位');  
1160 - return;  
1161 - } 1154 + if (tableManagerModel.tableOuterList.length > 0)
  1155 + model.pageState == PageState.Success &&
  1156 + tableManagerModel
  1157 + .tableOuterList[tableManagerModel.selectNumber]
  1158 + .isSelect
  1159 + ? Padding(
  1160 + padding: EdgeInsets.symmetric(
  1161 + horizontal: ScreenUtil().setWidth(48)),
  1162 + child: Column(
  1163 + children: [
  1164 + Row(
  1165 + mainAxisAlignment:
  1166 + MainAxisAlignment.spaceBetween,
  1167 + children: [
  1168 + CommonButton(
  1169 + content: "修改名称",
  1170 + width: 200,
  1171 + height: 72,
  1172 + fontSize: 32,
  1173 + onPress: () async {
  1174 + if (tableManagerModel
  1175 + .tableOuterList[
  1176 + tableManagerModel
  1177 + .selectNumber]
  1178 + .selectTables
  1179 + .length ==
  1180 + 0) {
  1181 + Utils.showToast('请选择桌位');
  1182 + return;
  1183 + }
1162 1184
1163 - DialogUtil  
1164 - .openMyTableManageModifyTableNameDialog(  
1165 - context,  
1166 - onTap: (Map<String, String>  
1167 - value) async {  
1168 - String tids = '';  
1169 - for (t.Table item  
1170 - in tableManagerModel  
1171 - .tableOuterList[  
1172 - tableManagerModel  
1173 - .selectNumber]  
1174 - .selectTables) {  
1175 - tids += '${item.id},';  
1176 - }  
1177 - if (tids.endsWith(',')) {  
1178 - tids = tids.substring(  
1179 - 0, tids.length - 1);  
1180 - }  
1181 - Map<String, String> params = {  
1182 - 'name': value['name'],  
1183 - 'tableids': tids,  
1184 - 'skip_four': value['skip_four'],  
1185 - 'skip_seven':  
1186 - value['skip_seven'],  
1187 - };  
1188 -  
1189 - bool success =  
1190 - await tableManagerModel  
1191 - .batchSetTable(  
1192 - context, params);  
1193 - print(success);  
1194 - if (success) {  
1195 - Utils.showToast('修改成功!');  
1196 - // TableManagerModel  
1197 - // tableManagerModel1 =  
1198 - // Provider.of<  
1199 - // TableManagerModel>(  
1200 - // context,  
1201 - // listen: false);  
1202 - // tableManagerModel1  
1203 - // .getTableList(  
1204 - // context,  
1205 - // needLoading: false,  
1206 - // ); 1185 + DialogUtil
  1186 + .openMyTableManageModifyTableNameDialog(
  1187 + context,
  1188 + onTap: (Map<String, String>
  1189 + value) async {
  1190 + String tids = '';
  1191 + for (t.Table item
  1192 + in tableManagerModel
  1193 + .tableOuterList[
  1194 + tableManagerModel
  1195 + .selectNumber]
  1196 + .selectTables) {
  1197 + tids += '${item.id},';
  1198 + }
  1199 + if (tids.endsWith(',')) {
  1200 + tids = tids.substring(
  1201 + 0, tids.length - 1);
  1202 + }
  1203 + Map<String, String> params = {
  1204 + 'name': value['name'],
  1205 + 'tableids': tids,
  1206 + 'skip_four': value['skip_four'],
  1207 + 'skip_seven': value['skip_seven'],
  1208 + };
1207 1209
  1210 + bool success =
1208 await tableManagerModel 1211 await tableManagerModel
1209 - .refreshTable(context);  
1210 - }  
1211 - },  
1212 - );  
1213 - }),  
1214 - CommonButton(  
1215 - content: "修改人数",  
1216 - width: 200,  
1217 - height: 72,  
1218 - fontSize: 32,  
1219 - onPress: () async {  
1220 - if (tableManagerModel  
1221 - .tableOuterList[  
1222 - tableManagerModel  
1223 - .selectNumber]  
1224 - .selectTables  
1225 - .length ==  
1226 - 0) {  
1227 - Utils.showToast('请选择桌位');  
1228 - return;  
1229 - }  
1230 - await DialogUtil  
1231 - .openMyTableManageModifyTableNumDialog(  
1232 - context,  
1233 - personNumList,  
1234 - pnumMin: '',  
1235 - pnumMax: '',  
1236 - onTap: (Map<String, String>  
1237 - value) async {  
1238 - String tids = '';  
1239 - for (t.Table item  
1240 - in tableManagerModel  
1241 - .tableOuterList[  
1242 - tableManagerModel  
1243 - .selectNumber]  
1244 - .selectTables) {  
1245 - tids += '${item.id},';  
1246 - }  
1247 - if (tids.endsWith(',')) {  
1248 - tids = tids.substring(  
1249 - 0, tids.length - 1);  
1250 - }  
1251 - Map<String, String> params = {  
1252 - 'tableids': tids,  
1253 - };  
1254 - if (value['pnumMin'] != '') {  
1255 - params['table_pnum'] =  
1256 - value['pnumMin'];  
1257 - }  
1258 - if (value['pnumMax'] != '') {  
1259 - params['most_pnum'] =  
1260 - value['pnumMax'];  
1261 - }  
1262 -  
1263 - bool success =  
1264 - await tableManagerModel  
1265 - .batchSetTable(  
1266 - context, params);  
1267 - print(success);  
1268 - if (success) {  
1269 - Utils.showToast('修改成功!');  
1270 - // TableManagerModel  
1271 - // tableManagerModel =  
1272 - // Provider.of<  
1273 - // TableManagerModel>(  
1274 - // context,  
1275 - // listen: false);  
1276 - // tableManagerModel  
1277 - // .getTableList(  
1278 - // context,  
1279 - // needLoading: false,  
1280 - // ); 1212 + .batchSetTable(
  1213 + context, params);
  1214 + print(success);
  1215 + if (success) {
  1216 + Utils.showToast('修改成功!');
  1217 + // TableManagerModel
  1218 + // tableManagerModel1 =
  1219 + // Provider.of<
  1220 + // TableManagerModel>(
  1221 + // context,
  1222 + // listen: false);
  1223 + // tableManagerModel1
  1224 + // .getTableList(
  1225 + // context,
  1226 + // needLoading: false,
  1227 + // );
1281 1228
1282 - await tableManagerModel  
1283 - .refreshTable(context);  
1284 - }  
1285 - },  
1286 - );  
1287 - }),  
1288 - CommonButton(  
1289 - content: "修改类型", 1229 + await tableManagerModel
  1230 + .refreshTable(context);
  1231 + }
  1232 + },
  1233 + );
  1234 + }),
  1235 + CommonButton(
  1236 + content: "修改人数",
1290 width: 200, 1237 width: 200,
1291 height: 72, 1238 height: 72,
1292 fontSize: 32, 1239 fontSize: 32,
@@ -1301,22 +1248,14 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { @@ -1301,22 +1248,14 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> {
1301 Utils.showToast('请选择桌位'); 1248 Utils.showToast('请选择桌位');
1302 return; 1249 return;
1303 } 1250 }
1304 - List<String> tableTypeS = [];  
1305 - for (int i = 0;  
1306 - i <  
1307 - tableManagerModel  
1308 - .tableTypeList.length;  
1309 - i++) {  
1310 - tableTypeS.add(tableManagerModel  
1311 - .tableTypeList[i].name);  
1312 - }  
1313 - DialogUtil  
1314 - .openMyTableManageModifyTableTypeDialog( 1251 + await DialogUtil
  1252 + .openMyTableManageModifyTableNumDialog(
1315 context, 1253 context,
1316 - tableTypeS, 1254 + personNumList,
  1255 + pnumMin: '',
  1256 + pnumMax: '',
1317 onTap: (Map<String, String> 1257 onTap: (Map<String, String>
1318 value) async { 1258 value) async {
1319 - String tid;  
1320 String tids = ''; 1259 String tids = '';
1321 for (t.Table item 1260 for (t.Table item
1322 in tableManagerModel 1261 in tableManagerModel
@@ -1330,22 +1269,17 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { @@ -1330,22 +1269,17 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> {
1330 tids = tids.substring( 1269 tids = tids.substring(
1331 0, tids.length - 1); 1270 0, tids.length - 1);
1332 } 1271 }
1333 - for (int i = 0;  
1334 - i <  
1335 - tableManagerModel  
1336 - .tableTypeList.length;  
1337 - i++) {  
1338 - if (value['bjtype'] ==  
1339 - tableManagerModel  
1340 - .tableTypeList[i].name) {  
1341 - tid = tableManagerModel  
1342 - .tableTypeList[i].id;  
1343 - }  
1344 - }  
1345 Map<String, String> params = { 1272 Map<String, String> params = {
1346 'tableids': tids, 1273 'tableids': tids,
1347 - 'tid': tid  
1348 }; 1274 };
  1275 + if (value['pnumMin'] != '') {
  1276 + params['table_pnum'] =
  1277 + value['pnumMin'];
  1278 + }
  1279 + if (value['pnumMax'] != '') {
  1280 + params['most_pnum'] =
  1281 + value['pnumMax'];
  1282 + }
1349 1283
1350 bool success = 1284 bool success =
1351 await tableManagerModel 1285 await tableManagerModel
@@ -1371,100 +1305,182 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> { @@ -1371,100 +1305,182 @@ class MyTableManagerHomePageState extends State<MyTableManagerHomePage> {
1371 } 1305 }
1372 }, 1306 },
1373 ); 1307 );
1374 - },  
1375 - ),  
1376 - ],  
1377 - ),  
1378 - VEmptyView(44),  
1379 - CommonButton(  
1380 - content: "删除桌位",  
1381 - width: 200,  
1382 - height: 72,  
1383 - fontSize: 32,  
1384 - state: -3,  
1385 - onPress: () async {  
1386 - if (tableManagerModel  
1387 - .tableOuterList[  
1388 - tableManagerModel.selectNumber]  
1389 - .selectTables  
1390 - .length ==  
1391 - 0) {  
1392 - Utils.showToast('请选择桌位');  
1393 - return;  
1394 - }  
1395 - String tids = '';  
1396 - for (t.Table item in tableManagerModel  
1397 - .tableOuterList[  
1398 - tableManagerModel.selectNumber]  
1399 - .selectTables) {  
1400 - tids += '${item.id},';  
1401 - }  
1402 - if (tids.endsWith(',')) {  
1403 - tids = tids.substring(0, tids.length - 1);  
1404 - }  
1405 -  
1406 - DialogUtil.cupertinoAlertDialog(context,  
1407 - title: "",  
1408 - content:  
1409 - "是否确定删除${tids.split(',').length}个桌位",  
1410 - lTitle: "取消",  
1411 - rTitle: "确认删除",  
1412 - isBold: true,  
1413 - isBoldContent: true,  
1414 - rColor: MyColours.color_E34D59,  
1415 - lCallback: () {  
1416 - print("取消");  
1417 - }, rCallback: () async {  
1418 - print("确定");  
1419 -  
1420 - Map<String, String> params = {  
1421 - 'sid': Provider.of<UserModel>(context,  
1422 - listen: false)  
1423 - .user  
1424 - .sellerid,  
1425 - 'tid': tids  
1426 - };  
1427 -  
1428 - bool success = await tableManagerModel  
1429 - .delSellerTables(context, params);  
1430 - print(success);  
1431 - if (success) {  
1432 - Utils.showToast('删除成功!');  
1433 - // TableOuter tableOuter = TableOuter();  
1434 - // tableOuter.name = value;  
1435 - // tableOuter.list = [];  
1436 - // tableManagerModel.tableOuterList.add(tableOuter);  
1437 - // tableManagerModel.initData();  
1438 - // Timer(  
1439 - // Duration(milliseconds: 500),  
1440 - // () => _areaController.jumpTo(  
1441 - // _areaController.position.maxScrollExtent));  
1442 -  
1443 - // await tableManagerModel  
1444 - // .getTableList(context);  
1445 - // await tableManagerModel  
1446 - // .initData();  
1447 -  
1448 - // TableManagerModel  
1449 - // tableManagerModel =  
1450 - // Provider.of<TableManagerModel>(  
1451 - // context,  
1452 - // listen: false);  
1453 - // tableManagerModel.getTableList(  
1454 - // context,  
1455 - // needLoading: false,  
1456 - // );  
1457 -  
1458 - await tableManagerModel  
1459 - .refreshTable(context); 1308 + }),
  1309 + CommonButton(
  1310 + content: "修改类型",
  1311 + width: 200,
  1312 + height: 72,
  1313 + fontSize: 32,
  1314 + onPress: () async {
  1315 + if (tableManagerModel
  1316 + .tableOuterList[tableManagerModel
  1317 + .selectNumber]
  1318 + .selectTables
  1319 + .length ==
  1320 + 0) {
  1321 + Utils.showToast('请选择桌位');
  1322 + return;
  1323 + }
  1324 + List<String> tableTypeS = [];
  1325 + for (int i = 0;
  1326 + i <
  1327 + tableManagerModel
  1328 + .tableTypeList.length;
  1329 + i++) {
  1330 + tableTypeS.add(tableManagerModel
  1331 + .tableTypeList[i].name);
1460 } 1332 }
1461 - });  
1462 - },  
1463 - ),  
1464 - VEmptyView(32),  
1465 - ],  
1466 - ))  
1467 - : SizedBox() 1333 + DialogUtil
  1334 + .openMyTableManageModifyTableTypeDialog(
  1335 + context,
  1336 + tableTypeS,
  1337 + onTap:
  1338 + (Map<String, String> value) async {
  1339 + String tid;
  1340 + String tids = '';
  1341 + for (t.Table item in tableManagerModel
  1342 + .tableOuterList[tableManagerModel
  1343 + .selectNumber]
  1344 + .selectTables) {
  1345 + tids += '${item.id},';
  1346 + }
  1347 + if (tids.endsWith(',')) {
  1348 + tids = tids.substring(
  1349 + 0, tids.length - 1);
  1350 + }
  1351 + for (int i = 0;
  1352 + i <
  1353 + tableManagerModel
  1354 + .tableTypeList.length;
  1355 + i++) {
  1356 + if (value['bjtype'] ==
  1357 + tableManagerModel
  1358 + .tableTypeList[i].name) {
  1359 + tid = tableManagerModel
  1360 + .tableTypeList[i].id;
  1361 + }
  1362 + }
  1363 + Map<String, String> params = {
  1364 + 'tableids': tids,
  1365 + 'tid': tid
  1366 + };
  1367 +
  1368 + bool success = await tableManagerModel
  1369 + .batchSetTable(context, params);
  1370 + print(success);
  1371 + if (success) {
  1372 + Utils.showToast('修改成功!');
  1373 + // TableManagerModel
  1374 + // tableManagerModel =
  1375 + // Provider.of<
  1376 + // TableManagerModel>(
  1377 + // context,
  1378 + // listen: false);
  1379 + // tableManagerModel
  1380 + // .getTableList(
  1381 + // context,
  1382 + // needLoading: false,
  1383 + // );
  1384 +
  1385 + await tableManagerModel
  1386 + .refreshTable(context);
  1387 + }
  1388 + },
  1389 + );
  1390 + },
  1391 + ),
  1392 + ],
  1393 + ),
  1394 + VEmptyView(44),
  1395 + CommonButton(
  1396 + content: "删除桌位",
  1397 + width: 200,
  1398 + height: 72,
  1399 + fontSize: 32,
  1400 + state: -3,
  1401 + onPress: () async {
  1402 + if (tableManagerModel
  1403 + .tableOuterList[
  1404 + tableManagerModel.selectNumber]
  1405 + .selectTables
  1406 + .length ==
  1407 + 0) {
  1408 + Utils.showToast('请选择桌位');
  1409 + return;
  1410 + }
  1411 + String tids = '';
  1412 + for (t.Table item in tableManagerModel
  1413 + .tableOuterList[
  1414 + tableManagerModel.selectNumber]
  1415 + .selectTables) {
  1416 + tids += '${item.id},';
  1417 + }
  1418 + if (tids.endsWith(',')) {
  1419 + tids = tids.substring(0, tids.length - 1);
  1420 + }
  1421 +
  1422 + DialogUtil.cupertinoAlertDialog(context,
  1423 + title: "",
  1424 + content:
  1425 + "是否确定删除${tids.split(',').length}个桌位",
  1426 + lTitle: "取消",
  1427 + rTitle: "确认删除",
  1428 + isBold: true,
  1429 + isBoldContent: true,
  1430 + rColor: MyColours.color_E34D59,
  1431 + lCallback: () {
  1432 + print("取消");
  1433 + }, rCallback: () async {
  1434 + print("确定");
  1435 +
  1436 + Map<String, String> params = {
  1437 + 'sid': Provider.of<UserModel>(context,
  1438 + listen: false)
  1439 + .user
  1440 + .sellerid,
  1441 + 'tid': tids
  1442 + };
  1443 +
  1444 + bool success = await tableManagerModel
  1445 + .delSellerTables(context, params);
  1446 + print(success);
  1447 + if (success) {
  1448 + Utils.showToast('删除成功!');
  1449 + // TableOuter tableOuter = TableOuter();
  1450 + // tableOuter.name = value;
  1451 + // tableOuter.list = [];
  1452 + // tableManagerModel.tableOuterList.add(tableOuter);
  1453 + // tableManagerModel.initData();
  1454 + // Timer(
  1455 + // Duration(milliseconds: 500),
  1456 + // () => _areaController.jumpTo(
  1457 + // _areaController.position.maxScrollExtent));
  1458 +
  1459 + // await tableManagerModel
  1460 + // .getTableList(context);
  1461 + // await tableManagerModel
  1462 + // .initData();
  1463 +
  1464 + // TableManagerModel
  1465 + // tableManagerModel =
  1466 + // Provider.of<TableManagerModel>(
  1467 + // context,
  1468 + // listen: false);
  1469 + // tableManagerModel.getTableList(
  1470 + // context,
  1471 + // needLoading: false,
  1472 + // );
  1473 +
  1474 + await tableManagerModel
  1475 + .refreshTable(context);
  1476 + }
  1477 + });
  1478 + },
  1479 + ),
  1480 + VEmptyView(32),
  1481 + ],
  1482 + ))
  1483 + : SizedBox()
1468 ], 1484 ],
1469 ); 1485 );
1470 }, 1486 },
@@ -8632,7 +8632,9 @@ class DialogUtil { @@ -8632,7 +8632,9 @@ class DialogUtil {
8632 color: MyColours.color_E6000000)), 8632 color: MyColours.color_E6000000)),
8633 onPressed: () { 8633 onPressed: () {
8634 Navigator.of(context).pop(); 8634 Navigator.of(context).pop();
8635 - lCallback(); 8635 + if (lCallback != null) {
  8636 + lCallback();
  8637 + }
8636 }, 8638 },
8637 ), 8639 ),
8638 CupertinoDialogAction( 8640 CupertinoDialogAction(