Commit 34d63e6067f0037faba9a7ddb241d3985a55daa3

Authored by wdn127929
1 parent 310333f8

修复未来订单不能变更到此刻之后未来订单之前的时间bug

... ... @@ -18,19 +18,19 @@ if (flutterRoot == null) {
def flutterVersionCode = "531"
def flutterVersionCode = "532"
if (flutterVersionCode == null) {
flutterVersionCode = '531'
flutterVersionCode = '532'
}
def flutterVersionName = "5.3.1"
def flutterVersionName = "5.3.2"
if (flutterVersionName == null) {
flutterVersionName = '5.3.1'
flutterVersionName = '5.3.2'
}
... ...
... ... @@ -548,7 +548,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5312;
CURRENT_PROJECT_VERSION = 5320;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -563,7 +563,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 5.3.1;
MARKETING_VERSION = 5.3.2;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -696,7 +696,7 @@
CODE_SIGN_ENTITLEMENTS = "Runner/一键订Debug.entitlements";
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5312;
CURRENT_PROJECT_VERSION = 5320;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -711,7 +711,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 5.3.1;
MARKETING_VERSION = 5.3.2;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -732,7 +732,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5312;
CURRENT_PROJECT_VERSION = 5320;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -747,7 +747,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 5.3.1;
MARKETING_VERSION = 5.3.2;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = Runner;
PROVISIONING_PROFILE_SPECIFIER = "";
... ...
... ... @@ -865,9 +865,14 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> {
'${dateTime.month}' +
'-' +
'${dateTime.day}' +
' ${datanow[1]}:00'); //选中餐段开始时间戳
' ${datanow[1]}:00'); //选中餐段结束时间戳
if (nowStime.isBefore(reserveStime)) {
//选中的时间+餐段组合的时间戳结束日期和现在比较,< 现在,则会变更到过去
if (nowStime.isBefore(reserveStime)&&nowStime.isBefore(DateTime.now())) {
// 变更到过去餐段
return true;
} else {
... ... @@ -1169,19 +1174,53 @@ class _NoteBookChangeFPageOnlyState extends State<NoteBookChangeFPageOnly> {
//属于未来时间的订单
//将要变更的时间是不是过去
if (DateTime.parse('${day.year}' +
//选中的时间+餐段组合的时间戳结束日期和现在比较,< 现在,则会变更到过去
String times;
//找到当前餐段对应的时间段
if (currTimeIndex == 1) {
times = morning;
} else if (currTimeIndex == 2) {
times = noon;
} else if (currTimeIndex == 3) {
times = night;
}
//else if (currTimeIndex == 4) {
// times = meal1;
// } else if (currTimeIndex == 5) {
// times = meal2;
// }
//组装时间戳
List<String> datas = times.split('-');
// DateTime selectStime = DateTime.parse('${dateTimeSelect.year}' +
// '-' +
// '${dateTimeSelect.month}' +
// '-' +
// '${dateTimeSelect.day}' +
// ' ${datas[0]}:00'); //选中餐段开始时间戳
DateTime selectEtime = DateTime.parse(
'${day.year}' +
'-' +
'${day.month}' +
'-' +
'${day.day}' +
' 00:00:00')
.isBefore(DateTime.parse(
'${reservedate.year}' +
' ${datas[1]}:00'); //选中餐段结束时间戳
if (DateTime.parse('${day.year}' +
'-' +
'${reservedate.month}' +
'${day.month}' +
'-' +
'${reservedate.day}' +
' 00:00:00'))) {
'${day.day}' +
' 00:00:00')
.isBefore(DateTime.parse(
'${reservedate.year}' +
'-' +
'${reservedate.month}' +
'-' +
'${reservedate.day}' +
' 00:00:00')) &&
selectEtime
.isBefore(DateTime.now())) {
Utils.showToast('不允许变更订单到过去餐段');
return;
}
... ...