Commit 7df6abad77cb7724ad5ff99a5c65e7166cfcb19a

Authored by 蓋亞光
1 parent c2e14607

1. 更改预订跨年bug修复

2. 已预订列表增加我录入的筛选
... ... @@ -11,14 +11,14 @@ if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = "141"
def flutterVersionCode = "145"
if (flutterVersionCode == null) {
flutterVersionCode = '141'
flutterVersionCode = '145'
}
def flutterVersionName = "1.4.1"
def flutterVersionName = "1.4.5"
if (flutterVersionName == null) {
flutterVersionName = '1.4.1'
flutterVersionName = '1.4.5'
}
apply plugin: 'com.android.application'
... ...
196f9f292c7f47fcf809595ac8fc6ce8
\ No newline at end of file
c71e777004aab201609920eac28801f9
\ No newline at end of file
... ...
... ... @@ -146,4 +146,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: a75497545d4391e2d394c3668e20cfb1c2bbd4aa
COCOAPODS: 1.9.3
COCOAPODS: 1.9.1
... ...
... ... @@ -406,7 +406,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 136;
CURRENT_PROJECT_VERSION = 145;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
... ... @@ -419,7 +419,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.3.6;
MARKETING_VERSION = 1.4.5;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "一键订";
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -548,7 +548,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 136;
CURRENT_PROJECT_VERSION = 145;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
... ... @@ -561,7 +561,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.3.6;
MARKETING_VERSION = 1.4.5;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "一键订";
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -581,7 +581,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 136;
CURRENT_PROJECT_VERSION = 145;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
... ... @@ -594,7 +594,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.3.6;
MARKETING_VERSION = 1.4.5;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "一键订";
PROVISIONING_PROFILE_SPECIFIER = "";
... ...
... ... @@ -115,7 +115,7 @@ class NotebookDetail {
String get ddateMd {
DateTime dateTime =
DateTime.fromMillisecondsSinceEpoch(int.parse(ddate) * 1000);
String md = Utils.addZeroNumber(dateTime.month) +
String md ="${dateTime.year}年"+Utils.addZeroNumber(dateTime.month) +
"月" +
Utils.addZeroNumber(dateTime.day) +
"日";
... ...
... ... @@ -57,6 +57,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
bool isRefused = false; //是否已拒绝
bool isPause = false; //是否暂停预订
bool isSelf=false;//订单是否自己处理
StateSetter refuseDialogState; //决绝弹框setState
@override
... ... @@ -91,7 +92,11 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
}
}
});
if (detailEntity.status != "0" && !isPause) {
if(detailEntity.status=="6"){//已拒绝不跳转
if(refuseDialogState!=null){
refuseDialogState((){});
}
}else if (detailEntity.status != "0") {//已拒绝
//已处理
Future.delayed(Duration(milliseconds: 200), () {
NavigatorUtil.goNotebookDetailPage(context, detailEntity.id,
... ... @@ -183,7 +188,6 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
VEmptyView(20),
GestureDetector(
onTap: () {
Navigator.of(context).pop();
setReserveStatus("6");
},
child: Container(
... ... @@ -304,6 +308,9 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
],
),
);
if(detailEntity.status=="6"&&isSelf==false){//订单已被拒绝
Navigator.of(context).pop();
}
return container;
},
);
... ... @@ -342,20 +349,21 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
"cause": json.encode(causeMap)
};
if (status == "6") {
isPause = true;
isPause = (ac=="1"?true:false);
params['ac'] = ac; //0=直接拒绝 1=拒绝并暂停预订
}
bool success = await detailModel.setReserveStatus(context, params,
ifPush: (isPause ? false : true), showLoading: true);
ifPush: (status=="6" ? false : true), showLoading: true);
if (success != null && success) {
bus.emit("refresh_book_list");
if (status == "6") {
isRefused = true;
}
if (isPause) {
isSelf=true;
_getOrderListData();
refuseDialogState(() {});
}
}else{
isSelf=false;
_getOrderListData();
}
}
... ...
import 'package:common_utils/common_utils.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/models/message.dart';
import 'package:one_key/pages/detail/handle_online_page.dart';
import 'package:one_key/pages/home/home_page.dart';
import 'package:one_key/provider/message_dialog_model.dart';
import 'package:one_key/provider/user_model.dart';
import 'package:one_key/res/colors.dart';
... ... @@ -10,6 +13,8 @@ import 'package:one_key/widgets/h_empty_view.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import 'package:provider/provider.dart';
import '../../app.dart';
class MessageDialogItem extends StatelessWidget {
final Message message;
... ...
... ... @@ -20,7 +20,6 @@ import 'package:one_key/widgets/page_exception.dart';
import 'package:provider/provider.dart';
class NoteBookPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
// TODO: implement createState
... ... @@ -41,6 +40,8 @@ class NoteBookPageState extends State<NoteBookPage> {
UserModel userModel;
int tabIndex = 0; //当前选中的tab 标签
@override
void initState() {
// TODO: implement initState
... ... @@ -275,6 +276,116 @@ class NoteBookPageState extends State<NoteBookPage> {
_reserveCountDay();
}
Widget _buildTabbar() {
Container container = Container(
color: MyColours.color_ffffff,
width: double.infinity,
padding: EdgeInsets.only(left: ScreenUtil().setWidth(20),top: ScreenUtil().setWidth(20)),
child: Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)),
child: GestureDetector(
onTap: () {
setState(() {
tabIndex = 0;
});
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"全部预订",
style: TextStyle(
color: tabIndex == 0
? MyColours.color_353535
: MyColours.color_999999,
fontSize: tabIndex == 0
? ScreenUtil().setSp(36)
: ScreenUtil().setSp(28),
fontWeight: tabIndex == 0
? FontWeight.bold
: FontWeight.normal),
),
Align(
alignment: Alignment.bottomCenter,
child: Container(
height: ScreenUtil().setWidth(6),
width: ScreenUtil().setWidth(60),
margin:
EdgeInsets.only(top: ScreenUtil().setWidth(8)),
decoration: tabIndex == 0
? BoxDecoration(color: MyColours.color_199095,borderRadius: BorderRadius.circular(
ScreenUtil()
.setWidth(
6)))
: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.circular(
ScreenUtil()
.setWidth(
6))
),
),
),
],
)),
),
Container(
padding: EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(20)),
child: GestureDetector(
onTap: () {
setState(() {
tabIndex = 1;
});
},
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
"我录入的",
style: TextStyle(
color: tabIndex == 1
? MyColours.color_353535
: MyColours.color_999999,
fontSize: tabIndex == 1
? ScreenUtil().setSp(36)
: ScreenUtil().setSp(28),
fontWeight: tabIndex == 1
? FontWeight.bold
: FontWeight.normal),
),
Align(
alignment: Alignment.bottomCenter,
child: Container(
height: ScreenUtil().setWidth(6),
width: ScreenUtil().setWidth(60),
margin:
EdgeInsets.only(top: ScreenUtil().setWidth(8)),
decoration: tabIndex == 1
? BoxDecoration(color: MyColours.color_199095,borderRadius: BorderRadius.circular(
ScreenUtil()
.setWidth(
6)))
: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.circular(
ScreenUtil()
.setWidth(
6))
),
),
),
],
)),
),
],
),
);
return container;
}
@override
Widget build(BuildContext context) {
// TODO: implement build
... ... @@ -284,10 +395,7 @@ class NoteBookPageState extends State<NoteBookPage> {
color: MyColours.color_f5f5f5,
child: Column(
children: <Widget>[
MyAppBar(
"已预订",
showBack: false,
),
_buildTabbar(),
Container(
color: MyColours.color_ffffff,
width: double.infinity,
... ...
... ... @@ -597,7 +597,7 @@ class NotebookDetailChangeModel with ChangeNotifier {
mdStr = item['title'];
}
}
String timeNowYear = DateUtil.formatDate(DateTime.now(), format: 'yyyy');
String timeNowYear = DateUtil.formatDate(DateUtil.getDateTimeByMs(int.parse(detailEntity.ddate)*1000), format: 'yyyy');
String ymyStr = timeNowYear + '-' + mdStr; //年月日
String timeStr = ymyStr + ' ' + ddateStr + ':00';
// int start = DateUtil.getDateMsByTimeStr(timeStr);
... ... @@ -716,7 +716,7 @@ class NotebookDetailChangeModel with ChangeNotifier {
mdStr = item['title'];
}
}
String timeNowYear = DateUtil.formatDate(DateTime.now(), format: 'yyyy');
String timeNowYear = DateUtil.formatDate(DateUtil.getDateTimeByMs(int.parse(detailEntity.ddate)*1000), format: 'yyyy');
String ymyStr = timeNowYear + '-' + mdStr; //年月日
String timeStr = ymyStr + ' ' + ddateStr + ':00';
// int start = DateUtil.getDateMsByTimeStr(timeStr);
... ...
... ... @@ -105,15 +105,15 @@ class NotebookDetailModel extends ChangeNotifier {
.catchError((error) {
print(error.toString());
});
if (baseResp == null) return false;
if (baseResp.code == Constant.status_success) {
if (baseResp == null)return false;
if (baseResp.code == Constant.status_success&&baseResp.data!=null) {
if (ifPush) {
NavigatorUtil.goNotebookDetailPage(context, params["rid"],
replace: true);
}
return true;
} else {
Utils.showToast(baseResp.msg);
Utils.showToast("订单已被处理");
return false;
}
}
... ...
... ... @@ -20,7 +20,7 @@ import '../app.dart';
class Utils {
static void showToast(String msg) {
Fluttertoast.showToast(msg: msg, gravity: ToastGravity.CENTER);
Fluttertoast.showToast(msg: msg, toastLength:Toast.LENGTH_LONG,gravity: ToastGravity.CENTER);
}
//本地图片资源路径
... ...