Commit 8bedf33eb7a56cd27b79f67e1950a3a4faddeaa5

Authored by weixin_45529955
1 parent 058f5ede

桌位页面显示预订数量为限制

... ... @@ -535,7 +535,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 5634;
CURRENT_PROJECT_VERSION = 5641;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
... ... @@ -544,7 +544,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 5.6.3;
MARKETING_VERSION = 5.6.4;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
... ... @@ -718,7 +718,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 5634;
CURRENT_PROJECT_VERSION = 5641;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
... ... @@ -727,7 +727,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 5.6.3;
MARKETING_VERSION = 5.6.4;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
... ... @@ -744,7 +744,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 5634;
CURRENT_PROJECT_VERSION = 5641;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
... ... @@ -753,7 +753,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 5.6.3;
MARKETING_VERSION = 5.6.4;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
... ...
... ... @@ -248,29 +248,53 @@ class TableManagerModelOrReserve with ChangeNotifier {
if (limitNum != -1) {
//存在配置
int sum = 0;
// int sum = 0;
List<String> rids = [];
tablesOrReserveData?.forEach((element) {
element.tableList?.forEach((subelement) {
if (subelement.reserveList != null) {
sum++;
}
if (sum > limitNum) {
subelement.reserveList = null;
// sum++;
if (!rids.contains(subelement.reserveList!.id!) &&
rids.length < limitNum) {
rids.add(subelement.reserveList!.id!);
}
if (rids.length == limitNum &&
!rids.contains(subelement.reserveList!.id!)) {
subelement.reserveList = null;
}
}
});
});
int sumShow = 0;
List<String> ridsShow = [];
tablesOrReserveDataShow?.forEach((element) {
element.tableList?.forEach((subelement) {
if (subelement.reserveList != null) {
sumShow++;
}
if (sumShow > limitNum) {
subelement.reserveList = null;
// sum++;
if (!ridsShow.contains(subelement.reserveList!.id!) &&
ridsShow.length < limitNum) {
ridsShow.add(subelement.reserveList!.id!);
}
if (ridsShow.length == limitNum &&
!ridsShow.contains(subelement.reserveList!.id!)) {
subelement.reserveList = null;
}
}
});
});
// int sumShow = 0;
// tablesOrReserveDataShow?.forEach((element) {
// element.tableList?.forEach((subelement) {
// if (subelement.reserveList != null) {
// sumShow++;
// }
// if (sumShow > limitNum) {
// subelement.reserveList = null;
// }
// });
// });
}
//
... ...