Commit 84d5981d173066ca246ec2043be0f6c4f54118f3

Authored by wdn127929
1 parent fd12cec2

新建创建桌位分枝前提交

@@ -11,14 +11,14 @@ if (flutterRoot == null) { @@ -11,14 +11,14 @@ if (flutterRoot == null) {
11 throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 11 throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 } 12 }
13 13
14 -def flutterVersionCode = "231" 14 +def flutterVersionCode = "232"
15 if (flutterVersionCode == null) { 15 if (flutterVersionCode == null) {
16 - flutterVersionCode = '231' 16 + flutterVersionCode = '232'
17 } 17 }
18 18
19 -def flutterVersionName = "2.3.1" 19 +def flutterVersionName = "2.3.2"
20 if (flutterVersionName == null) { 20 if (flutterVersionName == null) {
21 - flutterVersionName = '2.3.1' 21 + flutterVersionName = '2.3.2'
22 } 22 }
23 23
24 apply plugin: 'com.android.application' 24 apply plugin: 'com.android.application'
@@ -487,7 +487,7 @@ @@ -487,7 +487,7 @@
487 "$(inherited)", 487 "$(inherited)",
488 "$(PROJECT_DIR)/Flutter", 488 "$(PROJECT_DIR)/Flutter",
489 ); 489 );
490 - MARKETING_VERSION = 2.3.1; 490 + MARKETING_VERSION = 2.3.2;
491 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 491 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
492 PRODUCT_NAME = Runner; 492 PRODUCT_NAME = Runner;
493 PROVISIONING_PROFILE_SPECIFIER = ""; 493 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -631,7 +631,7 @@ @@ -631,7 +631,7 @@
631 "$(inherited)", 631 "$(inherited)",
632 "$(PROJECT_DIR)/Flutter", 632 "$(PROJECT_DIR)/Flutter",
633 ); 633 );
634 - MARKETING_VERSION = 2.3.1; 634 + MARKETING_VERSION = 2.3.2;
635 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 635 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
636 PRODUCT_NAME = Runner; 636 PRODUCT_NAME = Runner;
637 PROVISIONING_PROFILE_SPECIFIER = ""; 637 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -666,7 +666,7 @@ @@ -666,7 +666,7 @@
666 "$(inherited)", 666 "$(inherited)",
667 "$(PROJECT_DIR)/Flutter", 667 "$(PROJECT_DIR)/Flutter",
668 ); 668 );
669 - MARKETING_VERSION = 2.3.1; 669 + MARKETING_VERSION = 2.3.2;
670 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine; 670 PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
671 PRODUCT_NAME = Runner; 671 PRODUCT_NAME = Runner;
672 PROVISIONING_PROFILE_SPECIFIER = ""; 672 PROVISIONING_PROFILE_SPECIFIER = "";
@@ -601,7 +601,16 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -601,7 +601,16 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
601 )), 601 )),
602 RowMultiText( 602 RowMultiText(
603 "客户姓名", detailEntity.rnameStr), 603 "客户姓名", detailEntity.rnameStr),
604 - RowMultiText("客户电话", formatPhone), 604 + InkWell(
  605 + onTap: () {
  606 + if (formatPhone != null &&
  607 + formatPhone != '') {
  608 + DialogUtil.goPhone(formatPhone);
  609 + }
  610 + },
  611 + child:
  612 + RowMultiText("客户电话", formatPhone),
  613 + ),
605 Offstage( 614 Offstage(
606 offstage: detailEntity.cusdem == '' || 615 offstage: detailEntity.cusdem == '' ||
607 detailEntity.cusdem == null, 616 detailEntity.cusdem == null,
@@ -725,7 +725,7 @@ class _HomeEnterPageState extends State<HomeEnterPage> { @@ -725,7 +725,7 @@ class _HomeEnterPageState extends State<HomeEnterPage> {
725 if (tempOrder.length > 0) { 725 if (tempOrder.length > 0) {
726 for (String item in tempOrder) { 726 for (String item in tempOrder) {
727 if (table.id == item) { 727 if (table.id == item) {
728 - Utils.showToast('该桌位已被其他同事预定!'); 728 + Utils.showToast('该桌位已被其他同事预订!');
729 //今天 明天 其他天 729 //今天 明天 其他天
730 String tempTime = _homeEnterModel.ddateStr; 730 String tempTime = _homeEnterModel.ddateStr;
731 if (_homeEnterModel.ddateStr == '') { 731 if (_homeEnterModel.ddateStr == '') {
@@ -14,15 +14,168 @@ import 'package:one_key/route/navigator_util.dart'; @@ -14,15 +14,168 @@ import 'package:one_key/route/navigator_util.dart';
14 import 'package:one_key/utils/utils.dart'; 14 import 'package:one_key/utils/utils.dart';
15 import 'package:one_key/widgets/MyDivider.dart'; 15 import 'package:one_key/widgets/MyDivider.dart';
16 import 'package:one_key/widgets/common_button.dart'; 16 import 'package:one_key/widgets/common_button.dart';
  17 +import 'package:one_key/widgets/h_empty_view.dart';
17 import 'package:one_key/widgets/table_item.dart'; 18 import 'package:one_key/widgets/table_item.dart';
18 import 'package:one_key/widgets/v_empty_view.dart'; 19 import 'package:one_key/widgets/v_empty_view.dart';
19 import 'package:provider/provider.dart'; 20 import 'package:provider/provider.dart';
20 import 'package:table_calendar/table_calendar.dart'; 21 import 'package:table_calendar/table_calendar.dart';
21 import 'package:one_key/models/table.dart' as t; 22 import 'package:one_key/models/table.dart' as t;
  23 +import 'package:url_launcher/url_launcher.dart';
22 24
23 typedef CustomCallBack = void Function(Object object); 25 typedef CustomCallBack = void Function(Object object);
24 26
25 class DialogUtil { 27 class DialogUtil {
  28 + //跳转拨打电话页面
  29 + static goPhone(String phoneNum) async {
  30 + String url = "tel:$phoneNum";
  31 + if (await canLaunch(url)) {
  32 + await launch(url);
  33 + } else {
  34 + LogUtil.e("Could not launch $url");
  35 + }
  36 + }
  37 +
  38 + /*
  39 + 底部选择弹框
  40 + */
  41 + static showPhoneSelectBottomSheet(context, String phone) async {
  42 + // list.insert(0, '立即在线预订');
  43 + Widget dialog = Container(
  44 + width: double.infinity,
  45 + height: ScreenUtil().setWidth(114) * 2 +
  46 + ScreenUtil().setWidth(114) +
  47 + ScreenUtil().setWidth(70),
  48 + decoration: BoxDecoration(
  49 + color: MyColours.color_ffffff,
  50 + borderRadius: BorderRadius.only(
  51 + topLeft: Radius.circular(ScreenUtil().setWidth(40)),
  52 + topRight: Radius.circular(ScreenUtil().setWidth(40)))),
  53 + child: Column(
  54 + children: <Widget>[
  55 + VEmptyView(60),
  56 + Container(
  57 + height: ScreenUtil().setWidth(44),
  58 + alignment: Alignment.center,
  59 + child: Text(phone,
  60 + style: TextStyle(
  61 + color: MyColours.color_666666,
  62 + fontSize: ScreenUtil().setSp(36)))),
  63 + VEmptyView(60),
  64 + InkWell(
  65 + child: Container(
  66 + width: double.infinity,
  67 + height: ScreenUtil().setWidth(114),
  68 + alignment: Alignment.topCenter,
  69 + color: MyColours.color_ffffff,
  70 + child: Container(
  71 + width: ScreenUtil().setWidth(670),
  72 + height: ScreenUtil().setWidth(84),
  73 + alignment: Alignment.center,
  74 + decoration: BoxDecoration(
  75 + color: MyColours.color_f5f5f5,
  76 + borderRadius:
  77 + BorderRadius.circular(ScreenUtil().setWidth(42))),
  78 + child: Text(
  79 + "呼叫",
  80 + style: TextStyle(
  81 + color: MyColours.color_666666,
  82 + fontSize: ScreenUtil().setSp(28)),
  83 + ),
  84 + )),
  85 + onTap: () {
  86 + Navigator.of(context).pop();
  87 + },
  88 + ),
  89 + InkWell(
  90 + child: Container(
  91 + width: double.infinity,
  92 + height: ScreenUtil().setWidth(114),
  93 + alignment: Alignment.topCenter,
  94 + color: MyColours.color_ffffff,
  95 + child: Container(
  96 + width: ScreenUtil().setWidth(670),
  97 + height: ScreenUtil().setWidth(84),
  98 + alignment: Alignment.center,
  99 + decoration: BoxDecoration(
  100 + color: MyColours.color_f5f5f5,
  101 + borderRadius:
  102 + BorderRadius.circular(ScreenUtil().setWidth(42))),
  103 + child: Text(
  104 + "取消",
  105 + style: TextStyle(
  106 + color: MyColours.color_666666,
  107 + fontSize: ScreenUtil().setSp(28)),
  108 + ),
  109 + )),
  110 + onTap: () {
  111 + Navigator.of(context).pop();
  112 + },
  113 + )
  114 + ],
  115 + ),
  116 + );
  117 + final option = await showModalBottomSheet(
  118 + context: context,
  119 + backgroundColor: Colors.transparent,
  120 + builder: (context) {
  121 + return Stack(
  122 + children: <Widget>[dialog],
  123 + );
  124 + });
  125 + }
  126 +
  127 + //构建电话Item
  128 + static _buildPhoneItem(List<dynamic> list) {
  129 + List<Widget> items = [];
  130 + for (int i = 0; i < list.length; i++) {
  131 + if (i > 0 && i < list.length) {
  132 + items.add(Container(
  133 + margin: EdgeInsets.only(
  134 + left: ScreenUtil().setWidth(144),
  135 + right: ScreenUtil().setWidth(40)),
  136 + height: ScreenUtil().setWidth(1),
  137 + color: MyColours.color_e5e5e5,
  138 + ));
  139 + }
  140 + items.add(
  141 + InkWell(
  142 + child: Container(
  143 + width: double.infinity,
  144 + height: ScreenUtil().setWidth(156),
  145 + padding: EdgeInsets.symmetric(
  146 + horizontal: ScreenUtil().setWidth(40),
  147 + vertical: ScreenUtil().setWidth(30)),
  148 + alignment: Alignment.center,
  149 + decoration: i == 0
  150 + ? BoxDecoration(
  151 + color: MyColours.color_ffffff,
  152 + borderRadius: BorderRadius.only(
  153 + topLeft: Radius.circular(ScreenUtil().setWidth(40)),
  154 + topRight: Radius.circular(ScreenUtil().setWidth(40))),
  155 + )
  156 + : BoxDecoration(
  157 + color: MyColours.color_ffffff,
  158 + ),
  159 + child: Row(
  160 + crossAxisAlignment: CrossAxisAlignment.center,
  161 + children: [
  162 + Column(
  163 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  164 + crossAxisAlignment: CrossAxisAlignment.start,
  165 + children: [],
  166 + )
  167 + ],
  168 + ),
  169 + ),
  170 + onTap: () {
  171 + Utils.goPhone(list[i].toString());
  172 + },
  173 + ),
  174 + );
  175 + }
  176 + return items;
  177 + }
  178 +
26 //备注弹框 179 //备注弹框
27 static showRemarkDialog( 180 static showRemarkDialog(
28 BuildContext context, List<Remark> remarks, CustomCallBack callback, 181 BuildContext context, List<Remark> remarks, CustomCallBack callback,