Showing
5 changed files
with
91 additions
and
45 deletions
| @@ -12,14 +12,14 @@ if (flutterRoot == null) { | @@ -12,14 +12,14 @@ if (flutterRoot == null) { | ||
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | 14 | ||
| 15 | -def flutterVersionCode = "320" | 15 | +def flutterVersionCode = "321" |
| 16 | if (flutterVersionCode == null) { | 16 | if (flutterVersionCode == null) { |
| 17 | - flutterVersionCode = '320' | 17 | + flutterVersionCode = '321' |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | -def flutterVersionName = "3.2.0" | 20 | +def flutterVersionName = "3.2.1" |
| 21 | if (flutterVersionName == null) { | 21 | if (flutterVersionName == null) { |
| 22 | - flutterVersionName = '3.2.0' | 22 | + flutterVersionName = '3.2.1' |
| 23 | } | 23 | } |
| 24 | apply plugin: 'com.android.application' | 24 | apply plugin: 'com.android.application' |
| 25 | apply plugin: 'kotlin-android' | 25 | apply plugin: 'kotlin-android' |
| @@ -304,7 +304,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -304,7 +304,7 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 304 | // )) | 304 | // )) |
| 305 | // ], | 305 | // ], |
| 306 | // ), | 306 | // ), |
| 307 | - VEmptyView(40), | 307 | + // VEmptyView(40), |
| 308 | MyItem( | 308 | MyItem( |
| 309 | title: "线上券创建", | 309 | title: "线上券创建", |
| 310 | content: '', | 310 | content: '', |
| @@ -318,25 +318,25 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | @@ -318,25 +318,25 @@ class MyPageState extends State<MyPage> with WidgetsBindingObserver { | ||
| 318 | ScreenUtil().setHeight(1), | 318 | ScreenUtil().setHeight(1), |
| 319 | color: MyColours.color_f3f3f3, | 319 | color: MyColours.color_f3f3f3, |
| 320 | ), | 320 | ), |
| 321 | - userModel.user.role_name == '管理员' || | ||
| 322 | - userModel.user.role_name == '店长' | ||
| 323 | - ? MyItem( | ||
| 324 | - title: "全店客情", | ||
| 325 | - content: "", | ||
| 326 | - callback: () { | ||
| 327 | - // Utils.goMiniProgramZm(context, "roomtype/roomtype"); | ||
| 328 | - NavigatorUtil.goStoreCustomerPage(context); | ||
| 329 | - }, | ||
| 330 | - ) | ||
| 331 | - : SizedBox(), | ||
| 332 | - MyItem( | ||
| 333 | - title: "我的客情", | ||
| 334 | - content: "", | ||
| 335 | - callback: () { | ||
| 336 | - // Utils.goMiniProgramZm(context, "roomtype/roomtype"); | ||
| 337 | - NavigatorUtil.goMyCustomerPage(context); | ||
| 338 | - }, | ||
| 339 | - ), | 321 | + // userModel.user.role_name == '管理员' || |
| 322 | + // userModel.user.role_name == '店长' | ||
| 323 | + // ? MyItem( | ||
| 324 | + // title: "全店客情", | ||
| 325 | + // content: "", | ||
| 326 | + // callback: () { | ||
| 327 | + // // Utils.goMiniProgramZm(context, "roomtype/roomtype"); | ||
| 328 | + // NavigatorUtil.goStoreCustomerPage(context); | ||
| 329 | + // }, | ||
| 330 | + // ) | ||
| 331 | + // : SizedBox(), | ||
| 332 | + // MyItem( | ||
| 333 | + // title: "我的客情", | ||
| 334 | + // content: "", | ||
| 335 | + // callback: () { | ||
| 336 | + // // Utils.goMiniProgramZm(context, "roomtype/roomtype"); | ||
| 337 | + // NavigatorUtil.goMyCustomerPage(context); | ||
| 338 | + // }, | ||
| 339 | + // ), | ||
| 340 | 340 | ||
| 341 | VEmptyView(40), | 341 | VEmptyView(40), |
| 342 | MyItem( | 342 | MyItem( |
| @@ -330,16 +330,49 @@ class PhotoManagerPageState extends State<PhotoManagerPage> { | @@ -330,16 +330,49 @@ class PhotoManagerPageState extends State<PhotoManagerPage> { | ||
| 330 | _chooseTableModel.areaTableMapShow = areaTableMap; | 330 | _chooseTableModel.areaTableMapShow = areaTableMap; |
| 331 | _chooseTableModel.tablesShow = _chooseTableModel.tablesAll; | 331 | _chooseTableModel.tablesShow = _chooseTableModel.tablesAll; |
| 332 | // } | 332 | // } |
| 333 | - if (widget.tid == '') { | 333 | + |
| 334 | + if (areaTableMap.isNotEmpty) { | ||
| 334 | if (!needRetain) { | 335 | if (!needRetain) { |
| 335 | - // currentArea = areaTableMap.keys.first; | ||
| 336 | currentArea = '全部'; | 336 | currentArea = '全部'; |
| 337 | _chooseTableModel.currentTables = _chooseTableModel.tablesAll; | 337 | _chooseTableModel.currentTables = _chooseTableModel.tablesAll; |
| 338 | + } else { | ||
| 339 | + if (currentArea != null && currentArea != '') { | ||
| 340 | + // tablesShow = areaTableMapShow[currentArea]; | ||
| 341 | + List keys = areaTableMap.keys.toList(); | ||
| 342 | + _selectNumber = keys.indexOf(currentArea); | ||
| 343 | + } | ||
| 338 | } | 344 | } |
| 339 | - if (areas.length == 1) { | ||
| 340 | - currentArea = areaTableMap.keys.first; | ||
| 341 | - } | 345 | + } else { |
| 346 | + // if (currentArea != null && currentArea != '') { | ||
| 347 | + // tablesShow = areaTableMap[currentArea]; | ||
| 348 | + // _selectNumber = areaTableMap.length; | ||
| 349 | + // } | ||
| 350 | + // pageState = PageState.Empty; | ||
| 351 | + // pageState = PageState.Success; | ||
| 342 | } | 352 | } |
| 353 | + // if (widget.tid == '') { | ||
| 354 | + // if (!needRetain) { | ||
| 355 | + // // currentArea = areaTableMap.keys.first; | ||
| 356 | + // currentArea = '全部'; | ||
| 357 | + // _chooseTableModel.currentTables = _chooseTableModel.tablesAll; | ||
| 358 | + // } else { | ||
| 359 | + // if (currentArea != null && currentArea != '') { | ||
| 360 | + // // tablesShow = areaTableMapShow[currentArea]; | ||
| 361 | + // List keys = areaTableMap.keys.toList(); | ||
| 362 | + // _selectNumber = keys.indexOf(currentArea); | ||
| 363 | + // } | ||
| 364 | + // } | ||
| 365 | + // if (areas.length == 1) { | ||
| 366 | + // currentArea = areaTableMap.keys.first; | ||
| 367 | + // } | ||
| 368 | + // } else { | ||
| 369 | + // // if (currentArea != null && currentArea != '') { | ||
| 370 | + // // tablesShow = areaTableMapShow[currentArea]; | ||
| 371 | + // // selectNumber = areaTableMapShow.length; | ||
| 372 | + // // } | ||
| 373 | + // // // pageState = PageState.Empty; | ||
| 374 | + // // pageState = PageState.Success; | ||
| 375 | + // } | ||
| 343 | 376 | ||
| 344 | _chooseTableModel.pageState = PageState.Success; | 377 | _chooseTableModel.pageState = PageState.Success; |
| 345 | _chooseTableModel.notifyListeners(); | 378 | _chooseTableModel.notifyListeners(); |
| @@ -398,9 +431,13 @@ class PhotoManagerPageState extends State<PhotoManagerPage> { | @@ -398,9 +431,13 @@ class PhotoManagerPageState extends State<PhotoManagerPage> { | ||
| 398 | vertical: ScreenUtil().setWidth(20), | 431 | vertical: ScreenUtil().setWidth(20), |
| 399 | horizontal: ScreenUtil().setWidth(10)), | 432 | horizontal: ScreenUtil().setWidth(10)), |
| 400 | shrinkWrap: true, | 433 | shrinkWrap: true, |
| 401 | - itemCount: currentArea == '全部' | ||
| 402 | - ? _chooseTableModel.tablesShow.length | ||
| 403 | - : _chooseTableModel.areaTableMapShow[areas[i].name].length, | 434 | + itemCount: _chooseTableModel.tablesShow.length == 0 || |
| 435 | + (i != null && | ||
| 436 | + _chooseTableModel.areaTableMapShow[areas[i].name].length == 0) | ||
| 437 | + ? 0 | ||
| 438 | + : currentArea == '全部' | ||
| 439 | + ? _chooseTableModel.tablesShow.length | ||
| 440 | + : _chooseTableModel.areaTableMapShow[areas[i].name].length, | ||
| 404 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( | 441 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( |
| 405 | crossAxisCount: 4, | 442 | crossAxisCount: 4, |
| 406 | childAspectRatio: 1, | 443 | childAspectRatio: 1, |
| @@ -409,9 +446,14 @@ class PhotoManagerPageState extends State<PhotoManagerPage> { | @@ -409,9 +446,14 @@ class PhotoManagerPageState extends State<PhotoManagerPage> { | ||
| 409 | ), | 446 | ), |
| 410 | 447 | ||
| 411 | itemBuilder: (BuildContext context, int index) { | 448 | itemBuilder: (BuildContext context, int index) { |
| 412 | - List<t.Table> data = currentArea == '全部' | ||
| 413 | - ? _chooseTableModel.tablesShow | ||
| 414 | - : _chooseTableModel.areaTableMapShow[areas[i].name]; | 449 | + List<t.Table> data = _chooseTableModel.tablesShow.length == 0 || |
| 450 | + (i != null && | ||
| 451 | + _chooseTableModel.areaTableMapShow[areas[i].name].length == | ||
| 452 | + 0) | ||
| 453 | + ? 0 | ||
| 454 | + : currentArea == '全部' | ||
| 455 | + ? _chooseTableModel.tablesShow | ||
| 456 | + : _chooseTableModel.areaTableMapShow[areas[i].name]; | ||
| 415 | // if (index == data.length || data.length == 0) { | 457 | // if (index == data.length || data.length == 0) { |
| 416 | // return InkWell( | 458 | // return InkWell( |
| 417 | // onTap: () async { | 459 | // onTap: () async { |
| @@ -143,11 +143,13 @@ class TableManagerPageState extends State<TableManagerPage> { | @@ -143,11 +143,13 @@ class TableManagerPageState extends State<TableManagerPage> { | ||
| 143 | vertical: ScreenUtil().setWidth(20), | 143 | vertical: ScreenUtil().setWidth(20), |
| 144 | horizontal: ScreenUtil().setWidth(10)), | 144 | horizontal: ScreenUtil().setWidth(10)), |
| 145 | shrinkWrap: true, | 145 | shrinkWrap: true, |
| 146 | - itemCount: tableManagerModel.currentArea == '全部' | ||
| 147 | - ? tableManagerModel.tablesShow.length | ||
| 148 | - : tableManagerModel | ||
| 149 | - .areaTableMapShow[tableManagerModel.currentArea].length + | ||
| 150 | - 1, | 146 | + itemCount: tableManagerModel.tableOuterList.length == 0 |
| 147 | + ? 0 | ||
| 148 | + : tableManagerModel.currentArea == '全部' | ||
| 149 | + ? tableManagerModel.tablesShow.length | ||
| 150 | + : tableManagerModel | ||
| 151 | + .areaTableMapShow[tableManagerModel.currentArea].length + | ||
| 152 | + 1, | ||
| 151 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( | 153 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( |
| 152 | crossAxisCount: 4, | 154 | crossAxisCount: 4, |
| 153 | childAspectRatio: 0.8, | 155 | childAspectRatio: 0.8, |
| @@ -156,10 +158,12 @@ class TableManagerPageState extends State<TableManagerPage> { | @@ -156,10 +158,12 @@ class TableManagerPageState extends State<TableManagerPage> { | ||
| 156 | ), | 158 | ), |
| 157 | 159 | ||
| 158 | itemBuilder: (BuildContext context, int index) { | 160 | itemBuilder: (BuildContext context, int index) { |
| 159 | - List<t.Table> data = tableManagerModel.currentArea == '全部' | ||
| 160 | - ? tableManagerModel.tablesShow | ||
| 161 | - : tableManagerModel | ||
| 162 | - .areaTableMapShow[tableManagerModel.areas[i].name]; | 161 | + List<t.Table> data = tableManagerModel.tableOuterList.length == 0 |
| 162 | + ? [] | ||
| 163 | + : tableManagerModel.currentArea == '全部' | ||
| 164 | + ? tableManagerModel.tablesShow | ||
| 165 | + : tableManagerModel | ||
| 166 | + .areaTableMapShow[tableManagerModel.areas[i].name]; | ||
| 163 | if (index == data.length || data.length == 0) { | 167 | if (index == data.length || data.length == 0) { |
| 164 | return InkWell( | 168 | return InkWell( |
| 165 | onTap: () async { | 169 | onTap: () async { |
| @@ -679,7 +679,7 @@ class TableManagerModel with ChangeNotifier { | @@ -679,7 +679,7 @@ class TableManagerModel with ChangeNotifier { | ||
| 679 | if (currentArea != null && currentArea != '') { | 679 | if (currentArea != null && currentArea != '') { |
| 680 | // tablesShow = areaTableMapShow[currentArea]; | 680 | // tablesShow = areaTableMapShow[currentArea]; |
| 681 | List keys = areaTableMapShow.keys.toList(); | 681 | List keys = areaTableMapShow.keys.toList(); |
| 682 | - selectNumber = keys.indexOf(currentArea) + 1; | 682 | + selectNumber = keys.indexOf(currentArea); |
| 683 | } | 683 | } |
| 684 | } | 684 | } |
| 685 | } else { | 685 | } else { |
-
Please register or login to post a comment