Commit dea3744e020c4475beb9e97c024dd91c15c51c84

Authored by wdn127929
1 parent 7cab77ed

完成按钮不消失bug.....预订详情&预订安排页

@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 archiveVersion = 1; 3 archiveVersion = 1;
4 classes = { 4 classes = {
5 }; 5 };
6 - objectVersion = 46; 6 + objectVersion = 50;
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
@@ -659,7 +659,7 @@ @@ -659,7 +659,7 @@
659 CURRENT_PROJECT_VERSION = 490; 659 CURRENT_PROJECT_VERSION = 490;
660 DEVELOPMENT_TEAM = 8J59HM8B82; 660 DEVELOPMENT_TEAM = 8J59HM8B82;
661 ENABLE_BITCODE = NO; 661 ENABLE_BITCODE = NO;
662 - FLUTTER_BUILD_MODE = release; 662 + FLUTTER_BUILD_MODE = debug;
663 FRAMEWORK_SEARCH_PATHS = ( 663 FRAMEWORK_SEARCH_PATHS = (
664 "$(inherited)", 664 "$(inherited)",
665 "$(PROJECT_DIR)/Flutter", 665 "$(PROJECT_DIR)/Flutter",
@@ -329,6 +329,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -329,6 +329,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
329 @override 329 @override
330 void dispose() { 330 void dispose() {
331 super.dispose(); 331 super.dispose();
  332 +
332 bus.off("refresh_detail"); 333 bus.off("refresh_detail");
333 } 334 }
334 335
@@ -746,6 +747,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -746,6 +747,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
746 remarkManagerModel.ofenRemarks.forEach((element) { 747 remarkManagerModel.ofenRemarks.forEach((element) {
747 element.selected = false; 748 element.selected = false;
748 }); 749 });
  750 +
749 return showModalBottomSheet( 751 return showModalBottomSheet(
750 context: context, 752 context: context,
751 backgroundColor: MyColours.color_ffffff, 753 backgroundColor: MyColours.color_ffffff,
@@ -1228,6 +1230,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> { @@ -1228,6 +1230,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> {
1228 child: WillPopScope( 1230 child: WillPopScope(
1229 child: Scaffold( 1231 child: Scaffold(
1230 backgroundColor: MyColours.color_ffffff, 1232 backgroundColor: MyColours.color_ffffff,
  1233 + resizeToAvoidBottomInset: false,
1231 appBar: SystemAppBar( 1234 appBar: SystemAppBar(
1232 "订座详情", 1235 "订座详情",
1233 onTap: () { 1236 onTap: () {
@@ -3382,13 +3385,14 @@ class TitleAndTextfield extends StatefulWidget { @@ -3382,13 +3385,14 @@ class TitleAndTextfield extends StatefulWidget {
3382 _TitleAndTextfieldState createState() => _TitleAndTextfieldState(); 3385 _TitleAndTextfieldState createState() => _TitleAndTextfieldState();
3383 } 3386 }
3384 3387
3385 -class _TitleAndTextfieldState extends State<TitleAndTextfield> { 3388 +class _TitleAndTextfieldState extends State<TitleAndTextfield>
  3389 + with WidgetsBindingObserver {
3386 // FocusNode numberFocusNode = new FocusNode(); 3390 // FocusNode numberFocusNode = new FocusNode();
3387 OverlayEntry overlayEntry; 3391 OverlayEntry overlayEntry;
3388 @override 3392 @override
3389 void initState() { 3393 void initState() {
3390 super.initState(); 3394 super.initState();
3391 - 3395 + WidgetsBinding.instance.addObserver(this);
3392 // if (Platform.isIOS) { 3396 // if (Platform.isIOS) {
3393 widget.focusNode.addListener(() { 3397 widget.focusNode.addListener(() {
3394 if (widget.focusNode.hasFocus) { 3398 if (widget.focusNode.hasFocus) {
@@ -3407,6 +3411,13 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield> { @@ -3407,6 +3411,13 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield> {
3407 // } 3411 // }
3408 } 3412 }
3409 3413
  3414 + @override
  3415 + void dispose() {
  3416 + removeOverlay();
  3417 + super.dispose();
  3418 + WidgetsBinding.instance.removeObserver(this);
  3419 + }
  3420 +
3410 showOverlay(BuildContext context) { 3421 showOverlay(BuildContext context) {
3411 if (overlayEntry != null) return; 3422 if (overlayEntry != null) return;
3412 OverlayState overlayState = Overlay.of(context); 3423 OverlayState overlayState = Overlay.of(context);
@@ -3417,6 +3428,7 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield> { @@ -3417,6 +3428,7 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield> {
3417 left: 0.0, 3428 left: 0.0,
3418 child: InputDoneView( 3429 child: InputDoneView(
3419 callback: () { 3430 callback: () {
  3431 + removeOverlay();
3420 // _updateMoney(); 3432 // _updateMoney();
3421 }, 3433 },
3422 )); 3434 ));
@@ -3432,8 +3444,45 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield> { @@ -3432,8 +3444,45 @@ class _TitleAndTextfieldState extends State<TitleAndTextfield> {
3432 } 3444 }
3433 } 3445 }
3434 3446
  3447 + // @override
  3448 + void didChangeMetrics() {
  3449 + super.didChangeMetrics();
  3450 + WidgetsBinding.instance.addPostFrameCallback((_) {
  3451 + if (mounted) {
  3452 + if (MediaQuery.of(context).viewInsets.bottom == 0) {
  3453 + //关闭键盘
  3454 + removeOverlay();
  3455 + } else {
  3456 + //显示键盘
  3457 + showOverlay(context);
  3458 + }
  3459 + }
  3460 + });
  3461 + }
  3462 +
  3463 + handlePostFrame(_) {
  3464 + // if (_scrollController.hasClients) {
  3465 + // _scrollController.jumpTo(_scrollController.position.maxScrollExtent -
  3466 + // ScreenUtil().setWidth(350));
  3467 + // }
  3468 + // if (mounted) {
  3469 + // setState(() {
  3470 +
  3471 + // if (MediaQuery.of(context).viewInsets.bottom == 0) {
  3472 + // //关闭键盘
  3473 +
  3474 + // removeOverlay();
  3475 + // } else {
  3476 + // //显示键盘
  3477 + // showOverlay(context);
  3478 + // }
  3479 + // });
  3480 + // }
  3481 + }
  3482 +
3435 /// 修改金额 3483 /// 修改金额
3436 _updateMoney() { 3484 _updateMoney() {
  3485 + removeOverlay();
3437 if (widget.detailModel.prestrTF == null || 3486 if (widget.detailModel.prestrTF == null ||
3438 widget.detailModel.prestrTF == "") { 3487 widget.detailModel.prestrTF == "") {
3439 if (widget.detailModel.numController.text.trim().length > 0) { 3488 if (widget.detailModel.numController.text.trim().length > 0) {
@@ -293,14 +293,25 @@ class InvicationPageState extends State<InvicationPage> @@ -293,14 +293,25 @@ class InvicationPageState extends State<InvicationPage>
293 } 293 }
294 294
295 handlePostFrame(_) { 295 handlePostFrame(_) {
296 - if (_scrollController.hasClients) {  
297 - _scrollController.jumpTo(_scrollController.position.maxScrollExtent +  
298 - ScreenUtil().setWidth(140));  
299 - } 296 + // if (_scrollController.hasClients) {
  297 + // _scrollController.jumpTo(_scrollController.position.maxScrollExtent -
  298 + // ScreenUtil().setWidth(350));
  299 + // }
  300 + setState(() {
  301 + if (MediaQuery.of(context).viewInsets.bottom == 0) {
  302 + //关闭键盘
  303 +
  304 + removeOverlay();
  305 + } else {
  306 + //显示键盘
  307 + showOverlay(context);
  308 + }
  309 + });
300 } 310 }
301 311
302 @override 312 @override
303 void dispose() { 313 void dispose() {
  314 + removeOverlay();
304 Utils.changeStatusColor(); 315 Utils.changeStatusColor();
305 couponProvider.clearSelect(); 316 couponProvider.clearSelect();
306 bus.off("refresh_coupon_invitation"); 317 bus.off("refresh_coupon_invitation");
@@ -321,9 +332,9 @@ class InvicationPageState extends State<InvicationPage> @@ -321,9 +332,9 @@ class InvicationPageState extends State<InvicationPage>
321 super.didChangeMetrics(); 332 super.didChangeMetrics();
322 print(MediaQuery.of(context).viewInsets.bottom); 333 print(MediaQuery.of(context).viewInsets.bottom);
323 334
324 - if (MediaQuery.of(context).viewInsets.bottom > 0) {  
325 - removeOverlay();  
326 - } 335 + // if (MediaQuery.of(context).viewInsets.bottom > 0) {
  336 + // removeOverlay();
  337 + // }
327 } 338 }
328 339
329 ///获取短信余量 340 ///获取短信余量
@@ -1642,516 +1653,498 @@ class InvicationPageState extends State<InvicationPage> @@ -1642,516 +1653,498 @@ class InvicationPageState extends State<InvicationPage>
1642 // ScreenUtil().setWidth(2), 1653 // ScreenUtil().setWidth(2),
1643 // color: 1654 // color:
1644 // MyColours.color_efefef), 1655 // MyColours.color_efefef),
1645 - enterMore  
1646 - ? Container(  
1647 - height: ScreenUtil().setWidth(68),  
1648 - padding:  
1649 - EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(16)),  
1650 - decoration: BoxDecoration(  
1651 - borderRadius:  
1652 - BorderRadius.circular(ScreenUtil().setWidth(12)),  
1653 - // color: Colors.red,  
1654 - border: Border.all(  
1655 - width: ScreenUtil().setWidth(2),  
1656 - color: MyColours.color_DBDBDB)),  
1657 - child: Row(  
1658 - // mainAxisAlignment: MainAxisAlignment.spaceAround,  
1659 - children: [  
1660 - Expanded(  
1661 - child: Padding(  
1662 - padding: EdgeInsets.only(  
1663 - right: ScreenUtil().setWidth(14)),  
1664 - child: Row(  
1665 - mainAxisAlignment:  
1666 - MainAxisAlignment.spaceBetween,  
1667 - children: [  
1668 - Text(  
1669 - '就餐人数:',  
1670 - style: TextStyle(  
1671 - // letterSpacing: ScreenUtil().setWidth(1.8 * 2),  
1672 - color: MyColours.color_515151,  
1673 - fontSize: ScreenUtil().setSp(28)),  
1674 - ),  
1675 - Expanded(  
1676 - child: TextField(  
1677 - textAlign: TextAlign.center,  
1678 - selectionControls:  
1679 - _myExtendedMaterialTextSelectionControlsNum,  
1680 - maxLines: 1,  
1681 - //输入文本的样式  
1682 - style: TextStyle(  
1683 - fontSize: ScreenUtil().setSp(28),  
1684 - color: MyColours.color_515151),  
1685 - controller:  
1686 - _baseIndoProvider.pnumController,  
1687 - focusNode: _pnumNode,  
1688 - // textAlignVertical: TextAlignVertical.top,  
1689 - decoration: InputDecoration(  
1690 - hintText: "选填",  
1691 - hintStyle: TextStyle(  
1692 - color: MyColours.color_999999,  
1693 - fontSize: ScreenUtil().setSp(28),  
1694 - ),  
1695 - contentPadding: EdgeInsets.zero,  
1696 - border: OutlineInputBorder(  
1697 - borderSide: BorderSide.none),  
1698 - ),  
1699 - onChanged: (value) async {  
1700 - //操作  
1701 - _baseIndoProvider.pnumController.text =  
1702 - value;  
1703 - //添加的代码:光标一直在文本框后面  
1704 - _baseIndoProvider.pnumController.value =  
1705 - TextEditingValue(  
1706 - text: _baseIndoProvider  
1707 - .pnumController.text,  
1708 - selection:  
1709 - TextSelection.fromPosition(  
1710 - TextPosition(  
1711 - affinity:  
1712 - TextAffinity.downstream,  
1713 - offset: _baseIndoProvider  
1714 - .pnumController.text.length,  
1715 - )));  
1716 -  
1717 - print(value);  
1718 - // if (value.trim().isEmpty) {  
1719 - // //内容为空,或 超过11位  
1720 - // setState(() {  
1721 - // _baseIndoProvider.userHistorys  
1722 - // .clear();  
1723 - // });  
1724 - // return;  
1725 - // }  
1726 - if (value != null) {  
1727 - detailModel.selectNum = value;  
1728 - // detailModel  
1729 - // .notifyListeners();  
1730 - // setState(() {  
1731 - // selectPnum = value.first;  
1732 - // pnum = pnumlist[value.first];  
1733 - // });  
1734 - bool sucess = await detailModel  
1735 - .upReserveInfo(context, widget.rid,  
1736 - actualPum:  
1737 - detailModel.selectNum,  
1738 - needToast: false);  
1739 -  
1740 - if (sucess) {  
1741 - EventBus().emit(  
1742 - "refresh_tablemanager"); //刷新桌位  
1743 - bus.emit(  
1744 - "refresh_book_list"); //刷新已预订列表  
1745 - bus.emit("refresh_detail");  
1746 - // await _getReserveDetail(  
1747 - // showCicle: false);  
1748 - }  
1749 - }  
1750 - },  
1751 - onEditingComplete: () {  
1752 - _pnumNode.unfocus();  
1753 - },  
1754 - onTap: () {  
1755 - // setState(() {  
1756 - // showPhoneHistory = true;  
1757 - // });  
1758 - // // Future.delayed(Duration(milliseconds: 300), () {  
1759 - // // _controller.jumpTo(_controller.position.maxScrollExtent);  
1760 - // // });  
1761 - },  
1762 - keyboardType:  
1763 - TextInputType.numberWithOptions(  
1764 - decimal: true),  
1765 - )),  
1766 - // Expanded(  
1767 - // child: InkWell(  
1768 - // onTap: () {  
1769 - // FocusScope.of(context)  
1770 - // .requestFocus(FocusNode()); //隐藏键盘  
1771 - // DialogUtil.showSelectCusmanDialog(  
1772 - // context, personNumList,  
1773 - // (value) async {  
1774 - // if (value != null) {  
1775 - // detailModel.selectIndex =  
1776 - // value.first;  
1777 - // detailModel.selectNum =  
1778 - // personNumList[value.first];  
1779 - // // detailModel  
1780 - // // .notifyListeners();  
1781 - // // setState(() {  
1782 - // // selectPnum = value.first;  
1783 - // // pnum = pnumlist[value.first];  
1784 - // // });  
1785 - // bool sucess =  
1786 - // await detailModel.upReserveInfo(  
1787 - // context, widget.rid,  
1788 - // actualPum:  
1789 - // detailModel.selectNum,  
1790 - // needToast: false);  
1791 -  
1792 - // if (sucess) {  
1793 - // EventBus().emit(  
1794 - // "refresh_tablemanager"); //刷新桌位  
1795 - // bus.emit(  
1796 - // "refresh_book_list"); //刷新已预订列表  
1797 - // bus.emit("refresh_detail");  
1798 - // await _getReserveDetail(  
1799 - // showCicle: false);  
1800 - // }  
1801 - // }  
1802 - // },  
1803 - // selecteds: detailModel  
1804 - // .selectIndex ==  
1805 - // null  
1806 - // ? []  
1807 - // : [detailModel.selectIndex])  
1808 - // .then((value) {});  
1809 - // },  
1810 - // child: Container(  
1811 - // alignment: Alignment.center,  
1812 - // child: Text(  
1813 - // detailEntity.actual_pum == null ||  
1814 - // detailEntity.actual_pum ==  
1815 - // ''  
1816 - // ? '选填'  
1817 - // : detailEntity.actual_pum,  
1818 - // style: TextStyle(  
1819 - // fontSize:  
1820 - // ScreenUtil().setSp(28),  
1821 - // color: detailEntity  
1822 - // .actual_pum ==  
1823 - // null ||  
1824 - // detailEntity  
1825 - // .actual_pum ==  
1826 - // ''  
1827 - // ? MyColours.color_999999  
1828 - // : MyColours  
1829 - // .color_515151))),  
1830 - // ),  
1831 -  
1832 - // // HEmptyView(6),  
1833 - // // Image.asset(  
1834 - // // Utils.getImgPath(  
1835 - // // false ? 'c_arrow_up' : 'c_arrow_down'),  
1836 - // // width: ScreenUtil().setWidth(28),  
1837 - // // // height: ScreenUtil().setWidth(10),  
1838 - // // ),  
1839 - // ),  
1840 - ]))),  
1841 - MyDivider(  
1842 - ScreenUtil().setWidth(2), ScreenUtil().setWidth(46),  
1843 - color: MyColours.color_BFC4D4),  
1844 - Expanded(  
1845 - child: Padding(  
1846 - padding: EdgeInsets.only(  
1847 - left: ScreenUtil().setWidth(14)),  
1848 - child: Row(  
1849 - mainAxisAlignment: MainAxisAlignment.spaceEvenly,  
1850 - children: [  
1851 - Text(  
1852 - '到店时间:',  
1853 - style: TextStyle(  
1854 - // letterSpacing: ScreenUtil().setWidth(1.8 * 2),  
1855 - color: MyColours.color_515151,  
1856 - fontSize: ScreenUtil().setSp(28)),  
1857 - ),  
1858 - Expanded(  
1859 - child: InkWell(  
1860 - onTap: () {  
1861 - //时间弹窗  
1862 -  
1863 - FocusScope.of(context)  
1864 - .requestFocus(FocusNode()); //隐藏键盘  
1865 - DialogUtil.showSelectCusmanDialog(  
1866 - context, dailyList,  
1867 - (value) async {  
1868 - if (value != null) {  
1869 - ddateIndex = value.first;  
1870 - ddateHm = dailyList[value.first];  
1871 - setState(() {});  
1872 - bool sucess =  
1873 - await detailModel.upReserveInfo(  
1874 - context, widget.rid,  
1875 - dateStr: ddateHm,  
1876 - ymd: detailEntity.ddateYMD,  
1877 - needToast: false);  
1878 -  
1879 - if (sucess) {  
1880 - EventBus().emit(  
1881 - "refresh_tablemanager"); //刷新桌位  
1882 - bus.emit(  
1883 - "refresh_book_list"); //刷新已预订列表  
1884 - bus.emit("refresh_detail");  
1885 - await _getReserveDetail(  
1886 - showCicle: false);  
1887 - }  
1888 - }  
1889 - },  
1890 - title: '到店时间',  
1891 - selecteds: ddateIndex == null  
1892 - ? []  
1893 - : [ddateIndex])  
1894 - .then((value) {});  
1895 - },  
1896 - child: Container(  
1897 - alignment: Alignment.center,  
1898 - child: Text(  
1899 - ddateHm == null || ddateHm == ''  
1900 - ? '选填'  
1901 - : ddateHm,  
1902 - style: TextStyle(  
1903 - fontSize:  
1904 - ScreenUtil().setSp(28),  
1905 - color: ddateHm == null ||  
1906 - ddateHm == ''  
1907 - ? MyColours.color_999999  
1908 - : MyColours.color_515151))),  
1909 - ),  
1910 1656
1911 - // HEmptyView(6),  
1912 - // Image.asset(  
1913 - // Utils.getImgPath(  
1914 - // false ? 'c_arrow_up' : 'c_arrow_down'),  
1915 - // width: ScreenUtil().setWidth(28),  
1916 - // // height: ScreenUtil().setWidth(10),  
1917 - // ),  
1918 - ),  
1919 - ],  
1920 - )))  
1921 - ],  
1922 - ),  
1923 - )  
1924 - : SizedBox(),  
1925 - enterMore ? VEmptyView(40) : SizedBox(),  
1926 - //电话  
1927 - enterMore  
1928 - ? Container(  
1929 - height: ScreenUtil().setWidth(68),  
1930 - padding:  
1931 - EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(16)),  
1932 - decoration: BoxDecoration(  
1933 - borderRadius:  
1934 - BorderRadius.circular(ScreenUtil().setWidth(12)),  
1935 - // color: Colors.red,  
1936 - border: Border.all(  
1937 - width: ScreenUtil().setWidth(2),  
1938 - color: MyColours.color_DBDBDB)),  
1939 - child: Row(  
1940 - mainAxisAlignment: MainAxisAlignment.spaceBetween,  
1941 - crossAxisAlignment: CrossAxisAlignment.center,  
1942 - children: [  
1943 - Expanded(  
1944 - child: TextField(  
1945 - selectionControls:  
1946 - _myExtendedMaterialTextSelectionControls,  
1947 - maxLines: 1,  
1948 - //输入文本的样式  
1949 - style: TextStyle(  
1950 - fontSize: ScreenUtil().setSp(30),  
1951 - color: MyColours.color_353535),  
1952 - controller: _baseIndoProvider.phoneController,  
1953 - focusNode: _phoneNode,  
1954 - // textAlignVertical: TextAlignVertical.top,  
1955 - decoration: InputDecoration(  
1956 - hintText: "预留电话",  
1957 - hintStyle: TextStyle(  
1958 - color: MyColours.color_999999,  
1959 - fontSize: ScreenUtil().setSp(28),  
1960 - ),  
1961 - contentPadding: EdgeInsets.zero,  
1962 - border: OutlineInputBorder(borderSide: BorderSide.none),  
1963 - ),  
1964 - onChanged: (value) {  
1965 - print(value);  
1966 - if (value.trim().isEmpty || value.trim().length > 11) {  
1967 - //内容为空,或 超过11位  
1968 - setState(() {  
1969 - _baseIndoProvider.userHistorys.clear();  
1970 - });  
1971 - return;  
1972 - }  
1973 - Map<String, String> params = {  
1974 - "keywords": value.trim(),  
1975 - "sid": Provider.of<UserModel>(context, listen: false)  
1976 - .user  
1977 - .sellerid,  
1978 - };  
1979 - _baseIndoProvider.getUserHistorys(context, params);  
1980 - _getIsMemberByPhone(value);  
1981 - },  
1982 - onEditingComplete: () {  
1983 - _phoneNode.unfocus();  
1984 - },  
1985 - onTap: () {  
1986 - setState(() {  
1987 - showPhoneHistory = true;  
1988 - });  
1989 - // Future.delayed(Duration(milliseconds: 300), () {  
1990 - // _controller.jumpTo(_controller.position.maxScrollExtent);  
1991 - // });  
1992 - },  
1993 - keyboardType:  
1994 - TextInputType.numberWithOptions(decimal: true),  
1995 - )),  
1996 - InkWell(  
1997 - onTap: () {  
1998 - _openAddressBook();  
1999 - },  
2000 - child: Container(  
2001 - width: ScreenUtil().setWidth(74) * 2,  
2002 - height: ScreenUtil().setWidth(48),  
2003 - alignment: Alignment.centerRight,  
2004 - child: Text('一键录入',  
2005 - style: TextStyle(  
2006 - color: MyColours.color_515151,  
2007 - fontSize: ScreenUtil().setSp(28),  
2008 - )),  
2009 - ),  
2010 - ),  
2011 - ],  
2012 - ))  
2013 - : SizedBox(),  
2014 - Stack(  
2015 - clipBehavior: Clip.none,  
2016 - children: [  
2017 - Column(  
2018 - crossAxisAlignment: CrossAxisAlignment.start, 1657 + if (enterMore)
  1658 + Container(
  1659 + height: ScreenUtil().setWidth(68),
  1660 + padding:
  1661 + EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(16)),
  1662 + decoration: BoxDecoration(
  1663 + borderRadius: BorderRadius.circular(ScreenUtil().setWidth(12)),
  1664 + // color: Colors.red,
  1665 + border: Border.all(
  1666 + width: ScreenUtil().setWidth(2),
  1667 + color: MyColours.color_DBDBDB)),
  1668 + child: Row(
  1669 + // mainAxisAlignment: MainAxisAlignment.spaceAround,
2019 children: [ 1670 children: [
2020 - //姓名  
2021 - enterMore  
2022 - ? Container(  
2023 - margin: EdgeInsets.only(  
2024 - top: ScreenUtil().setWidth(40),  
2025 - bottom: ScreenUtil().setWidth(40)),  
2026 - height: ScreenUtil().setWidth(68),  
2027 - padding: EdgeInsets.symmetric(  
2028 - horizontal: ScreenUtil().setWidth(16)),  
2029 - decoration: BoxDecoration(  
2030 - borderRadius: BorderRadius.circular(  
2031 - ScreenUtil().setWidth(12)),  
2032 - // color: Colors.red,  
2033 - border: Border.all(  
2034 - width: ScreenUtil().setWidth(2),  
2035 - color: MyColours.color_DBDBDB)), 1671 + Expanded(
  1672 + child: Padding(
  1673 + padding:
  1674 + EdgeInsets.only(right: ScreenUtil().setWidth(14)),
2036 child: Row( 1675 child: Row(
2037 - mainAxisAlignment: MainAxisAlignment.spaceBetween,  
2038 - crossAxisAlignment: CrossAxisAlignment.center,  
2039 - children: [  
2040 - Expanded(  
2041 - child: TextField( 1676 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  1677 + children: [
  1678 + Text(
  1679 + '就餐人数:',
  1680 + style: TextStyle(
  1681 + // letterSpacing: ScreenUtil().setWidth(1.8 * 2),
  1682 + color: MyColours.color_515151,
  1683 + fontSize: ScreenUtil().setSp(28)),
  1684 + ),
  1685 + Expanded(
  1686 + child: TextField(
  1687 + textAlign: TextAlign.center,
  1688 + selectionControls:
  1689 + _myExtendedMaterialTextSelectionControlsNum,
2042 maxLines: 1, 1690 maxLines: 1,
2043 -  
2044 //输入文本的样式 1691 //输入文本的样式
2045 style: TextStyle( 1692 style: TextStyle(
2046 fontSize: ScreenUtil().setSp(28), 1693 fontSize: ScreenUtil().setSp(28),
2047 - color: MyColours.color_353535),  
2048 - controller: _baseIndoProvider.nameController,  
2049 - focusNode: _nameNode, 1694 + color: MyColours.color_515151),
  1695 + controller: _baseIndoProvider.pnumController,
  1696 + focusNode: _pnumNode,
2050 // textAlignVertical: TextAlignVertical.top, 1697 // textAlignVertical: TextAlignVertical.top,
2051 decoration: InputDecoration( 1698 decoration: InputDecoration(
2052 - hintText: "顾客姓名", 1699 + hintText: "选填",
2053 hintStyle: TextStyle( 1700 hintStyle: TextStyle(
2054 color: MyColours.color_999999, 1701 color: MyColours.color_999999,
2055 fontSize: ScreenUtil().setSp(28), 1702 fontSize: ScreenUtil().setSp(28),
2056 ), 1703 ),
2057 - // contentPadding:  
2058 - // EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),  
2059 - // border: InputBorder.none,  
2060 contentPadding: EdgeInsets.zero, 1704 contentPadding: EdgeInsets.zero,
2061 border: OutlineInputBorder( 1705 border: OutlineInputBorder(
2062 borderSide: BorderSide.none), 1706 borderSide: BorderSide.none),
2063 ), 1707 ),
2064 - onChanged: (value) {  
2065 - print('ggg'); 1708 + onChanged: (value) async {
  1709 + //操作
  1710 + _baseIndoProvider.pnumController.text = value;
  1711 + //添加的代码:光标一直在文本框后面
  1712 + _baseIndoProvider.pnumController.value =
  1713 + TextEditingValue(
  1714 + text: _baseIndoProvider
  1715 + .pnumController.text,
  1716 + selection: TextSelection.fromPosition(
  1717 + TextPosition(
  1718 + affinity: TextAffinity.downstream,
  1719 + offset: _baseIndoProvider
  1720 + .pnumController.text.length,
  1721 + )));
2066 1722
2067 - nameStr = value; 1723 + print(value);
  1724 + // if (value.trim().isEmpty) {
  1725 + // //内容为空,或 超过11位
  1726 + // setState(() {
  1727 + // _baseIndoProvider.userHistorys
  1728 + // .clear();
  1729 + // });
  1730 + // return;
  1731 + // }
  1732 + if (value != null) {
  1733 + detailModel.selectNum = value;
  1734 + // detailModel
  1735 + // .notifyListeners();
  1736 + // setState(() {
  1737 + // selectPnum = value.first;
  1738 + // pnum = pnumlist[value.first];
  1739 + // });
  1740 + bool sucess = await detailModel
  1741 + .upReserveInfo(context, widget.rid,
  1742 + actualPum: detailModel.selectNum,
  1743 + needToast: false);
  1744 +
  1745 + if (sucess) {
  1746 + EventBus()
  1747 + .emit("refresh_tablemanager"); //刷新桌位
  1748 + bus.emit("refresh_book_list"); //刷新已预订列表
  1749 + bus.emit("refresh_detail");
  1750 + // await _getReserveDetail(
  1751 + // showCicle: false);
  1752 + }
  1753 + }
2068 }, 1754 },
2069 onEditingComplete: () { 1755 onEditingComplete: () {
2070 - print('fff');  
2071 - _nameNode.unfocus();  
2072 - // _homeEnterModel.nameController.text =  
2073 - // nameStr + _nameSuffix();  
2074 - _addNameSuffix(nameStr, sexStr); 1756 + _pnumNode.unfocus();
2075 }, 1757 },
2076 - keyboardType: TextInputType.text, 1758 + onTap: () {
  1759 + // setState(() {
  1760 + // showPhoneHistory = true;
  1761 + // });
  1762 + // // Future.delayed(Duration(milliseconds: 300), () {
  1763 + // // _controller.jumpTo(_controller.position.maxScrollExtent);
  1764 + // // });
  1765 + },
  1766 + keyboardType: TextInputType.numberWithOptions(
  1767 + decimal: true),
  1768 + )),
  1769 + // Expanded(
  1770 + // child: InkWell(
  1771 + // onTap: () {
  1772 + // FocusScope.of(context)
  1773 + // .requestFocus(FocusNode()); //隐藏键盘
  1774 + // DialogUtil.showSelectCusmanDialog(
  1775 + // context, personNumList,
  1776 + // (value) async {
  1777 + // if (value != null) {
  1778 + // detailModel.selectIndex =
  1779 + // value.first;
  1780 + // detailModel.selectNum =
  1781 + // personNumList[value.first];
  1782 + // // detailModel
  1783 + // // .notifyListeners();
  1784 + // // setState(() {
  1785 + // // selectPnum = value.first;
  1786 + // // pnum = pnumlist[value.first];
  1787 + // // });
  1788 + // bool sucess =
  1789 + // await detailModel.upReserveInfo(
  1790 + // context, widget.rid,
  1791 + // actualPum:
  1792 + // detailModel.selectNum,
  1793 + // needToast: false);
  1794 +
  1795 + // if (sucess) {
  1796 + // EventBus().emit(
  1797 + // "refresh_tablemanager"); //刷新桌位
  1798 + // bus.emit(
  1799 + // "refresh_book_list"); //刷新已预订列表
  1800 + // bus.emit("refresh_detail");
  1801 + // await _getReserveDetail(
  1802 + // showCicle: false);
  1803 + // }
  1804 + // }
  1805 + // },
  1806 + // selecteds: detailModel
  1807 + // .selectIndex ==
  1808 + // null
  1809 + // ? []
  1810 + // : [detailModel.selectIndex])
  1811 + // .then((value) {});
  1812 + // },
  1813 + // child: Container(
  1814 + // alignment: Alignment.center,
  1815 + // child: Text(
  1816 + // detailEntity.actual_pum == null ||
  1817 + // detailEntity.actual_pum ==
  1818 + // ''
  1819 + // ? '选填'
  1820 + // : detailEntity.actual_pum,
  1821 + // style: TextStyle(
  1822 + // fontSize:
  1823 + // ScreenUtil().setSp(28),
  1824 + // color: detailEntity
  1825 + // .actual_pum ==
  1826 + // null ||
  1827 + // detailEntity
  1828 + // .actual_pum ==
  1829 + // ''
  1830 + // ? MyColours.color_999999
  1831 + // : MyColours
  1832 + // .color_515151))),
  1833 + // ),
  1834 +
  1835 + // // HEmptyView(6),
  1836 + // // Image.asset(
  1837 + // // Utils.getImgPath(
  1838 + // // false ? 'c_arrow_up' : 'c_arrow_down'),
  1839 + // // width: ScreenUtil().setWidth(28),
  1840 + // // // height: ScreenUtil().setWidth(10),
  1841 + // // ),
  1842 + // ),
  1843 + ]))),
  1844 + MyDivider(ScreenUtil().setWidth(2), ScreenUtil().setWidth(46),
  1845 + color: MyColours.color_BFC4D4),
  1846 + Expanded(
  1847 + child: Padding(
  1848 + padding:
  1849 + EdgeInsets.only(left: ScreenUtil().setWidth(14)),
  1850 + child: Row(
  1851 + mainAxisAlignment: MainAxisAlignment.spaceEvenly,
  1852 + children: [
  1853 + Text(
  1854 + '到店时间:',
  1855 + style: TextStyle(
  1856 + // letterSpacing: ScreenUtil().setWidth(1.8 * 2),
  1857 + color: MyColours.color_515151,
  1858 + fontSize: ScreenUtil().setSp(28)),
  1859 + ),
  1860 + Expanded(
  1861 + child: InkWell(
  1862 + onTap: () {
  1863 + //时间弹窗
  1864 +
  1865 + FocusScope.of(context)
  1866 + .requestFocus(FocusNode()); //隐藏键盘
  1867 + DialogUtil.showSelectCusmanDialog(
  1868 + context, dailyList, (value) async {
  1869 + if (value != null) {
  1870 + ddateIndex = value.first;
  1871 + ddateHm = dailyList[value.first];
  1872 + setState(() {});
  1873 + bool sucess = await detailModel
  1874 + .upReserveInfo(context, widget.rid,
  1875 + dateStr: ddateHm,
  1876 + ymd: detailEntity.ddateYMD,
  1877 + needToast: false);
  1878 +
  1879 + if (sucess) {
  1880 + EventBus().emit(
  1881 + "refresh_tablemanager"); //刷新桌位
  1882 + bus.emit("refresh_book_list"); //刷新已预订列表
  1883 + bus.emit("refresh_detail");
  1884 + await _getReserveDetail(
  1885 + showCicle: false);
  1886 + }
  1887 + }
  1888 + },
  1889 + title: '到店时间',
  1890 + selecteds: ddateIndex == null
  1891 + ? []
  1892 + : [ddateIndex])
  1893 + .then((value) {});
  1894 + },
  1895 + child: Container(
  1896 + alignment: Alignment.center,
  1897 + child: Text(
  1898 + ddateHm == null || ddateHm == ''
  1899 + ? '选填'
  1900 + : ddateHm,
  1901 + style: TextStyle(
  1902 + fontSize: ScreenUtil().setSp(28),
  1903 + color:
  1904 + ddateHm == null || ddateHm == ''
  1905 + ? MyColours.color_999999
  1906 + : MyColours.color_515151))),
2077 ), 1907 ),
  1908 +
  1909 + // HEmptyView(6),
  1910 + // Image.asset(
  1911 + // Utils.getImgPath(
  1912 + // false ? 'c_arrow_up' : 'c_arrow_down'),
  1913 + // width: ScreenUtil().setWidth(28),
  1914 + // // height: ScreenUtil().setWidth(10),
  1915 + // ),
2078 ), 1916 ),
2079 - HEmptyView(40),  
2080 - InkWell(  
2081 - onTap: () {  
2082 - FocusScope.of(context)  
2083 - .requestFocus(FocusNode()); //隐藏键盘 1917 + ],
  1918 + )))
  1919 + ],
  1920 + ),
  1921 + ),
  1922 + if (enterMore) VEmptyView(40),
  1923 + //电话
  1924 + if (enterMore)
  1925 + Container(
  1926 + height: ScreenUtil().setWidth(68),
  1927 + padding:
  1928 + EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(16)),
  1929 + decoration: BoxDecoration(
  1930 + borderRadius:
  1931 + BorderRadius.circular(ScreenUtil().setWidth(12)),
  1932 + // color: Colors.red,
  1933 + border: Border.all(
  1934 + width: ScreenUtil().setWidth(2),
  1935 + color: MyColours.color_DBDBDB)),
  1936 + child: Row(
  1937 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  1938 + crossAxisAlignment: CrossAxisAlignment.center,
  1939 + children: [
  1940 + Expanded(
  1941 + child: TextField(
  1942 + selectionControls: _myExtendedMaterialTextSelectionControls,
  1943 + maxLines: 1,
  1944 + //输入文本的样式
  1945 + style: TextStyle(
  1946 + fontSize: ScreenUtil().setSp(30),
  1947 + color: MyColours.color_353535),
  1948 + controller: _baseIndoProvider.phoneController,
  1949 + focusNode: _phoneNode,
  1950 + // textAlignVertical: TextAlignVertical.top,
  1951 + decoration: InputDecoration(
  1952 + hintText: "预留电话",
  1953 + hintStyle: TextStyle(
  1954 + color: MyColours.color_999999,
  1955 + fontSize: ScreenUtil().setSp(28),
  1956 + ),
  1957 + contentPadding: EdgeInsets.zero,
  1958 + border: OutlineInputBorder(borderSide: BorderSide.none),
  1959 + ),
  1960 + onChanged: (value) {
  1961 + print(value);
  1962 + if (value.trim().isEmpty || value.trim().length > 11) {
  1963 + //内容为空,或 超过11位
  1964 + setState(() {
  1965 + _baseIndoProvider.userHistorys.clear();
  1966 + });
  1967 + return;
  1968 + }
  1969 + Map<String, String> params = {
  1970 + "keywords": value.trim(),
  1971 + "sid": Provider.of<UserModel>(context, listen: false)
  1972 + .user
  1973 + .sellerid,
  1974 + };
  1975 + _baseIndoProvider.getUserHistorys(context, params);
  1976 + _getIsMemberByPhone(value);
  1977 + },
  1978 + onEditingComplete: () {
  1979 + _phoneNode.unfocus();
  1980 + },
  1981 + onTap: () {
  1982 + setState(() {
  1983 + showPhoneHistory = true;
  1984 + });
  1985 + // Future.delayed(Duration(milliseconds: 300), () {
  1986 + // _controller.jumpTo(_controller.position.maxScrollExtent);
  1987 + // });
  1988 + },
  1989 + keyboardType:
  1990 + TextInputType.numberWithOptions(decimal: true),
  1991 + )),
  1992 + InkWell(
  1993 + onTap: () {
  1994 + _openAddressBook();
  1995 + },
  1996 + child: Container(
  1997 + width: ScreenUtil().setWidth(74) * 2,
  1998 + height: ScreenUtil().setWidth(48),
  1999 + alignment: Alignment.centerRight,
  2000 + child: Text('一键录入',
  2001 + style: TextStyle(
  2002 + color: MyColours.color_515151,
  2003 + fontSize: ScreenUtil().setSp(28),
  2004 + )),
  2005 + ),
  2006 + ),
  2007 + ],
  2008 + )),
  2009 + Stack(
  2010 + clipBehavior: Clip.none,
  2011 + children: [
  2012 + Column(
  2013 + crossAxisAlignment: CrossAxisAlignment.start,
  2014 + children: [
  2015 + //姓名
  2016 + if (enterMore)
  2017 + Container(
  2018 + margin: EdgeInsets.only(
  2019 + top: ScreenUtil().setWidth(40),
  2020 + bottom: ScreenUtil().setWidth(40)),
  2021 + height: ScreenUtil().setWidth(68),
  2022 + padding: EdgeInsets.symmetric(
  2023 + horizontal: ScreenUtil().setWidth(16)),
  2024 + decoration: BoxDecoration(
  2025 + borderRadius:
  2026 + BorderRadius.circular(ScreenUtil().setWidth(12)),
  2027 + // color: Colors.red,
  2028 + border: Border.all(
  2029 + width: ScreenUtil().setWidth(2),
  2030 + color: MyColours.color_DBDBDB)),
  2031 + child: Row(
  2032 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  2033 + crossAxisAlignment: CrossAxisAlignment.center,
  2034 + children: [
  2035 + Expanded(
  2036 + child: TextField(
  2037 + maxLines: 1,
2084 2038
2085 - DialogUtil.showSelectCusmanDialog(  
2086 - context, sexList, (value) async {  
2087 - if (value != null) {  
2088 - sexSelectIndex = value.first;  
2089 - sexStr = sexList[sexSelectIndex];  
2090 - if (nameStr != null && nameStr != '') {  
2091 - _addNameSuffix(nameStr, sexStr);  
2092 - _showConfirmWidget(needSex: true);  
2093 - }  
2094 - setState(() {});  
2095 - }  
2096 - }, selecteds: [sexSelectIndex])  
2097 - .then((value) {});  
2098 - },  
2099 - child: Row(children: [  
2100 - Text(  
2101 - sexStr,  
2102 - style: TextStyle(  
2103 - color: MyColours.color_515151,  
2104 - fontSize: ScreenUtil().setSp(28),  
2105 - ), 2039 + //输入文本的样式
  2040 + style: TextStyle(
  2041 + fontSize: ScreenUtil().setSp(28),
  2042 + color: MyColours.color_353535),
  2043 + controller: _baseIndoProvider.nameController,
  2044 + focusNode: _nameNode,
  2045 + // textAlignVertical: TextAlignVertical.top,
  2046 + decoration: InputDecoration(
  2047 + hintText: "顾客姓名",
  2048 + hintStyle: TextStyle(
  2049 + color: MyColours.color_999999,
  2050 + fontSize: ScreenUtil().setSp(28),
2106 ), 2051 ),
2107 - Image.asset(Utils.getImgPath('quan_down_f'),  
2108 - width: ScreenUtil().setWidth(28),  
2109 - height: ScreenUtil().setWidth(28)),  
2110 - ]), 2052 + // contentPadding:
  2053 + // EdgeInsets.only(bottom: ScreenUtil().setWidth(17)),
  2054 + // border: InputBorder.none,
  2055 + contentPadding: EdgeInsets.zero,
  2056 + border: OutlineInputBorder(
  2057 + borderSide: BorderSide.none),
  2058 + ),
  2059 + onChanged: (value) {
  2060 + print('ggg');
  2061 +
  2062 + nameStr = value;
  2063 + },
  2064 + onEditingComplete: () {
  2065 + print('fff');
  2066 + _nameNode.unfocus();
  2067 + // _homeEnterModel.nameController.text =
  2068 + // nameStr + _nameSuffix();
  2069 + _addNameSuffix(nameStr, sexStr);
  2070 + },
  2071 + keyboardType: TextInputType.text,
2111 ), 2072 ),
2112 - HEmptyView(40),  
2113 - InkWell(  
2114 - onTap: () {  
2115 - if (_baseIndoProvider.phoneController.text  
2116 - .trim()  
2117 - .length ==  
2118 - 0) {  
2119 - Utils.showToast('请先输入电话,再设置会员信息!');  
2120 - return; 2073 + ),
  2074 + HEmptyView(40),
  2075 + InkWell(
  2076 + onTap: () {
  2077 + FocusScope.of(context)
  2078 + .requestFocus(FocusNode()); //隐藏键盘
  2079 +
  2080 + DialogUtil.showSelectCusmanDialog(
  2081 + context, sexList, (value) async {
  2082 + if (value != null) {
  2083 + sexSelectIndex = value.first;
  2084 + sexStr = sexList[sexSelectIndex];
  2085 + if (nameStr != null && nameStr != '') {
  2086 + _addNameSuffix(nameStr, sexStr);
  2087 + _showConfirmWidget(needSex: true);
  2088 + }
  2089 + setState(() {});
2121 } 2090 }
2122 - FocusScope.of(context)  
2123 - .requestFocus(FocusNode()); //隐藏键盘 2091 + }, selecteds: [sexSelectIndex]).then((value) {});
  2092 + },
  2093 + child: Row(children: [
  2094 + Text(
  2095 + sexStr,
  2096 + style: TextStyle(
  2097 + color: MyColours.color_515151,
  2098 + fontSize: ScreenUtil().setSp(28),
  2099 + ),
  2100 + ),
  2101 + Image.asset(Utils.getImgPath('quan_down_f'),
  2102 + width: ScreenUtil().setWidth(28),
  2103 + height: ScreenUtil().setWidth(28)),
  2104 + ]),
  2105 + ),
  2106 + HEmptyView(40),
  2107 + InkWell(
  2108 + onTap: () {
  2109 + if (_baseIndoProvider.phoneController.text
  2110 + .trim()
  2111 + .length ==
  2112 + 0) {
  2113 + Utils.showToast('请先输入电话,再设置会员信息!');
  2114 + return;
  2115 + }
  2116 + FocusScope.of(context)
  2117 + .requestFocus(FocusNode()); //隐藏键盘
2124 2118
2125 - DialogUtil.showSelectCusmanDialog(  
2126 - context, memberList, (value) async {  
2127 - if (value != null) {  
2128 - memberIndex = value.first;  
2129 - isMember = memberList[memberIndex]; 2119 + DialogUtil.showSelectCusmanDialog(
  2120 + context, memberList, (value) async {
  2121 + if (value != null) {
  2122 + memberIndex = value.first;
  2123 + isMember = memberList[memberIndex];
2130 2124
2131 - setState(() {});  
2132 - _setInsGuest();  
2133 - }  
2134 - }, selecteds: [memberIndex ?? 0])  
2135 - .then((value) {});  
2136 - },  
2137 - child: Row(children: [  
2138 - Text(  
2139 - isMember,  
2140 - style: TextStyle(  
2141 - color: isMember == '会员状态未知'  
2142 - ? MyColours.color_999999  
2143 - : MyColours.color_515151,  
2144 - fontSize: ScreenUtil().setSp(28),  
2145 - ), 2125 + setState(() {});
  2126 + _setInsGuest();
  2127 + }
  2128 + }, selecteds: [memberIndex ?? 0])
  2129 + .then((value) {});
  2130 + },
  2131 + child: Row(children: [
  2132 + Text(
  2133 + isMember,
  2134 + style: TextStyle(
  2135 + color: isMember == '会员状态未知'
  2136 + ? MyColours.color_999999
  2137 + : MyColours.color_515151,
  2138 + fontSize: ScreenUtil().setSp(28),
2146 ), 2139 ),
2147 - Image.asset(Utils.getImgPath('quan_down_f'),  
2148 - width: ScreenUtil().setWidth(28),  
2149 - height: ScreenUtil().setWidth(28)),  
2150 - ]),  
2151 - )  
2152 - ],  
2153 - ))  
2154 - : SizedBox(), 2140 + ),
  2141 + Image.asset(Utils.getImgPath('quan_down_f'),
  2142 + width: ScreenUtil().setWidth(28),
  2143 + height: ScreenUtil().setWidth(28)),
  2144 + ]),
  2145 + )
  2146 + ],
  2147 + )),
2155 //餐单类型 2148 //餐单类型
2156 // enterMore 2149 // enterMore
2157 // ? Container( 2150 // ? Container(
@@ -2312,167 +2305,160 @@ class InvicationPageState extends State<InvicationPage> @@ -2312,167 +2305,160 @@ class InvicationPageState extends State<InvicationPage>
2312 ), 2305 ),
2313 // 选择优惠 2306 // 选择优惠
2314 // _couponWidget(), 2307 // _couponWidget(),
2315 - showErroInfo  
2316 - ? Container(  
2317 - margin: EdgeInsets.only(  
2318 - top: ScreenUtil().setWidth(40),  
2319 - bottom: ScreenUtil().setWidth(24)),  
2320 - height: ScreenUtil().setWidth(46 * 2),  
2321 - padding: EdgeInsets.symmetric(  
2322 - horizontal: ScreenUtil().setWidth(34)), 2308 + if (showErroInfo)
  2309 + Container(
  2310 + margin: EdgeInsets.only(
  2311 + top: ScreenUtil().setWidth(40),
  2312 + bottom: ScreenUtil().setWidth(24)),
  2313 + height: ScreenUtil().setWidth(46 * 2),
  2314 + padding: EdgeInsets.symmetric(
  2315 + horizontal: ScreenUtil().setWidth(34)),
  2316 + decoration: BoxDecoration(
  2317 + color: MyColours.color_ffffff,
  2318 + borderRadius:
  2319 + BorderRadius.circular(ScreenUtil().setWidth(8)),
  2320 + boxShadow: [
  2321 + BoxShadow(
  2322 + color: Color.fromRGBO(0, 0, 0, 0.2),
  2323 + blurRadius: ScreenUtil().setWidth(8),
  2324 + spreadRadius: ScreenUtil().setWidth(2),
  2325 + offset: Offset(0, ScreenUtil().setWidth(2)))
  2326 + ]),
  2327 + child: Row(
  2328 + mainAxisSize: MainAxisSize.min,
  2329 + children: [
  2330 + Image.asset(
  2331 + Utils.getImgPath(erroInfo == '1分钟内只能发送一条短信'
  2332 + ? 'error_circle_yellow'
  2333 + : 'error_circle_red'),
  2334 + width: ScreenUtil().setWidth(40)),
  2335 + HEmptyView(10),
  2336 + Text(erroInfo,
  2337 + style: TextStyle(
  2338 + color: erroInfo == '1分钟内只能发送一条短信'
  2339 + ? MyColours.color_ED7B2F
  2340 + : MyColours.color_E34D59,
  2341 + fontSize: ScreenUtil().setSp(28))),
  2342 + ],
  2343 + ),
  2344 + )
  2345 + ],
  2346 + ),
  2347 + if (enterMore)
  2348 + Positioned(
  2349 + top: 0,
  2350 + left: 0,
  2351 + child: Offstage(
  2352 + offstage: !(showPhoneHistory &&
  2353 + _baseIndoProvider.userHistorys.length > 0),
  2354 + child: Container(
2323 decoration: BoxDecoration( 2355 decoration: BoxDecoration(
  2356 + borderRadius: BorderRadius.circular(8),
  2357 + border: Border.all(color: Colors.white),
2324 color: MyColours.color_ffffff, 2358 color: MyColours.color_ffffff,
2325 - borderRadius:  
2326 - BorderRadius.circular(ScreenUtil().setWidth(8)), 2359 + // color: Colors.red,
2327 boxShadow: [ 2360 boxShadow: [
2328 BoxShadow( 2361 BoxShadow(
2329 - color: Color.fromRGBO(0, 0, 0, 0.2),  
2330 - blurRadius: ScreenUtil().setWidth(8),  
2331 - spreadRadius: ScreenUtil().setWidth(2),  
2332 - offset: Offset(0, ScreenUtil().setWidth(2))) 2362 + color: MyColours.color_e5e5e5,
  2363 + blurRadius: ScreenUtil().setWidth(20))
2333 ]), 2364 ]),
2334 - child: Row(  
2335 - mainAxisSize: MainAxisSize.min,  
2336 - children: [  
2337 - Image.asset(  
2338 - Utils.getImgPath(erroInfo == '1分钟内只能发送一条短信'  
2339 - ? 'error_circle_yellow'  
2340 - : 'error_circle_red'),  
2341 - width: ScreenUtil().setWidth(40)),  
2342 - HEmptyView(10),  
2343 - Text(erroInfo,  
2344 - style: TextStyle(  
2345 - color: erroInfo == '1分钟内只能发送一条短信'  
2346 - ? MyColours.color_ED7B2F  
2347 - : MyColours.color_E34D59,  
2348 - fontSize: ScreenUtil().setSp(28))),  
2349 - ],  
2350 - ),  
2351 - )  
2352 - : SizedBox()  
2353 - ],  
2354 - ),  
2355 - enterMore  
2356 - ? Positioned(  
2357 - top: 0,  
2358 - left: 0,  
2359 - child: Offstage(  
2360 - offstage: !(showPhoneHistory &&  
2361 - _baseIndoProvider.userHistorys.length > 0),  
2362 - child: Container(  
2363 - decoration: BoxDecoration(  
2364 - borderRadius: BorderRadius.circular(8),  
2365 - border: Border.all(color: Colors.white),  
2366 - color: MyColours.color_ffffff,  
2367 - // color: Colors.red,  
2368 - boxShadow: [  
2369 - BoxShadow(  
2370 - color: MyColours.color_e5e5e5,  
2371 - blurRadius: ScreenUtil().setWidth(20))  
2372 - ]),  
2373 - // width: ScreenUtil().setWidth(440),  
2374 - // height: _baseIndoProvider.userHistorys.length > 1  
2375 - // ? ScreenUtil().setWidth(140)  
2376 - // : ScreenUtil().setWidth(104),  
2377 - width: ScreenUtil().screenWidth - w(60),  
2378 - // width: ScreenUtil().setWidth(350),  
2379 - constraints: BoxConstraints(maxHeight: w(270)),  
2380 - padding: EdgeInsets.symmetric(  
2381 - horizontal: ScreenUtil().setWidth(30)),  
2382 - child: Align(  
2383 - alignment: Alignment.topCenter,  
2384 - child: MediaQuery.removePadding(  
2385 - context: context,  
2386 - removeTop: true,  
2387 - child: Scrollbar(  
2388 - isAlwaysShown: true, //设置滚动条常亮  
2389 - controller: _scrollCrl, //必须设置一个controller  
2390 -  
2391 - ///添加进度条  
2392 - child: ListView.builder(  
2393 - shrinkWrap: true,  
2394 - controller: _scrollCrl,  
2395 - itemBuilder: (context, index) {  
2396 - return GestureDetector(  
2397 - onTap: () {  
2398 - _getIsMemberByPhone( 2365 + // width: ScreenUtil().setWidth(440),
  2366 + // height: _baseIndoProvider.userHistorys.length > 1
  2367 + // ? ScreenUtil().setWidth(140)
  2368 + // : ScreenUtil().setWidth(104),
  2369 + width: ScreenUtil().screenWidth - w(60),
  2370 + // width: ScreenUtil().setWidth(350),
  2371 + constraints: BoxConstraints(maxHeight: w(270)),
  2372 + padding: EdgeInsets.symmetric(
  2373 + horizontal: ScreenUtil().setWidth(30)),
  2374 + child: Align(
  2375 + alignment: Alignment.topCenter,
  2376 + child: MediaQuery.removePadding(
  2377 + context: context,
  2378 + removeTop: true,
  2379 + child: Scrollbar(
  2380 + isAlwaysShown: true, //设置滚动条常亮
  2381 + controller: _scrollCrl, //必须设置一个controller
  2382 +
  2383 + ///添加进度条
  2384 + child: ListView.builder(
  2385 + shrinkWrap: true,
  2386 + controller: _scrollCrl,
  2387 + itemBuilder: (context, index) {
  2388 + return GestureDetector(
  2389 + onTap: () {
  2390 + _getIsMemberByPhone(_baseIndoProvider
  2391 + .userHistorys[index].phone);
  2392 + needHistory = true;
  2393 + _showConfirmWidget(
  2394 + needHistory: true, index: index);
  2395 + },
  2396 + child: Container(
  2397 + width: double.infinity,
  2398 + height: ScreenUtil().setWidth(102),
  2399 + decoration: BoxDecoration(
  2400 + border: Border(
  2401 + bottom: (index !=
  2402 + (_baseIndoProvider
  2403 + .userHistorys
  2404 + .length -
  2405 + 1) &&
  2406 + _baseIndoProvider
  2407 + .userHistorys
  2408 + .length >
  2409 + 1)
  2410 + ? BorderSide(
  2411 + color: MyColours
  2412 + .color_e5e5e5,
  2413 + width: ScreenUtil()
  2414 + .setWidth(2))
  2415 + : BorderSide.none)),
  2416 + child: Row(
  2417 + mainAxisAlignment:
  2418 + MainAxisAlignment.spaceBetween,
  2419 + children: [
  2420 + Text(
2399 _baseIndoProvider 2421 _baseIndoProvider
2400 - .userHistorys[index].phone);  
2401 - needHistory = true;  
2402 - _showConfirmWidget(  
2403 - needHistory: true,  
2404 - index: index);  
2405 - },  
2406 - child: Container(  
2407 - width: double.infinity,  
2408 - height: ScreenUtil().setWidth(102),  
2409 - decoration: BoxDecoration(  
2410 - border: Border(  
2411 - bottom: (index !=  
2412 - (_baseIndoProvider  
2413 - .userHistorys  
2414 - .length -  
2415 - 1) &&  
2416 - _baseIndoProvider  
2417 - .userHistorys  
2418 - .length >  
2419 - 1)  
2420 - ? BorderSide(  
2421 - color: MyColours  
2422 - .color_e5e5e5,  
2423 - width: ScreenUtil()  
2424 - .setWidth(2))  
2425 - : BorderSide.none)),  
2426 - child: Row(  
2427 - mainAxisAlignment:  
2428 - MainAxisAlignment  
2429 - .spaceBetween,  
2430 - children: [  
2431 - Text(  
2432 - _baseIndoProvider  
2433 - .userHistorys[  
2434 - index]  
2435 - .phone ==  
2436 - null  
2437 - ? ''  
2438 - : _baseIndoProvider  
2439 - .userHistorys[index]  
2440 - .phone,  
2441 - style: TextStyle(  
2442 - color: MyColours  
2443 - .color_333333,  
2444 - fontSize: ScreenUtil()  
2445 - .setSp(32)),  
2446 - ),  
2447 - Expanded(  
2448 - child: Text(  
2449 - _baseIndoProvider  
2450 - .userHistorys[  
2451 - index]  
2452 - .rname ==  
2453 - null  
2454 - ? ''  
2455 - : _baseIndoProvider  
2456 - .userHistorys[index]  
2457 - .rname,  
2458 - style: TextStyle(  
2459 - color: MyColours  
2460 - .color_333333,  
2461 - fontSize: ScreenUtil()  
2462 - .setSp(32)),  
2463 - ))  
2464 - ],  
2465 - ), 2422 + .userHistorys[index]
  2423 + .phone ==
  2424 + null
  2425 + ? ''
  2426 + : _baseIndoProvider
  2427 + .userHistorys[index]
  2428 + .phone,
  2429 + style: TextStyle(
  2430 + color:
  2431 + MyColours.color_333333,
  2432 + fontSize:
  2433 + ScreenUtil().setSp(32)),
  2434 + ),
  2435 + Expanded(
  2436 + child: Text(
  2437 + _baseIndoProvider
  2438 + .userHistorys[index]
  2439 + .rname ==
  2440 + null
  2441 + ? ''
  2442 + : _baseIndoProvider
  2443 + .userHistorys[index]
  2444 + .rname,
  2445 + style: TextStyle(
  2446 + color:
  2447 + MyColours.color_333333,
  2448 + fontSize:
  2449 + ScreenUtil().setSp(32)),
  2450 + ))
  2451 + ],
2466 ), 2452 ),
2467 - );  
2468 - },  
2469 - itemExtent: ScreenUtil().setWidth(104),  
2470 - itemCount:  
2471 - _baseIndoProvider.userHistorys.length,  
2472 - ))),  
2473 - ),  
2474 - )))  
2475 - : SizedBox() 2453 + ),
  2454 + );
  2455 + },
  2456 + itemExtent: ScreenUtil().setWidth(104),
  2457 + itemCount:
  2458 + _baseIndoProvider.userHistorys.length,
  2459 + ))),
  2460 + ),
  2461 + )))
2476 ], 2462 ],
2477 ), 2463 ),
2478 ], 2464 ],
@@ -3677,12 +3663,14 @@ class InvicationPageState extends State<InvicationPage> @@ -3677,12 +3663,14 @@ class InvicationPageState extends State<InvicationPage>
3677 } 3663 }
3678 3664
3679 showOverlay(BuildContext context) { 3665 showOverlay(BuildContext context) {
3680 - if (overlayEntry != null) return; 3666 + if (overlayEntry != null || MediaQuery.of(context).viewInsets.bottom == 0)
  3667 + return SizedBox();
3681 OverlayState overlayState = Overlay.of(context); 3668 OverlayState overlayState = Overlay.of(context);
3682 overlayEntry = OverlayEntry(builder: (context) { 3669 overlayEntry = OverlayEntry(builder: (context) {
3683 // setState(() { 3670 // setState(() {
3684 _showOverlay = true; 3671 _showOverlay = true;
3685 // }); 3672 // });
  3673 +
3686 return Positioned( 3674 return Positioned(
3687 bottom: MediaQuery.of(context).viewInsets.bottom, 3675 bottom: MediaQuery.of(context).viewInsets.bottom,
3688 right: 0.0, 3676 right: 0.0,
@@ -4683,33 +4671,31 @@ class InvicationPageState extends State<InvicationPage> @@ -4683,33 +4671,31 @@ class InvicationPageState extends State<InvicationPage>
4683 } else { 4671 } else {
4684 return Column(children: [ 4672 return Column(children: [
4685 Expanded( 4673 Expanded(
4686 - child: SingleChildScrollView(  
4687 - controller: _scrollController,  
4688 - scrollDirection: Axis.vertical,  
4689 - //true 滑动到底部  
4690 - padding: EdgeInsets.all(0.0),  
4691 - // reverse: _phoneNode.hasFocus ? true : false,  
4692 - child: Column(  
4693 - crossAxisAlignment: CrossAxisAlignment.start,  
4694 - children: [  
4695 - VEmptyView(38),  
4696 - _reverseTimeWidget(),  
4697 - VEmptyView(24),  
4698 - _tableInfoWidget(),  
4699 - VEmptyView(34),  
4700 - _enterMoreWidget(),  
4701 - // VEmptyView(40),  
4702 - // _managerWidget(),  
4703 - // VEmptyView(50),  
4704 - // _orderInfoWidget(),  
4705 - // VEmptyView(30),  
4706 - // _couponWidget(),  
4707 - // VEmptyView(20),  
4708 - Container(  
4709 - key: botGlobalKey,  
4710 - height: ScreenUtil().setWidth(20)),  
4711 - ],  
4712 - ))), 4674 + child: ListView(
  4675 + controller: _scrollController,
  4676 + scrollDirection: Axis.vertical,
  4677 + //true 滑动到底部
  4678 + padding: EdgeInsets.all(0.0),
  4679 + // reverse: _phoneNode.hasFocus ? true : false,
  4680 + children: [
  4681 + VEmptyView(38),
  4682 + _reverseTimeWidget(),
  4683 + VEmptyView(24),
  4684 + _tableInfoWidget(),
  4685 + VEmptyView(34),
  4686 + _enterMoreWidget(),
  4687 + // VEmptyView(40),
  4688 + // _managerWidget(),
  4689 + // VEmptyView(50),
  4690 + // _orderInfoWidget(),
  4691 + // VEmptyView(30),
  4692 + // _couponWidget(),
  4693 + // VEmptyView(20),
  4694 + Container(
  4695 + key: botGlobalKey,
  4696 + height: ScreenUtil().setWidth(20)),
  4697 + ],
  4698 + )),
4713 Padding( 4699 Padding(
4714 padding: EdgeInsets.symmetric( 4700 padding: EdgeInsets.symmetric(
4715 horizontal: ScreenUtil().setWidth(48)), 4701 horizontal: ScreenUtil().setWidth(48)),