|
1
|
import 'dart:async';
|
1
|
import 'dart:async';
|
|
2
|
|
2
|
|
|
3
|
-
|
|
|
|
4
|
import 'dart:ui';
|
3
|
import 'dart:ui';
|
|
5
|
|
4
|
|
|
6
|
import 'package:cached_network_image/cached_network_image.dart';
|
5
|
import 'package:cached_network_image/cached_network_image.dart';
|
|
@@ -14,7 +13,6 @@ import 'package:flutter_lunar_datetime_picker/flutter_lunar_datetime_picker.dart |
|
@@ -14,7 +13,6 @@ import 'package:flutter_lunar_datetime_picker/flutter_lunar_datetime_picker.dart |
|
14
|
import 'package:flutter_picker_plus/flutter_picker_plus.dart';
|
13
|
import 'package:flutter_picker_plus/flutter_picker_plus.dart';
|
|
15
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
14
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
16
|
|
15
|
|
|
17
|
-
|
|
|
|
18
|
import 'package:one_key/models/filter_btn_model.dart';
|
16
|
import 'package:one_key/models/filter_btn_model.dart';
|
|
19
|
import 'package:one_key/models/remark.dart';
|
17
|
import 'package:one_key/models/remark.dart';
|
|
20
|
import 'package:one_key/models/seller_role_model.dart';
|
18
|
import 'package:one_key/models/seller_role_model.dart';
|
|
@@ -1641,83 +1639,288 @@ class DialogUtil { |
|
@@ -1641,83 +1639,288 @@ class DialogUtil { |
|
1641
|
TextEditingController controller, FocusNode node) {
|
1639
|
TextEditingController controller, FocusNode node) {
|
|
1642
|
return Container(
|
1640
|
return Container(
|
|
1643
|
// height: ScreenUtil().setWidth(380),
|
1641
|
// height: ScreenUtil().setWidth(380),
|
|
1644
|
- padding: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(28)),
|
|
|
|
1645
|
- child: Column(
|
|
|
|
1646
|
- crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
1647
|
- children: [
|
|
|
|
1648
|
- Align(
|
|
|
|
1649
|
- alignment: Alignment.centerLeft,
|
|
|
|
1650
|
- child: Text(
|
|
|
|
1651
|
- title,
|
|
|
|
1652
|
- textAlign: TextAlign.left,
|
|
|
|
1653
|
- style: TextStyle(
|
|
|
|
1654
|
- color: MyColours.color_515151,
|
|
|
|
1655
|
- fontSize: ScreenUtil().setSp(32)),
|
|
|
|
1656
|
- )),
|
|
|
|
1657
|
- VEmptyView(26),
|
|
|
|
1658
|
- Container(
|
|
|
|
1659
|
- height: ScreenUtil().setWidth(2),
|
|
|
|
1660
|
- color: MyColours.color_E7E7E7,
|
1642
|
+ padding: EdgeInsets.symmetric(horizontal: w(10)),
|
|
|
|
1643
|
+ margin: EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(28)),
|
|
|
|
1644
|
+ decoration: BoxDecoration(
|
|
|
|
1645
|
+ borderRadius: BorderRadius.circular(r(5)),
|
|
|
|
1646
|
+ border: Border.all(width: w(0.5), color: MyColours.color_CBCBCB)),
|
|
|
|
1647
|
+ child: TextField(
|
|
|
|
1648
|
+ controller: controller,
|
|
|
|
1649
|
+ focusNode: node,
|
|
|
|
1650
|
+ // keyboardType: TextInputType.numberWithOptions(decimal: true), //键盘类型,数字键盘
|
|
|
|
1651
|
+ maxLines: 3,
|
|
|
|
1652
|
+ maxLength: 100,
|
|
|
|
1653
|
+
|
|
|
|
1654
|
+ // maxLengthEnforced: true,
|
|
|
|
1655
|
+ style: TextStyle(
|
|
|
|
1656
|
+ fontSize: ScreenUtil().setSp(24),
|
|
|
|
1657
|
+ color: MyColours.color_333333), //输入文本的样式
|
|
|
|
1658
|
+ decoration: InputDecoration(
|
|
|
|
1659
|
+ contentPadding:
|
|
|
|
1660
|
+ EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(30)),
|
|
|
|
1661
|
+ hintText: hintText,
|
|
|
|
1662
|
+ hintStyle: TextStyle(
|
|
|
|
1663
|
+ color: MyColours.color_999999,
|
|
|
|
1664
|
+ fontSize: ScreenUtil().setSp(24),
|
|
1661
|
),
|
1665
|
),
|
|
1662
|
- TextField(
|
|
|
|
1663
|
- controller: controller,
|
|
|
|
1664
|
- focusNode: node,
|
|
|
|
1665
|
- // keyboardType: TextInputType.numberWithOptions(decimal: true), //键盘类型,数字键盘
|
|
|
|
1666
|
- maxLines: 3,
|
|
|
|
1667
|
- maxLength: 150,
|
|
|
|
1668
|
-
|
|
|
|
1669
|
- // maxLengthEnforced: true,
|
|
|
|
1670
|
- style: TextStyle(
|
|
|
|
1671
|
- fontSize: ScreenUtil().setSp(32),
|
|
|
|
1672
|
- color: MyColours.color_333333), //输入文本的样式
|
|
|
|
1673
|
- decoration: InputDecoration(
|
|
|
|
1674
|
- contentPadding:
|
|
|
|
1675
|
- EdgeInsets.symmetric(vertical: ScreenUtil().setWidth(30)),
|
|
|
|
1676
|
- hintText: hintText,
|
|
|
|
1677
|
- hintStyle: TextStyle(
|
|
|
|
1678
|
- color: MyColours.color_999999,
|
|
|
|
1679
|
- fontSize: ScreenUtil().setSp(32),
|
|
|
|
1680
|
- ),
|
|
|
|
1681
|
-
|
|
|
|
1682
|
- border: OutlineInputBorder(borderSide: BorderSide.none),
|
|
|
|
1683
|
|
1666
|
|
|
1684
|
- enabledBorder: new UnderlineInputBorder(
|
|
|
|
1685
|
- borderSide: BorderSide.none,
|
|
|
|
1686
|
- ),
|
|
|
|
1687
|
- focusedBorder: new UnderlineInputBorder(
|
|
|
|
1688
|
- borderSide: BorderSide.none,
|
|
|
|
1689
|
- ),
|
1667
|
+ border: OutlineInputBorder(borderSide: BorderSide.none),
|
|
1690
|
|
1668
|
|
|
1691
|
- // fillColor: MyColours.color_F9F9F9,
|
|
|
|
1692
|
- // // fillColor: Colors.red,
|
|
|
|
1693
|
- // filled: true,
|
|
|
|
1694
|
- // enabledBorder: OutlineInputBorder(
|
|
|
|
1695
|
- // //未选中时候的颜色
|
|
|
|
1696
|
- // borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),
|
|
|
|
1697
|
- // borderSide: BorderSide(
|
|
|
|
1698
|
- // color: MyColours.color_cccccc,
|
|
|
|
1699
|
- // width: ScreenUtil().setWidth(2)),
|
|
|
|
1700
|
- // ),
|
|
|
|
1701
|
- // focusedBorder: OutlineInputBorder(
|
|
|
|
1702
|
- // //选中时外边框颜色
|
|
|
|
1703
|
- // borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),
|
|
|
|
1704
|
- // borderSide: BorderSide(
|
|
|
|
1705
|
- // color: MyColours.app_main,
|
|
|
|
1706
|
- // ),
|
|
|
|
1707
|
- // ),
|
|
|
|
1708
|
- // border: OutlineInputBorder(
|
|
|
|
1709
|
- // borderRadius:
|
|
|
|
1710
|
- // BorderRadius.circular(ScreenUtil().setWidth(20)),
|
|
|
|
1711
|
- // borderSide: BorderSide(
|
|
|
|
1712
|
- // color: Colors.red, width: ScreenUtil().setWidth(2))),
|
|
|
|
1713
|
- ),
|
|
|
|
1714
|
- onChanged: (value) {},
|
1669
|
+ enabledBorder: new UnderlineInputBorder(
|
|
|
|
1670
|
+ borderSide: BorderSide.none,
|
|
1715
|
),
|
1671
|
),
|
|
1716
|
- ],
|
1672
|
+ focusedBorder: new UnderlineInputBorder(
|
|
|
|
1673
|
+ borderSide: BorderSide.none,
|
|
|
|
1674
|
+ ),
|
|
|
|
1675
|
+
|
|
|
|
1676
|
+ // fillColor: MyColours.color_F9F9F9,
|
|
|
|
1677
|
+ // // fillColor: Colors.red,
|
|
|
|
1678
|
+ // filled: true,
|
|
|
|
1679
|
+ // enabledBorder: OutlineInputBorder(
|
|
|
|
1680
|
+ // //未选中时候的颜色
|
|
|
|
1681
|
+ // borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),
|
|
|
|
1682
|
+ // borderSide: BorderSide(
|
|
|
|
1683
|
+ // color: MyColours.color_cccccc,
|
|
|
|
1684
|
+ // width: ScreenUtil().setWidth(2)),
|
|
|
|
1685
|
+ // ),
|
|
|
|
1686
|
+ // focusedBorder: OutlineInputBorder(
|
|
|
|
1687
|
+ // //选中时外边框颜色
|
|
|
|
1688
|
+ // borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),
|
|
|
|
1689
|
+ // borderSide: BorderSide(
|
|
|
|
1690
|
+ // color: MyColours.app_main,
|
|
|
|
1691
|
+ // ),
|
|
|
|
1692
|
+ // ),
|
|
|
|
1693
|
+ // border: OutlineInputBorder(
|
|
|
|
1694
|
+ // borderRadius:
|
|
|
|
1695
|
+ // BorderRadius.circular(ScreenUtil().setWidth(20)),
|
|
|
|
1696
|
+ // borderSide: BorderSide(
|
|
|
|
1697
|
+ // color: Colors.red, width: ScreenUtil().setWidth(2))),
|
|
|
|
1698
|
+ ),
|
|
|
|
1699
|
+ onChanged: (value) {},
|
|
1717
|
),
|
1700
|
),
|
|
1718
|
);
|
1701
|
);
|
|
1719
|
}
|
1702
|
}
|
|
1720
|
|
1703
|
|
|
|
|
1704
|
+ //余额充值确认弹框
|
|
|
|
1705
|
+ static showRechargeConfirmDialog(BuildContext context, String title,
|
|
|
|
1706
|
+ {GestureTapCallback? onTapLeft, GestureTapCallback? onTapRight}) {
|
|
|
|
1707
|
+ return showDialog(
|
|
|
|
1708
|
+ context: context,
|
|
|
|
1709
|
+ barrierDismissible: true,
|
|
|
|
1710
|
+ builder: (BuildContext context) {
|
|
|
|
1711
|
+ return Center(child: StatefulBuilder(builder: (context, state) {
|
|
|
|
1712
|
+ // locationState = state;
|
|
|
|
1713
|
+ return Material(
|
|
|
|
1714
|
+ color: Colors.transparent,
|
|
|
|
1715
|
+ child: Container(
|
|
|
|
1716
|
+ width: double.infinity,
|
|
|
|
1717
|
+ margin: EdgeInsets.symmetric(horizontal: w(37)),
|
|
|
|
1718
|
+ decoration: BoxDecoration(
|
|
|
|
1719
|
+ color: MyColours.color_ffffff,
|
|
|
|
1720
|
+ borderRadius: BorderRadius.circular(
|
|
|
|
1721
|
+ r(8),
|
|
|
|
1722
|
+ )),
|
|
|
|
1723
|
+ child: Column(
|
|
|
|
1724
|
+ mainAxisSize: MainAxisSize.min,
|
|
|
|
1725
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
1726
|
+ children: <Widget>[
|
|
|
|
1727
|
+ Padding(
|
|
|
|
1728
|
+ padding: EdgeInsets.symmetric(horizontal: w(20)),
|
|
|
|
1729
|
+ child: Column(
|
|
|
|
1730
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
1731
|
+ children: [
|
|
|
|
1732
|
+ VEmptyView(40),
|
|
|
|
1733
|
+ Image.asset(
|
|
|
|
1734
|
+ Utils.getImgPath('warn'),
|
|
|
|
1735
|
+ width: w(30),
|
|
|
|
1736
|
+ height: w(30),
|
|
|
|
1737
|
+ ),
|
|
|
|
1738
|
+ VEmptyView(28),
|
|
|
|
1739
|
+ Container(
|
|
|
|
1740
|
+ alignment: Alignment.center,
|
|
|
|
1741
|
+ child: Text('提示',
|
|
|
|
1742
|
+ style: TextStyle(
|
|
|
|
1743
|
+ fontWeight: FontWeight.bold,
|
|
|
|
1744
|
+ color: MyColours.color_515151,
|
|
|
|
1745
|
+ fontSize: font(16)))),
|
|
|
|
1746
|
+ VEmptyView(28),
|
|
|
|
1747
|
+ Container(
|
|
|
|
1748
|
+ alignment: Alignment.center,
|
|
|
|
1749
|
+ child: Text('为客户赵先生 ${title}1000元',
|
|
|
|
1750
|
+ style: TextStyle(
|
|
|
|
1751
|
+ fontWeight: FontWeight.bold,
|
|
|
|
1752
|
+ color: MyColours.color_515151,
|
|
|
|
1753
|
+ fontSize: font(16)))),
|
|
|
|
1754
|
+ VEmptyView(30),
|
|
|
|
1755
|
+ ])),
|
|
|
|
1756
|
+ MyDivider(double.infinity, w(1),
|
|
|
|
1757
|
+ color: MyColours.color_DBDBDB),
|
|
|
|
1758
|
+ Row(
|
|
|
|
1759
|
+ // mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
1760
|
+ children: [
|
|
|
|
1761
|
+ Expanded(
|
|
|
|
1762
|
+ flex: 1,
|
|
|
|
1763
|
+ child: RoundButton(
|
|
|
|
1764
|
+ text: '取消',
|
|
|
|
1765
|
+ // width: (ScreenUtil().screenWidth -
|
|
|
|
1766
|
+ // ScreenUtil().setWidth(62) * 2) /
|
|
|
|
1767
|
+ // 2,
|
|
|
|
1768
|
+ height: ScreenUtil().setWidth(112),
|
|
|
|
1769
|
+ // radius: ScreenUtil().setWidth(10),
|
|
|
|
1770
|
+ gradientStart: Colors.transparent,
|
|
|
|
1771
|
+ gradientEnd: Colors.transparent,
|
|
|
|
1772
|
+ textColor: MyColours.color_515151,
|
|
|
|
1773
|
+ isBold: false,
|
|
|
|
1774
|
+ fontSize: 32,
|
|
|
|
1775
|
+ onPressed: () {
|
|
|
|
1776
|
+ Navigator.pop(context);
|
|
|
|
1777
|
+ })),
|
|
|
|
1778
|
+ MyDivider(ScreenUtil().setWidth(2),
|
|
|
|
1779
|
+ ScreenUtil().setWidth(112),
|
|
|
|
1780
|
+ color: MyColours.color_DBDBDB),
|
|
|
|
1781
|
+ Expanded(
|
|
|
|
1782
|
+ flex: 1,
|
|
|
|
1783
|
+ child: RoundButton(
|
|
|
|
1784
|
+ text: '确定',
|
|
|
|
1785
|
+ // width: (ScreenUtil().screenWidth -
|
|
|
|
1786
|
+ // ScreenUtil().setWidth(62) * 2) /
|
|
|
|
1787
|
+ // 2,
|
|
|
|
1788
|
+ height: ScreenUtil().setWidth(112),
|
|
|
|
1789
|
+ // radius: ScreenUtil().setWidth(10),
|
|
|
|
1790
|
+ gradientStart: Colors.transparent,
|
|
|
|
1791
|
+ gradientEnd: Colors.transparent,
|
|
|
|
1792
|
+ textColor: MyColours.color_438E93,
|
|
|
|
1793
|
+ isBold: true,
|
|
|
|
1794
|
+ fontSize: 32,
|
|
|
|
1795
|
+ onPressed: () {
|
|
|
|
1796
|
+ if (Navigator.canPop(context)) {
|
|
|
|
1797
|
+ Navigator.pop(context);
|
|
|
|
1798
|
+ }
|
|
|
|
1799
|
+ })),
|
|
|
|
1800
|
+ ],
|
|
|
|
1801
|
+ ),
|
|
|
|
1802
|
+ ])));
|
|
|
|
1803
|
+ }));
|
|
|
|
1804
|
+ });
|
|
|
|
1805
|
+ }
|
|
|
|
1806
|
+
|
|
|
|
1807
|
+ //余额退款确认弹框
|
|
|
|
1808
|
+ static showRefundConfirmDialog(BuildContext context, String title,
|
|
|
|
1809
|
+ {GestureTapCallback? onTapLeft, GestureTapCallback? onTapRight}) {
|
|
|
|
1810
|
+ return showDialog(
|
|
|
|
1811
|
+ context: context,
|
|
|
|
1812
|
+ barrierDismissible: true,
|
|
|
|
1813
|
+ builder: (BuildContext context) {
|
|
|
|
1814
|
+ return Center(child: StatefulBuilder(builder: (context, state) {
|
|
|
|
1815
|
+ // locationState = state;
|
|
|
|
1816
|
+ return Material(
|
|
|
|
1817
|
+ color: Colors.transparent,
|
|
|
|
1818
|
+ child: Container(
|
|
|
|
1819
|
+ width: double.infinity,
|
|
|
|
1820
|
+ margin: EdgeInsets.symmetric(horizontal: w(37)),
|
|
|
|
1821
|
+ decoration: BoxDecoration(
|
|
|
|
1822
|
+ color: MyColours.color_ffffff,
|
|
|
|
1823
|
+ borderRadius: BorderRadius.circular(
|
|
|
|
1824
|
+ r(8),
|
|
|
|
1825
|
+ )),
|
|
|
|
1826
|
+ child: Column(
|
|
|
|
1827
|
+ mainAxisSize: MainAxisSize.min,
|
|
|
|
1828
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
1829
|
+ children: <Widget>[
|
|
|
|
1830
|
+ Padding(
|
|
|
|
1831
|
+ padding: EdgeInsets.symmetric(horizontal: w(20)),
|
|
|
|
1832
|
+ child: Column(
|
|
|
|
1833
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
1834
|
+ children: [
|
|
|
|
1835
|
+ VEmptyView(40),
|
|
|
|
1836
|
+ Image.asset(
|
|
|
|
1837
|
+ Utils.getImgPath('warn'),
|
|
|
|
1838
|
+ width: w(30),
|
|
|
|
1839
|
+ height: w(30),
|
|
|
|
1840
|
+ ),
|
|
|
|
1841
|
+ VEmptyView(28),
|
|
|
|
1842
|
+ Container(
|
|
|
|
1843
|
+ alignment: Alignment.center,
|
|
|
|
1844
|
+ child: Text('提示',
|
|
|
|
1845
|
+ style: TextStyle(
|
|
|
|
1846
|
+ fontWeight: FontWeight.bold,
|
|
|
|
1847
|
+ color: MyColours.color_515151,
|
|
|
|
1848
|
+ fontSize: font(16)))),
|
|
|
|
1849
|
+ VEmptyView(28),
|
|
|
|
1850
|
+ Container(
|
|
|
|
1851
|
+ alignment: Alignment.center,
|
|
|
|
1852
|
+ child: Text('为客户赵先生办理余额退款,退款后余额将清零',
|
|
|
|
1853
|
+ style: TextStyle(
|
|
|
|
1854
|
+ color: MyColours.color_515151,
|
|
|
|
1855
|
+ fontSize: font(12)))),
|
|
|
|
1856
|
+ VEmptyView(12),
|
|
|
|
1857
|
+ Container(
|
|
|
|
1858
|
+ alignment: Alignment.center,
|
|
|
|
1859
|
+ child: Text('退款金额900元',
|
|
|
|
1860
|
+ style: TextStyle(
|
|
|
|
1861
|
+ color: MyColours.color_515151,
|
|
|
|
1862
|
+ fontWeight: FontWeight.bold,
|
|
|
|
1863
|
+ fontSize: font(16)))),
|
|
|
|
1864
|
+ VEmptyView(12),
|
|
|
|
1865
|
+ Container(
|
|
|
|
1866
|
+ alignment: Alignment.center,
|
|
|
|
1867
|
+ child: Text('(钱款交易请在线下完成)',
|
|
|
|
1868
|
+ style: TextStyle(
|
|
|
|
1869
|
+ color: MyColours.color_515151,
|
|
|
|
1870
|
+ fontSize: font(12)))),
|
|
|
|
1871
|
+ VEmptyView(30),
|
|
|
|
1872
|
+ ])),
|
|
|
|
1873
|
+ MyDivider(double.infinity, w(1),
|
|
|
|
1874
|
+ color: MyColours.color_DBDBDB),
|
|
|
|
1875
|
+ Row(
|
|
|
|
1876
|
+ // mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
1877
|
+ children: [
|
|
|
|
1878
|
+ Expanded(
|
|
|
|
1879
|
+ flex: 1,
|
|
|
|
1880
|
+ child: RoundButton(
|
|
|
|
1881
|
+ text: '取消',
|
|
|
|
1882
|
+ // width: (ScreenUtil().screenWidth -
|
|
|
|
1883
|
+ // ScreenUtil().setWidth(62) * 2) /
|
|
|
|
1884
|
+ // 2,
|
|
|
|
1885
|
+ height: ScreenUtil().setWidth(112),
|
|
|
|
1886
|
+ // radius: ScreenUtil().setWidth(10),
|
|
|
|
1887
|
+ gradientStart: Colors.transparent,
|
|
|
|
1888
|
+ gradientEnd: Colors.transparent,
|
|
|
|
1889
|
+ textColor: MyColours.color_515151,
|
|
|
|
1890
|
+ isBold: false,
|
|
|
|
1891
|
+ fontSize: 32,
|
|
|
|
1892
|
+ onPressed: () {
|
|
|
|
1893
|
+ Navigator.pop(context);
|
|
|
|
1894
|
+ })),
|
|
|
|
1895
|
+ MyDivider(ScreenUtil().setWidth(2),
|
|
|
|
1896
|
+ ScreenUtil().setWidth(112),
|
|
|
|
1897
|
+ color: MyColours.color_DBDBDB),
|
|
|
|
1898
|
+ Expanded(
|
|
|
|
1899
|
+ flex: 1,
|
|
|
|
1900
|
+ child: RoundButton(
|
|
|
|
1901
|
+ text: '确定',
|
|
|
|
1902
|
+ // width: (ScreenUtil().screenWidth -
|
|
|
|
1903
|
+ // ScreenUtil().setWidth(62) * 2) /
|
|
|
|
1904
|
+ // 2,
|
|
|
|
1905
|
+ height: ScreenUtil().setWidth(112),
|
|
|
|
1906
|
+ // radius: ScreenUtil().setWidth(10),
|
|
|
|
1907
|
+ gradientStart: Colors.transparent,
|
|
|
|
1908
|
+ gradientEnd: Colors.transparent,
|
|
|
|
1909
|
+ textColor: MyColours.color_438E93,
|
|
|
|
1910
|
+ isBold: true,
|
|
|
|
1911
|
+ fontSize: 32,
|
|
|
|
1912
|
+ onPressed: () {
|
|
|
|
1913
|
+ if (Navigator.canPop(context)) {
|
|
|
|
1914
|
+ Navigator.pop(context);
|
|
|
|
1915
|
+ }
|
|
|
|
1916
|
+ })),
|
|
|
|
1917
|
+ ],
|
|
|
|
1918
|
+ ),
|
|
|
|
1919
|
+ ])));
|
|
|
|
1920
|
+ }));
|
|
|
|
1921
|
+ });
|
|
|
|
1922
|
+ }
|
|
|
|
1923
|
+
|
|
1721
|
//余额充值弹框
|
1924
|
//余额充值弹框
|
|
1722
|
static showRechargeDialog(
|
1925
|
static showRechargeDialog(
|
|
1723
|
BuildContext context, String title, CustomCallBack callback,
|
1926
|
BuildContext context, String title, CustomCallBack callback,
|
|
@@ -1813,37 +2016,342 @@ class DialogUtil { |
|
@@ -1813,37 +2016,342 @@ class DialogUtil { |
|
1813
|
rechargeItem(context, '赠送积分', '分'),
|
2016
|
rechargeItem(context, '赠送积分', '分'),
|
|
1814
|
rechargeWidget('备注', '请输入备注',
|
2017
|
rechargeWidget('备注', '请输入备注',
|
|
1815
|
TextEditingController(), FocusNode()),
|
2018
|
TextEditingController(), FocusNode()),
|
|
1816
|
- MyDivider(double.infinity, w(1),
|
|
|
|
1817
|
- color: MyColours.color_DBDBDB),
|
|
|
|
1818
|
- Row(
|
|
|
|
1819
|
- // mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
1820
|
- children: [
|
|
|
|
1821
|
- Expanded(
|
|
|
|
1822
|
- flex: 1,
|
|
|
|
1823
|
- child: RoundButton(
|
|
|
|
1824
|
- text: '确定',
|
|
|
|
1825
|
- // width: (ScreenUtil().screenWidth -
|
|
|
|
1826
|
- // ScreenUtil().setWidth(62) * 2) /
|
|
|
|
1827
|
- // 2,
|
|
|
|
1828
|
- height:
|
|
|
|
1829
|
- ScreenUtil().setWidth(112),
|
|
|
|
1830
|
- // radius: ScreenUtil().setWidth(10),
|
|
|
|
1831
|
- gradientStart:
|
|
|
|
1832
|
- Colors.transparent,
|
|
|
|
1833
|
- gradientEnd: Colors.transparent,
|
|
|
|
1834
|
- textColor:
|
|
|
|
1835
|
- MyColours.color_515151,
|
|
|
|
1836
|
- isBold: false,
|
|
|
|
1837
|
- fontSize: 32,
|
|
|
|
1838
|
- onPressed: () {
|
|
|
|
1839
|
- if (Navigator.canPop(
|
|
|
|
1840
|
- context)) {
|
|
|
|
1841
|
- Navigator.pop(context);
|
|
|
|
1842
|
- }
|
|
|
|
1843
|
- })),
|
|
|
|
1844
|
- ],
|
|
|
|
1845
|
- ),
|
|
|
|
1846
|
- ]))
|
2019
|
+ ])),
|
|
|
|
2020
|
+ MyDivider(double.infinity, w(1),
|
|
|
|
2021
|
+ color: MyColours.color_DBDBDB),
|
|
|
|
2022
|
+ Row(
|
|
|
|
2023
|
+ // mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
2024
|
+ children: [
|
|
|
|
2025
|
+ Expanded(
|
|
|
|
2026
|
+ flex: 1,
|
|
|
|
2027
|
+ child: RoundButton(
|
|
|
|
2028
|
+ text: '取消',
|
|
|
|
2029
|
+ // width: (ScreenUtil().screenWidth -
|
|
|
|
2030
|
+ // ScreenUtil().setWidth(62) * 2) /
|
|
|
|
2031
|
+ // 2,
|
|
|
|
2032
|
+ height: ScreenUtil().setWidth(112),
|
|
|
|
2033
|
+ // radius: ScreenUtil().setWidth(10),
|
|
|
|
2034
|
+ gradientStart: Colors.transparent,
|
|
|
|
2035
|
+ gradientEnd: Colors.transparent,
|
|
|
|
2036
|
+ textColor: MyColours.color_515151,
|
|
|
|
2037
|
+ isBold: false,
|
|
|
|
2038
|
+ fontSize: 32,
|
|
|
|
2039
|
+ onPressed: () {
|
|
|
|
2040
|
+ Navigator.pop(context);
|
|
|
|
2041
|
+ })),
|
|
|
|
2042
|
+ MyDivider(ScreenUtil().setWidth(2),
|
|
|
|
2043
|
+ ScreenUtil().setWidth(112),
|
|
|
|
2044
|
+ color: MyColours.color_DBDBDB),
|
|
|
|
2045
|
+ Expanded(
|
|
|
|
2046
|
+ flex: 1,
|
|
|
|
2047
|
+ child: RoundButton(
|
|
|
|
2048
|
+ text: '确定',
|
|
|
|
2049
|
+ // width: (ScreenUtil().screenWidth -
|
|
|
|
2050
|
+ // ScreenUtil().setWidth(62) * 2) /
|
|
|
|
2051
|
+ // 2,
|
|
|
|
2052
|
+ height: ScreenUtil().setWidth(112),
|
|
|
|
2053
|
+ // radius: ScreenUtil().setWidth(10),
|
|
|
|
2054
|
+ gradientStart: Colors.transparent,
|
|
|
|
2055
|
+ gradientEnd: Colors.transparent,
|
|
|
|
2056
|
+ textColor: MyColours.color_438E93,
|
|
|
|
2057
|
+ isBold: true,
|
|
|
|
2058
|
+ fontSize: 32,
|
|
|
|
2059
|
+ onPressed: () {
|
|
|
|
2060
|
+ if (Navigator.canPop(context)) {
|
|
|
|
2061
|
+ Navigator.pop(context);
|
|
|
|
2062
|
+ }
|
|
|
|
2063
|
+ showRechargeConfirmDialog(
|
|
|
|
2064
|
+ context, '充值金额');
|
|
|
|
2065
|
+ })),
|
|
|
|
2066
|
+ ],
|
|
|
|
2067
|
+ ),
|
|
|
|
2068
|
+ ])));
|
|
|
|
2069
|
+ }));
|
|
|
|
2070
|
+ });
|
|
|
|
2071
|
+ }
|
|
|
|
2072
|
+
|
|
|
|
2073
|
+ //扣除余额弹框
|
|
|
|
2074
|
+ static showDeductMoneyDialog(BuildContext context, String title,
|
|
|
|
2075
|
+ String subTitle, CustomCallBack callback,
|
|
|
|
2076
|
+ {GestureTapCallback? onTapLeft, GestureTapCallback? onTapRight}) {
|
|
|
|
2077
|
+ return showDialog(
|
|
|
|
2078
|
+ context: context,
|
|
|
|
2079
|
+ barrierDismissible: true,
|
|
|
|
2080
|
+ builder: (BuildContext context) {
|
|
|
|
2081
|
+ return Center(child: StatefulBuilder(builder: (context, state) {
|
|
|
|
2082
|
+ // locationState = state;
|
|
|
|
2083
|
+ return Material(
|
|
|
|
2084
|
+ color: Colors.transparent,
|
|
|
|
2085
|
+ child: Container(
|
|
|
|
2086
|
+ width: double.infinity,
|
|
|
|
2087
|
+ margin: EdgeInsets.symmetric(horizontal: w(37)),
|
|
|
|
2088
|
+ decoration: BoxDecoration(
|
|
|
|
2089
|
+ color: MyColours.color_ffffff,
|
|
|
|
2090
|
+ borderRadius: BorderRadius.circular(
|
|
|
|
2091
|
+ r(8),
|
|
|
|
2092
|
+ )),
|
|
|
|
2093
|
+ child: Column(
|
|
|
|
2094
|
+ mainAxisSize: MainAxisSize.min,
|
|
|
|
2095
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
2096
|
+ children: <Widget>[
|
|
|
|
2097
|
+ Padding(
|
|
|
|
2098
|
+ padding: EdgeInsets.symmetric(horizontal: w(20)),
|
|
|
|
2099
|
+ child: Column(
|
|
|
|
2100
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
2101
|
+ children: [
|
|
|
|
2102
|
+ VEmptyView(40),
|
|
|
|
2103
|
+ Container(
|
|
|
|
2104
|
+ alignment: Alignment.center,
|
|
|
|
2105
|
+ child: Text(title,
|
|
|
|
2106
|
+ style: TextStyle(
|
|
|
|
2107
|
+ fontWeight: FontWeight.bold,
|
|
|
|
2108
|
+ color: MyColours.color_515151,
|
|
|
|
2109
|
+ fontSize: font(16)))),
|
|
|
|
2110
|
+ VEmptyView(30),
|
|
|
|
2111
|
+ rechargeItem(context, subTitle, '元'),
|
|
|
|
2112
|
+ // VEmptyView(30),
|
|
|
|
2113
|
+ rechargeWidget('备注', '请输入备注',
|
|
|
|
2114
|
+ TextEditingController(), FocusNode()),
|
|
|
|
2115
|
+ ])),
|
|
|
|
2116
|
+ MyDivider(double.infinity, w(1),
|
|
|
|
2117
|
+ color: MyColours.color_DBDBDB),
|
|
|
|
2118
|
+ Row(
|
|
|
|
2119
|
+ // mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
2120
|
+ children: [
|
|
|
|
2121
|
+ Expanded(
|
|
|
|
2122
|
+ flex: 1,
|
|
|
|
2123
|
+ child: RoundButton(
|
|
|
|
2124
|
+ text: '取消',
|
|
|
|
2125
|
+ // width: (ScreenUtil().screenWidth -
|
|
|
|
2126
|
+ // ScreenUtil().setWidth(62) * 2) /
|
|
|
|
2127
|
+ // 2,
|
|
|
|
2128
|
+ height: ScreenUtil().setWidth(112),
|
|
|
|
2129
|
+ // radius: ScreenUtil().setWidth(10),
|
|
|
|
2130
|
+ gradientStart: Colors.transparent,
|
|
|
|
2131
|
+ gradientEnd: Colors.transparent,
|
|
|
|
2132
|
+ textColor: MyColours.color_515151,
|
|
|
|
2133
|
+ isBold: false,
|
|
|
|
2134
|
+ fontSize: 32,
|
|
|
|
2135
|
+ onPressed: () {
|
|
|
|
2136
|
+ Navigator.pop(context);
|
|
|
|
2137
|
+ })),
|
|
|
|
2138
|
+ MyDivider(ScreenUtil().setWidth(2),
|
|
|
|
2139
|
+ ScreenUtil().setWidth(112),
|
|
|
|
2140
|
+ color: MyColours.color_DBDBDB),
|
|
|
|
2141
|
+ Expanded(
|
|
|
|
2142
|
+ flex: 1,
|
|
|
|
2143
|
+ child: RoundButton(
|
|
|
|
2144
|
+ text: '确定',
|
|
|
|
2145
|
+ // width: (ScreenUtil().screenWidth -
|
|
|
|
2146
|
+ // ScreenUtil().setWidth(62) * 2) /
|
|
|
|
2147
|
+ // 2,
|
|
|
|
2148
|
+ height: ScreenUtil().setWidth(112),
|
|
|
|
2149
|
+ // radius: ScreenUtil().setWidth(10),
|
|
|
|
2150
|
+ gradientStart: Colors.transparent,
|
|
|
|
2151
|
+ gradientEnd: Colors.transparent,
|
|
|
|
2152
|
+ textColor: MyColours.color_438E93,
|
|
|
|
2153
|
+ isBold: true,
|
|
|
|
2154
|
+ fontSize: 32,
|
|
|
|
2155
|
+ onPressed: () {
|
|
|
|
2156
|
+ if (Navigator.canPop(context)) {
|
|
|
|
2157
|
+ Navigator.pop(context);
|
|
|
|
2158
|
+ }
|
|
|
|
2159
|
+ showRechargeConfirmDialog(
|
|
|
|
2160
|
+ context, '扣除消费金');
|
|
|
|
2161
|
+ })),
|
|
|
|
2162
|
+ ],
|
|
|
|
2163
|
+ ),
|
|
|
|
2164
|
+ ])));
|
|
|
|
2165
|
+ }));
|
|
|
|
2166
|
+ });
|
|
|
|
2167
|
+ }
|
|
|
|
2168
|
+
|
|
|
|
2169
|
+ //发放消费金弹框
|
|
|
|
2170
|
+ static showGiveMoneyDialog(
|
|
|
|
2171
|
+ BuildContext context, String title, CustomCallBack callback,
|
|
|
|
2172
|
+ {GestureTapCallback? onTapLeft, GestureTapCallback? onTapRight}) {
|
|
|
|
2173
|
+ return showDialog(
|
|
|
|
2174
|
+ context: context,
|
|
|
|
2175
|
+ barrierDismissible: true,
|
|
|
|
2176
|
+ builder: (BuildContext context) {
|
|
|
|
2177
|
+ return Center(child: StatefulBuilder(builder: (context, state) {
|
|
|
|
2178
|
+ // locationState = state;
|
|
|
|
2179
|
+ return Material(
|
|
|
|
2180
|
+ color: Colors.transparent,
|
|
|
|
2181
|
+ child: Container(
|
|
|
|
2182
|
+ width: double.infinity,
|
|
|
|
2183
|
+ margin: EdgeInsets.symmetric(horizontal: w(37)),
|
|
|
|
2184
|
+ decoration: BoxDecoration(
|
|
|
|
2185
|
+ color: MyColours.color_ffffff,
|
|
|
|
2186
|
+ borderRadius: BorderRadius.circular(
|
|
|
|
2187
|
+ r(8),
|
|
|
|
2188
|
+ )),
|
|
|
|
2189
|
+ child: Column(
|
|
|
|
2190
|
+ mainAxisSize: MainAxisSize.min,
|
|
|
|
2191
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
2192
|
+ children: <Widget>[
|
|
|
|
2193
|
+ Padding(
|
|
|
|
2194
|
+ padding: EdgeInsets.symmetric(horizontal: w(20)),
|
|
|
|
2195
|
+ child: Column(
|
|
|
|
2196
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
2197
|
+ children: [
|
|
|
|
2198
|
+ VEmptyView(40),
|
|
|
|
2199
|
+ Container(
|
|
|
|
2200
|
+ alignment: Alignment.center,
|
|
|
|
2201
|
+ child: Text('发放消费金',
|
|
|
|
2202
|
+ style: TextStyle(
|
|
|
|
2203
|
+ fontWeight: FontWeight.bold,
|
|
|
|
2204
|
+ color: MyColours.color_515151,
|
|
|
|
2205
|
+ fontSize: font(16)))),
|
|
|
|
2206
|
+ VEmptyView(30),
|
|
|
|
2207
|
+ rechargeItem(context, '发放金额', '元'),
|
|
|
|
2208
|
+ // VEmptyView(30),
|
|
|
|
2209
|
+ rechargeWidget('备注', '请输入备注',
|
|
|
|
2210
|
+ TextEditingController(), FocusNode()),
|
|
|
|
2211
|
+ ])),
|
|
|
|
2212
|
+ MyDivider(double.infinity, w(1),
|
|
|
|
2213
|
+ color: MyColours.color_DBDBDB),
|
|
|
|
2214
|
+ Row(
|
|
|
|
2215
|
+ // mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
2216
|
+ children: [
|
|
|
|
2217
|
+ Expanded(
|
|
|
|
2218
|
+ flex: 1,
|
|
|
|
2219
|
+ child: RoundButton(
|
|
|
|
2220
|
+ text: '取消',
|
|
|
|
2221
|
+ // width: (ScreenUtil().screenWidth -
|
|
|
|
2222
|
+ // ScreenUtil().setWidth(62) * 2) /
|
|
|
|
2223
|
+ // 2,
|
|
|
|
2224
|
+ height: ScreenUtil().setWidth(112),
|
|
|
|
2225
|
+ // radius: ScreenUtil().setWidth(10),
|
|
|
|
2226
|
+ gradientStart: Colors.transparent,
|
|
|
|
2227
|
+ gradientEnd: Colors.transparent,
|
|
|
|
2228
|
+ textColor: MyColours.color_515151,
|
|
|
|
2229
|
+ isBold: false,
|
|
|
|
2230
|
+ fontSize: 32,
|
|
|
|
2231
|
+ onPressed: () {
|
|
|
|
2232
|
+ Navigator.pop(context);
|
|
|
|
2233
|
+ })),
|
|
|
|
2234
|
+ MyDivider(ScreenUtil().setWidth(2),
|
|
|
|
2235
|
+ ScreenUtil().setWidth(112),
|
|
|
|
2236
|
+ color: MyColours.color_DBDBDB),
|
|
|
|
2237
|
+ Expanded(
|
|
|
|
2238
|
+ flex: 1,
|
|
|
|
2239
|
+ child: RoundButton(
|
|
|
|
2240
|
+ text: '确定',
|
|
|
|
2241
|
+ // width: (ScreenUtil().screenWidth -
|
|
|
|
2242
|
+ // ScreenUtil().setWidth(62) * 2) /
|
|
|
|
2243
|
+ // 2,
|
|
|
|
2244
|
+ height: ScreenUtil().setWidth(112),
|
|
|
|
2245
|
+ // radius: ScreenUtil().setWidth(10),
|
|
|
|
2246
|
+ gradientStart: Colors.transparent,
|
|
|
|
2247
|
+ gradientEnd: Colors.transparent,
|
|
|
|
2248
|
+ textColor: MyColours.color_438E93,
|
|
|
|
2249
|
+ isBold: true,
|
|
|
|
2250
|
+ fontSize: 32,
|
|
|
|
2251
|
+ onPressed: () {
|
|
|
|
2252
|
+ if (Navigator.canPop(context)) {
|
|
|
|
2253
|
+ Navigator.pop(context);
|
|
|
|
2254
|
+ }
|
|
|
|
2255
|
+ showRechargeConfirmDialog(
|
|
|
|
2256
|
+ context, '发放消费金');
|
|
|
|
2257
|
+ })),
|
|
|
|
2258
|
+ ],
|
|
|
|
2259
|
+ ),
|
|
|
|
2260
|
+ ])));
|
|
|
|
2261
|
+ }));
|
|
|
|
2262
|
+ });
|
|
|
|
2263
|
+ }
|
|
|
|
2264
|
+
|
|
|
|
2265
|
+ //退款余额弹框
|
|
|
|
2266
|
+ static showRefundDialog(
|
|
|
|
2267
|
+ BuildContext context, String title, CustomCallBack callback,
|
|
|
|
2268
|
+ {GestureTapCallback? onTapLeft, GestureTapCallback? onTapRight}) {
|
|
|
|
2269
|
+ return showDialog(
|
|
|
|
2270
|
+ context: context,
|
|
|
|
2271
|
+ barrierDismissible: true,
|
|
|
|
2272
|
+ builder: (BuildContext context) {
|
|
|
|
2273
|
+ return Center(child: StatefulBuilder(builder: (context, state) {
|
|
|
|
2274
|
+ // locationState = state;
|
|
|
|
2275
|
+ return Material(
|
|
|
|
2276
|
+ color: Colors.transparent,
|
|
|
|
2277
|
+ child: Container(
|
|
|
|
2278
|
+ width: double.infinity,
|
|
|
|
2279
|
+ margin: EdgeInsets.symmetric(horizontal: w(37)),
|
|
|
|
2280
|
+ decoration: BoxDecoration(
|
|
|
|
2281
|
+ color: MyColours.color_ffffff,
|
|
|
|
2282
|
+ borderRadius: BorderRadius.circular(
|
|
|
|
2283
|
+ r(8),
|
|
|
|
2284
|
+ )),
|
|
|
|
2285
|
+ child: Column(
|
|
|
|
2286
|
+ mainAxisSize: MainAxisSize.min,
|
|
|
|
2287
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
2288
|
+ children: <Widget>[
|
|
|
|
2289
|
+ Padding(
|
|
|
|
2290
|
+ padding: EdgeInsets.symmetric(horizontal: w(20)),
|
|
|
|
2291
|
+ child: Column(
|
|
|
|
2292
|
+ crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
2293
|
+ children: [
|
|
|
|
2294
|
+ VEmptyView(40),
|
|
|
|
2295
|
+ Container(
|
|
|
|
2296
|
+ alignment: Alignment.center,
|
|
|
|
2297
|
+ child: Text('余额退款',
|
|
|
|
2298
|
+ style: TextStyle(
|
|
|
|
2299
|
+ fontWeight: FontWeight.bold,
|
|
|
|
2300
|
+ color: MyColours.color_515151,
|
|
|
|
2301
|
+ fontSize: font(16)))),
|
|
|
|
2302
|
+ VEmptyView(30),
|
|
|
|
2303
|
+ rechargeItem(context, '顾客余额', '元'),
|
|
|
|
2304
|
+ VEmptyView(30),
|
|
|
|
2305
|
+ rechargeItem(context, '退款金额', '元'),
|
|
|
|
2306
|
+ VEmptyView(30),
|
|
|
|
2307
|
+ ])),
|
|
|
|
2308
|
+ MyDivider(double.infinity, w(1),
|
|
|
|
2309
|
+ color: MyColours.color_DBDBDB),
|
|
|
|
2310
|
+ Row(
|
|
|
|
2311
|
+ // mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
2312
|
+ children: [
|
|
|
|
2313
|
+ Expanded(
|
|
|
|
2314
|
+ flex: 1,
|
|
|
|
2315
|
+ child: RoundButton(
|
|
|
|
2316
|
+ text: '取消',
|
|
|
|
2317
|
+ // width: (ScreenUtil().screenWidth -
|
|
|
|
2318
|
+ // ScreenUtil().setWidth(62) * 2) /
|
|
|
|
2319
|
+ // 2,
|
|
|
|
2320
|
+ height: ScreenUtil().setWidth(112),
|
|
|
|
2321
|
+ // radius: ScreenUtil().setWidth(10),
|
|
|
|
2322
|
+ gradientStart: Colors.transparent,
|
|
|
|
2323
|
+ gradientEnd: Colors.transparent,
|
|
|
|
2324
|
+ textColor: MyColours.color_515151,
|
|
|
|
2325
|
+ isBold: false,
|
|
|
|
2326
|
+ fontSize: 32,
|
|
|
|
2327
|
+ onPressed: () {
|
|
|
|
2328
|
+ Navigator.pop(context);
|
|
|
|
2329
|
+ })),
|
|
|
|
2330
|
+ MyDivider(ScreenUtil().setWidth(2),
|
|
|
|
2331
|
+ ScreenUtil().setWidth(112),
|
|
|
|
2332
|
+ color: MyColours.color_DBDBDB),
|
|
|
|
2333
|
+ Expanded(
|
|
|
|
2334
|
+ flex: 1,
|
|
|
|
2335
|
+ child: RoundButton(
|
|
|
|
2336
|
+ text: '确定',
|
|
|
|
2337
|
+ // width: (ScreenUtil().screenWidth -
|
|
|
|
2338
|
+ // ScreenUtil().setWidth(62) * 2) /
|
|
|
|
2339
|
+ // 2,
|
|
|
|
2340
|
+ height: ScreenUtil().setWidth(112),
|
|
|
|
2341
|
+ // radius: ScreenUtil().setWidth(10),
|
|
|
|
2342
|
+ gradientStart: Colors.transparent,
|
|
|
|
2343
|
+ gradientEnd: Colors.transparent,
|
|
|
|
2344
|
+ textColor: MyColours.color_438E93,
|
|
|
|
2345
|
+ isBold: true,
|
|
|
|
2346
|
+ fontSize: 32,
|
|
|
|
2347
|
+ onPressed: () {
|
|
|
|
2348
|
+ if (Navigator.canPop(context)) {
|
|
|
|
2349
|
+ Navigator.pop(context);
|
|
|
|
2350
|
+ }
|
|
|
|
2351
|
+ showRefundConfirmDialog(context, '退款');
|
|
|
|
2352
|
+ })),
|
|
|
|
2353
|
+ ],
|
|
|
|
2354
|
+ ),
|
|
1847
|
])));
|
2355
|
])));
|
|
1848
|
}));
|
2356
|
}));
|
|
1849
|
});
|
2357
|
});
|