Showing
9 changed files
with
225 additions
and
228 deletions
| @@ -83,8 +83,8 @@ android { | @@ -83,8 +83,8 @@ android { | ||
| 83 | 83 | ||
| 84 | ndk { | 84 | ndk { |
| 85 | //选择要添加的对应 cpu 类型的 .so 库。 | 85 | //选择要添加的对应 cpu 类型的 .so 库。 |
| 86 | - abiFilters 'arm64-v8a', 'x86_64', 'mips64' //魅族64位,不支持32位 | ||
| 87 | - // abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86_64','x86', 'mips', 'mips64' | 86 | + // abiFilters 'arm64-v8a', 'x86_64', 'mips64' //魅族64位,不支持32位 |
| 87 | + abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86_64','x86', 'mips', 'mips64' | ||
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | lintOptions { | 90 | lintOptions { |
| @@ -548,20 +548,20 @@ class InvicationPageState extends State<InvicationPage> | @@ -548,20 +548,20 @@ class InvicationPageState extends State<InvicationPage> | ||
| 548 | 548 | ||
| 549 | noticeSms = detailModel.isNotice; | 549 | noticeSms = detailModel.isNotice; |
| 550 | if (detailModel.baseInfoSunModel != null) { | 550 | if (detailModel.baseInfoSunModel != null) { |
| 551 | - _baseIndoProvider.baseInfoSunModel = detailModel.baseInfoSunModel; | ||
| 552 | - name = _baseIndoProvider.baseInfoSunModel!.name; | ||
| 553 | - qiniuUrl = _baseIndoProvider.baseInfoSunModel!.photo; | 551 | + |
| 552 | + name = detailModel.baseInfoSunModel!.name; | ||
| 553 | + qiniuUrl = detailModel.baseInfoSunModel!.photo; | ||
| 554 | // _uploadImageProvider.erweima.qiniuUrl = | 554 | // _uploadImageProvider.erweima.qiniuUrl = |
| 555 | - // _baseIndoProvider.baseInfoSunModel.qrcode; | 555 | + // detailModel.baseInfoSunModel.qrcode; |
| 556 | 556 | ||
| 557 | - phone = _baseIndoProvider.baseInfoSunModel!.phone != null | ||
| 558 | - ? _baseIndoProvider.baseInfoSunModel!.phone | 557 | + phone = detailModel.baseInfoSunModel!.phone != null |
| 558 | + ? detailModel.baseInfoSunModel!.phone | ||
| 559 | : ''; | 559 | : ''; |
| 560 | - wechat = _baseIndoProvider.baseInfoSunModel!.wechat != null | ||
| 561 | - ? _baseIndoProvider.baseInfoSunModel!.wechat | 560 | + wechat = detailModel.baseInfoSunModel!.wechat != null |
| 561 | + ? detailModel.baseInfoSunModel!.wechat | ||
| 562 | : ''; | 562 | : ''; |
| 563 | 563 | ||
| 564 | - position = _baseIndoProvider.baseInfoSunModel!.position; | 564 | + position = detailModel.baseInfoSunModel!.position; |
| 565 | setState(() {}); | 565 | setState(() {}); |
| 566 | } else { | 566 | } else { |
| 567 | // name = '请填写姓名'; | 567 | // name = '请填写姓名'; |
| @@ -1634,6 +1634,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -1634,6 +1634,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 1634 | ? user!.sellerimage | 1634 | ? user!.sellerimage |
| 1635 | : 'http://nosqn.colorcun.com/yd_person.png', | 1635 | : 'http://nosqn.colorcun.com/yd_person.png', |
| 1636 | "position": '经理', | 1636 | "position": '经理', |
| 1637 | + 'phone':user!.sellerphone ?? '' | ||
| 1637 | }; | 1638 | }; |
| 1638 | if (user!.userphone != null) { | 1639 | if (user!.userphone != null) { |
| 1639 | params['phone'] = user!.userphone; | 1640 | params['phone'] = user!.userphone; |
| @@ -1641,51 +1642,52 @@ class InvicationPageState extends State<InvicationPage> | @@ -1641,51 +1642,52 @@ class InvicationPageState extends State<InvicationPage> | ||
| 1641 | 1642 | ||
| 1642 | bool isSuccess = await _baseIndoProvider | 1643 | bool isSuccess = await _baseIndoProvider |
| 1643 | .setCustomerActivityBaseinfo(context, params, isShowLoading: false); | 1644 | .setCustomerActivityBaseinfo(context, params, isShowLoading: false); |
| 1644 | - // _baseIndoProvider.baseInfoSunModel = null; | 1645 | + // detailModel.baseInfoSunModel = null; |
| 1645 | if (isSuccess) { | 1646 | if (isSuccess) { |
| 1646 | name = user!.sellername; | 1647 | name = user!.sellername; |
| 1647 | qiniuUrl = user!.sellerimage != '' && user!.sellerimage != null | 1648 | qiniuUrl = user!.sellerimage != '' && user!.sellerimage != null |
| 1648 | ? user!.sellerimage | 1649 | ? user!.sellerimage |
| 1649 | : 'http://nosqn.colorcun.com/yd_person.png'; | 1650 | : 'http://nosqn.colorcun.com/yd_person.png'; |
| 1650 | // _uploadImageProvider.erweima.qiniuUrl = | 1651 | // _uploadImageProvider.erweima.qiniuUrl = |
| 1651 | - // _baseIndoProvider.baseInfoSunModel.qrcode; | 1652 | + // detailModel.baseInfoSunModel.qrcode; |
| 1652 | phone = user!.userphone != null ? user!.userphone : '填写电话'; | 1653 | phone = user!.userphone != null ? user!.userphone : '填写电话'; |
| 1653 | position = '经理'; | 1654 | position = '经理'; |
| 1655 | + _getReserveDetailRelationData(); | ||
| 1654 | 1656 | ||
| 1655 | setState(() {}); | 1657 | setState(() {}); |
| 1656 | } | 1658 | } |
| 1657 | } | 1659 | } |
| 1658 | 1660 | ||
| 1659 | - _getCustomerActivityBaseinfo() async { | ||
| 1660 | - Map<String, String?> params = { | ||
| 1661 | - 'sellerid': Provider.of<UserModel>(context, listen: false).user!.sellerid, | ||
| 1662 | - "uid": Provider.of<UserModel>(context, listen: false).user!.openid, | ||
| 1663 | - }; | ||
| 1664 | - bool success = await _baseIndoProvider | ||
| 1665 | - .getCustomerActivityBaseinfo(context, params, isShowLoading: false); | ||
| 1666 | - if (success) { | ||
| 1667 | - name = _baseIndoProvider.baseInfoSunModel!.name; | ||
| 1668 | - qiniuUrl = _baseIndoProvider.baseInfoSunModel!.photo; | ||
| 1669 | - // _uploadImageProvider.erweima.qiniuUrl = | ||
| 1670 | - // _baseIndoProvider.baseInfoSunModel.qrcode; | ||
| 1671 | - | ||
| 1672 | - phone = _baseIndoProvider.baseInfoSunModel!.phone != null | ||
| 1673 | - ? _baseIndoProvider.baseInfoSunModel!.phone | ||
| 1674 | - : ''; | ||
| 1675 | - wechat = _baseIndoProvider.baseInfoSunModel!.wechat != null | ||
| 1676 | - ? _baseIndoProvider.baseInfoSunModel!.wechat | ||
| 1677 | - : ''; | ||
| 1678 | - | ||
| 1679 | - position = _baseIndoProvider.baseInfoSunModel!.position; | ||
| 1680 | - setState(() {}); | ||
| 1681 | - } else { | ||
| 1682 | - // name = '请填写姓名'; | ||
| 1683 | - // position = '请填写职位'; | ||
| 1684 | - // phone = '请填写电话'; | ||
| 1685 | - // qiniuUrl = ''; | ||
| 1686 | - _setCustomerActivityBaseinfo(); | ||
| 1687 | - } | ||
| 1688 | - } | 1661 | + // _getCustomerActivityBaseinfo() async { |
| 1662 | + // Map<String, String?> params = { | ||
| 1663 | + // 'sellerid': Provider.of<UserModel>(context, listen: false).user!.sellerid, | ||
| 1664 | + // "uid": Provider.of<UserModel>(context, listen: false).user!.openid, | ||
| 1665 | + // }; | ||
| 1666 | + // bool success = await _baseIndoProvider | ||
| 1667 | + // .getCustomerActivityBaseinfo(context, params, isShowLoading: false); | ||
| 1668 | + // if (success) { | ||
| 1669 | + // name = detailModel.baseInfoSunModel!.name; | ||
| 1670 | + // qiniuUrl = detailModel.baseInfoSunModel!.photo; | ||
| 1671 | + // // _uploadImageProvider.erweima.qiniuUrl = | ||
| 1672 | + // // detailModel.baseInfoSunModel.qrcode; | ||
| 1673 | + | ||
| 1674 | + // phone = detailModel.baseInfoSunModel!.phone != null | ||
| 1675 | + // ? detailModel.baseInfoSunModel!.phone | ||
| 1676 | + // : ''; | ||
| 1677 | + // wechat = detailModel.baseInfoSunModel!.wechat != null | ||
| 1678 | + // ? detailModel.baseInfoSunModel!.wechat | ||
| 1679 | + // : ''; | ||
| 1680 | + | ||
| 1681 | + // position = detailModel.baseInfoSunModel!.position; | ||
| 1682 | + // setState(() {}); | ||
| 1683 | + // } else { | ||
| 1684 | + // // name = '请填写姓名'; | ||
| 1685 | + // // position = '请填写职位'; | ||
| 1686 | + // // phone = '请填写电话'; | ||
| 1687 | + // // qiniuUrl = ''; | ||
| 1688 | + // _setCustomerActivityBaseinfo(); | ||
| 1689 | + // } | ||
| 1690 | + // } | ||
| 1689 | 1691 | ||
| 1690 | // _getActivityByRid() async { | 1692 | // _getActivityByRid() async { |
| 1691 | // Map<String, String> params = { | 1693 | // Map<String, String> params = { |
| @@ -1809,11 +1811,12 @@ class InvicationPageState extends State<InvicationPage> | @@ -1809,11 +1811,12 @@ class InvicationPageState extends State<InvicationPage> | ||
| 1809 | 1811 | ||
| 1810 | _goBaseInfoPage() async { | 1812 | _goBaseInfoPage() async { |
| 1811 | bool? needRefresh = await (NavigatorUtil.goBaseInfoPage( | 1813 | bool? needRefresh = await (NavigatorUtil.goBaseInfoPage( |
| 1812 | - context, FromPage.FromPageInvicationPage) as Future<bool?>); | 1814 | + context, FromPage.FromPageInvicationPage)); |
| 1813 | // Utils.changeStatusColor(color: Colors.transparent); | 1815 | // Utils.changeStatusColor(color: Colors.transparent); |
| 1814 | if (needRefresh != null && needRefresh) { | 1816 | if (needRefresh != null && needRefresh) { |
| 1815 | //刷新页面数据 | 1817 | //刷新页面数据 |
| 1816 | - _getCustomerActivityBaseinfo(); | 1818 | + // _getCustomerActivityBaseinfo(); |
| 1819 | + _getReserveDetailRelationData(); | ||
| 1817 | } | 1820 | } |
| 1818 | } | 1821 | } |
| 1819 | 1822 | ||
| @@ -4971,7 +4974,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -4971,7 +4974,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 4971 | await _getReserveDetailRelationData(showCicle: true); | 4974 | await _getReserveDetailRelationData(showCicle: true); |
| 4972 | 4975 | ||
| 4973 | //跳转 | 4976 | //跳转 |
| 4974 | - if (Platform.isIOS) { | 4977 | + if (reserverPhone != null) { |
| 4975 | List<String> phoneNumber = [reserverPhone!]; | 4978 | List<String> phoneNumber = [reserverPhone!]; |
| 4976 | 4979 | ||
| 4977 | try { | 4980 | try { |
| @@ -4981,10 +4984,11 @@ class InvicationPageState extends State<InvicationPage> | @@ -4981,10 +4984,11 @@ class InvicationPageState extends State<InvicationPage> | ||
| 4981 | } catch (error) { | 4984 | } catch (error) { |
| 4982 | print(error.toString()); | 4985 | print(error.toString()); |
| 4983 | } | 4986 | } |
| 4984 | - } else { | ||
| 4985 | - bool sucess = | ||
| 4986 | - await Sendsms.onSendSMS(reserverPhone!, detailModel.smsContent!); | ||
| 4987 | } | 4987 | } |
| 4988 | + // else { | ||
| 4989 | + // bool sucess = | ||
| 4990 | + // await Sendsms.onSendSMS(reserverPhone!, detailModel.smsContent!); | ||
| 4991 | + // } | ||
| 4988 | 4992 | ||
| 4989 | // } | 4993 | // } |
| 4990 | // SmsModel smsModel = new SmsModel(); | 4994 | // SmsModel smsModel = new SmsModel(); |
| @@ -5192,7 +5196,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -5192,7 +5196,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 5192 | 5196 | ||
| 5193 | return; | 5197 | return; |
| 5194 | } else if (ObjectUtil.isEmpty( | 5198 | } else if (ObjectUtil.isEmpty( |
| 5195 | - _baseIndoProvider.baseInfoSunModel) || | 5199 | + detailModel.baseInfoSunModel) || |
| 5196 | ObjectUtil.isEmpty(_baseIndoProvider | 5200 | ObjectUtil.isEmpty(_baseIndoProvider |
| 5197 | .baseInfoSunModel!.phone)) { | 5201 | .baseInfoSunModel!.phone)) { |
| 5198 | // Utils.showToast('请填写经理的联系电话'); | 5202 | // Utils.showToast('请填写经理的联系电话'); |
| @@ -5233,7 +5237,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -5233,7 +5237,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 5233 | // dateSoltStr + | 5237 | // dateSoltStr + |
| 5234 | // ',' + | 5238 | // ',' + |
| 5235 | // '餐厅经理' + | 5239 | // '餐厅经理' + |
| 5236 | - // _baseIndoProvider.baseInfoSunModel.name + | 5240 | + // detailModel.baseInfoSunModel.name + |
| 5237 | // '已为您安排在' + | 5241 | // '已为您安排在' + |
| 5238 | // widget.tableInfo.replaceAll("\n", "") | 5242 | // widget.tableInfo.replaceAll("\n", "") |
| 5239 | }; | 5243 | }; |
| @@ -5317,9 +5321,9 @@ class InvicationPageState extends State<InvicationPage> | @@ -5317,9 +5321,9 @@ class InvicationPageState extends State<InvicationPage> | ||
| 5317 | }); | 5321 | }); |
| 5318 | return; | 5322 | return; |
| 5319 | } else if (ObjectUtil.isEmpty( | 5323 | } else if (ObjectUtil.isEmpty( |
| 5320 | - _baseIndoProvider.baseInfoSunModel) || | 5324 | + detailModel.baseInfoSunModel) || |
| 5321 | ObjectUtil.isEmpty( | 5325 | ObjectUtil.isEmpty( |
| 5322 | - _baseIndoProvider.baseInfoSunModel!.phone)) { | 5326 | + detailModel.baseInfoSunModel!.phone)) { |
| 5323 | // Utils.showToast('请填写经理的联系电话'); | 5327 | // Utils.showToast('请填写经理的联系电话'); |
| 5324 | DialogUtil.cupertinoAlertDialog(context, | 5328 | DialogUtil.cupertinoAlertDialog(context, |
| 5325 | title: "填写个人信息", | 5329 | title: "填写个人信息", |
| @@ -5453,7 +5457,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -5453,7 +5457,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 5453 | needWechat: true, | 5457 | needWechat: true, |
| 5454 | callback: () async { | 5458 | callback: () async { |
| 5455 | if (ObjectUtil.isEmpty( | 5459 | if (ObjectUtil.isEmpty( |
| 5456 | - _baseIndoProvider.baseInfoSunModel) || | 5460 | + detailModel.baseInfoSunModel) || |
| 5457 | ObjectUtil.isEmpty(_baseIndoProvider | 5461 | ObjectUtil.isEmpty(_baseIndoProvider |
| 5458 | .baseInfoSunModel!.phone)) { | 5462 | .baseInfoSunModel!.phone)) { |
| 5459 | // Utils.showToast('请填写经理的联系电话'); | 5463 | // Utils.showToast('请填写经理的联系电话'); |
| @@ -5499,9 +5503,9 @@ class InvicationPageState extends State<InvicationPage> | @@ -5499,9 +5503,9 @@ class InvicationPageState extends State<InvicationPage> | ||
| 5499 | removeOverlay(); | 5503 | removeOverlay(); |
| 5500 | } else { | 5504 | } else { |
| 5501 | if (ObjectUtil.isEmpty( | 5505 | if (ObjectUtil.isEmpty( |
| 5502 | - _baseIndoProvider.baseInfoSunModel) || | 5506 | + detailModel.baseInfoSunModel) || |
| 5503 | ObjectUtil.isEmpty( | 5507 | ObjectUtil.isEmpty( |
| 5504 | - _baseIndoProvider.baseInfoSunModel!.phone)) { | 5508 | + detailModel.baseInfoSunModel!.phone)) { |
| 5505 | // Utils.showToast('请填写经理的联系电话'); | 5509 | // Utils.showToast('请填写经理的联系电话'); |
| 5506 | DialogUtil.cupertinoAlertDialog(context, | 5510 | DialogUtil.cupertinoAlertDialog(context, |
| 5507 | title: "填写个人信息", | 5511 | title: "填写个人信息", |
| @@ -5582,9 +5586,9 @@ class InvicationPageState extends State<InvicationPage> | @@ -5582,9 +5586,9 @@ class InvicationPageState extends State<InvicationPage> | ||
| 5582 | // needWechat: true, | 5586 | // needWechat: true, |
| 5583 | // callback: () async { | 5587 | // callback: () async { |
| 5584 | // if (ObjectUtil.isEmpty( | 5588 | // if (ObjectUtil.isEmpty( |
| 5585 | - // _baseIndoProvider.baseInfoSunModel) || | 5589 | + // detailModel.baseInfoSunModel) || |
| 5586 | // ObjectUtil.isEmpty( | 5590 | // ObjectUtil.isEmpty( |
| 5587 | - // _baseIndoProvider.baseInfoSunModel.phone)) { | 5591 | + // detailModel.baseInfoSunModel.phone)) { |
| 5588 | // Utils.showToast('请填写经理的联系电话'); | 5592 | // Utils.showToast('请填写经理的联系电话'); |
| 5589 | // return; | 5593 | // return; |
| 5590 | // } | 5594 | // } |
| @@ -5629,9 +5633,9 @@ class InvicationPageState extends State<InvicationPage> | @@ -5629,9 +5633,9 @@ class InvicationPageState extends State<InvicationPage> | ||
| 5629 | // removeOverlay(); | 5633 | // removeOverlay(); |
| 5630 | // } else { | 5634 | // } else { |
| 5631 | // if (ObjectUtil.isEmpty( | 5635 | // if (ObjectUtil.isEmpty( |
| 5632 | - // _baseIndoProvider.baseInfoSunModel) || | 5636 | + // detailModel.baseInfoSunModel) || |
| 5633 | // ObjectUtil.isEmpty( | 5637 | // ObjectUtil.isEmpty( |
| 5634 | - // _baseIndoProvider.baseInfoSunModel.phone)) { | 5638 | + // detailModel.baseInfoSunModel.phone)) { |
| 5635 | // Utils.showToast('请填写经理的联系电话'); | 5639 | // Utils.showToast('请填写经理的联系电话'); |
| 5636 | // return; | 5640 | // return; |
| 5637 | // } | 5641 | // } |
| @@ -5744,7 +5748,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -5744,7 +5748,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 5744 | // // dateSoltStr + | 5748 | // // dateSoltStr + |
| 5745 | // // ',' + | 5749 | // // ',' + |
| 5746 | // // '餐厅经理' + | 5750 | // // '餐厅经理' + |
| 5747 | - // // _baseIndoProvider.baseInfoSunModel.name + | 5751 | + // // detailModel.baseInfoSunModel.name + |
| 5748 | // // '已为您安排在' + | 5752 | // // '已为您安排在' + |
| 5749 | // // widget.tableInfo.replaceAll("\n", "") | 5753 | // // widget.tableInfo.replaceAll("\n", "") |
| 5750 | // }; | 5754 | // }; |
| @@ -5828,7 +5832,7 @@ class InvicationPageState extends State<InvicationPage> | @@ -5828,7 +5832,7 @@ class InvicationPageState extends State<InvicationPage> | ||
| 5828 | // // dateSoltStr + | 5832 | // // dateSoltStr + |
| 5829 | // // ',' + | 5833 | // // ',' + |
| 5830 | // // '餐厅经理' + | 5834 | // // '餐厅经理' + |
| 5831 | - // // _baseIndoProvider.baseInfoSunModel.name + | 5835 | + // // detailModel.baseInfoSunModel.name + |
| 5832 | // // '已为您安排在' + | 5836 | // // '已为您安排在' + |
| 5833 | // // widget.tableInfo.replaceAll("\n", "") | 5837 | // // widget.tableInfo.replaceAll("\n", "") |
| 5834 | // }; | 5838 | // }; |
| @@ -58,8 +58,8 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { | @@ -58,8 +58,8 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { | ||
| 58 | late CustomerMakingProvider customerMakingProvider; | 58 | late CustomerMakingProvider customerMakingProvider; |
| 59 | bool needClear = true; | 59 | bool needClear = true; |
| 60 | String gid = ''; | 60 | String gid = ''; |
| 61 | - String andriodPhone = ''; | ||
| 62 | - List<String?> iosPhone = []; | 61 | + // String andriodPhone = ''; |
| 62 | + List<String> iosPhone = []; | ||
| 63 | 63 | ||
| 64 | // List<TemplateModel> data = []; | 64 | // List<TemplateModel> data = []; |
| 65 | 65 | ||
| @@ -119,23 +119,26 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { | @@ -119,23 +119,26 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { | ||
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | _getPhoneAndGid() { | 121 | _getPhoneAndGid() { |
| 122 | - andriodPhone = ''; | 122 | + // andriodPhone = ''; |
| 123 | iosPhone = []; | 123 | iosPhone = []; |
| 124 | gid = ''; | 124 | gid = ''; |
| 125 | for (CustomerListSunModel item in customerMakingProvider.selectCustomer) { | 125 | for (CustomerListSunModel item in customerMakingProvider.selectCustomer) { |
| 126 | gid += '${item.id},'; | 126 | gid += '${item.id},'; |
| 127 | - if (Platform.isIOS) { | ||
| 128 | - iosPhone.add(item.phone); | ||
| 129 | - } else { | ||
| 130 | - andriodPhone += "${item.phone};"; | 127 | + // if (Platform.isIOS) { |
| 128 | + if (item.phone != null) { | ||
| 129 | + iosPhone.add(item.phone!); | ||
| 131 | } | 130 | } |
| 131 | + | ||
| 132 | + // } else { | ||
| 133 | + // andriodPhone += "${item.phone};"; | ||
| 134 | + // } | ||
| 132 | } | 135 | } |
| 133 | if (gid.endsWith(',')) { | 136 | if (gid.endsWith(',')) { |
| 134 | gid = gid.substring(0, gid.length - 1); | 137 | gid = gid.substring(0, gid.length - 1); |
| 135 | } | 138 | } |
| 136 | - if (!Platform.isIOS && andriodPhone.endsWith(';')) { | ||
| 137 | - andriodPhone = andriodPhone.substring(0, andriodPhone.length - 1); | ||
| 138 | - } | 139 | + // if (!Platform.isIOS && andriodPhone.endsWith(';')) { |
| 140 | + // andriodPhone = andriodPhone.substring(0, andriodPhone.length - 1); | ||
| 141 | + // } | ||
| 139 | } | 142 | } |
| 140 | 143 | ||
| 141 | @override | 144 | @override |
| @@ -233,26 +236,26 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { | @@ -233,26 +236,26 @@ class _MyMakeMarkingPageState extends State<MyMakeMarkingPage> { | ||
| 233 | // print('取消发送'); | 236 | // print('取消发送'); |
| 234 | // }, rCallback: () async { | 237 | // }, rCallback: () async { |
| 235 | String message = customerMakingProvider.controller.text; | 238 | String message = customerMakingProvider.controller.text; |
| 236 | - if (Platform.isIOS) { | ||
| 237 | - // List<String> phoneNumber = ['18161963378', '18729572142', '18765432345']; | ||
| 238 | - | ||
| 239 | - try { | ||
| 240 | - String _result = await sendSMS( | ||
| 241 | - message: message, recipients: iosPhone as List<String>); | ||
| 242 | - print(_result); | ||
| 243 | - } catch (error) { | ||
| 244 | - print(error.toString()); | ||
| 245 | - } | ||
| 246 | - } else { | ||
| 247 | - print('确定发送'); | ||
| 248 | - // String phoneNumber = "18161963378;18729572142"; | 239 | + // if (Platform.isIOS) { |
| 240 | + // List<String> phoneNumber = ['18161963378', '18729572142', '18765432345']; | ||
| 241 | + | ||
| 242 | + try { | ||
| 243 | + String _result = | ||
| 244 | + await sendSMS(message: message, recipients: iosPhone); | ||
| 245 | + print(_result); | ||
| 246 | + } catch (error) { | ||
| 247 | + print(error.toString()); | ||
| 248 | + } | ||
| 249 | + // } else { | ||
| 250 | + // print('确定发送'); | ||
| 251 | + // String phoneNumber = "18161963378;18729572142"; | ||
| 249 | 252 | ||
| 250 | - // await Sendsms.onGetPermission(); | 253 | + // await Sendsms.onGetPermission(); |
| 251 | 254 | ||
| 252 | - // if (await Sendsms.hasPermission()) { | ||
| 253 | - bool suceess = await Sendsms.onSendSMS(andriodPhone, message); | ||
| 254 | - print(suceess); | ||
| 255 | - } | 255 | + // if (await Sendsms.hasPermission()) { |
| 256 | + // bool suceess = await Sendsms.onSendSMS(andriodPhone, message); | ||
| 257 | + // print(suceess); | ||
| 258 | + // } | ||
| 256 | 259 | ||
| 257 | // } | 260 | // } |
| 258 | // SmsModel smsModel = new SmsModel(); | 261 | // SmsModel smsModel = new SmsModel(); |
| @@ -48,8 +48,8 @@ class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow> | @@ -48,8 +48,8 @@ class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow> | ||
| 48 | late CustomerMakingProvider customerMakingProvider; | 48 | late CustomerMakingProvider customerMakingProvider; |
| 49 | bool needClear = true; | 49 | bool needClear = true; |
| 50 | String? gid = ''; | 50 | String? gid = ''; |
| 51 | - String andriodPhone = ''; | ||
| 52 | - List<String?> iosPhone = []; | 51 | + // String andriodPhone = ''; |
| 52 | + List<String> iosPhone = []; | ||
| 53 | 53 | ||
| 54 | @override | 54 | @override |
| 55 | void initState() { | 55 | void initState() { |
| @@ -126,22 +126,20 @@ class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow> | @@ -126,22 +126,20 @@ class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow> | ||
| 126 | } | 126 | } |
| 127 | 127 | ||
| 128 | _getPhoneAndGid() { | 128 | _getPhoneAndGid() { |
| 129 | - andriodPhone = ''; | 129 | + // andriodPhone = ''; |
| 130 | iosPhone = []; | 130 | iosPhone = []; |
| 131 | for (CustomerListSunModel item in customerMakingProvider.selectCustomer) { | 131 | for (CustomerListSunModel item in customerMakingProvider.selectCustomer) { |
| 132 | // gid += '${item.id},'; | 132 | // gid += '${item.id},'; |
| 133 | - if (Platform.isIOS) { | ||
| 134 | - iosPhone.add(item.phone); | ||
| 135 | - } else { | ||
| 136 | - andriodPhone += "${item.phone};"; | 133 | + if (item.phone != null) { |
| 134 | + iosPhone.add(item.phone!); | ||
| 137 | } | 135 | } |
| 138 | } | 136 | } |
| 139 | // if (gid.endsWith(',')) { | 137 | // if (gid.endsWith(',')) { |
| 140 | // gid = gid.substring(0, gid.length - 1); | 138 | // gid = gid.substring(0, gid.length - 1); |
| 141 | // } | 139 | // } |
| 142 | - if (!Platform.isIOS && andriodPhone.endsWith(';')) { | ||
| 143 | - andriodPhone = andriodPhone.substring(0, andriodPhone.length - 1); | ||
| 144 | - } | 140 | + // if (!Platform.isIOS && andriodPhone.endsWith(';')) { |
| 141 | + // andriodPhone = andriodPhone.substring(0, andriodPhone.length - 1); | ||
| 142 | + // } | ||
| 145 | } | 143 | } |
| 146 | 144 | ||
| 147 | ///客户经理营销中的用户列表 | 145 | ///客户经理营销中的用户列表 |
| @@ -234,25 +232,25 @@ class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow> | @@ -234,25 +232,25 @@ class _MyMakeMarkingPageOnlyShowState extends State<MyMakeMarkingPageOnlyShow> | ||
| 234 | // print('取消发送'); | 232 | // print('取消发送'); |
| 235 | // }, rCallback: () async { | 233 | // }, rCallback: () async { |
| 236 | String message = customerMakingProvider.controller.text; | 234 | String message = customerMakingProvider.controller.text; |
| 237 | - bool sucess = false; | ||
| 238 | - if (Platform.isIOS) { | 235 | + // bool sucess = false; |
| 236 | + // if (Platform.isIOS) { | ||
| 239 | // List<String> phoneNumber = ['18161963378', '18729572142', '18765432345']; | 237 | // List<String> phoneNumber = ['18161963378', '18729572142', '18765432345']; |
| 240 | 238 | ||
| 241 | try { | 239 | try { |
| 242 | - String _result = await sendSMS(message: message, recipients: iosPhone as List<String>); | 240 | + String _result = await sendSMS(message: message, recipients: iosPhone); |
| 243 | // sucess = _result; | 241 | // sucess = _result; |
| 244 | } catch (error) { | 242 | } catch (error) { |
| 245 | print(error.toString()); | 243 | print(error.toString()); |
| 246 | } | 244 | } |
| 247 | - } else { | ||
| 248 | - print('确定发送'); | ||
| 249 | - // String phoneNumber = "18161963378;18729572142"; | 245 | + // } else { |
| 246 | + // print('确定发送'); | ||
| 247 | + // // String phoneNumber = "18161963378;18729572142"; | ||
| 250 | 248 | ||
| 251 | - // await Sendsms.onGetPermission(); | 249 | + // // await Sendsms.onGetPermission(); |
| 252 | 250 | ||
| 253 | - // if (await Sendsms.hasPermission()) { | ||
| 254 | - sucess = await Sendsms.onSendSMS(andriodPhone, message); | ||
| 255 | - } | 251 | + // // if (await Sendsms.hasPermission()) { |
| 252 | + // sucess = await Sendsms.onSendSMS(andriodPhone, message); | ||
| 253 | + // } | ||
| 256 | 254 | ||
| 257 | // } | 255 | // } |
| 258 | // SmsModel smsModel = new SmsModel(); | 256 | // SmsModel smsModel = new SmsModel(); |
| @@ -41,7 +41,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { | @@ -41,7 +41,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { | ||
| 41 | late MarketingCenterProvider marketingCenterProvider; | 41 | late MarketingCenterProvider marketingCenterProvider; |
| 42 | ScrollController controller = ScrollController(); | 42 | ScrollController controller = ScrollController(); |
| 43 | 43 | ||
| 44 | - String miniType = '2-3'; | 44 | + String miniType = '2-4'; |
| 45 | late PageController pageController; | 45 | late PageController pageController; |
| 46 | double? pageOffset = 0; | 46 | double? pageOffset = 0; |
| 47 | 47 | ||
| @@ -89,9 +89,9 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { | @@ -89,9 +89,9 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> { | ||
| 89 | showLoading: false, selfDismiss: true); | 89 | showLoading: false, selfDismiss: true); |
| 90 | if (success) { | 90 | if (success) { |
| 91 | marketingCenterProvider.pageStateSettingMini = PageState.Success; | 91 | marketingCenterProvider.pageStateSettingMini = PageState.Success; |
| 92 | - miniType = marketingCenterProvider.dzSellerConfModel!.liteStyle ?? '2-3'; | 92 | + miniType = marketingCenterProvider.dzSellerConfModel!.liteStyle ?? '2-4'; |
| 93 | if (miniType == '1' || miniType == '2' || miniType == '3') { | 93 | if (miniType == '1' || miniType == '2' || miniType == '3') { |
| 94 | - miniType = '2-3'; | 94 | + miniType = '2-4'; |
| 95 | } | 95 | } |
| 96 | tilteContentC.text = marketingCenterProvider | 96 | tilteContentC.text = marketingCenterProvider |
| 97 | .dzSellerConfModel!.liteStyleTitle ?? | 97 | .dzSellerConfModel!.liteStyleTitle ?? |
| 1 | - | ||
| 2 | import 'dart:async'; | 1 | import 'dart:async'; |
| 3 | import 'dart:convert'; | 2 | import 'dart:convert'; |
| 4 | import 'dart:io'; | 3 | import 'dart:io'; |
| @@ -109,7 +108,7 @@ class TableManagerPageState extends State<TableManagerPage> { | @@ -109,7 +108,7 @@ class TableManagerPageState extends State<TableManagerPage> { | ||
| 109 | FocusNode _phoneNode = FocusNode(); | 108 | FocusNode _phoneNode = FocusNode(); |
| 110 | bool showPhoneHistory = false; //显示客户历史记录 | 109 | bool showPhoneHistory = false; //显示客户历史记录 |
| 111 | // EasyContactPicker _contactPicker = EasyContactPicker(); | 110 | // EasyContactPicker _contactPicker = EasyContactPicker(); |
| 112 | -final FlutterNativeContactPicker _contactPicker = | 111 | + final FlutterNativeContactPicker _contactPicker = |
| 113 | FlutterNativeContactPicker(); | 112 | FlutterNativeContactPicker(); |
| 114 | late BaseIndoProvider _baseIndoProvider; | 113 | late BaseIndoProvider _baseIndoProvider; |
| 115 | int sexSelectIndex = 0; | 114 | int sexSelectIndex = 0; |
| @@ -242,7 +241,8 @@ final FlutterNativeContactPicker _contactPicker = | @@ -242,7 +241,8 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 242 | sexStr = widget.guest!.sexStr; | 241 | sexStr = widget.guest!.sexStr; |
| 243 | } | 242 | } |
| 244 | } | 243 | } |
| 245 | - _baseIndoProvider.phoneController.text = widget.guest!.phone??""; //预订人电话 | 244 | + _baseIndoProvider.phoneController.text = |
| 245 | + widget.guest!.phone ?? ""; //预订人电话 | ||
| 246 | nameStr = widget.guest!.rname; | 246 | nameStr = widget.guest!.rname; |
| 247 | // _homeEnterModel.nameController.text = fullName + _nameSuffix(); | 247 | // _homeEnterModel.nameController.text = fullName + _nameSuffix(); |
| 248 | _addNameSuffix(nameStr, sexStr); | 248 | _addNameSuffix(nameStr, sexStr); |
| @@ -290,14 +290,7 @@ final FlutterNativeContactPicker _contactPicker = | @@ -290,14 +290,7 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 290 | ":00"))) { | 290 | ":00"))) { |
| 291 | //过了早市,未过午市 | 291 | //过了早市,未过午市 |
| 292 | currTimeIndex = 2; | 292 | currTimeIndex = 2; |
| 293 | - } else if (dateTime.isAfter(DateTime.parse(dateTime.year.toString() + | ||
| 294 | - "-" + | ||
| 295 | - Utils.addZeroNumber(dateTime.month) + | ||
| 296 | - "-" + | ||
| 297 | - Utils.addZeroNumber(dateTime.day) + | ||
| 298 | - " " + | ||
| 299 | - noon!.split("-")[1] + | ||
| 300 | - ":00")) && | 293 | + } else if (dateTime.isAfter(DateTime.parse(dateTime.year.toString() + "-" + Utils.addZeroNumber(dateTime.month) + "-" + Utils.addZeroNumber(dateTime.day) + " " + noon!.split("-")[1] + ":00")) && |
| 301 | dateTime.isBefore(DateTime.parse(dateTime.year.toString() + | 294 | dateTime.isBefore(DateTime.parse(dateTime.year.toString() + |
| 302 | "-" + | 295 | "-" + |
| 303 | Utils.addZeroNumber(dateTime.month) + | 296 | Utils.addZeroNumber(dateTime.month) + |
| @@ -308,14 +301,7 @@ final FlutterNativeContactPicker _contactPicker = | @@ -308,14 +301,7 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 308 | ":00"))) { | 301 | ":00"))) { |
| 309 | //过了午市,未过晚市 | 302 | //过了午市,未过晚市 |
| 310 | currTimeIndex = 3; | 303 | currTimeIndex = 3; |
| 311 | - } else if (dateTime.isAfter(DateTime.parse(dateTime.year.toString() + | ||
| 312 | - "-" + | ||
| 313 | - Utils.addZeroNumber(dateTime.month) + | ||
| 314 | - "-" + | ||
| 315 | - Utils.addZeroNumber(dateTime.day) + | ||
| 316 | - " " + | ||
| 317 | - night!.split("-")[1] + | ||
| 318 | - ":00")) && | 304 | + } else if (dateTime.isAfter(DateTime.parse(dateTime.year.toString() + "-" + Utils.addZeroNumber(dateTime.month) + "-" + Utils.addZeroNumber(dateTime.day) + " " + night!.split("-")[1] + ":00")) && |
| 319 | dateTime.isBefore(DateTime.parse(dateTime.year.toString() + | 305 | dateTime.isBefore(DateTime.parse(dateTime.year.toString() + |
| 320 | "-" + | 306 | "-" + |
| 321 | Utils.addZeroNumber(dateTime.month) + | 307 | Utils.addZeroNumber(dateTime.month) + |
| @@ -334,14 +320,7 @@ final FlutterNativeContactPicker _contactPicker = | @@ -334,14 +320,7 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 334 | " " + | 320 | " " + |
| 335 | meal1!.split("-")[1] + | 321 | meal1!.split("-")[1] + |
| 336 | ":00")) && | 322 | ":00")) && |
| 337 | - dateTime.isBefore(DateTime.parse(dateTime.year.toString() + | ||
| 338 | - "-" + | ||
| 339 | - Utils.addZeroNumber(dateTime.month) + | ||
| 340 | - "-" + | ||
| 341 | - Utils.addZeroNumber(dateTime.day) + | ||
| 342 | - " " + | ||
| 343 | - meal2!.split("-")[1] + | ||
| 344 | - ":00"))) { | 323 | + dateTime.isBefore(DateTime.parse(dateTime.year.toString() + "-" + Utils.addZeroNumber(dateTime.month) + "-" + Utils.addZeroNumber(dateTime.day) + " " + meal2!.split("-")[1] + ":00"))) { |
| 345 | //过了午市,未过晚市 | 324 | //过了午市,未过晚市 |
| 346 | currTimeIndex = 5; | 325 | currTimeIndex = 5; |
| 347 | } else { | 326 | } else { |
| @@ -490,7 +469,7 @@ final FlutterNativeContactPicker _contactPicker = | @@ -490,7 +469,7 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 490 | // _initTimeDdate(currTimeIndex, context); | 469 | // _initTimeDdate(currTimeIndex, context); |
| 491 | } | 470 | } |
| 492 | 471 | ||
| 493 | - getSpTableList() { | 472 | + getSpTableList() { |
| 494 | String? tableList = App.sp!.getString('table_list_or_reserve'); | 473 | String? tableList = App.sp!.getString('table_list_or_reserve'); |
| 495 | if (tableList == null) { | 474 | if (tableList == null) { |
| 496 | tableManagerModel!.pageStateOrReserve = PageState.Loading; | 475 | tableManagerModel!.pageStateOrReserve = PageState.Loading; |
| @@ -599,8 +578,8 @@ final FlutterNativeContactPicker _contactPicker = | @@ -599,8 +578,8 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 599 | 578 | ||
| 600 | //获取登陆人类型 只订不服 | 579 | //获取登陆人类型 只订不服 |
| 601 | getUserAccountTypeById({bool showLoading = false}) async { | 580 | getUserAccountTypeById({bool showLoading = false}) async { |
| 602 | - String accountType = await tableManagerModel!.getUserAccountTypeById(context, | ||
| 603 | - showLoading: showLoading); | 581 | + String accountType = await tableManagerModel! |
| 582 | + .getUserAccountTypeById(context, showLoading: showLoading); | ||
| 604 | if (accountType == '3') { | 583 | if (accountType == '3') { |
| 605 | _saveUser(Provider.of<UserModel>(context, listen: false) | 584 | _saveUser(Provider.of<UserModel>(context, listen: false) |
| 606 | .user! | 585 | .user! |
| @@ -652,24 +631,26 @@ final FlutterNativeContactPicker _contactPicker = | @@ -652,24 +631,26 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 652 | smsContent = await Provider.of<SmsModel>(context, listen: false) | 631 | smsContent = await Provider.of<SmsModel>(context, listen: false) |
| 653 | .getSmsContent(context, params); | 632 | .getSmsContent(context, params); |
| 654 | // bool sucess = await Sendsms.onSendSMS(phone, smsContent); | 633 | // bool sucess = await Sendsms.onSendSMS(phone, smsContent); |
| 655 | - if (Platform.isIOS) { | ||
| 656 | - try { | 634 | + // if (Platform.isIOS) { |
| 635 | + try { | ||
| 636 | + if (phone != null) { | ||
| 657 | String _result = | 637 | String _result = |
| 658 | - await sendSMS(message: smsContent!, recipients: [phone!]); | 638 | + await sendSMS(message: smsContent!, recipients: [phone]); |
| 659 | print(_result); | 639 | print(_result); |
| 660 | - } catch (error) { | ||
| 661 | - print(error.toString()); | ||
| 662 | } | 640 | } |
| 663 | - } else { | ||
| 664 | - print('确定发送'); | ||
| 665 | - // String phoneNumber = "18161963378;18729572142"; | 641 | + } catch (error) { |
| 642 | + print(error.toString()); | ||
| 643 | + } | ||
| 644 | + // } else { | ||
| 645 | + // print('确定发送'); | ||
| 646 | + // // String phoneNumber = "18161963378;18729572142"; | ||
| 666 | 647 | ||
| 667 | - // await Sendsms.onGetPermission(); | 648 | + // // await Sendsms.onGetPermission(); |
| 668 | 649 | ||
| 669 | - // if (await Sendsms.hasPermission()) { | ||
| 670 | - bool suceess = await Sendsms.onSendSMS(phone!, smsContent!); | ||
| 671 | - print(suceess); | ||
| 672 | - } | 650 | + // // if (await Sendsms.hasPermission()) { |
| 651 | + // bool suceess = await Sendsms.onSendSMS(phone!, smsContent!); | ||
| 652 | + // print(suceess); | ||
| 653 | + // } | ||
| 673 | } | 654 | } |
| 674 | 655 | ||
| 675 | ///获取短信余量 | 656 | ///获取短信余量 |
| @@ -757,8 +738,8 @@ final FlutterNativeContactPicker _contactPicker = | @@ -757,8 +738,8 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 757 | 738 | ||
| 758 | ///刷新图片显示 | 739 | ///刷新图片显示 |
| 759 | _refreshTablePhoto() async { | 740 | _refreshTablePhoto() async { |
| 760 | - await tableManagerModel!.getTableListOrReserve( | ||
| 761 | - context, currTimeIndex, dateTime, selectNumber); | 741 | + await tableManagerModel! |
| 742 | + .getTableListOrReserve(context, currTimeIndex, dateTime, selectNumber); | ||
| 762 | tableManagerModel!.notifyListeners(); | 743 | tableManagerModel!.notifyListeners(); |
| 763 | } | 744 | } |
| 764 | 745 | ||
| @@ -844,7 +825,8 @@ final FlutterNativeContactPicker _contactPicker = | @@ -844,7 +825,8 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 844 | vertical: ScreenUtil().setWidth(20), | 825 | vertical: ScreenUtil().setWidth(20), |
| 845 | horizontal: ScreenUtil().setWidth(10)), | 826 | horizontal: ScreenUtil().setWidth(10)), |
| 846 | shrinkWrap: true, | 827 | shrinkWrap: true, |
| 847 | - itemCount: tableManagerModel!.tablesOrReserveDataShow![i].tableList!.length, | 828 | + itemCount: |
| 829 | + tableManagerModel!.tablesOrReserveDataShow![i].tableList!.length, | ||
| 848 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( | 830 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( |
| 849 | crossAxisCount: 4, | 831 | crossAxisCount: 4, |
| 850 | childAspectRatio: 1, | 832 | childAspectRatio: 1, |
| @@ -885,7 +867,8 @@ final FlutterNativeContactPicker _contactPicker = | @@ -885,7 +867,8 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 885 | } else { | 867 | } else { |
| 886 | if (table.selected) { | 868 | if (table.selected) { |
| 887 | tableManagerModel!.selectTablesOrReserve.add(table); | 869 | tableManagerModel!.selectTablesOrReserve.add(table); |
| 888 | - tableManagerModel!.tablesOrReserveDataShow!.forEach((element) { | 870 | + tableManagerModel!.tablesOrReserveDataShow! |
| 871 | + .forEach((element) { | ||
| 889 | element.tableList!.forEach((element1) { | 872 | element.tableList!.forEach((element1) { |
| 890 | if (element1.id == table.id) { | 873 | if (element1.id == table.id) { |
| 891 | element1.selected = true; | 874 | element1.selected = true; |
| @@ -895,7 +878,8 @@ final FlutterNativeContactPicker _contactPicker = | @@ -895,7 +878,8 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 895 | } else { | 878 | } else { |
| 896 | tableManagerModel!.selectTablesOrReserve | 879 | tableManagerModel!.selectTablesOrReserve |
| 897 | .removeWhere((t) => t.id == table.id); | 880 | .removeWhere((t) => t.id == table.id); |
| 898 | - tableManagerModel!.tablesOrReserveDataShow!.forEach((element) { | 881 | + tableManagerModel!.tablesOrReserveDataShow! |
| 882 | + .forEach((element) { | ||
| 899 | element.tableList!.forEach((element1) { | 883 | element.tableList!.forEach((element1) { |
| 900 | if (element1.id == table.id) { | 884 | if (element1.id == table.id) { |
| 901 | element1.selected = false; | 885 | element1.selected = false; |
| @@ -1098,11 +1082,11 @@ final FlutterNativeContactPicker _contactPicker = | @@ -1098,11 +1082,11 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 1098 | child: Row( | 1082 | child: Row( |
| 1099 | children: [ | 1083 | children: [ |
| 1100 | HEmptyView(30), | 1084 | HEmptyView(30), |
| 1101 | - Text(title , | 1085 | + Text(title, |
| 1102 | style: TextStyle( | 1086 | style: TextStyle( |
| 1103 | fontSize: font(16), color: MyColours.color_515151)), | 1087 | fontSize: font(16), color: MyColours.color_515151)), |
| 1104 | Expanded( | 1088 | Expanded( |
| 1105 | - child: Text(stateStr , | 1089 | + child: Text(stateStr, |
| 1106 | style: TextStyle( | 1090 | style: TextStyle( |
| 1107 | fontSize: font(16), | 1091 | fontSize: font(16), |
| 1108 | color: MyColours.color_26000000))), | 1092 | color: MyColours.color_26000000))), |
| @@ -1110,7 +1094,7 @@ final FlutterNativeContactPicker _contactPicker = | @@ -1110,7 +1094,7 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 1110 | )), | 1094 | )), |
| 1111 | Container( | 1095 | Container( |
| 1112 | margin: EdgeInsets.only(right: w(15)), | 1096 | margin: EdgeInsets.only(right: w(15)), |
| 1113 | - child: Text(sunString , | 1097 | + child: Text(sunString, |
| 1114 | style: TextStyle( | 1098 | style: TextStyle( |
| 1115 | fontSize: font(16), color: MyColours.color_515151))) | 1099 | fontSize: font(16), color: MyColours.color_515151))) |
| 1116 | ], | 1100 | ], |
| @@ -1206,40 +1190,41 @@ final FlutterNativeContactPicker _contactPicker = | @@ -1206,40 +1190,41 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 1206 | // } | 1190 | // } |
| 1207 | 1191 | ||
| 1208 | _getContactData() async { | 1192 | _getContactData() async { |
| 1209 | - Contact? contact = await _contactPicker.selectPhoneNumber(); | ||
| 1210 | - if (contact != null) { | 1193 | + Contact? contact = await _contactPicker.selectPhoneNumber(); |
| 1194 | + if (contact != null) { | ||
| 1211 | setState(() { | 1195 | setState(() { |
| 1212 | - String? fullName = | ||
| 1213 | - contact.fullName?.replaceAll(new RegExp(r"\s+\b|\b\s"), "")??""; | ||
| 1214 | - // String? phone = | ||
| 1215 | - // contact.phoneNumbers![0].replaceAll(new RegExp(r"\s+\b|\b\s"), ""); | ||
| 1216 | - // if (fullName.compareTo(phone) == 0) { | ||
| 1217 | - // fullName = ''; | ||
| 1218 | - // } else { | ||
| 1219 | - // fullName = contact.fullName!; | ||
| 1220 | - // } | ||
| 1221 | - _baseIndoProvider.phoneController.text = | ||
| 1222 | - contact.selectedPhoneNumber?.replaceAll(new RegExp(r"\s+"), "")??""; | ||
| 1223 | - nameStr = fullName; | ||
| 1224 | - // _homeEnterModel.nameController.text = fullName + _nameSuffix(); | ||
| 1225 | - _addNameSuffix(fullName, _nameSuffix()); | ||
| 1226 | - }); | ||
| 1227 | - // setState(() { | ||
| 1228 | - // String fullName = | ||
| 1229 | - // contact?.fullName!.replaceAll(new RegExp(r"\s+\b|\b\s"), ""); | ||
| 1230 | - // String phone = | ||
| 1231 | - // contact[0].phoneNumbers![0].replaceAll(new RegExp(r"\s+\b|\b\s"), ""); | ||
| 1232 | - // if (fullName.compareTo(phone) == 0) { | ||
| 1233 | - // fullName = ''; | ||
| 1234 | - // } else { | ||
| 1235 | - // fullName = contact[0].fullName!; | ||
| 1236 | - // } | ||
| 1237 | - // _baseIndoProvider.phoneController.text = | ||
| 1238 | - // contact[0].phoneNumbers![0].replaceAll(new RegExp(r"\s+"), ""); | ||
| 1239 | - // nameStr = fullName; | ||
| 1240 | - // // _homeEnterModel.nameController.text = fullName + _nameSuffix(); | ||
| 1241 | - // _addNameSuffix(fullName, _nameSuffix()); | ||
| 1242 | - // }); | 1196 | + String? fullName = |
| 1197 | + contact.fullName?.replaceAll(new RegExp(r"\s+\b|\b\s"), "") ?? ""; | ||
| 1198 | + // String? phone = | ||
| 1199 | + // contact.phoneNumbers![0].replaceAll(new RegExp(r"\s+\b|\b\s"), ""); | ||
| 1200 | + // if (fullName.compareTo(phone) == 0) { | ||
| 1201 | + // fullName = ''; | ||
| 1202 | + // } else { | ||
| 1203 | + // fullName = contact.fullName!; | ||
| 1204 | + // } | ||
| 1205 | + _baseIndoProvider.phoneController.text = | ||
| 1206 | + contact.selectedPhoneNumber?.replaceAll(new RegExp(r"\s+"), "") ?? | ||
| 1207 | + ""; | ||
| 1208 | + nameStr = fullName; | ||
| 1209 | + // _homeEnterModel.nameController.text = fullName + _nameSuffix(); | ||
| 1210 | + _addNameSuffix(fullName, _nameSuffix()); | ||
| 1211 | + }); | ||
| 1212 | + // setState(() { | ||
| 1213 | + // String fullName = | ||
| 1214 | + // contact?.fullName!.replaceAll(new RegExp(r"\s+\b|\b\s"), ""); | ||
| 1215 | + // String phone = | ||
| 1216 | + // contact[0].phoneNumbers![0].replaceAll(new RegExp(r"\s+\b|\b\s"), ""); | ||
| 1217 | + // if (fullName.compareTo(phone) == 0) { | ||
| 1218 | + // fullName = ''; | ||
| 1219 | + // } else { | ||
| 1220 | + // fullName = contact[0].fullName!; | ||
| 1221 | + // } | ||
| 1222 | + // _baseIndoProvider.phoneController.text = | ||
| 1223 | + // contact[0].phoneNumbers![0].replaceAll(new RegExp(r"\s+"), ""); | ||
| 1224 | + // nameStr = fullName; | ||
| 1225 | + // // _homeEnterModel.nameController.text = fullName + _nameSuffix(); | ||
| 1226 | + // _addNameSuffix(fullName, _nameSuffix()); | ||
| 1227 | + // }); | ||
| 1243 | } | 1228 | } |
| 1244 | } | 1229 | } |
| 1245 | 1230 | ||
| @@ -2099,7 +2084,7 @@ final FlutterNativeContactPicker _contactPicker = | @@ -2099,7 +2084,7 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 2099 | "uid": userModel.user!.openid | 2084 | "uid": userModel.user!.openid |
| 2100 | }; | 2085 | }; |
| 2101 | 2086 | ||
| 2102 | - bool success = await couponProvider.addForwardAsReserve(context, params) ; | 2087 | + bool success = await couponProvider.addForwardAsReserve(context, params); |
| 2103 | if (success) { | 2088 | if (success) { |
| 2104 | print('yes'); | 2089 | print('yes'); |
| 2105 | } | 2090 | } |
| @@ -2245,7 +2230,7 @@ final FlutterNativeContactPicker _contactPicker = | @@ -2245,7 +2230,7 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 2245 | keyboardType: TextInputType.text, | 2230 | keyboardType: TextInputType.text, |
| 2246 | onChanged: (value) { | 2231 | onChanged: (value) { |
| 2247 | setState(() { | 2232 | setState(() { |
| 2248 | - currentRemark = value ; | 2233 | + currentRemark = value; |
| 2249 | }); | 2234 | }); |
| 2250 | // if (value.length < currRemark.length && | 2235 | // if (value.length < currRemark.length && |
| 2251 | // currRemark.substring(value.length) != ',') { | 2236 | // currRemark.substring(value.length) != ',') { |
| @@ -3599,7 +3584,6 @@ final FlutterNativeContactPicker _contactPicker = | @@ -3599,7 +3584,6 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 3599 | } | 3584 | } |
| 3600 | guest.rname = nameStr; //预订人姓名 | 3585 | guest.rname = nameStr; //预订人姓名 |
| 3601 | guest.sex = sex; //预订人性别:1:男 2:女 | 3586 | guest.sex = sex; //预订人性别:1:男 2:女 |
| 3602 | - | ||
| 3603 | } | 3587 | } |
| 3604 | // } | 3588 | // } |
| 3605 | String? pnum; | 3589 | String? pnum; |
| @@ -3640,7 +3624,7 @@ final FlutterNativeContactPicker _contactPicker = | @@ -3640,7 +3624,7 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 3640 | "rid": _model.row!.id, | 3624 | "rid": _model.row!.id, |
| 3641 | "aid": '${couponProvider.couponListSelect![couponSelectIndex].id}' | 3625 | "aid": '${couponProvider.couponListSelect![couponSelectIndex].id}' |
| 3642 | }; | 3626 | }; |
| 3643 | - bool isSuc = await couponProvider.setActivityAsReserve(context, params) ; | 3627 | + bool isSuc = await couponProvider.setActivityAsReserve(context, params); |
| 3644 | if (isSuc) { | 3628 | if (isSuc) { |
| 3645 | couponProvider.hasModify = true; | 3629 | couponProvider.hasModify = true; |
| 3646 | //发短信操作 | 3630 | //发短信操作 |
| @@ -3936,9 +3920,10 @@ final FlutterNativeContactPicker _contactPicker = | @@ -3936,9 +3920,10 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 3936 | decoration: BoxDecoration( | 3920 | decoration: BoxDecoration( |
| 3937 | border: Border( | 3921 | border: Border( |
| 3938 | right: BorderSide( | 3922 | right: BorderSide( |
| 3939 | - color: index == storeBaseIndoProvider.dayDateData!.length - 1 | ||
| 3940 | - ? Colors.transparent | ||
| 3941 | - : MyColours.color_438E93, | 3923 | + color: |
| 3924 | + index == storeBaseIndoProvider.dayDateData!.length - 1 | ||
| 3925 | + ? Colors.transparent | ||
| 3926 | + : MyColours.color_438E93, | ||
| 3942 | width: w(1), | 3927 | width: w(1), |
| 3943 | ))), | 3928 | ))), |
| 3944 | child: Text( | 3929 | child: Text( |
| @@ -4010,7 +3995,8 @@ final FlutterNativeContactPicker _contactPicker = | @@ -4010,7 +3995,8 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 4010 | .then((day) async { | 3995 | .then((day) async { |
| 4011 | if (day != null) { | 3996 | if (day != null) { |
| 4012 | isRealAddOver = _getAddOrder(day, currTimeIndex); | 3997 | isRealAddOver = _getAddOrder(day, currTimeIndex); |
| 4013 | - if (tableManagerModel!.selectTablesOrReserve.length > | 3998 | + if (tableManagerModel! |
| 3999 | + .selectTablesOrReserve.length > | ||
| 4014 | 0) { | 4000 | 0) { |
| 4015 | if (!isRealAddOver) { | 4001 | if (!isRealAddOver) { |
| 4016 | Utils.showToast('不允许新建过去餐段的订单!'); | 4002 | Utils.showToast('不允许新建过去餐段的订单!'); |
| @@ -4345,7 +4331,6 @@ final FlutterNativeContactPicker _contactPicker = | @@ -4345,7 +4331,6 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 4345 | }); | 4331 | }); |
| 4346 | setState(() {}); | 4332 | setState(() {}); |
| 4347 | } else { | 4333 | } else { |
| 4348 | - | ||
| 4349 | await tableManagerModel! | 4334 | await tableManagerModel! |
| 4350 | .getTableListOrReserve( | 4335 | .getTableListOrReserve( |
| 4351 | context, | 4336 | context, |
| @@ -4430,7 +4415,8 @@ final FlutterNativeContactPicker _contactPicker = | @@ -4430,7 +4415,8 @@ final FlutterNativeContactPicker _contactPicker = | ||
| 4430 | ], | 4415 | ], |
| 4431 | ), | 4416 | ), |
| 4432 | ), | 4417 | ), |
| 4433 | - if (tableManagerModel!.tablesOrReserveDataShow != | 4418 | + if (tableManagerModel! |
| 4419 | + .tablesOrReserveDataShow != | ||
| 4434 | null && | 4420 | null && |
| 4435 | tableManagerModel! | 4421 | tableManagerModel! |
| 4436 | .tablesOrReserveDataShow!.length > | 4422 | .tablesOrReserveDataShow!.length > |
| @@ -1293,10 +1293,8 @@ class InvicationPageSimState extends State<InvicationPageSim> | @@ -1293,10 +1293,8 @@ class InvicationPageSimState extends State<InvicationPageSim> | ||
| 1293 | ? user!.sellerimage | 1293 | ? user!.sellerimage |
| 1294 | : 'http://nosqn.colorcun.com/yd_person.png', | 1294 | : 'http://nosqn.colorcun.com/yd_person.png', |
| 1295 | "position": '经理', | 1295 | "position": '经理', |
| 1296 | + 'phone': user!.userphone ?? '' | ||
| 1296 | }; | 1297 | }; |
| 1297 | - if (user!.userphone != null) { | ||
| 1298 | - params['phone'] = user!.userphone; | ||
| 1299 | - } | ||
| 1300 | 1298 | ||
| 1301 | bool isSuccess = | 1299 | bool isSuccess = |
| 1302 | await _baseIndoProvider.setCustomerActivityBaseinfo(context, params); | 1300 | await _baseIndoProvider.setCustomerActivityBaseinfo(context, params); |
| @@ -4244,7 +4242,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | @@ -4244,7 +4242,7 @@ class InvicationPageSimState extends State<InvicationPageSim> | ||
| 4244 | if (contact != null) { | 4242 | if (contact != null) { |
| 4245 | setState(() { | 4243 | setState(() { |
| 4246 | String? fullName = | 4244 | String? fullName = |
| 4247 | - contact.fullName?.replaceAll(new RegExp(r"\s+\b|\b\s"), "")??''; | 4245 | + contact.fullName?.replaceAll(new RegExp(r"\s+\b|\b\s"), "") ?? ''; |
| 4248 | // String? phone = | 4246 | // String? phone = |
| 4249 | // contact.phoneNumbers![0].replaceAll(new RegExp(r"\s+\b|\b\s"), ""); | 4247 | // contact.phoneNumbers![0].replaceAll(new RegExp(r"\s+\b|\b\s"), ""); |
| 4250 | // if (fullName.compareTo(phone) == 0) { | 4248 | // if (fullName.compareTo(phone) == 0) { |
| @@ -4253,7 +4251,8 @@ class InvicationPageSimState extends State<InvicationPageSim> | @@ -4253,7 +4251,8 @@ class InvicationPageSimState extends State<InvicationPageSim> | ||
| 4253 | // fullName = contact.fullName!; | 4251 | // fullName = contact.fullName!; |
| 4254 | // } | 4252 | // } |
| 4255 | _baseIndoProvider.phoneController.text = | 4253 | _baseIndoProvider.phoneController.text = |
| 4256 | - contact.selectedPhoneNumber?.replaceAll(new RegExp(r"\s+"), "") ?? ''; | 4254 | + contact.selectedPhoneNumber?.replaceAll(new RegExp(r"\s+"), "") ?? |
| 4255 | + ''; | ||
| 4257 | nameStr = fullName; | 4256 | nameStr = fullName; |
| 4258 | // _homeEnterModel.nameController.text = fullName + _nameSuffix(); | 4257 | // _homeEnterModel.nameController.text = fullName + _nameSuffix(); |
| 4259 | _addNameSuffix(fullName, sexStr); | 4258 | _addNameSuffix(fullName, sexStr); |
| @@ -4519,7 +4518,8 @@ class InvicationPageSimState extends State<InvicationPageSim> | @@ -4519,7 +4518,8 @@ class InvicationPageSimState extends State<InvicationPageSim> | ||
| 4519 | erroInfo = ''; | 4518 | erroInfo = ''; |
| 4520 | }); | 4519 | }); |
| 4521 | //跳转 | 4520 | //跳转 |
| 4522 | - if (Platform.isIOS) { | 4521 | + // if (Platform.isIOS) { |
| 4522 | + if (reserverPhone != null) { | ||
| 4523 | List<String> phoneNumber = [reserverPhone!]; | 4523 | List<String> phoneNumber = [reserverPhone!]; |
| 4524 | 4524 | ||
| 4525 | try { | 4525 | try { |
| @@ -4529,10 +4529,12 @@ class InvicationPageSimState extends State<InvicationPageSim> | @@ -4529,10 +4529,12 @@ class InvicationPageSimState extends State<InvicationPageSim> | ||
| 4529 | } catch (error) { | 4529 | } catch (error) { |
| 4530 | print(error.toString()); | 4530 | print(error.toString()); |
| 4531 | } | 4531 | } |
| 4532 | - } else { | ||
| 4533 | - bool sucess = await Sendsms.onSendSMS(reserverPhone!, smsContent!); | ||
| 4534 | } | 4532 | } |
| 4535 | 4533 | ||
| 4534 | + // } else { | ||
| 4535 | + // bool sucess = await Sendsms.onSendSMS(reserverPhone!, smsContent!); | ||
| 4536 | + // } | ||
| 4537 | + | ||
| 4536 | // } | 4538 | // } |
| 4537 | // SmsModel smsModel = new SmsModel(); | 4539 | // SmsModel smsModel = new SmsModel(); |
| 4538 | // // String sms = await smsModel.getSmsContent(context, params); | 4540 | // // String sms = await smsModel.getSmsContent(context, params); |
| @@ -285,24 +285,27 @@ class TableManagerPageSimState extends State<TableManagerPageSim> { | @@ -285,24 +285,27 @@ class TableManagerPageSimState extends State<TableManagerPageSim> { | ||
| 285 | smsContent = await Provider.of<SmsModel>(context, listen: false) | 285 | smsContent = await Provider.of<SmsModel>(context, listen: false) |
| 286 | .getSmsContent(context, params); | 286 | .getSmsContent(context, params); |
| 287 | // bool sucess = await Sendsms.onSendSMS(phone, smsContent); | 287 | // bool sucess = await Sendsms.onSendSMS(phone, smsContent); |
| 288 | - if (Platform.isIOS) { | 288 | + // if (Platform.isIOS) { |
| 289 | + if (phone != null) { | ||
| 289 | try { | 290 | try { |
| 290 | String _result = | 291 | String _result = |
| 291 | - await sendSMS(message: smsContent!, recipients: [phone!]); | 292 | + await sendSMS(message: smsContent!, recipients: [phone]); |
| 292 | print(_result); | 293 | print(_result); |
| 293 | } catch (error) { | 294 | } catch (error) { |
| 294 | print(error.toString()); | 295 | print(error.toString()); |
| 295 | } | 296 | } |
| 296 | - } else { | ||
| 297 | - print('确定发送'); | ||
| 298 | - // String phoneNumber = "18161963378;18729572142"; | 297 | + } |
| 299 | 298 | ||
| 300 | - // await Sendsms.onGetPermission(); | 299 | + // } else { |
| 300 | + // print('确定发送'); | ||
| 301 | + // // String phoneNumber = "18161963378;18729572142"; | ||
| 301 | 302 | ||
| 302 | - // if (await Sendsms.hasPermission()) { | ||
| 303 | - bool suceess = await Sendsms.onSendSMS(phone!, smsContent!); | ||
| 304 | - print(suceess); | ||
| 305 | - } | 303 | + // // await Sendsms.onGetPermission(); |
| 304 | + | ||
| 305 | + // // if (await Sendsms.hasPermission()) { | ||
| 306 | + // bool suceess = await Sendsms.onSendSMS(phone!, smsContent!); | ||
| 307 | + // print(suceess); | ||
| 308 | + // } | ||
| 306 | } | 309 | } |
| 307 | 310 | ||
| 308 | ///获取短信余量 | 311 | ///获取短信余量 |
| @@ -858,7 +861,7 @@ class TableManagerPageSimState extends State<TableManagerPageSim> { | @@ -858,7 +861,7 @@ class TableManagerPageSimState extends State<TableManagerPageSim> { | ||
| 858 | if (contact != null) { | 861 | if (contact != null) { |
| 859 | setState(() { | 862 | setState(() { |
| 860 | String? fullName = | 863 | String? fullName = |
| 861 | - contact.fullName?.replaceAll(new RegExp(r"\s+\b|\b\s"), "")??''; | 864 | + contact.fullName?.replaceAll(new RegExp(r"\s+\b|\b\s"), "") ?? ''; |
| 862 | // String? phone = | 865 | // String? phone = |
| 863 | // contact.phoneNumbers![0].replaceAll(new RegExp(r"\s+\b|\b\s"), ""); | 866 | // contact.phoneNumbers![0].replaceAll(new RegExp(r"\s+\b|\b\s"), ""); |
| 864 | // if (fullName.compareTo(phone) == 0) { | 867 | // if (fullName.compareTo(phone) == 0) { |
| @@ -867,7 +870,8 @@ class TableManagerPageSimState extends State<TableManagerPageSim> { | @@ -867,7 +870,8 @@ class TableManagerPageSimState extends State<TableManagerPageSim> { | ||
| 867 | // fullName = contact.fullName!; | 870 | // fullName = contact.fullName!; |
| 868 | // } | 871 | // } |
| 869 | _baseIndoProvider.phoneController.text = | 872 | _baseIndoProvider.phoneController.text = |
| 870 | - (contact.selectedPhoneNumber?.replaceAll(new RegExp(r"\s+"), ""))??""; | 873 | + (contact.selectedPhoneNumber?.replaceAll(new RegExp(r"\s+"), "")) ?? |
| 874 | + ""; | ||
| 871 | nameStr = fullName; | 875 | nameStr = fullName; |
| 872 | // _homeEnterModel.nameController.text = fullName + _nameSuffix(); | 876 | // _homeEnterModel.nameController.text = fullName + _nameSuffix(); |
| 873 | _addNameSuffix(fullName, _nameSuffix()); | 877 | _addNameSuffix(fullName, _nameSuffix()); |
| @@ -3210,7 +3210,7 @@ class Utils { | @@ -3210,7 +3210,7 @@ class Utils { | ||
| 3210 | //画图 | 3210 | //画图 |
| 3211 | // 4种情况的图分别画出来 | 3211 | // 4种情况的图分别画出来 |
| 3212 | if (liteStyle == '1' || liteStyle == '2' || liteStyle == '3') { | 3212 | if (liteStyle == '1' || liteStyle == '2' || liteStyle == '3') { |
| 3213 | - liteStyle = '2-3'; | 3213 | + liteStyle = '2-4'; |
| 3214 | } | 3214 | } |
| 3215 | List<String> subType = liteStyle!.split('-'); | 3215 | List<String> subType = liteStyle!.split('-'); |
| 3216 | String subType0 = subType[0]; //几号模版 | 3216 | String subType0 = subType[0]; //几号模版 |
-
Please register or login to post a comment