Commit 3c9b5a41467d893bebac1485a34d03c0068d1177

Authored by “gaiyaguang”
1 parent 8db2665e

合并

... ... @@ -404,7 +404,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 116;
CURRENT_PROJECT_VERSION = 121;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
... ... @@ -417,7 +417,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.1.6;
MARKETING_VERSION = 1.2.1;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "一键订";
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -546,7 +546,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 116;
CURRENT_PROJECT_VERSION = 121;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
... ... @@ -559,7 +559,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.1.6;
MARKETING_VERSION = 1.2.1;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "一键订";
PROVISIONING_PROFILE_SPECIFIER = "";
... ... @@ -579,7 +579,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 116;
CURRENT_PROJECT_VERSION = 121;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
... ... @@ -592,7 +592,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.1.6;
MARKETING_VERSION = 1.2.1;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "一键订";
PROVISIONING_PROFILE_SPECIFIER = "";
... ...
... ... @@ -21,8 +21,6 @@ import Flutter
}
}
GeneratedPluginRegistrant.register(with: self)
// NSDictionary * userInfo = [launchOptions objectForKey:UIApplicationLaunchOptionsRemoteNotificationKey];//获取
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
... ...
... ... @@ -22,11 +22,10 @@ import 'package:provider/provider.dart';
import 'package:one_key/utils/event_bus.dart';
class HandleOnlinePage extends StatefulWidget {
final String rid;
final String mid;
final bool fromNotify;
HandleOnlinePage(this.rid, this.mid, {this.fromNotify=false});
HandleOnlinePage(this.rid, this.mid, {this.fromNotify = false});
@override
State<StatefulWidget> createState() {
... ... @@ -61,8 +60,8 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
if (detailEntity.status != "0") {
//已处理
Future.delayed(Duration(milliseconds: 200), () {
NavigatorUtil.goNotebookDetailPage(context, detailEntity.id,fromNotify: widget.fromNotify,
replace: true);
NavigatorUtil.goNotebookDetailPage(context, detailEntity.id,
fromNotify: widget.fromNotify, replace: true);
});
setMessageStatus();
} else {
... ... @@ -132,7 +131,7 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
}
//处理在线预订
setReserveStatus(String status, {String tid = ""}) {
setReserveStatus(String status, {String tid = ""}) async {
bus.emit("remove_untreated_message", widget.mid);
UserModel userModel = Provider.of<UserModel>(context, listen: false);
Map<String, String> causeMap = {
... ... @@ -147,7 +146,11 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
"mid": widget.mid,
"cause": json.encode(causeMap)
};
detailModel.setReserveStatus(context, params,showLoading: true);
bool success =
await detailModel.setReserveStatus(context, params, showLoading: true);
if (success) {
bus.emit("refresh_book_list");
}
}
//处理在线预订
... ... @@ -165,241 +168,246 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
Widget build(BuildContext context) {
// TODO: implement build
return SafeArea(
child: WillPopScope(
child: detailEntity == null
? Container(
width: double.infinity,
height: double.infinity,
color: MyColours.color_ffffff,
)
: Column(
children: <Widget>[
MyAppBar(
"在线预订详情",
showBack: true,
callback: (){
if(widget.fromNotify){
NavigatorUtil.goHomePage(context,initialIndex: 0);
}else{
Navigator.of(context).pop();
}
},
),
Expanded(
child: DefaultTextStyle(
style: TextStyle(decoration: TextDecoration.none),
child: Container(
color: MyColours.color_ffffff,
child: Column(
children: <Widget>[
Expanded(
child: SingleChildScrollView(
child: Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(43)),
child: Column(
children: <Widget>[
RowMultiText(
"用餐时段", detailEntity.ddateMd),
Stack(
alignment: Alignment.center,
child: WillPopScope(
child: detailEntity == null
? Container(
width: double.infinity,
height: double.infinity,
color: MyColours.color_ffffff,
)
: Column(
children: <Widget>[
MyAppBar(
"在线预订详情",
showBack: true,
callback: () {
if (widget.fromNotify) {
NavigatorUtil.goHomePage(context, initialIndex: 0);
} else {
Navigator.of(context).pop();
}
},
),
Expanded(
child: DefaultTextStyle(
style: TextStyle(decoration: TextDecoration.none),
child: Container(
color: MyColours.color_ffffff,
child: Column(
children: <Widget>[
Expanded(
child: SingleChildScrollView(
child: Container(
color: MyColours.color_ffffff,
padding: EdgeInsets.symmetric(
horizontal:
ScreenUtil().setWidth(43)),
child: Column(
children: <Widget>[
Column(
RowMultiText(
"用餐时段", detailEntity.ddateMd),
Stack(
alignment: Alignment.center,
children: <Widget>[
RowMultiText("用餐时间",
detailEntity.ddateHm),
Offstage(
offstage:
detailEntity.type == "0"
? false
: true,
child: RowMultiText("用餐人数",
detailEntity.pnum),
Column(
children: <Widget>[
RowMultiText("用餐时间",
detailEntity.ddateHm),
Offstage(
offstage:
detailEntity.type == "0"
? false
: true,
child: RowMultiText("用餐人数",
detailEntity.pnum),
)
],
),
Image.asset(
detailEntity.statuImgAssets,
width:
ScreenUtil().setWidth(100),
height:
ScreenUtil().setWidth(30),
)
],
),
Image.asset(
detailEntity.statuImgAssets,
width: ScreenUtil().setWidth(100),
height: ScreenUtil().setWidth(30),
)
],
),
RowMultiText(
"包间需求",
(detailEntity.demands.length
.toString() +
"个") ??
""),
Align(
alignment: Alignment.centerRight,
child: Offstage(
offstage:
detailEntity.demands.length >
0
? false
: true,
child: Container(
height:
ScreenUtil().setHeight(210),
child: ListView.builder(
itemBuilder:
(BuildContext contxt,
int index) {
return NeedItem(detailEntity
.demands[index]);
},
itemCount: detailEntity
.demands.length,
shrinkWrap: true,
scrollDirection:
Axis.horizontal,
),
),
)),
RowMultiText(
"客户姓名", detailEntity.rnameStr),
RowMultiText(
"客户电话", detailEntity.phone),
RowMultiText(
"备注信息", detailEntity.cusdem ?? ""),
MyDivider(double.infinity,
ScreenUtil().setHeight(1)),
Container(
color: MyColours.color_ffffff,
width: double.infinity,
height: ScreenUtil().setHeight(80),
alignment: Alignment.center,
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
left: 0,
child: Text(
"客户经理",
style: TextStyle(
color: MyColours
.color_828282,
fontSize: ScreenUtil()
.setSp(30)),
),
),
Positioned(
right: 0,
child: GestureDetector(
onTap: () async {
List<String> list = [];
for (Manager manager
in managers) {
list.add(
manager.roleUserName);
}
DialogUtil
.showSelectCusmanDialog(
context, list,(value){
if(value!=null){
setState(() {
cusmanText = managers[
value.first]
.userName;
});
_setCurrManager();
}
})
.then((value) {
});
},
child: Text(
cusmanText,
style: TextStyle(
color: MyColours
.color_353535,
fontSize: ScreenUtil()
.setSp(30),
decoration: TextDecoration
.underline,
RowMultiText(
"包间需求",
(detailEntity.demands.length
.toString() +
"个") ??
""),
Align(
alignment: Alignment.centerRight,
child: Offstage(
offstage: detailEntity
.demands.length >
0
? false
: true,
child: Container(
height: ScreenUtil()
.setHeight(210),
child: ListView.builder(
itemBuilder:
(BuildContext contxt,
int index) {
return NeedItem(
detailEntity
.demands[index]);
},
itemCount: detailEntity
.demands.length,
shrinkWrap: true,
scrollDirection:
Axis.horizontal,
),
),
),
)
],
),
),
],
)),
),
),
Container(
margin: EdgeInsets.only(
top: ScreenUtil().setHeight(30),
bottom: ScreenUtil().setHeight(30)),
child: Column(
children: <Widget>[
CommonButton(
content: "安排包间",
width: 669,
height: 76,
fontSize: 34,
onPress: () async {
Map map = await NavigatorUtil
.goSelectTablePage(
context,
widget.rid,
int.parse(detailEntity.ddate) *
1000,
detailEntity.ddate_solt);
if (map['tid'] != null) {
setReserveStatus("5", tid: map['tid']);
}
},
)),
RowMultiText(
"客户姓名", detailEntity.rnameStr),
RowMultiText(
"客户电话", detailEntity.phone),
RowMultiText("备注信息",
detailEntity.cusdem ?? ""),
MyDivider(double.infinity,
ScreenUtil().setHeight(1)),
Container(
color: MyColours.color_ffffff,
width: double.infinity,
height: ScreenUtil().setHeight(80),
alignment: Alignment.center,
child: Stack(
alignment: Alignment.center,
children: <Widget>[
Positioned(
left: 0,
child: Text(
"客户经理",
style: TextStyle(
color: MyColours
.color_828282,
fontSize: ScreenUtil()
.setSp(30)),
),
),
Positioned(
right: 0,
child: GestureDetector(
onTap: () async {
List<String> list = [];
for (Manager manager
in managers) {
list.add(manager
.roleUserName);
}
DialogUtil
.showSelectCusmanDialog(
context, list,
(value) {
if (value != null) {
setState(() {
cusmanText =
managers[value
.first]
.userName;
});
_setCurrManager();
}
}).then((value) {});
},
child: Text(
cusmanText,
style: TextStyle(
color: MyColours
.color_353535,
fontSize: ScreenUtil()
.setSp(30),
decoration:
TextDecoration
.underline,
),
),
),
)
],
),
),
],
)),
),
VEmptyView(20),
Container(
width: ScreenUtil().setWidth(669),
height: ScreenUtil().setHeight(76),
decoration: BoxDecoration(
border: Border.all(
color: MyColours.color_199095),
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(5)),
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Expanded(
child: GestureDetector(
),
Container(
margin: EdgeInsets.only(
top: ScreenUtil().setHeight(30),
bottom: ScreenUtil().setHeight(30)),
child: Column(
children: <Widget>[
CommonButton(
content: "安排包间",
width: 669,
height: 76,
fontSize: 34,
onPress: () async {
Map map = await NavigatorUtil
.goSelectTablePage(
context,
widget.rid,
int.parse(detailEntity.ddate) *
1000,
detailEntity.ddate_solt);
if (map['tid'] != null) {
setReserveStatus("5",
tid: map['tid']);
}
},
),
VEmptyView(20),
Container(
width: ScreenUtil().setWidth(669),
height: ScreenUtil().setHeight(76),
decoration: BoxDecoration(
border: Border.all(
color: MyColours.color_199095),
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(5)),
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
Expanded(
child: GestureDetector(
child: Center(
child: Text(
"拒绝订单",
style: TextStyle(
color:
MyColours.color_199095,
MyColours.color_199095,
fontSize:
ScreenUtil().setSp(34)),
ScreenUtil().setSp(34)),
),
),
onTap: () {
_showRefuseDialog();
},
)),
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setHeight(52),
color: MyColours.color_199095,
),
Expanded(
child: GestureDetector(
MyDivider(
ScreenUtil().setWidth(2),
ScreenUtil().setHeight(52),
color: MyColours.color_199095,
),
Expanded(
child: GestureDetector(
child: Center(
child: Text(
"联系顾客",
style: TextStyle(
color:
MyColours.color_199095,
MyColours.color_199095,
fontSize:
ScreenUtil().setSp(34)),
ScreenUtil().setSp(34)),
),
),
onTap: () {
... ... @@ -413,26 +421,25 @@ class HandleOnlinePageState extends State<HandleOnlinePage> {
}
},
)),
],
),
)
],
),
)
],
))),
)
],
),
onWillPop: ()async{
if(widget.fromNotify){
NavigatorUtil.goHomePage(context,initialIndex: 0);
return true;
}
Navigator.of(context).pop();
],
),
)
],
),
)
],
))),
)
],
),
onWillPop: () async {
if (widget.fromNotify) {
NavigatorUtil.goHomePage(context, initialIndex: 0);
return true;
},
)
);
}
Navigator.of(context).pop();
return true;
},
));
}
}
... ...
... ... @@ -88,6 +88,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
@override
void dispose() {
super.dispose();
bus.off("refresh_detail");
}
... ... @@ -145,6 +146,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
bool success =
await detailModel.setReserveStatus(context, params, ifPush: false);
if (success) {
bus.emit("refresh_book_list");
_getReserveDetail();
}
}
... ... @@ -353,7 +355,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
Navigator.of(context).pop();
Loading.showLoading(context);
bus.emit("refresh_book_list");
setReserveStatus('4', desc: desc);
},
text: '确认',
... ... @@ -506,6 +508,12 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
RowMultiText("客户姓名", detailEntity.rnameStr),
RowMultiText(
"客户电话", detailEntity.phone ?? ""),
Offstage(
offstage: detailEntity.cusdem == '' ||
detailEntity.cusdem == null,
child: RowMultiText(
"备注信息", detailEntity.cusdem ?? ""),
),
MyDivider(double.infinity,
ScreenUtil().setHeight(1)),
Container(
... ... @@ -565,7 +573,8 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
),
),
Offstage(
offstage: detailEntity.note_name == '',
offstage: detailEntity.note_name == '' ||
detailEntity.note_name == null,
child: RowMultiText(
"记录人", detailEntity.note_name ?? ""),
),
... ...
... ... @@ -18,8 +18,10 @@ import 'package:one_key/provider/update_model.dart';
import 'package:one_key/provider/user_model.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/utils/log_util.dart';
import 'package:one_key/utils/misc.dart';
import 'package:one_key/utils/navigator_util.dart';
import 'package:one_key/utils/utils.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:tpns_flutter_plugin/tpns_flutter_plugin.dart';
... ... @@ -66,12 +68,12 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
create: (_) => MyModel(),
child: MyPage(),
));
WidgetsBinding.instance.addPostFrameCallback((_){
if(widget.initialIndex==0)return;
if(Platform.isAndroid){
WidgetsBinding.instance.addPostFrameCallback((_) {
if (widget.initialIndex == 0) return;
if (Platform.isAndroid) {
_getIntent();
}
Future.delayed(Duration(milliseconds: 300),(){
Future.delayed(Duration(milliseconds: 300), () {
initPlatformState();
});
Future.delayed(Duration(milliseconds: 30000), () {
... ... @@ -162,9 +164,9 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
},
xgPushClickAction: (Map<String, dynamic> msg) async {
print("flutter xgPushClickAction ${msg['custom']}");
if(Platform.isIOS&&msg!=null&&msg['custom']!=null){
Map<String,dynamic> custom=jsonDecode(msg['custom'].toString());
switch(custom["messageType"].toString()){
if (Platform.isIOS && msg != null && msg['custom'] != null) {
Map<String, dynamic> custom = jsonDecode(msg['custom'].toString());
switch (custom["messageType"].toString()) {
case "10":
NavigatorUtil.goNotebookDetailPage(
context, custom['rid'].toString(),
... ... @@ -240,18 +242,46 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
void didChangeAppLifecycleState(AppLifecycleState state) async {
// TODO: implement didChangeAppLifecycleState
super.didChangeAppLifecycleState(state);
switch (state) {
case AppLifecycleState.resumed: //应用前台可见
case AppLifecycleState.resumed: //应用前台可见,并且响应用户输入
getUntreatedMessage();
break;
case AppLifecycleState.inactive:
print('inactive');
break;
case AppLifecycleState.paused:
print('paused');
break;
case AppLifecycleState.detached:
print('detached');
break;
default:
break;
}
}
// 系统窗口相关改变回调
void didChangeMetrics() {
super.didChangeMetrics();
print('fffff');
}
// // 系统亮度改变回调
// void didChangePlatformBrightness() {
// super.didChangePlatformBrightness();
// print('fdddddd');
// }
// // 文本缩放系数改变回调
// void didChangeTextScaleFactor() {}
// // 内存不足警告回调
// void didHaveMemoryPressure() {}
@override
Widget build(BuildContext context) {
// TODO: implement build
... ...
... ... @@ -62,7 +62,7 @@ class NotebookDetailModel extends ChangeNotifier {
//安排在线预订
setReserveStatus(BuildContext context, Map<String, String> params,
{ifPush = true,showLoading=false}) async {
{ifPush = true, showLoading = false}) async {
BaseResp<Map<String, dynamic>> baseResp = await DioUtil()
.request<Map<String, dynamic>>(
context, Method.get, HttpUrl.set_reserve_status,
... ... @@ -74,9 +74,8 @@ class NotebookDetailModel extends ChangeNotifier {
if (ifPush) {
NavigatorUtil.goNotebookDetailPage(context, params["rid"],
replace: true);
} else {
return true;
}
return true;
} else {
Utils.showToast(baseResp.msg);
}
... ...
... ... @@ -8,7 +8,6 @@ class Tools {
Future<Map> getIntent() async {
Map result = await _channel.invokeMethod("getIntent");
// Utils.showToast(json.encode(result));
return result;
}
}
... ...
... ... @@ -154,7 +154,7 @@ packages:
name: connectivity
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.9+2"
version: "0.4.9+3"
connectivity_for_web:
dependency: transitive
description:
... ... @@ -168,7 +168,7 @@ packages:
name: connectivity_macos
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.0+4"
version: "0.1.0+5"
connectivity_platform_interface:
dependency: transitive
description:
... ... @@ -238,7 +238,7 @@ packages:
name: device_info
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.4.2+7"
version: "0.4.2+8"
device_info_platform_interface:
dependency: transitive
description:
... ... @@ -260,6 +260,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.3"
file:
dependency: transitive
description:
... ... @@ -561,7 +568,7 @@ packages:
name: path_provider
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.6.14"
version: "1.6.18"
path_provider_linux:
dependency: transitive
description:
... ... @@ -575,7 +582,7 @@ packages:
name: path_provider_macos
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.4+3"
version: "0.0.4+4"
path_provider_platform_interface:
dependency: transitive
description:
... ... @@ -583,6 +590,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.0.3"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.4+1"
pedantic:
dependency: transitive
description:
... ... @@ -611,13 +625,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.2.1"
platform_detect:
dependency: transitive
description:
name: platform_detect
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.4.0"
plugin_platform_interface:
dependency: transitive
description:
... ... @@ -687,7 +694,7 @@ packages:
name: shared_preferences
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.5.10"
version: "0.5.12"
shared_preferences_linux:
dependency: transitive
description:
... ... @@ -716,6 +723,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.2+7"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.1+1"
shelf:
dependency: transitive
description:
... ... @@ -855,7 +869,7 @@ packages:
name: url_launcher
url: "https://pub.flutter-io.cn"
source: hosted
version: "5.6.0"
version: "5.7.2"
url_launcher_linux:
dependency: transitive
description:
... ... @@ -869,7 +883,7 @@ packages:
name: url_launcher_macos
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.1+7"
version: "0.0.1+8"
url_launcher_platform_interface:
dependency: transitive
description:
... ... @@ -883,7 +897,7 @@ packages:
name: url_launcher_web
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.3+2"
version: "0.1.4+1"
url_launcher_windows:
dependency: transitive
description:
... ... @@ -925,7 +939,14 @@ packages:
name: webview_flutter
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.22+1"
version: "0.3.24"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.7.3"
xdg_directories:
dependency: transitive
description:
... ...
... ... @@ -39,6 +39,7 @@ dependencies:
fluttertoast: ^3.1.3
# 权限管理
permission_handler: ^4.4.0
# permission_handler: ^5.0.1+1
# 文件系统访问
path_provider: ^1.6.5
## 官方image组件扩展,支持多种图片效果展示
... ...