Commit 263d6e0f56a4f4071d45fcecbd7578c9d201d296

Authored by weixin_45529955
1 parent 9addc90f

客情优质客户标记 (客情设置)

@@ -20,19 +20,19 @@ if (flutterRoot == null) { @@ -20,19 +20,19 @@ if (flutterRoot == null) {
20 20
21 21
22 22
23 -def flutterVersionCode = "561" 23 +def flutterVersionCode = "562"
24 if (flutterVersionCode == null) { 24 if (flutterVersionCode == null) {
25 - flutterVersionCode = '561' 25 + flutterVersionCode = '562'
26 26
27 27
28 28
29 } 29 }
30 30
31 31
32 -def flutterVersionName = "5.6.1" 32 +def flutterVersionName = "5.6.2"
33 33
34 if (flutterVersionName == null) { 34 if (flutterVersionName == null) {
35 - flutterVersionName = '5.6.1' 35 + flutterVersionName = '5.6.2'
36 36
37 } 37 }
38 38
1 -  
2 class SellerGuestModel { 1 class SellerGuestModel {
3 final int? ret; 2 final int? ret;
4 final SellerGuestSunModel? data; 3 final SellerGuestSunModel? data;
5 final String? msg; 4 final String? msg;
6 const SellerGuestModel({this.ret, this.data, this.msg}); 5 const SellerGuestModel({this.ret, this.data, this.msg});
7 - SellerGuestModel copyWith({int? ret, SellerGuestSunModel? data, String? msg}) { 6 + SellerGuestModel copyWith(
  7 + {int? ret, SellerGuestSunModel? data, String? msg}) {
8 return SellerGuestModel( 8 return SellerGuestModel(
9 ret: ret ?? this.ret, data: data ?? this.data, msg: msg ?? this.msg); 9 ret: ret ?? this.ret, data: data ?? this.data, msg: msg ?? this.msg);
10 } 10 }
@@ -57,28 +57,47 @@ class SellerGuestSunModel { @@ -57,28 +57,47 @@ class SellerGuestSunModel {
57 final dynamic birthdayNoticeDay; 57 final dynamic birthdayNoticeDay;
58 final dynamic commemorationDay; 58 final dynamic commemorationDay;
59 final dynamic commemorationNotice; 59 final dynamic commemorationNotice;
60 - const SellerGuestSunModel(  
61 - {this.id,  
62 - this.sellerid,  
63 - this.isAdditional,  
64 - this.isEnterSelf,  
65 - this.birthdayAdvNotice,  
66 - this.birthdayAdvNoticeSms,  
67 - this.birthdayNotice,  
68 - this.birthdayNoticeDay,  
69 - this.commemorationDay,  
70 - this.commemorationNotice});  
71 - SellerGuestSunModel copyWith(  
72 - {String? id,  
73 - String? sellerid,  
74 - String? isAdditional,  
75 - String? isEnterSelf,  
76 - dynamic birthdayAdvNotice,  
77 - dynamic birthdayAdvNoticeSms,  
78 - dynamic birthdayNotice,  
79 - dynamic birthdayNoticeDay,  
80 - dynamic commemorationDay,  
81 - dynamic commemorationNotice}) { 60 +
  61 + final String? isHighFrequency;
  62 + final String? highFrequencyDay;
  63 + final String? highFrequencyReserve;
  64 + final String? isHighConsumption;
  65 + final String? isHighMoney;
  66 +
  67 + const SellerGuestSunModel({
  68 + this.id,
  69 + this.sellerid,
  70 + this.isAdditional,
  71 + this.isEnterSelf,
  72 + this.birthdayAdvNotice,
  73 + this.birthdayAdvNoticeSms,
  74 + this.birthdayNotice,
  75 + this.birthdayNoticeDay,
  76 + this.commemorationDay,
  77 + this.commemorationNotice,
  78 + this.isHighFrequency,
  79 + this.highFrequencyDay,
  80 + this.highFrequencyReserve,
  81 + this.isHighConsumption,
  82 + this.isHighMoney,
  83 + });
  84 + SellerGuestSunModel copyWith({
  85 + String? id,
  86 + String? sellerid,
  87 + String? isAdditional,
  88 + String? isEnterSelf,
  89 + dynamic birthdayAdvNotice,
  90 + dynamic birthdayAdvNoticeSms,
  91 + dynamic birthdayNotice,
  92 + dynamic birthdayNoticeDay,
  93 + dynamic commemorationDay,
  94 + dynamic commemorationNotice,
  95 + String? isHighFrequency,
  96 + String? highFrequencyDay,
  97 + String? highFrequencyReserve,
  98 + String? isHighConsumption,
  99 + String? isHighMoney,
  100 + }) {
82 return SellerGuestSunModel( 101 return SellerGuestSunModel(
83 id: id ?? this.id, 102 id: id ?? this.id,
84 sellerid: sellerid ?? this.sellerid, 103 sellerid: sellerid ?? this.sellerid,
@@ -89,10 +108,15 @@ class SellerGuestSunModel { @@ -89,10 +108,15 @@ class SellerGuestSunModel {
89 birthdayNotice: birthdayNotice ?? this.birthdayNotice, 108 birthdayNotice: birthdayNotice ?? this.birthdayNotice,
90 birthdayNoticeDay: birthdayNoticeDay ?? this.birthdayNoticeDay, 109 birthdayNoticeDay: birthdayNoticeDay ?? this.birthdayNoticeDay,
91 commemorationDay: commemorationDay ?? this.commemorationDay, 110 commemorationDay: commemorationDay ?? this.commemorationDay,
92 - commemorationNotice: commemorationNotice ?? this.commemorationNotice); 111 + commemorationNotice: commemorationNotice ?? this.commemorationNotice,
  112 + isHighFrequency: isHighFrequency ?? this.isHighFrequency,
  113 + highFrequencyDay: highFrequencyDay ?? this.highFrequencyDay,
  114 + highFrequencyReserve: highFrequencyReserve ?? this.highFrequencyReserve,
  115 + isHighConsumption: isHighConsumption ?? this.isHighConsumption,
  116 + isHighMoney: isHighMoney ?? this.isHighMoney);
93 } 117 }
94 118
95 - Map<String, dynamic?> toJson() { 119 + Map<String, dynamic> toJson() {
96 return { 120 return {
97 'id': id, 121 'id': id,
98 'sellerid': sellerid, 122 'sellerid': sellerid,
@@ -103,26 +127,47 @@ class SellerGuestSunModel { @@ -103,26 +127,47 @@ class SellerGuestSunModel {
103 'birthday_notice': birthdayNotice, 127 'birthday_notice': birthdayNotice,
104 'birthday_notice_day': birthdayNoticeDay, 128 'birthday_notice_day': birthdayNoticeDay,
105 'commemoration_day': commemorationDay, 129 'commemoration_day': commemorationDay,
106 - 'commemoration_notice': commemorationNotice 130 + 'commemoration_notice': commemorationNotice,
  131 + "is_high_frequency": isHighFrequency,
  132 + "high_frequency_day": highFrequencyDay,
  133 + "high_frequency_reserve": highFrequencyReserve,
  134 + "is_high_consumption": isHighConsumption,
  135 + "is_high_money": isHighMoney
107 }; 136 };
108 } 137 }
109 138
110 static SellerGuestSunModel fromJson(Map<dynamic, dynamic> json) { 139 static SellerGuestSunModel fromJson(Map<dynamic, dynamic> json) {
111 return SellerGuestSunModel( 140 return SellerGuestSunModel(
112 - id: json['id'] == null ? null : json['id'] as String?,  
113 - sellerid: json['sellerid'] == null ? null : json['sellerid'] as String?,  
114 - isAdditional: json['is_additional'] == null  
115 - ? null  
116 - : json['is_additional'] as String?,  
117 - isEnterSelf: json['is_enter_self'] == null  
118 - ? null  
119 - : json['is_enter_self'] as String?,  
120 - birthdayAdvNotice: json['birthday_adv_notice'] as dynamic,  
121 - birthdayAdvNoticeSms: json['birthday_adv_notice_sms'] as dynamic,  
122 - birthdayNotice: json['birthday_notice'] as dynamic,  
123 - birthdayNoticeDay: json['birthday_notice_day'] as dynamic,  
124 - commemorationDay: json['commemoration_day'] as dynamic,  
125 - commemorationNotice: json['commemoration_notice'] as dynamic); 141 + id: json['id'] == null ? null : json['id'] as String?,
  142 + sellerid: json['sellerid'] == null ? null : json['sellerid'] as String?,
  143 + isAdditional: json['is_additional'] == null
  144 + ? null
  145 + : json['is_additional'] as String?,
  146 + isEnterSelf: json['is_enter_self'] == null
  147 + ? null
  148 + : json['is_enter_self'] as String?,
  149 + birthdayAdvNotice: json['birthday_adv_notice'] as dynamic,
  150 + birthdayAdvNoticeSms: json['birthday_adv_notice_sms'] as dynamic,
  151 + birthdayNotice: json['birthday_notice'] as dynamic,
  152 + birthdayNoticeDay: json['birthday_notice_day'] as dynamic,
  153 + commemorationDay: json['commemoration_day'] as dynamic,
  154 + commemorationNotice: json['commemoration_notice'] as dynamic,
  155 + isHighFrequency: json['is_high_frequency'] == null
  156 + ? null
  157 + : json['is_high_frequency'] as String?,
  158 + highFrequencyDay: json['high_frequency_day'] == null
  159 + ? null
  160 + : json['high_frequency_day'] as String?,
  161 + highFrequencyReserve: json['high_frequency_reserve'] == null
  162 + ? null
  163 + : json['high_frequency_reserve'] as String?,
  164 + isHighConsumption: json['is_high_consumption'] == null
  165 + ? null
  166 + : json['is_high_consumption'] as String?,
  167 + isHighMoney: json['is_high_money'] == null
  168 + ? null
  169 + : json['is_high_money'] as String?,
  170 + );
126 } 171 }
127 172
128 @override 173 @override
@@ -154,7 +154,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage> @@ -154,7 +154,7 @@ class NotebookDetailPageState extends State<NotebookDetailPage>
154 bool isback = false; 154 bool isback = false;
155 155
156 List<dynamic> couponTypes = ['仅预订人', '所有人', '被请客人', '不赠送']; //赠券对象 156 List<dynamic> couponTypes = ['仅预订人', '所有人', '被请客人', '不赠送']; //赠券对象
157 - String couponType = '所有人'; 157 + String couponType = '';
158 158
159 @override 159 @override
160 void initState() { 160 void initState() {
@@ -38,6 +38,10 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { @@ -38,6 +38,10 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> {
38 late MarketingCenterProvider marketingCenterProvider; 38 late MarketingCenterProvider marketingCenterProvider;
39 TextEditingController controllerDay = TextEditingController(); 39 TextEditingController controllerDay = TextEditingController();
40 40
  41 + TextEditingController controllerDeadline = TextEditingController();
  42 + TextEditingController controllerConsumptionTimes = TextEditingController();
  43 + TextEditingController controllerHighValue = TextEditingController();
  44 +
41 @override 45 @override
42 void initState() { 46 void initState() {
43 WidgetsBinding.instance.addPostFrameCallback((_) async { 47 WidgetsBinding.instance.addPostFrameCallback((_) async {
@@ -101,7 +105,12 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { @@ -101,7 +105,12 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> {
101 Map<String, String?> params = { 105 Map<String, String?> params = {
102 "sellerid": Provider.of<UserModel>(context, listen: false).user!.sellerid, 106 "sellerid": Provider.of<UserModel>(context, listen: false).user!.sellerid,
103 'is_additional': customerProvider.isrepair ? "1" : "0", 107 'is_additional': customerProvider.isrepair ? "1" : "0",
104 - 'is_enter_self': customerProvider.isselfphone ? '1' : '0' 108 + 'is_enter_self': customerProvider.isselfphone ? '1' : '0',
  109 + 'is_high_frequency': customerProvider.isHighFrequency ? '1' : '0',
  110 + 'high_frequency_day': controllerDeadline.text,
  111 + 'high_frequency_reserve': controllerConsumptionTimes.text,
  112 + 'is_high_consumption': customerProvider.isHighConsumption ? '1' : '0',
  113 + 'is_high_money': controllerHighValue.text
105 }; 114 };
106 bool success = await customerProvider.setSellerGuest(context, params, 115 bool success = await customerProvider.setSellerGuest(context, params,
107 showLoading: true); 116 showLoading: true);
@@ -153,6 +162,14 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { @@ -153,6 +162,14 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> {
153 ///获取客情配置 162 ///获取客情配置
154 _sellerGuestGet() async { 163 _sellerGuestGet() async {
155 bool success = await customerProvider.getSellerGuest(context); 164 bool success = await customerProvider.getSellerGuest(context);
  165 + if (success) {
  166 + controllerDeadline.text =
  167 + customerProvider.sellerGuestData?.highFrequencyDay ?? '';
  168 + controllerConsumptionTimes.text =
  169 + customerProvider.sellerGuestData?.highFrequencyReserve ?? '';
  170 + controllerHighValue.text =
  171 + customerProvider.sellerGuestData?.isHighMoney ?? '';
  172 + }
156 173
157 // if (success) { 174 // if (success) {
158 // customerProvider.isrepair = true; 175 // customerProvider.isrepair = true;
@@ -829,6 +846,311 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { @@ -829,6 +846,311 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> {
829 color: MyColours.color_E7E7E7, 846 color: MyColours.color_E7E7E7,
830 )), 847 )),
831 VEmptyView(48), 848 VEmptyView(48),
  849 + Container(
  850 + padding: EdgeInsets.symmetric(vertical: w(8)),
  851 + child: Text('优质客户标记',
  852 + style: TextStyle(
  853 + color: MyColours.color_515151,
  854 + fontSize: ScreenUtil().setSp(32)))),
  855 + VEmptyView(22),
  856 + MyDivider(
  857 + double.infinity,
  858 + w(1),
  859 + color: MyColours.color_E7E7E7,
  860 + ),
  861 + VEmptyView(24),
  862 + InkWell(
  863 + onTap: () {
  864 + setState(() {
  865 + customerProvider.isHighFrequency =
  866 + !customerProvider.isHighFrequency;
  867 + });
  868 + },
  869 + child: Container(
  870 + padding: EdgeInsets.symmetric(
  871 + vertical: w(8), horizontal: w(14)),
  872 + child: Row(
  873 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  874 + crossAxisAlignment: CrossAxisAlignment.center,
  875 + children: [
  876 + Text('高频客户标记',
  877 + style: TextStyle(
  878 + color: MyColours.color_515151,
  879 + fontSize: ScreenUtil().setSp(28))),
  880 + Image.asset(
  881 + customerProvider.isHighFrequency
  882 + ? Utils.getImgPath('swich_on')
  883 + : Utils.getImgPath('swich_off'),
  884 + width: ScreenUtil().setWidth(88),
  885 + // height: ScreenUtil().setWidth(82),
  886 + ),
  887 + ],
  888 + ),
  889 + )),
  890 + Padding(
  891 + padding: EdgeInsets.only(left: w(14), right: w(10)),
  892 + child: MyDivider(
  893 + double.infinity,
  894 + w(1),
  895 + color: MyColours.color_E7E7E7,
  896 + )),
  897 + VEmptyView(24),
  898 + Container(
  899 + padding:
  900 + EdgeInsets.symmetric(vertical: w(8), horizontal: w(14)),
  901 + child: Row(
  902 + children: [
  903 + Expanded(
  904 + child: Container(
  905 + padding: EdgeInsets.symmetric(vertical: w(8)),
  906 + child: Text('指定期限',
  907 + overflow: TextOverflow.ellipsis,
  908 + maxLines: 10,
  909 + style: TextStyle(
  910 + color: MyColours.color_515151,
  911 + fontSize: ScreenUtil().setSp(28))))),
  912 + HEmptyView(2),
  913 + Container(
  914 + width: w(40),
  915 + child: TextField(
  916 + controller: controllerDeadline,
  917 + textAlign: TextAlign.right,
  918 + textAlignVertical: TextAlignVertical.bottom,
  919 + maxLines: 1,
  920 + // //光标颜色
  921 + // cursorColor:
  922 + // widget.isSelect ? Colors.white : MyColours.color_199095,
  923 + //输入文本的样式
  924 + style: TextStyle(
  925 + color: MyColours.color_515151,
  926 + fontSize: ScreenUtil().setSp(28),
  927 + ),
  928 + inputFormatters: <TextInputFormatter>[
  929 + FilteringTextInputFormatter.allow(
  930 + RegExp(r'[0-9]')), //设置只允许输入数字
  931 + ],
  932 + decoration: InputDecoration(
  933 + isCollapsed: true,
  934 + border: OutlineInputBorder(
  935 + borderSide: BorderSide.none),
  936 + hintText: '输入',
  937 + hintStyle: TextStyle(
  938 + color: MyColours.color_999999,
  939 + fontSize: ScreenUtil().setSp(28),
  940 + ),
  941 + enabledBorder: new UnderlineInputBorder(
  942 + borderSide: BorderSide.none,
  943 + ),
  944 + focusedBorder: new UnderlineInputBorder(
  945 + borderSide: BorderSide.none,
  946 + ),
  947 + ),
  948 + onChanged: (value) {},
  949 + onEditingComplete: () {
  950 + FocusScope.of(context)
  951 + .requestFocus(FocusNode()); //点击空白处隐藏键盘
  952 + },
  953 + keyboardType: TextInputType.number),
  954 + ),
  955 + HEmptyView(5),
  956 + Text('天',
  957 + style: TextStyle(
  958 + color: MyColours.color_999999,
  959 + fontSize: ScreenUtil().setSp(28))),
  960 + // HEmptyView(24),
  961 + ],
  962 + )),
  963 + Padding(
  964 + padding: EdgeInsets.only(left: w(14), right: w(10)),
  965 + child: MyDivider(
  966 + double.infinity,
  967 + w(1),
  968 + color: MyColours.color_E7E7E7,
  969 + )),
  970 + VEmptyView(24),
  971 + Container(
  972 + padding:
  973 + EdgeInsets.symmetric(vertical: w(8), horizontal: w(14)),
  974 + child: Row(
  975 + children: [
  976 + Expanded(
  977 + child: Container(
  978 + padding: EdgeInsets.symmetric(vertical: w(8)),
  979 + child: Text('消费次数',
  980 + overflow: TextOverflow.ellipsis,
  981 + maxLines: 10,
  982 + style: TextStyle(
  983 + color: MyColours.color_515151,
  984 + fontSize: ScreenUtil().setSp(28))))),
  985 + HEmptyView(2),
  986 + Container(
  987 + width: w(40),
  988 + child: TextField(
  989 + controller: controllerConsumptionTimes,
  990 + textAlign: TextAlign.right,
  991 + textAlignVertical: TextAlignVertical.bottom,
  992 + maxLines: 1,
  993 + // //光标颜色
  994 + // cursorColor:
  995 + // widget.isSelect ? Colors.white : MyColours.color_199095,
  996 + //输入文本的样式
  997 + style: TextStyle(
  998 + color: MyColours.color_515151,
  999 + fontSize: ScreenUtil().setSp(28),
  1000 + ),
  1001 + inputFormatters: <TextInputFormatter>[
  1002 + FilteringTextInputFormatter.allow(
  1003 + RegExp(r'[0-9]')), //设置只允许输入数字
  1004 + ],
  1005 + decoration: InputDecoration(
  1006 + isCollapsed: true,
  1007 + border: OutlineInputBorder(
  1008 + borderSide: BorderSide.none),
  1009 + hintText: '输入',
  1010 + hintStyle: TextStyle(
  1011 + color: MyColours.color_999999,
  1012 + fontSize: ScreenUtil().setSp(28),
  1013 + ),
  1014 + enabledBorder: new UnderlineInputBorder(
  1015 + borderSide: BorderSide.none,
  1016 + ),
  1017 + focusedBorder: new UnderlineInputBorder(
  1018 + borderSide: BorderSide.none,
  1019 + ),
  1020 + ),
  1021 + onChanged: (value) {},
  1022 + onEditingComplete: () {
  1023 + FocusScope.of(context)
  1024 + .requestFocus(FocusNode()); //点击空白处隐藏键盘
  1025 + },
  1026 + keyboardType: TextInputType.number),
  1027 + ),
  1028 + HEmptyView(5),
  1029 + Text('次',
  1030 + style: TextStyle(
  1031 + color: MyColours.color_999999,
  1032 + fontSize: ScreenUtil().setSp(28))),
  1033 + // HEmptyView(24),
  1034 + ],
  1035 + )),
  1036 + Padding(
  1037 + padding: EdgeInsets.only(left: w(14), right: w(10)),
  1038 + child: MyDivider(
  1039 + double.infinity,
  1040 + w(1),
  1041 + color: MyColours.color_E7E7E7,
  1042 + )),
  1043 + VEmptyView(24),
  1044 + InkWell(
  1045 + onTap: () {
  1046 + setState(() {
  1047 + customerProvider.isHighConsumption =
  1048 + !customerProvider.isHighConsumption;
  1049 + });
  1050 + },
  1051 + child: Container(
  1052 + padding: EdgeInsets.symmetric(
  1053 + vertical: w(8), horizontal: w(14)),
  1054 + child: Row(
  1055 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  1056 + crossAxisAlignment: CrossAxisAlignment.center,
  1057 + children: [
  1058 + Text('高消费客户标记',
  1059 + style: TextStyle(
  1060 + color: MyColours.color_515151,
  1061 + fontSize: ScreenUtil().setSp(28))),
  1062 + Image.asset(
  1063 + customerProvider.isHighConsumption
  1064 + ? Utils.getImgPath('swich_on')
  1065 + : Utils.getImgPath('swich_off'),
  1066 + width: ScreenUtil().setWidth(88),
  1067 + // height: ScreenUtil().setWidth(82),
  1068 + ),
  1069 + ],
  1070 + ),
  1071 + )),
  1072 + Padding(
  1073 + padding: EdgeInsets.only(left: w(14), right: w(10)),
  1074 + child: MyDivider(
  1075 + double.infinity,
  1076 + w(1),
  1077 + color: MyColours.color_E7E7E7,
  1078 + )),
  1079 + VEmptyView(24),
  1080 + Container(
  1081 + padding:
  1082 + EdgeInsets.symmetric(vertical: w(8), horizontal: w(14)),
  1083 + child: Row(
  1084 + children: [
  1085 + Expanded(
  1086 + child: Container(
  1087 + padding: EdgeInsets.symmetric(vertical: w(8)),
  1088 + child: Text('客户人均消费到达设置金额标记为高单值',
  1089 + overflow: TextOverflow.ellipsis,
  1090 + maxLines: 10,
  1091 + style: TextStyle(
  1092 + color: MyColours.color_515151,
  1093 + fontSize: ScreenUtil().setSp(28))))),
  1094 + HEmptyView(2),
  1095 + Container(
  1096 + width: w(40),
  1097 + child: TextField(
  1098 + controller: controllerHighValue,
  1099 + textAlign: TextAlign.right,
  1100 + textAlignVertical: TextAlignVertical.bottom,
  1101 + maxLines: 1,
  1102 + // //光标颜色
  1103 + // cursorColor:
  1104 + // widget.isSelect ? Colors.white : MyColours.color_199095,
  1105 + //输入文本的样式
  1106 + style: TextStyle(
  1107 + color: MyColours.color_515151,
  1108 + fontSize: ScreenUtil().setSp(28),
  1109 + ),
  1110 + inputFormatters: <TextInputFormatter>[
  1111 + FilteringTextInputFormatter.allow(
  1112 + RegExp("[0-9.]")),
  1113 + ],
  1114 + decoration: InputDecoration(
  1115 + isCollapsed: true,
  1116 + border: OutlineInputBorder(
  1117 + borderSide: BorderSide.none),
  1118 + hintText: '输入',
  1119 + hintStyle: TextStyle(
  1120 + color: MyColours.color_999999,
  1121 + fontSize: ScreenUtil().setSp(28),
  1122 + ),
  1123 + enabledBorder: new UnderlineInputBorder(
  1124 + borderSide: BorderSide.none,
  1125 + ),
  1126 + focusedBorder: new UnderlineInputBorder(
  1127 + borderSide: BorderSide.none,
  1128 + ),
  1129 + ),
  1130 + onChanged: (value) {},
  1131 + onEditingComplete: () {
  1132 + FocusScope.of(context)
  1133 + .requestFocus(FocusNode()); //点击空白处隐藏键盘
  1134 + },
  1135 + keyboardType: TextInputType.number),
  1136 + ),
  1137 + HEmptyView(5),
  1138 + Text('元',
  1139 + style: TextStyle(
  1140 + color: MyColours.color_999999,
  1141 + fontSize: ScreenUtil().setSp(28))),
  1142 + // HEmptyView(24),
  1143 + ],
  1144 + )),
  1145 + Padding(
  1146 + padding: EdgeInsets.only(left: w(14), right: w(10)),
  1147 + child: MyDivider(
  1148 + double.infinity,
  1149 + w(1),
  1150 + color: MyColours.color_E7E7E7,
  1151 + )),
  1152 + VEmptyView(24),
  1153 + VEmptyView(48),
832 Text('店内自定义标签', 1154 Text('店内自定义标签',
833 style: TextStyle( 1155 style: TextStyle(
834 color: MyColours.color_515151, 1156 color: MyColours.color_515151,
@@ -872,6 +1194,24 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> { @@ -872,6 +1194,24 @@ class _CustomerSettingPageState extends State<CustomerSettingPage> {
872 textColor: MyColours.color_ffffff, 1194 textColor: MyColours.color_ffffff,
873 onPressed: () { 1195 onPressed: () {
874 FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘 1196 FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
  1197 +
  1198 + //前置条件判断
  1199 + if (customerProvider.isHighFrequency) {
  1200 + if (controllerDeadline.text.trim().length == 0) {
  1201 + Utils.showToast('请输入指定期限');
  1202 + return;
  1203 + }
  1204 + if (controllerConsumptionTimes.text.trim().length == 0) {
  1205 + Utils.showToast('请输入消费次数');
  1206 + return;
  1207 + }
  1208 + }
  1209 + if (customerProvider.isHighConsumption) {
  1210 + if (controllerHighValue.text.trim().length == 0) {
  1211 + Utils.showToast('请设置客户人均消费到达金额');
  1212 + return;
  1213 + }
  1214 + }
875 _saveData(); 1215 _saveData();
876 }, 1216 },
877 ), 1217 ),
@@ -104,7 +104,7 @@ class CustomerProvider extends ChangeNotifier { @@ -104,7 +104,7 @@ class CustomerProvider extends ChangeNotifier {
104 List<FilterBtnModel> filterHydList = []; //活跃度 104 List<FilterBtnModel> filterHydList = []; //活跃度
105 List<FilterBtnModel> filterLabelList = []; //自定义标签 105 List<FilterBtnModel> filterLabelList = []; //自定义标签
106 List<FilterBtnModel> filterDayList = []; //高级筛选---天数 7、30、60、120 106 List<FilterBtnModel> filterDayList = []; //高级筛选---天数 7、30、60、120
107 - List<FilterBtnModel> filterMoneyList = []; //0-100 100-200 200-300 300以上 107 + List<FilterBtnModel> filterMoneyList = []; //0-100 100-200 200-300 300以上
108 bool hydSelAll = false; 108 bool hydSelAll = false;
109 bool labelSelAll = false; 109 bool labelSelAll = false;
110 bool manageSelAll = false; 110 bool manageSelAll = false;
@@ -135,12 +135,14 @@ class CustomerProvider extends ChangeNotifier { @@ -135,12 +135,14 @@ class CustomerProvider extends ChangeNotifier {
135 bool isSetOver = true; 135 bool isSetOver = true;
136 bool isReserveOver = true; 136 bool isReserveOver = true;
137 bool isReserveCancel = true; 137 bool isReserveCancel = true;
138 -  
139 138
140 bool cancelOrderdayShopowner = true; 139 bool cancelOrderdayShopowner = true;
141 bool cancelOrderdayManager = true; 140 bool cancelOrderdayManager = true;
142 bool cancelOrderdayOther = true; 141 bool cancelOrderdayOther = true;
143 142
  143 + bool isHighFrequency = false; // 高频客户标记开关 1 开 0 关
  144 + bool isHighConsumption = false; // 高消费客户标记开关 1 开 0 关
  145 +
144 List<MarketingSmsTemplateSunModel>? marketingSmsData = []; 146 List<MarketingSmsTemplateSunModel>? marketingSmsData = [];
145 147
146 List<GetReportFieldSunModel>? reportFieldModelData = []; //导出数据字段 148 List<GetReportFieldSunModel>? reportFieldModelData = []; //导出数据字段
@@ -396,10 +398,7 @@ class CustomerProvider extends ChangeNotifier { @@ -396,10 +398,7 @@ class CustomerProvider extends ChangeNotifier {
396 model3.select = false; 398 model3.select = false;
397 filterDayList.add(model3); 399 filterDayList.add(model3);
398 400
399 -  
400 -  
401 -  
402 - filterMoneyList = []; 401 + filterMoneyList = [];
403 FilterBtnModel modelm = FilterBtnModel(); 402 FilterBtnModel modelm = FilterBtnModel();
404 modelm.id = '0-100'; 403 modelm.id = '0-100';
405 modelm.title = '0-100'; 404 modelm.title = '0-100';
@@ -421,16 +420,6 @@ class CustomerProvider extends ChangeNotifier { @@ -421,16 +420,6 @@ class CustomerProvider extends ChangeNotifier {
421 model3m.select = false; 420 model3m.select = false;
422 filterMoneyList.add(model3m); 421 filterMoneyList.add(model3m);
423 422
424 -  
425 -  
426 -  
427 -  
428 -  
429 -  
430 -  
431 -  
432 -  
433 -  
434 filterHydList = []; 423 filterHydList = [];
435 // FilterBtnModel modelhyd1 = FilterBtnModel(); 424 // FilterBtnModel modelhyd1 = FilterBtnModel();
436 // modelhyd1.id = '0'; 425 // modelhyd1.id = '0';
@@ -2263,12 +2252,13 @@ class CustomerProvider extends ChangeNotifier { @@ -2263,12 +2252,13 @@ class CustomerProvider extends ChangeNotifier {
2263 context, Method.post, HttpUrl.seller_guest_get, 2252 context, Method.post, HttpUrl.seller_guest_get,
2264 data: params, showLoading: showLoading, selfDismiss: selfDismiss); 2253 data: params, showLoading: showLoading, selfDismiss: selfDismiss);
2265 if (baseResp != null && baseResp.code == Constant.status_success) { 2254 if (baseResp != null && baseResp.code == Constant.status_success) {
2266 -  
2267 sellerGuestData = 2255 sellerGuestData =
2268 SellerGuestModel.fromJson(baseResp.responseData!).data; 2256 SellerGuestModel.fromJson(baseResp.responseData!).data;
2269 if (sellerGuestData != null) { 2257 if (sellerGuestData != null) {
2270 isrepair = sellerGuestData!.isAdditional == '1' ? true : false; 2258 isrepair = sellerGuestData!.isAdditional == '1' ? true : false;
2271 isselfphone = sellerGuestData!.isEnterSelf == '1' ? true : false; 2259 isselfphone = sellerGuestData!.isEnterSelf == '1' ? true : false;
  2260 + isHighFrequency = sellerGuestData!.isHighFrequency == '1'?true:false;
  2261 + isHighConsumption = sellerGuestData!.isHighConsumption == '1'?true:false;
2272 pageStateBirthdaySetting = PageState.Success; 2262 pageStateBirthdaySetting = PageState.Success;
2273 return true; 2263 return true;
2274 } 2264 }