Showing
6 changed files
with
482 additions
and
155 deletions
| @@ -20,19 +20,19 @@ if (flutterRoot == null) { | @@ -20,19 +20,19 @@ if (flutterRoot == null) { | ||
| 20 | 20 | ||
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | -def flutterVersionCode = "560" | 23 | +def flutterVersionCode = "561" |
| 24 | if (flutterVersionCode == null) { | 24 | if (flutterVersionCode == null) { |
| 25 | - flutterVersionCode = '560' | 25 | + flutterVersionCode = '561' |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | 31 | ||
| 32 | -def flutterVersionName = "5.6.0" | 32 | +def flutterVersionName = "5.6.1" |
| 33 | 33 | ||
| 34 | if (flutterVersionName == null) { | 34 | if (flutterVersionName == null) { |
| 35 | - flutterVersionName = '5.6.0' | 35 | + flutterVersionName = '5.6.1' |
| 36 | 36 | ||
| 37 | } | 37 | } |
| 38 | 38 |
| @@ -277,10 +277,14 @@ | @@ -277,10 +277,14 @@ | ||
| 277 | inputFileListPaths = ( | 277 | inputFileListPaths = ( |
| 278 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", | 278 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", |
| 279 | ); | 279 | ); |
| 280 | + inputPaths = ( | ||
| 281 | + ); | ||
| 280 | name = "[CP] Embed Pods Frameworks"; | 282 | name = "[CP] Embed Pods Frameworks"; |
| 281 | outputFileListPaths = ( | 283 | outputFileListPaths = ( |
| 282 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", | 284 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", |
| 283 | ); | 285 | ); |
| 286 | + outputPaths = ( | ||
| 287 | + ); | ||
| 284 | runOnlyForDeploymentPostprocessing = 0; | 288 | runOnlyForDeploymentPostprocessing = 0; |
| 285 | shellPath = /bin/sh; | 289 | shellPath = /bin/sh; |
| 286 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; | 290 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; |
| @@ -294,10 +298,14 @@ | @@ -294,10 +298,14 @@ | ||
| 294 | inputFileListPaths = ( | 298 | inputFileListPaths = ( |
| 295 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", | 299 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist", |
| 296 | ); | 300 | ); |
| 301 | + inputPaths = ( | ||
| 302 | + ); | ||
| 297 | name = "[CP] Copy Pods Resources"; | 303 | name = "[CP] Copy Pods Resources"; |
| 298 | outputFileListPaths = ( | 304 | outputFileListPaths = ( |
| 299 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", | 305 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist", |
| 300 | ); | 306 | ); |
| 307 | + outputPaths = ( | ||
| 308 | + ); | ||
| 301 | runOnlyForDeploymentPostprocessing = 0; | 309 | runOnlyForDeploymentPostprocessing = 0; |
| 302 | shellPath = /bin/sh; | 310 | shellPath = /bin/sh; |
| 303 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; | 311 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n"; |
| @@ -449,7 +457,7 @@ | @@ -449,7 +457,7 @@ | ||
| 449 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 457 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| 450 | CLANG_ENABLE_MODULES = YES; | 458 | CLANG_ENABLE_MODULES = YES; |
| 451 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; | 459 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; |
| 452 | - CURRENT_PROJECT_VERSION = 560; | 460 | + CURRENT_PROJECT_VERSION = 5610; |
| 453 | DEVELOPMENT_TEAM = 8J59HM8B82; | 461 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 454 | ENABLE_BITCODE = NO; | 462 | ENABLE_BITCODE = NO; |
| 455 | INFOPLIST_FILE = Runner/Info.plist; | 463 | INFOPLIST_FILE = Runner/Info.plist; |
| @@ -458,7 +466,7 @@ | @@ -458,7 +466,7 @@ | ||
| 458 | "$(inherited)", | 466 | "$(inherited)", |
| 459 | "@executable_path/Frameworks", | 467 | "@executable_path/Frameworks", |
| 460 | ); | 468 | ); |
| 461 | - MARKETING_VERSION = 5.6.0; | 469 | + MARKETING_VERSION = 5.6.1; |
| 462 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; | 470 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; |
| 463 | PRODUCT_NAME = "$(TARGET_NAME)"; | 471 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 464 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; | 472 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; |
| @@ -632,7 +640,7 @@ | @@ -632,7 +640,7 @@ | ||
| 632 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 640 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| 633 | CLANG_ENABLE_MODULES = YES; | 641 | CLANG_ENABLE_MODULES = YES; |
| 634 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; | 642 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; |
| 635 | - CURRENT_PROJECT_VERSION = 560; | 643 | + CURRENT_PROJECT_VERSION = 5610; |
| 636 | DEVELOPMENT_TEAM = 8J59HM8B82; | 644 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 637 | ENABLE_BITCODE = NO; | 645 | ENABLE_BITCODE = NO; |
| 638 | INFOPLIST_FILE = Runner/Info.plist; | 646 | INFOPLIST_FILE = Runner/Info.plist; |
| @@ -641,7 +649,7 @@ | @@ -641,7 +649,7 @@ | ||
| 641 | "$(inherited)", | 649 | "$(inherited)", |
| 642 | "@executable_path/Frameworks", | 650 | "@executable_path/Frameworks", |
| 643 | ); | 651 | ); |
| 644 | - MARKETING_VERSION = 5.6.0; | 652 | + MARKETING_VERSION = 5.6.1; |
| 645 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; | 653 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; |
| 646 | PRODUCT_NAME = "$(TARGET_NAME)"; | 654 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 647 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; | 655 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; |
| @@ -658,7 +666,7 @@ | @@ -658,7 +666,7 @@ | ||
| 658 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 666 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
| 659 | CLANG_ENABLE_MODULES = YES; | 667 | CLANG_ENABLE_MODULES = YES; |
| 660 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; | 668 | CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; |
| 661 | - CURRENT_PROJECT_VERSION = 560; | 669 | + CURRENT_PROJECT_VERSION = 5610; |
| 662 | DEVELOPMENT_TEAM = 8J59HM8B82; | 670 | DEVELOPMENT_TEAM = 8J59HM8B82; |
| 663 | ENABLE_BITCODE = NO; | 671 | ENABLE_BITCODE = NO; |
| 664 | INFOPLIST_FILE = Runner/Info.plist; | 672 | INFOPLIST_FILE = Runner/Info.plist; |
| @@ -667,7 +675,7 @@ | @@ -667,7 +675,7 @@ | ||
| 667 | "$(inherited)", | 675 | "$(inherited)", |
| 668 | "@executable_path/Frameworks", | 676 | "@executable_path/Frameworks", |
| 669 | ); | 677 | ); |
| 670 | - MARKETING_VERSION = 5.6.0; | 678 | + MARKETING_VERSION = 5.6.1; |
| 671 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; | 679 | PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; |
| 672 | PRODUCT_NAME = "$(TARGET_NAME)"; | 680 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 673 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; | 681 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; |
| @@ -10,10 +10,10 @@ class Constant { | @@ -10,10 +10,10 @@ class Constant { | ||
| 10 | * | 10 | * |
| 11 | * 测试账号变更,已经删除0001 账户 代替为 0019!!!!!!!注意!!!!!!!!!!!!!! | 11 | * 测试账号变更,已经删除0001 账户 代替为 0019!!!!!!!注意!!!!!!!!!!!!!! |
| 12 | * */ | 12 | * */ |
| 13 | - static const WXMiniProgramType wxMiniProgramType = | ||
| 14 | - WXMiniProgramType.release; //正式版 | ||
| 15 | // static const WXMiniProgramType wxMiniProgramType = | 13 | // static const WXMiniProgramType wxMiniProgramType = |
| 16 | - // WXMiniProgramType.preview; //体验版 | 14 | + // WXMiniProgramType.release; //正式版 |
| 15 | + static const WXMiniProgramType wxMiniProgramType = | ||
| 16 | + WXMiniProgramType.preview; //体验版 | ||
| 17 | // static const WXMiniProgramType wxMiniProgramType = | 17 | // static const WXMiniProgramType wxMiniProgramType = |
| 18 | // WXMiniProgramType.test; //开发版 | 18 | // WXMiniProgramType.test; //开发版 |
| 19 | 19 |
| 1 | import 'package:flutter/material.dart'; | 1 | import 'package:flutter/material.dart'; |
| 2 | +import 'package:flutter/services.dart'; | ||
| 2 | 3 | ||
| 3 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 4 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| 4 | import 'package:one_key/constant/state.dart'; | 5 | import 'package:one_key/constant/state.dart'; |
| @@ -262,11 +263,40 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | @@ -262,11 +263,40 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | ||
| 262 | params['reserve_num'] = customerProvider!.controllernum.text; | 263 | params['reserve_num'] = customerProvider!.controllernum.text; |
| 263 | params['reserve_sort'] = '${dropValue! + 1}'; | 264 | params['reserve_sort'] = '${dropValue! + 1}'; |
| 264 | } | 265 | } |
| 266 | + bool tempMoney = customerProvider!.filterMoneyList.any((value) { | ||
| 267 | + return value.select == true; | ||
| 268 | + }); | ||
| 269 | + if (tempMoney) { | ||
| 270 | + //快捷金额选择 | ||
| 271 | + | ||
| 272 | + String smoney = ''; | ||
| 273 | + String emoney = ''; | ||
| 274 | + for (FilterBtnModel item in customerProvider!.filterMoneyList) { | ||
| 275 | + if (item.select!) { | ||
| 276 | + if (item.id == '300') { | ||
| 277 | + smoney = '300'; | ||
| 278 | + emoney = '-1'; | ||
| 279 | + } else { | ||
| 280 | + List<String> strList = item.id!.split('-'); | ||
| 281 | + smoney = strList[0]; | ||
| 282 | + emoney = strList[1]; | ||
| 283 | + } | ||
| 284 | + } | ||
| 285 | + } | ||
| 286 | + | ||
| 287 | + params['average'] = '${smoney},${emoney}'; | ||
| 288 | + } else { | ||
| 289 | + if (customerProvider!.controllersmoney.text.trim().length > 0 && | ||
| 290 | + customerProvider!.controlleremoney.text.trim().length > 0) { | ||
| 291 | + params['average'] = | ||
| 292 | + '${customerProvider!.controllersmoney.text},${customerProvider!.controlleremoney.text}'; | ||
| 293 | + } | ||
| 294 | + } | ||
| 265 | 295 | ||
| 266 | bool temp = customerProvider!.filterDayList.any((value) { | 296 | bool temp = customerProvider!.filterDayList.any((value) { |
| 267 | return value.select == true; | 297 | return value.select == true; |
| 268 | }); | 298 | }); |
| 269 | - if (temp == true) { | 299 | + if (temp) { |
| 270 | if (customerProvider!.controllernum.text.trim().length == 0) { | 300 | if (customerProvider!.controllernum.text.trim().length == 0) { |
| 271 | Utils.showToast('请输入多少次预订'); | 301 | Utils.showToast('请输入多少次预订'); |
| 272 | return; | 302 | return; |
| @@ -735,6 +765,12 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | @@ -735,6 +765,12 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | ||
| 735 | in customerProvider!.filterDayList) { | 765 | in customerProvider!.filterDayList) { |
| 736 | item.select = false; | 766 | item.select = false; |
| 737 | } | 767 | } |
| 768 | + for (FilterBtnModel item | ||
| 769 | + in customerProvider!.filterMoneyList) { | ||
| 770 | + item.select = false; | ||
| 771 | + } | ||
| 772 | + customerProvider!.controllersmoney.text = ''; | ||
| 773 | + customerProvider!.controlleremoney.text = ''; | ||
| 738 | customerProvider!.controllerstime.text = ''; | 774 | customerProvider!.controllerstime.text = ''; |
| 739 | customerProvider!.controlleretime.text = ''; | 775 | customerProvider!.controlleretime.text = ''; |
| 740 | customerProvider!.controllernum.text = ''; | 776 | customerProvider!.controllernum.text = ''; |
| @@ -771,6 +807,38 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | @@ -771,6 +807,38 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | ||
| 771 | // return; | 807 | // return; |
| 772 | // } | 808 | // } |
| 773 | // } | 809 | // } |
| 810 | + if (customerProvider!.controllersmoney.text.trim().length > | ||
| 811 | + 0 && | ||
| 812 | + customerProvider!.controlleremoney.text.trim().length == | ||
| 813 | + 0) { | ||
| 814 | + Utils.showToast('请输入人均消费结束金额'); | ||
| 815 | + return; | ||
| 816 | + } | ||
| 817 | + if (customerProvider!.controllersmoney.text.trim().length == | ||
| 818 | + 0 && | ||
| 819 | + customerProvider!.controlleremoney.text.trim().length > | ||
| 820 | + 0) { | ||
| 821 | + Utils.showToast('请输入人均消费开始金额'); | ||
| 822 | + return; | ||
| 823 | + } | ||
| 824 | + | ||
| 825 | + if (customerProvider!.controllersmoney.text.trim().length > | ||
| 826 | + 0 && | ||
| 827 | + customerProvider!.controlleremoney.text.trim().length > | ||
| 828 | + 0) { | ||
| 829 | + double smoney = double.tryParse( | ||
| 830 | + customerProvider!.controllersmoney.text) ?? | ||
| 831 | + 0.0; | ||
| 832 | + double emoney = double.tryParse( | ||
| 833 | + customerProvider!.controlleremoney.text) ?? | ||
| 834 | + 0.0; | ||
| 835 | + | ||
| 836 | + if (smoney > emoney) { | ||
| 837 | + Utils.showToast('人均消费金额筛选区间起始金额不能大于结束金额'); | ||
| 838 | + return; | ||
| 839 | + } | ||
| 840 | + } | ||
| 841 | + | ||
| 774 | bool temp = customerProvider!.filterDayList.any((value) { | 842 | bool temp = customerProvider!.filterDayList.any((value) { |
| 775 | return value.select == true; | 843 | return value.select == true; |
| 776 | }); | 844 | }); |
| @@ -839,24 +907,30 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | @@ -839,24 +907,30 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | ||
| 839 | showFilter = false; | 907 | showFilter = false; |
| 840 | }); | 908 | }); |
| 841 | 909 | ||
| 842 | - customerProvider!.hydSelAll = false; | ||
| 843 | - for (FilterBtnModel item | ||
| 844 | - in customerProvider!.filterHydList) { | ||
| 845 | - item.select = false; | ||
| 846 | - } | ||
| 847 | - customerProvider!.labelSelAll = false; | ||
| 848 | - for (FilterBtnModel item | ||
| 849 | - in customerProvider!.filterLabelList) { | ||
| 850 | - item.select = false; | ||
| 851 | - } | ||
| 852 | - for (FilterBtnModel item | ||
| 853 | - in customerProvider!.filterDayList) { | ||
| 854 | - item.select = false; | ||
| 855 | - } | ||
| 856 | - customerProvider!.controllerstime.text = ''; | ||
| 857 | - customerProvider!.controlleretime.text = ''; | ||
| 858 | - customerProvider!.controllernum.text = ''; | ||
| 859 | - dropValue = 0; | 910 | + // customerProvider!.hydSelAll = false; |
| 911 | + // for (FilterBtnModel item | ||
| 912 | + // in customerProvider!.filterHydList) { | ||
| 913 | + // item.select = false; | ||
| 914 | + // } | ||
| 915 | + // customerProvider!.labelSelAll = false; | ||
| 916 | + // for (FilterBtnModel item | ||
| 917 | + // in customerProvider!.filterLabelList) { | ||
| 918 | + // item.select = false; | ||
| 919 | + // } | ||
| 920 | + // for (FilterBtnModel item | ||
| 921 | + // in customerProvider!.filterDayList) { | ||
| 922 | + // item.select = false; | ||
| 923 | + // } | ||
| 924 | + // for (FilterBtnModel item | ||
| 925 | + // in customerProvider!.filterMoneyList) { | ||
| 926 | + // item.select = false; | ||
| 927 | + // } | ||
| 928 | + // customerProvider!.controllerstime.text = ''; | ||
| 929 | + // customerProvider!.controlleretime.text = ''; | ||
| 930 | + // customerProvider!.controllersmoney.text = ''; | ||
| 931 | + // customerProvider!.controlleremoney.text = ''; | ||
| 932 | + // customerProvider!.controllernum.text = ''; | ||
| 933 | + // dropValue = 0; | ||
| 860 | }); | 934 | }); |
| 861 | } | 935 | } |
| 862 | }, | 936 | }, |
| @@ -914,7 +988,8 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | @@ -914,7 +988,8 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | ||
| 914 | // print('object'); | 988 | // print('object'); |
| 915 | // }, | 989 | // }, |
| 916 | child: Container( | 990 | child: Container( |
| 917 | - height: ScreenUtil().setWidth(92 + 52 + 30 * 3 + 90) + | 991 | + height: ScreenUtil() |
| 992 | + .setWidth(92 + 52 + 30 * 3 + 90 + 20) + | ||
| 918 | ScreenUtil().statusBarHeight, | 993 | ScreenUtil().statusBarHeight, |
| 919 | // width: s, | 994 | // width: s, |
| 920 | width: ScreenUtil().screenWidth, | 995 | width: ScreenUtil().screenWidth, |
| @@ -1165,19 +1240,25 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | @@ -1165,19 +1240,25 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | ||
| 1165 | mainAxisAlignment: MainAxisAlignment.spaceBetween, | 1240 | mainAxisAlignment: MainAxisAlignment.spaceBetween, |
| 1166 | children: [ | 1241 | children: [ |
| 1167 | _textWidget('人均消费金额', MyColours.color_515151, FontWeight.bold, 28), | 1242 | _textWidget('人均消费金额', MyColours.color_515151, FontWeight.bold, 28), |
| 1168 | - // GestureDetector( | ||
| 1169 | - // onTap: () { | ||
| 1170 | - // customerProvider.controllersmoney.text = ''; | ||
| 1171 | - // customerProvider.controlleremoney.text = ''; | ||
| 1172 | - // }, | ||
| 1173 | - // child: Container( | ||
| 1174 | - // color: Colors.white, | ||
| 1175 | - // height: ScreenUtil().setWidth(40), | ||
| 1176 | - // alignment: Alignment.center, | ||
| 1177 | - // padding: EdgeInsets.only(left: ScreenUtil().setWidth(130)), | ||
| 1178 | - // child: _textWidget( | ||
| 1179 | - // '清空', MyColours.color_199095, FontWeight.normal, 24), | ||
| 1180 | - // )) | 1243 | + GestureDetector( |
| 1244 | + onTap: () { | ||
| 1245 | + customerProvider!.controllersmoney.text = ''; | ||
| 1246 | + customerProvider!.controlleremoney.text = ''; | ||
| 1247 | + for (FilterBtnModel value | ||
| 1248 | + in customerProvider!.filterMoneyList) { | ||
| 1249 | + value.select = false; | ||
| 1250 | + } | ||
| 1251 | + // customerProvider.controllernum.text = ''; | ||
| 1252 | + state(() {}); | ||
| 1253 | + }, | ||
| 1254 | + child: Container( | ||
| 1255 | + color: Colors.white, | ||
| 1256 | + height: ScreenUtil().setWidth(40), | ||
| 1257 | + alignment: Alignment.center, | ||
| 1258 | + padding: EdgeInsets.only(left: ScreenUtil().setWidth(130)), | ||
| 1259 | + child: _textWidget( | ||
| 1260 | + '清空', MyColours.color_199095, FontWeight.normal, 24), | ||
| 1261 | + )) | ||
| 1181 | ], | 1262 | ], |
| 1182 | ), | 1263 | ), |
| 1183 | VEmptyView(20), | 1264 | VEmptyView(20), |
| @@ -1188,6 +1269,17 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | @@ -1188,6 +1269,17 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | ||
| 1188 | Expanded( | 1269 | Expanded( |
| 1189 | child: _textFeildWidget(customerProvider!.controllersmoney, | 1270 | child: _textFeildWidget(customerProvider!.controllersmoney, |
| 1190 | customerProvider!.smoneyFocus, state, (value) { | 1271 | customerProvider!.smoneyFocus, state, (value) { |
| 1272 | + for (FilterBtnModel value | ||
| 1273 | + in customerProvider!.filterMoneyList) { | ||
| 1274 | + value.select = false; | ||
| 1275 | + } | ||
| 1276 | + // customerProvider.controllernum.text = ''; | ||
| 1277 | + state(() {}); | ||
| 1278 | + | ||
| 1279 | + // setState(() {}); | ||
| 1280 | + // _searchSellerLocation(); | ||
| 1281 | + // customerProvider.searchData(value); | ||
| 1282 | + | ||
| 1191 | //输入框 | 1283 | //输入框 |
| 1192 | }, unit: '元')), | 1284 | }, unit: '元')), |
| 1193 | HEmptyView(10), | 1285 | HEmptyView(10), |
| @@ -1195,42 +1287,76 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | @@ -1195,42 +1287,76 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | ||
| 1195 | HEmptyView(10), | 1287 | HEmptyView(10), |
| 1196 | Expanded( | 1288 | Expanded( |
| 1197 | child: _textFeildWidget(customerProvider!.controlleremoney, | 1289 | child: _textFeildWidget(customerProvider!.controlleremoney, |
| 1198 | - customerProvider!.emoneyFocus, state, (value) {}, | ||
| 1199 | - unit: '元')), | 1290 | + customerProvider!.emoneyFocus, state, (value) { |
| 1291 | + for (FilterBtnModel value | ||
| 1292 | + in customerProvider!.filterMoneyList) { | ||
| 1293 | + value.select = false; | ||
| 1294 | + } | ||
| 1295 | + // customerProvider.controllernum.text = ''; | ||
| 1296 | + state(() {}); | ||
| 1297 | + }, unit: '元')), | ||
| 1200 | ], | 1298 | ], |
| 1201 | )), | 1299 | )), |
| 1202 | - VEmptyView(40), | ||
| 1203 | - Row( | ||
| 1204 | - mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 1205 | - children: [ | ||
| 1206 | - _textWidget('人均消费能力', MyColours.color_515151, FontWeight.bold, 28), | ||
| 1207 | - // GestureDetector( | ||
| 1208 | - // onTap: () { | ||
| 1209 | - // customerProvider.controllersmoney.text = ''; | ||
| 1210 | - // customerProvider.controlleremoney.text = ''; | ||
| 1211 | - // }, | ||
| 1212 | - // child: Container( | ||
| 1213 | - // color: Colors.white, | ||
| 1214 | - // height: ScreenUtil().setWidth(40), | ||
| 1215 | - // alignment: Alignment.center, | ||
| 1216 | - // padding: EdgeInsets.only(left: ScreenUtil().setWidth(130)), | ||
| 1217 | - // child: _textWidget( | ||
| 1218 | - // '清空', MyColours.color_199095, FontWeight.normal, 24), | ||
| 1219 | - // )) | ||
| 1220 | - ], | ||
| 1221 | - ), | ||
| 1222 | VEmptyView(20), | 1300 | VEmptyView(20), |
| 1223 | - Row( | ||
| 1224 | - children: [ | ||
| 1225 | - HEmptyView(20), | ||
| 1226 | - _textWidget('最高的', MyColours.color_199095, FontWeight.normal, 24), | ||
| 1227 | - HEmptyView(10), | ||
| 1228 | - Expanded( | ||
| 1229 | - child: _textFeildWidget(customerProvider!.controllermaxmoney, | ||
| 1230 | - customerProvider!.maxmoneyFocus, state, (value) {}, | ||
| 1231 | - unit: '%')), | ||
| 1232 | - ], | ||
| 1233 | - ), | 1301 | + Padding( |
| 1302 | + padding: EdgeInsets.only(left: w(10)), | ||
| 1303 | + child: Row(children: [ | ||
| 1304 | + _textWidget('或', MyColours.color_000000, FontWeight.normal, 24), | ||
| 1305 | + HEmptyView(20), | ||
| 1306 | + Wrap( | ||
| 1307 | + crossAxisAlignment: WrapCrossAlignment.center, | ||
| 1308 | + spacing: ScreenUtil().setWidth(20), | ||
| 1309 | + runSpacing: ScreenUtil().setWidth(20), | ||
| 1310 | + children: _buildFilterItem( | ||
| 1311 | + customerProvider!.filterMoneyList, | ||
| 1312 | + false, | ||
| 1313 | + (FilterBtnModel item) { | ||
| 1314 | + // if (customerProvider.stimeFocus.hasFocus) { | ||
| 1315 | + // customerProvider.controllerstime.text = item.id; | ||
| 1316 | + // } | ||
| 1317 | + // if (customerProvider.etimeFocus.hasFocus) { | ||
| 1318 | + // customerProvider.controlleretime.text = item.id; | ||
| 1319 | + // } | ||
| 1320 | + customerProvider!.controllersmoney.text = ''; | ||
| 1321 | + customerProvider!.controlleremoney.text = ''; | ||
| 1322 | + for (FilterBtnModel value | ||
| 1323 | + in customerProvider!.filterMoneyList) { | ||
| 1324 | + value.select = false; | ||
| 1325 | + } | ||
| 1326 | + for (FilterBtnModel value | ||
| 1327 | + in customerProvider!.filterMoneyList) { | ||
| 1328 | + if (item.id == value.id) { | ||
| 1329 | + state(() { | ||
| 1330 | + value.select = true; | ||
| 1331 | + }); | ||
| 1332 | + } | ||
| 1333 | + } | ||
| 1334 | + // state(() { | ||
| 1335 | + // item.select = !item.select; | ||
| 1336 | + // }); | ||
| 1337 | + }, | ||
| 1338 | + )) | ||
| 1339 | + ])), | ||
| 1340 | + VEmptyView(40), | ||
| 1341 | + // Row( | ||
| 1342 | + // mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 1343 | + // children: [ | ||
| 1344 | + // _textWidget('人均消费能力', MyColours.color_515151, FontWeight.bold, 28), | ||
| 1345 | + | ||
| 1346 | + // ], | ||
| 1347 | + // ), | ||
| 1348 | + // VEmptyView(20), | ||
| 1349 | + // Row( | ||
| 1350 | + // children: [ | ||
| 1351 | + // HEmptyView(20), | ||
| 1352 | + // _textWidget('最高的', MyColours.color_199095, FontWeight.normal, 24), | ||
| 1353 | + // HEmptyView(10), | ||
| 1354 | + // Expanded( | ||
| 1355 | + // child: _textFeildWidget(customerProvider!.controllermaxmoney, | ||
| 1356 | + // customerProvider!.maxmoneyFocus, state, (value) {}, | ||
| 1357 | + // unit: '%')), | ||
| 1358 | + // ], | ||
| 1359 | + // ), | ||
| 1234 | ], | 1360 | ], |
| 1235 | ); | 1361 | ); |
| 1236 | } | 1362 | } |
| @@ -1249,6 +1375,10 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | @@ -1249,6 +1375,10 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | ||
| 1249 | customerProvider!.controllerstime.text = ''; | 1375 | customerProvider!.controllerstime.text = ''; |
| 1250 | customerProvider!.controlleretime.text = ''; | 1376 | customerProvider!.controlleretime.text = ''; |
| 1251 | customerProvider!.controllernum.text = ''; | 1377 | customerProvider!.controllernum.text = ''; |
| 1378 | + for (FilterBtnModel value | ||
| 1379 | + in customerProvider!.filterDayList) { | ||
| 1380 | + value.select = false; | ||
| 1381 | + } | ||
| 1252 | state(() { | 1382 | state(() { |
| 1253 | dropValue = 0; | 1383 | dropValue = 0; |
| 1254 | }); | 1384 | }); |
| @@ -1540,6 +1670,14 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | @@ -1540,6 +1670,14 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | ||
| 1540 | controller: controller, | 1670 | controller: controller, |
| 1541 | focusNode: focusNode, | 1671 | focusNode: focusNode, |
| 1542 | // autofocus: true, | 1672 | // autofocus: true, |
| 1673 | + inputFormatters: unit == '天' | ||
| 1674 | + ? [FilteringTextInputFormatter.digitsOnly] | ||
| 1675 | + : unit == '元' | ||
| 1676 | + ? [ | ||
| 1677 | + FilteringTextInputFormatter.allow( | ||
| 1678 | + RegExp("[0-9.]")), | ||
| 1679 | + ] | ||
| 1680 | + : [], | ||
| 1543 | 1681 | ||
| 1544 | style: TextStyle( | 1682 | style: TextStyle( |
| 1545 | color: MyColours.color_515151, | 1683 | color: MyColours.color_515151, |
| @@ -1600,11 +1738,12 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | @@ -1600,11 +1738,12 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | ||
| 1600 | bottomRight: Radius.circular(ScreenUtil().setWidth(20)), | 1738 | bottomRight: Radius.circular(ScreenUtil().setWidth(20)), |
| 1601 | bottomLeft: Radius.circular(ScreenUtil().setWidth(20)))), | 1739 | bottomLeft: Radius.circular(ScreenUtil().setWidth(20)))), |
| 1602 | margin: EdgeInsets.only( | 1740 | margin: EdgeInsets.only( |
| 1603 | - left: ScreenUtil().setWidth(40), | ||
| 1604 | - bottom: ScreenUtil().setWidth(140), | ||
| 1605 | - right: ScreenUtil().setWidth(40)), | ||
| 1606 | - padding: | ||
| 1607 | - EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(40)), | 1741 | + // top: w(10), |
| 1742 | + // left: ScreenUtil().setWidth(40), | ||
| 1743 | + bottom: ScreenUtil().setWidth(140), | ||
| 1744 | + // right: ScreenUtil().setWidth(40) | ||
| 1745 | + ), | ||
| 1746 | + padding: EdgeInsets.only(left: w(20), right: w(20)), | ||
| 1608 | child: Column( | 1747 | child: Column( |
| 1609 | children: [ | 1748 | children: [ |
| 1610 | Expanded( | 1749 | Expanded( |
| @@ -1636,7 +1775,7 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | @@ -1636,7 +1775,7 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | ||
| 1636 | 1775 | ||
| 1637 | // 消费 | 1776 | // 消费 |
| 1638 | 1777 | ||
| 1639 | - // _consume(state), | 1778 | + _consume(state), |
| 1640 | // VEmptyView(40), | 1779 | // VEmptyView(40), |
| 1641 | _advancedFilterWidget(state) | 1780 | _advancedFilterWidget(state) |
| 1642 | ], | 1781 | ], |
| @@ -1644,6 +1783,7 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | @@ -1644,6 +1783,7 @@ class _MyCustomerListPageState extends State<MyCustomerListPage> | ||
| 1644 | )), | 1783 | )), |
| 1645 | // ), | 1784 | // ), |
| 1646 | Row( | 1785 | Row( |
| 1786 | + mainAxisAlignment: MainAxisAlignment.center, | ||
| 1647 | children: [ | 1787 | children: [ |
| 1648 | Container( | 1788 | Container( |
| 1649 | width: ScreenUtil().screenWidth - | 1789 | width: ScreenUtil().screenWidth - |
| 1 | import 'package:flutter/material.dart'; | 1 | import 'package:flutter/material.dart'; |
| 2 | +import 'package:flutter/services.dart'; | ||
| 2 | import 'package:flutter_easyrefresh/easy_refresh.dart'; | 3 | import 'package:flutter_easyrefresh/easy_refresh.dart'; |
| 3 | 4 | ||
| 4 | import 'package:flutter_screenutil/flutter_screenutil.dart'; | 5 | import 'package:flutter_screenutil/flutter_screenutil.dart'; |
| @@ -359,6 +360,36 @@ class _CustomerListPageState extends State<CustomerListPage> | @@ -359,6 +360,36 @@ class _CustomerListPageState extends State<CustomerListPage> | ||
| 359 | // params['etime'] = customerProvider.controlleretime.text; | 360 | // params['etime'] = customerProvider.controlleretime.text; |
| 360 | // } | 361 | // } |
| 361 | 362 | ||
| 363 | + bool tempMoney = customerProvider!.filterMoneyList.any((value) { | ||
| 364 | + return value.select == true; | ||
| 365 | + }); | ||
| 366 | + if (tempMoney) { | ||
| 367 | + //快捷金额选择 | ||
| 368 | + | ||
| 369 | + String smoney = ''; | ||
| 370 | + String emoney = ''; | ||
| 371 | + for (FilterBtnModel item in customerProvider!.filterMoneyList) { | ||
| 372 | + if (item.select!) { | ||
| 373 | + if (item.id == '300') { | ||
| 374 | + smoney = '300'; | ||
| 375 | + emoney = '-1'; | ||
| 376 | + } else { | ||
| 377 | + List<String> strList = item.id!.split('-'); | ||
| 378 | + smoney = strList[0]; | ||
| 379 | + emoney = strList[1]; | ||
| 380 | + } | ||
| 381 | + } | ||
| 382 | + } | ||
| 383 | + | ||
| 384 | + params['average'] = '${smoney},${emoney}'; | ||
| 385 | + } else { | ||
| 386 | + if (customerProvider!.controllersmoney.text.trim().length > 0 && | ||
| 387 | + customerProvider!.controlleremoney.text.trim().length > 0) { | ||
| 388 | + params['average'] = | ||
| 389 | + '${customerProvider!.controllersmoney.text},${customerProvider!.controlleremoney.text}'; | ||
| 390 | + } | ||
| 391 | + } | ||
| 392 | + | ||
| 362 | bool temp = customerProvider!.filterDayList.any((value) { | 393 | bool temp = customerProvider!.filterDayList.any((value) { |
| 363 | return value.select == true; | 394 | return value.select == true; |
| 364 | }); | 395 | }); |
| @@ -804,12 +835,50 @@ class _CustomerListPageState extends State<CustomerListPage> | @@ -804,12 +835,50 @@ class _CustomerListPageState extends State<CustomerListPage> | ||
| 804 | in customerProvider!.filterDayList) { | 835 | in customerProvider!.filterDayList) { |
| 805 | item.select = false; | 836 | item.select = false; |
| 806 | } | 837 | } |
| 838 | + for (FilterBtnModel item | ||
| 839 | + in customerProvider!.filterMoneyList) { | ||
| 840 | + item.select = false; | ||
| 841 | + } | ||
| 842 | + customerProvider!.controllersmoney.text = ''; | ||
| 843 | + customerProvider!.controlleremoney.text = ''; | ||
| 807 | customerProvider!.controllerstime.text = ''; | 844 | customerProvider!.controllerstime.text = ''; |
| 808 | customerProvider!.controlleretime.text = ''; | 845 | customerProvider!.controlleretime.text = ''; |
| 809 | customerProvider!.controllernum.text = ''; | 846 | customerProvider!.controllernum.text = ''; |
| 810 | dropValue = 0; | 847 | dropValue = 0; |
| 811 | }); | 848 | }); |
| 812 | }, onPressedComplete: () { | 849 | }, onPressedComplete: () { |
| 850 | + if (customerProvider!.controllersmoney.text.trim().length > | ||
| 851 | + 0 && | ||
| 852 | + customerProvider!.controlleremoney.text.trim().length == | ||
| 853 | + 0) { | ||
| 854 | + Utils.showToast('请输入人均消费结束金额'); | ||
| 855 | + return; | ||
| 856 | + } | ||
| 857 | + if (customerProvider!.controllersmoney.text.trim().length == | ||
| 858 | + 0 && | ||
| 859 | + customerProvider!.controlleremoney.text.trim().length > | ||
| 860 | + 0) { | ||
| 861 | + Utils.showToast('请输入人均消费开始金额'); | ||
| 862 | + return; | ||
| 863 | + } | ||
| 864 | + | ||
| 865 | + if (customerProvider!.controllersmoney.text.trim().length > | ||
| 866 | + 0 && | ||
| 867 | + customerProvider!.controlleremoney.text.trim().length > | ||
| 868 | + 0) { | ||
| 869 | + double smoney = double.tryParse( | ||
| 870 | + customerProvider!.controllersmoney.text) ?? | ||
| 871 | + 0.0; | ||
| 872 | + double emoney = double.tryParse( | ||
| 873 | + customerProvider!.controlleremoney.text) ?? | ||
| 874 | + 0.0; | ||
| 875 | + | ||
| 876 | + if (smoney > emoney) { | ||
| 877 | + Utils.showToast('人均消费金额筛选区间起始金额不能大于结束金额'); | ||
| 878 | + return; | ||
| 879 | + } | ||
| 880 | + } | ||
| 881 | + | ||
| 813 | bool temp = customerProvider!.filterDayList.any((value) { | 882 | bool temp = customerProvider!.filterDayList.any((value) { |
| 814 | return value.select == true; | 883 | return value.select == true; |
| 815 | }); | 884 | }); |
| @@ -879,24 +948,31 @@ class _CustomerListPageState extends State<CustomerListPage> | @@ -879,24 +948,31 @@ class _CustomerListPageState extends State<CustomerListPage> | ||
| 879 | setState(() { | 948 | setState(() { |
| 880 | showFilter = false; | 949 | showFilter = false; |
| 881 | }); | 950 | }); |
| 882 | - customerProvider!.hydSelAll = false; | ||
| 883 | - for (FilterBtnModel item | ||
| 884 | - in customerProvider!.filterHydList) { | ||
| 885 | - item.select = false; | ||
| 886 | - } | ||
| 887 | - customerProvider!.labelSelAll = false; | ||
| 888 | - for (FilterBtnModel item | ||
| 889 | - in customerProvider!.filterLabelList) { | ||
| 890 | - item.select = false; | ||
| 891 | - } | ||
| 892 | - for (FilterBtnModel item | ||
| 893 | - in customerProvider!.filterDayList) { | ||
| 894 | - item.select = false; | ||
| 895 | - } | ||
| 896 | - customerProvider!.controllerstime.text = ''; | ||
| 897 | - customerProvider!.controlleretime.text = ''; | ||
| 898 | - customerProvider!.controllernum.text = ''; | ||
| 899 | - dropValue = 0; | 951 | + // customerProvider!.hydSelAll = false; |
| 952 | + // for (FilterBtnModel item | ||
| 953 | + // in customerProvider!.filterHydList) { | ||
| 954 | + // item.select = false; | ||
| 955 | + // } | ||
| 956 | + // customerProvider!.labelSelAll = false; | ||
| 957 | + // for (FilterBtnModel item | ||
| 958 | + // in customerProvider!.filterLabelList) { | ||
| 959 | + // item.select = false; | ||
| 960 | + // } | ||
| 961 | + // for (FilterBtnModel item | ||
| 962 | + // in customerProvider!.filterDayList) { | ||
| 963 | + // item.select = false; | ||
| 964 | + // } | ||
| 965 | + // for (FilterBtnModel item | ||
| 966 | + // in customerProvider!.filterMoneyList) { | ||
| 967 | + // item.select = false; | ||
| 968 | + // } | ||
| 969 | + // customerProvider!.controllersmoney.text = ''; | ||
| 970 | + // customerProvider!.controlleremoney.text = ''; | ||
| 971 | + // customerProvider!.controllerstime.text = ''; | ||
| 972 | + // customerProvider!.controlleretime.text = ''; | ||
| 973 | + // customerProvider!.controllernum.text = ''; | ||
| 974 | + // dropValue = 0; | ||
| 975 | + | ||
| 900 | }); | 976 | }); |
| 901 | } | 977 | } |
| 902 | }, | 978 | }, |
| @@ -953,8 +1029,9 @@ class _CustomerListPageState extends State<CustomerListPage> | @@ -953,8 +1029,9 @@ class _CustomerListPageState extends State<CustomerListPage> | ||
| 953 | // print('object'); | 1029 | // print('object'); |
| 954 | // }, | 1030 | // }, |
| 955 | child: Container( | 1031 | child: Container( |
| 956 | - height: ScreenUtil().setWidth(92 + 52 + 30 * 3 + 90) + | ||
| 957 | - ScreenUtil().statusBarHeight, | 1032 | + height: |
| 1033 | + ScreenUtil().setWidth(92 + 52 + 30 * 3 + 90 + 20) + | ||
| 1034 | + ScreenUtil().statusBarHeight, | ||
| 958 | // width: s, | 1035 | // width: s, |
| 959 | width: ScreenUtil().screenWidth, | 1036 | width: ScreenUtil().screenWidth, |
| 960 | // color: Colors.red, | 1037 | // color: Colors.red, |
| @@ -1200,19 +1277,25 @@ class _CustomerListPageState extends State<CustomerListPage> | @@ -1200,19 +1277,25 @@ class _CustomerListPageState extends State<CustomerListPage> | ||
| 1200 | mainAxisAlignment: MainAxisAlignment.spaceBetween, | 1277 | mainAxisAlignment: MainAxisAlignment.spaceBetween, |
| 1201 | children: [ | 1278 | children: [ |
| 1202 | _textWidget('人均消费金额', MyColours.color_515151, FontWeight.bold, 28), | 1279 | _textWidget('人均消费金额', MyColours.color_515151, FontWeight.bold, 28), |
| 1203 | - // GestureDetector( | ||
| 1204 | - // onTap: () { | ||
| 1205 | - // customerProvider.controllersmoney.text = ''; | ||
| 1206 | - // customerProvider.controlleremoney.text = ''; | ||
| 1207 | - // }, | ||
| 1208 | - // child: Container( | ||
| 1209 | - // color: Colors.white, | ||
| 1210 | - // height: ScreenUtil().setWidth(40), | ||
| 1211 | - // alignment: Alignment.center, | ||
| 1212 | - // padding: EdgeInsets.only(left: ScreenUtil().setWidth(130)), | ||
| 1213 | - // child: _textWidget( | ||
| 1214 | - // '清空', MyColours.color_199095, FontWeight.normal, 24), | ||
| 1215 | - // )) | 1280 | + GestureDetector( |
| 1281 | + onTap: () { | ||
| 1282 | + customerProvider!.controllersmoney.text = ''; | ||
| 1283 | + customerProvider!.controlleremoney.text = ''; | ||
| 1284 | + for (FilterBtnModel value | ||
| 1285 | + in customerProvider!.filterMoneyList) { | ||
| 1286 | + value.select = false; | ||
| 1287 | + } | ||
| 1288 | + // customerProvider.controllernum.text = ''; | ||
| 1289 | + state(() {}); | ||
| 1290 | + }, | ||
| 1291 | + child: Container( | ||
| 1292 | + color: Colors.white, | ||
| 1293 | + height: ScreenUtil().setWidth(40), | ||
| 1294 | + alignment: Alignment.center, | ||
| 1295 | + padding: EdgeInsets.only(left: ScreenUtil().setWidth(130)), | ||
| 1296 | + child: _textWidget( | ||
| 1297 | + '清空', MyColours.color_199095, FontWeight.normal, 24), | ||
| 1298 | + )) | ||
| 1216 | ], | 1299 | ], |
| 1217 | ), | 1300 | ), |
| 1218 | VEmptyView(20), | 1301 | VEmptyView(20), |
| @@ -1223,6 +1306,17 @@ class _CustomerListPageState extends State<CustomerListPage> | @@ -1223,6 +1306,17 @@ class _CustomerListPageState extends State<CustomerListPage> | ||
| 1223 | Expanded( | 1306 | Expanded( |
| 1224 | child: _textFeildWidget(customerProvider!.controllersmoney, | 1307 | child: _textFeildWidget(customerProvider!.controllersmoney, |
| 1225 | customerProvider!.smoneyFocus, state, (value) { | 1308 | customerProvider!.smoneyFocus, state, (value) { |
| 1309 | + for (FilterBtnModel value | ||
| 1310 | + in customerProvider!.filterMoneyList) { | ||
| 1311 | + value.select = false; | ||
| 1312 | + } | ||
| 1313 | + // customerProvider.controllernum.text = ''; | ||
| 1314 | + state(() {}); | ||
| 1315 | + | ||
| 1316 | + // setState(() {}); | ||
| 1317 | + // _searchSellerLocation(); | ||
| 1318 | + // customerProvider.searchData(value); | ||
| 1319 | + | ||
| 1226 | //输入框 | 1320 | //输入框 |
| 1227 | }, unit: '元')), | 1321 | }, unit: '元')), |
| 1228 | HEmptyView(10), | 1322 | HEmptyView(10), |
| @@ -1230,42 +1324,76 @@ class _CustomerListPageState extends State<CustomerListPage> | @@ -1230,42 +1324,76 @@ class _CustomerListPageState extends State<CustomerListPage> | ||
| 1230 | HEmptyView(10), | 1324 | HEmptyView(10), |
| 1231 | Expanded( | 1325 | Expanded( |
| 1232 | child: _textFeildWidget(customerProvider!.controlleremoney, | 1326 | child: _textFeildWidget(customerProvider!.controlleremoney, |
| 1233 | - customerProvider!.emoneyFocus, state, (value) {}, | ||
| 1234 | - unit: '元')), | 1327 | + customerProvider!.emoneyFocus, state, (value) { |
| 1328 | + for (FilterBtnModel value | ||
| 1329 | + in customerProvider!.filterMoneyList) { | ||
| 1330 | + value.select = false; | ||
| 1331 | + } | ||
| 1332 | + // customerProvider.controllernum.text = ''; | ||
| 1333 | + state(() {}); | ||
| 1334 | + }, unit: '元')), | ||
| 1235 | ], | 1335 | ], |
| 1236 | )), | 1336 | )), |
| 1237 | - VEmptyView(40), | ||
| 1238 | - Row( | ||
| 1239 | - mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 1240 | - children: [ | ||
| 1241 | - _textWidget('人均消费能力', MyColours.color_515151, FontWeight.bold, 28), | ||
| 1242 | - // GestureDetector( | ||
| 1243 | - // onTap: () { | ||
| 1244 | - // customerProvider.controllersmoney.text = ''; | ||
| 1245 | - // customerProvider.controlleremoney.text = ''; | ||
| 1246 | - // }, | ||
| 1247 | - // child: Container( | ||
| 1248 | - // color: Colors.white, | ||
| 1249 | - // height: ScreenUtil().setWidth(40), | ||
| 1250 | - // alignment: Alignment.center, | ||
| 1251 | - // padding: EdgeInsets.only(left: ScreenUtil().setWidth(130)), | ||
| 1252 | - // child: _textWidget( | ||
| 1253 | - // '清空', MyColours.color_199095, FontWeight.normal, 24), | ||
| 1254 | - // )) | ||
| 1255 | - ], | ||
| 1256 | - ), | ||
| 1257 | VEmptyView(20), | 1337 | VEmptyView(20), |
| 1258 | - Row( | ||
| 1259 | - children: [ | ||
| 1260 | - HEmptyView(20), | ||
| 1261 | - _textWidget('最高的', MyColours.color_199095, FontWeight.normal, 24), | ||
| 1262 | - HEmptyView(10), | ||
| 1263 | - Expanded( | ||
| 1264 | - child: _textFeildWidget(customerProvider!.controllermaxmoney, | ||
| 1265 | - customerProvider!.maxmoneyFocus, state, (value) {}, | ||
| 1266 | - unit: '%')), | ||
| 1267 | - ], | ||
| 1268 | - ), | 1338 | + Padding( |
| 1339 | + padding: EdgeInsets.only(left: w(10)), | ||
| 1340 | + child: Row(children: [ | ||
| 1341 | + _textWidget('或', MyColours.color_000000, FontWeight.normal, 24), | ||
| 1342 | + HEmptyView(20), | ||
| 1343 | + Wrap( | ||
| 1344 | + crossAxisAlignment: WrapCrossAlignment.center, | ||
| 1345 | + spacing: ScreenUtil().setWidth(20), | ||
| 1346 | + runSpacing: ScreenUtil().setWidth(20), | ||
| 1347 | + children: _buildFilterItem( | ||
| 1348 | + customerProvider!.filterMoneyList, | ||
| 1349 | + false, | ||
| 1350 | + (FilterBtnModel item) { | ||
| 1351 | + // if (customerProvider.stimeFocus.hasFocus) { | ||
| 1352 | + // customerProvider.controllerstime.text = item.id; | ||
| 1353 | + // } | ||
| 1354 | + // if (customerProvider.etimeFocus.hasFocus) { | ||
| 1355 | + // customerProvider.controlleretime.text = item.id; | ||
| 1356 | + // } | ||
| 1357 | + customerProvider!.controllersmoney.text = ''; | ||
| 1358 | + customerProvider!.controlleremoney.text = ''; | ||
| 1359 | + for (FilterBtnModel value | ||
| 1360 | + in customerProvider!.filterMoneyList) { | ||
| 1361 | + value.select = false; | ||
| 1362 | + } | ||
| 1363 | + for (FilterBtnModel value | ||
| 1364 | + in customerProvider!.filterMoneyList) { | ||
| 1365 | + if (item.id == value.id) { | ||
| 1366 | + state(() { | ||
| 1367 | + value.select = true; | ||
| 1368 | + }); | ||
| 1369 | + } | ||
| 1370 | + } | ||
| 1371 | + // state(() { | ||
| 1372 | + // item.select = !item.select; | ||
| 1373 | + // }); | ||
| 1374 | + }, | ||
| 1375 | + )) | ||
| 1376 | + ])), | ||
| 1377 | + VEmptyView(40), | ||
| 1378 | + // Row( | ||
| 1379 | + // mainAxisAlignment: MainAxisAlignment.spaceBetween, | ||
| 1380 | + // children: [ | ||
| 1381 | + // _textWidget('人均消费能力', MyColours.color_515151, FontWeight.bold, 28), | ||
| 1382 | + | ||
| 1383 | + // ], | ||
| 1384 | + // ), | ||
| 1385 | + // VEmptyView(20), | ||
| 1386 | + // Row( | ||
| 1387 | + // children: [ | ||
| 1388 | + // HEmptyView(20), | ||
| 1389 | + // _textWidget('最高的', MyColours.color_199095, FontWeight.normal, 24), | ||
| 1390 | + // HEmptyView(10), | ||
| 1391 | + // Expanded( | ||
| 1392 | + // child: _textFeildWidget(customerProvider!.controllermaxmoney, | ||
| 1393 | + // customerProvider!.maxmoneyFocus, state, (value) {}, | ||
| 1394 | + // unit: '%')), | ||
| 1395 | + // ], | ||
| 1396 | + // ), | ||
| 1269 | ], | 1397 | ], |
| 1270 | ); | 1398 | ); |
| 1271 | } | 1399 | } |
| @@ -1337,6 +1465,10 @@ class _CustomerListPageState extends State<CustomerListPage> | @@ -1337,6 +1465,10 @@ class _CustomerListPageState extends State<CustomerListPage> | ||
| 1337 | customerProvider!.controllerstime.text = ''; | 1465 | customerProvider!.controllerstime.text = ''; |
| 1338 | customerProvider!.controlleretime.text = ''; | 1466 | customerProvider!.controlleretime.text = ''; |
| 1339 | customerProvider!.controllernum.text = ''; | 1467 | customerProvider!.controllernum.text = ''; |
| 1468 | + for (FilterBtnModel value | ||
| 1469 | + in customerProvider!.filterDayList) { | ||
| 1470 | + value.select = false; | ||
| 1471 | + } | ||
| 1340 | state(() { | 1472 | state(() { |
| 1341 | dropValue = 0; | 1473 | dropValue = 0; |
| 1342 | }); | 1474 | }); |
| @@ -1624,6 +1756,15 @@ class _CustomerListPageState extends State<CustomerListPage> | @@ -1624,6 +1756,15 @@ class _CustomerListPageState extends State<CustomerListPage> | ||
| 1624 | focusNode: focusNode, | 1756 | focusNode: focusNode, |
| 1625 | // autofocus: true, | 1757 | // autofocus: true, |
| 1626 | 1758 | ||
| 1759 | + inputFormatters: unit == '天' | ||
| 1760 | + ? [FilteringTextInputFormatter.digitsOnly] | ||
| 1761 | + : unit == '元' | ||
| 1762 | + ? [ | ||
| 1763 | + FilteringTextInputFormatter.allow( | ||
| 1764 | + RegExp("[0-9.]")), | ||
| 1765 | + ] | ||
| 1766 | + : [], | ||
| 1767 | + | ||
| 1627 | style: TextStyle( | 1768 | style: TextStyle( |
| 1628 | color: MyColours.color_515151, | 1769 | color: MyColours.color_515151, |
| 1629 | fontSize: ScreenUtil().setSp(26)), | 1770 | fontSize: ScreenUtil().setSp(26)), |
| @@ -1683,9 +1824,10 @@ class _CustomerListPageState extends State<CustomerListPage> | @@ -1683,9 +1824,10 @@ class _CustomerListPageState extends State<CustomerListPage> | ||
| 1683 | bottomRight: Radius.circular(ScreenUtil().setWidth(20)), | 1824 | bottomRight: Radius.circular(ScreenUtil().setWidth(20)), |
| 1684 | bottomLeft: Radius.circular(ScreenUtil().setWidth(20)))), | 1825 | bottomLeft: Radius.circular(ScreenUtil().setWidth(20)))), |
| 1685 | margin: EdgeInsets.only( | 1826 | margin: EdgeInsets.only( |
| 1686 | - left: ScreenUtil().setWidth(40), | ||
| 1687 | - bottom: ScreenUtil().setWidth(140), | ||
| 1688 | - right: ScreenUtil().setWidth(40)), | 1827 | + // left: ScreenUtil().setWidth(40), |
| 1828 | + bottom: ScreenUtil().setWidth(140), | ||
| 1829 | + // right: ScreenUtil().setWidth(40) | ||
| 1830 | + ), | ||
| 1689 | padding: | 1831 | padding: |
| 1690 | EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(40)), | 1832 | EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(40)), |
| 1691 | child: Column( | 1833 | child: Column( |
| @@ -1716,7 +1858,7 @@ class _CustomerListPageState extends State<CustomerListPage> | @@ -1716,7 +1858,7 @@ class _CustomerListPageState extends State<CustomerListPage> | ||
| 1716 | VEmptyView(40), | 1858 | VEmptyView(40), |
| 1717 | _labelWidget(state), | 1859 | _labelWidget(state), |
| 1718 | VEmptyView(40), | 1860 | VEmptyView(40), |
| 1719 | - // _consume(state), | 1861 | + _consume(state), |
| 1720 | // VEmptyView(40), | 1862 | // VEmptyView(40), |
| 1721 | _advancedFilterWidget(state) | 1863 | _advancedFilterWidget(state) |
| 1722 | ], | 1864 | ], |
| @@ -1724,6 +1866,7 @@ class _CustomerListPageState extends State<CustomerListPage> | @@ -1724,6 +1866,7 @@ class _CustomerListPageState extends State<CustomerListPage> | ||
| 1724 | )), | 1866 | )), |
| 1725 | // ), | 1867 | // ), |
| 1726 | Row( | 1868 | Row( |
| 1869 | + mainAxisAlignment: MainAxisAlignment.center, | ||
| 1727 | children: [ | 1870 | children: [ |
| 1728 | Container( | 1871 | Container( |
| 1729 | width: ScreenUtil().screenWidth - | 1872 | width: ScreenUtil().screenWidth - |
| @@ -104,6 +104,7 @@ class CustomerProvider extends ChangeNotifier { | @@ -104,6 +104,7 @@ class CustomerProvider extends ChangeNotifier { | ||
| 104 | List<FilterBtnModel> filterHydList = []; //活跃度 | 104 | List<FilterBtnModel> filterHydList = []; //活跃度 |
| 105 | List<FilterBtnModel> filterLabelList = []; //自定义标签 | 105 | List<FilterBtnModel> filterLabelList = []; //自定义标签 |
| 106 | List<FilterBtnModel> filterDayList = []; //高级筛选---天数 7、30、60、120 | 106 | List<FilterBtnModel> filterDayList = []; //高级筛选---天数 7、30、60、120 |
| 107 | + List<FilterBtnModel> filterMoneyList = []; //0-100 100-200 200-300 300以上 | ||
| 107 | bool hydSelAll = false; | 108 | bool hydSelAll = false; |
| 108 | bool labelSelAll = false; | 109 | bool labelSelAll = false; |
| 109 | bool manageSelAll = false; | 110 | bool manageSelAll = false; |
| @@ -395,6 +396,41 @@ class CustomerProvider extends ChangeNotifier { | @@ -395,6 +396,41 @@ class CustomerProvider extends ChangeNotifier { | ||
| 395 | model3.select = false; | 396 | model3.select = false; |
| 396 | filterDayList.add(model3); | 397 | filterDayList.add(model3); |
| 397 | 398 | ||
| 399 | + | ||
| 400 | + | ||
| 401 | + | ||
| 402 | + filterMoneyList = []; | ||
| 403 | + FilterBtnModel modelm = FilterBtnModel(); | ||
| 404 | + modelm.id = '0-100'; | ||
| 405 | + modelm.title = '0-100'; | ||
| 406 | + modelm.select = false; | ||
| 407 | + filterMoneyList.add(modelm); | ||
| 408 | + FilterBtnModel model1m = FilterBtnModel(); | ||
| 409 | + model1m.id = '100-200'; | ||
| 410 | + model1m.title = '100-200'; | ||
| 411 | + model1m.select = false; | ||
| 412 | + filterMoneyList.add(model1m); | ||
| 413 | + FilterBtnModel model2m = FilterBtnModel(); | ||
| 414 | + model2m.id = '200-300'; | ||
| 415 | + model2m.title = '200-300'; | ||
| 416 | + model2m.select = false; | ||
| 417 | + filterMoneyList.add(model2m); | ||
| 418 | + FilterBtnModel model3m = FilterBtnModel(); | ||
| 419 | + model3m.id = '300'; | ||
| 420 | + model3m.title = '300以上'; | ||
| 421 | + model3m.select = false; | ||
| 422 | + filterMoneyList.add(model3m); | ||
| 423 | + | ||
| 424 | + | ||
| 425 | + | ||
| 426 | + | ||
| 427 | + | ||
| 428 | + | ||
| 429 | + | ||
| 430 | + | ||
| 431 | + | ||
| 432 | + | ||
| 433 | + | ||
| 398 | filterHydList = []; | 434 | filterHydList = []; |
| 399 | // FilterBtnModel modelhyd1 = FilterBtnModel(); | 435 | // FilterBtnModel modelhyd1 = FilterBtnModel(); |
| 400 | // modelhyd1.id = '0'; | 436 | // modelhyd1.id = '0'; |
-
Please register or login to post a comment