Commit 52d79c65b1881272d144ba97adb171856492840a

Authored by wdn127929
1 parent 3e9c602e

经理拍菜桌位信息结构修复,华为上线版本

... ... @@ -3300,8 +3300,15 @@ class _OrderAdvanceEidtPageState extends State<OrderAdvanceEidtPage> {
isCar = false;
bool success = await setPlanCookByReserve();
if (success) {
Navigator.pop(context);
Navigator.pop(context);
if (Navigator.canPop(context)) {
Navigator.pop(context);
if (Navigator.canPop(context)) {
Navigator.pop(context);
}
}
// Navigator.pop(context);
// Navigator.pop(context);
}
// Navigator.pop(context);
// NavigatorUtil.goFinalPlanDishPage(context);
... ...
... ... @@ -147,7 +147,7 @@ class _OrderPreviewPageState extends State<OrderPreviewPage> {
Provider.of<UserModel>(context, listen: false).user.sellerAddr;
String tables = '';
widget.detailEntity.tables.forEach((element) {
tables += '${element.name}、';
tables += '${element}、';
});
if (tables.endsWith('、')) {
tables = tables.substring(0, tables.length - 1);
... ...
... ... @@ -5,11 +5,13 @@ import 'package:flutter/material.dart';
import 'package:one_key/utils/dialog_util.dart';
import 'package:permission_handler/permission_handler.dart';
import '../app.dart';
import 'misc.dart';
class CallLogUtils {
static Future<Iterable<CallLogEntry>> getCallLog(context) async {
try {
if (!(await checkPermission(Permission.phone))) {
String title = '通话记录和电话';
PermissionStatus status = await permissionStatus(Permission.phone);
... ... @@ -17,7 +19,8 @@ class CallLogUtils {
//用户选择不在弹出权限提示框
print('never');
// Navigator.pop(context);
DialogUtil.openAlertDialog(context, '未获得${title}权限',
BuildContext context1 = App.navigatorKey.currentState.overlay.context;
DialogUtil.openAlertDialog(context1, '未获得${title}权限',
"请在手机的权限管理里,将${title}权限开启", '去设置', 340.0, onTap: () {
openSetting();
Navigator.pop(context, '');
... ... @@ -29,7 +32,8 @@ class CallLogUtils {
try {
//全局提示权限使用目的
if (Platform.isAndroid) {
DialogUtil.showAuthorityDestination(context, 'h_call',
BuildContext context1 = App.navigatorKey.currentState.overlay.context;
DialogUtil.showAuthorityDestination(context1, 'h_call',
'通话记录和电话权限使用说明', '直接从通话记录中获得客户电话号码,快速录入预订信息。');
}
... ... @@ -41,7 +45,8 @@ class CallLogUtils {
} else {
// Navigator.pop(context);
//拒绝通讯录权限 , 苹果拒绝权限后,不再提示权限框,进入此处
DialogUtil.openAlertDialog(context, '未获得${title}权限',
BuildContext context1 = App.navigatorKey.currentState.overlay.context;
DialogUtil.openAlertDialog(context1, '未获得${title}权限',
"请在手机的权限管理里,将${title}权限开启。", '去设置', 340.0, onTap: () {
openSetting();
Navigator.pop(context, '');
... ...
... ... @@ -727,11 +727,11 @@ class DialogUtil {
static showAuthorityDestination(
BuildContext context, String name, String title, String subTitle) async {
Timer _timer = Timer(const Duration(seconds: 1), () {
// if(!TickerMode.of(context)){
Navigator.of(context).pop(true);
// }
});
// Timer _timer = Timer(const Duration(seconds: 1), () {
// // if(!TickerMode.of(context)){
// Navigator.of(context).pop(true);
// // }
// });
final action = await showDialog(
context: context,
barrierDismissible: true,
... ... @@ -741,48 +741,53 @@ class DialogUtil {
// locationState = state;
return Material(
color: Colors.transparent,
child: Column(mainAxisSize: MainAxisSize.min, children: [
VEmptyView(40),
Container(
// width: double.infinity,
child: InkWell(
onTap: () {
Navigator.of(context).pop(true);
},
child: Column(mainAxisSize: MainAxisSize.min, children: [
VEmptyView(40),
Container(
// width: double.infinity,
margin: EdgeInsets.symmetric(horizontal: w(10)),
padding: EdgeInsets.symmetric(
horizontal: w(20), vertical: w(12)),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.circular(
r(5),
)),
child: Row(children: <Widget>[
Image.asset(
Utils.getImgPath(
'$name',
),
width: w(30)),
HEmptyView(68),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('$title',
style: TextStyle(
fontSize: font(16),
fontWeight: FontWeight.bold,
color: MyColours.color_E6000000)),
VEmptyView(20),
Text('$subTitle',
style: TextStyle(
fontSize: font(16),
color: MyColours.color_26000000))
])),
]))
]));
margin: EdgeInsets.symmetric(horizontal: w(10)),
padding: EdgeInsets.symmetric(
horizontal: w(20), vertical: w(12)),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.circular(
r(5),
)),
child: Row(children: <Widget>[
Image.asset(
Utils.getImgPath(
'$name',
),
width: w(30)),
HEmptyView(68),
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Text('$title',
style: TextStyle(
fontSize: font(16),
fontWeight: FontWeight.bold,
color: MyColours.color_E6000000)),
VEmptyView(20),
Text('$subTitle',
style: TextStyle(
fontSize: font(16),
color: MyColours.color_26000000))
])),
]))
])));
});
});
print(action);
_timer.cancel();
// _timer.cancel();
return action;
}
... ... @@ -6977,103 +6982,112 @@ class DialogUtil {
});
if (online > 0) {
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'在线预订 ${online}个',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
)));
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'在线预订 ${online}个',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
)));
}
if (cancel > 0) {
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'取消预订 ${cancel}个',
style: TextStyle(
color: MyColours.color_515151, fontSize: font(16)),
)));
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'取消预订 ${cancel}个',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
)));
}
if (order > 0) {
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'提前点餐 ${order}个',
style: TextStyle(
color: MyColours.color_515151, fontSize: font(16)),
)));
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'提前点餐 ${order}个',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
)));
}
if (pay > 0) {
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'在线买单 ${pay}个',
style: TextStyle(
color: MyColours.color_515151, fontSize: font(16)),
)));
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'在线买单 ${pay}个',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
)));
}
if (payFinish > 0) {
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'买单通知 ${payFinish}个',
style: TextStyle(
color: MyColours.color_515151, fontSize: font(16)),
)));
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'买单通知 ${payFinish}个',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
)));
}
if (invoice > 0) {
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'发票申请 ${invoice}个',
style: TextStyle(
color: MyColours.color_515151, fontSize: font(16)),
)));
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'发票申请 ${invoice}个',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
)));
}
if (instore > 0) {
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'店内消息 ${instore}个',
style: TextStyle(
color: MyColours.color_515151, fontSize: font(16)),
)));
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'店内消息 ${instore}个',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
)));
}
if (recharge > 0) {
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'会员充值 ${recharge}个',
style: TextStyle(
color: MyColours.color_515151, fontSize: font(16)),
)));
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'会员充值 ${recharge}个',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
)));
}
if (wine > 0) {
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'存酒超期 ${wine}个',
style: TextStyle(
color: MyColours.color_515151, fontSize: font(16)),
)));
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'存酒超期 ${wine}个',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
)));
}
if (commemoration > 0) {
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'纪念日提醒 ${commemoration}个',
style: TextStyle(
color: MyColours.color_515151, fontSize: font(16)),
)));
widgetData.add(Padding(
padding: EdgeInsets.only(bottom: w(10)),
child: Text(
'纪念日提醒 ${commemoration}个',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
)));
}
widgetData.add(Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Spacer(),
RoundButton(
text:"立即处理",
text: "立即处理",
width: w(100),
height: w(43),
fontSize: 28,
... ... @@ -7081,7 +7095,7 @@ class DialogUtil {
gradientEnd: MyColours.color_ffffff,
borderColor: MyColours.color_438E93,
radius: r(5),
textColor:MyColours.color_438E93,
textColor: MyColours.color_438E93,
onPressed: () {
NavigatorUtil.goHomePage(context, initialIndex: 0);
},
... ... @@ -7107,7 +7121,9 @@ class DialogUtil {
child: Text(
"您有${messageModel.messages.length}条新的消息",
style: TextStyle(
color:model.messages.length > 3? MyColours.color_ffffff: MyColours.color_333333,
color: model.messages.length > 3
? MyColours.color_ffffff
: MyColours.color_333333,
fontSize: ScreenUtil().setSp(32)),
)),
Align(
... ... @@ -7127,7 +7143,9 @@ class DialogUtil {
bottom: ScreenUtil().setWidth(38),
),
child: Image.asset(
messageModel.messages.length > 3? "assets/dialog_close.png": "assets/close.png",
messageModel.messages.length > 3
? "assets/dialog_close.png"
: "assets/close.png",
width: ScreenUtil().setWidth(28),
height: ScreenUtil().setWidth(28),
),
... ...