Commit 14244104b6db2709942c650fee62f44a50dbef65

Authored by 蓋亞光
2 parents 718ad81f d452b017

合并v1.4+

7babc7873f8d177769b987ba4c6c2911
\ No newline at end of file
<<<<<<< HEAD
c71e777004aab201609920eac28801f9
=======
7babc7873f8d177769b987ba4c6c2911
>>>>>>> 4ecf950986f1856303c83ccacadc2b15efeb20ac
... ...
... ... @@ -152,4 +152,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: a75497545d4391e2d394c3668e20cfb1c2bbd4aa
COCOAPODS: 1.9.3
COCOAPODS: 1.9.1
... ...
... ... @@ -409,7 +409,11 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
<<<<<<< HEAD
CURRENT_PROJECT_VERSION = 145;
=======
CURRENT_PROJECT_VERSION = 146;
>>>>>>> 4ecf950986f1856303c83ccacadc2b15efeb20ac
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
... ... @@ -422,7 +426,11 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
<<<<<<< HEAD
MARKETING_VERSION = 1.4.5;
=======
MARKETING_VERSION = 1.4.6;
>>>>>>> 4ecf950986f1856303c83ccacadc2b15efeb20ac
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "一键订";
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -551,7 +559,11 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
<<<<<<< HEAD
CURRENT_PROJECT_VERSION = 145;
=======
CURRENT_PROJECT_VERSION = 146;
>>>>>>> 4ecf950986f1856303c83ccacadc2b15efeb20ac
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
... ... @@ -564,7 +576,11 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
<<<<<<< HEAD
MARKETING_VERSION = 1.4.5;
=======
MARKETING_VERSION = 1.4.6;
>>>>>>> 4ecf950986f1856303c83ccacadc2b15efeb20ac
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "一键订";
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -584,7 +600,11 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
<<<<<<< HEAD
CURRENT_PROJECT_VERSION = 145;
=======
CURRENT_PROJECT_VERSION = 146;
>>>>>>> 4ecf950986f1856303c83ccacadc2b15efeb20ac
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
... ... @@ -597,7 +617,11 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
<<<<<<< HEAD
MARKETING_VERSION = 1.4.5;
=======
MARKETING_VERSION = 1.4.6;
>>>>>>> 4ecf950986f1856303c83ccacadc2b15efeb20ac
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);
}
//本地图片资源路径
... ...